openrat-cms

OpenRat Content Management System
git clone http://git.code.weiherhei.de/openrat-cms.git
Log | Files | Refs | README

commit 86feb9d73fc44573580f349ddc7de531349ca588
parent 6cd51dc1076424d7cb7e82f6b32a7ebcf26e8e04
Author: Jan Dankert <develop@jandankert.de>
Date:   Wed, 21 Oct 2020 23:13:01 +0200

Externalize constants.

Diffstat:
Mmodules/cms/base/Startup.class.php | 1+
Mmodules/cms/ui/action/IndexAction.class.php | 69+++++++++++++++++++++++++++++++++------------------------------------
Amodules/cms/ui/themes/Theme.class.php | 17+++++++++++++++++
Mmodules/cms/ui/themes/ThemeCompiler.class.php | 37+++++++++++++++----------------------
Mmodules/cms/ui/themes/default/html/views/index/show.php | 15+++++++--------
Mmodules/cms/ui/themes/default/script/openrat.js | 298++++++++++++++++++++++++++++++++++++++++----------------------------------------
Mmodules/cms/ui/themes/default/script/openrat.min.js | 5++---
Mmodules/cms/ui/themes/default/script/openrat/workbench.js | 4+++-
Mmodules/cms/ui/themes/default/style/openrat-ui.less | 3+++
Mmodules/cms/ui/themes/default/style/openrat.css | 12+++++++++++-
Mmodules/cms/ui/themes/default/style/openrat.min.css | 2+-
11 files changed, 242 insertions(+), 221 deletions(-)

diff --git a/modules/cms/base/Startup.class.php b/modules/cms/base/Startup.class.php @@ -36,6 +36,7 @@ class Startup { const TITLE = 'OpenRat CMS'; const VERSION = Version::VERSION; + const DATE = Version::DATE; /** * Initialize. diff --git a/modules/cms/ui/action/IndexAction.class.php b/modules/cms/ui/action/IndexAction.class.php @@ -6,13 +6,16 @@ use cms\action\Action; use cms\action\RequestParams; use cms\auth\Auth; use cms\base\Configuration; +use cms\base\Configuration as C; use cms\base\Startup; use cms\model\BaseObject; use cms\model\Project; use cms\model\User; use cms\model\Value; +use cms\ui\themes\Theme; use Exception; use language\Messages; +use util\Html; use util\json\JSON; use logger\Logger; use util\Less; @@ -49,14 +52,14 @@ class IndexAction extends Action $user = Session::getUser(); if ( $user ) - $this->lastModified( \cms\base\Configuration::config('config','last_modification_time') ); + $this->lastModified( C::config('config','last_modification_time') ); else $this->lastModified( time() ); $style = $this->getUserStyle( $user ); - $styleConfig = \cms\base\Configuration::config('style-default'); // default style config - $userStyleConfig = \cms\base\Configuration::config('style', $style); // user style config + $styleConfig = C::config('style-default'); // default style config + $userStyleConfig = C::config('style', $style); // user style config if (is_array($userStyleConfig)) $styleConfig = array_merge($styleConfig, $userStyleConfig ); // Merging user style into default style @@ -69,7 +72,7 @@ class IndexAction extends Action - $appName = \cms\base\Configuration::config('application','name'); + $appName = C::config('application','name'); $value = array( 'name' => $appName, @@ -94,8 +97,6 @@ class IndexAction extends Action */ public function showView() { - $conf = \cms\base\Configuration::rawConfig(); - $user = Session::getUser(); // Is a user logged in? @@ -108,9 +109,9 @@ class IndexAction extends Action } if ( $user ) - $this->lastModified( max( $user->loginDate,\cms\base\Configuration::config('config','last_modification_time')) ); + $this->lastModified( max( $user->loginDate, C::config('config','last_modification_time')) ); else - $this->lastModified( \cms\base\Configuration::config('config','last_modification_time') ); + $this->lastModified( C::config('config','last_modification_time') ); // Theme für den angemeldeten Benuter ermitteln $style = $this->getUserStyle($user); @@ -127,11 +128,13 @@ class IndexAction extends Action $this->setTemplateVar('action',$action); $this->setTemplateVar('id' ,$id ); - $this->setTemplateVar('jsFiles' , $this->getJSFiles() ); - $this->setTemplateVar('cssFiles',$this->getCSSFiles() ); + $this->setTemplateVar('scriptLink', $this->getScriptLink() ); + $this->setTemplateVar('styleLink' , $this->getStyleLink() ); + + $this->setTemplateVar('themeStyleLink', Html::url('index','themestyle') ); - $styleConfig = \cms\base\Configuration::config('style-default'); // default style config - $userStyleConfig = \cms\base\Configuration::config('style', $style); // user style config + $styleConfig = C::config('style-default'); // default style config + $userStyleConfig = C::config('style', $style); // user style config if (is_array($userStyleConfig)) $styleConfig = array_merge($styleConfig,$userStyleConfig); // Merging user style into default style @@ -141,7 +144,7 @@ class IndexAction extends Action // Theme base color for smartphones colorizing their status bar. $this->setTemplateVar('themeColor', UIUtils::getColorHexCode($styleConfig['title_background_color'])); - $messageOfTheDay = \cms\base\Configuration::config('login', 'motd'); + $messageOfTheDay = C::config('login', 'motd'); if ( !empty($messageOfTheDay) ) $this->addInfoFor( new User(),Messages::MOTD,array('motd'=>$messageOfTheDay) ); @@ -161,7 +164,7 @@ class IndexAction extends Action $methodList[] = array('name'=>$method,'open'=>$openByDefault); } $this->setTemplateVar('methodList', $methodList); - $this->setTemplateVar('favicon_url', \cms\base\Configuration::Conf()->subset('theme')->get('favicon','modules/cms/ui/themes/default/images/openrat-logo.ico') ); + $this->setTemplateVar('favicon_url', C::subset('theme')->get('favicon','modules/cms/ui/themes/default/images/openrat-logo.ico') ); $vars = $this->getOutputData(); $this->setTemplateVar( 'notices',$vars['notices'] ); // will be extracted in the included template file. @@ -177,13 +180,14 @@ class IndexAction extends Action /** - * Gets all necessary CSS files for displaying the UI. - * @return string[] + * Gets CSS file for displaying the UI. + * + * @return string */ - private function getCSSFiles() + private function getStyleLink() { // Ok, for now there is only 1 CSS file, which contains all UI styles. - return [ Startup::THEMES_DIR . 'default/style/openrat'.(PRODUCTION?'.min':'').'.css' ]; + return Startup::THEMES_DIR . 'default/'.(PRODUCTION?Theme::STYLE_MINIFIED_FILENAME:Theme::STYLE_FILENAME); } @@ -210,7 +214,7 @@ class IndexAction extends Action $css = ''; - foreach (array_keys(\cms\base\Configuration::config('style')) as $styleId) + foreach (array_keys(C::config('style')) as $styleId) { try { @@ -221,7 +225,7 @@ class IndexAction extends Action )); $parser->parseFile($lessFile,basename($lessFile)); - $styleConfig = array_merge( \cms\base\Configuration::config('style-default'), \cms\base\Configuration::config('style', $styleId) ); + $styleConfig = array_merge( C::config('style-default'), C::config('style', $styleId) ); $lessVars = array( 'cms-theme-id' => strtolower($styleId), 'cms-image-path' => 'themes/default/images/' @@ -242,27 +246,20 @@ class IndexAction extends Action } if (PRODUCTION) - { return $css; // Should we minify here? Bandwidth vs. cpu-load. - } else - { return $css; - } } /** - * Gets all JS files for displaying the UI. + * Gets JS file for displaying the UI. * - * @return string[] + * @return string */ - private function getJSFiles() + private function getScriptLink() { - return [ - // There is only 1 JS file needed for the UI. It contains all script files. - Startup::THEMES_DIR . 'default/script/openrat'.(PRODUCTION?'.min':'').'.js' - ]; + return Startup::THEMES_DIR . 'default/'.(PRODUCTION?Theme::SCRIPT_MINIFIED_FILENAME:Theme::SCRIPT_FILENAME); } @@ -294,7 +291,7 @@ class IndexAction extends Action // Das zuletzt geänderte Objekt benutzen. - if ( \cms\base\Configuration::config('login','start','start_lastchanged_object') ) + if ( C::config('login','start','start_lastchanged_object') ) { $objectid = Value::getLastChangedObjectByUserId($user->userid); @@ -310,7 +307,7 @@ class IndexAction extends Action } // Das einzige Projekt benutzen - if ( \cms\base\Configuration::config('login','start','start_single_project') ) + if ( C::config('login','start','start_single_project') ) { $projects = Project::getAllProjects(); if ( count($projects) == 1 ) { @@ -326,7 +323,7 @@ class IndexAction extends Action private function tryAutoLogin() { - $modules = \cms\base\Configuration::config('security','autologin','modules'); + $modules = C::config('security','autologin','modules'); $username = null; foreach( $modules as $module) @@ -382,10 +379,10 @@ class IndexAction extends Action private function getUserStyle( $user ) { // Theme für den angemeldeten Benuter ermitteln - if ( $user && isset(\cms\base\Configuration::config('style')[$user->style])) + if ( $user && isset(C::config('style')[$user->style])) $style = $user->style; else - $style = \cms\base\Configuration::config('interface', 'style', 'default'); + $style = C::config('interface', 'style', 'default'); return $style; } diff --git a/modules/cms/ui/themes/Theme.class.php b/modules/cms/ui/themes/Theme.class.php @@ -0,0 +1,16 @@ +<?php + + +namespace cms\ui\themes; + + +class Theme +{ + const THEME_DEFAULT = 'default'; + + const STYLE_FILENAME = 'style/openrat.css'; + const STYLE_MINIFIED_FILENAME = 'style/openrat.min.css'; + + const SCRIPT_FILENAME = 'script/openrat.js'; + const SCRIPT_MINIFIED_FILENAME = 'script/openrat.min.js'; +}+ \ No newline at end of file diff --git a/modules/cms/ui/themes/ThemeCompiler.class.php b/modules/cms/ui/themes/ThemeCompiler.class.php @@ -15,8 +15,6 @@ use util\Less; */ class ThemeCompiler { - public $theme = 'default'; - public function compileAll() { $this->compileStyles(); $this->compileScripts(); @@ -25,8 +23,8 @@ class ThemeCompiler public function compileStyles() { - $combinedCssFile = __DIR__.'/default/style/openrat.css'; - $combinedCssFileMin = __DIR__.'/default/style/openrat.min.css'; + $combinedCssFile = __DIR__.'/default/'.Theme::STYLE_FILENAME; + $combinedCssFileMin = __DIR__.'/default/'.Theme::STYLE_MINIFIED_FILENAME; file_put_contents($combinedCssFile ,''); file_put_contents($combinedCssFileMin,''); @@ -49,6 +47,8 @@ class ThemeCompiler $css[] = __DIR__.'/../../../editor/simplemde/simplemde'; $css[] = __DIR__.'/../../../editor/trumbowyg/ui/trumbowyg'; + $css[] = __DIR__.'/../../../editor/codemirror/lib/codemirror'; + foreach ($css as $cssF) { $lessFile = $cssF . '.less'; @@ -111,8 +111,8 @@ class ThemeCompiler public function compileScripts() { - $combinedJsFile = __DIR__.'/default/script/openrat.js'; - $combinedJsFileMin = __DIR__.'/default/script/openrat.min.js'; + $combinedJsFile = __DIR__.'/default/'.Theme::SCRIPT_FILENAME; + $combinedJsFileMin = __DIR__.'/default/'.Theme::SCRIPT_MINIFIED_FILENAME; file_put_contents( $combinedJsFile ,''); file_put_contents( $combinedJsFileMin,''); @@ -120,14 +120,11 @@ class ThemeCompiler $js = []; $js[] = __DIR__.'/default/script/jquery'; $js[] = __DIR__.'/default/script/jquery-ui'; - //$js[] = __DIR__.'/default/script/jquery.scrollTo'; - // $js[] = OR_THEMES_EXT_DIR default/script/jquery.mjs.nestedSortable.js"></script> // Jquery-Plugins $js[] = __DIR__.'/default/script/plugin/jquery-plugin-orSearch'; $js[] = __DIR__.'/default/script/plugin/jquery-plugin-orLinkify'; $js[] = __DIR__.'/default/script/plugin/jquery-plugin-orTree'; - $js[] = __DIR__.'/default/script/plugin/jquery-plugin-orLoadView'; $js[] = __DIR__.'/default/script/plugin/jquery-plugin-orAutoheight'; $js[] = __DIR__.'/default/script/jquery-qrcode'; $js[] = __DIR__.'/default/script/jquery.hotkeys'; @@ -135,7 +132,6 @@ class ThemeCompiler // Codemirror Source Editor $js[] = __DIR__.'/../../../editor/codemirror/lib/codemirror'; - $js[] = __DIR__.'/../../../editor/codemirror/lib/codemirror'; $js[] = __DIR__.'/../../../editor/codemirror/mode/handlebars/handlebars'; $js[] = __DIR__.'/../../../editor/codemirror/mode/smalltalk/smalltalk'; $js[] = __DIR__.'/../../../editor/codemirror/mode/php/php'; @@ -284,31 +280,28 @@ class ThemeCompiler $jsFileMin = $jsFile . '.min.js'; $jsFileNormal = $jsFile . '.js'; - - if (!is_file($jsFileNormal) && !is_file($jsFileMin)) - { - Logger::warn("Missing Javascript file: $jsFileNormal"); - continue; - } - - file_put_contents($combinedJsFile, '/* Include script: '.basename($jsFile).' */'."\n",FILE_APPEND); - - if (is_file($jsFileMin)) + if ( is_file($jsFileMin) ) { - // Nur eine Min-Version existiert. Das ist ok. + // A minified version exists, this is ok, we take it. + file_put_contents($combinedJsFile, '/* Include script: '.basename($jsFileMin).' */'."\n",FILE_APPEND); file_put_contents($combinedJsFile , file_get_contents($jsFileMin)."\n",FILE_APPEND); file_put_contents($combinedJsFileMin, file_get_contents($jsFileMin)."\n",FILE_APPEND); echo 'Copied content from minified source file '.$jsFileMin."\n"; } - else + elseif( is_file($jsFileNormal) ) { + // A normal script file exists. + file_put_contents($combinedJsFile, '/* Include script: '.basename($jsFileNormal).' */'."\n",FILE_APPEND); file_put_contents($combinedJsFile , file_get_contents($jsFileNormal)."\n",FILE_APPEND); + // Minify.... $jz = new JSqueeze(); file_put_contents($combinedJsFileMin, $jz->squeeze(file_get_contents($jsFileNormal))."\n",FILE_APPEND); echo 'Copied content from source file '.$jsFileNormal."\n"; + } else { + throw new \LogicException('Missing javascript: '.$jsFile ); } } echo 'Created file '.$combinedJsFile."\n"; diff --git a/modules/cms/ui/themes/default/html/views/index/show.php b/modules/cms/ui/themes/default/html/views/index/show.php @@ -12,12 +12,9 @@ <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta charset="<?php echo $charset ?>"> <meta name="robots" content="noindex,nofollow" > -<?php foreach( $jsFiles as $jsFile ) { ?> <script src="<?php echo $jsFile ?>" defer></script> -<?php } ?> - <link rel="stylesheet" type="text/css" href="<?php echo Startup::HTML_MODULES_DIR . 'editor/codemirror/lib/codemirror.css' ?>" /> -<?php foreach( $cssFiles as $cssFile) { ?> <link rel="stylesheet" type="text/css" href="<?php echo $cssFile ?>" /> -<?php } ?> - <link rel="stylesheet" type="text/css" href="<?php echo Html::url('index','themestyle',0) ?>" /> + <script src="<?php echo $scriptLink ?>" defer></script> + <link rel="stylesheet" type="text/css" href="<?php echo $styleLink ?>" /> + <link rel="stylesheet" type="text/css" href="<?php echo $themeStyleLink ?>" /> <meta id="theme-color" name="theme-color" content="<?php echo $themeColor ?>" /> <link rel="manifest" href="<?php echo Html::url('index','manifest',0) ?>" /> <link rel="shortcut icon" type="image/x-icon" href="<?php echo $favicon_url ?>"> @@ -52,8 +49,10 @@ <section class="or-collapsible or-collapsible--is-<?php echo $method ['open']?'open':'closed' ?>"> <header class="or-view-header or-collapsible-act-switch or-collapsible-title"> - <span class="or-view-icon image-icon image-icon--method-<?php echo $method['name'] ?>" ></span> - <h1 class="or-view-headline"><?php echo L::lang('METHOD_'.$method['name'] ) ?><i class="or-collapsible--on-open or-image-icon or-image-icon--node-open" /><i class="or-collapsible--on-open or-image-icon or-image-icon--node-open" /></h1> + <span class="or-view-icon or-image-icon or-image-icon--method-<?php echo $method['name'] ?>" ></span> + <?php echo L::lang('METHOD_'.$method['name'] ) ?> + <i class="or-collapsible--on-open or-image-icon or-image-icon--node-open"></i> + <i class="or-collapsible--on-closed or-image-icon or-image-icon--node-closed"></i> </header> <div class="or-collapsible-value or-view or-act-view-loader or-closable" data-method="<?php echo $method['name'] ?>"></div> diff --git a/modules/cms/ui/themes/default/script/openrat.js b/modules/cms/ui/themes/default/script/openrat.js @@ -1,8 +1,8 @@ -/* Include script: jquery */ +/* Include script: jquery.min.js */ /*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ !function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}k.fn=k.prototype={jquery:f,constructor:k,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=k.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return k.each(this,e)},map:function(n){return this.pushStack(k.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(k.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||k.isPlainObject(n)?n:{},i=!1,a[t]=k.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},k.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t){b(e,{nonce:t&&t.nonce})},each:function(e,t){var n,r=0;if(d(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(p,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?k.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(d(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g.apply([],a)},guid:1,support:y}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=t[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,k="sizzle"+1*new Date,m=n.document,S=0,r=0,p=ue(),x=ue(),N=ue(),A=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\.|[\\w-]|[^\0-\\xa0])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",$=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",F=new RegExp(M+"+","g"),B=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="<a id='"+k+"'></a><select id='"+k+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0<se(t,C,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!==C&&T(e),y(e,t)},se.attr=function(e,t){(e.ownerDocument||e)!==C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&j.call(b.attrHandle,t.toLowerCase())?n(e,t,!E):void 0;return void 0!==r?r:d.attributes||!E?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},se.escape=function(e){return(e+"").replace(re,ie)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!d.detectDuplicates,u=!d.sortStable&&e.slice(0),e.sort(D),l){while(t=e[i++])t===e[i]&&(r=n.push(i));while(r--)e.splice(n[r],1)}return u=null,e},o=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else while(t=e[r++])n+=o(t);return n},(b=se.selectors={cacheLength:50,createPseudo:le,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(F," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var y="nth"!==h.slice(0,3),m="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,a,s,u,l=y!==m?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(y){while(l){a=e;while(a=a[l])if(x?a.nodeName.toLowerCase()===f:1===a.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[m?c.firstChild:c.lastChild],m&&p){d=(s=(r=(i=(o=(a=c)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1])&&r[2],a=s&&c.childNodes[s];while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if(1===a.nodeType&&++d&&a===e){i[h]=[S,s,d];break}}else if(p&&(d=s=(r=(i=(o=(a=e)[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]||[])[0]===S&&r[1]),!1===d)while(a=++s&&a&&a[l]||(d=s=0)||u.pop())if((x?a.nodeName.toLowerCase()===f:1===a.nodeType)&&++d&&(p&&((i=(o=a[k]||(a[k]={}))[a.uniqueID]||(o[a.uniqueID]={}))[h]=[S,d]),a===e))break;return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,a=b.pseudos[e]||b.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return a[k]?a(o):1<a.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?le(function(e,t){var n,r=a(e,o),i=r.length;while(i--)e[n=P(e,r[i])]=!(t[n]=r[i])}):function(e){return a(e,0,t)}):a}},pseudos:{not:le(function(e){var r=[],i=[],s=f(e.replace(B,"$1"));return s[k]?le(function(e,t,n,r){var i,o=s(e,null,r,[]),a=e.length;while(a--)(i=o[a])&&(e[a]=!(t[a]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:le(function(t){return function(e){return 0<se(t,e).length}}),contains:le(function(t){return t=t.replace(te,ne),function(e){return-1<(e.textContent||o(e)).indexOf(t)}}),lang:le(function(n){return V.test(n||"")||se.error("unsupported lang: "+n),n=n.replace(te,ne).toLowerCase(),function(e){var t;do{if(t=E?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===a},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:ge(!1),disabled:ge(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return J.test(e.nodeName)},input:function(e){return Q.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ve(function(){return[0]}),last:ve(function(e,t){return[t-1]}),eq:ve(function(e,t,n){return[n<0?n+t:n]}),even:ve(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:ve(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:ve(function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e}),gt:ve(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=de(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=he(e);function me(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function be(s,e,t){var u=e.dir,l=e.next,c=l||u,f=t&&"parentNode"===c,p=r++;return e.first?function(e,t,n){while(e=e[u])if(1===e.nodeType||f)return s(e,t,n);return!1}:function(e,t,n){var r,i,o,a=[S,p];if(n){while(e=e[u])if((1===e.nodeType||f)&&s(e,t,n))return!0}else while(e=e[u])if(1===e.nodeType||f)if(i=(o=e[k]||(e[k]={}))[e.uniqueID]||(o[e.uniqueID]={}),l&&l===e.nodeName.toLowerCase())e=e[u]||e;else{if((r=i[c])&&r[0]===S&&r[1]===p)return a[2]=r[2];if((i[c]=a)[2]=s(e,t,n))return!0}return!1}}function we(i){return 1<i.length?function(e,t,n){var r=i.length;while(r--)if(!i[r](e,t,n))return!1;return!0}:i[0]}function Te(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;s<u;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),l&&t.push(s)));return a}function Ce(d,h,g,v,y,e){return v&&!v[k]&&(v=Ce(v)),y&&!y[k]&&(y=Ce(y,e)),le(function(e,t,n,r){var i,o,a,s=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:Te(c,s,d,n,r),p=g?y||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v){i=Te(p,u),v(i,[],n,r),o=i.length;while(o--)(a=i[o])&&(p[u[o]]=!(f[u[o]]=a))}if(e){if(y||d){if(y){i=[],o=p.length;while(o--)(a=p[o])&&i.push(f[o]=a);y(null,p=[],i,r)}o=p.length;while(o--)(a=p[o])&&-1<(i=y?P(e,a):s[o])&&(e[i]=!(t[i]=a))}}else p=Te(p===t?p.splice(l,p.length):p),y?y(null,t,p,r):H.apply(t,p)})}function Ee(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],a=o||b.relative[" "],s=o?1:0,u=be(function(e){return e===i},a,!0),l=be(function(e){return-1<P(i,e)},a,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=b.relative[e[s].type])c=[be(we(c),t)];else{if((t=b.filter[e[s].type].apply(null,e[s].matches))[k]){for(n=++s;n<r;n++)if(b.relative[e[n].type])break;return Ce(1<s&&we(c),1<s&&xe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),t,s<n&&Ee(e.slice(s,n)),n<r&&Ee(e=e.slice(n)),n<r&&xe(e))}c.push(t)}return we(c)}return me.prototype=b.filters=b.pseudos,b.setFilters=new me,h=se.tokenize=function(e,t){var n,r,i,o,a,s,u,l=x[e+" "];if(l)return t?0:l.slice(0);a=e,s=[],u=b.preFilter;while(a){for(o in n&&!(r=_.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=z.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),a=a.slice(n.length)),b.filter)!(r=G[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?se.error(e):x(e,s).slice(0)},f=se.compile=function(e,t){var n,v,y,m,x,r,i=[],o=[],a=N[e+" "];if(!a){t||(t=h(e)),n=t.length;while(n--)(a=Ee(t[n]))[k]?i.push(a):o.push(a);(a=N(e,(v=o,m=0<(y=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,a,s,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=S+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){a=0,t||o.ownerDocument===C||(T(o),n=!E);while(s=v[a++])if(s(o,t||C,n)){r.push(o);break}i&&(S=h)}m&&((o=!s&&o)&&u--,e&&c.push(o))}if(u+=l,m&&l!==u){a=0;while(s=y[a++])s(c,f,t,n);if(e){if(0<u)while(l--)c[l]||f[l]||(f[l]=q.call(r));f=Te(f)}H.apply(r,f),i&&!e&&0<f.length&&1<u+y.length&&se.uniqueSort(r)}return i&&(S=h,w=p),c},m?le(r):r))).selector=e}return a},g=se.select=function(e,t,n,r){var i,o,a,s,u,l="function"==typeof e&&e,c=!r&&h(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&E&&b.relative[o[1].type]){if(!(t=(b.find.ID(a.matches[0].replace(te,ne),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}i=G.needsContext.test(e)?0:o.length;while(i--){if(a=o[i],b.relative[s=a.type])break;if((u=b.find[s])&&(r=u(a.matches[0].replace(te,ne),ee.test(o[0].type)&&ye(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return H.apply(n,r),n;break}}}return(l||f(e,c))(r,t,!E,n,!t||ee.test(e)&&ye(t.parentNode)||t),n},d.sortStable=k.split("").sort(D).join("")===k,d.detectDuplicates=!!l,T(),d.sortDetached=ce(function(e){return 1&e.compareDocumentPosition(C.createElement("fieldset"))}),ce(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||fe("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),d.attributes&&ce(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||fe("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),ce(function(e){return null==e.getAttribute("disabled")})||fe(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),se}(C);k.find=h,k.expr=h.selectors,k.expr[":"]=k.expr.pseudos,k.uniqueSort=k.unique=h.uniqueSort,k.text=h.getText,k.isXMLDoc=h.isXML,k.contains=h.contains,k.escapeSelector=h.escape;var T=function(e,t,n){var r=[],i=void 0!==n;while((e=e[t])&&9!==e.nodeType)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r},S=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},N=k.expr.match.needsContext;function A(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1<i.call(n,e)!==r}):k.filter(n,e,r)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,function(e){return 1===e.nodeType}))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter(function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0}));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(j(this,e||[],!1))},not:function(e){return this.pushStack(j(this,e||[],!0))},is:function(e){return!!j(this,"string"==typeof e&&N.test(e)?k(e):e||[],!1).length}});var q,L=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0})},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&k(e);if(!N.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(k(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return T(e,"parentNode")},parentsUntil:function(e,t,n){return T(e,"parentNode",n)},next:function(e){return P(e,"nextSibling")},prev:function(e){return P(e,"previousSibling")},nextAll:function(e){return T(e,"nextSibling")},prevAll:function(e){return T(e,"previousSibling")},nextUntil:function(e,t,n){return T(e,"nextSibling",n)},prevUntil:function(e,t,n){return T(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return"undefined"!=typeof e.contentDocument?e.contentDocument:(A(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},function(r,i){k.fn[r]=function(e,t){var n=k.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=k.filter(t,n)),1<this.length&&(O[r]||k.uniqueSort(n),H.test(r)&&n.reverse()),this.pushStack(n)}});var R=/[^\x20\t\r\n\f]+/g;function M(e){return e}function I(e){throw e}function W(e,t,n,r){var i;try{e&&m(i=e.promise)?i.call(e).done(t).fail(n):e&&m(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},k.each(e.match(R)||[],function(e,t){n[t]=!0}),n):k.extend({},r);var i,t,o,a,s=[],u=[],l=-1,c=function(){for(a=a||r.once,o=i=!0;u.length;l=-1){t=u.shift();while(++l<s.length)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1)}r.memory||(t=!1),i=!1,a&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,u.push(t)),function n(e){k.each(e,function(e,t){m(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==w(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return k.each(arguments,function(e,t){var n;while(-1<(n=k.inArray(t,s,n)))s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<k.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return a=u=[],s=t="",this},disabled:function(){return!s},lock:function(){return a=u=[],t||i||(s=t=""),this},locked:function(){return!!a},fireWith:function(e,t){return a||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},k.extend({Deferred:function(e){var o=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],i="pending",a={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},"catch":function(e){return a.then(null,e)},pipe:function(){var i=arguments;return k.Deferred(function(r){k.each(o,function(e,t){var n=m(i[t[4]])&&i[t[4]];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&m(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this,n?[e]:arguments)})}),i=null}).promise()},then:function(t,n,r){var u=0;function l(i,o,a,s){return function(){var n=this,r=arguments,e=function(){var e,t;if(!(i<u)){if((e=a.apply(n,r))===o.promise())throw new TypeError("Thenable self-resolution");t=e&&("object"==typeof e||"function"==typeof e)&&e.then,m(t)?s?t.call(e,l(u,o,M,s),l(u,o,I,s)):(u++,t.call(e,l(u,o,M,s),l(u,o,I,s),l(u,o,M,o.notifyWith))):(a!==M&&(n=void 0,r=[e]),(s||o.resolveWith)(n,r))}},t=s?e:function(){try{e()}catch(e){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(e,t.stackTrace),u<=i+1&&(a!==I&&(n=void 0,r=[e]),o.rejectWith(n,r))}};i?t():(k.Deferred.getStackHook&&(t.stackTrace=k.Deferred.getStackHook()),C.setTimeout(t))}}return k.Deferred(function(e){o[0][3].add(l(0,e,m(r)?r:M,e.notifyWith)),o[1][3].add(l(0,e,m(t)?t:M)),o[2][3].add(l(0,e,m(n)?n:I))}).promise()},promise:function(e){return null!=e?k.extend(e,a):a}},s={};return k.each(o,function(e,t){var n=t[2],r=t[5];a[t[1]]=n.add,r&&n.add(function(){i=r},o[3-e][2].disable,o[3-e][3].disable,o[0][2].lock,o[0][3].lock),n.add(t[3].fire),s[t[0]]=function(){return s[t[0]+"With"](this===s?void 0:this,arguments),this},s[t[0]+"With"]=n.fireWith}),a.promise(s),e&&e.call(s,s),s},when:function(e){var n=arguments.length,t=n,r=Array(t),i=s.call(arguments),o=k.Deferred(),a=function(t){return function(e){r[t]=this,i[t]=1<arguments.length?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&(W(e,o.done(a(t)).resolve,o.reject,!n),"pending"===o.state()||m(i[t]&&i[t].then)))return o.then();while(t--)W(i[t],a(t),o.reject);return o.promise()}});var $=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;k.Deferred.exceptionHook=function(e,t){C.console&&C.console.warn&&e&&$.test(e.name)&&C.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){C.setTimeout(function(){throw e})};var F=k.Deferred();function B(){E.removeEventListener("DOMContentLoaded",B),C.removeEventListener("load",B),k.ready()}k.fn.ready=function(e){return F.then(e)["catch"](function(e){k.readyException(e)}),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||F.resolveWith(E,[k])}}),k.ready.then=F.then,"complete"===E.readyState||"loading"!==E.readyState&&!E.documentElement.doScroll?C.setTimeout(k.ready):(E.addEventListener("DOMContentLoaded",B),C.addEventListener("load",B));var _=function(e,t,n,r,i,o,a){var s=0,u=e.length,l=null==n;if("object"===w(n))for(s in i=!0,n)_(e,t,s,n[s],!0,o,a);else if(void 0!==r&&(i=!0,m(r)||(a=!0),l&&(a?(t.call(e,r),t=null):(l=t,t=function(e,t,n){return l.call(k(e),n)})),t))for(;s<u;s++)t(e[s],n,a?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):u?t(e[0],n):o},z=/^-ms-/,U=/-([a-z])/g;function X(e,t){return t.toUpperCase()}function V(e){return e.replace(z,"ms-").replace(U,X)}var G=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function Y(){this.expando=k.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},G(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[V(t)]=n;else for(r in t)i[V(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][V(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(V):(t=V(t))in r?[t]:t.match(R)||[]).length;while(n--)delete r[t[n]]}(void 0===t||k.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!k.isEmptyObject(t)}};var Q=new Y,J=new Y,K=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Z=/[A-Z]/g;function ee(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(Z,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:K.test(i)?JSON.parse(i):i)}catch(e){}J.set(e,t,n)}else n=void 0;return n}k.extend({hasData:function(e){return J.hasData(e)||Q.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return Q.access(e,t,n)},_removeData:function(e,t){Q.remove(e,t)}}),k.fn.extend({data:function(n,e){var t,r,i,o=this[0],a=o&&o.attributes;if(void 0===n){if(this.length&&(i=J.get(o),1===o.nodeType&&!Q.get(o,"hasDataAttrs"))){t=a.length;while(t--)a[t]&&0===(r=a[t].name).indexOf("data-")&&(r=V(r.slice(5)),ee(o,r,i[r]));Q.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof n?this.each(function(){J.set(this,n)}):_(this,function(e){var t;if(o&&void 0===e)return void 0!==(t=J.get(o,n))?t:void 0!==(t=ee(o,n))?t:void 0;this.each(function(){J.set(this,n,e)})},null,e,1<arguments.length,null,!0)},removeData:function(e){return this.each(function(){J.remove(this,e)})}}),k.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=Q.get(e,t),n&&(!r||Array.isArray(n)?r=Q.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){k.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Q.get(e,n)||Q.access(e,n,{empty:k.Callbacks("once memory").add(function(){Q.remove(e,[t+"queue",n])})})}}),k.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?k.queue(this[0],t):void 0===n?this:this.each(function(){var e=k.queue(this,t,n);k._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&k.dequeue(this,t)})},dequeue:function(e){return this.each(function(){k.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=k.Deferred(),o=this,a=this.length,s=function(){--r||i.resolveWith(o,[o])};"string"!=typeof e&&(t=e,e=void 0),e=e||"fx";while(a--)(n=Q.get(o[a],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var te=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ne=new RegExp("^(?:([+-])=|)("+te+")([a-z%]*)$","i"),re=["Top","Right","Bottom","Left"],ie=E.documentElement,oe=function(e){return k.contains(e.ownerDocument,e)},ae={composed:!0};ie.getRootNode&&(oe=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(ae)===e.ownerDocument});var se=function(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&oe(e)&&"none"===k.css(e,"display")},ue=function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=a[o];return i};function le(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=s(),l=n&&n[3]||(k.cssNumber[t]?"":"px"),c=e.nodeType&&(k.cssNumber[t]||"px"!==l&&+u)&&ne.exec(k.css(e,t));if(c&&c[3]!==l){u/=2,l=l||c[3],c=+u||1;while(a--)k.style(e,t,c+l),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),c/=o;c*=2,k.style(e,t,c+l),n=n||[]}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var ce={};function fe(e,t){for(var n,r,i,o,a,s,u,l=[],c=0,f=e.length;c<f;c++)(r=e[c]).style&&(n=r.style.display,t?("none"===n&&(l[c]=Q.get(r,"display")||null,l[c]||(r.style.display="")),""===r.style.display&&se(r)&&(l[c]=(u=a=o=void 0,a=(i=r).ownerDocument,s=i.nodeName,(u=ce[s])||(o=a.body.appendChild(a.createElement(s)),u=k.css(o,"display"),o.parentNode.removeChild(o),"none"===u&&(u="block"),ce[s]=u)))):"none"!==n&&(l[c]="none",Q.set(r,"display",n)));for(c=0;c<f;c++)null!=l[c]&&(e[c].style.display=l[c]);return e}k.fn.extend({show:function(){return fe(this,!0)},hide:function(){return fe(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){se(this)?k(this).show():k(this).hide()})}});var pe=/^(?:checkbox|radio)$/i,de=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n<r;n++)Q.set(e[n],"globalEval",!t||Q.get(t[n],"globalEval"))}ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;var me,xe,be=/<|&#?\w+;/;function we(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===w(o))k.merge(p,o.nodeType?[o]:o);else if(be.test(o)){a=a||f.appendChild(t.createElement("div")),s=(de.exec(o)||["",""])[1].toLowerCase(),u=ge[s]||ge._default,a.innerHTML=u[1]+k.htmlPrefilter(o)+u[2],c=u[0];while(c--)a=a.lastChild;k.merge(p,a.childNodes),(a=f.firstChild).textContent=""}else p.push(t.createTextNode(o));f.textContent="",d=0;while(o=p[d++])if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(l=oe(o),a=ve(f.appendChild(o),"script"),l&&ye(a),n){c=0;while(o=a[c++])he.test(o.type||"")&&n.push(o)}return f}me=E.createDocumentFragment().appendChild(E.createElement("div")),(xe=E.createElement("input")).setAttribute("type","radio"),xe.setAttribute("checked","checked"),xe.setAttribute("name","t"),me.appendChild(xe),y.checkClone=me.cloneNode(!0).cloneNode(!0).lastChild.checked,me.innerHTML="<textarea>x</textarea>",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t<arguments.length;t++)u[t]=arguments[t];if(s.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,s)){a=k.event.handlers.call(this,s,l),t=0;while((i=a[t++])&&!s.isPropagationStopped()){s.currentTarget=i.elem,n=0;while((o=i.handlers[n++])&&!s.isImmediatePropagationStopped())s.rnamespace&&!1!==o.namespace&&!s.rnamespace.test(o.namespace)||(s.handleObj=o,s.data=o.data,void 0!==(r=((k.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,u))&&!1===(s.result=r)&&(s.preventDefault(),s.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,l=e.target;if(u&&l.nodeType&&!("click"===e.type&&1<=e.button))for(;l!==this;l=l.parentNode||this)if(1===l.nodeType&&("click"!==e.type||!0!==l.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<k(i,this).index(l):k.find(i,this,null,[l]).length),a[i]&&o.push(r);o.length&&s.push({elem:l,handlers:o})}return l=this,u<t.length&&s.push({elem:l,handlers:t.slice(u)}),s},addProp:function(t,e){Object.defineProperty(k.Event.prototype,t,{enumerable:!0,configurable:!0,get:m(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&De(t,"click",ke),!1},trigger:function(e){var t=this||e;return pe.test(t.type)&&t.click&&A(t,"input")&&De(t,"click"),!0},_default:function(e){var t=e.target;return pe.test(t.type)&&t.click&&A(t,"input")&&Q.get(t,"click")||A(t,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ke:Se,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Se,isPropagationStopped:Se,isImmediatePropagationStopped:Se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ke,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ke,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ke,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,"char":!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:function(e){var t=e.button;return null==e.which&&Te.test(e.type)?null!=e.charCode?e.charCode:e.keyCode:!e.which&&void 0!==t&&Ce.test(e.type)?1&t?1:2&t?3:4&t?2:0:e.which}},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},function(e,t){k.event.special[e]={setup:function(){return De(this,e,Ne),!1},trigger:function(){return De(this,e),!0},delegateType:t}}),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){k.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||k.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),k.fn.extend({on:function(e,t,n,r){return Ae(this,e,t,n,r)},one:function(e,t,n,r){return Ae(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof e){for(i in e)this.off(i,t,e[i]);return this}return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Se),this.each(function(){k.event.remove(this,e,n,t)})}});var je=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([a-z][^\/\0>\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/<script|<style|<link/i,Le=/checked\s*(?:[^=]|=\s*.checked.)/i,He=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n<r;n++)k.event.add(t,i,l[i][n]);J.hasData(e)&&(s=J.access(e),u=k.extend({},s),J.set(t,u))}}function Ie(n,r,i,o){r=g.apply([],r);var e,t,a,s,u,l,c=0,f=n.length,p=f-1,d=r[0],h=m(d);if(h||1<f&&"string"==typeof d&&!y.checkClone&&Le.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),Ie(t,r,i,o)});if(f&&(t=(e=we(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(s=(a=k.map(ve(e,"script"),Pe)).length;c<f;c++)u=e,c!==p&&(u=k.clone(u,!0,!0),s&&k.merge(a,ve(u,"script"))),i.call(n[c],u,c);if(s)for(l=a[a.length-1].ownerDocument,k.map(a,Re),c=0;c<s;c++)u=a[c],he.test(u.type||"")&&!Q.access(u,"globalEval")&&k.contains(l,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?k._evalUrl&&!u.noModule&&k._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")}):b(u.textContent.replace(He,""),u,l))}return n}function We(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(ve(r)),r.parentNode&&(n&&oe(r)&&ye(ve(r,"script")),r.parentNode.removeChild(r));return e}k.extend({htmlPrefilter:function(e){return e.replace(je,"<$1></$2>")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r<i;r++)s=o[r],u=a[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&pe.test(s.type)?u.checked=s.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||ve(e),a=a||ve(c),r=0,i=o.length;r<i;r++)Me(o[r],a[r]);else Me(e,c);return 0<(a=ve(c,"script")).length&&ye(a,!f&&ve(e,"script")),c},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(G(n)){if(t=n[Q.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[Q.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),k.fn.extend({detach:function(e){return We(this,e,!0)},remove:function(e){return We(this,e)},text:function(e){return _(this,function(e){return void 0===e?k.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Ie(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Oe(this,e).appendChild(e)})},prepend:function(){return Ie(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Oe(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Ie(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(ve(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return k.clone(this,e,t)})},html:function(e){return _(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!qe.test(e)&&!ge[(de.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(ve(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return Ie(this,arguments,function(e){var t=this.parentNode;k.inArray(this,n)<0&&(k.cleanData(ve(this)),t&&t.replaceChild(e,this))},n)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,a){k.fn[e]=function(e){for(var t,n=[],r=k(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),k(r[o])[a](t),u.apply(n,t.get());return this.pushStack(n)}});var $e=new RegExp("^("+te+")(?!px)[a-z%]+$","i"),Fe=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},Be=new RegExp(re.join("|"),"i");function _e(e,t,n){var r,i,o,a,s=e.style;return(n=n||Fe(e))&&(""!==(a=n.getPropertyValue(t)||n[t])||oe(e)||(a=k.style(e,t)),!y.pixelBoxStyles()&&$e.test(a)&&Be.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o)),void 0!==a?a+"":a}function ze(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){function e(){if(u){s.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",u.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ie.appendChild(s).appendChild(u);var e=C.getComputedStyle(u);n="1%"!==e.top,a=12===t(e.marginLeft),u.style.right="60%",o=36===t(e.right),r=36===t(e.width),u.style.position="absolute",i=12===t(u.offsetWidth/3),ie.removeChild(s),u=null}}function t(e){return Math.round(parseFloat(e))}var n,r,i,o,a,s=E.createElement("div"),u=E.createElement("div");u.style&&(u.style.backgroundClip="content-box",u.cloneNode(!0).style.backgroundClip="",y.clearCloneStyle="content-box"===u.style.backgroundClip,k.extend(y,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),a},scrollboxSize:function(){return e(),i}}))}();var Ue=["Webkit","Moz","ms"],Xe=E.createElement("div").style,Ve={};function Ge(e){var t=k.cssProps[e]||Ve[e];return t||(e in Xe?e:Ve[e]=function(e){var t=e[0].toUpperCase()+e.slice(1),n=Ue.length;while(n--)if((e=Ue[n]+t)in Xe)return e}(e)||e)}var Ye=/^(none|table(?!-c[ea]).+)/,Qe=/^--/,Je={position:"absolute",visibility:"hidden",display:"block"},Ke={letterSpacing:"0",fontWeight:"400"};function Ze(e,t,n){var r=ne.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function et(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=k.css(e,n+re[a],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+re[a],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+re[a]+"Width",!0,i))):(u+=k.css(e,"padding"+re[a],!0,i),"padding"!==n?u+=k.css(e,"border"+re[a]+"Width",!0,i):s+=k.css(e,"border"+re[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function tt(e,t,n){var r=Fe(e),i=(!y.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,r),o=i,a=_e(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if($e.test(a)){if(!n)return a;a="auto"}return(!y.boxSizingReliable()&&i||"auto"===a||!parseFloat(a)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+et(e,t,n||(i?"border":"content"),o,r,a)+"px"}function nt(e,t,n,r,i){return new nt.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=_e(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=V(t),u=Qe.test(t),l=e.style;if(u||(t=Ge(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:l[t];"string"===(o=typeof n)&&(i=ne.exec(n))&&i[1]&&(n=le(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(k.cssNumber[s]?"":"px")),y.clearCloneStyle||""!==n||0!==t.indexOf("background")||(l[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?l.setProperty(t,n):l[t]=n))}},css:function(e,t,n,r){var i,o,a,s=V(t);return Qe.test(t)||(t=Ge(s)),(a=k.cssHooks[t]||k.cssHooks[s])&&"get"in a&&(i=a.get(e,!0,n)),void 0===i&&(i=_e(e,t,r)),"normal"===i&&t in Ke&&(i=Ke[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),k.each(["height","width"],function(e,u){k.cssHooks[u]={get:function(e,t,n){if(t)return!Ye.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?tt(e,u,n):ue(e,Je,function(){return tt(e,u,n)})},set:function(e,t,n){var r,i=Fe(e),o=!y.scrollboxSize()&&"absolute"===i.position,a=(o||n)&&"border-box"===k.css(e,"boxSizing",!1,i),s=n?et(e,u,n,a,i):0;return a&&o&&(s-=Math.ceil(e["offset"+u[0].toUpperCase()+u.slice(1)]-parseFloat(i[u])-et(e,u,"border",!1,i)-.5)),s&&(r=ne.exec(t))&&"px"!==(r[3]||"px")&&(e.style[u]=t,t=k.css(e,u)),Ze(0,t,s)}}}),k.cssHooks.marginLeft=ze(y.reliableMarginLeft,function(e,t){if(t)return(parseFloat(_e(e,"marginLeft"))||e.getBoundingClientRect().left-ue(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),k.each({margin:"",padding:"",border:"Width"},function(i,o){k.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+re[t]+o]=r[t]||r[t-2]||r[0];return n}},"margin"!==i&&(k.cssHooks[i+o].set=Ze)}),k.fn.extend({css:function(e,t){return _(this,function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=Fe(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)},e,t,1<arguments.length)}}),((k.Tween=nt).prototype={constructor:nt,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=nt.propHooks[this.prop];return e&&e.get?e.get(this):nt.propHooks._default.get(this)},run:function(e){var t,n=nt.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):nt.propHooks._default.set(this),this}}).init.prototype=nt.prototype,(nt.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=k.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[Ge(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=nt.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=nt.prototype.init,k.fx.step={};var rt,it,ot,at,st=/^(?:toggle|show|hide)$/,ut=/queueHooks$/;function lt(){it&&(!1===E.hidden&&C.requestAnimationFrame?C.requestAnimationFrame(lt):C.setTimeout(lt,k.fx.interval),k.fx.tick())}function ct(){return C.setTimeout(function(){rt=void 0}),rt=Date.now()}function ft(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=re[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function pt(e,t,n){for(var r,i=(dt.tweeners[t]||[]).concat(dt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function dt(o,e,t){var n,a,r=0,i=dt.prefilters.length,s=k.Deferred().always(function(){delete u.elem}),u=function(){if(a)return!1;for(var e=rt||ct(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(o,[l,n,t]),n<1&&i?t:(i||s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l]),!1)},l=s.promise({elem:o,props:k.extend({},e),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},t),originalProperties:e,originalOptions:t,startTime:rt||ct(),duration:t.duration,tweens:[],createTween:function(e,t){var n=k.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(a)return this;for(a=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(o,[l,1,0]),s.resolveWith(o,[l,e])):s.rejectWith(o,[l,e]),this}}),c=l.props;for(!function(e,t){var n,r,i,o,a;for(n in e)if(i=t[r=V(n)],o=e[n],Array.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(a=k.cssHooks[r])&&"expand"in a)for(n in o=a.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=dt.prefilters[r].call(l,o,c,l.opts))return m(n.stop)&&(k._queueHooks(l.elem,l.opts.queue).stop=n.stop.bind(n)),n;return k.map(c,pt,l),m(l.opts.start)&&l.opts.start.call(o,l),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always),k.fx.timer(k.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l}k.Animation=k.extend(dt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return le(n.elem,e,ne.exec(t),n),n}]},tweener:function(e,t){m(e)?(t=e,e=["*"]):e=e.match(R);for(var n,r=0,i=e.length;r<i;r++)n=e[r],dt.tweeners[n]=dt.tweeners[n]||[],dt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,l,c,f="width"in t||"height"in t,p=this,d={},h=e.style,g=e.nodeType&&se(e),v=Q.get(e,"fxshow");for(r in n.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()})})),t)if(i=t[r],st.test(i)){if(delete t[r],o=o||"toggle"===i,i===(g?"hide":"show")){if("show"!==i||!v||void 0===v[r])continue;g=!0}d[r]=v&&v[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(d))for(r in f&&1===e.nodeType&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],null==(l=v&&v.display)&&(l=Q.get(e,"display")),"none"===(c=k.css(e,"display"))&&(l?c=l:(fe([e],!0),l=e.style.display||l,c=k.css(e,"display"),fe([e]))),("inline"===c||"inline-block"===c&&null!=l)&&"none"===k.css(e,"float")&&(u||(p.done(function(){h.display=l}),null==l&&(c=h.display,l="none"===c?"":c)),h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]})),u=!1,d)u||(v?"hidden"in v&&(g=v.hidden):v=Q.access(e,"fxshow",{display:l}),o&&(v.hidden=!g),g&&fe([e],!0),p.done(function(){for(r in g||fe([e]),Q.remove(e,"fxshow"),d)k.style(e,r,d[r])})),u=pt(g?v[r]:0,r,p),r in v||(v[r]=u.start,g&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?dt.prefilters.unshift(e):dt.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||m(e)&&e,duration:e,easing:n&&t||t&&!m(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){m(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(se).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=k.isEmptyObject(t),o=k.speed(e,n,r),a=function(){var e=dt(this,k.extend({},t),o);(i||Q.get(this,"finish"))&&e.stop(!0)};return a.finish=a,i||!1===o.queue?this.each(a):this.queue(o.queue,a)},stop:function(i,e,o){var a=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=k.timers,r=Q.get(this);if(t)r[t]&&r[t].stop&&a(r[t]);else for(t in r)r[t]&&r[t].stop&&ut.test(t)&&a(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||k.dequeue(this,i)})},finish:function(a){return!1!==a&&(a=a||"fx"),this.each(function(){var e,t=Q.get(this),n=t[a+"queue"],r=t[a+"queueHooks"],i=k.timers,o=n?n.length:0;for(t.finish=!0,k.queue(this,a,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===a&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),k.each(["toggle","show","hide"],function(e,r){var i=k.fn[r];k.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(ft(r,!0),e,t,n)}}),k.each({slideDown:ft("show"),slideUp:ft("hide"),slideToggle:ft("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){k.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(rt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),rt=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){it||(it=!0,lt())},k.fx.stop=function(){it=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(r,e){return r=k.fx&&k.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},ot=E.createElement("input"),at=E.createElement("select").appendChild(E.createElement("option")),ot.type="checkbox",y.checkOn=""!==ot.value,y.optSelected=at.selected,(ot=E.createElement("input")).value="t",ot.type="radio",y.radioValue="t"===ot.value;var ht,gt=k.expr.attrHandle;k.fn.extend({attr:function(e,t){return _(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){k.removeAttr(this,e)})}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?ht:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=k.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!y.radioValue&&"radio"===t&&A(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(R);if(i&&1===e.nodeType)while(n=i[r++])e.removeAttribute(n)}}),ht={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),function(e,t){var a=gt[t]||k.find.attr;gt[t]=function(e,t,n){var r,i,o=t.toLowerCase();return n||(i=gt[o],gt[o]=r,r=null!=a(e,t,n)?o:null,gt[o]=i),r}});var vt=/^(?:input|select|textarea|button)$/i,yt=/^(?:a|area)$/i;function mt(e){return(e.match(R)||[]).join(" ")}function xt(e){return e.getAttribute&&e.getAttribute("class")||""}function bt(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(R)||[]}k.fn.extend({prop:function(e,t){return _(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[k.propFix[e]||e]})}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):vt.test(e.nodeName)||yt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),y.optSelected||(k.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){k.propFix[this.toLowerCase()]=this}),k.fn.extend({addClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){k(this).addClass(t.call(this,e,xt(this)))});if((e=bt(t)).length)while(n=this[u++])if(i=xt(n),r=1===n.nodeType&&" "+mt(i)+" "){a=0;while(o=e[a++])r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,o,a,s,u=0;if(m(t))return this.each(function(e){k(this).removeClass(t.call(this,e,xt(this)))});if(!arguments.length)return this.attr("class","");if((e=bt(t)).length)while(n=this[u++])if(i=xt(n),r=1===n.nodeType&&" "+mt(i)+" "){a=0;while(o=e[a++])while(-1<r.indexOf(" "+o+" "))r=r.replace(" "+o+" "," ");i!==(s=mt(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var o=typeof i,a="string"===o||Array.isArray(i);return"boolean"==typeof t&&a?t?this.addClass(i):this.removeClass(i):m(i)?this.each(function(e){k(this).toggleClass(i.call(this,e,xt(this),t),t)}):this.each(function(){var e,t,n,r;if(a){t=0,n=k(this),r=bt(i);while(e=r[t++])n.hasClass(e)?n.removeClass(e):n.addClass(e)}else void 0!==i&&"boolean"!==o||((e=xt(this))&&Q.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":Q.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;t=" "+e+" ";while(n=this[r++])if(1===n.nodeType&&-1<(" "+mt(xt(n))+" ").indexOf(t))return!0;return!1}});var wt=/\r/g;k.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=m(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,k(this).val()):n)?t="":"number"==typeof t?t+="":Array.isArray(t)&&(t=k.map(t,function(e){return null==e?"":e+""})),(r=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=k.valHooks[t.type]||k.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(wt,""):null==e?"":e:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:mt(k.text(e))}},select:{get:function(e){var t,n,r,i=e.options,o=e.selectedIndex,a="select-one"===e.type,s=a?null:[],u=a?o+1:i.length;for(r=o<0?u:a?o:0;r<u;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(t=k(n).val(),a)return t;s.push(t)}return s},set:function(e,t){var n,r,i=e.options,o=k.makeArray(t),a=i.length;while(a--)((r=i[a]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},y.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})}),y.focusin="onfocusin"in C;var Tt=/^(?:focusinfocus|focusoutblur)$/,Ct=function(e){e.stopPropagation()};k.extend(k.event,{trigger:function(e,t,n,r){var i,o,a,s,u,l,c,f,p=[n||E],d=v.call(e,"type")?e.type:e,h=v.call(e,"namespace")?e.namespace.split("."):[];if(o=f=a=n=n||E,3!==n.nodeType&&8!==n.nodeType&&!Tt.test(d+k.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),u=d.indexOf(":")<0&&"on"+d,(e=e[k.expando]?e:new k.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),c=k.event.special[d]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!x(n)){for(s=c.delegateType||d,Tt.test(s+d)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||E)&&p.push(a.defaultView||a.parentWindow||C)}i=0;while((o=p[i++])&&!e.isPropagationStopped())f=o,e.type=1<i?s:c.bindType||d,(l=(Q.get(o,"events")||{})[e.type]&&Q.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&G(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(p.pop(),t)||!G(n)||u&&m(n[d])&&!x(n)&&((a=n[u])&&(n[u]=null),k.event.triggered=d,e.isPropagationStopped()&&f.addEventListener(d,Ct),n[d](),e.isPropagationStopped()&&f.removeEventListener(d,Ct),k.event.triggered=void 0,a&&(n[u]=a)),e.result}},simulate:function(e,t,n){var r=k.extend(new k.Event,n,{type:e,isSimulated:!0});k.event.trigger(r,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each(function(){k.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),y.focusin||k.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){k.event.simulate(r,e.target,k.event.fix(e))};k.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=Q.access(e,r);t||e.addEventListener(n,i,!0),Q.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=Q.access(e,r)-1;t?Q.access(e,r,t):(e.removeEventListener(n,i,!0),Q.remove(e,r))}}});var Et=C.location,kt=Date.now(),St=/\?/;k.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||k.error("Invalid XML: "+e),t};var Nt=/\[\]$/,At=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function qt(n,e,r,i){var t;if(Array.isArray(e))k.each(e,function(e,t){r||Nt.test(n)?i(n,t):qt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==w(e))i(n,e);else for(t in e)qt(n+"["+t+"]",e[t],r,i)}k.param=function(e,t){var n,r=[],i=function(e,t){var n=m(t)?t():t;r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==n?"":n)};if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,function(){i(this.name,this.value)});else for(n in e)qt(n,e[n],t,i);return r.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&jt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!pe.test(e))}).map(function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,function(e){return{name:t.name,value:e.replace(At,"\r\n")}}):{name:t.name,value:n.replace(At,"\r\n")}}).get()}});var Lt=/%20/g,Ht=/#.*$/,Ot=/([?&])_=[^&]*/,Pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,Rt=/^(?:GET|HEAD)$/,Mt=/^\/\//,It={},Wt={},$t="*/".concat("*"),Ft=E.createElement("a");function Bt(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(R)||[];if(m(t))while(n=i[r++])"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function _t(t,i,o,a){var s={},u=t===Wt;function l(e){var r;return s[e]=!0,k.each(t[e]||[],function(e,t){var n=t(i,o,a);return"string"!=typeof n||u||s[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function zt(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&k.extend(!0,e,r),e}Ft.href=Et.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Et.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Et.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$t,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?zt(zt(e,k.ajaxSettings),t):zt(k.ajaxSettings,e)},ajaxPrefilter:Bt(It),ajaxTransport:Bt(Wt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,g,i,o,v=k.ajaxSetup({},t),y=v.context||v,m=v.context&&(y.nodeType||y.jquery)?k(y):k.event,x=k.Deferred(),b=k.Callbacks("once memory"),w=v.statusCode||{},a={},s={},u="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(h){if(!n){n={};while(t=Pt.exec(p))n[t[1].toLowerCase()+" "]=(n[t[1].toLowerCase()+" "]||[]).concat(t[2])}t=n[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return h?p:null},setRequestHeader:function(e,t){return null==h&&(e=s[e.toLowerCase()]=s[e.toLowerCase()]||e,a[e]=t),this},overrideMimeType:function(e){return null==h&&(v.mimeType=e),this},statusCode:function(e){var t;if(e)if(h)T.always(e[T.status]);else for(t in e)w[t]=[w[t],e[t]];return this},abort:function(e){var t=e||u;return c&&c.abort(t),l(0,t),this}};if(x.promise(T),v.url=((e||v.url||Et.href)+"").replace(Mt,Et.protocol+"//"),v.type=t.method||t.type||v.method||v.type,v.dataTypes=(v.dataType||"*").toLowerCase().match(R)||[""],null==v.crossDomain){r=E.createElement("a");try{r.href=v.url,r.href=r.href,v.crossDomain=Ft.protocol+"//"+Ft.host!=r.protocol+"//"+r.host}catch(e){v.crossDomain=!0}}if(v.data&&v.processData&&"string"!=typeof v.data&&(v.data=k.param(v.data,v.traditional)),_t(It,v,t,T),h)return T;for(i in(g=k.event&&v.global)&&0==k.active++&&k.event.trigger("ajaxStart"),v.type=v.type.toUpperCase(),v.hasContent=!Rt.test(v.type),f=v.url.replace(Ht,""),v.hasContent?v.data&&v.processData&&0===(v.contentType||"").indexOf("application/x-www-form-urlencoded")&&(v.data=v.data.replace(Lt,"+")):(o=v.url.slice(f.length),v.data&&(v.processData||"string"==typeof v.data)&&(f+=(St.test(f)?"&":"?")+v.data,delete v.data),!1===v.cache&&(f=f.replace(Ot,"$1"),o=(St.test(f)?"&":"?")+"_="+kt+++o),v.url=f+o),v.ifModified&&(k.lastModified[f]&&T.setRequestHeader("If-Modified-Since",k.lastModified[f]),k.etag[f]&&T.setRequestHeader("If-None-Match",k.etag[f])),(v.data&&v.hasContent&&!1!==v.contentType||t.contentType)&&T.setRequestHeader("Content-Type",v.contentType),T.setRequestHeader("Accept",v.dataTypes[0]&&v.accepts[v.dataTypes[0]]?v.accepts[v.dataTypes[0]]+("*"!==v.dataTypes[0]?", "+$t+"; q=0.01":""):v.accepts["*"]),v.headers)T.setRequestHeader(i,v.headers[i]);if(v.beforeSend&&(!1===v.beforeSend.call(y,T,v)||h))return T.abort();if(u="abort",b.add(v.complete),T.done(v.success),T.fail(v.error),c=_t(Wt,v,t,T)){if(T.readyState=1,g&&m.trigger("ajaxSend",[T,v]),h)return T;v.async&&0<v.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},v.timeout));try{h=!1,c.send(a,l)}catch(e){if(h)throw e;l(-1,e)}}else l(-1,"No Transport");function l(e,t,n,r){var i,o,a,s,u,l=t;h||(h=!0,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){var r,i,o,a,s=e.contents,u=e.dataTypes;while("*"===u[0])u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a||(a=i)}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(v,T,n)),s=function(e,t,n,r){var i,o,a,s,u,l={},c=e.dataTypes.slice();if(c[1])for(a in e.converters)l[a.toLowerCase()]=e.converters[a];o=c.shift();while(o)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=l[u+" "+o]||l["* "+o]))for(i in l)if((s=i.split(" "))[1]===o&&(a=l[u+" "+s[0]]||l["* "+s[0]])){!0===a?a=l[i]:!0!==l[i]&&(o=s[0],c.unshift(s[1]));break}if(!0!==a)if(a&&e["throws"])t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(v,s,T,i),i?(v.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(k.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(k.etag[f]=u)),204===e||"HEAD"===v.type?l="nocontent":304===e?l="notmodified":(l=s.state,o=s.data,i=!(a=s.error))):(a=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?x.resolveWith(y,[o,l,T]):x.rejectWith(y,[T,l,a]),T.statusCode(w),w=void 0,g&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,v,i?o:a]),b.fireWith(y,[T,l]),g&&(m.trigger("ajaxComplete",[T,v]),--k.active||k.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],function(e,i){k[i]=function(e,t,n,r){return m(t)&&(r=r||n,n=t,t=void 0),k.ajax(k.extend({url:e,type:i,dataType:r,data:t,success:n},k.isPlainObject(e)&&e))}}),k._evalUrl=function(e,t){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t)}})},k.fn.extend({wrapAll:function(e){var t;return this[0]&&(m(e)&&(e=e.call(this[0])),t=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstElementChild)e=e.firstElementChild;return e}).append(this)),this},wrapInner:function(n){return m(n)?this.each(function(e){k(this).wrapInner(n.call(this,e))}):this.each(function(){var e=k(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=m(t);return this.each(function(e){k(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(e){return this.parent(e).not("body").each(function(){k(this).replaceWith(this.childNodes)}),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var Ut={0:200,1223:204},Xt=k.ajaxSettings.xhr();y.cors=!!Xt&&"withCredentials"in Xt,y.ajax=Xt=!!Xt,k.ajaxTransport(function(i){var o,a;if(y.cors||Xt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=a=r.onload=r.onerror=r.onabort=r.ontimeout=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(Ut[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),a=r.onerror=r.ontimeout=o("error"),void 0!==r.onabort?r.onabort=a:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&a()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}}),k.ajaxPrefilter(function(e){e.crossDomain&&(e.contents.script=!1)}),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),k.ajaxTransport("script",function(n){var r,i;if(n.crossDomain||n.scriptAttrs)return{send:function(e,t){r=k("<script>").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1<s&&(r=mt(e.slice(s)),e=e.slice(0,s)),m(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<a.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),k.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),k.proxy=function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),m(e))return r=s.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(s.call(arguments)))}).guid=e.guid=e.guid||k.guid++,i},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=A,k.isFunction=m,k.isWindow=x,k.camelCase=V,k.type=w,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},"function"==typeof define&&define.amd&&define("jquery",[],function(){return k});var Qt=C.jQuery,Jt=C.$;return k.noConflict=function(e){return C.$===k&&(C.$=Jt),e&&C.jQuery===k&&(C.jQuery=Qt),k},e||(C.jQuery=C.$=k),k}); -/* Include script: jquery-ui */ +/* Include script: jquery-ui.min.js */ /*! jQuery UI - v1.12.1 - 2018-09-03 * http://jqueryui.com * Includes: widget.js, data.js, scroll-parent.js, widgets/draggable.js, widgets/droppable.js, widgets/sortable.js, widgets/mouse.js @@ -115,7 +115,7 @@ else{if(this.containers[s].containerCache.over){this.containers[s]._trigger("out else{c=10000;n=null;h=r.floating||this._isFloating(this.currentItem);p=h?"left":"top";u=h?"width":"height";l=h?"pageX":"pageY";for(o=this.items.length-1;o>=0;o--){if(!t.contains(this.containers[i].element[0],this.items[o].item[0])){continue};if(this.items[o].item[0]===this.currentItem[0]){continue};a=this.items[o].item.offset()[p];f=!1;if(e[l]-a>this.items[o][u]/2){f=!0};if(Math.abs(e[l]-a)<c){c=Math.abs(e[l]-a);n=this.items[o];this.direction=f?"up":"down"}};if(!n&&!this.options.dropOnEmpty){return};if(this.currentContainer===this.containers[i]){if(!this.currentContainer.containerCache.over){this.containers[i]._trigger("over",e,this._uiHash());this.currentContainer.containerCache.over=1};return};n?this._rearrange(e,n,null,!0):this._rearrange(e,null,this.containers[i].element,!0);this._trigger("change",e,this._uiHash());this.containers[i]._trigger("change",e,this._uiHash(this));this.currentContainer=this.containers[i];this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[i]._trigger("over",e,this._uiHash(this));this.containers[i].containerCache.over=1}},_createHelper:function(e){var s=this.options,i=t.isFunction(s.helper)?t(s.helper.apply(this.element[0],[e,this.currentItem])):(s.helper==="clone"?this.currentItem.clone():this.currentItem);if(!i.parents("body").length){t(s.appendTo!=="parent"?s.appendTo:this.currentItem[0].parentNode)[0].appendChild(i[0])};if(i[0]===this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}};if(!i[0].style.width||s.forceHelperSize){i.width(this.currentItem.width())};if(!i[0].style.height||s.forceHelperSize){i.height(this.currentItem.height())};return i},_adjustOffsetFromHelper:function(e){if(typeof e==="string"){e=e.split(" ")};if(t.isArray(e)){e={left:+e[0],top:+e[1]||0}};if("left" in e){this.offset.click.left=e.left+this.margins.left};if("right" in e){this.offset.click.left=this.helperProportions.width-e.right+this.margins.left};if("top" in e){this.offset.click.top=e.top+this.margins.top};if("bottom" in e){this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();if(this.cssPosition==="absolute"&&this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0])){e.left+=this.scrollParent.scrollLeft();e.top+=this.scrollParent.scrollTop()};if(this.offsetParent[0]===this.document[0].body||(this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()==="html"&&t.ui.ie)){e={top:0,left:0}};return{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==="relative"){var t=this.currentItem.position();return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:t.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}} else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:(parseInt(this.currentItem.css("marginLeft"),10)||0),top:(parseInt(this.currentItem.css("marginTop"),10)||0)}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,s,o,i=this.options;if(i.containment==="parent"){i.containment=this.helper[0].parentNode};if(i.containment==="document"||i.containment==="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,i.containment==="document"?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,(i.containment==="document"?(this.document.height()||document.body.parentNode.scrollHeight):this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]};if(!(/^(document|window|parent)$/).test(i.containment)){e=t(i.containment)[0];s=t(i.containment).offset();o=(t(e).css("overflow")!=="hidden");this.containment=[s.left+(parseInt(t(e).css("borderLeftWidth"),10)||0)+(parseInt(t(e).css("paddingLeft"),10)||0)-this.margins.left,s.top+(parseInt(t(e).css("borderTopWidth"),10)||0)+(parseInt(t(e).css("paddingTop"),10)||0)-this.margins.top,s.left+(o?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(t(e).css("borderLeftWidth"),10)||0)-(parseInt(t(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,s.top+(o?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(t(e).css("borderTopWidth"),10)||0)-(parseInt(t(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(e,i){if(!i){i=this.position};var s=e==="absolute"?1:-1,o=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,n=(/(html|body)/i).test(o[0].tagName);return{top:(i.top+this.offset.relative.top*s+this.offset.parent.top*s-((this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(n?0:o.scrollTop()))*s)),left:(i.left+this.offset.relative.left*s+this.offset.parent.left*s-((this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():n?0:o.scrollLeft())*s))}},_generatePosition:function(e){var s,o,i=this.options,n=e.pageX,r=e.pageY,a=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==this.document[0]&&t.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,h=(/(html|body)/i).test(a[0].tagName);if(this.cssPosition==="relative"&&!(this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()};if(this.originalPosition){if(this.containment){if(e.pageX-this.offset.click.left<this.containment[0]){n=this.containment[0]+this.offset.click.left};if(e.pageY-this.offset.click.top<this.containment[1]){r=this.containment[1]+this.offset.click.top};if(e.pageX-this.offset.click.left>this.containment[2]){n=this.containment[2]+this.offset.click.left};if(e.pageY-this.offset.click.top>this.containment[3]){r=this.containment[3]+this.offset.click.top}};if(i.grid){s=this.originalPageY+Math.round((r-this.originalPageY)/i.grid[1])*i.grid[1];r=this.containment?((s-this.offset.click.top>=this.containment[1]&&s-this.offset.click.top<=this.containment[3])?s:((s-this.offset.click.top>=this.containment[1])?s-i.grid[1]:s+i.grid[1])):s;o=this.originalPageX+Math.round((n-this.originalPageX)/i.grid[0])*i.grid[0];n=this.containment?((o-this.offset.click.left>=this.containment[0]&&o-this.offset.click.left<=this.containment[2])?o:((o-this.offset.click.left>=this.containment[0])?o-i.grid[0]:o+i.grid[0])):o}};return{top:(r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+((this.cssPosition==="fixed"?-this.scrollParent.scrollTop():(h?0:a.scrollTop())))),left:(n-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+((this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():h?0:a.scrollLeft())))}},_rearrange:function(t,e,i,s){i?i[0].appendChild(this.placeholder[0]):e.item[0].parentNode.insertBefore(this.placeholder[0],(this.direction==="down"?e.item[0]:e.item[0].nextSibling));this.counter=this.counter?++this.counter:1;var o=this.counter;this._delay(function(){if(o===this.counter){this.refreshPositions(!s)}})},_clear:function(t,e){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length){this.placeholder.before(this.currentItem)};this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(i in this._storedCSS){if(this._storedCSS[i]==="auto"||this._storedCSS[i]==="static"){this._storedCSS[i]=""}};this.currentItem.css(this._storedCSS);this._removeClass(this.currentItem,"ui-sortable-helper")} else{this.currentItem.show()};if(this.fromOutside&&!e){s.push(function(t){this._trigger("receive",t,this._uiHash(this.fromOutside))})};if((this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!e){s.push(function(t){this._trigger("update",t,this._uiHash())})};if(this!==this.currentContainer){if(!e){s.push(function(t){this._trigger("remove",t,this._uiHash())});s.push((function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}).call(this,this.currentContainer));s.push((function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}).call(this,this.currentContainer))}};function o(t,e,i){return function(s){i._trigger(t,s,e._uiHash(e))}};for(i=this.containers.length-1;i>=0;i--){if(!e){s.push(o("deactivate",this,this.containers[i]))};if(this.containers[i].containerCache.over){s.push(o("out",this,this.containers[i]));this.containers[i].containerCache.over=0}};if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove()};if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)};if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex)};this.dragging=!1;if(!e){this._trigger("beforeStop",t,this._uiHash())};this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(!this.cancelHelperRemoval){if(this.helper[0]!==this.currentItem[0]){this.helper.remove()};this.helper=null};if(!e){for(i=0;i<s.length;i++){s[i].call(this,t)};this._trigger("stop",t,this._uiHash())};this.fromOutside=!1;return!this.cancelHelperRemoval},_trigger:function(){if(t.Widget.prototype._trigger.apply(this,arguments)===!1){this.cancel()}},_uiHash:function(e){var i=e||this;return{helper:i.helper,placeholder:i.placeholder||t([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:e?e.element:null}}})})); -/* Include script: jquery-plugin-orSearch */ +/* Include script: jquery-plugin-orSearch.js */ /** * Suche mit Dropdown */ @@ -191,7 +191,7 @@ jQuery.fn.orSearch = function( options ) } }); }; -/* Include script: jquery-plugin-orLinkify */ +/* Include script: jquery-plugin-orLinkify.js */ /** * JQuery-Plugin, enable clicking on an area. * It searches for an anchor (<a href="..." />) in the child elements and virtually clicks on it. @@ -285,7 +285,7 @@ jQuery.fn.orLinkify = function( options ) -/* Include script: jquery-plugin-orTree */ +/* Include script: jquery-plugin-orTree.js */ /** * Baum darstellen. * @@ -383,7 +383,7 @@ jQuery.fn.orTree = function (options) }); }; -/* Include script: jquery-plugin-orAutoheight */ +/* Include script: jquery-plugin-orAutoheight.js */ /** * Input-Hints */ @@ -406,19 +406,17 @@ jQuery.fn.orAutoheight = function() resize(this); }); }; -/* Include script: jquery-qrcode */ +/* Include script: jquery-qrcode.min.js */ /*! jquery-qrcode v0.14.0 - https://larsjung.de/jquery-qrcode/ */ !function(r){"use strict";function t(t,e,n,o){function a(r,t){return r-=o,t-=o,0>r||r>=c||0>t||t>=c?!1:f.isDark(r,t)}function i(r,t,e,n){var o=u.isDark,a=1/l;u.isDark=function(i,u){var f=u*a,c=i*a,l=f+a,g=c+a;return o(i,u)&&(r>l||f>e||t>g||c>n)}}var u={},f=r(n,e);f.addData(t),f.make(),o=o||0;var c=f.getModuleCount(),l=f.getModuleCount()+2*o;return u.text=t,u.level=e,u.version=n,u.moduleCount=l,u.isDark=a,u.addBlank=i,u}function e(r,e,n,o,a){n=Math.max(1,n||1),o=Math.min(40,o||40);for(var i=n;o>=i;i+=1)try{return t(r,e,i,a)}catch(u){}}function n(r,t,e){var n=e.size,o="bold "+e.mSize*n+"px "+e.fontname,a=w("<canvas/>")[0].getContext("2d");a.font=o;var i=a.measureText(e.label).width,u=e.mSize,f=i/n,c=(1-f)*e.mPosX,l=(1-u)*e.mPosY,g=c+f,s=l+u,v=.01;1===e.mode?r.addBlank(0,l-v,n,s+v):r.addBlank(c-v,l-v,g+v,s+v),t.fillStyle=e.fontcolor,t.font=o,t.fillText(e.label,c*n,l*n+.75*e.mSize*n)}function o(r,t,e){var n=e.size,o=e.image.naturalWidth||1,a=e.image.naturalHeight||1,i=e.mSize,u=i*o/a,f=(1-u)*e.mPosX,c=(1-i)*e.mPosY,l=f+u,g=c+i,s=.01;3===e.mode?r.addBlank(0,c-s,n,g+s):r.addBlank(f-s,c-s,l+s,g+s),t.drawImage(e.image,f*n,c*n,u*n,i*n)}function a(r,t,e){w(e.background).is("img")?t.drawImage(e.background,0,0,e.size,e.size):e.background&&(t.fillStyle=e.background,t.fillRect(e.left,e.top,e.size,e.size));var a=e.mode;1===a||2===a?n(r,t,e):(3===a||4===a)&&o(r,t,e)}function i(r,t,e,n,o,a,i,u){r.isDark(i,u)&&t.rect(n,o,a,a)}function u(r,t,e,n,o,a,i,u,f,c){i?r.moveTo(t+a,e):r.moveTo(t,e),u?(r.lineTo(n-a,e),r.arcTo(n,e,n,o,a)):r.lineTo(n,e),f?(r.lineTo(n,o-a),r.arcTo(n,o,t,o,a)):r.lineTo(n,o),c?(r.lineTo(t+a,o),r.arcTo(t,o,t,e,a)):r.lineTo(t,o),i?(r.lineTo(t,e+a),r.arcTo(t,e,n,e,a)):r.lineTo(t,e)}function f(r,t,e,n,o,a,i,u,f,c){i&&(r.moveTo(t+a,e),r.lineTo(t,e),r.lineTo(t,e+a),r.arcTo(t,e,t+a,e,a)),u&&(r.moveTo(n-a,e),r.lineTo(n,e),r.lineTo(n,e+a),r.arcTo(n,e,n-a,e,a)),f&&(r.moveTo(n-a,o),r.lineTo(n,o),r.lineTo(n,o-a),r.arcTo(n,o,n-a,o,a)),c&&(r.moveTo(t+a,o),r.lineTo(t,o),r.lineTo(t,o-a),r.arcTo(t,o,t+a,o,a))}function c(r,t,e,n,o,a,i,c){var l=r.isDark,g=n+a,s=o+a,v=e.radius*a,h=i-1,d=i+1,w=c-1,m=c+1,y=l(i,c),T=l(h,w),p=l(h,c),B=l(h,m),A=l(i,m),E=l(d,m),k=l(d,c),M=l(d,w),C=l(i,w);y?u(t,n,o,g,s,v,!p&&!C,!p&&!A,!k&&!A,!k&&!C):f(t,n,o,g,s,v,p&&C&&T,p&&A&&B,k&&A&&E,k&&C&&M)}function l(r,t,e){var n,o,a=r.moduleCount,u=e.size/a,f=i;for(e.radius>0&&e.radius<=.5&&(f=c),t.beginPath(),n=0;a>n;n+=1)for(o=0;a>o;o+=1){var l=e.left+o*u,g=e.top+n*u,s=u;f(r,t,e,l,g,s,n,o)}if(w(e.fill).is("img")){t.strokeStyle="rgba(0,0,0,0.5)",t.lineWidth=2,t.stroke();var v=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",t.fill(),t.globalCompositeOperation=v,t.clip(),t.drawImage(e.fill,0,0,e.size,e.size),t.restore()}else t.fillStyle=e.fill,t.fill()}function g(r,t){var n=e(t.text,t.ecLevel,t.minVersion,t.maxVersion,t.quiet);if(!n)return null;var o=w(r).data("qrcode",n),i=o[0].getContext("2d");return a(n,i,t),l(n,i,t),o}function s(r){var t=w("<canvas/>").attr("width",r.size).attr("height",r.size);return g(t,r)}function v(r){return w("<img/>").attr("src",s(r)[0].toDataURL("image/png"))}function h(r){var t=e(r.text,r.ecLevel,r.minVersion,r.maxVersion,r.quiet);if(!t)return null;var n,o,a=r.size,i=r.background,u=Math.floor,f=t.moduleCount,c=u(a/f),l=u(.5*(a-c*f)),g={position:"relative",left:0,top:0,padding:0,margin:0,width:a,height:a},s={position:"absolute",padding:0,margin:0,width:c,height:c,"background-color":r.fill},v=w("<div/>").data("qrcode",t).css(g);for(i&&v.css("background-color",i),n=0;f>n;n+=1)for(o=0;f>o;o+=1)t.isDark(n,o)&&w("<div/>").css(s).css({left:l+o*c,top:l+n*c}).appendTo(v);return v}function d(r){return m&&"canvas"===r.render?s(r):m&&"image"===r.render?v(r):h(r)}var w=window.jQuery,m=function(){var r=document.createElement("canvas");return!(!r.getContext||!r.getContext("2d"))}(),y={render:"canvas",minVersion:1,maxVersion:40,ecLevel:"L",left:0,top:0,size:200,fill:"#000",background:null,text:"no text",radius:0,quiet:0,mode:0,mSize:.1,mPosX:.5,mPosY:.5,label:"no label",fontname:"sans",fontcolor:"#000",image:null};w.fn.qrcode=function(r){var t=w.extend({},y,r);return this.each(function(r,e){"canvas"===e.nodeName.toLowerCase()?g(e,t):w(e).append(d(t))})}}(function(){var r=function(){function r(t,e){if("undefined"==typeof t.length)throw new Error(t.length+"/"+e);var n=function(){for(var r=0;r<t.length&&0==t[r];)r+=1;for(var n=new Array(t.length-r+e),o=0;o<t.length-r;o+=1)n[o]=t[o+r];return n}(),o={};return o.getAt=function(r){return n[r]},o.getLength=function(){return n.length},o.multiply=function(t){for(var e=new Array(o.getLength()+t.getLength()-1),n=0;n<o.getLength();n+=1)for(var a=0;a<t.getLength();a+=1)e[n+a]^=i.gexp(i.glog(o.getAt(n))+i.glog(t.getAt(a)));return r(e,0)},o.mod=function(t){if(o.getLength()-t.getLength()<0)return o;for(var e=i.glog(o.getAt(0))-i.glog(t.getAt(0)),n=new Array(o.getLength()),a=0;a<o.getLength();a+=1)n[a]=o.getAt(a);for(var a=0;a<t.getLength();a+=1)n[a]^=i.gexp(i.glog(t.getAt(a))+e);return r(n,0).mod(t)},o}var t=function(t,e){var o=236,i=17,l=t,g=n[e],s=null,v=0,d=null,w=new Array,m={},y=function(r,t){v=4*l+17,s=function(r){for(var t=new Array(r),e=0;r>e;e+=1){t[e]=new Array(r);for(var n=0;r>n;n+=1)t[e][n]=null}return t}(v),T(0,0),T(v-7,0),T(0,v-7),A(),B(),k(r,t),l>=7&&E(r),null==d&&(d=D(l,g,w)),M(d,t)},T=function(r,t){for(var e=-1;7>=e;e+=1)if(!(-1>=r+e||r+e>=v))for(var n=-1;7>=n;n+=1)-1>=t+n||t+n>=v||(e>=0&&6>=e&&(0==n||6==n)||n>=0&&6>=n&&(0==e||6==e)||e>=2&&4>=e&&n>=2&&4>=n?s[r+e][t+n]=!0:s[r+e][t+n]=!1)},p=function(){for(var r=0,t=0,e=0;8>e;e+=1){y(!0,e);var n=a.getLostPoint(m);(0==e||r>n)&&(r=n,t=e)}return t},B=function(){for(var r=8;v-8>r;r+=1)null==s[r][6]&&(s[r][6]=r%2==0);for(var t=8;v-8>t;t+=1)null==s[6][t]&&(s[6][t]=t%2==0)},A=function(){for(var r=a.getPatternPosition(l),t=0;t<r.length;t+=1)for(var e=0;e<r.length;e+=1){var n=r[t],o=r[e];if(null==s[n][o])for(var i=-2;2>=i;i+=1)for(var u=-2;2>=u;u+=1)-2==i||2==i||-2==u||2==u||0==i&&0==u?s[n+i][o+u]=!0:s[n+i][o+u]=!1}},E=function(r){for(var t=a.getBCHTypeNumber(l),e=0;18>e;e+=1){var n=!r&&1==(t>>e&1);s[Math.floor(e/3)][e%3+v-8-3]=n}for(var e=0;18>e;e+=1){var n=!r&&1==(t>>e&1);s[e%3+v-8-3][Math.floor(e/3)]=n}},k=function(r,t){for(var e=g<<3|t,n=a.getBCHTypeInfo(e),o=0;15>o;o+=1){var i=!r&&1==(n>>o&1);6>o?s[o][8]=i:8>o?s[o+1][8]=i:s[v-15+o][8]=i}for(var o=0;15>o;o+=1){var i=!r&&1==(n>>o&1);8>o?s[8][v-o-1]=i:9>o?s[8][15-o-1+1]=i:s[8][15-o-1]=i}s[v-8][8]=!r},M=function(r,t){for(var e=-1,n=v-1,o=7,i=0,u=a.getMaskFunction(t),f=v-1;f>0;f-=2)for(6==f&&(f-=1);;){for(var c=0;2>c;c+=1)if(null==s[n][f-c]){var l=!1;i<r.length&&(l=1==(r[i]>>>o&1));var g=u(n,f-c);g&&(l=!l),s[n][f-c]=l,o-=1,-1==o&&(i+=1,o=7)}if(n+=e,0>n||n>=v){n-=e,e=-e;break}}},C=function(t,e){for(var n=0,o=0,i=0,u=new Array(e.length),f=new Array(e.length),c=0;c<e.length;c+=1){var l=e[c].dataCount,g=e[c].totalCount-l;o=Math.max(o,l),i=Math.max(i,g),u[c]=new Array(l);for(var s=0;s<u[c].length;s+=1)u[c][s]=255&t.getBuffer()[s+n];n+=l;var v=a.getErrorCorrectPolynomial(g),h=r(u[c],v.getLength()-1),d=h.mod(v);f[c]=new Array(v.getLength()-1);for(var s=0;s<f[c].length;s+=1){var w=s+d.getLength()-f[c].length;f[c][s]=w>=0?d.getAt(w):0}}for(var m=0,s=0;s<e.length;s+=1)m+=e[s].totalCount;for(var y=new Array(m),T=0,s=0;o>s;s+=1)for(var c=0;c<e.length;c+=1)s<u[c].length&&(y[T]=u[c][s],T+=1);for(var s=0;i>s;s+=1)for(var c=0;c<e.length;c+=1)s<f[c].length&&(y[T]=f[c][s],T+=1);return y},D=function(r,t,e){for(var n=u.getRSBlocks(r,t),c=f(),l=0;l<e.length;l+=1){var g=e[l];c.put(g.getMode(),4),c.put(g.getLength(),a.getLengthInBits(g.getMode(),r)),g.write(c)}for(var s=0,l=0;l<n.length;l+=1)s+=n[l].dataCount;if(c.getLengthInBits()>8*s)throw new Error("code length overflow. ("+c.getLengthInBits()+">"+8*s+")");for(c.getLengthInBits()+4<=8*s&&c.put(0,4);c.getLengthInBits()%8!=0;)c.putBit(!1);for(;;){if(c.getLengthInBits()>=8*s)break;if(c.put(o,8),c.getLengthInBits()>=8*s)break;c.put(i,8)}return C(c,n)};return m.addData=function(r){var t=c(r);w.push(t),d=null},m.isDark=function(r,t){if(0>r||r>=v||0>t||t>=v)throw new Error(r+","+t);return s[r][t]},m.getModuleCount=function(){return v},m.make=function(){y(!1,p())},m.createTableTag=function(r,t){r=r||2,t="undefined"==typeof t?4*r:t;var e="";e+='<table style="',e+=" border-width: 0px; border-style: none;",e+=" border-collapse: collapse;",e+=" padding: 0px; margin: "+t+"px;",e+='">',e+="<tbody>";for(var n=0;n<m.getModuleCount();n+=1){e+="<tr>";for(var o=0;o<m.getModuleCount();o+=1)e+='<td style="',e+=" border-width: 0px; border-style: none;",e+=" border-collapse: collapse;",e+=" padding: 0px; margin: 0px;",e+=" width: "+r+"px;",e+=" height: "+r+"px;",e+=" background-color: ",e+=m.isDark(n,o)?"#000000":"#ffffff",e+=";",e+='"/>';e+="</tr>"}return e+="</tbody>",e+="</table>"},m.createImgTag=function(r,t){r=r||2,t="undefined"==typeof t?4*r:t;var e=m.getModuleCount()*r+2*t,n=t,o=e-t;return h(e,e,function(t,e){if(t>=n&&o>t&&e>=n&&o>e){var a=Math.floor((t-n)/r),i=Math.floor((e-n)/r);return m.isDark(i,a)?0:1}return 1})},m};t.stringToBytes=function(r){for(var t=new Array,e=0;e<r.length;e+=1){var n=r.charCodeAt(e);t.push(255&n)}return t},t.createStringToBytes=function(r,t){var e=function(){for(var e=s(r),n=function(){var r=e.read();if(-1==r)throw new Error;return r},o=0,a={};;){var i=e.read();if(-1==i)break;var u=n(),f=n(),c=n(),l=String.fromCharCode(i<<8|u),g=f<<8|c;a[l]=g,o+=1}if(o!=t)throw new Error(o+" != "+t);return a}(),n="?".charCodeAt(0);return function(r){for(var t=new Array,o=0;o<r.length;o+=1){var a=r.charCodeAt(o);if(128>a)t.push(a);else{var i=e[r.charAt(o)];"number"==typeof i?(255&i)==i?t.push(i):(t.push(i>>>8),t.push(255&i)):t.push(n)}}return t}};var e={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},n={L:1,M:0,Q:3,H:2},o={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},a=function(){var t=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],n=1335,a=7973,u=21522,f={},c=function(r){for(var t=0;0!=r;)t+=1,r>>>=1;return t};return f.getBCHTypeInfo=function(r){for(var t=r<<10;c(t)-c(n)>=0;)t^=n<<c(t)-c(n);return(r<<10|t)^u},f.getBCHTypeNumber=function(r){for(var t=r<<12;c(t)-c(a)>=0;)t^=a<<c(t)-c(a);return r<<12|t},f.getPatternPosition=function(r){return t[r-1]},f.getMaskFunction=function(r){switch(r){case o.PATTERN000:return function(r,t){return(r+t)%2==0};case o.PATTERN001:return function(r,t){return r%2==0};case o.PATTERN010:return function(r,t){return t%3==0};case o.PATTERN011:return function(r,t){return(r+t)%3==0};case o.PATTERN100:return function(r,t){return(Math.floor(r/2)+Math.floor(t/3))%2==0};case o.PATTERN101:return function(r,t){return r*t%2+r*t%3==0};case o.PATTERN110:return function(r,t){return(r*t%2+r*t%3)%2==0};case o.PATTERN111:return function(r,t){return(r*t%3+(r+t)%2)%2==0};default:throw new Error("bad maskPattern:"+r)}},f.getErrorCorrectPolynomial=function(t){for(var e=r([1],0),n=0;t>n;n+=1)e=e.multiply(r([1,i.gexp(n)],0));return e},f.getLengthInBits=function(r,t){if(t>=1&&10>t)switch(r){case e.MODE_NUMBER:return 10;case e.MODE_ALPHA_NUM:return 9;case e.MODE_8BIT_BYTE:return 8;case e.MODE_KANJI:return 8;default:throw new Error("mode:"+r)}else if(27>t)switch(r){case e.MODE_NUMBER:return 12;case e.MODE_ALPHA_NUM:return 11;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 10;default:throw new Error("mode:"+r)}else{if(!(41>t))throw new Error("type:"+t);switch(r){case e.MODE_NUMBER:return 14;case e.MODE_ALPHA_NUM:return 13;case e.MODE_8BIT_BYTE:return 16;case e.MODE_KANJI:return 12;default:throw new Error("mode:"+r)}}},f.getLostPoint=function(r){for(var t=r.getModuleCount(),e=0,n=0;t>n;n+=1)for(var o=0;t>o;o+=1){for(var a=0,i=r.isDark(n,o),u=-1;1>=u;u+=1)if(!(0>n+u||n+u>=t))for(var f=-1;1>=f;f+=1)0>o+f||o+f>=t||(0!=u||0!=f)&&i==r.isDark(n+u,o+f)&&(a+=1);a>5&&(e+=3+a-5)}for(var n=0;t-1>n;n+=1)for(var o=0;t-1>o;o+=1){var c=0;r.isDark(n,o)&&(c+=1),r.isDark(n+1,o)&&(c+=1),r.isDark(n,o+1)&&(c+=1),r.isDark(n+1,o+1)&&(c+=1),(0==c||4==c)&&(e+=3)}for(var n=0;t>n;n+=1)for(var o=0;t-6>o;o+=1)r.isDark(n,o)&&!r.isDark(n,o+1)&&r.isDark(n,o+2)&&r.isDark(n,o+3)&&r.isDark(n,o+4)&&!r.isDark(n,o+5)&&r.isDark(n,o+6)&&(e+=40);for(var o=0;t>o;o+=1)for(var n=0;t-6>n;n+=1)r.isDark(n,o)&&!r.isDark(n+1,o)&&r.isDark(n+2,o)&&r.isDark(n+3,o)&&r.isDark(n+4,o)&&!r.isDark(n+5,o)&&r.isDark(n+6,o)&&(e+=40);for(var l=0,o=0;t>o;o+=1)for(var n=0;t>n;n+=1)r.isDark(n,o)&&(l+=1);var g=Math.abs(100*l/t/t-50)/5;return e+=10*g},f}(),i=function(){for(var r=new Array(256),t=new Array(256),e=0;8>e;e+=1)r[e]=1<<e;for(var e=8;256>e;e+=1)r[e]=r[e-4]^r[e-5]^r[e-6]^r[e-8];for(var e=0;255>e;e+=1)t[r[e]]=e;var n={};return n.glog=function(r){if(1>r)throw new Error("glog("+r+")");return t[r]},n.gexp=function(t){for(;0>t;)t+=255;for(;t>=256;)t-=255;return r[t]},n}(),u=function(){var r=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],t=function(r,t){var e={};return e.totalCount=r,e.dataCount=t,e},e={},o=function(t,e){switch(e){case n.L:return r[4*(t-1)+0];case n.M:return r[4*(t-1)+1];case n.Q:return r[4*(t-1)+2];case n.H:return r[4*(t-1)+3];default:return}};return e.getRSBlocks=function(r,e){var n=o(r,e);if("undefined"==typeof n)throw new Error("bad rs block @ typeNumber:"+r+"/errorCorrectLevel:"+e);for(var a=n.length/3,i=new Array,u=0;a>u;u+=1)for(var f=n[3*u+0],c=n[3*u+1],l=n[3*u+2],g=0;f>g;g+=1)i.push(t(c,l));return i},e}(),f=function(){var r=new Array,t=0,e={};return e.getBuffer=function(){return r},e.getAt=function(t){var e=Math.floor(t/8);return 1==(r[e]>>>7-t%8&1)},e.put=function(r,t){for(var n=0;t>n;n+=1)e.putBit(1==(r>>>t-n-1&1))},e.getLengthInBits=function(){return t},e.putBit=function(e){var n=Math.floor(t/8);r.length<=n&&r.push(0),e&&(r[n]|=128>>>t%8),t+=1},e},c=function(r){var n=e.MODE_8BIT_BYTE,o=t.stringToBytes(r),a={};return a.getMode=function(){return n},a.getLength=function(r){return o.length},a.write=function(r){for(var t=0;t<o.length;t+=1)r.put(o[t],8)},a},l=function(){var r=new Array,t={};return t.writeByte=function(t){r.push(255&t)},t.writeShort=function(r){t.writeByte(r),t.writeByte(r>>>8)},t.writeBytes=function(r,e,n){e=e||0,n=n||r.length;for(var o=0;n>o;o+=1)t.writeByte(r[o+e])},t.writeString=function(r){for(var e=0;e<r.length;e+=1)t.writeByte(r.charCodeAt(e))},t.toByteArray=function(){return r},t.toString=function(){var t="";t+="[";for(var e=0;e<r.length;e+=1)e>0&&(t+=","),t+=r[e];return t+="]"},t},g=function(){var r=0,t=0,e=0,n="",o={},a=function(r){n+=String.fromCharCode(i(63&r))},i=function(r){if(0>r);else{if(26>r)return 65+r;if(52>r)return 97+(r-26);if(62>r)return 48+(r-52);if(62==r)return 43;if(63==r)return 47}throw new Error("n:"+r)};return o.writeByte=function(n){for(r=r<<8|255&n,t+=8,e+=1;t>=6;)a(r>>>t-6),t-=6},o.flush=function(){if(t>0&&(a(r<<6-t),r=0,t=0),e%3!=0)for(var o=3-e%3,i=0;o>i;i+=1)n+="="},o.toString=function(){return n},o},s=function(r){var t=r,e=0,n=0,o=0,a={};a.read=function(){for(;8>o;){if(e>=t.length){if(0==o)return-1;throw new Error("unexpected end of file./"+o)}var r=t.charAt(e);if(e+=1,"="==r)return o=0,-1;r.match(/^\s$/)||(n=n<<6|i(r.charCodeAt(0)),o+=6)}var a=n>>>o-8&255;return o-=8,a};var i=function(r){if(r>=65&&90>=r)return r-65;if(r>=97&&122>=r)return r-97+26;if(r>=48&&57>=r)return r-48+52;if(43==r)return 62;if(47==r)return 63;throw new Error("c:"+r)};return a},v=function(r,t){var e=r,n=t,o=new Array(r*t),a={};a.setPixel=function(r,t,n){o[t*e+r]=n},a.write=function(r){r.writeString("GIF87a"),r.writeShort(e),r.writeShort(n),r.writeByte(128),r.writeByte(0),r.writeByte(0),r.writeByte(0),r.writeByte(0),r.writeByte(0),r.writeByte(255),r.writeByte(255),r.writeByte(255),r.writeString(","),r.writeShort(0),r.writeShort(0),r.writeShort(e),r.writeShort(n),r.writeByte(0);var t=2,o=u(t);r.writeByte(t);for(var a=0;o.length-a>255;)r.writeByte(255),r.writeBytes(o,a,255),a+=255;r.writeByte(o.length-a),r.writeBytes(o,a,o.length-a),r.writeByte(0),r.writeString(";")};var i=function(r){var t=r,e=0,n=0,o={};return o.write=function(r,o){if(r>>>o!=0)throw new Error("length over");for(;e+o>=8;)t.writeByte(255&(r<<e|n)),o-=8-e,r>>>=8-e,n=0,e=0;n=r<<e|n,e+=o},o.flush=function(){e>0&&t.writeByte(n)},o},u=function(r){for(var t=1<<r,e=(1<<r)+1,n=r+1,a=f(),u=0;t>u;u+=1)a.add(String.fromCharCode(u));a.add(String.fromCharCode(t)),a.add(String.fromCharCode(e));var c=l(),g=i(c);g.write(t,n);var s=0,v=String.fromCharCode(o[s]);for(s+=1;s<o.length;){var h=String.fromCharCode(o[s]);s+=1,a.contains(v+h)?v+=h:(g.write(a.indexOf(v),n),a.size()<4095&&(a.size()==1<<n&&(n+=1),a.add(v+h)),v=h)}return g.write(a.indexOf(v),n),g.write(e,n),g.flush(),c.toByteArray()},f=function(){var r={},t=0,e={};return e.add=function(n){if(e.contains(n))throw new Error("dup key:"+n);r[n]=t,t+=1},e.size=function(){return t},e.indexOf=function(t){return r[t]},e.contains=function(t){return"undefined"!=typeof r[t]},e};return a},h=function(r,t,e,n){for(var o=v(r,t),a=0;t>a;a+=1)for(var i=0;r>i;i+=1)o.setPixel(i,a,e(i,a));var u=l();o.write(u);for(var f=g(),c=u.toByteArray(),s=0;s<c.length;s+=1)f.writeByte(c[s]);f.flush();var h="";return h+="<img",h+=' src="',h+="data:image/gif;base64,",h+=f,h+='"',h+=' width="',h+=r,h+='"',h+=' height="',h+=t,h+='"',n&&(h+=' alt="',h+=n,h+='"'),h+="/>"};return t}();return function(r){"function"==typeof define&&define.amd?define([],r):"object"==typeof exports&&(module.exports=r())}(function(){return r}),!function(r){r.stringToBytes=function(r){function t(r){for(var t=[],e=0;e<r.length;e++){var n=r.charCodeAt(e);128>n?t.push(n):2048>n?t.push(192|n>>6,128|63&n):55296>n||n>=57344?t.push(224|n>>12,128|n>>6&63,128|63&n):(e++,n=65536+((1023&n)<<10|1023&r.charCodeAt(e)),t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n))}return t}return t(r)}}(r),r}()); -/* Include script: jquery.hotkeys */ +/* Include script: jquery.hotkeys.min.js */ (function(t){t.hotkeys={version:"0.2.0",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":"\"",",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}};function e(e){if(typeof e.data==="string"){e.data={keys:e.data}};if(!e.data||!e.data.keys||typeof e.data.keys!=="string"){return};var a=e.handler,s=e.data.keys.toLowerCase().split(" ");e.handler=function(e){if(this!==e.target&&(t.hotkeys.options.filterInputAcceptingElements&&t.hotkeys.textInputTypes.test(e.target.nodeName)||(t.hotkeys.options.filterContentEditable&&t(e.target).attr("contenteditable"))||(t.hotkeys.options.filterTextInputs&&t.inArray(e.target.type,t.hotkeys.textAcceptingInputTypes)>-1))){return};var n=e.type!=="keypress"&&t.hotkeys.specialKeys[e.which],f=String.fromCharCode(e.which).toLowerCase(),i="",r={};t.each(["alt","ctrl","shift"],function(t,s){if(e[s+"Key"]&&n!==s){i+=s+"+"}});if(e.metaKey&&!e.ctrlKey&&n!=="meta"){i+="meta+"};if(e.metaKey&&n!=="meta"&&i.indexOf("alt+ctrl+shift+")>-1){i=i.replace("alt+ctrl+shift+","hyper+")};if(n){r[i+n]=!0} else{r[i+f]=!0;r[i+t.hotkeys.shiftNums[f]]=!0;if(i==="shift+"){r[t.hotkeys.shiftNums[f]]=!0}};for(var o=0,p=s.length;o<p;o++){if(r[s[o]]){return a.apply(this,arguments)}}}};t.each(["keydown","keyup","keypress"],function(){t.event.special[this]={add:e}})})(jQuery||this.jQuery||window.jQuery); -/* Include script: codemirror */ +/* Include script: codemirror.min.js */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,s=l&&(n?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),u=a&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),h=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=h&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(h=!1,a=!0);var C=y&&(u||h&&(null==x||x<12.11)),S=r||l&&s>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,T=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return M(e).appendChild(t)}function O(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function A(e,t,r,n){var i=O(e,t,r,n);return i.setAttribute("role","presentation"),i}function W(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function D(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function H(e,t){var r=e.className;L(t).test(r)||(e.className+=(r?" ":"")+t)}function F(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!L(r[n]).test(t)&&(t+=" "+r[n]);return t}k=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var P=function(e){e.select()};function E(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function I(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null};function B(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}R.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var G=30,U={toString:function(){return"CodeMirror.Pass"}},V={scroll:!1},K={origin:"*mouse"},j={origin:"+move"};function X(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Y=[""];function _(e){for(;Y.length<=e;)Y.push(q(Y)+" ");return Y[e]}function q(e){return e[e.length-1]}function $(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Z(){}function Q(e,t){var r;return Object.create?r=Object.create(e):(Z.prototype=e,r=new Z),t&&z(t,r),r}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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]/;function ie(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,r){for(;(r<0?t>0:t<e.length)&&ie(e.charAt(t));)t+=r;return t}function le(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function se(e,t,n){var i=this;this.input=n,i.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=A("div",null,"CodeMirror-code"),i.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=O("div",null,"CodeMirror-cursors"),i.measure=O("div",null,"CodeMirror-measure"),i.lineMeasure=O("div",null,"CodeMirror-measure"),i.lineSpace=A("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=A("div",[i.lineSpace],"CodeMirror-lines");i.mover=O("div",[o],null,"position: relative"),i.sizer=O("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=O("div",null,null,"position: absolute; height: "+G+"px; width: 1px;"),i.gutters=O("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=O("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=O("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),l&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),a||r&&m||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function ae(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function ue(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function ce(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function he(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function fe(e){if(null==e.parent)return null;for(var t=e.parent,r=B(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function de(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var l=0;l<e.lines.length;++l){var s=e.lines[l].height;if(t<s)break;t-=s}return r+l}function pe(e,t){return t>=e.first&&t<e.first+e.size}function ge(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ve(e,t,r){if(void 0===r&&(r=null),!(this instanceof ve))return new ve(e,t,r);this.line=e,this.ch=t,this.sticky=r}function me(e,t){return e.line-t.line||e.ch-t.ch}function ye(e,t){return e.sticky==t.sticky&&0==me(e,t)}function be(e){return ve(e.line,e.ch)}function we(e,t){return me(e,t)<0?t:e}function xe(e,t){return me(e,t)<0?e:t}function Ce(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Se(e,t){if(t.line<e.first)return ve(e.first,0);var r=e.first+e.size-1;return t.line>r?ve(r,ae(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?ve(e.line,t):r<0?ve(e.line,0):e}(t,ae(e,t.line).text.length)}function Le(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Se(e,t[n]);return r}var ke=!1,Te=!1;function Me(e,t,r){this.marker=e,this.from=t,this.to=r}function Ne(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Oe(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ae(e,t){if(t.full)return null;var r=pe(e,t.from.line)&&ae(e,t.from.line).markedSpans,n=pe(e,t.to.line)&&ae(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,l=0==me(t.from,t.to),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==l.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Me(l,o.from,s?null:o.to))}}return n}(r,i,l),a=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.to||(l.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Me(l,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,l),u=1==t.text.length,c=q(t.text).length+(u?i:0);if(s)for(var h=0;h<s.length;++h){var f=s[h];if(null==f.to){var d=Ne(a,f.marker);d?u&&(f.to=null==d.to?null:d.to+c):f.to=i}}if(a)for(var p=0;p<a.length;++p){var g=a[p];if(null!=g.to&&(g.to+=c),null==g.from)Ne(s,g.marker)||(g.from=c,u&&(s||(s=[])).push(g));else g.from+=c,u&&(s||(s=[])).push(g)}s&&(s=We(s)),a&&a!=s&&(a=We(a));var v=[s];if(!u){var m,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(m||(m=[])).push(new Me(s[b].marker,null,null));for(var w=0;w<y;++w)v.push(m);v.push(a)}return v}function We(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function De(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function He(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Fe(e){return e.inclusiveLeft?-1:0}function Pe(e){return e.inclusiveRight?1:0}function Ee(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=me(n.from,i.from)||Fe(e)-Fe(t);if(o)return-o;var l=me(n.to,i.to)||Pe(e)-Pe(t);return l||t.id-e.id}function ze(e,t){var r,n=Te&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Ee(r,i.marker)<0)&&(r=i.marker);return r}function Ie(e){return ze(e,!0)}function Re(e){return ze(e,!1)}function Be(e,t,r,n,i){var o=ae(e,t),l=Te&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var u=a.marker.find(0),c=me(u.from,r)||Fe(a.marker)-Fe(i),h=me(u.to,n)||Pe(a.marker)-Pe(i);if(!(c>=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?me(u.to,r)>=0:me(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?me(u.from,n)<=0:me(u.from,n)<0)))return!0}}}function Ge(e){for(var t;t=Ie(e);)e=t.find(-1,!0).line;return e}function Ue(e,t){var r=ae(e,t),n=Ge(r);return r==n?t:fe(n)}function Ve(e,t){if(t>e.lastLine())return t;var r,n=ae(e,t);if(!Ke(e,n))return t;for(;r=Re(n);)n=r.find(1,!0).line;return fe(n)+1}function Ke(e,t){var r=Te&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&je(e,t,n))return!0}}function je(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return je(e,n.line,Ne(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&je(e,t,i))return!0}function Xe(e){for(var t=0,r=(e=Ge(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var l=0;l<o.children.length;++l){var s=o.children[l];if(s==r)break;t+=s.height}return t}function Ye(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Ie(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=Re(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function _e(e){var t=e.display,r=e.doc;t.maxLine=ae(r,r.first),t.maxLineLength=Ye(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=Ye(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var qe=null;function $e(e,t,r){var n;qe=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:qe=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:qe=i)}return null!=n?n:qe}var Ze=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(a,u){var c="ltr"==u?"L":"R";if(0==a.length||"ltr"==u&&!r.test(a))return!1;for(var h,f=a.length,d=[],p=0;p<f;++p)d.push((h=a.charCodeAt(p))<=247?e.charAt(h):1424<=h&&h<=1524?"R":1536<=h&&h<=1785?t.charAt(h-1536):1774<=h&&h<=2220?"r":8192<=h&&h<=8203?"w":8204==h?"b":"L");for(var g=0,v=c;g<f;++g){var m=d[g];"m"==m?d[g]=v:v=m}for(var y=0,b=c;y<f;++y){var w=d[y];"1"==w&&"r"==b?d[y]="n":i.test(w)&&(b=w,"r"==w&&(d[y]="R"))}for(var x=1,C=d[0];x<f-1;++x){var S=d[x];"+"==S&&"1"==C&&"1"==d[x+1]?d[x]="1":","!=S||C!=d[x+1]||"1"!=C&&"n"!=C||(d[x]=C),C=S}for(var L=0;L<f;++L){var k=d[L];if(","==k)d[L]="N";else if("%"==k){var T=void 0;for(T=L+1;T<f&&"%"==d[T];++T);for(var M=L&&"!"==d[L-1]||T<f&&"1"==d[T]?"1":"N",N=L;N<T;++N)d[N]=M;L=T-1}}for(var O=0,A=c;O<f;++O){var W=d[O];"L"==A&&"1"==W?d[O]="L":i.test(W)&&(A=W)}for(var D=0;D<f;++D)if(n.test(d[D])){var H=void 0;for(H=D+1;H<f&&n.test(d[H]);++H);for(var F="L"==(D?d[D-1]:c),P=F==("L"==(H<f?d[H]:c))?F?"L":"R":c,E=D;E<H;++E)d[E]=P;D=H-1}for(var z,I=[],R=0;R<f;)if(o.test(d[R])){var B=R;for(++R;R<f&&o.test(d[R]);++R);I.push(new s(0,B,R))}else{var G=R,U=I.length;for(++R;R<f&&"L"!=d[R];++R);for(var V=G;V<R;)if(l.test(d[V])){G<V&&I.splice(U,0,new s(1,G,V));var K=V;for(++V;V<R&&l.test(d[V]);++V);I.splice(U,0,new s(2,K,V)),G=V}else++V;G<R&&I.splice(U,0,new s(1,G,R))}return"ltr"==u&&(1==I[0].level&&(z=a.match(/^\s+/))&&(I[0].from=z[0].length,I.unshift(new s(0,0,z[0].length))),1==q(I).level&&(z=a.match(/\s+$/))&&(q(I).to-=z[0].length,I.push(new s(0,f-z[0].length,f)))),"rtl"==u?I.reverse():I}}();function Qe(e,t){var r=e.order;return null==r&&(r=e.order=Ze(e.text,t)),r}var Je=[],et=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Je).concat(r)}};function tt(e,t){return e._handlers&&e._handlers[t]||Je}function rt(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=B(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function nt(e,t){var r=tt(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function it(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),nt(e,r||t.type,e,t),ct(t)||t.codemirrorIgnore}function ot(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==B(r,t[n])&&r.push(t[n])}function lt(e,t){return tt(e,t).length>0}function st(e){e.prototype.on=function(e,t){et(this,e,t)},e.prototype.off=function(e,t){rt(this,e,t)}}function at(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ut(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ct(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ht(e){at(e),ut(e)}function ft(e){return e.target||e.srcElement}function dt(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var pt,gt,vt=function(){if(l&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function mt(e){if(null==pt){var t=O("span","​");N(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(pt=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var r=pt?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function yt(e){if(null!=gt)return gt;var t=N(e,document.createTextNode("AخA")),r=k(t,0,1).getBoundingClientRect(),n=k(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(gt=n.right-r.right<3)}var bt,wt=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},xt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ct="oncopy"in(bt=O("div"))||(bt.setAttribute("oncopy","return;"),"function"==typeof bt.oncopy),St=null;var Lt={},kt={};function Tt(e){if("string"==typeof e&&kt.hasOwnProperty(e))e=kt[e];else if(e&&"string"==typeof e.name&&kt.hasOwnProperty(e.name)){var t=kt[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Tt("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Tt("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Mt(e,t){t=Tt(t);var r=Lt[t.name];if(!r)return Mt(e,"text/plain");var n=r(e,t);if(Nt.hasOwnProperty(t.name)){var i=Nt[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Nt={};function Ot(e,t){z(t,Nt.hasOwnProperty(e)?Nt[e]:Nt[e]={})}function At(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Wt(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Dt(e,t,r){return!e.startState||e.startState(t,r)}var Ht=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Ht.prototype.eol=function(){return this.pos>=this.string.length},Ht.prototype.sol=function(){return this.pos==this.lineStart},Ht.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ht.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ht.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ht.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ht.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ht.prototype.skipToEnd=function(){this.pos=this.string.length},Ht.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ht.prototype.backUp=function(e){this.pos-=e},Ht.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=I(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},Ht.prototype.indentation=function(){return I(this.string,null,this.tabSize)-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},Ht.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ht.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ht.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ht.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ht.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Ft=function(e,t){this.state=e,this.lookAhead=t},Pt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function Et(e,t,r,n){var i=[e.state.modeGen],o={};jt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],a=1,u=0;r.state=!0,jt(e,t.text,s.mode,r,function(e,t){for(var r=a;u<e;){var n=i[a];n>e&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;r<a;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}},o),r.state=l,r.baseTokens=null,r.baseTokenPos=1},a=0;a<e.state.overlays.length;++a)s(a);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function zt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=It(e,fe(t)),i=t.text.length>e.options.maxHighlightLength&&At(e.doc.mode,n.state),o=Et(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function It(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Pt(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=ae(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof Ft?u.lookAhead:0)<=o.modeFrontier))return s;var c=I(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}(e,t,r),l=o>n.first&&ae(n,o-1).stateAfter,s=l?Pt.fromSaved(n,l,o):new Pt(n,Dt(n.mode),o);return n.iter(o,t,function(r){Rt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function Rt(e,t,r,n){var i=e.doc.mode,o=new Ht(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&Bt(i,r.state);!o.eol();)Gt(i,o,r.state),o.start=o.pos}function Bt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Wt(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Gt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Wt(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}Pt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Pt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Pt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Pt.fromSaved=function(e,t,r){return t instanceof Ft?new Pt(e,At(e.mode,t.state),r,t.lookAhead):new Pt(e,At(e.mode,t),r)},Pt.prototype.save=function(e){var t=!1!==e?At(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ft(t,this.maxLookAhead):t};var Ut=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Vt(e,t,r,n){var i,o,l=e.doc,s=l.mode,a=ae(l,(t=Se(l,t)).line),u=It(e,t.line,r),c=new Ht(a.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=Gt(s,c,u.state),n&&o.push(new Ut(c,i,At(l.mode,u.state)));return n?o:new Ut(c,i,u.state)}function Kt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function jt(e,t,r,n,i,o,l){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,u=0,c=null,h=new Ht(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&Kt(Bt(r,n.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(s=!1,l&&Rt(e,t,n,h.pos),h.pos=t.length,a=null):a=Kt(Gt(r,h,n.state,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u<h.start;)i(u=Math.min(h.start,u+5e3),c);c=a}h.start=h.pos}for(;u<h.pos;){var p=Math.min(h.pos,u+5e3);i(p,c),u=p}}var Xt=function(e,t,r){this.text=e,He(this,t),this.height=r?r(this):1};function Yt(e){e.parent=null,De(e)}Xt.prototype.lineNo=function(){return fe(this)},st(Xt);var _t={},qt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?qt:_t;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var r=A("span",null,null,a?"padding-right: .1px":null),n={pre:A("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(l||a)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,s=void 0;n.pos=0,n.addToken=Jt,yt(e.display.measure)&&(s=Qe(o,e.doc.direction))&&(n.addToken=er(n.addToken,s)),n.map=[],rr(o,n,zt(e,o,t!=e.display.externalMeasured&&fe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=F(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=F(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(mt(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return nt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=F(n.pre.className,n.textClass||"")),n}function Qt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,r,n,i,o,a){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,h=e.cm.state.specialChars,f=!1;if(h.test(t)){u=document.createDocumentFragment();for(var d=0;;){h.lastIndex=d;var p=h.exec(t),g=p?p.index-d:t.length-d;if(g){var v=document.createTextNode(c.slice(d,d+g));l&&s<9?u.appendChild(O("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;d+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=u.appendChild(O("span",_(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((m=u.appendChild(O("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),l&&s<9?u.appendChild(O("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||i||f||a){var w=r||"";n&&(w+=n),i&&(w+=i);var x=O("span",[u],w,a);return o&&(x.title=o),e.content.appendChild(x)}e.content.appendChild(u)}}function er(e,t){return function(r,n,i,o,l,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,c=u+n.length;;){for(var h=void 0,f=0;f<t.length&&!((h=t[f]).to>u&&h.from<=u);f++);if(h.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,h.to-u),i,o,null,s,a),o=null,n=n.slice(h.to-u),u=h.to}}}function tr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=h=s="",f=null,m=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],C=x.marker;"bookmark"==C.type&&x.from==p&&C.widgetNode?y.push(C):x.from<=p&&(null==x.to||x.to>p||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!h&&(h=C.title),C.collapsed&&(!f||Ee(f.marker,C)<0)&&(f=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==m&&(u+=" "+b[S]);if(!f||f.from==p)for(var L=0;L<y.length;++L)tr(t,0,y[L]);if(f&&(f.from||0)==p){if(tr(t,(null==f.to?d+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=d)break;for(var k=Math.min(d,m);;){if(v){var T=p+v.length;if(!f){var M=T>k?v.slice(0,k-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",h,s)}if(T>=k){v=v.slice(k-p),p=k;break}p=T,c=""}v=i.slice(o,o=r[g++]),l=$t(r[g++],t.cm.options)}}else for(var N=1;N<r.length;N+=2)t.addToken(t,i.slice(o,o=r[N]),$t(r[N+1],t.cm.options))}function nr(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=Re(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?fe(q(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ke(e,t)}function ir(e,t,r){for(var n,i=[],o=t;o<r;o=n){var l=new nr(e.doc,ae(e.doc,o),o);n=o+l.size,i.push(l)}return i}var or=null;var lr=null;function sr(e,t){var r=tt(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);or?n=or.delayedCallbacks:lr?n=lr:(n=lr=[],setTimeout(ar,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},l=0;l<r.length;++l)o(l)}}function ar(){var e=lr;lr=null;for(var t=0;t<e.length;++t)e[t]()}function ur(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?fr(e,t):"gutter"==o?pr(e,t,r,n):"class"==o?dr(e,t):"widget"==o&&gr(e,t,n)}t.changes=null}function cr(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),l&&s<8&&(e.node.style.zIndex=2)),e.node}function hr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Zt(e,t)}function fr(e,t){var r=t.text.className,n=hr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,dr(e,t)):r&&(t.text.className=r)}function dr(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=cr(t);t.background=n.insertBefore(O("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?cr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function pr(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=cr(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=cr(t),s=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(O("div",ge(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a<e.options.gutters.length;++a){var u=e.options.gutters[a],c=o.hasOwnProperty(u)&&o[u];c&&s.appendChild(O("div",[c],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function gr(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);mr(e,t,r)}function vr(e,t,r,n){var i=hr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),dr(e,t),pr(e,t,r,n),mr(e,t,n),t.node}function mr(e,t,r){if(yr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)yr(e,t.rest[n],t,r,!1)}function yr(e,t,r,n,i){if(t.widgets)for(var o=cr(r),l=0,s=t.widgets;l<s.length;++l){var a=s[l],u=O("div",[a.node],"CodeMirror-linewidget");a.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),br(a,u,r,n),e.display.input.setUneditable(u),i&&a.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),sr(a,"redraw")}}function br(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function wr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!W(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),N(t.display.measure,O("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function xr(e,t){for(var r=ft(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Cr(e){return e.lineSpace.offsetTop}function Sr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Lr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=N(e.measure,O("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function kr(e){return G-e.display.nativeBarWidth}function Tr(e){return e.display.scroller.clientWidth-kr(e)-e.display.barWidth}function Mr(e){return e.display.scroller.clientHeight-kr(e)-e.display.barHeight}function Nr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(fe(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Or(e,t,r,n){return Dr(e,Wr(e,t),r,n)}function Ar(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[an(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Wr(e,t){var r=fe(t),n=Ar(e,r);n&&!n.text?n=null:n&&n.changes&&(ur(e,n,r,rn(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=fe(t=Ge(t)),n=e.display.externalMeasured=new nr(e.doc,t,r);n.lineN=r;var i=n.built=Zt(e,n);return n.text=i.pre,N(e.display.lineMeasure,i.pre),n}(e,t));var i=Nr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Dr(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(!function(e,t,r){var n=e.options.lineWrapping,i=n&&Tr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],u=l[s+1];Math.abs(a.bottom-u.bottom)>2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Pr(t.map,r,n),a=o.node,u=o.start,c=o.end,h=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){for(;u&&ie(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+c));)++c;if((i=l&&s<9&&0==u&&c==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Er(k(a,u,c).getClientRects(),n)).left||i.right||0==u)break;c=u,u-=1,h="right"}l&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=St)return St;var t=N(e,O("span","x")),r=t.getBoundingClientRect(),n=k(t,0,1).getBoundingClientRect();return St=Math.abs(r.left-n.left)>1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var d;u>0&&(h=n="right"),i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+tn(e.display),top:p.top,bottom:p.bottom}:Fr}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(m<y[b]);b++);var w=b?y[b-1]:0,x=y[b],C={left:("right"==h?i.right:i.left)-t.rect.left,right:("left"==h?i.left:i.right)-t.rect.left,top:w,bottom:x};i.left||i.right||(C.bogus=!0);e.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=v);return C}(e,t,r,n)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Hr,Fr={left:0,right:0,top:0,bottom:0};function Pr(e,t,r){for(var n,i,o,l,s,a,u=0;u<e.length;u+=3)if(s=e[u],a=e[u+1],t<s?(i=0,o=1,l="left"):t<a?o=(i=t-s)+1:(u==e.length-3||t==a&&e[u+3]>t)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],l="right";break}return{node:n,start:i,end:o,collapse:l,coverStart:s,coverEnd:a}}function Er(e,t){var r=Fr;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function zr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Ir(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)zr(e.display.view[t])}function Rr(e){Ir(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Br(){return c&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Gr(){return c&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ur(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=wr(e.widgets[r]));return t}function Vr(e,t,r,n,i){if(!i){var o=Ur(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var l=Xe(t);if("local"==n?l+=Cr(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==n?0:Gr());var a=s.left+("window"==n?0:Br());r.left+=a,r.right+=a}return r.top+=l,r.bottom+=l,r}function Kr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=Br(),i-=Gr();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:i-l.top}}function jr(e,t,r,n,i){return n||(n=ae(e.doc,t.line)),Vr(e,n,Or(e,n,t.ch,i),r)}function Xr(e,t,r,n,i,o){function l(t,l){var s=Dr(e,i,t,l?"right":"left",o);return l?s.left=s.right:s.right=s.left,Vr(e,n,s,r)}n=n||ae(e.doc,t.line),i||(i=Wr(e,n));var s=Qe(n,e.doc.direction),a=t.ch,u=t.sticky;if(a>=n.text.length?(a=n.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return l("before"==u?a-1:a,"before"==u);function c(e,t,r){return l(r?e-1:e,1==s[t].level!=r)}var h=$e(s,a,u),f=qe,d=c(a,h,"before"==u);return null!=f&&(d.other=c(a,f,"before"!=u)),d}function Yr(e,t){var r=0;t=Se(e.doc,t),e.options.lineWrapping||(r=tn(e.display)*t.ch);var n=ae(e.doc,t.line),i=Xe(n)+Cr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function _r(e,t,r,n,i){var o=ve(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function qr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return _r(n.first,0,null,!0,-1);var i=de(n,r),o=n.first+n.size-1;if(i>o)return _r(n.first+n.size-1,ae(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=ae(n,i);;){var s=Jr(e,l,i,t,r),a=Re(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=fe(l=u.to.line)}}function $r(e,t,r,n){n-=Ur(t);var i=t.text.length,o=le(function(t){return Dr(e,r,t-1).bottom<=n},i,0);return{begin:o,end:i=le(function(t){return Dr(e,r,t).top>n},o,i)}}function Zr(e,t,r,n){return r||(r=Wr(e,t)),$r(e,t,r,Vr(e,t,Dr(e,r,n),"line").top)}function Qr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Jr(e,t,r,n,i){i-=Xe(t);var o=Wr(e,t),l=Ur(t),s=0,a=t.text.length,u=!0,c=Qe(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?function(e,t,r,n,i,o,l){var s=$r(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f<i.length;f++){var d=i[f];if(!(d.from>=u||d.to<=a)){var p=1!=d.level,g=Dr(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=g<o?o-g+1e9:g-o;(!c||h>v)&&(c=d,h=v)}}c||(c=i[i.length-1]);c.from<a&&(c={from:a,to:c.to,level:c.level});c.to>u&&(c={from:c.from,to:u,level:c.level});return c}:function(e,t,r,n,i,o,l){var s=le(function(s){var a=i[s],u=1!=a.level;return Qr(Xr(e,ve(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=Xr(e,ve(r,u?a.from:a.to,u?"after":"before"),"line",t,n);Qr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a})(e,t,r,o,c,n,i);s=(u=1!=h.level)?h.from:h.to-1,a=u?h.to:h.from-1}var f,d,p=null,g=null,v=le(function(t){var r=Dr(e,o,t);return r.top+=l,r.bottom+=l,!!Qr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var y=n-g.left<g.right-n,b=y==u;v=p+(b?0:1),d=b?"after":"before",f=y?g.left:g.right}else{u||v!=a&&v!=s||v++,d=0==v?"after":v==t.text.length?"before":Dr(e,o,v-(u?1:0)).bottom+l<=i==u?"after":"before";var w=Xr(e,ve(r,v,d),"line",t,o);f=w.left,m=i<w.top||i>=w.bottom}return _r(r,v=oe(t.text,v,1),d,m,n-f)}function en(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hr){Hr=O("pre");for(var t=0;t<49;++t)Hr.appendChild(document.createTextNode("x")),Hr.appendChild(O("br"));Hr.appendChild(document.createTextNode("x"))}N(e.measure,Hr);var r=Hr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function tn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),r=O("pre",[t]);N(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function rn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:nn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function nn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function on(e){var t=en(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/tn(e.display)-3);return function(i){if(Ke(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function ln(e){var t=e.doc,r=on(e);t.iter(function(e){var t=r(e);t!=e.height&&he(e,t)})}function sn(e,t,r,n){var i=e.display;if(!r&&"true"==ft(t).getAttribute("cm-not-content"))return null;var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(t){return null}var a,u=qr(e,o,l);if(n&&1==u.xRel&&(a=ae(e.doc,u.line).text).length==u.ch){var c=I(a,a.length,e.options.tabSize)-a.length;u=ve(u.line,Math.max(0,Math.round((o-Lr(e.display).left)/tn(e.display))-c))}return u}function an(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function un(e){e.display.input.showSelection(e.display.input.prepareSelection())}function cn(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var s=r.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var a=s.empty();(a||e.options.showCursorWhenSelecting)&&hn(e,s.head,i),a||dn(e,s,o)}}return n}function hn(e,t,r){var n=Xr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(O("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function fn(e,t){return e.top-t.top||e.left-t.left}function dn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=Lr(e.display),s=l.left,a=Math.max(n.sizerWidth,Tr(e)-n.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?a-e:r)+"px;\n height: "+(n-t)+"px"))}function h(t,r,n){var o,l,h=ae(i,t),f=h.text.length;function d(r,n){return jr(e,ve(t,r),"div",h,n)}function p(t,r,n){var i=Zr(e,h,null,t),o="ltr"==r==("after"==n)?"left":"right";return d("after"==n?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1),o)[o]}var g=Qe(h,i.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<r&&l.to>t||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(g,r||0,null==n?f:n,function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?w:b)&&C,L=(u?b:w)&&x?s:(v?m:y).left,k=S?a:(v?y:m).right;c(L,m.top,k-L,m.bottom)}else{var T,M,N,O;v?(T=u&&b&&x?s:m.left,M=u?a:p(e,i,"before"),N=u?s:p(t,i,"after"),O=u&&w&&C?a:y.right):(T=u?p(e,i,"before"):s,M=!u&&b&&x?a:m.right,N=!u&&w&&C?s:y.left,O=u?p(t,i,"after"):a),c(T,m.top,M-T,m.bottom),m.bottom<y.top&&c(s,m.bottom,null,y.top),c(N,y.top,O-N,y.bottom)}(!o||fn(m,o)<0)&&(o=m),fn(y,o)<0&&(o=y),(!l||fn(m,l)<0)&&(l=m),fn(y,l)<0&&(l=y)}),{start:o,end:l}}var f=t.from(),d=t.to();if(f.line==d.line)h(f.line,f.ch,d.ch);else{var p=ae(i,f.line),g=ae(i,d.line),v=Ge(p)==Ge(g),m=h(f.line,f.ch,v?p.text.length+1:null).end,y=h(d.line,v?0:null,d.ch).start;v&&(m.top<y.top-2?(c(m.right,m.top,null,m.bottom),c(s,y.top,y.left,y.bottom)):c(m.right,m.top,y.left-m.right,m.bottom)),m.bottom<y.top&&c(s,m.bottom,null,y.top)}r.appendChild(o)}function pn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function gn(e){e.state.focused||(e.display.input.focus(),mn(e))}function vn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yn(e))},100)}function mn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(nt(e,"focus",e,t),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),pn(e))}function yn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(nt(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function bn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(l&&s<8){var a=i.node.offsetTop+i.node.offsetHeight;o=a-r,r=a}else{var u=i.node.getBoundingClientRect();o=u.bottom-u.top}var c=i.line.height-o;if(o<2&&(o=en(t)),(c>.005||c<-.005)&&(he(i.line,o),wn(i.line),i.rest))for(var h=0;h<i.rest.length;h++)wn(i.rest[h])}}}function wn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function xn(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Cr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=de(t,n),l=de(t,i);if(r&&r.ensure){var s=r.ensure.from.line,a=r.ensure.to.line;s<o?(o=s,l=de(t,Xe(ae(t,s))+e.wrapper.clientHeight)):Math.min(a,t.lastLine())>=l&&(o=de(t,Xe(ae(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Cn(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=nn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l<r.length;l++)if(!r[l].hidden){e.options.fixedGutter&&(r[l].gutter&&(r[l].gutter.style.left=o),r[l].gutterBackground&&(r[l].gutterBackground.style.left=o));var s=r[l].alignable;if(s)for(var a=0;a<s.length;a++)s[a].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Sn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=ge(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(O("div",[O("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ai(e),!0}return!1}function Ln(e,t){var r=e.display,n=en(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Mr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Sr(r),a=t.top<n,u=t.bottom>s-n;if(t.top<i)l.scrollTop=a?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=Tr(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>f;return d&&(t.right=t.left+f),t.left<10?l.scrollLeft=0:t.left<h?l.scrollLeft=Math.max(0,t.left-(d?0:10)):t.right>f+h-3&&(l.scrollLeft=t.right+(d?0:10)-f),l}function kn(e,t){null!=t&&(Nn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Tn(e){Nn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Mn(e,t,r){null==t&&null==r||Nn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Nn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,On(e,Yr(e,t.from),Yr(e,t.to),t.margin))}function On(e,t,r,n){var i=Ln(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Mn(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||si(e,{top:t}),Wn(e,t,!0),r&&si(e),ri(e,100))}function Wn(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Dn(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Cn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Hn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Sr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Fn=function(e,t,r){this.cm=r;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(n),e(i),et(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),et(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Fn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fn.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},Fn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)})},Fn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Pn=function(){};function En(e,t){t||(t=Hn(e));var r=e.display.barWidth,n=e.display.barHeight;zn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&bn(e),zn(e,Hn(e)),r=e.display.barWidth,n=e.display.barHeight}function zn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}Pn.prototype.update=function(){return{bottom:0,right:0}},Pn.prototype.setScrollLeft=function(){},Pn.prototype.setScrollTop=function(){},Pn.prototype.clear=function(){};var In={native:Fn,null:Pn};function Rn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new In[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),et(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Dn(e,t):An(e,t)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var Bn=0;function Gn(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Bn},t=e.curOp,or?or.ops.push(t):t.ownsGroup=or={ops:[t],delayedCallbacks:[]}}function Un(e){!function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}(r)}finally{or=null,t(r)}}(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)Vn(t[r]);for(var n=0;n<t.length;n++)(i=t[n]).updatedDisplay=i.mustUpdate&&oi(i.cm,i.update);var i;for(var o=0;o<t.length;o++)Kn(t[o]);for(var l=0;l<t.length;l++)jn(t[l]);for(var s=0;s<t.length;s++)Xn(t[s])}(e)})}function Vn(e){var t=e.cm,r=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=kr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=kr(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&_e(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Kn(e){var t=e.cm,r=t.display;e.updatedDisplay&&bn(t),e.barMeasure=Hn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Or(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function jn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Dn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==D();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&En(t,e.barMeasure),e.updatedDisplay&&ui(t,e.barMeasure),e.selectionChanged&&pn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&gn(e.cm)}function Xn(e){var t=e.cm,r=t.display,n=t.doc;(e.updatedDisplay&&li(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Wn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Dn(t,e.scrollLeft,!0,!0),e.scrollToPos)&&function(e,t){if(!it(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=O("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Cr(e.display))+"px;\n height: "+(t.bottom-t.top+kr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?ve(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ve(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=Xr(e,t),a=r&&r!=t?Xr(e,r):s,u=Ln(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(An(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Dn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}(t,Se(n,e.scrollToPos.from),Se(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||nt(i[l],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&nt(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&nt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Yn(e,t){if(e.curOp)return t();Gn(e);try{return t()}finally{Un(e)}}function _n(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Gn(e);try{return t.apply(e,arguments)}finally{Un(e)}}}function qn(e){return function(){if(this.curOp)return e.apply(this,arguments);Gn(this);try{return e.apply(this,arguments)}finally{Un(this)}}}function $n(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Gn(t);try{return e.apply(this,arguments)}finally{Un(t)}}}function Zn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Te&&Ue(e.doc,t)<i.viewTo&&Jn(e);else if(r<=i.viewFrom)Te&&Ve(e.doc,r+n)>i.viewFrom?Jn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Jn(e);else if(t<=i.viewFrom){var o=ei(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Jn(e)}else if(r>=i.viewTo){var l=ei(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Jn(e)}else{var s=ei(e,t,t,-1),a=ei(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(ir(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):Jn(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function Qn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[an(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function Jn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ei(e,t,r,n){var i,o=an(e,t),l=e.display.view;if(!Te||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a<o;a++)s+=l[a].size;if(s!=t){if(n>0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;Ue(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function ti(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,E(ni,e))}function ni(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=It(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?At(t.mode,n.state):null,a=Et(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&f<l.length;++f)h=l[f]!=o.styles[f];h&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Rt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ri(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Yn(e,function(){for(var t=0;t<i.length;t++)Qn(e,i[t],"text")})}}var ii=function(e,t,r){var n=e.display;this.viewport=t,this.visible=xn(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Tr(e),this.force=r,this.dims=rn(e),this.events=[]};function oi(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Jn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==ti(e))return!1;Sn(e)&&(Jn(e),t.dims=rn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>l&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Te&&(o=Ue(e.doc,o),l=Ve(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=ir(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ir(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(an(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(ir(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,an(e,r)))),n.viewTo=r}(e,o,l),r.viewOffset=Xe(ae(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=ti(e);if(!s&&0==u&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=D();if(!t||!W(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&W(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return u>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function s(t){var r=t.nextSibling;return a&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,h=0;h<u.length;h++){var f=u[h];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;l!=f.node;)l=s(l);var d=i&&null!=t&&t<=c&&f.lineNumber;f.changes&&(B(f.changes,"gutter")>-1&&(d=!1),ur(e,f,c,r)),d&&(M(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ge(e.options,c)))),l=f.node.nextSibling}else{var p=vr(e,f,c,r);o.insertBefore(p,l)}c+=f.size}for(;l;)l=s(l)}(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=D()&&(e.activeElt.focus(),e.anchorNode&&W(document.body,e.anchorNode)&&W(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(c),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ri(e,400)),r.updateLineNumbers=null,!0}function li(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Tr(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Sr(e.display)-Mr(e),r.top)}),t.visible=xn(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&oi(e,t);n=!1){bn(e);var i=Hn(e);un(e),En(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function si(e,t){var r=new ii(e,t);if(oi(e,r)){bn(e),li(e,r);var n=Hn(e);un(e),En(e,n),ui(e,n),r.finish()}}function ai(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+kr(e)+"px"}function ci(e){var t=e.display.gutters,r=e.options.gutters;M(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(O("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",ai(e)}function hi(e){var t=B(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}ii.prototype.signal=function(e,t){lt(e,t)&&this.events.push(arguments)},ii.prototype.finish=function(){for(var e=0;e<this.events.length;e++)nt.apply(null,this.events[e])};var fi=0,di=null;function pi(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function gi(e){var t=pi(e);return t.x*=di,t.y*=di,t}function vi(e,t){var n=pi(t),i=n.x,o=n.y,l=e.display,s=l.scroller,u=s.scrollWidth>s.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&y&&a)e:for(var f=t.target,d=l.view;f!=s;f=f.parentNode)for(var p=0;p<d.length;p++)if(d[p].node==f){e.display.currentWheelTarget=f;break e}if(i&&!r&&!h&&null!=di)return o&&c&&An(e,Math.max(0,s.scrollTop+o*di)),Dn(e,Math.max(0,s.scrollLeft+i*di)),(!o||o&&c)&&at(t),void(l.wheelStartX=null);if(o&&null!=di){var g=o*di,v=e.doc.scrollTop,m=v+l.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):m=Math.min(e.doc.height,m+g+50),si(e,{top:v,bottom:m})}fi<20&&(null==l.wheelStartX?(l.wheelStartX=s.scrollLeft,l.wheelStartY=s.scrollTop,l.wheelDX=i,l.wheelDY=o,setTimeout(function(){if(null!=l.wheelStartX){var e=s.scrollLeft-l.wheelStartX,t=s.scrollTop-l.wheelStartY,r=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,r&&(di=(di*fi+r)/(fi+1),++fi)}},200)):(l.wheelDX+=i,l.wheelDY+=o))}}l?di=-.53:r?di=15:c?di=-.7:f&&(di=-1/3);var mi=function(e,t){this.ranges=e,this.primIndex=t};mi.prototype.primary=function(){return this.ranges[this.primIndex]},mi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!ye(r.anchor,n.anchor)||!ye(r.head,n.head))return!1}return!0},mi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new yi(be(this.ranges[t].anchor),be(this.ranges[t].head));return new mi(e,this.primIndex)},mi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},mi.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(me(t,n.from())>=0&&me(e,n.to())<=0)return r}return-1};var yi=function(e,t){this.anchor=e,this.head=t};function bi(e,t){var r=e[t];e.sort(function(e,t){return me(e.from(),t.from())}),t=B(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(me(o.to(),i.from())>=0){var l=xe(o.from(),i.from()),s=we(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new yi(a?s:l,a?l:s))}}return new mi(e,t)}function wi(e,t){return new mi([new yi(e,t||e)],0)}function xi(e){return e.text?ve(e.from.line+e.text.length-1,q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ci(e,t){if(me(e,t.from)<0)return e;if(me(e,t.to)<=0)return xi(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=xi(t).ch-t.to.ch),ve(r,n)}function Si(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new yi(Ci(i.anchor,t),Ci(i.head,t)))}return bi(r,e.sel.primIndex)}function Li(e,t,r){return e.line==t.line?ve(r.line,e.ch-t.ch+r.ch):ve(r.line+(e.line-t.line),e.ch)}function ki(e){e.doc.mode=Mt(e.options,e.doc.modeOption),Ti(e)}function Ti(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ri(e,100),e.state.modeGen++,e.curOp&&Zn(e)}function Mi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==q(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ni(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),De(e),He(e,r);var i=n?n(e):1;i!=e.height&&he(e,i)}(e,r,i,n),sr(e,"change",e,t)}function l(e,t){for(var r=[],o=e;o<t;++o)r.push(new Xt(u[o],i(o),n));return r}var s=t.from,a=t.to,u=t.text,c=ae(e,s.line),h=ae(e,a.line),f=q(u),d=i(u.length-1),p=a.line-s.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(Mi(e,t)){var g=l(0,u.length-1);o(h,h.text,d),p&&e.remove(s.line,p),g.length&&e.insert(s.line,g)}else if(c==h)if(1==u.length)o(c,c.text.slice(0,s.ch)+f+c.text.slice(a.ch),d);else{var v=l(1,u.length-1);v.push(new Xt(f+c.text.slice(a.ch),d,n)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,v)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+h.text.slice(a.ch),i(0)),e.remove(s.line+1,p);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(h,f+h.text.slice(a.ch),d);var m=l(1,u.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,m)}sr(e,"change",e,t)}function Oi(e,t,r){!function e(n,i,o){if(n.linked)for(var l=0;l<n.linked.length;++l){var s=n.linked[l];if(s.doc!=i){var a=o&&s.sharedHist;r&&!a||(t(s.doc,a),e(s.doc,n,a))}}}(e,null,!0)}function Ai(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ln(e),ki(e),Wi(e),e.options.lineWrapping||_e(e),e.options.mode=t.modeOption,Zn(e)}function Wi(e){("rtl"==e.doc.direction?H:T)(e.display.lineDiv,"CodeMirror-rtl")}function Di(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Hi(e,t){var r={from:be(t.from),to:xi(t),text:ue(e,t.from,t.to)};return Ii(e,r,t.from.line,t.to.line+1),Oi(e,function(e){return Ii(e,r,t.from.line,t.to.line+1)},!0),r}function Fi(e){for(;e.length;){if(!q(e).ranges)break;e.pop()}}function Pi(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Fi(e.done),q(e.done)):e.done.length&&!q(e.done).ranges?q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),q(e.done)):void 0}(i,i.lastOp==n)))l=q(o.changes),0==me(t.from,t.to)&&0==me(t.from,l.to)?l.to=xi(t):o.changes.push(Hi(e,t));else{var a=q(i.done);for(a&&a.ranges||zi(e.sel,i.done),o={changes:[Hi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||nt(e,"historyAdded")}function Ei(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,q(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Fi(i.undone)}function zi(e,t){var r=q(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ii(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function Ri(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Bi(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Ri(r[i]));return n}(e,t),n=Ae(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],l=n[i];if(o&&l)e:for(var s=0;s<l.length;++s){for(var a=l[s],u=0;u<o.length;++u)if(o[u].marker==a.marker)continue e;o.push(a)}else l&&(r[i]=l)}return r}function Gi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?mi.prototype.deepCopy.call(o):o);else{var l=o.changes,s=[];n.push({changes:s});for(var a=0;a<l.length;++a){var u=l[a],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var h in u)(c=h.match(/^spans_(\d+)$/))&&B(t,Number(c[1]))>-1&&(q(s)[h]=u[h],delete u[h])}}}return n}function Ui(e,t,r,n){if(n){var i=e.anchor;if(r){var o=me(t,i)<0;o!=me(r,i)<0?(i=t,t=r):o!=me(t,r)<0&&(t=r)}return new yi(i,t)}return new yi(r||t,t)}function Vi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),_i(e,new mi([Ui(e.sel.primary(),t,r,i)],0),n)}function Ki(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Ui(e.sel.ranges[o],t[o],null,i);_i(e,bi(n,e.sel.primIndex),r)}function ji(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,_i(e,bi(i,e.sel.primIndex),n)}function Xi(e,t,r,n){_i(e,wi(t,r),n)}function Yi(e,t,r){var n=e.history.done,i=q(n);i&&i.ranges?(n[n.length-1]=t,qi(e,t,r)):_i(e,t,r)}function _i(e,t,r){qi(e,t,r),Ei(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function qi(e,t,r){(lt(e,"beforeSelectionChange")||e.cm&&lt(e.cm,"beforeSelectionChange"))&&(t=function(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new yi(Se(e,t[r].anchor),Se(e,t[r].head))},origin:r&&r.origin};return nt(e,"beforeSelectionChange",e,n),e.cm&&nt(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?bi(n.ranges,n.ranges.length-1):t}(e,t,r));var n=r&&r.bias||(me(t.primary().head,e.sel.primary().head)<0?-1:1);$i(e,Qi(e,t,n,!0)),r&&!1===r.scroll||!e.cm||Tn(e.cm)}function $i(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,ot(e.cm)),sr(e,"cursorActivity",e))}function Zi(e){$i(e,Qi(e,e.sel,null,!1))}function Qi(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],a=eo(e,l.anchor,s&&s.anchor,r,n),u=eo(e,l.head,s&&s.head,r,n);(i||a!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new yi(a,u))}return i?bi(i,t.primIndex):t}function Ji(e,t,r,n,i){var o=ae(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var s=o.markedSpans[l],a=s.marker;if((null==s.from||(a.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(a.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(nt(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=to(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=me(u,r))&&(n<0?c<0:c>0))return Ji(e,u,t,n,i)}var h=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(h=to(e,h,n,h.line==t.line?o:null)),h?Ji(e,h,t,n,i):null}}return t}function eo(e,t,r,n,i){var o=n||1,l=Ji(e,t,r,o,i)||!i&&Ji(e,t,r,o,!0)||Ji(e,t,r,-o,i)||!i&&Ji(e,t,r,-o,!0);return l||(e.cantEdit=!0,ve(e.first,0))}function to(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?Se(e,ve(t.line-1)):null:r>0&&t.ch==(n||ae(e,t.line)).text.length?t.line<e.first+e.size-1?ve(t.line+1,0):null:new ve(t.line,t.ch+r)}function ro(e){e.setSelection(ve(e.firstLine(),0),ve(e.lastLine()),V)}function no(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=Se(e,t)),r&&(n.to=Se(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),nt(e,"beforeChange",e,n),e.cm&&nt(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function io(e,t,r){if(e.cm){if(!e.cm.curOp)return _n(e.cm,io)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(lt(e,"beforeChange")||e.cm&&lt(e.cm,"beforeChange"))||(t=no(e,t,!0))){var n=ke&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=B(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var l=n[o],s=l.find(0),a=0;a<i.length;++a){var u=i[a];if(!(me(u.to,s.from)<0||me(u.from,s.to)>0)){var c=[a,1],h=me(u.from,s.from),f=me(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)oo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else oo(e,t)}}function oo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=me(t.from,t.to)){var r=Si(e,t);Pi(e,t,r,e.cm?e.cm.curOp.id:NaN),ao(e,t,r,Ae(e,t));var n=[];Oi(e,function(e,r){r||-1!=B(n,e.history)||(fo(e.history,t),n.push(e.history)),ao(e,t,null,Ae(e,t))})}}function lo(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a<l.length&&(n=l[a],r?!n.ranges||n.equals(e.sel):n.ranges);a++);if(a!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;(n=l.pop()).ranges;){if(zi(n,s),r&&!n.equals(e.sel))return void _i(e,n,{clearRedo:!1});o=n}var u=[];zi(o,s),s.push({changes:u,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var c=lt(e,"beforeChange")||e.cm&&lt(e.cm,"beforeChange"),h=function(r){var i=n.changes[r];if(i.origin=t,c&&!no(e,i,!1))return l.length=0,{};u.push(Hi(e,i));var o=r?Si(e,i):q(l);ao(e,i,o,Bi(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:xi(i)});var s=[];Oi(e,function(e,t){t||-1!=B(s,e.history)||(fo(e.history,i),s.push(e.history)),ao(e,i,null,Bi(e,i))})},f=n.changes.length-1;f>=0;--f){var d=h(f);if(d)return d.v}}}}function so(e,t){if(0!=t&&(e.first+=t,e.sel=new mi($(e.sel.ranges,function(e){return new yi(ve(e.anchor.line+t,e.anchor.ch),ve(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Zn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Qn(e.cm,n,"gutter")}}function ao(e,t,r,n){if(e.cm&&!e.cm.curOp)return _n(e.cm,ao)(e,t,r,n);if(t.to.line<e.first)so(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);so(e,i),t={from:ve(e.first,0),to:ve(t.to.line+i,t.to.ch),text:[q(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ve(o,ae(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ue(e,t.from,t.to),r||(r=Si(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=fe(Ge(ae(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0}));n.sel.contains(t.from,t.to)>-1&&ot(e);Ni(n,t,r,on(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=Ye(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=ae(e,n).stateAfter;if(i&&(!(i instanceof Ft)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}})(n,o.line),ri(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?Zn(e):o.line!=l.line||1!=t.text.length||Mi(e.doc,t)?Zn(e,o.line,l.line+1,u):Qn(e,o.line,"text");var c=lt(e,"changes"),h=lt(e,"change");if(h||c){var f={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};h&&sr(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,n):Ni(e,t,n),qi(e,r,V)}}function uo(e,t,r,n,i){var o;(n||(n=r),me(n,r)<0)&&(r=(o=[n,r])[0],n=o[1]);"string"==typeof t&&(t=e.splitLines(t)),io(e,{from:r,to:n,text:t,origin:i})}function co(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ho(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)co(o.ranges[s].anchor,t,r,n),co(o.ranges[s].head,t,r,n)}else{for(var a=0;a<o.changes.length;++a){var u=o.changes[a];if(r<u.from.line)u.from=ve(u.from.line+n,u.from.ch),u.to=ve(u.to.line+n,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function fo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;ho(e.done,r,n,i),ho(e.undone,r,n,i)}function po(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=ae(e,Ce(e,t)):i=fe(t),null==i?null:(n(o,i)&&e.cm&&Qn(e.cm,i,r),o)}function go(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function vo(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}yi.prototype.from=function(){return xe(this.anchor,this.head)},yi.prototype.to=function(){return we(this.anchor,this.head)},yi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},go.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Yt(i),sr(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},vo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),l=n.height;if(n.removeInner(e,o),this.height-=l-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof go))){var s=[];this.collapse(s),this.children=[new go(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,s=l;s<i.lines.length;){var a=new go(i.lines.slice(s,s+=25));i.height-=a.height,this.children.splice(++n,0,a),a.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new vo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=B(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new vo(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=o}}};var mo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function yo(e,t,r){Xe(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&kn(e,r)}mo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=fe(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=wr(this);he(r,Math.max(0,r.height-o)),e&&(Yn(e,function(){yo(e,r,-o),Qn(e,n,"widget")}),sr(e,"lineWidgetCleared",e,this,n))}},mo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=wr(this)-t;i&&(he(n,n.height+i),r&&Yn(r,function(){r.curOp.forceUpdate=!0,yo(r,n,i),sr(r,"lineWidgetChanged",r,e,fe(n))}))},st(mo);var bo=0,wo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++bo};function xo(e,t,r,n,i){if(n&&n.shared)return function(e,t,r,n,i){(n=z(n)).shared=!1;var o=[xo(e,t,r,n,i)],l=o[0],s=n.widgetNode;return Oi(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(xo(e,Se(e,t),Se(e,r),n,i));for(var a=0;a<e.linked.length;++a)if(e.linked[a].isParent)return;l=q(o)}),new Co(o,l)}(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return _n(e.cm,xo)(e,t,r,n,i);var o=new wo(e,i),l=me(t,r);if(n&&z(n,o,!1),l>0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Be(e,t.line,t,r,o)||t.line!=r.line&&Be(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Te=!0}o.addToHistory&&Pi(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,r.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&Ge(e)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&he(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Me(o,a==t.line?t.ch:null,a==r.line?r.ch:null)),++a}),o.collapsed&&e.iter(t.line,r.line+1,function(t){Ke(e,t)&&he(t,0)}),o.clearOnEnter&&et(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(ke=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++bo,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Zn(u,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=r.line;c++)Qn(u,c,"text");o.atomic&&Zi(u.doc),sr(u,"markerAdded",u,o)}return o}wo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gn(e),lt(this,"clear")){var r=this.find();r&&sr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],s=Ne(l.markedSpans,this);e&&!this.collapsed?Qn(e,fe(l),"text"):e&&(null!=s.to&&(i=fe(l)),null!=s.from&&(n=fe(l))),l.markedSpans=Oe(l.markedSpans,s),null==s.from&&this.collapsed&&!Ke(this.doc,l)&&e&&he(l,en(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var a=0;a<this.lines.length;++a){var u=Ge(this.lines[a]),c=Ye(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Zn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Zi(e.doc)),e&&sr(e,"markerCleared",e,this,n,i),t&&Un(e),this.parent&&this.parent.clear()}},wo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],l=Ne(o.markedSpans,this);if(null!=l.from&&(r=ve(t?o:fe(o),l.from),-1==e))return r;if(null!=l.to&&(n=ve(t?o:fe(o),l.to),1==e))return n}return r&&{from:r,to:n}},wo.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&Yn(n,function(){var i=t.line,o=fe(t.line),l=Ar(n,o);if(l&&(zr(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ke(r.doc,i)&&null!=r.height){var s=r.height;r.height=null;var a=wr(r)-s;a&&he(i,i.height+a)}sr(n,"markerChanged",n,e)})},wo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=B(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},wo.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},st(wo);var Co=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function So(e){return e.findMarks(ve(e.first,0),e.clipPos(ve(e.lastLine())),function(e){return e.parent})}function Lo(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];Oi(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==B(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}Co.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();sr(this,"clear")}},Co.prototype.find=function(e,t){return this.primary.find(e,t)},st(Co);var ko=0,To=function(e,t,r,n,i){if(!(this instanceof To))return new To(e,t,r,n,i);null==r&&(r=0),vo.call(this,[new go([new Xt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=ve(r,0);this.sel=wi(o),this.history=new Di(null),this.id=++ko,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ni(this,{from:o,to:o,text:e}),_i(this,wi(o),V)};To.prototype=Q(vo.prototype,{constructor:To,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ce(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:$n(function(e){var t=ve(this.first,0),r=this.first+this.size-1;io(this,{from:t,to:ve(r,ae(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Mn(this.cm,0,0),_i(this,wi(t),V)}),replaceRange:function(e,t,r,n){uo(this,e,t=Se(this,t),r=r?Se(this,r):t,n)},getRange:function(e,t,r){var n=ue(this,Se(this,e),Se(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(pe(this,e))return ae(this,e)},getLineNumber:function(e){return fe(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=ae(this,e)),Ge(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Se(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:$n(function(e,t,r){Xi(this,Se(this,"number"==typeof e?ve(e,t||0):e),null,r)}),setSelection:$n(function(e,t,r){Xi(this,Se(this,e),Se(this,t||e),r)}),extendSelection:$n(function(e,t,r){Vi(this,Se(this,e),t&&Se(this,t),r)}),extendSelections:$n(function(e,t){Ki(this,Le(this,e),t)}),extendSelectionsBy:$n(function(e,t){Ki(this,Le(this,$(this.sel.ranges,e)),t)}),setSelections:$n(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new yi(Se(this,e[i].anchor),Se(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),_i(this,bi(n,t),r)}}),addSelection:$n(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new yi(Se(this,e),Se(this,t||e))),_i(this,bi(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=ue(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=ue(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:$n(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];n[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:r}}for(var s=t&&"end"!=t&&function(e,t,r){for(var n=[],i=ve(e.first,0),o=i,l=0;l<t.length;l++){var s=t[l],a=Li(s.from,i,o),u=Li(xi(s),i,o);if(i=s.to,o=u,"around"==r){var c=e.sel.ranges[l],h=me(c.head,c.anchor)<0;n[l]=new yi(h?u:a,h?a:u)}else n[l]=new yi(a,a)}return new mi(n,e.sel.primIndex)}(this,n,t),a=n.length-1;a>=0;a--)io(this,n[a]);s?Yi(this,s):this.cm&&Tn(this.cm)}),undo:$n(function(){lo(this,"undo")}),redo:$n(function(){lo(this,"redo")}),undoSelection:$n(function(){lo(this,"undo",!0)}),redoSelection:$n(function(){lo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Di(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Gi(this.history.done),undone:Gi(this.history.undone)}},setHistory:function(e){var t=this.history=new Di(this.history.maxGeneration);t.done=Gi(e.done.slice(0),null,!0),t.undone=Gi(e.undone.slice(0),null,!0)},setGutterMarker:$n(function(e,t,r){return po(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&re(n)&&(e.gutterMarkers=null),!0})}),clearGutter:$n(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&po(t,r,"gutter",function(){return r.gutterMarkers[e]=null,re(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!pe(this,e))return null;if(t=e,!(e=ae(this,e)))return null}else if(null==(t=fe(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:$n(function(e,t,r){return po(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(L(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})}),removeLineClass:$n(function(e,t,r){return po(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(L(r));if(!o)return!1;var l=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0})}),addLineWidget:$n(function(e,t,r){return function(e,t,r,n){var i=new mo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),po(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Ke(e,t)){var n=Xe(t)<e.scrollTop;he(t,t.height+wr(i)),n&&kn(o,i.height),o.curOp.forceUpdate=!0}return!0}),sr(o,"lineWidgetAdded",o,i,"number"==typeof t?t:fe(t)),i}(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return xo(this,Se(this,e),Se(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return xo(this,e=Se(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=ae(this,(e=Se(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=Se(this,e),t=Se(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s<l.length;s++){var a=l[s];null!=a.to&&i==e.line&&e.ch>=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),Se(this,ve(r,t))},indexFromPos:function(e){var t=(e=Se(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new To(ce(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new To(ce(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(me(o,l)){var s=xo(e,o,l,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}(n,So(this)),n},unlinkDoc:function(e){if(e instanceof Sl&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Lo(So(this));break}}if(e.history==this.history){var r=[e.id];Oi(e,function(e){return r.push(e.id)},!0),e.history=new Di(null),e.history.done=Gi(this.history.done,r),e.history.undone=Gi(this.history.undone,r)}},iterLinkedDocs:function(e){Oi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):wt(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:$n(function(e){var t;("rtl"!=e&&(e="ltr"),e!=this.direction)&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Yn(t=this.cm,function(){Wi(t),Zn(t)}))})}),To.prototype.eachLine=To.prototype.iter;var Mo=0;function No(e){var t=this;if(Oo(t),!it(t,e)&&!xr(t.display,e)){at(e),l&&(Mo=+new Date);var r=sn(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),s=0,a=function(e,n){if(!t.options.allowDropFileTypes||-1!=B(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=_n(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++s==i){var a={from:r=Se(t.doc,r),to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};io(t.doc,a),Yi(t.doc,wi(r,xi(a)))}}),l.readAsText(e)}},u=0;u<i;++u)a(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),qi(t.doc,wi(r,r)),h)for(var f=0;f<h.length;++f)uo(t.doc,"",h[f].anchor,h[f].head,"drag");t.replaceSelection(c,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Oo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ao(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}var Wo=!1;function Do(){var e;Wo||(et(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Ao(Ho)},100))}),et(window,"blur",function(){return Ao(yn)}),Wo=!0)}function Ho(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}for(var Fo={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Po=0;Po<10;Po++)Fo[Po+48]=Fo[Po+96]=String(Po);for(var Eo=65;Eo<=90;Eo++)Fo[Eo]=String.fromCharCode(Eo);for(var zo=1;zo<=12;zo++)Fo[zo+111]=Fo[zo+63235]="F"+zo;var Io={};function Ro(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var l=0;l<o.length-1;l++){var s=o[l];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Bo(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=$(r.split(" "),Ro),o=0;o<i.length;o++){var l=void 0,s=void 0;o==i.length-1?(s=i.join(" "),l=n):(s=i.slice(0,o+1).join(" "),l="...");var a=t[s];if(a){if(a!=l)throw new Error("Inconsistent bindings for "+s)}else t[s]=l}delete e[r]}for(var u in t)e[u]=t[u];return e}function Go(e,t,r,n){var i=(t=jo(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Go(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var l=Go(e,t.fallthrough[o],r,n);if(l)return l}}}function Uo(e){var t="string"==typeof e?e:Fo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Vo(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(C?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(C?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Ko(e,t){if(h&&34==e.keyCode&&e.char)return!1;var r=Fo[e.keyCode];return null!=r&&!e.altGraphKey&&Vo(r,e,t)}function jo(e){return"string"==typeof e?Io[e]:e}function Xo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&me(o.from,q(n).to)<=0;){var l=n.pop();if(me(l.from,o.from)<0){o.from=l.from;break}}n.push(o)}Yn(e,function(){for(var t=n.length-1;t>=0;t--)uo(e.doc,"",n[t].from,n[t].to,"+delete");Tn(e)})}function Yo(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function _o(e,t,r){var n=Yo(e,t.ch,r);return null==n?null:new ve(t.line,n,r<0?"after":"before")}function qo(e,t,r,n,i){if(e){var o=Qe(r,t.doc.direction);if(o){var l,s=i<0?q(o):o[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Wr(t,r);l=i<0?r.text.length-1:0;var c=Dr(t,u,l).top;l=le(function(e){return Dr(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=Yo(r,l,1))}else l=i<0?s.to:s.from;return new ve(n,l,a)}}return new ve(n,i<0?r.text.length:0,i<0?"before":"after")}Io.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Io.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Io.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Io.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Io.default=y?Io.macDefault:Io.pcDefault;var $o={selectAll:ro,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Xo(e,function(t){if(t.empty()){var r=ae(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:ve(t.head.line+1,0)}:{from:t.head,to:ve(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Xo(e,function(t){return{from:ve(t.from().line,0),to:Se(e.doc,ve(t.to().line+1,0))}})},delLineLeft:function(e){return Xo(e,function(e){return{from:ve(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Xo(e,function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}})},delWrappedLineRight:function(e){return Xo(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ve(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ve(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Zo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Qo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return function(e,t){var r=ae(e.doc,t),n=function(e){for(var t;t=Re(e);)e=t.find(1,!0).line;return e}(r);n!=r&&(t=fe(n));return qo(!0,e,r,t,-1)}(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},j)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},j)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Qo(e,t.head):n},j)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),l=I(e.getLine(o.line),o.ch,n);t.push(_(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Yn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=ae(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new ve(i.line,i.ch-1)),i.ch>0)i=new ve(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ve(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=ae(e.doc,i.line-1).text;l&&(i=new ve(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ve(i.line-1,l.length-1),i,"+transpose"))}r.push(new yi(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return Yn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Tn(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Zo(e,t){var r=ae(e.doc,t),n=Ge(r);return n!=r&&(t=fe(n)),qo(!0,e,n,t,1)}function Qo(e,t){var r=Zo(e,t.line),n=ae(e.doc,r.line),i=Qe(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return ve(r.line,l?0:o,r.sticky)}return r}function Jo(e,t,r){if("string"==typeof t&&!(t=$o[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=U}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}var el=new R;function tl(e,t,r,n){var i=e.state.keySeq;if(i){if(Uo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:el.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),rl(e,i+" "+t,r,n))return!0}return rl(e,t,r,n)}function rl(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Go(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Go(t,e.options.extraKeys,r,e)||Go(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&sr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(at(r),pn(e)),!!i}function nl(e,t){var r=Ko(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?tl(e,"Shift-"+r,t,function(t){return Jo(e,t,!0)})||tl(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return Jo(e,t)}):tl(e,r,t,function(t){return Jo(e,t)}))}var il=null;function ol(e){var t=this;if(t.curOp.focus=D(),!it(t,e)){l&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=nl(t,e);h&&(il=n?r:null,!n&&88==r&&!Ct&&(y?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(T(t,"CodeMirror-crosshair"),rt(document,"keyup",r),rt(document,"mouseover",r))}H(t,"CodeMirror-crosshair"),et(document,"keyup",r),et(document,"mouseover",r)}(t)}}function ll(e){16==e.keyCode&&(this.doc.sel.shift=!1),it(this,e)}function sl(e){var t=this;if(!(xr(t.display,e)||it(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(h&&r==il)return il=null,void at(e);if(!h||e.which&&!(e.which<10)||!nl(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(function(e,t,r){return tl(e,"'"+r+"'",t,function(t){return Jo(e,t,!0)})}(t,e,i)||t.display.input.onKeyPress(e))}}}var al,ul,cl=function(e,t,r){this.time=e,this.pos=t,this.button=r};function hl(e){var t=this,r=t.display;if(!(it(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,xr(r,e))a||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));else if(!pl(t,e)){var n=sn(t,e),i=dt(e),o=n?function(e,t){var r=+new Date;return ul&&ul.compare(r,e,t)?(al=ul=null,"triple"):al&&al.compare(r,e,t)?(ul=new cl(r,e,t),al=null,"double"):(al=new cl(r,e,t),ul=null,"single")}(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&function(e,t,r,n,i){var o="Click";"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o);return tl(e,Vo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,function(t){if("string"==typeof t&&(t=$o[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=U}finally{e.state.suppressEdits=!1}return n})}(t,i,n,o,e)||(1==i?n?function(e,t,r,n){l?setTimeout(E(gn,e),0):e.curOp.focus=D();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=b?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey);null==i.addNew&&(i.addNew=y?r.metaKey:r.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(y?r.altKey:r.ctrlKey));return i}(e,r,n),u=e.doc.sel;e.options.dragDrop&&vt&&!e.isReadOnly()&&"single"==r&&(i=u.contains(t))>-1&&(me((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(me(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,u=_n(e,function(t){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,rt(document,"mouseup",u),rt(document,"mousemove",c),rt(i.scroller,"dragstart",h),rt(i.scroller,"drop",u),o||(at(t),n.addNew||Vi(e.doc,r,null,null,n.extend),a||l&&9==s?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};a&&(i.scroller.draggable=!0);e.state.draggingText=u,u.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop();et(document,"mouseup",u),et(document,"mousemove",c),et(i.scroller,"dragstart",h),et(i.scroller,"drop",u),vn(e),setTimeout(function(){return i.input.focus()},20)}(e,n,t,o):function(e,t,r,n){var i=e.display,o=e.doc;at(t);var l,s,a=o.sel,u=a.ranges;n.addNew&&!n.extend?(s=o.sel.contains(r),l=s>-1?u[s]:new yi(r,r)):(l=o.sel.primary(),s=o.sel.primIndex);if("rectangle"==n.unit)n.addNew||(l=new yi(r,r)),r=sn(e,t,!0,!0),s=-1;else{var c=fl(e,r,n.unit);l=n.extend?Ui(l,c.anchor,c.head,n.extend):c}n.addNew?-1==s?(s=u.length,_i(o,bi(u.concat([l]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==n.unit&&!n.extend?(_i(o,bi(u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),a=o.sel):ji(o,s,l,K):(s=0,_i(o,new mi([l],0),K),a=o.sel);var h=r;function f(t){if(0!=me(h,t))if(h=t,"rectangle"==n.unit){for(var i=[],u=e.options.tabSize,c=I(ae(o,r.line).text,r.ch,u),f=I(ae(o,t.line).text,t.ch,u),d=Math.min(c,f),p=Math.max(c,f),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=ae(o,g).text,y=X(m,d,u);d==p?i.push(new yi(ve(g,y),ve(g,y))):m.length>y&&i.push(new yi(ve(g,y),ve(g,X(m,p,u))))}i.length||i.push(new yi(r,r)),_i(o,bi(a.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=l,x=fl(e,t,n.unit),C=w.anchor;me(x.anchor,C)>0?(b=x.head,C=xe(w.from(),x.anchor)):(b=x.anchor,C=we(w.to(),x.head));var S=a.ranges.slice(0);S[s]=function(e,t){var r=t.anchor,n=t.head,i=ae(e.doc,r.line);if(0==me(r,n)&&r.sticky==n.sticky)return t;var o=Qe(i);if(!o)return t;var l=$e(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a,u=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)a=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=$e(o,n.ch,n.sticky),h=c-l||(n.ch-r.ch)*(1==s.level?-1:1);a=c==u-1||c==u?h<0:h>0}var f=o[u+(a?-1:0)],d=a==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new yi(new ve(r.line,p,g),n)}(e,new yi(Se(o,C),b)),_i(o,bi(S,s),K)}}var d=i.wrapper.getBoundingClientRect(),p=0;function g(t){e.state.selectingText=!1,p=1/0,at(t),i.input.focus(),rt(document,"mousemove",v),rt(document,"mouseup",m),o.history.lastSelOrigin=null}var v=_n(e,function(t){dt(t)?function t(r){var l=++p;var s=sn(e,r,!0,"rectangle"==n.unit);if(!s)return;if(0!=me(s,h)){e.curOp.focus=D(),f(s);var a=xn(i,o);(s.line>=a.to||s.line<a.from)&&setTimeout(_n(e,function(){p==l&&t(r)}),150)}else{var u=r.clientY<d.top?-20:r.clientY>d.bottom?20:0;u&&setTimeout(_n(e,function(){p==l&&(i.scroller.scrollTop+=u,t(r))}),50)}}(t):g(t)}),m=_n(e,g);e.state.selectingText=m,et(document,"mousemove",v),et(document,"mouseup",m)}(e,n,t,o)}(t,n,o,e):ft(e)==r.scroller&&at(e):2==i?(n&&Vi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==i&&(S?gl(t,e):vn(t)))}}function fl(e,t,r){if("char"==r)return new yi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new yi(ve(t.line,0),Se(e.doc,ve(t.line+1,0)));var n=r(e,t);return new yi(n.from,n.to)}function dl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&at(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!lt(e,r))return ct(t);o-=s.top-l.viewOffset;for(var a=0;a<e.options.gutters.length;++a){var u=l.gutters.childNodes[a];if(u&&u.getBoundingClientRect().right>=i)return nt(e,r,e,de(e.doc,o),e.options.gutters[a],t),ct(t)}}function pl(e,t){return dl(e,t,"gutterClick",!0)}function gl(e,t){xr(e.display,t)||function(e,t){if(!lt(e,"gutterContextMenu"))return!1;return dl(e,t,"gutterContextMenu",!1)}(e,t)||it(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function vl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Rr(e)}cl.prototype.compare=function(e,t,r){return this.time+400>e&&0==me(t,this.pos)&&r==this.button};var ml={toString:function(){return"CodeMirror.Init"}},yl={},bl={};function wl(e){ci(e),Zn(e),Cn(e)}function xl(e,t,r){if(!t!=!(r&&r!=ml)){var n=e.display.dragFunctions,i=t?et:rt;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Cl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),_e(e)),ln(e),Zn(e),Rr(e),setTimeout(function(){return En(e)},100)}function Sl(e,t){var r=this;if(!(this instanceof Sl))return new Sl(e,t);this.options=t=t?z(t):{},z(yl,t,!1),hi(t);var n=t.value;"string"==typeof n&&(n=new To(n,t.mode,null,t.lineSeparator,t.direction)),this.doc=n;var i=new Sl.inputStyles[t.inputStyle](this),o=this.display=new se(e,n,i);for(var u in o.wrapper.CodeMirror=this,ci(this),vl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Rn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},t.autofocus&&!m&&o.input.focus(),l&&s<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(e){var t=e.display;et(t.scroller,"mousedown",_n(e,hl)),et(t.scroller,"dblclick",l&&s<11?_n(e,function(t){if(!it(e,t)){var r=sn(e,t);if(r&&!pl(e,t)&&!xr(e.display,t)){at(t);var n=e.findWordAt(r);Vi(e.doc,n.anchor,n.head)}}}):function(t){return it(e,t)||at(t)});S||et(t.scroller,"contextmenu",function(t){return gl(e,t)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}et(t.scroller,"touchstart",function(i){if(!it(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!pl(e,i)){t.input.ensurePolled(),clearTimeout(r);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),et(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),et(t.scroller,"touchend",function(r){var n=t.activeTouch;if(n&&!xr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var l,s=e.coordsChar(t.activeTouch,"page");l=!n.prev||o(n,n.prev)?new yi(s,s):!n.prev.prev||o(n,n.prev.prev)?e.findWordAt(s):new yi(ve(s.line,0),Se(e.doc,ve(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),at(r)}i()}),et(t.scroller,"touchcancel",i),et(t.scroller,"scroll",function(){t.scroller.clientHeight&&(An(e,t.scroller.scrollTop),Dn(e,t.scroller.scrollLeft,!0),nt(e,"scroll",e))}),et(t.scroller,"mousewheel",function(t){return vi(e,t)}),et(t.scroller,"DOMMouseScroll",function(t){return vi(e,t)}),et(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){it(e,t)||ht(t)},over:function(t){it(e,t)||(!function(e,t){var r=sn(e,t);if(r){var n=document.createDocumentFragment();hn(e,r,n),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,n)}}(e,t),ht(t))},start:function(t){return function(e,t){if(l&&(!e.state.draggingText||+new Date-Mo<100))ht(t);else if(!it(e,t)&&!xr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var r=O("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),h&&r.parentNode.removeChild(r)}}(e,t)},drop:_n(e,No),leave:function(t){it(e,t)||Oo(e)}};var a=t.input.getField();et(a,"keyup",function(t){return ll.call(e,t)}),et(a,"keydown",_n(e,ol)),et(a,"keypress",_n(e,sl)),et(a,"focus",function(t){return mn(e,t)}),et(a,"blur",function(t){return yn(e,t)})}(this),Do(),Gn(this),this.curOp.forceUpdate=!0,Ai(this,n),t.autofocus&&!m||this.hasFocus()?setTimeout(E(mn,this),20):yn(this),bl)bl.hasOwnProperty(u)&&bl[u](r,t[u],ml);Sn(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Ll.length;++c)Ll[c](r);Un(this),a&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Sl.defaults=yl,Sl.optionHandlers=bl;var Ll=[];function kl(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=It(e,t).state:r="prev");var l=e.options.tabSize,s=ae(o,t),a=I(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==U||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?I(ae(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(f<u&&(h+=_(u-f)),h!=c)return uo(o,h,ve(t,0),ve(t,c.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<c.length){var v=ve(t,c.length);ji(o,p,new yi(v,v));break}}}Sl.defineInitHook=function(e){return Ll.push(e)};var Tl=null;function Ml(e){Tl=e}function Nl(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var l,s=e.state.pasteIncoming||"paste"==i,a=wt(t),u=null;if(s&&n.ranges.length>1)if(Tl&&Tl.text.join("\n")==t){if(n.ranges.length%Tl.text.length==0){u=[];for(var c=0;c<Tl.text.length;c++)u.push(o.splitLines(Tl.text[c]))}}else a.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=$(a,function(e){return[e]}));for(var h=n.ranges.length-1;h>=0;h--){var f=n.ranges[h],d=f.from(),p=f.to();f.empty()&&(r&&r>0?d=ve(d.line,d.ch-r):e.state.overwrite&&!s?p=ve(p.line,Math.min(ae(o,p.line).text.length,p.ch+q(a).length)):Tl&&Tl.lineWise&&Tl.text.join("\n")==t&&(d=p=ve(d.line,0))),l=e.curOp.updateInput;var g={from:d,to:p,text:u?u[h%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};io(e.doc,g),sr(e,"inputRead",e,g)}t&&!s&&Al(e,t),Tn(e),e.curOp.updateInput=l,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ol(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Yn(t,function(){return Nl(t,r,0,null,"paste")}),!0}function Al(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){l=kl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ae(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=kl(e,i.head.line,"smart"));l&&sr(e,"electricInput",e,i.head.line)}}}function Wl(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:ve(i,0),head:ve(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Dl(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Hl(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return a?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),Dl(e),t}function Fl(e,t,r,n,i){var o=t,l=r,s=ae(e,t.line);function a(n){var o,l;if(null==(o=i?function(e,t,r,n){var i=Qe(t,e.doc.direction);if(!i)return _o(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=$e(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from<r.ch))return _o(t,r,n);var s,a=function(e,r){return Yo(t,e instanceof ve?e.ch:e,r)},u=function(r){return e.options.lineWrapping?(s=s||Wr(e,t),Zr(e,t,s,r)):{begin:0,end:t.text.length}},c=u("before"==r.sticky?a(r,-1):r.ch);if("rtl"==e.doc.direction||1==l.level){var h=1==l.level==n<0,f=a(r,h?1:-1);if(null!=f&&(h?f<=l.to&&f<=c.end:f>=l.from&&f>=c.begin)){var d=h?"before":"after";return new ve(r.line,f,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ve(r.line,a(e,1),"before"):new ve(r.line,e,"after")};e>=0&&e<i.length;e+=t){var l=i[e],s=t>0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u<l.to)return o(u,s);if(u=s?l.from:a(l.to,-1),n.begin<=u&&u<n.end)return o(u,s)}},g=p(o+n,n,c);if(g)return g;var v=n>0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}(e.cm,s,t,r):_o(s,t,r))){if(n||(l=t.line+r)<e.first||l>=e.first+e.size||(t=new ve(l,t.ch,t.sticky),!(s=ae(e,l))))return!1;t=qo(i,e.cm,s,t.line,r)}else t=o;return!0}if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var u=null,c="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||a(!f);f=!1){var d=s.text.charAt(t.ch)||"\n",p=te(d,h)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||f||p||(p="s"),u&&u!=p){r<0&&(r=1,a(),t.sticky="after");break}if(p&&(u=p),r>0&&!a(!f))break}var g=eo(e,t,o,l,!0);return ye(o,g)&&(g.hitSide=!0),g}function Pl(e,t,r,n){var i,o,l=e.doc,s=t.left;if("page"==n){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(a-.5*en(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=qr(e,s,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var El=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function zl(e,t){var r=Ar(e,t.line);if(!r||r.hidden)return null;var n=ae(e.doc,t.line),i=Nr(r,n,t.line),o=Qe(n,e.doc.direction),l="left";o&&(l=$e(o,t.ch)%2?"right":"left");var s=Pr(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function Il(e,t){return t&&(e.bad=!0),e}function Rl(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Il(e.clipPos(ve(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return Bl(o,t,r)}}function Bl(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!W(n,t))return Il(ve(fe(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?q(e.rest):e.line;return Il(ve(fe(o),o.text.length),i)}var l=3==t.nodeType?t:null,s=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,r&&(r=l.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var a=e.measure,u=a.maps;function c(t,r,n){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?a.map:u[i],l=0;l<o.length;l+=3){var s=o[l+2];if(s==t||s==r){var c=fe(i<0?e.line:e.rest[i]),h=o[l]+n;return(n<0||s!=t)&&(h=o[l+(n?1:0)]),ve(c,h)}}}var h=c(l,s,r);if(h)return Il(h,i);for(var f=s.nextSibling,d=l?l.nodeValue.length-r:0;f;f=f.nextSibling){if(h=c(f,f.firstChild,0))return Il(ve(h.line,h.ch-d),i);d+=f.textContent.length}for(var p=s.previousSibling,g=r;p;p=p.previousSibling){if(h=c(p,p.firstChild,-1))return Il(ve(h.line,h.ch+g),i);g+=p.textContent.length}}El.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;function o(e){if(!it(n,e)){if(n.somethingSelected())Ml({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Wl(n);Ml({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,V),n.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var o=Tl.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var l=Hl(),s=l.firstChild;n.display.lineSpace.insertBefore(l,n.display.lineSpace.firstChild),s.value=Tl.text.join("\n");var a=document.activeElement;P(s),setTimeout(function(){n.display.lineSpace.removeChild(l),a.focus(),a==i&&r.showPrimarySelection()},50)}}Dl(i,n.options.spellcheck),et(i,"paste",function(e){it(n,e)||Ol(e,n)||s<=11&&setTimeout(_n(n,function(){return t.updateFromDOM()}),20)}),et(i,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),et(i,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),et(i,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),et(i,"touchstart",function(){return r.forceCompositionEnd()}),et(i,"input",function(){t.composing||t.readFromDOMSoon()}),et(i,"copy",o),et(i,"cut",o)},El.prototype.prepareSelection=function(){var e=cn(this.cm,!1);return e.focus=this.cm.state.focused,e},El.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},El.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,n=t.doc.sel.primary(),i=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var l=Rl(t,e.anchorNode,e.anchorOffset),s=Rl(t,e.focusNode,e.focusOffset);if(!l||l.bad||!s||s.bad||0!=me(xe(l,s),i)||0!=me(we(l,s),o)){var a=t.display.view,u=i.line>=t.display.viewFrom&&zl(t,i)||{node:a[0].measure.map[2],offset:0},c=o.line<t.display.viewTo&&zl(t,o);if(!c){var h=a[a.length-1].measure,f=h.maps?h.maps[h.maps.length-1]:h.map;c={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(u&&c){var d,p=e.rangeCount&&e.getRangeAt(0);try{d=k(u.node,u.offset,c.offset,c.node)}catch(e){}d&&(!r&&t.state.focused?(e.collapse(u.node,u.offset),d.collapsed||(e.removeAllRanges(),e.addRange(d))):(e.removeAllRanges(),e.addRange(d)),p&&null==e.anchorNode?e.addRange(p):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},El.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},El.prototype.showMultipleSelections=function(e){N(this.cm.display.cursorDiv,e.cursors),N(this.cm.display.selectionDiv,e.selection)},El.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},El.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return W(this.div,t)},El.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},El.prototype.blur=function(){this.div.blur()},El.prototype.getField=function(){return this.div},El.prototype.supportsTouch=function(){return!0},El.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Yn(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))})},El.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},El.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(v&&c&&this.cm.options.gutters.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Rl(t,e.anchorNode,e.anchorOffset),n=Rl(t,e.focusNode,e.focusOffset);r&&n&&Yn(t,function(){_i(t.doc,wi(r,n),V),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},El.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),l=o.from(),s=o.to();if(0==l.ch&&l.line>n.firstLine()&&(l=ve(l.line-1,ae(n.doc,l.line-1).length)),s.ch==ae(n.doc,s.line).text.length&&s.line<n.lastLine()&&(s=ve(s.line+1,0)),l.line<i.viewFrom||s.line>i.viewTo-1)return!1;l.line==i.viewFrom||0==(e=an(n,l.line))?(t=fe(i.view[0].line),r=i.view[0].node):(t=fe(i.view[e].line),r=i.view[e-1].node.nextSibling);var a,u,c=an(n,s.line);if(c==i.view.length-1?(a=i.viewTo-1,u=i.lineDiv.lastChild):(a=fe(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var h=n.doc.splitLines(function(e,t,r,n,i){var o="",l=!1,s=e.doc.lineSeparator();function a(){l&&(o+=s,l=!1)}function u(e){e&&(a(),o+=e)}function c(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void u(r||t.textContent.replace(/\u200b/g,""));var o,h=t.getAttribute("cm-marker");if(h){var f=e.findMarks(ve(n,0),ve(i+1,0),(g=+h,function(e){return e.id==g}));return void(f.length&&(o=f[0].find(0))&&u(ue(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var d=/^(pre|div|p)$/i.test(t.nodeName);d&&a();for(var p=0;p<t.childNodes.length;p++)c(t.childNodes[p]);d&&(l=!0)}else 3==t.nodeType&&u(t.nodeValue);var g}for(;c(t),t!=r;)t=t.nextSibling;return o}(n,r,u,t,a)),f=ue(n.doc,ve(t,0),ve(a,ae(n.doc,a).text.length));h.length>1&&f.length>1;)if(q(h)==q(f))h.pop(),f.pop(),a--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}for(var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);d<m&&g.charCodeAt(d)==v.charCodeAt(d);)++d;for(var y=q(h),b=q(f),w=Math.min(y.length-(1==h.length?d:0),b.length-(1==f.length?d:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==h.length&&1==f.length&&t==l.line)for(;d&&d>l.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=ve(t,d),C=ve(a,f.length?q(f).length-p:0);return h.length>1||h[0]||me(x,C)?(uo(n.doc,h,x,C,"+input"),!0):void 0},El.prototype.ensurePolled=function(){this.forceCompositionEnd()},El.prototype.reset=function(){this.forceCompositionEnd()},El.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},El.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},El.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Yn(this.cm,function(){return Zn(e.cm)})},El.prototype.setUneditable=function(e){e.contentEditable="false"},El.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||_n(this.cm,Nl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},El.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},El.prototype.onContextMenu=function(){},El.prototype.resetPosition=function(){},El.prototype.needsContentAttribute=!0;var Gl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};Gl.prototype.init=function(e){var t=this,r=this,n=this.cm,i=this.wrapper=Hl(),o=this.textarea=i.firstChild;function a(e){if(!it(n,e)){if(n.somethingSelected())Ml({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Wl(n);Ml({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",o.value=t.text.join("\n"),P(o))}"cut"==e.type&&(n.state.cutIncoming=!0)}}e.wrapper.insertBefore(i,e.wrapper.firstChild),g&&(o.style.width="0px"),et(o,"input",function(){l&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),et(o,"paste",function(e){it(n,e)||Ol(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),et(o,"cut",a),et(o,"copy",a),et(e.scroller,"paste",function(t){xr(e,t)||it(n,t)||(n.state.pasteIncoming=!0,r.focus())}),et(e.lineSpace,"selectstart",function(t){xr(e,t)||at(t)}),et(o,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),et(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Gl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=cn(e);if(e.options.moveInputWithCursor){var i=Xr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},Gl.prototype.showSelection=function(e){var t=this.cm.display;N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Gl.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&P(this.textarea),l&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&s>=9&&(this.hasSelection=null))}},Gl.prototype.getField=function(){return this.textarea},Gl.prototype.supportsTouch=function(){return!1},Gl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},Gl.prototype.blur=function(){this.textarea.blur()},Gl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Gl.prototype.receivedFocus=function(){this.slowPoll()},Gl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Gl.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))})},Gl.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||xt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,u=Math.min(n.length,i.length);a<u&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return Yn(t,function(){Nl(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Gl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Gl.prototype.onKeyPress=function(){l&&s>=9&&(this.hasSelection=null),this.fastPoll()},Gl.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea,o=sn(r,e),u=n.scroller.scrollTop;if(o&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&_n(r,_i)(r.doc,wi(o),V);var c=i.style.cssText,f=t.wrapper.style.cssText;t.wrapper.style.cssText="position: absolute";var d,p=t.wrapper.getBoundingClientRect();if(i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a&&(d=window.scrollY),n.input.focus(),a&&window.scrollTo(null,d),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=!0,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&s>=9&&v(),S){ht(e);var g=function(){rt(window,"mouseup",g),setTimeout(m,20)};et(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=c,l&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart){(!l||l&&s<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?_n(r,ro)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},Gl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Gl.prototype.setUneditable=function(){},Gl.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=ml&&i(e,t,r)}:i)}e.defineOption=r,e.Init=ml,r("value","",function(e,t){return e.setValue(t)},!0),r("mode",null,function(e,t){e.doc.modeOption=t,ki(e)},!0),r("indentUnit",2,ki,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(e){Ti(e),Rr(e),Zn(e)},!0),r("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(ve(n,o))}n++});for(var i=r.length-1;i>=0;i--)uo(e.doc,t,r[i],ve(r[i].line,r[i].ch+t.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ml&&e.refresh()}),r("specialCharPlaceholder",Qt,function(e){return e.refresh()},!0),r("electricChars",!0),r("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",function(e){vl(e),wl(e)},!0),r("keyMap","default",function(e,t,r){var n=jo(t),i=r!=ml&&jo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Cl,!0),r("gutters",[],function(e){hi(e.options),wl(e)},!0),r("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?nn(e.display)+"px":"0",e.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(e){return En(e)},!0),r("scrollbarStyle","native",function(e){Rn(e),En(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),r("lineNumbers",!1,function(e){hi(e.options),wl(e)},!0),r("firstLineNumber",1,wl,!0),r("lineNumberFormatter",function(e){return e},wl,!0),r("showCursorWhenSelecting",!1,un,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("readOnly",!1,function(e,t){"nocursor"==t&&(yn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),r("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),r("dragDrop",!0,xl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,un,!0),r("singleCursorHeightPerLine",!0,un,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Ti,!0),r("addModeClass",!1,Ti,!0),r("pollInterval",100),r("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),r("historyEventDelay",1250),r("viewportMargin",10,function(e){return e.refresh()},!0),r("maxHighlightLength",1e4,Ti,!0),r("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),r("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),r("autofocus",null),r("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Sl),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&_n(this,t[e])(this,r,i),nt(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](jo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:qn(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,Zn(this)}),removeOverlay:qn(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Zn(this)}}),indentLine:qn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),pe(this.doc,e)&&kl(this,e,t,r)}),indentSelection:qn(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(kl(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Tn(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a<r;++a)kl(this,a,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[n].from().ch>0&&ji(this.doc,n,new yi(o,u[n].to()),V)}}}),getTokenAt:function(e,t){return Vt(this,e,t)},getLineTokens:function(e,t){return Vt(this,ve(e),t,!0)},getTokenTypeAt:function(e){e=Se(this.doc,e);var t,r=zt(this,ae(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]<o)){t=r[2*l+2];break}n=l+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var l=0;l<o[t].length;l++){var s=i[o[t][l]];s&&n.push(s)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var a=0;a<i._global.length;a++){var u=i._global[a];u.pred(o,this)&&-1==B(n,u.val)&&n.push(u.val)}return n},getStateAfter:function(e,t){var r=this.doc;return It(this,(e=Ce(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return Xr(this,null==e?r.head:"object"==typeof e?Se(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return jr(this,Se(this.doc,e),t||"page")},coordsChar:function(e,t){return qr(this,(e=Kr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Kr(this,{top:e,left:0},t||"page").top,de(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=ae(this.doc,e)}else n=e;return Vr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Xe(n):0)},defaultTextHeight:function(){return en(this.display)},defaultCharWidth:function(){return tn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,l,s,a=this.display,u=(e=Xr(this,Se(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==n)u=e.top;else if("above"==n||"near"==n){var h=Math.max(a.wrapper.clientHeight,this.doc.height),f=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),r&&(o=this,l={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=Ln(o,l)).scrollTop&&An(o,s.scrollTop),null!=s.scrollLeft&&Dn(o,s.scrollLeft))},triggerOnKeyDown:qn(ol),triggerOnKeyPress:qn(sl),triggerOnKeyUp:ll,triggerOnMouseDown:qn(hl),execCommand:function(e){if($o.hasOwnProperty(e))return $o[e].call(null,this)},triggerElectric:qn(function(e){Al(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=Se(this.doc,e),l=0;l<t&&!(o=Fl(this.doc,o,i,r,n)).hitSide;++l);return o},moveH:qn(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Fl(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},j)}),deleteH:qn(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Xo(this,function(r){var i=Fl(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var l=Se(this.doc,e),s=0;s<t;++s){var a=Xr(this,l,"div");if(null==o?o=a.left:a.left=o,(l=Pl(this,a,i,r)).hitSide)break}return l},moveV:qn(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(l){if(o)return e<0?l.from():l.to();var s=Xr(r,l.head,"div");null!=l.goalColumn&&(s.left=l.goalColumn),i.push(s.left);var a=Pl(r,s,e,t);return"page"==t&&l==n.sel.primary()&&kn(r,jr(r,a,"div").top-s.top),a},j),i.length)for(var l=0;l<n.sel.ranges.length;l++)n.sel.ranges[l].goalColumn=i[l]}),findWordAt:function(e){var t=ae(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),l=te(o,i)?function(e){return te(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};r>0&&l(t.charAt(r-1));)--r;for(;n<t.length&&l(t.charAt(n));)++n}return new yi(ve(e.line,r),ve(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?H(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),nt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==D()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:qn(function(e,t){Mn(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-kr(this)-this.display.barHeight,width:e.scrollWidth-kr(this)-this.display.barWidth,clientHeight:Mr(this),clientWidth:Tr(this)}},scrollIntoView:qn(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ve(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Nn(e),e.curOp.scrollToPos=t}(this,e):On(this,e.from,e.to,e.margin)}),setSize:qn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&Ir(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Qn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,nt(this,"refresh",this)}),operation:function(e){return Yn(this,e)},startOperation:function(){return Gn(this)},endOperation:function(){return Un(this)},refresh:qn(function(){var e=this.display.cachedTextHeight;Zn(this),this.curOp.forceUpdate=!0,Rr(this),Mn(this,this.doc.scrollLeft,this.doc.scrollTop),ai(this),(null==e||Math.abs(e-en(this.display))>.5)&&ln(this),nt(this,"refresh",this)}),swapDoc:qn(function(e){var t=this.doc;return t.cm=null,Ai(this,e),Rr(this),this.display.input.reset(),Mn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},st(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Sl);var Ul="iter insert remove copy getEditor constructor".split(" ");for(var Vl in To.prototype)To.prototype.hasOwnProperty(Vl)&&B(Ul,Vl)<0&&(Sl.prototype[Vl]=function(e){return function(){return e.apply(this.doc,arguments)}}(To.prototype[Vl]));return st(To),Sl.inputStyles={textarea:Gl,contenteditable:El},Sl.defineMode=function(e){Sl.defaults.mode||"null"==e||(Sl.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Lt[e]=t}.apply(this,arguments)},Sl.defineMIME=function(e,t){kt[e]=t},Sl.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Sl.defineMIME("text/plain","null"),Sl.defineExtension=function(e,t){Sl.prototype[e]=t},Sl.defineDocExtension=function(e,t){To.prototype[e]=t},Sl.fromTextArea=function(e,t){if((t=t?z(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=D();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(et(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(rt(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=Sl(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=rt,e.on=et,e.wheelEventPixels=gi,e.Doc=To,e.splitLines=wt,e.countColumn=I,e.findColumn=X,e.isWordChar=ee,e.Pass=U,e.signal=nt,e.Line=Xt,e.changeEnd=xi,e.scrollbarModel=In,e.Pos=ve,e.cmpPos=me,e.modes=Lt,e.mimeModes=kt,e.resolveMode=Tt,e.getMode=Mt,e.modeExtensions=Nt,e.extendMode=Ot,e.copyState=At,e.startState=Dt,e.innerMode=Wt,e.commands=$o,e.keyMap=Io,e.keyName=Ko,e.isModifierKey=Uo,e.lookupKey=Go,e.normalizeKeyMap=Bo,e.StringStream=Ht,e.SharedTextMarker=Co,e.TextMarker=wo,e.LineWidget=mo,e.e_preventDefault=at,e.e_stopPropagation=ut,e.e_stop=ht,e.addClass=H,e.contains=W,e.rmClass=T,e.keyNames=Fo}(Sl),Sl.version="5.32.0",Sl}); -/* Include script: codemirror */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,s=l&&(n?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),u=a&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),h=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=h&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(h=!1,a=!0);var C=y&&(u||h&&(null==x||x<12.11)),S=r||l&&s>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,T=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return M(e).appendChild(t)}function O(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function A(e,t,r,n){var i=O(e,t,r,n);return i.setAttribute("role","presentation"),i}function W(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function D(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function H(e,t){var r=e.className;L(t).test(r)||(e.className+=(r?" ":"")+t)}function F(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!L(r[n]).test(t)&&(t+=" "+r[n]);return t}k=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var P=function(e){e.select()};function E(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function I(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null};function B(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}R.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var G=30,U={toString:function(){return"CodeMirror.Pass"}},V={scroll:!1},K={origin:"*mouse"},j={origin:"+move"};function X(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Y=[""];function _(e){for(;Y.length<=e;)Y.push(q(Y)+" ");return Y[e]}function q(e){return e[e.length-1]}function $(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Z(){}function Q(e,t){var r;return Object.create?r=Object.create(e):(Z.prototype=e,r=new Z),t&&z(t,r),r}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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]/;function ie(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,r){for(;(r<0?t>0:t<e.length)&&ie(e.charAt(t));)t+=r;return t}function le(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function se(e,t,n){var i=this;this.input=n,i.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=A("div",null,"CodeMirror-code"),i.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=O("div",null,"CodeMirror-cursors"),i.measure=O("div",null,"CodeMirror-measure"),i.lineMeasure=O("div",null,"CodeMirror-measure"),i.lineSpace=A("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=A("div",[i.lineSpace],"CodeMirror-lines");i.mover=O("div",[o],null,"position: relative"),i.sizer=O("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=O("div",null,null,"position: absolute; height: "+G+"px; width: 1px;"),i.gutters=O("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=O("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=O("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),l&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),a||r&&m||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function ae(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function ue(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function ce(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function he(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function fe(e){if(null==e.parent)return null;for(var t=e.parent,r=B(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function de(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var l=0;l<e.lines.length;++l){var s=e.lines[l].height;if(t<s)break;t-=s}return r+l}function pe(e,t){return t>=e.first&&t<e.first+e.size}function ge(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ve(e,t,r){if(void 0===r&&(r=null),!(this instanceof ve))return new ve(e,t,r);this.line=e,this.ch=t,this.sticky=r}function me(e,t){return e.line-t.line||e.ch-t.ch}function ye(e,t){return e.sticky==t.sticky&&0==me(e,t)}function be(e){return ve(e.line,e.ch)}function we(e,t){return me(e,t)<0?t:e}function xe(e,t){return me(e,t)<0?e:t}function Ce(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Se(e,t){if(t.line<e.first)return ve(e.first,0);var r=e.first+e.size-1;return t.line>r?ve(r,ae(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?ve(e.line,t):r<0?ve(e.line,0):e}(t,ae(e,t.line).text.length)}function Le(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Se(e,t[n]);return r}var ke=!1,Te=!1;function Me(e,t,r){this.marker=e,this.from=t,this.to=r}function Ne(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Oe(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ae(e,t){if(t.full)return null;var r=pe(e,t.from.line)&&ae(e,t.from.line).markedSpans,n=pe(e,t.to.line)&&ae(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,l=0==me(t.from,t.to),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==l.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Me(l,o.from,s?null:o.to))}}return n}(r,i,l),a=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.to||(l.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Me(l,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,l),u=1==t.text.length,c=q(t.text).length+(u?i:0);if(s)for(var h=0;h<s.length;++h){var f=s[h];if(null==f.to){var d=Ne(a,f.marker);d?u&&(f.to=null==d.to?null:d.to+c):f.to=i}}if(a)for(var p=0;p<a.length;++p){var g=a[p];if(null!=g.to&&(g.to+=c),null==g.from)Ne(s,g.marker)||(g.from=c,u&&(s||(s=[])).push(g));else g.from+=c,u&&(s||(s=[])).push(g)}s&&(s=We(s)),a&&a!=s&&(a=We(a));var v=[s];if(!u){var m,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(m||(m=[])).push(new Me(s[b].marker,null,null));for(var w=0;w<y;++w)v.push(m);v.push(a)}return v}function We(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function De(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function He(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Fe(e){return e.inclusiveLeft?-1:0}function Pe(e){return e.inclusiveRight?1:0}function Ee(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=me(n.from,i.from)||Fe(e)-Fe(t);if(o)return-o;var l=me(n.to,i.to)||Pe(e)-Pe(t);return l||t.id-e.id}function ze(e,t){var r,n=Te&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Ee(r,i.marker)<0)&&(r=i.marker);return r}function Ie(e){return ze(e,!0)}function Re(e){return ze(e,!1)}function Be(e,t,r,n,i){var o=ae(e,t),l=Te&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var u=a.marker.find(0),c=me(u.from,r)||Fe(a.marker)-Fe(i),h=me(u.to,n)||Pe(a.marker)-Pe(i);if(!(c>=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?me(u.to,r)>=0:me(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?me(u.from,n)<=0:me(u.from,n)<0)))return!0}}}function Ge(e){for(var t;t=Ie(e);)e=t.find(-1,!0).line;return e}function Ue(e,t){var r=ae(e,t),n=Ge(r);return r==n?t:fe(n)}function Ve(e,t){if(t>e.lastLine())return t;var r,n=ae(e,t);if(!Ke(e,n))return t;for(;r=Re(n);)n=r.find(1,!0).line;return fe(n)+1}function Ke(e,t){var r=Te&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&je(e,t,n))return!0}}function je(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return je(e,n.line,Ne(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&je(e,t,i))return!0}function Xe(e){for(var t=0,r=(e=Ge(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var l=0;l<o.children.length;++l){var s=o.children[l];if(s==r)break;t+=s.height}return t}function Ye(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Ie(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=Re(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function _e(e){var t=e.display,r=e.doc;t.maxLine=ae(r,r.first),t.maxLineLength=Ye(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=Ye(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var qe=null;function $e(e,t,r){var n;qe=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:qe=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:qe=i)}return null!=n?n:qe}var Ze=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(a,u){var c="ltr"==u?"L":"R";if(0==a.length||"ltr"==u&&!r.test(a))return!1;for(var h,f=a.length,d=[],p=0;p<f;++p)d.push((h=a.charCodeAt(p))<=247?e.charAt(h):1424<=h&&h<=1524?"R":1536<=h&&h<=1785?t.charAt(h-1536):1774<=h&&h<=2220?"r":8192<=h&&h<=8203?"w":8204==h?"b":"L");for(var g=0,v=c;g<f;++g){var m=d[g];"m"==m?d[g]=v:v=m}for(var y=0,b=c;y<f;++y){var w=d[y];"1"==w&&"r"==b?d[y]="n":i.test(w)&&(b=w,"r"==w&&(d[y]="R"))}for(var x=1,C=d[0];x<f-1;++x){var S=d[x];"+"==S&&"1"==C&&"1"==d[x+1]?d[x]="1":","!=S||C!=d[x+1]||"1"!=C&&"n"!=C||(d[x]=C),C=S}for(var L=0;L<f;++L){var k=d[L];if(","==k)d[L]="N";else if("%"==k){var T=void 0;for(T=L+1;T<f&&"%"==d[T];++T);for(var M=L&&"!"==d[L-1]||T<f&&"1"==d[T]?"1":"N",N=L;N<T;++N)d[N]=M;L=T-1}}for(var O=0,A=c;O<f;++O){var W=d[O];"L"==A&&"1"==W?d[O]="L":i.test(W)&&(A=W)}for(var D=0;D<f;++D)if(n.test(d[D])){var H=void 0;for(H=D+1;H<f&&n.test(d[H]);++H);for(var F="L"==(D?d[D-1]:c),P=F==("L"==(H<f?d[H]:c))?F?"L":"R":c,E=D;E<H;++E)d[E]=P;D=H-1}for(var z,I=[],R=0;R<f;)if(o.test(d[R])){var B=R;for(++R;R<f&&o.test(d[R]);++R);I.push(new s(0,B,R))}else{var G=R,U=I.length;for(++R;R<f&&"L"!=d[R];++R);for(var V=G;V<R;)if(l.test(d[V])){G<V&&I.splice(U,0,new s(1,G,V));var K=V;for(++V;V<R&&l.test(d[V]);++V);I.splice(U,0,new s(2,K,V)),G=V}else++V;G<R&&I.splice(U,0,new s(1,G,R))}return"ltr"==u&&(1==I[0].level&&(z=a.match(/^\s+/))&&(I[0].from=z[0].length,I.unshift(new s(0,0,z[0].length))),1==q(I).level&&(z=a.match(/\s+$/))&&(q(I).to-=z[0].length,I.push(new s(0,f-z[0].length,f)))),"rtl"==u?I.reverse():I}}();function Qe(e,t){var r=e.order;return null==r&&(r=e.order=Ze(e.text,t)),r}var Je=[],et=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Je).concat(r)}};function tt(e,t){return e._handlers&&e._handlers[t]||Je}function rt(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=B(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function nt(e,t){var r=tt(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function it(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),nt(e,r||t.type,e,t),ct(t)||t.codemirrorIgnore}function ot(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==B(r,t[n])&&r.push(t[n])}function lt(e,t){return tt(e,t).length>0}function st(e){e.prototype.on=function(e,t){et(this,e,t)},e.prototype.off=function(e,t){rt(this,e,t)}}function at(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ut(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ct(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ht(e){at(e),ut(e)}function ft(e){return e.target||e.srcElement}function dt(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var pt,gt,vt=function(){if(l&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function mt(e){if(null==pt){var t=O("span","​");N(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(pt=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var r=pt?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function yt(e){if(null!=gt)return gt;var t=N(e,document.createTextNode("AخA")),r=k(t,0,1).getBoundingClientRect(),n=k(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(gt=n.right-r.right<3)}var bt,wt=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},xt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ct="oncopy"in(bt=O("div"))||(bt.setAttribute("oncopy","return;"),"function"==typeof bt.oncopy),St=null;var Lt={},kt={};function Tt(e){if("string"==typeof e&&kt.hasOwnProperty(e))e=kt[e];else if(e&&"string"==typeof e.name&&kt.hasOwnProperty(e.name)){var t=kt[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Tt("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Tt("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Mt(e,t){t=Tt(t);var r=Lt[t.name];if(!r)return Mt(e,"text/plain");var n=r(e,t);if(Nt.hasOwnProperty(t.name)){var i=Nt[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Nt={};function Ot(e,t){z(t,Nt.hasOwnProperty(e)?Nt[e]:Nt[e]={})}function At(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Wt(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Dt(e,t,r){return!e.startState||e.startState(t,r)}var Ht=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Ht.prototype.eol=function(){return this.pos>=this.string.length},Ht.prototype.sol=function(){return this.pos==this.lineStart},Ht.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ht.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ht.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ht.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ht.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ht.prototype.skipToEnd=function(){this.pos=this.string.length},Ht.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ht.prototype.backUp=function(e){this.pos-=e},Ht.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=I(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},Ht.prototype.indentation=function(){return I(this.string,null,this.tabSize)-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},Ht.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ht.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ht.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ht.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ht.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Ft=function(e,t){this.state=e,this.lookAhead=t},Pt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function Et(e,t,r,n){var i=[e.state.modeGen],o={};jt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],a=1,u=0;r.state=!0,jt(e,t.text,s.mode,r,function(e,t){for(var r=a;u<e;){var n=i[a];n>e&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;r<a;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}},o),r.state=l,r.baseTokens=null,r.baseTokenPos=1},a=0;a<e.state.overlays.length;++a)s(a);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function zt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=It(e,fe(t)),i=t.text.length>e.options.maxHighlightLength&&At(e.doc.mode,n.state),o=Et(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function It(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Pt(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=ae(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof Ft?u.lookAhead:0)<=o.modeFrontier))return s;var c=I(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}(e,t,r),l=o>n.first&&ae(n,o-1).stateAfter,s=l?Pt.fromSaved(n,l,o):new Pt(n,Dt(n.mode),o);return n.iter(o,t,function(r){Rt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function Rt(e,t,r,n){var i=e.doc.mode,o=new Ht(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&Bt(i,r.state);!o.eol();)Gt(i,o,r.state),o.start=o.pos}function Bt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Wt(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Gt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Wt(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}Pt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Pt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Pt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Pt.fromSaved=function(e,t,r){return t instanceof Ft?new Pt(e,At(e.mode,t.state),r,t.lookAhead):new Pt(e,At(e.mode,t),r)},Pt.prototype.save=function(e){var t=!1!==e?At(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ft(t,this.maxLookAhead):t};var Ut=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Vt(e,t,r,n){var i,o,l=e.doc,s=l.mode,a=ae(l,(t=Se(l,t)).line),u=It(e,t.line,r),c=new Ht(a.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=Gt(s,c,u.state),n&&o.push(new Ut(c,i,At(l.mode,u.state)));return n?o:new Ut(c,i,u.state)}function Kt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function jt(e,t,r,n,i,o,l){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,u=0,c=null,h=new Ht(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&Kt(Bt(r,n.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(s=!1,l&&Rt(e,t,n,h.pos),h.pos=t.length,a=null):a=Kt(Gt(r,h,n.state,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u<h.start;)i(u=Math.min(h.start,u+5e3),c);c=a}h.start=h.pos}for(;u<h.pos;){var p=Math.min(h.pos,u+5e3);i(p,c),u=p}}var Xt=function(e,t,r){this.text=e,He(this,t),this.height=r?r(this):1};function Yt(e){e.parent=null,De(e)}Xt.prototype.lineNo=function(){return fe(this)},st(Xt);var _t={},qt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?qt:_t;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var r=A("span",null,null,a?"padding-right: .1px":null),n={pre:A("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(l||a)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,s=void 0;n.pos=0,n.addToken=Jt,yt(e.display.measure)&&(s=Qe(o,e.doc.direction))&&(n.addToken=er(n.addToken,s)),n.map=[],rr(o,n,zt(e,o,t!=e.display.externalMeasured&&fe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=F(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=F(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(mt(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return nt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=F(n.pre.className,n.textClass||"")),n}function Qt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,r,n,i,o,a){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,h=e.cm.state.specialChars,f=!1;if(h.test(t)){u=document.createDocumentFragment();for(var d=0;;){h.lastIndex=d;var p=h.exec(t),g=p?p.index-d:t.length-d;if(g){var v=document.createTextNode(c.slice(d,d+g));l&&s<9?u.appendChild(O("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;d+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=u.appendChild(O("span",_(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((m=u.appendChild(O("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),l&&s<9?u.appendChild(O("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||i||f||a){var w=r||"";n&&(w+=n),i&&(w+=i);var x=O("span",[u],w,a);return o&&(x.title=o),e.content.appendChild(x)}e.content.appendChild(u)}}function er(e,t){return function(r,n,i,o,l,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,c=u+n.length;;){for(var h=void 0,f=0;f<t.length&&!((h=t[f]).to>u&&h.from<=u);f++);if(h.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,h.to-u),i,o,null,s,a),o=null,n=n.slice(h.to-u),u=h.to}}}function tr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=h=s="",f=null,m=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],C=x.marker;"bookmark"==C.type&&x.from==p&&C.widgetNode?y.push(C):x.from<=p&&(null==x.to||x.to>p||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!h&&(h=C.title),C.collapsed&&(!f||Ee(f.marker,C)<0)&&(f=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==m&&(u+=" "+b[S]);if(!f||f.from==p)for(var L=0;L<y.length;++L)tr(t,0,y[L]);if(f&&(f.from||0)==p){if(tr(t,(null==f.to?d+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=d)break;for(var k=Math.min(d,m);;){if(v){var T=p+v.length;if(!f){var M=T>k?v.slice(0,k-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",h,s)}if(T>=k){v=v.slice(k-p),p=k;break}p=T,c=""}v=i.slice(o,o=r[g++]),l=$t(r[g++],t.cm.options)}}else for(var N=1;N<r.length;N+=2)t.addToken(t,i.slice(o,o=r[N]),$t(r[N+1],t.cm.options))}function nr(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=Re(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?fe(q(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ke(e,t)}function ir(e,t,r){for(var n,i=[],o=t;o<r;o=n){var l=new nr(e.doc,ae(e.doc,o),o);n=o+l.size,i.push(l)}return i}var or=null;var lr=null;function sr(e,t){var r=tt(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);or?n=or.delayedCallbacks:lr?n=lr:(n=lr=[],setTimeout(ar,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},l=0;l<r.length;++l)o(l)}}function ar(){var e=lr;lr=null;for(var t=0;t<e.length;++t)e[t]()}function ur(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?fr(e,t):"gutter"==o?pr(e,t,r,n):"class"==o?dr(e,t):"widget"==o&&gr(e,t,n)}t.changes=null}function cr(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),l&&s<8&&(e.node.style.zIndex=2)),e.node}function hr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Zt(e,t)}function fr(e,t){var r=t.text.className,n=hr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,dr(e,t)):r&&(t.text.className=r)}function dr(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=cr(t);t.background=n.insertBefore(O("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?cr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function pr(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=cr(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=cr(t),s=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(O("div",ge(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a<e.options.gutters.length;++a){var u=e.options.gutters[a],c=o.hasOwnProperty(u)&&o[u];c&&s.appendChild(O("div",[c],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function gr(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);mr(e,t,r)}function vr(e,t,r,n){var i=hr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),dr(e,t),pr(e,t,r,n),mr(e,t,n),t.node}function mr(e,t,r){if(yr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)yr(e,t.rest[n],t,r,!1)}function yr(e,t,r,n,i){if(t.widgets)for(var o=cr(r),l=0,s=t.widgets;l<s.length;++l){var a=s[l],u=O("div",[a.node],"CodeMirror-linewidget");a.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),br(a,u,r,n),e.display.input.setUneditable(u),i&&a.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),sr(a,"redraw")}}function br(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function wr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!W(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),N(t.display.measure,O("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function xr(e,t){for(var r=ft(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Cr(e){return e.lineSpace.offsetTop}function Sr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Lr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=N(e.measure,O("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function kr(e){return G-e.display.nativeBarWidth}function Tr(e){return e.display.scroller.clientWidth-kr(e)-e.display.barWidth}function Mr(e){return e.display.scroller.clientHeight-kr(e)-e.display.barHeight}function Nr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(fe(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Or(e,t,r,n){return Dr(e,Wr(e,t),r,n)}function Ar(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[an(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Wr(e,t){var r=fe(t),n=Ar(e,r);n&&!n.text?n=null:n&&n.changes&&(ur(e,n,r,rn(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=fe(t=Ge(t)),n=e.display.externalMeasured=new nr(e.doc,t,r);n.lineN=r;var i=n.built=Zt(e,n);return n.text=i.pre,N(e.display.lineMeasure,i.pre),n}(e,t));var i=Nr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Dr(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(!function(e,t,r){var n=e.options.lineWrapping,i=n&&Tr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],u=l[s+1];Math.abs(a.bottom-u.bottom)>2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Pr(t.map,r,n),a=o.node,u=o.start,c=o.end,h=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){for(;u&&ie(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+c));)++c;if((i=l&&s<9&&0==u&&c==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Er(k(a,u,c).getClientRects(),n)).left||i.right||0==u)break;c=u,u-=1,h="right"}l&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=St)return St;var t=N(e,O("span","x")),r=t.getBoundingClientRect(),n=k(t,0,1).getBoundingClientRect();return St=Math.abs(r.left-n.left)>1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var d;u>0&&(h=n="right"),i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+tn(e.display),top:p.top,bottom:p.bottom}:Fr}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(m<y[b]);b++);var w=b?y[b-1]:0,x=y[b],C={left:("right"==h?i.right:i.left)-t.rect.left,right:("left"==h?i.left:i.right)-t.rect.left,top:w,bottom:x};i.left||i.right||(C.bogus=!0);e.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=v);return C}(e,t,r,n)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Hr,Fr={left:0,right:0,top:0,bottom:0};function Pr(e,t,r){for(var n,i,o,l,s,a,u=0;u<e.length;u+=3)if(s=e[u],a=e[u+1],t<s?(i=0,o=1,l="left"):t<a?o=(i=t-s)+1:(u==e.length-3||t==a&&e[u+3]>t)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],l="right";break}return{node:n,start:i,end:o,collapse:l,coverStart:s,coverEnd:a}}function Er(e,t){var r=Fr;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function zr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Ir(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)zr(e.display.view[t])}function Rr(e){Ir(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Br(){return c&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Gr(){return c&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ur(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=wr(e.widgets[r]));return t}function Vr(e,t,r,n,i){if(!i){var o=Ur(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var l=Xe(t);if("local"==n?l+=Cr(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==n?0:Gr());var a=s.left+("window"==n?0:Br());r.left+=a,r.right+=a}return r.top+=l,r.bottom+=l,r}function Kr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=Br(),i-=Gr();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:i-l.top}}function jr(e,t,r,n,i){return n||(n=ae(e.doc,t.line)),Vr(e,n,Or(e,n,t.ch,i),r)}function Xr(e,t,r,n,i,o){function l(t,l){var s=Dr(e,i,t,l?"right":"left",o);return l?s.left=s.right:s.right=s.left,Vr(e,n,s,r)}n=n||ae(e.doc,t.line),i||(i=Wr(e,n));var s=Qe(n,e.doc.direction),a=t.ch,u=t.sticky;if(a>=n.text.length?(a=n.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return l("before"==u?a-1:a,"before"==u);function c(e,t,r){return l(r?e-1:e,1==s[t].level!=r)}var h=$e(s,a,u),f=qe,d=c(a,h,"before"==u);return null!=f&&(d.other=c(a,f,"before"!=u)),d}function Yr(e,t){var r=0;t=Se(e.doc,t),e.options.lineWrapping||(r=tn(e.display)*t.ch);var n=ae(e.doc,t.line),i=Xe(n)+Cr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function _r(e,t,r,n,i){var o=ve(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function qr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return _r(n.first,0,null,!0,-1);var i=de(n,r),o=n.first+n.size-1;if(i>o)return _r(n.first+n.size-1,ae(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=ae(n,i);;){var s=Jr(e,l,i,t,r),a=Re(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=fe(l=u.to.line)}}function $r(e,t,r,n){n-=Ur(t);var i=t.text.length,o=le(function(t){return Dr(e,r,t-1).bottom<=n},i,0);return{begin:o,end:i=le(function(t){return Dr(e,r,t).top>n},o,i)}}function Zr(e,t,r,n){return r||(r=Wr(e,t)),$r(e,t,r,Vr(e,t,Dr(e,r,n),"line").top)}function Qr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Jr(e,t,r,n,i){i-=Xe(t);var o=Wr(e,t),l=Ur(t),s=0,a=t.text.length,u=!0,c=Qe(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?function(e,t,r,n,i,o,l){var s=$r(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f<i.length;f++){var d=i[f];if(!(d.from>=u||d.to<=a)){var p=1!=d.level,g=Dr(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=g<o?o-g+1e9:g-o;(!c||h>v)&&(c=d,h=v)}}c||(c=i[i.length-1]);c.from<a&&(c={from:a,to:c.to,level:c.level});c.to>u&&(c={from:c.from,to:u,level:c.level});return c}:function(e,t,r,n,i,o,l){var s=le(function(s){var a=i[s],u=1!=a.level;return Qr(Xr(e,ve(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=Xr(e,ve(r,u?a.from:a.to,u?"after":"before"),"line",t,n);Qr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a})(e,t,r,o,c,n,i);s=(u=1!=h.level)?h.from:h.to-1,a=u?h.to:h.from-1}var f,d,p=null,g=null,v=le(function(t){var r=Dr(e,o,t);return r.top+=l,r.bottom+=l,!!Qr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var y=n-g.left<g.right-n,b=y==u;v=p+(b?0:1),d=b?"after":"before",f=y?g.left:g.right}else{u||v!=a&&v!=s||v++,d=0==v?"after":v==t.text.length?"before":Dr(e,o,v-(u?1:0)).bottom+l<=i==u?"after":"before";var w=Xr(e,ve(r,v,d),"line",t,o);f=w.left,m=i<w.top||i>=w.bottom}return _r(r,v=oe(t.text,v,1),d,m,n-f)}function en(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hr){Hr=O("pre");for(var t=0;t<49;++t)Hr.appendChild(document.createTextNode("x")),Hr.appendChild(O("br"));Hr.appendChild(document.createTextNode("x"))}N(e.measure,Hr);var r=Hr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function tn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),r=O("pre",[t]);N(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function rn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:nn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function nn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function on(e){var t=en(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/tn(e.display)-3);return function(i){if(Ke(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function ln(e){var t=e.doc,r=on(e);t.iter(function(e){var t=r(e);t!=e.height&&he(e,t)})}function sn(e,t,r,n){var i=e.display;if(!r&&"true"==ft(t).getAttribute("cm-not-content"))return null;var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(t){return null}var a,u=qr(e,o,l);if(n&&1==u.xRel&&(a=ae(e.doc,u.line).text).length==u.ch){var c=I(a,a.length,e.options.tabSize)-a.length;u=ve(u.line,Math.max(0,Math.round((o-Lr(e.display).left)/tn(e.display))-c))}return u}function an(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function un(e){e.display.input.showSelection(e.display.input.prepareSelection())}function cn(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var s=r.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var a=s.empty();(a||e.options.showCursorWhenSelecting)&&hn(e,s.head,i),a||dn(e,s,o)}}return n}function hn(e,t,r){var n=Xr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(O("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function fn(e,t){return e.top-t.top||e.left-t.left}function dn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=Lr(e.display),s=l.left,a=Math.max(n.sizerWidth,Tr(e)-n.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?a-e:r)+"px;\n height: "+(n-t)+"px"))}function h(t,r,n){var o,l,h=ae(i,t),f=h.text.length;function d(r,n){return jr(e,ve(t,r),"div",h,n)}function p(t,r,n){var i=Zr(e,h,null,t),o="ltr"==r==("after"==n)?"left":"right";return d("after"==n?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1),o)[o]}var g=Qe(h,i.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<r&&l.to>t||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(g,r||0,null==n?f:n,function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?w:b)&&C,L=(u?b:w)&&x?s:(v?m:y).left,k=S?a:(v?y:m).right;c(L,m.top,k-L,m.bottom)}else{var T,M,N,O;v?(T=u&&b&&x?s:m.left,M=u?a:p(e,i,"before"),N=u?s:p(t,i,"after"),O=u&&w&&C?a:y.right):(T=u?p(e,i,"before"):s,M=!u&&b&&x?a:m.right,N=!u&&w&&C?s:y.left,O=u?p(t,i,"after"):a),c(T,m.top,M-T,m.bottom),m.bottom<y.top&&c(s,m.bottom,null,y.top),c(N,y.top,O-N,y.bottom)}(!o||fn(m,o)<0)&&(o=m),fn(y,o)<0&&(o=y),(!l||fn(m,l)<0)&&(l=m),fn(y,l)<0&&(l=y)}),{start:o,end:l}}var f=t.from(),d=t.to();if(f.line==d.line)h(f.line,f.ch,d.ch);else{var p=ae(i,f.line),g=ae(i,d.line),v=Ge(p)==Ge(g),m=h(f.line,f.ch,v?p.text.length+1:null).end,y=h(d.line,v?0:null,d.ch).start;v&&(m.top<y.top-2?(c(m.right,m.top,null,m.bottom),c(s,y.top,y.left,y.bottom)):c(m.right,m.top,y.left-m.right,m.bottom)),m.bottom<y.top&&c(s,m.bottom,null,y.top)}r.appendChild(o)}function pn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function gn(e){e.state.focused||(e.display.input.focus(),mn(e))}function vn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yn(e))},100)}function mn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(nt(e,"focus",e,t),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),pn(e))}function yn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(nt(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function bn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(l&&s<8){var a=i.node.offsetTop+i.node.offsetHeight;o=a-r,r=a}else{var u=i.node.getBoundingClientRect();o=u.bottom-u.top}var c=i.line.height-o;if(o<2&&(o=en(t)),(c>.005||c<-.005)&&(he(i.line,o),wn(i.line),i.rest))for(var h=0;h<i.rest.length;h++)wn(i.rest[h])}}}function wn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function xn(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Cr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=de(t,n),l=de(t,i);if(r&&r.ensure){var s=r.ensure.from.line,a=r.ensure.to.line;s<o?(o=s,l=de(t,Xe(ae(t,s))+e.wrapper.clientHeight)):Math.min(a,t.lastLine())>=l&&(o=de(t,Xe(ae(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Cn(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=nn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l<r.length;l++)if(!r[l].hidden){e.options.fixedGutter&&(r[l].gutter&&(r[l].gutter.style.left=o),r[l].gutterBackground&&(r[l].gutterBackground.style.left=o));var s=r[l].alignable;if(s)for(var a=0;a<s.length;a++)s[a].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Sn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=ge(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(O("div",[O("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ai(e),!0}return!1}function Ln(e,t){var r=e.display,n=en(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Mr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Sr(r),a=t.top<n,u=t.bottom>s-n;if(t.top<i)l.scrollTop=a?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=Tr(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>f;return d&&(t.right=t.left+f),t.left<10?l.scrollLeft=0:t.left<h?l.scrollLeft=Math.max(0,t.left-(d?0:10)):t.right>f+h-3&&(l.scrollLeft=t.right+(d?0:10)-f),l}function kn(e,t){null!=t&&(Nn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Tn(e){Nn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Mn(e,t,r){null==t&&null==r||Nn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Nn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,On(e,Yr(e,t.from),Yr(e,t.to),t.margin))}function On(e,t,r,n){var i=Ln(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Mn(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||si(e,{top:t}),Wn(e,t,!0),r&&si(e),ri(e,100))}function Wn(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Dn(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Cn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Hn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Sr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Fn=function(e,t,r){this.cm=r;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(n),e(i),et(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),et(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Fn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fn.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},Fn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)})},Fn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Pn=function(){};function En(e,t){t||(t=Hn(e));var r=e.display.barWidth,n=e.display.barHeight;zn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&bn(e),zn(e,Hn(e)),r=e.display.barWidth,n=e.display.barHeight}function zn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}Pn.prototype.update=function(){return{bottom:0,right:0}},Pn.prototype.setScrollLeft=function(){},Pn.prototype.setScrollTop=function(){},Pn.prototype.clear=function(){};var In={native:Fn,null:Pn};function Rn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new In[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),et(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Dn(e,t):An(e,t)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var Bn=0;function Gn(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Bn},t=e.curOp,or?or.ops.push(t):t.ownsGroup=or={ops:[t],delayedCallbacks:[]}}function Un(e){!function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}(r)}finally{or=null,t(r)}}(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)Vn(t[r]);for(var n=0;n<t.length;n++)(i=t[n]).updatedDisplay=i.mustUpdate&&oi(i.cm,i.update);var i;for(var o=0;o<t.length;o++)Kn(t[o]);for(var l=0;l<t.length;l++)jn(t[l]);for(var s=0;s<t.length;s++)Xn(t[s])}(e)})}function Vn(e){var t=e.cm,r=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=kr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=kr(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&_e(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Kn(e){var t=e.cm,r=t.display;e.updatedDisplay&&bn(t),e.barMeasure=Hn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Or(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function jn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Dn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==D();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&En(t,e.barMeasure),e.updatedDisplay&&ui(t,e.barMeasure),e.selectionChanged&&pn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&gn(e.cm)}function Xn(e){var t=e.cm,r=t.display,n=t.doc;(e.updatedDisplay&&li(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Wn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Dn(t,e.scrollLeft,!0,!0),e.scrollToPos)&&function(e,t){if(!it(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=O("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Cr(e.display))+"px;\n height: "+(t.bottom-t.top+kr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?ve(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ve(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=Xr(e,t),a=r&&r!=t?Xr(e,r):s,u=Ln(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(An(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Dn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}(t,Se(n,e.scrollToPos.from),Se(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||nt(i[l],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&nt(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&nt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Yn(e,t){if(e.curOp)return t();Gn(e);try{return t()}finally{Un(e)}}function _n(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Gn(e);try{return t.apply(e,arguments)}finally{Un(e)}}}function qn(e){return function(){if(this.curOp)return e.apply(this,arguments);Gn(this);try{return e.apply(this,arguments)}finally{Un(this)}}}function $n(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Gn(t);try{return e.apply(this,arguments)}finally{Un(t)}}}function Zn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Te&&Ue(e.doc,t)<i.viewTo&&Jn(e);else if(r<=i.viewFrom)Te&&Ve(e.doc,r+n)>i.viewFrom?Jn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Jn(e);else if(t<=i.viewFrom){var o=ei(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Jn(e)}else if(r>=i.viewTo){var l=ei(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Jn(e)}else{var s=ei(e,t,t,-1),a=ei(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(ir(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):Jn(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function Qn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[an(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function Jn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ei(e,t,r,n){var i,o=an(e,t),l=e.display.view;if(!Te||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a<o;a++)s+=l[a].size;if(s!=t){if(n>0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;Ue(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function ti(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,E(ni,e))}function ni(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=It(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?At(t.mode,n.state):null,a=Et(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&f<l.length;++f)h=l[f]!=o.styles[f];h&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Rt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ri(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Yn(e,function(){for(var t=0;t<i.length;t++)Qn(e,i[t],"text")})}}var ii=function(e,t,r){var n=e.display;this.viewport=t,this.visible=xn(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Tr(e),this.force=r,this.dims=rn(e),this.events=[]};function oi(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Jn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==ti(e))return!1;Sn(e)&&(Jn(e),t.dims=rn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>l&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Te&&(o=Ue(e.doc,o),l=Ve(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=ir(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ir(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(an(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(ir(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,an(e,r)))),n.viewTo=r}(e,o,l),r.viewOffset=Xe(ae(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=ti(e);if(!s&&0==u&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=D();if(!t||!W(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&W(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return u>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function s(t){var r=t.nextSibling;return a&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,h=0;h<u.length;h++){var f=u[h];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;l!=f.node;)l=s(l);var d=i&&null!=t&&t<=c&&f.lineNumber;f.changes&&(B(f.changes,"gutter")>-1&&(d=!1),ur(e,f,c,r)),d&&(M(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ge(e.options,c)))),l=f.node.nextSibling}else{var p=vr(e,f,c,r);o.insertBefore(p,l)}c+=f.size}for(;l;)l=s(l)}(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=D()&&(e.activeElt.focus(),e.anchorNode&&W(document.body,e.anchorNode)&&W(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(c),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ri(e,400)),r.updateLineNumbers=null,!0}function li(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Tr(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Sr(e.display)-Mr(e),r.top)}),t.visible=xn(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&oi(e,t);n=!1){bn(e);var i=Hn(e);un(e),En(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function si(e,t){var r=new ii(e,t);if(oi(e,r)){bn(e),li(e,r);var n=Hn(e);un(e),En(e,n),ui(e,n),r.finish()}}function ai(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+kr(e)+"px"}function ci(e){var t=e.display.gutters,r=e.options.gutters;M(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(O("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",ai(e)}function hi(e){var t=B(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}ii.prototype.signal=function(e,t){lt(e,t)&&this.events.push(arguments)},ii.prototype.finish=function(){for(var e=0;e<this.events.length;e++)nt.apply(null,this.events[e])};var fi=0,di=null;function pi(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function gi(e){var t=pi(e);return t.x*=di,t.y*=di,t}function vi(e,t){var n=pi(t),i=n.x,o=n.y,l=e.display,s=l.scroller,u=s.scrollWidth>s.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&y&&a)e:for(var f=t.target,d=l.view;f!=s;f=f.parentNode)for(var p=0;p<d.length;p++)if(d[p].node==f){e.display.currentWheelTarget=f;break e}if(i&&!r&&!h&&null!=di)return o&&c&&An(e,Math.max(0,s.scrollTop+o*di)),Dn(e,Math.max(0,s.scrollLeft+i*di)),(!o||o&&c)&&at(t),void(l.wheelStartX=null);if(o&&null!=di){var g=o*di,v=e.doc.scrollTop,m=v+l.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):m=Math.min(e.doc.height,m+g+50),si(e,{top:v,bottom:m})}fi<20&&(null==l.wheelStartX?(l.wheelStartX=s.scrollLeft,l.wheelStartY=s.scrollTop,l.wheelDX=i,l.wheelDY=o,setTimeout(function(){if(null!=l.wheelStartX){var e=s.scrollLeft-l.wheelStartX,t=s.scrollTop-l.wheelStartY,r=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,r&&(di=(di*fi+r)/(fi+1),++fi)}},200)):(l.wheelDX+=i,l.wheelDY+=o))}}l?di=-.53:r?di=15:c?di=-.7:f&&(di=-1/3);var mi=function(e,t){this.ranges=e,this.primIndex=t};mi.prototype.primary=function(){return this.ranges[this.primIndex]},mi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!ye(r.anchor,n.anchor)||!ye(r.head,n.head))return!1}return!0},mi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new yi(be(this.ranges[t].anchor),be(this.ranges[t].head));return new mi(e,this.primIndex)},mi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},mi.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(me(t,n.from())>=0&&me(e,n.to())<=0)return r}return-1};var yi=function(e,t){this.anchor=e,this.head=t};function bi(e,t){var r=e[t];e.sort(function(e,t){return me(e.from(),t.from())}),t=B(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(me(o.to(),i.from())>=0){var l=xe(o.from(),i.from()),s=we(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new yi(a?s:l,a?l:s))}}return new mi(e,t)}function wi(e,t){return new mi([new yi(e,t||e)],0)}function xi(e){return e.text?ve(e.from.line+e.text.length-1,q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ci(e,t){if(me(e,t.from)<0)return e;if(me(e,t.to)<=0)return xi(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=xi(t).ch-t.to.ch),ve(r,n)}function Si(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new yi(Ci(i.anchor,t),Ci(i.head,t)))}return bi(r,e.sel.primIndex)}function Li(e,t,r){return e.line==t.line?ve(r.line,e.ch-t.ch+r.ch):ve(r.line+(e.line-t.line),e.ch)}function ki(e){e.doc.mode=Mt(e.options,e.doc.modeOption),Ti(e)}function Ti(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ri(e,100),e.state.modeGen++,e.curOp&&Zn(e)}function Mi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==q(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ni(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),De(e),He(e,r);var i=n?n(e):1;i!=e.height&&he(e,i)}(e,r,i,n),sr(e,"change",e,t)}function l(e,t){for(var r=[],o=e;o<t;++o)r.push(new Xt(u[o],i(o),n));return r}var s=t.from,a=t.to,u=t.text,c=ae(e,s.line),h=ae(e,a.line),f=q(u),d=i(u.length-1),p=a.line-s.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(Mi(e,t)){var g=l(0,u.length-1);o(h,h.text,d),p&&e.remove(s.line,p),g.length&&e.insert(s.line,g)}else if(c==h)if(1==u.length)o(c,c.text.slice(0,s.ch)+f+c.text.slice(a.ch),d);else{var v=l(1,u.length-1);v.push(new Xt(f+c.text.slice(a.ch),d,n)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,v)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+h.text.slice(a.ch),i(0)),e.remove(s.line+1,p);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(h,f+h.text.slice(a.ch),d);var m=l(1,u.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,m)}sr(e,"change",e,t)}function Oi(e,t,r){!function e(n,i,o){if(n.linked)for(var l=0;l<n.linked.length;++l){var s=n.linked[l];if(s.doc!=i){var a=o&&s.sharedHist;r&&!a||(t(s.doc,a),e(s.doc,n,a))}}}(e,null,!0)}function Ai(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ln(e),ki(e),Wi(e),e.options.lineWrapping||_e(e),e.options.mode=t.modeOption,Zn(e)}function Wi(e){("rtl"==e.doc.direction?H:T)(e.display.lineDiv,"CodeMirror-rtl")}function Di(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Hi(e,t){var r={from:be(t.from),to:xi(t),text:ue(e,t.from,t.to)};return Ii(e,r,t.from.line,t.to.line+1),Oi(e,function(e){return Ii(e,r,t.from.line,t.to.line+1)},!0),r}function Fi(e){for(;e.length;){if(!q(e).ranges)break;e.pop()}}function Pi(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Fi(e.done),q(e.done)):e.done.length&&!q(e.done).ranges?q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),q(e.done)):void 0}(i,i.lastOp==n)))l=q(o.changes),0==me(t.from,t.to)&&0==me(t.from,l.to)?l.to=xi(t):o.changes.push(Hi(e,t));else{var a=q(i.done);for(a&&a.ranges||zi(e.sel,i.done),o={changes:[Hi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||nt(e,"historyAdded")}function Ei(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,q(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Fi(i.undone)}function zi(e,t){var r=q(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ii(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function Ri(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Bi(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Ri(r[i]));return n}(e,t),n=Ae(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],l=n[i];if(o&&l)e:for(var s=0;s<l.length;++s){for(var a=l[s],u=0;u<o.length;++u)if(o[u].marker==a.marker)continue e;o.push(a)}else l&&(r[i]=l)}return r}function Gi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?mi.prototype.deepCopy.call(o):o);else{var l=o.changes,s=[];n.push({changes:s});for(var a=0;a<l.length;++a){var u=l[a],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var h in u)(c=h.match(/^spans_(\d+)$/))&&B(t,Number(c[1]))>-1&&(q(s)[h]=u[h],delete u[h])}}}return n}function Ui(e,t,r,n){if(n){var i=e.anchor;if(r){var o=me(t,i)<0;o!=me(r,i)<0?(i=t,t=r):o!=me(t,r)<0&&(t=r)}return new yi(i,t)}return new yi(r||t,t)}function Vi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),_i(e,new mi([Ui(e.sel.primary(),t,r,i)],0),n)}function Ki(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Ui(e.sel.ranges[o],t[o],null,i);_i(e,bi(n,e.sel.primIndex),r)}function ji(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,_i(e,bi(i,e.sel.primIndex),n)}function Xi(e,t,r,n){_i(e,wi(t,r),n)}function Yi(e,t,r){var n=e.history.done,i=q(n);i&&i.ranges?(n[n.length-1]=t,qi(e,t,r)):_i(e,t,r)}function _i(e,t,r){qi(e,t,r),Ei(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function qi(e,t,r){(lt(e,"beforeSelectionChange")||e.cm&&lt(e.cm,"beforeSelectionChange"))&&(t=function(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new yi(Se(e,t[r].anchor),Se(e,t[r].head))},origin:r&&r.origin};return nt(e,"beforeSelectionChange",e,n),e.cm&&nt(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?bi(n.ranges,n.ranges.length-1):t}(e,t,r));var n=r&&r.bias||(me(t.primary().head,e.sel.primary().head)<0?-1:1);$i(e,Qi(e,t,n,!0)),r&&!1===r.scroll||!e.cm||Tn(e.cm)}function $i(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,ot(e.cm)),sr(e,"cursorActivity",e))}function Zi(e){$i(e,Qi(e,e.sel,null,!1))}function Qi(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],a=eo(e,l.anchor,s&&s.anchor,r,n),u=eo(e,l.head,s&&s.head,r,n);(i||a!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new yi(a,u))}return i?bi(i,t.primIndex):t}function Ji(e,t,r,n,i){var o=ae(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var s=o.markedSpans[l],a=s.marker;if((null==s.from||(a.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(a.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(nt(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=to(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=me(u,r))&&(n<0?c<0:c>0))return Ji(e,u,t,n,i)}var h=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(h=to(e,h,n,h.line==t.line?o:null)),h?Ji(e,h,t,n,i):null}}return t}function eo(e,t,r,n,i){var o=n||1,l=Ji(e,t,r,o,i)||!i&&Ji(e,t,r,o,!0)||Ji(e,t,r,-o,i)||!i&&Ji(e,t,r,-o,!0);return l||(e.cantEdit=!0,ve(e.first,0))}function to(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?Se(e,ve(t.line-1)):null:r>0&&t.ch==(n||ae(e,t.line)).text.length?t.line<e.first+e.size-1?ve(t.line+1,0):null:new ve(t.line,t.ch+r)}function ro(e){e.setSelection(ve(e.firstLine(),0),ve(e.lastLine()),V)}function no(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=Se(e,t)),r&&(n.to=Se(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),nt(e,"beforeChange",e,n),e.cm&&nt(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function io(e,t,r){if(e.cm){if(!e.cm.curOp)return _n(e.cm,io)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(lt(e,"beforeChange")||e.cm&&lt(e.cm,"beforeChange"))||(t=no(e,t,!0))){var n=ke&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=B(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var l=n[o],s=l.find(0),a=0;a<i.length;++a){var u=i[a];if(!(me(u.to,s.from)<0||me(u.from,s.to)>0)){var c=[a,1],h=me(u.from,s.from),f=me(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)oo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else oo(e,t)}}function oo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=me(t.from,t.to)){var r=Si(e,t);Pi(e,t,r,e.cm?e.cm.curOp.id:NaN),ao(e,t,r,Ae(e,t));var n=[];Oi(e,function(e,r){r||-1!=B(n,e.history)||(fo(e.history,t),n.push(e.history)),ao(e,t,null,Ae(e,t))})}}function lo(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a<l.length&&(n=l[a],r?!n.ranges||n.equals(e.sel):n.ranges);a++);if(a!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;(n=l.pop()).ranges;){if(zi(n,s),r&&!n.equals(e.sel))return void _i(e,n,{clearRedo:!1});o=n}var u=[];zi(o,s),s.push({changes:u,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var c=lt(e,"beforeChange")||e.cm&&lt(e.cm,"beforeChange"),h=function(r){var i=n.changes[r];if(i.origin=t,c&&!no(e,i,!1))return l.length=0,{};u.push(Hi(e,i));var o=r?Si(e,i):q(l);ao(e,i,o,Bi(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:xi(i)});var s=[];Oi(e,function(e,t){t||-1!=B(s,e.history)||(fo(e.history,i),s.push(e.history)),ao(e,i,null,Bi(e,i))})},f=n.changes.length-1;f>=0;--f){var d=h(f);if(d)return d.v}}}}function so(e,t){if(0!=t&&(e.first+=t,e.sel=new mi($(e.sel.ranges,function(e){return new yi(ve(e.anchor.line+t,e.anchor.ch),ve(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Zn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Qn(e.cm,n,"gutter")}}function ao(e,t,r,n){if(e.cm&&!e.cm.curOp)return _n(e.cm,ao)(e,t,r,n);if(t.to.line<e.first)so(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);so(e,i),t={from:ve(e.first,0),to:ve(t.to.line+i,t.to.ch),text:[q(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ve(o,ae(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ue(e,t.from,t.to),r||(r=Si(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=fe(Ge(ae(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0}));n.sel.contains(t.from,t.to)>-1&&ot(e);Ni(n,t,r,on(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=Ye(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=ae(e,n).stateAfter;if(i&&(!(i instanceof Ft)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}})(n,o.line),ri(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?Zn(e):o.line!=l.line||1!=t.text.length||Mi(e.doc,t)?Zn(e,o.line,l.line+1,u):Qn(e,o.line,"text");var c=lt(e,"changes"),h=lt(e,"change");if(h||c){var f={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};h&&sr(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,n):Ni(e,t,n),qi(e,r,V)}}function uo(e,t,r,n,i){var o;(n||(n=r),me(n,r)<0)&&(r=(o=[n,r])[0],n=o[1]);"string"==typeof t&&(t=e.splitLines(t)),io(e,{from:r,to:n,text:t,origin:i})}function co(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ho(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)co(o.ranges[s].anchor,t,r,n),co(o.ranges[s].head,t,r,n)}else{for(var a=0;a<o.changes.length;++a){var u=o.changes[a];if(r<u.from.line)u.from=ve(u.from.line+n,u.from.ch),u.to=ve(u.to.line+n,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function fo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;ho(e.done,r,n,i),ho(e.undone,r,n,i)}function po(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=ae(e,Ce(e,t)):i=fe(t),null==i?null:(n(o,i)&&e.cm&&Qn(e.cm,i,r),o)}function go(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function vo(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}yi.prototype.from=function(){return xe(this.anchor,this.head)},yi.prototype.to=function(){return we(this.anchor,this.head)},yi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},go.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Yt(i),sr(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},vo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),l=n.height;if(n.removeInner(e,o),this.height-=l-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof go))){var s=[];this.collapse(s),this.children=[new go(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,s=l;s<i.lines.length;){var a=new go(i.lines.slice(s,s+=25));i.height-=a.height,this.children.splice(++n,0,a),a.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new vo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=B(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new vo(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=o}}};var mo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function yo(e,t,r){Xe(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&kn(e,r)}mo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=fe(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=wr(this);he(r,Math.max(0,r.height-o)),e&&(Yn(e,function(){yo(e,r,-o),Qn(e,n,"widget")}),sr(e,"lineWidgetCleared",e,this,n))}},mo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=wr(this)-t;i&&(he(n,n.height+i),r&&Yn(r,function(){r.curOp.forceUpdate=!0,yo(r,n,i),sr(r,"lineWidgetChanged",r,e,fe(n))}))},st(mo);var bo=0,wo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++bo};function xo(e,t,r,n,i){if(n&&n.shared)return function(e,t,r,n,i){(n=z(n)).shared=!1;var o=[xo(e,t,r,n,i)],l=o[0],s=n.widgetNode;return Oi(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(xo(e,Se(e,t),Se(e,r),n,i));for(var a=0;a<e.linked.length;++a)if(e.linked[a].isParent)return;l=q(o)}),new Co(o,l)}(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return _n(e.cm,xo)(e,t,r,n,i);var o=new wo(e,i),l=me(t,r);if(n&&z(n,o,!1),l>0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Be(e,t.line,t,r,o)||t.line!=r.line&&Be(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Te=!0}o.addToHistory&&Pi(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,r.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&Ge(e)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&he(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Me(o,a==t.line?t.ch:null,a==r.line?r.ch:null)),++a}),o.collapsed&&e.iter(t.line,r.line+1,function(t){Ke(e,t)&&he(t,0)}),o.clearOnEnter&&et(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(ke=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++bo,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Zn(u,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=r.line;c++)Qn(u,c,"text");o.atomic&&Zi(u.doc),sr(u,"markerAdded",u,o)}return o}wo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gn(e),lt(this,"clear")){var r=this.find();r&&sr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],s=Ne(l.markedSpans,this);e&&!this.collapsed?Qn(e,fe(l),"text"):e&&(null!=s.to&&(i=fe(l)),null!=s.from&&(n=fe(l))),l.markedSpans=Oe(l.markedSpans,s),null==s.from&&this.collapsed&&!Ke(this.doc,l)&&e&&he(l,en(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var a=0;a<this.lines.length;++a){var u=Ge(this.lines[a]),c=Ye(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Zn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Zi(e.doc)),e&&sr(e,"markerCleared",e,this,n,i),t&&Un(e),this.parent&&this.parent.clear()}},wo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],l=Ne(o.markedSpans,this);if(null!=l.from&&(r=ve(t?o:fe(o),l.from),-1==e))return r;if(null!=l.to&&(n=ve(t?o:fe(o),l.to),1==e))return n}return r&&{from:r,to:n}},wo.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&Yn(n,function(){var i=t.line,o=fe(t.line),l=Ar(n,o);if(l&&(zr(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ke(r.doc,i)&&null!=r.height){var s=r.height;r.height=null;var a=wr(r)-s;a&&he(i,i.height+a)}sr(n,"markerChanged",n,e)})},wo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=B(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},wo.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},st(wo);var Co=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function So(e){return e.findMarks(ve(e.first,0),e.clipPos(ve(e.lastLine())),function(e){return e.parent})}function Lo(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];Oi(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==B(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}Co.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();sr(this,"clear")}},Co.prototype.find=function(e,t){return this.primary.find(e,t)},st(Co);var ko=0,To=function(e,t,r,n,i){if(!(this instanceof To))return new To(e,t,r,n,i);null==r&&(r=0),vo.call(this,[new go([new Xt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=ve(r,0);this.sel=wi(o),this.history=new Di(null),this.id=++ko,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ni(this,{from:o,to:o,text:e}),_i(this,wi(o),V)};To.prototype=Q(vo.prototype,{constructor:To,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ce(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:$n(function(e){var t=ve(this.first,0),r=this.first+this.size-1;io(this,{from:t,to:ve(r,ae(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Mn(this.cm,0,0),_i(this,wi(t),V)}),replaceRange:function(e,t,r,n){uo(this,e,t=Se(this,t),r=r?Se(this,r):t,n)},getRange:function(e,t,r){var n=ue(this,Se(this,e),Se(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(pe(this,e))return ae(this,e)},getLineNumber:function(e){return fe(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=ae(this,e)),Ge(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Se(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:$n(function(e,t,r){Xi(this,Se(this,"number"==typeof e?ve(e,t||0):e),null,r)}),setSelection:$n(function(e,t,r){Xi(this,Se(this,e),Se(this,t||e),r)}),extendSelection:$n(function(e,t,r){Vi(this,Se(this,e),t&&Se(this,t),r)}),extendSelections:$n(function(e,t){Ki(this,Le(this,e),t)}),extendSelectionsBy:$n(function(e,t){Ki(this,Le(this,$(this.sel.ranges,e)),t)}),setSelections:$n(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new yi(Se(this,e[i].anchor),Se(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),_i(this,bi(n,t),r)}}),addSelection:$n(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new yi(Se(this,e),Se(this,t||e))),_i(this,bi(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=ue(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=ue(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:$n(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];n[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:r}}for(var s=t&&"end"!=t&&function(e,t,r){for(var n=[],i=ve(e.first,0),o=i,l=0;l<t.length;l++){var s=t[l],a=Li(s.from,i,o),u=Li(xi(s),i,o);if(i=s.to,o=u,"around"==r){var c=e.sel.ranges[l],h=me(c.head,c.anchor)<0;n[l]=new yi(h?u:a,h?a:u)}else n[l]=new yi(a,a)}return new mi(n,e.sel.primIndex)}(this,n,t),a=n.length-1;a>=0;a--)io(this,n[a]);s?Yi(this,s):this.cm&&Tn(this.cm)}),undo:$n(function(){lo(this,"undo")}),redo:$n(function(){lo(this,"redo")}),undoSelection:$n(function(){lo(this,"undo",!0)}),redoSelection:$n(function(){lo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Di(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Gi(this.history.done),undone:Gi(this.history.undone)}},setHistory:function(e){var t=this.history=new Di(this.history.maxGeneration);t.done=Gi(e.done.slice(0),null,!0),t.undone=Gi(e.undone.slice(0),null,!0)},setGutterMarker:$n(function(e,t,r){return po(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&re(n)&&(e.gutterMarkers=null),!0})}),clearGutter:$n(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&po(t,r,"gutter",function(){return r.gutterMarkers[e]=null,re(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!pe(this,e))return null;if(t=e,!(e=ae(this,e)))return null}else if(null==(t=fe(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:$n(function(e,t,r){return po(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(L(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})}),removeLineClass:$n(function(e,t,r){return po(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(L(r));if(!o)return!1;var l=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0})}),addLineWidget:$n(function(e,t,r){return function(e,t,r,n){var i=new mo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),po(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Ke(e,t)){var n=Xe(t)<e.scrollTop;he(t,t.height+wr(i)),n&&kn(o,i.height),o.curOp.forceUpdate=!0}return!0}),sr(o,"lineWidgetAdded",o,i,"number"==typeof t?t:fe(t)),i}(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return xo(this,Se(this,e),Se(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return xo(this,e=Se(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=ae(this,(e=Se(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=Se(this,e),t=Se(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s<l.length;s++){var a=l[s];null!=a.to&&i==e.line&&e.ch>=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),Se(this,ve(r,t))},indexFromPos:function(e){var t=(e=Se(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new To(ce(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new To(ce(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(me(o,l)){var s=xo(e,o,l,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}(n,So(this)),n},unlinkDoc:function(e){if(e instanceof Sl&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Lo(So(this));break}}if(e.history==this.history){var r=[e.id];Oi(e,function(e){return r.push(e.id)},!0),e.history=new Di(null),e.history.done=Gi(this.history.done,r),e.history.undone=Gi(this.history.undone,r)}},iterLinkedDocs:function(e){Oi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):wt(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:$n(function(e){var t;("rtl"!=e&&(e="ltr"),e!=this.direction)&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Yn(t=this.cm,function(){Wi(t),Zn(t)}))})}),To.prototype.eachLine=To.prototype.iter;var Mo=0;function No(e){var t=this;if(Oo(t),!it(t,e)&&!xr(t.display,e)){at(e),l&&(Mo=+new Date);var r=sn(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),s=0,a=function(e,n){if(!t.options.allowDropFileTypes||-1!=B(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=_n(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++s==i){var a={from:r=Se(t.doc,r),to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};io(t.doc,a),Yi(t.doc,wi(r,xi(a)))}}),l.readAsText(e)}},u=0;u<i;++u)a(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),qi(t.doc,wi(r,r)),h)for(var f=0;f<h.length;++f)uo(t.doc,"",h[f].anchor,h[f].head,"drag");t.replaceSelection(c,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Oo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ao(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}var Wo=!1;function Do(){var e;Wo||(et(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Ao(Ho)},100))}),et(window,"blur",function(){return Ao(yn)}),Wo=!0)}function Ho(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}for(var Fo={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Po=0;Po<10;Po++)Fo[Po+48]=Fo[Po+96]=String(Po);for(var Eo=65;Eo<=90;Eo++)Fo[Eo]=String.fromCharCode(Eo);for(var zo=1;zo<=12;zo++)Fo[zo+111]=Fo[zo+63235]="F"+zo;var Io={};function Ro(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var l=0;l<o.length-1;l++){var s=o[l];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Bo(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=$(r.split(" "),Ro),o=0;o<i.length;o++){var l=void 0,s=void 0;o==i.length-1?(s=i.join(" "),l=n):(s=i.slice(0,o+1).join(" "),l="...");var a=t[s];if(a){if(a!=l)throw new Error("Inconsistent bindings for "+s)}else t[s]=l}delete e[r]}for(var u in t)e[u]=t[u];return e}function Go(e,t,r,n){var i=(t=jo(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Go(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var l=Go(e,t.fallthrough[o],r,n);if(l)return l}}}function Uo(e){var t="string"==typeof e?e:Fo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Vo(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(C?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(C?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Ko(e,t){if(h&&34==e.keyCode&&e.char)return!1;var r=Fo[e.keyCode];return null!=r&&!e.altGraphKey&&Vo(r,e,t)}function jo(e){return"string"==typeof e?Io[e]:e}function Xo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&me(o.from,q(n).to)<=0;){var l=n.pop();if(me(l.from,o.from)<0){o.from=l.from;break}}n.push(o)}Yn(e,function(){for(var t=n.length-1;t>=0;t--)uo(e.doc,"",n[t].from,n[t].to,"+delete");Tn(e)})}function Yo(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function _o(e,t,r){var n=Yo(e,t.ch,r);return null==n?null:new ve(t.line,n,r<0?"after":"before")}function qo(e,t,r,n,i){if(e){var o=Qe(r,t.doc.direction);if(o){var l,s=i<0?q(o):o[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Wr(t,r);l=i<0?r.text.length-1:0;var c=Dr(t,u,l).top;l=le(function(e){return Dr(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=Yo(r,l,1))}else l=i<0?s.to:s.from;return new ve(n,l,a)}}return new ve(n,i<0?r.text.length:0,i<0?"before":"after")}Io.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Io.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Io.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Io.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Io.default=y?Io.macDefault:Io.pcDefault;var $o={selectAll:ro,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Xo(e,function(t){if(t.empty()){var r=ae(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:ve(t.head.line+1,0)}:{from:t.head,to:ve(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Xo(e,function(t){return{from:ve(t.from().line,0),to:Se(e.doc,ve(t.to().line+1,0))}})},delLineLeft:function(e){return Xo(e,function(e){return{from:ve(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Xo(e,function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}})},delWrappedLineRight:function(e){return Xo(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ve(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ve(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Zo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Qo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return function(e,t){var r=ae(e.doc,t),n=function(e){for(var t;t=Re(e);)e=t.find(1,!0).line;return e}(r);n!=r&&(t=fe(n));return qo(!0,e,r,t,-1)}(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},j)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},j)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Qo(e,t.head):n},j)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),l=I(e.getLine(o.line),o.ch,n);t.push(_(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Yn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=ae(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new ve(i.line,i.ch-1)),i.ch>0)i=new ve(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ve(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=ae(e.doc,i.line-1).text;l&&(i=new ve(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ve(i.line-1,l.length-1),i,"+transpose"))}r.push(new yi(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return Yn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Tn(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Zo(e,t){var r=ae(e.doc,t),n=Ge(r);return n!=r&&(t=fe(n)),qo(!0,e,n,t,1)}function Qo(e,t){var r=Zo(e,t.line),n=ae(e.doc,r.line),i=Qe(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return ve(r.line,l?0:o,r.sticky)}return r}function Jo(e,t,r){if("string"==typeof t&&!(t=$o[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=U}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}var el=new R;function tl(e,t,r,n){var i=e.state.keySeq;if(i){if(Uo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:el.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),rl(e,i+" "+t,r,n))return!0}return rl(e,t,r,n)}function rl(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Go(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Go(t,e.options.extraKeys,r,e)||Go(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&sr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(at(r),pn(e)),!!i}function nl(e,t){var r=Ko(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?tl(e,"Shift-"+r,t,function(t){return Jo(e,t,!0)})||tl(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return Jo(e,t)}):tl(e,r,t,function(t){return Jo(e,t)}))}var il=null;function ol(e){var t=this;if(t.curOp.focus=D(),!it(t,e)){l&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=nl(t,e);h&&(il=n?r:null,!n&&88==r&&!Ct&&(y?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(T(t,"CodeMirror-crosshair"),rt(document,"keyup",r),rt(document,"mouseover",r))}H(t,"CodeMirror-crosshair"),et(document,"keyup",r),et(document,"mouseover",r)}(t)}}function ll(e){16==e.keyCode&&(this.doc.sel.shift=!1),it(this,e)}function sl(e){var t=this;if(!(xr(t.display,e)||it(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(h&&r==il)return il=null,void at(e);if(!h||e.which&&!(e.which<10)||!nl(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(function(e,t,r){return tl(e,"'"+r+"'",t,function(t){return Jo(e,t,!0)})}(t,e,i)||t.display.input.onKeyPress(e))}}}var al,ul,cl=function(e,t,r){this.time=e,this.pos=t,this.button=r};function hl(e){var t=this,r=t.display;if(!(it(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,xr(r,e))a||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));else if(!pl(t,e)){var n=sn(t,e),i=dt(e),o=n?function(e,t){var r=+new Date;return ul&&ul.compare(r,e,t)?(al=ul=null,"triple"):al&&al.compare(r,e,t)?(ul=new cl(r,e,t),al=null,"double"):(al=new cl(r,e,t),ul=null,"single")}(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&function(e,t,r,n,i){var o="Click";"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o);return tl(e,Vo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,function(t){if("string"==typeof t&&(t=$o[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=U}finally{e.state.suppressEdits=!1}return n})}(t,i,n,o,e)||(1==i?n?function(e,t,r,n){l?setTimeout(E(gn,e),0):e.curOp.focus=D();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=b?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey);null==i.addNew&&(i.addNew=y?r.metaKey:r.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(y?r.altKey:r.ctrlKey));return i}(e,r,n),u=e.doc.sel;e.options.dragDrop&&vt&&!e.isReadOnly()&&"single"==r&&(i=u.contains(t))>-1&&(me((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(me(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,u=_n(e,function(t){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,rt(document,"mouseup",u),rt(document,"mousemove",c),rt(i.scroller,"dragstart",h),rt(i.scroller,"drop",u),o||(at(t),n.addNew||Vi(e.doc,r,null,null,n.extend),a||l&&9==s?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};a&&(i.scroller.draggable=!0);e.state.draggingText=u,u.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop();et(document,"mouseup",u),et(document,"mousemove",c),et(i.scroller,"dragstart",h),et(i.scroller,"drop",u),vn(e),setTimeout(function(){return i.input.focus()},20)}(e,n,t,o):function(e,t,r,n){var i=e.display,o=e.doc;at(t);var l,s,a=o.sel,u=a.ranges;n.addNew&&!n.extend?(s=o.sel.contains(r),l=s>-1?u[s]:new yi(r,r)):(l=o.sel.primary(),s=o.sel.primIndex);if("rectangle"==n.unit)n.addNew||(l=new yi(r,r)),r=sn(e,t,!0,!0),s=-1;else{var c=fl(e,r,n.unit);l=n.extend?Ui(l,c.anchor,c.head,n.extend):c}n.addNew?-1==s?(s=u.length,_i(o,bi(u.concat([l]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==n.unit&&!n.extend?(_i(o,bi(u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),a=o.sel):ji(o,s,l,K):(s=0,_i(o,new mi([l],0),K),a=o.sel);var h=r;function f(t){if(0!=me(h,t))if(h=t,"rectangle"==n.unit){for(var i=[],u=e.options.tabSize,c=I(ae(o,r.line).text,r.ch,u),f=I(ae(o,t.line).text,t.ch,u),d=Math.min(c,f),p=Math.max(c,f),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=ae(o,g).text,y=X(m,d,u);d==p?i.push(new yi(ve(g,y),ve(g,y))):m.length>y&&i.push(new yi(ve(g,y),ve(g,X(m,p,u))))}i.length||i.push(new yi(r,r)),_i(o,bi(a.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=l,x=fl(e,t,n.unit),C=w.anchor;me(x.anchor,C)>0?(b=x.head,C=xe(w.from(),x.anchor)):(b=x.anchor,C=we(w.to(),x.head));var S=a.ranges.slice(0);S[s]=function(e,t){var r=t.anchor,n=t.head,i=ae(e.doc,r.line);if(0==me(r,n)&&r.sticky==n.sticky)return t;var o=Qe(i);if(!o)return t;var l=$e(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a,u=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)a=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=$e(o,n.ch,n.sticky),h=c-l||(n.ch-r.ch)*(1==s.level?-1:1);a=c==u-1||c==u?h<0:h>0}var f=o[u+(a?-1:0)],d=a==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new yi(new ve(r.line,p,g),n)}(e,new yi(Se(o,C),b)),_i(o,bi(S,s),K)}}var d=i.wrapper.getBoundingClientRect(),p=0;function g(t){e.state.selectingText=!1,p=1/0,at(t),i.input.focus(),rt(document,"mousemove",v),rt(document,"mouseup",m),o.history.lastSelOrigin=null}var v=_n(e,function(t){dt(t)?function t(r){var l=++p;var s=sn(e,r,!0,"rectangle"==n.unit);if(!s)return;if(0!=me(s,h)){e.curOp.focus=D(),f(s);var a=xn(i,o);(s.line>=a.to||s.line<a.from)&&setTimeout(_n(e,function(){p==l&&t(r)}),150)}else{var u=r.clientY<d.top?-20:r.clientY>d.bottom?20:0;u&&setTimeout(_n(e,function(){p==l&&(i.scroller.scrollTop+=u,t(r))}),50)}}(t):g(t)}),m=_n(e,g);e.state.selectingText=m,et(document,"mousemove",v),et(document,"mouseup",m)}(e,n,t,o)}(t,n,o,e):ft(e)==r.scroller&&at(e):2==i?(n&&Vi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==i&&(S?gl(t,e):vn(t)))}}function fl(e,t,r){if("char"==r)return new yi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new yi(ve(t.line,0),Se(e.doc,ve(t.line+1,0)));var n=r(e,t);return new yi(n.from,n.to)}function dl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&at(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!lt(e,r))return ct(t);o-=s.top-l.viewOffset;for(var a=0;a<e.options.gutters.length;++a){var u=l.gutters.childNodes[a];if(u&&u.getBoundingClientRect().right>=i)return nt(e,r,e,de(e.doc,o),e.options.gutters[a],t),ct(t)}}function pl(e,t){return dl(e,t,"gutterClick",!0)}function gl(e,t){xr(e.display,t)||function(e,t){if(!lt(e,"gutterContextMenu"))return!1;return dl(e,t,"gutterContextMenu",!1)}(e,t)||it(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function vl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Rr(e)}cl.prototype.compare=function(e,t,r){return this.time+400>e&&0==me(t,this.pos)&&r==this.button};var ml={toString:function(){return"CodeMirror.Init"}},yl={},bl={};function wl(e){ci(e),Zn(e),Cn(e)}function xl(e,t,r){if(!t!=!(r&&r!=ml)){var n=e.display.dragFunctions,i=t?et:rt;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Cl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),_e(e)),ln(e),Zn(e),Rr(e),setTimeout(function(){return En(e)},100)}function Sl(e,t){var r=this;if(!(this instanceof Sl))return new Sl(e,t);this.options=t=t?z(t):{},z(yl,t,!1),hi(t);var n=t.value;"string"==typeof n&&(n=new To(n,t.mode,null,t.lineSeparator,t.direction)),this.doc=n;var i=new Sl.inputStyles[t.inputStyle](this),o=this.display=new se(e,n,i);for(var u in o.wrapper.CodeMirror=this,ci(this),vl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Rn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},t.autofocus&&!m&&o.input.focus(),l&&s<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(e){var t=e.display;et(t.scroller,"mousedown",_n(e,hl)),et(t.scroller,"dblclick",l&&s<11?_n(e,function(t){if(!it(e,t)){var r=sn(e,t);if(r&&!pl(e,t)&&!xr(e.display,t)){at(t);var n=e.findWordAt(r);Vi(e.doc,n.anchor,n.head)}}}):function(t){return it(e,t)||at(t)});S||et(t.scroller,"contextmenu",function(t){return gl(e,t)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}et(t.scroller,"touchstart",function(i){if(!it(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!pl(e,i)){t.input.ensurePolled(),clearTimeout(r);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),et(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),et(t.scroller,"touchend",function(r){var n=t.activeTouch;if(n&&!xr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var l,s=e.coordsChar(t.activeTouch,"page");l=!n.prev||o(n,n.prev)?new yi(s,s):!n.prev.prev||o(n,n.prev.prev)?e.findWordAt(s):new yi(ve(s.line,0),Se(e.doc,ve(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),at(r)}i()}),et(t.scroller,"touchcancel",i),et(t.scroller,"scroll",function(){t.scroller.clientHeight&&(An(e,t.scroller.scrollTop),Dn(e,t.scroller.scrollLeft,!0),nt(e,"scroll",e))}),et(t.scroller,"mousewheel",function(t){return vi(e,t)}),et(t.scroller,"DOMMouseScroll",function(t){return vi(e,t)}),et(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){it(e,t)||ht(t)},over:function(t){it(e,t)||(!function(e,t){var r=sn(e,t);if(r){var n=document.createDocumentFragment();hn(e,r,n),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,n)}}(e,t),ht(t))},start:function(t){return function(e,t){if(l&&(!e.state.draggingText||+new Date-Mo<100))ht(t);else if(!it(e,t)&&!xr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var r=O("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),h&&r.parentNode.removeChild(r)}}(e,t)},drop:_n(e,No),leave:function(t){it(e,t)||Oo(e)}};var a=t.input.getField();et(a,"keyup",function(t){return ll.call(e,t)}),et(a,"keydown",_n(e,ol)),et(a,"keypress",_n(e,sl)),et(a,"focus",function(t){return mn(e,t)}),et(a,"blur",function(t){return yn(e,t)})}(this),Do(),Gn(this),this.curOp.forceUpdate=!0,Ai(this,n),t.autofocus&&!m||this.hasFocus()?setTimeout(E(mn,this),20):yn(this),bl)bl.hasOwnProperty(u)&&bl[u](r,t[u],ml);Sn(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Ll.length;++c)Ll[c](r);Un(this),a&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Sl.defaults=yl,Sl.optionHandlers=bl;var Ll=[];function kl(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=It(e,t).state:r="prev");var l=e.options.tabSize,s=ae(o,t),a=I(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==U||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?I(ae(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(f<u&&(h+=_(u-f)),h!=c)return uo(o,h,ve(t,0),ve(t,c.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<c.length){var v=ve(t,c.length);ji(o,p,new yi(v,v));break}}}Sl.defineInitHook=function(e){return Ll.push(e)};var Tl=null;function Ml(e){Tl=e}function Nl(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var l,s=e.state.pasteIncoming||"paste"==i,a=wt(t),u=null;if(s&&n.ranges.length>1)if(Tl&&Tl.text.join("\n")==t){if(n.ranges.length%Tl.text.length==0){u=[];for(var c=0;c<Tl.text.length;c++)u.push(o.splitLines(Tl.text[c]))}}else a.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=$(a,function(e){return[e]}));for(var h=n.ranges.length-1;h>=0;h--){var f=n.ranges[h],d=f.from(),p=f.to();f.empty()&&(r&&r>0?d=ve(d.line,d.ch-r):e.state.overwrite&&!s?p=ve(p.line,Math.min(ae(o,p.line).text.length,p.ch+q(a).length)):Tl&&Tl.lineWise&&Tl.text.join("\n")==t&&(d=p=ve(d.line,0))),l=e.curOp.updateInput;var g={from:d,to:p,text:u?u[h%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};io(e.doc,g),sr(e,"inputRead",e,g)}t&&!s&&Al(e,t),Tn(e),e.curOp.updateInput=l,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ol(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Yn(t,function(){return Nl(t,r,0,null,"paste")}),!0}function Al(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){l=kl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ae(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=kl(e,i.head.line,"smart"));l&&sr(e,"electricInput",e,i.head.line)}}}function Wl(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:ve(i,0),head:ve(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Dl(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Hl(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return a?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),Dl(e),t}function Fl(e,t,r,n,i){var o=t,l=r,s=ae(e,t.line);function a(n){var o,l;if(null==(o=i?function(e,t,r,n){var i=Qe(t,e.doc.direction);if(!i)return _o(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=$e(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from<r.ch))return _o(t,r,n);var s,a=function(e,r){return Yo(t,e instanceof ve?e.ch:e,r)},u=function(r){return e.options.lineWrapping?(s=s||Wr(e,t),Zr(e,t,s,r)):{begin:0,end:t.text.length}},c=u("before"==r.sticky?a(r,-1):r.ch);if("rtl"==e.doc.direction||1==l.level){var h=1==l.level==n<0,f=a(r,h?1:-1);if(null!=f&&(h?f<=l.to&&f<=c.end:f>=l.from&&f>=c.begin)){var d=h?"before":"after";return new ve(r.line,f,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ve(r.line,a(e,1),"before"):new ve(r.line,e,"after")};e>=0&&e<i.length;e+=t){var l=i[e],s=t>0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u<l.to)return o(u,s);if(u=s?l.from:a(l.to,-1),n.begin<=u&&u<n.end)return o(u,s)}},g=p(o+n,n,c);if(g)return g;var v=n>0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}(e.cm,s,t,r):_o(s,t,r))){if(n||(l=t.line+r)<e.first||l>=e.first+e.size||(t=new ve(l,t.ch,t.sticky),!(s=ae(e,l))))return!1;t=qo(i,e.cm,s,t.line,r)}else t=o;return!0}if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var u=null,c="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||a(!f);f=!1){var d=s.text.charAt(t.ch)||"\n",p=te(d,h)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||f||p||(p="s"),u&&u!=p){r<0&&(r=1,a(),t.sticky="after");break}if(p&&(u=p),r>0&&!a(!f))break}var g=eo(e,t,o,l,!0);return ye(o,g)&&(g.hitSide=!0),g}function Pl(e,t,r,n){var i,o,l=e.doc,s=t.left;if("page"==n){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(a-.5*en(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=qr(e,s,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var El=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function zl(e,t){var r=Ar(e,t.line);if(!r||r.hidden)return null;var n=ae(e.doc,t.line),i=Nr(r,n,t.line),o=Qe(n,e.doc.direction),l="left";o&&(l=$e(o,t.ch)%2?"right":"left");var s=Pr(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function Il(e,t){return t&&(e.bad=!0),e}function Rl(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Il(e.clipPos(ve(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return Bl(o,t,r)}}function Bl(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!W(n,t))return Il(ve(fe(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?q(e.rest):e.line;return Il(ve(fe(o),o.text.length),i)}var l=3==t.nodeType?t:null,s=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,r&&(r=l.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var a=e.measure,u=a.maps;function c(t,r,n){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?a.map:u[i],l=0;l<o.length;l+=3){var s=o[l+2];if(s==t||s==r){var c=fe(i<0?e.line:e.rest[i]),h=o[l]+n;return(n<0||s!=t)&&(h=o[l+(n?1:0)]),ve(c,h)}}}var h=c(l,s,r);if(h)return Il(h,i);for(var f=s.nextSibling,d=l?l.nodeValue.length-r:0;f;f=f.nextSibling){if(h=c(f,f.firstChild,0))return Il(ve(h.line,h.ch-d),i);d+=f.textContent.length}for(var p=s.previousSibling,g=r;p;p=p.previousSibling){if(h=c(p,p.firstChild,-1))return Il(ve(h.line,h.ch+g),i);g+=p.textContent.length}}El.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;function o(e){if(!it(n,e)){if(n.somethingSelected())Ml({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Wl(n);Ml({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,V),n.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var o=Tl.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var l=Hl(),s=l.firstChild;n.display.lineSpace.insertBefore(l,n.display.lineSpace.firstChild),s.value=Tl.text.join("\n");var a=document.activeElement;P(s),setTimeout(function(){n.display.lineSpace.removeChild(l),a.focus(),a==i&&r.showPrimarySelection()},50)}}Dl(i,n.options.spellcheck),et(i,"paste",function(e){it(n,e)||Ol(e,n)||s<=11&&setTimeout(_n(n,function(){return t.updateFromDOM()}),20)}),et(i,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),et(i,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),et(i,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),et(i,"touchstart",function(){return r.forceCompositionEnd()}),et(i,"input",function(){t.composing||t.readFromDOMSoon()}),et(i,"copy",o),et(i,"cut",o)},El.prototype.prepareSelection=function(){var e=cn(this.cm,!1);return e.focus=this.cm.state.focused,e},El.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},El.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,n=t.doc.sel.primary(),i=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var l=Rl(t,e.anchorNode,e.anchorOffset),s=Rl(t,e.focusNode,e.focusOffset);if(!l||l.bad||!s||s.bad||0!=me(xe(l,s),i)||0!=me(we(l,s),o)){var a=t.display.view,u=i.line>=t.display.viewFrom&&zl(t,i)||{node:a[0].measure.map[2],offset:0},c=o.line<t.display.viewTo&&zl(t,o);if(!c){var h=a[a.length-1].measure,f=h.maps?h.maps[h.maps.length-1]:h.map;c={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(u&&c){var d,p=e.rangeCount&&e.getRangeAt(0);try{d=k(u.node,u.offset,c.offset,c.node)}catch(e){}d&&(!r&&t.state.focused?(e.collapse(u.node,u.offset),d.collapsed||(e.removeAllRanges(),e.addRange(d))):(e.removeAllRanges(),e.addRange(d)),p&&null==e.anchorNode?e.addRange(p):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},El.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},El.prototype.showMultipleSelections=function(e){N(this.cm.display.cursorDiv,e.cursors),N(this.cm.display.selectionDiv,e.selection)},El.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},El.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return W(this.div,t)},El.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},El.prototype.blur=function(){this.div.blur()},El.prototype.getField=function(){return this.div},El.prototype.supportsTouch=function(){return!0},El.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Yn(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))})},El.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},El.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(v&&c&&this.cm.options.gutters.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Rl(t,e.anchorNode,e.anchorOffset),n=Rl(t,e.focusNode,e.focusOffset);r&&n&&Yn(t,function(){_i(t.doc,wi(r,n),V),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},El.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),l=o.from(),s=o.to();if(0==l.ch&&l.line>n.firstLine()&&(l=ve(l.line-1,ae(n.doc,l.line-1).length)),s.ch==ae(n.doc,s.line).text.length&&s.line<n.lastLine()&&(s=ve(s.line+1,0)),l.line<i.viewFrom||s.line>i.viewTo-1)return!1;l.line==i.viewFrom||0==(e=an(n,l.line))?(t=fe(i.view[0].line),r=i.view[0].node):(t=fe(i.view[e].line),r=i.view[e-1].node.nextSibling);var a,u,c=an(n,s.line);if(c==i.view.length-1?(a=i.viewTo-1,u=i.lineDiv.lastChild):(a=fe(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var h=n.doc.splitLines(function(e,t,r,n,i){var o="",l=!1,s=e.doc.lineSeparator();function a(){l&&(o+=s,l=!1)}function u(e){e&&(a(),o+=e)}function c(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void u(r||t.textContent.replace(/\u200b/g,""));var o,h=t.getAttribute("cm-marker");if(h){var f=e.findMarks(ve(n,0),ve(i+1,0),(g=+h,function(e){return e.id==g}));return void(f.length&&(o=f[0].find(0))&&u(ue(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var d=/^(pre|div|p)$/i.test(t.nodeName);d&&a();for(var p=0;p<t.childNodes.length;p++)c(t.childNodes[p]);d&&(l=!0)}else 3==t.nodeType&&u(t.nodeValue);var g}for(;c(t),t!=r;)t=t.nextSibling;return o}(n,r,u,t,a)),f=ue(n.doc,ve(t,0),ve(a,ae(n.doc,a).text.length));h.length>1&&f.length>1;)if(q(h)==q(f))h.pop(),f.pop(),a--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}for(var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);d<m&&g.charCodeAt(d)==v.charCodeAt(d);)++d;for(var y=q(h),b=q(f),w=Math.min(y.length-(1==h.length?d:0),b.length-(1==f.length?d:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==h.length&&1==f.length&&t==l.line)for(;d&&d>l.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=ve(t,d),C=ve(a,f.length?q(f).length-p:0);return h.length>1||h[0]||me(x,C)?(uo(n.doc,h,x,C,"+input"),!0):void 0},El.prototype.ensurePolled=function(){this.forceCompositionEnd()},El.prototype.reset=function(){this.forceCompositionEnd()},El.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},El.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},El.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Yn(this.cm,function(){return Zn(e.cm)})},El.prototype.setUneditable=function(e){e.contentEditable="false"},El.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||_n(this.cm,Nl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},El.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},El.prototype.onContextMenu=function(){},El.prototype.resetPosition=function(){},El.prototype.needsContentAttribute=!0;var Gl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};Gl.prototype.init=function(e){var t=this,r=this,n=this.cm,i=this.wrapper=Hl(),o=this.textarea=i.firstChild;function a(e){if(!it(n,e)){if(n.somethingSelected())Ml({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Wl(n);Ml({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",o.value=t.text.join("\n"),P(o))}"cut"==e.type&&(n.state.cutIncoming=!0)}}e.wrapper.insertBefore(i,e.wrapper.firstChild),g&&(o.style.width="0px"),et(o,"input",function(){l&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),et(o,"paste",function(e){it(n,e)||Ol(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),et(o,"cut",a),et(o,"copy",a),et(e.scroller,"paste",function(t){xr(e,t)||it(n,t)||(n.state.pasteIncoming=!0,r.focus())}),et(e.lineSpace,"selectstart",function(t){xr(e,t)||at(t)}),et(o,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),et(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Gl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=cn(e);if(e.options.moveInputWithCursor){var i=Xr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},Gl.prototype.showSelection=function(e){var t=this.cm.display;N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Gl.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&P(this.textarea),l&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&s>=9&&(this.hasSelection=null))}},Gl.prototype.getField=function(){return this.textarea},Gl.prototype.supportsTouch=function(){return!1},Gl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},Gl.prototype.blur=function(){this.textarea.blur()},Gl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Gl.prototype.receivedFocus=function(){this.slowPoll()},Gl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Gl.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))})},Gl.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||xt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,u=Math.min(n.length,i.length);a<u&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return Yn(t,function(){Nl(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Gl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Gl.prototype.onKeyPress=function(){l&&s>=9&&(this.hasSelection=null),this.fastPoll()},Gl.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea,o=sn(r,e),u=n.scroller.scrollTop;if(o&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&_n(r,_i)(r.doc,wi(o),V);var c=i.style.cssText,f=t.wrapper.style.cssText;t.wrapper.style.cssText="position: absolute";var d,p=t.wrapper.getBoundingClientRect();if(i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a&&(d=window.scrollY),n.input.focus(),a&&window.scrollTo(null,d),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=!0,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&s>=9&&v(),S){ht(e);var g=function(){rt(window,"mouseup",g),setTimeout(m,20)};et(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=c,l&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart){(!l||l&&s<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?_n(r,ro)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},Gl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Gl.prototype.setUneditable=function(){},Gl.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=ml&&i(e,t,r)}:i)}e.defineOption=r,e.Init=ml,r("value","",function(e,t){return e.setValue(t)},!0),r("mode",null,function(e,t){e.doc.modeOption=t,ki(e)},!0),r("indentUnit",2,ki,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(e){Ti(e),Rr(e),Zn(e)},!0),r("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(ve(n,o))}n++});for(var i=r.length-1;i>=0;i--)uo(e.doc,t,r[i],ve(r[i].line,r[i].ch+t.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ml&&e.refresh()}),r("specialCharPlaceholder",Qt,function(e){return e.refresh()},!0),r("electricChars",!0),r("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",function(e){vl(e),wl(e)},!0),r("keyMap","default",function(e,t,r){var n=jo(t),i=r!=ml&&jo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Cl,!0),r("gutters",[],function(e){hi(e.options),wl(e)},!0),r("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?nn(e.display)+"px":"0",e.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(e){return En(e)},!0),r("scrollbarStyle","native",function(e){Rn(e),En(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),r("lineNumbers",!1,function(e){hi(e.options),wl(e)},!0),r("firstLineNumber",1,wl,!0),r("lineNumberFormatter",function(e){return e},wl,!0),r("showCursorWhenSelecting",!1,un,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("readOnly",!1,function(e,t){"nocursor"==t&&(yn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),r("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),r("dragDrop",!0,xl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,un,!0),r("singleCursorHeightPerLine",!0,un,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Ti,!0),r("addModeClass",!1,Ti,!0),r("pollInterval",100),r("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),r("historyEventDelay",1250),r("viewportMargin",10,function(e){return e.refresh()},!0),r("maxHighlightLength",1e4,Ti,!0),r("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),r("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),r("autofocus",null),r("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Sl),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&_n(this,t[e])(this,r,i),nt(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](jo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:qn(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,Zn(this)}),removeOverlay:qn(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Zn(this)}}),indentLine:qn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),pe(this.doc,e)&&kl(this,e,t,r)}),indentSelection:qn(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(kl(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Tn(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a<r;++a)kl(this,a,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[n].from().ch>0&&ji(this.doc,n,new yi(o,u[n].to()),V)}}}),getTokenAt:function(e,t){return Vt(this,e,t)},getLineTokens:function(e,t){return Vt(this,ve(e),t,!0)},getTokenTypeAt:function(e){e=Se(this.doc,e);var t,r=zt(this,ae(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]<o)){t=r[2*l+2];break}n=l+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var l=0;l<o[t].length;l++){var s=i[o[t][l]];s&&n.push(s)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var a=0;a<i._global.length;a++){var u=i._global[a];u.pred(o,this)&&-1==B(n,u.val)&&n.push(u.val)}return n},getStateAfter:function(e,t){var r=this.doc;return It(this,(e=Ce(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return Xr(this,null==e?r.head:"object"==typeof e?Se(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return jr(this,Se(this.doc,e),t||"page")},coordsChar:function(e,t){return qr(this,(e=Kr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Kr(this,{top:e,left:0},t||"page").top,de(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=ae(this.doc,e)}else n=e;return Vr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Xe(n):0)},defaultTextHeight:function(){return en(this.display)},defaultCharWidth:function(){return tn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,l,s,a=this.display,u=(e=Xr(this,Se(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==n)u=e.top;else if("above"==n||"near"==n){var h=Math.max(a.wrapper.clientHeight,this.doc.height),f=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),r&&(o=this,l={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=Ln(o,l)).scrollTop&&An(o,s.scrollTop),null!=s.scrollLeft&&Dn(o,s.scrollLeft))},triggerOnKeyDown:qn(ol),triggerOnKeyPress:qn(sl),triggerOnKeyUp:ll,triggerOnMouseDown:qn(hl),execCommand:function(e){if($o.hasOwnProperty(e))return $o[e].call(null,this)},triggerElectric:qn(function(e){Al(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=Se(this.doc,e),l=0;l<t&&!(o=Fl(this.doc,o,i,r,n)).hitSide;++l);return o},moveH:qn(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Fl(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},j)}),deleteH:qn(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Xo(this,function(r){var i=Fl(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var l=Se(this.doc,e),s=0;s<t;++s){var a=Xr(this,l,"div");if(null==o?o=a.left:a.left=o,(l=Pl(this,a,i,r)).hitSide)break}return l},moveV:qn(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(l){if(o)return e<0?l.from():l.to();var s=Xr(r,l.head,"div");null!=l.goalColumn&&(s.left=l.goalColumn),i.push(s.left);var a=Pl(r,s,e,t);return"page"==t&&l==n.sel.primary()&&kn(r,jr(r,a,"div").top-s.top),a},j),i.length)for(var l=0;l<n.sel.ranges.length;l++)n.sel.ranges[l].goalColumn=i[l]}),findWordAt:function(e){var t=ae(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),l=te(o,i)?function(e){return te(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};r>0&&l(t.charAt(r-1));)--r;for(;n<t.length&&l(t.charAt(n));)++n}return new yi(ve(e.line,r),ve(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?H(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),nt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==D()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:qn(function(e,t){Mn(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-kr(this)-this.display.barHeight,width:e.scrollWidth-kr(this)-this.display.barWidth,clientHeight:Mr(this),clientWidth:Tr(this)}},scrollIntoView:qn(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ve(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Nn(e),e.curOp.scrollToPos=t}(this,e):On(this,e.from,e.to,e.margin)}),setSize:qn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&Ir(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Qn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,nt(this,"refresh",this)}),operation:function(e){return Yn(this,e)},startOperation:function(){return Gn(this)},endOperation:function(){return Un(this)},refresh:qn(function(){var e=this.display.cachedTextHeight;Zn(this),this.curOp.forceUpdate=!0,Rr(this),Mn(this,this.doc.scrollLeft,this.doc.scrollTop),ai(this),(null==e||Math.abs(e-en(this.display))>.5)&&ln(this),nt(this,"refresh",this)}),swapDoc:qn(function(e){var t=this.doc;return t.cm=null,Ai(this,e),Rr(this),this.display.input.reset(),Mn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},st(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Sl);var Ul="iter insert remove copy getEditor constructor".split(" ");for(var Vl in To.prototype)To.prototype.hasOwnProperty(Vl)&&B(Ul,Vl)<0&&(Sl.prototype[Vl]=function(e){return function(){return e.apply(this.doc,arguments)}}(To.prototype[Vl]));return st(To),Sl.inputStyles={textarea:Gl,contenteditable:El},Sl.defineMode=function(e){Sl.defaults.mode||"null"==e||(Sl.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Lt[e]=t}.apply(this,arguments)},Sl.defineMIME=function(e,t){kt[e]=t},Sl.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Sl.defineMIME("text/plain","null"),Sl.defineExtension=function(e,t){Sl.prototype[e]=t},Sl.defineDocExtension=function(e,t){To.prototype[e]=t},Sl.fromTextArea=function(e,t){if((t=t?z(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=D();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(et(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(rt(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=Sl(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=rt,e.on=et,e.wheelEventPixels=gi,e.Doc=To,e.splitLines=wt,e.countColumn=I,e.findColumn=X,e.isWordChar=ee,e.Pass=U,e.signal=nt,e.Line=Xt,e.changeEnd=xi,e.scrollbarModel=In,e.Pos=ve,e.cmpPos=me,e.modes=Lt,e.mimeModes=kt,e.resolveMode=Tt,e.getMode=Mt,e.modeExtensions=Nt,e.extendMode=Ot,e.copyState=At,e.startState=Dt,e.innerMode=Wt,e.commands=$o,e.keyMap=Io,e.keyName=Ko,e.isModifierKey=Uo,e.lookupKey=Go,e.normalizeKeyMap=Bo,e.StringStream=Ht,e.SharedTextMarker=Co,e.TextMarker=wo,e.LineWidget=mo,e.e_preventDefault=at,e.e_stopPropagation=ut,e.e_stop=ht,e.addClass=H,e.contains=W,e.rmClass=T,e.keyNames=Fo}(Sl),Sl.version="5.32.0",Sl}); -/* Include script: handlebars */ +/* Include script: handlebars.min.js */ -/* Include script: smalltalk */ +/* Include script: smalltalk.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("smalltalk",function(e){var s=/[+\-\/\\*~<>=@%|&?!.,:;^]/,u=/true|false|nil|self|super|thisContext/,t=function(e,t){this.next=e;this.parent=t},n=function(e,t,n){this.name=e;this.context=t;this.eos=n},l=function(){this.context=new t(i,null);this.expectVariable=!0;this.indentation=0;this.userIndentationDelta=0};l.prototype.userIndent=function(t){this.userIndentationDelta=t>0?(t/e.indentUnit-this.indentation):0};var i=function(e,l,d){var i=new n(null,l,!1),c=e.next();if(c==="\""){i=a(e,new t(a,l))} else if(c==="'"){i=r(e,new t(r,l))} else if(c==="#"){if(e.peek()==="'"){e.next();i=o(e,new t(o,l))} @@ -432,13 +430,13 @@ else if(/\d/.test(c)){e.eatWhile(/[\w\d]/);i.name="number"} else if(/[\w_]/.test(c)){e.eatWhile(/[\w\d_]/);i.name=d.expectVariable?(u.test(e.current())?"keyword":"variable"):null} else{i.eos=d.expectVariable};return i},a=function(e,t){e.eatWhile(/[^"]/);return new n("comment",e.eat("\"")?t.parent:t,!0)},r=function(e,t){e.eatWhile(/[^']/);return new n("string",e.eat("'")?t.parent:t,!1)},o=function(e,t){e.eatWhile(/[^']/);return new n("string-2",e.eat("'")?t.parent:t,!1)},f=function(e,t){var i=new n(null,t,!1),a=e.next();if(a==="|"){i.context=t.parent;i.eos=!0} else{e.eatWhile(/[^|]/);i.name="variable"};return i};return{startState:function(){return new l},token:function(e,t){t.userIndent(e.indentation());if(e.eatSpace()){return null};var n=t.context.next(e,t.context,t);t.context=n.context;t.expectVariable=n.eos;return n.name},blankLine:function(e){e.userIndent(0)},indent:function(t,n){var a=t.context.next===i&&n&&n.charAt(0)==="]"?-1:t.userIndentationDelta;return(t.indentation+a)*e.indentUnit},electricChars:"]"}});e.defineMIME("text/x-stsrc",{name:"smalltalk"})}); -/* Include script: php */ +/* Include script: php.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../htmlmixed/htmlmixed'),require('../clike/clike'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../htmlmixed/htmlmixed','../clike/clike'],e);else e(CodeMirror)})(function(e){'use strict';function t(e){var r={},s=e.split(' ');for(var t=0;t<s.length;++t)r[s[t]]=!0;return r};function s(e,t,i){if(e.length==0)return r(t);return function(l,n){var o=e[0];for(var a=0;a<o.length;a++)if(l.match(o[a][0])){n.tokenize=s(e.slice(1),t);return o[a][1]};n.tokenize=r(t,i);return'string'}};function r(e,t){return function(r,s){return o(r,s,e,t)}};function o(e,t,i,r){if(r!==!1&&e.match('${',!1)||e.match('{$',!1)){t.tokenize=null;return'string'};if(r!==!1&&e.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)){if(e.match('[',!1)){t.tokenize=s([[['[',null]],[[/\d[\w\.]*/,'number'],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,'variable-2'],[/[\w\$]+/,'variable']],[[']',null]]],i,r)};if(e.match(/\-\>\w/,!1)){t.tokenize=s([[['->',null]],[[/[\w]+/,'variable']]],i,r)};return'variable-2'};var l=!1;while(!e.eol()&&(l||r===!1||(!e.match('{$',!1)&&!e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,!1)))){if(!l&&e.match(i)){t.tokenize=null;t.tokStack.pop();t.tokStack.pop();break};l=e.next()=='\\'&&!l};return'string'};var l='abstract and array as break case catch class clone const continue declare default do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach function global goto if implements interface instanceof namespace new or private protected public static switch throw trait try use var while xor die echo empty exit eval include include_once isset list require require_once return print unset __halt_compiler self static parent yield insteadof finally',n='true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__',a='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 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';e.registerHelper('hintWords','php',[l,n,a].join(' ').split(' '));e.registerHelper('wordChars','php',/[\w$]/);var i={name:'clike',helperType:'php',keywords:t(l),blockKeywords:t('catch do else elseif for foreach if switch try while finally'),defKeywords:t('class function interface namespace trait'),atoms:t(n),builtin:t(a),multiLineStrings:!0,hooks:{'$':function(e){e.eatWhile(/[\w\$_]/);return'variable-2'},'<':function(e,t){var l;if(l=e.match(/<<\s*/)){var s=e.eat(/['"]/);e.eatWhile(/[\w\.]/);var i=e.current().slice(l[0].length+(s?2:1));if(s)e.eat(s);if(i){(t.tokStack||(t.tokStack=[])).push(i,0);t.tokenize=r(i,s!='\'');return'string'}};return!1},'#':function(e){while(!e.eol()&&!e.match('?>',!1))e.next();return'comment'},'/':function(e){if(e.eat('/')){while(!e.eol()&&!e.match('?>',!1))e.next();return'comment'};return!1},'"':function(e,t){(t.tokStack||(t.tokStack=[])).push('"',0);t.tokenize=r('"');return'string'},'{':function(e,t){if(t.tokStack&&t.tokStack.length)t.tokStack[t.tokStack.length-1]++;return!1},'}':function(e,t){if(t.tokStack&&t.tokStack.length>0&&!--t.tokStack[t.tokStack.length-1]){t.tokenize=r(t.tokStack[t.tokStack.length-2])};return!1}}};e.defineMode('php',function(t,r){var l=e.getMode(t,(r&&r.htmlMode)||'text/html'),s=e.getMode(t,i);function n(r,t){var c=t.curMode==s;if(r.sol()&&t.pending&&t.pending!='"'&&t.pending!='\'')t.pending=null;if(!c){if(r.match(/^<\?\w*/)){t.curMode=s;if(!t.php)t.php=e.startState(s,l.indent(t.html,''));t.curState=t.php;return'meta'};if(t.pending=='"'||t.pending=='\''){while(!r.eol()&&r.next()!=t.pending){};var i='string'} else if(t.pending&&r.pos<t.pending.end){r.pos=t.pending.end;var i=t.pending.style} else{var i=l.token(r,t.curState)};if(t.pending)t.pending=null;var n=r.current(),a=n.search(/<\?/),o;if(a!=-1){if(i=='string'&&(o=n.match(/['"]$/))&&!/\?>/.test(n))t.pending=o[0];else t.pending={end:r.pos,style:i};r.backUp(n.length-a)};return i} else if(c&&t.php.tokenize==null&&r.match('?>')){t.curMode=l;t.curState=t.html;if(!t.php.context.prev)t.php=null;return'meta'} else{return s.token(r,t.curState)}};return{startState:function(){var t=e.startState(l),i=r.startOpen?e.startState(s):null;return{html:t,php:i,curMode:r.startOpen?s:l,curState:r.startOpen?i:t,pending:null}},copyState:function(t){var o=t.html,i=e.copyState(l,o),n=t.php,a=n&&e.copyState(s,n),r;if(t.curMode==l)r=i;else r=a;return{html:i,php:a,curMode:t.curMode,curState:r,pending:t.pending}},token:n,indent:function(e,t){if((e.curMode!=s&&/^\s*<\//.test(t))||(e.curMode==s&&/^\?>/.test(t)))return l.indent(e.html,t);return e.curMode.indent(e.curState,t)},blockCommentStart:'/*',blockCommentEnd:'*/',lineComment:'//',innerMode:function(e){return{state:e.curState,mode:e.curMode}}}},'htmlmixed','clike');e.defineMIME('application/x-httpd-php','php');e.defineMIME('application/x-httpd-php-open',{name:'php',startOpen:!0});e.defineMIME('text/x-php',i)}); -/* Include script: cobol */ +/* Include script: cobol.min.js */ (function(E){if(typeof exports=="object"&&typeof module=="object")E(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],E);else E(CodeMirror)})(function(E){"use strict";E.defineMode("cobol",function(){var C="builtin",L="comment",A="string",O="atom",D="number",S="keyword",U="header",e="def",P="link";function T(E){var I={},N=E.split(" ");for(var T=0;T<N.length;++T)I[N[T]]=!0;return I};var I=T("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES "),N=T("ACCEPT ACCESS ACQUIRE ADD ADDRESS ADVANCING AFTER ALIAS ALL ALPHABET ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED ALSO ALTER ALTERNATE AND ANY ARE AREA AREAS ARITHMETIC ASCENDING ASSIGN AT ATTRIBUTE AUTHOR AUTO AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP BEFORE BELL BINARY BIT BITS BLANK BLINK BLOCK BOOLEAN BOTTOM BY CALL CANCEL CD CF CH CHARACTER CHARACTERS CLASS CLOCK-UNITS CLOSE COBOL CODE CODE-SET COL COLLATING COLUMN COMMA COMMIT COMMITMENT COMMON COMMUNICATION COMP COMP-0 COMP-1 COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS CONVERTING COPY CORR CORRESPONDING COUNT CRT CRT-UNDER CURRENCY CURRENT CURSOR DATA DATE DATE-COMPILED DATE-WRITTEN DAY DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION DOWN DROP DUPLICATE DUPLICATES DYNAMIC EBCDIC EGI EJECT ELSE EMI EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT END-UNSTRING END-WRITE END-XML ENTER ENTRY ENVIRONMENT EOP EQUAL EQUALS ERASE ERROR ESI EVALUATE EVERY EXCEEDS EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL FILE-STREAM FILES FILLER FINAL FIND FINISH FIRST FOOTING FOR FOREGROUND-COLOR FOREGROUND-COLOUR FORMAT FREE FROM FULL FUNCTION GENERATE GET GIVING GLOBAL GO GOBACK GREATER GROUP HEADING HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL ID IDENTIFICATION IF IN INDEX INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED INDIC INDICATE INDICATOR INDICATORS INITIAL INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT INSTALLATION INTO INVALID INVOKE IS JUST JUSTIFIED KANJI KEEP KEY LABEL LAST LD LEADING LEFT LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE LOCALE LOCALLY LOCK MEMBER MEMORY MERGE MESSAGE METACLASS MODE MODIFIED MODIFY MODULES MOVE MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE NEXT NO NO-ECHO NONE NOT NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS OF OFF OMITTED ON ONLY OPEN OPTIONAL OR ORDER ORGANIZATION OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL PADDING PAGE PAGE-COUNTER PARSE PERFORM PF PH PIC PICTURE PLUS POINTER POSITION POSITIVE PREFIX PRESENT PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID PROMPT PROTECTED PURGE QUEUE QUOTE QUOTES RANDOM RD READ READY REALM RECEIVE RECONNECT RECORD RECORD-NAME RECORDS RECURSIVE REDEFINES REEL REFERENCE REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE REMAINDER REMOVAL RENAMES REPEATED REPLACE REPLACING REPORT REPORTING REPORTS REPOSITORY REQUIRED RERUN RESERVE RESET RETAINING RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO REVERSED REWIND REWRITE RF RH RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED RUN SAME SCREEN SD SEARCH SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT SELECT SEND SENTENCE SEPARATE SEQUENCE SEQUENTIAL SET SHARED SIGN SIZE SKIP1 SKIP2 SKIP3 SORT SORT-MERGE SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 START STARTING STATUS STOP STORE STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT TABLE TALLYING TAPE TENANT TERMINAL TERMINATE TEST TEXT THAN THEN THROUGH THRU TIME TIMES TITLE TO TOP TRAILING TRAILING-SIGN TRANSACTION TYPE TYPEDEF UNDERLINE UNEQUAL UNIT UNSTRING UNTIL UP UPDATE UPON USAGE USAGE-MODE USE USING VALID VALIDATE VALUE VALUES VARYING VLR WAIT WHEN WHEN-COMPILED WITH WITHIN WORDS WORKING-STORAGE WRITE XML XML-CODE XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL "),R=T("- * ** / + < <= = > >= "),E={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-f]/i,sign:/[+-]/,exponent:/e/i,keyword_char:/[^\s\(\[\;\)\]]/,symbol:/[\w*+\-]/};function M(I,T){if(I==="0"&&T.eat(/x/i)){T.eatWhile(E.hex);return!0};if((I=="+"||I=="-")&&(E.digit.test(T.peek()))){T.eat(E.sign);I=T.next()};if(E.digit.test(I)){T.eat(I);T.eatWhile(E.digit);if("."==T.peek()){T.eat(".");T.eatWhile(E.digit)};if(T.eat(E.exponent)){T.eat(E.sign);T.eatWhile(E.digit)};return!0};return!1};return{startState:function(){return{indentStack:null,indentation:0,mode:!1}},token:function(T,n){if(n.indentStack==null&&T.sol()){n.indentation=6};if(T.eatSpace()){return null};var t=null;switch(n.mode){case"string":var r=!1;while((r=T.next())!=null){if(r=="\""||r=="'"){n.mode=!1;break}};t=A;break;default:var G=T.next();var i=T.column();if(i>=0&&i<=5){t=e} else if(i>=72&&i<=79){T.skipToEnd();t=U} else if(G=="*"&&i==6){T.skipToEnd();t=L} @@ -451,14 +449,14 @@ else{i++}}};if(N&&N.propertyIsEnumerable(T.current().toUpperCase())){t=S} else if(R&&R.propertyIsEnumerable(T.current().toUpperCase())){t=C} else if(I&&I.propertyIsEnumerable(T.current().toUpperCase())){t=O} else t=null}};return t},indent:function(E){if(E.indentStack==null)return E.indentation;return E.indentStack.indent}}});E.defineMIME("text/x-cobol","cobol")}); -/* Include script: haskell */ +/* Include script: haskell.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("haskell",function(e,r){function a(e,r,t){r(t);return t(e,r)};var c=/[a-z_]/,d=/[A-Z]/,n=/\d/,m=/[0-9A-Fa-f]/,h=/[0-7]/,l=/[a-z_A-Z0-9'\xa1-\uffff]/,i=/[-!#$%&*+.\/<=>?@\\^|~:]/,p=/[(),;[\]`{}]/,u=/[ \t\v\f]/;function t(e,t){if(e.eatWhile(u)){return null};var r=e.next();if(p.test(r)){if(r=="{"&&e.eat("-")){var o="comment";if(e.eat("#")){o="meta"};return a(e,t,f(o,1))};return null};if(r=="'"){if(e.eat("\\")){e.next()} else{e.next()};if(e.eat("'")){return"string"};return"string error"};if(r=="\""){return a(e,t,s)};if(d.test(r)){e.eatWhile(l);if(e.eat(".")){return"qualifier"};return"variable-2"};if(c.test(r)){e.eatWhile(l);return"variable"};if(n.test(r)){if(r=="0"){if(e.eat(/[xX]/)){e.eatWhile(m);return"integer"};if(e.eat(/[oO]/)){e.eatWhile(h);return"number"}};e.eatWhile(n);var o="number";if(e.match(/^\.\d+/)){o="number"};if(e.eat(/[eE]/)){o="number";e.eat(/[-+]/);e.eatWhile(n)};return o};if(r=="."&&e.eat("."))return"keyword";if(i.test(r)){if(r=="-"&&e.eat(/-/)){e.eatWhile(/-/);if(!e.eat(i)){e.skipToEnd();return"comment"}};var o="variable";if(r==":"){o="variable-2"};e.eatWhile(i);return o};return"error"};function f(e,r){if(r==0){return t};return function(n,i){var a=r;while(!n.eol()){var o=n.next();if(o=="{"&&n.eat("-")){++a} else if(o=="-"&&n.eat("}")){--a;if(a==0){i(t);return e}}};i(f(e,a));return e}};function s(e,r){while(!e.eol()){var n=e.next();if(n=="\""){r(t);return"string"};if(n=="\\"){if(e.eol()||e.eat(u)){r(g);return"string"};if(e.eat("&")){} else{e.next()}}};r(t);return"string error"};function g(e,r){if(e.eat("\\")){return a(e,r,s)};e.next();r(t);return"error"};var o=(function(){var i={};function e(e){return function(){for(var r=0;r<arguments.length;r++)i[arguments[r]]=e}};e("keyword")("case","class","data","default","deriving","do","else","foreign","if","import","in","infix","infixl","infixr","instance","let","module","newtype","of","then","type","where","_");e("keyword")("\.\.",":","::","=","\\","<-","->","@","~","=>");e("builtin")("!!","$!","$","&&","+","++","-",".","/","/=","<","<=","=<<","==",">",">=",">>",">>=","^","^^","||","*","**");e("builtin")("Bool","Bounded","Char","Double","EQ","Either","Enum","Eq","False","FilePath","Float","Floating","Fractional","Functor","GT","IO","IOError","Int","Integer","Integral","Just","LT","Left","Maybe","Monad","Nothing","Num","Ord","Ordering","Rational","Read","ReadS","Real","RealFloat","RealFrac","Right","Show","ShowS","String","True");e("builtin")("abs","acos","acosh","all","and","any","appendFile","asTypeOf","asin","asinh","atan","atan2","atanh","break","catch","ceiling","compare","concat","concatMap","const","cos","cosh","curry","cycle","decodeFloat","div","divMod","drop","dropWhile","either","elem","encodeFloat","enumFrom","enumFromThen","enumFromThenTo","enumFromTo","error","even","exp","exponent","fail","filter","flip","floatDigits","floatRadix","floatRange","floor","fmap","foldl","foldl1","foldr","foldr1","fromEnum","fromInteger","fromIntegral","fromRational","fst","gcd","getChar","getContents","getLine","head","id","init","interact","ioError","isDenormalized","isIEEE","isInfinite","isNaN","isNegativeZero","iterate","last","lcm","length","lex","lines","log","logBase","lookup","map","mapM","mapM_","max","maxBound","maximum","maybe","min","minBound","minimum","mod","negate","not","notElem","null","odd","or","otherwise","pi","pred","print","product","properFraction","putChar","putStr","putStrLn","quot","quotRem","read","readFile","readIO","readList","readLn","readParen","reads","readsPrec","realToFrac","recip","rem","repeat","replicate","return","reverse","round","scaleFloat","scanl","scanl1","scanr","scanr1","seq","sequence","sequence_","show","showChar","showList","showParen","showString","shows","showsPrec","significand","signum","sin","sinh","snd","span","splitAt","sqrt","subtract","succ","sum","tail","take","takeWhile","tan","tanh","toEnum","toInteger","toRational","truncate","uncurry","undefined","unlines","until","unwords","unzip","unzip3","userError","words","writeFile","zip","zip3","zipWith","zipWith3");var t=r.overrideKeywords;if(t)for(var n in t)if(t.hasOwnProperty(n))i[n]=t[n];return i})();return{startState:function(){return{f:t}},copyState:function(e){return{f:e.f}},token:function(e,r){var n=r.f(e,function(e){r.f=e}),t=e.current();return o.hasOwnProperty(t)?o[t]:n},blockCommentStart:"{-",blockCommentEnd:"-}",lineComment:"--"}});e.defineMIME("text/x-haskell","haskell")}); -/* Include script: mathematica */ +/* Include script: mathematica.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('mathematica',function(e,t){var n='[a-zA-Z\\$][a-zA-Z0-9\\$]*',o='(?:\\d+)',a='(?:\\.\\d+|\\d+\\.\\d*|\\d+)',m='(?:\\.\\w+|\\w+\\.\\w*|\\w+)',i='(?:`(?:`?'+a+')?)',c=new RegExp('(?:'+o+'(?:\\^\\^'+m+i+'?(?:\\*\\^[+-]?\\d+)?))'),f=new RegExp('(?:'+a+i+'?(?:\\*\\^[+-]?\\d+)?)'),u=new RegExp('(?:`?)(?:'+n+')(?:`(?:'+n+'))*(?:`?)');function r(e,t){var r;r=e.next();if(r==='"'){t.tokenize=z;return t.tokenize(e,t)};if(r==='('){if(e.eat('*')){t.commentLevel++;t.tokenize=l;return t.tokenize(e,t)}};e.backUp(1);if(e.match(c,!0,!1)){return'number'};if(e.match(f,!0,!1)){return'number'};if(e.match(/(?:In|Out)\[[0-9]*\]/,!0,!1)){return'atom'};if(e.match(/([a-zA-Z\$]+(?:`?[a-zA-Z0-9\$])*::usage)/,!0,!1)){return'meta'};if(e.match(/([a-zA-Z\$]+(?:`?[a-zA-Z0-9\$])*::[a-zA-Z\$][a-zA-Z0-9\$]*):?/,!0,!1)){return'string-2'};if(e.match(/([a-zA-Z\$][a-zA-Z0-9\$]*\s*:)(?:(?:[a-zA-Z\$][a-zA-Z0-9\$]*)|(?:[^:=>~@\^\&\*\)\[\]'\?,\|])).*/,!0,!1)){return'variable-2'};if(e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)){return'variable-2'};if(e.match(/[a-zA-Z\$][a-zA-Z0-9\$]*_+/,!0,!1)){return'variable-2'};if(e.match(/_+[a-zA-Z\$][a-zA-Z0-9\$]*/,!0,!1)){return'variable-2'};if(e.match(/\\\[[a-zA-Z\$][a-zA-Z0-9\$]*\]/,!0,!1)){return'variable-3'};if(e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)){return'bracket'};if(e.match(/(?:#[a-zA-Z\$][a-zA-Z0-9\$]*|#+[0-9]?)/,!0,!1)){return'variable-2'};if(e.match(u,!0,!1)){return'keyword'};if(e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%)/,!0,!1)){return'operator'};e.next();return'error'};function z(e,t){var a,i=!1,n=!1;while((a=e.next())!=null){if(a==='"'&&!n){i=!0;break};n=!n&&a==='\\'};if(i&&!n){t.tokenize=r};return'string'};function l(t,e){var a,n;while(e.commentLevel>0&&(n=t.next())!=null){if(a==='('&&n==='*')e.commentLevel++;if(a==='*'&&n===')')e.commentLevel--;a=n};if(e.commentLevel<=0){e.tokenize=r};return'comment'};return{startState:function(){return{tokenize:r,commentLevel:0}},token:function(e,t){if(e.eatSpace())return null;return t.tokenize(e,t)},blockCommentStart:'(*',blockCommentEnd:'*)'}});e.defineMIME('text/x-mathematica',{name:'mathematica'})}); -/* Include script: pug */ +/* Include script: pug.min.js */ (function(t){if(typeof exports=='object'&&typeof module=='object')t(require('../../lib/codemirror'),require('../javascript/javascript'),require('../css/css'),require('../htmlmixed/htmlmixed'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../javascript/javascript','../css/css','../htmlmixed/htmlmixed'],t);else t(CodeMirror)})(function(t){'use strict';t.defineMode('pug',function(e){var i='keyword',p='meta',l='builtin',h='qualifier',s={'{':'}','(':')','[':']'};var n=t.getMode(e,'javascript');function r(){this.javaScriptLine=!1;this.javaScriptLineExcludesColon=!1;this.javaScriptArguments=!1;this.javaScriptArgumentsDepth=0;this.isInterpolating=!1;this.interpolationNesting=0;this.jsState=t.startState(n);this.restOfLine='';this.isIncludeFiltered=!1;this.isEach=!1;this.lastTag='';this.scriptType='';this.isAttrs=!1;this.attrsNest=[];this.inAttributeName=!0;this.attributeIsType=!1;this.attrValue='';this.indentOf=Infinity;this.indentToken='';this.innerMode=null;this.innerState=null;this.innerModeForLine=!1};r.prototype.copy=function(){var e=new r();e.javaScriptLine=this.javaScriptLine;e.javaScriptLineExcludesColon=this.javaScriptLineExcludesColon;e.javaScriptArguments=this.javaScriptArguments;e.javaScriptArgumentsDepth=this.javaScriptArgumentsDepth;e.isInterpolating=this.isInterpolating;e.interpolationNesting=this.interpolationNesting;e.jsState=t.copyState(n,this.jsState);e.innerMode=this.innerMode;if(this.innerMode&&this.innerState){e.innerState=t.copyState(this.innerMode,this.innerState)};e.restOfLine=this.restOfLine;e.isIncludeFiltered=this.isIncludeFiltered;e.isEach=this.isEach;e.lastTag=this.lastTag;e.scriptType=this.scriptType;e.isAttrs=this.isAttrs;e.attrsNest=this.attrsNest.slice();e.inAttributeName=this.inAttributeName;e.attributeIsType=this.attributeIsType;e.attrValue=this.attrValue;e.indentOf=this.indentOf;e.indentToken=this.indentToken;e.innerModeForLine=this.innerModeForLine;return e};function d(t,e){if(t.sol()){e.javaScriptLine=!1;e.javaScriptLineExcludesColon=!1};if(e.javaScriptLine){if(e.javaScriptLineExcludesColon&&t.peek()===':'){e.javaScriptLine=!1;e.javaScriptLineExcludesColon=!1;return};var i=n.token(t,e.jsState);if(t.eol())e.javaScriptLine=!1;return i||!0}};function m(t,e){if(e.javaScriptArguments){if(e.javaScriptArgumentsDepth===0&&t.peek()!=='('){e.javaScriptArguments=!1;return};if(t.peek()==='('){e.javaScriptArgumentsDepth++} else if(t.peek()===')'){e.javaScriptArgumentsDepth--};if(e.javaScriptArgumentsDepth===0){e.javaScriptArguments=!1;return};var i=n.token(t,e.jsState);return i||!0}};function v(t){if(t.match(/^yield\b/)){return'keyword'}};function S(t){if(t.match(/^(?:doctype) *([^\n]+)?/)){return p}};function c(t,e){if(t.match('#{')){e.isInterpolating=!0;e.interpolationNesting=0;return'punctuation'}};function g(t,e){if(e.isInterpolating){if(t.peek()==='}'){e.interpolationNesting--;if(e.interpolationNesting<0){t.next();e.isInterpolating=!1;return'punctuation'}} else if(t.peek()==='{'){e.interpolationNesting++};return n.token(t,e.jsState)||!0}};function j(t,e){if(t.match(/^case\b/)){e.javaScriptLine=!0;return i}};function b(t,e){if(t.match(/^when\b/)){e.javaScriptLine=!0;e.javaScriptLineExcludesColon=!0;return i}};function L(t){if(t.match(/^default\b/)){return i}};function A(t,e){if(t.match(/^extends?\b/)){e.restOfLine='string';return i}};function y(t,e){if(t.match(/^append\b/)){e.restOfLine='variable';return i}};function k(t,e){if(t.match(/^prepend\b/)){e.restOfLine='variable';return i}};function M(t,e){if(t.match(/^block\b *(?:(prepend|append)\b)?/)){e.restOfLine='variable';return i}};function T(t,e){if(t.match(/^include\b/)){e.restOfLine='string';return i}};function x(t,e){if(t.match(/^include:([a-zA-Z0-9\-]+)/,!1)&&t.match('include')){e.isIncludeFiltered=!0;return i}};function I(t,e){if(e.isIncludeFiltered){var i=u(t,e);e.isIncludeFiltered=!1;e.restOfLine='string';return i}};function N(t,e){if(t.match(/^mixin\b/)){e.javaScriptLine=!0;return i}};function O(t,e){if(t.match(/^\+([-\w]+)/)){if(!t.match(/^\( *[-\w]+ *=/,!1)){e.javaScriptArguments=!0;e.javaScriptArgumentsDepth=0};return'variable'};if(t.match(/^\+#{/,!1)){t.next();e.mixinCallAfter=!0;return c(t,e)}};function w(t,e){if(e.mixinCallAfter){e.mixinCallAfter=!1;if(!t.match(/^\( *[-\w]+ *=/,!1)){e.javaScriptArguments=!0;e.javaScriptArgumentsDepth=0};return!0}};function E(t,e){if(t.match(/^(if|unless|else if|else)\b/)){e.javaScriptLine=!0;return i}};function C(t,e){if(t.match(/^(- *)?(each|for)\b/)){e.isEach=!0;return i}};function F(t,e){if(e.isEach){if(t.match(/^ in\b/)){e.javaScriptLine=!0;e.isEach=!1;return i} @@ -470,16 +468,16 @@ else if(e.lastTag==='style'){i='css'};a(t,e,i);return'dot'}};function st(t){t.ne else{n.indentToken='string'}};function f(e,i,n){if(e.indentation()>i.indentOf||(i.innerModeForLine&&!e.sol())||n){if(i.innerMode){if(!i.innerState){i.innerState=i.innerMode.startState?t.startState(i.innerMode,e.indentation()):{}};return e.hideFirstChars(i.indentOf+2,function(){return i.innerMode.token(e,i.innerState)||!0})} else{e.skipToEnd();return i.indentToken}} else if(e.sol()){i.indentOf=Infinity;i.indentToken=null;i.innerMode=null;i.innerState=null}};function ct(t,e){if(t.sol()){e.restOfLine=''};if(e.restOfLine){t.skipToEnd();var i=e.restOfLine;e.restOfLine='';return i}};function ut(){return new r()};function ot(t){return t.copy()};function ft(t,e){var i=f(t,e)||ct(t,e)||g(t,e)||I(t,e)||F(t,e)||o(t,e)||d(t,e)||m(t,e)||w(t,e)||v(t,e)||S(t,e)||c(t,e)||j(t,e)||b(t,e)||L(t,e)||A(t,e)||y(t,e)||k(t,e)||M(t,e)||T(t,e)||x(t,e)||N(t,e)||O(t,e)||E(t,e)||C(t,e)||D(t,e)||V(t,e)||u(t,e)||q(t,e)||U(t,e)||Z(t,e)||z(t,e)||tt(t,e)||et(t,e)||rt(t,e)||it(t,e)||nt(t,e)||at(t,e)||st(t,e);return i===!0?null:i};return{startState:ut,copyState:ot,token:ft}},'javascript','css','htmlmixed');t.defineMIME('text/x-pug','pug');t.defineMIME('text/x-jade','pug')}); -/* Include script: livescript */ +/* Include script: livescript.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('livescript',function(){var e=function(e,n){var g=n.next||'start';if(g){n.next=n.next;var i=t[g];if(i.splice){for(var o=0;o<i.length;++o){var r=i[o];if(r.regex&&e.match(r.regex)){n.next=r.next||n.next;return r.token}};e.next();return'error'};if(e.match(r=t[g])){if(r.regex&&e.match(r.regex)){n.next=r.next;return r.token} else{e.next();return'error'}}};e.next();return'error'},r={startState:function(){return{next:'start',lastToken:{style:null,indent:0,content:''}}},token:function(t,r){while(t.pos==t.start)var n=e(t,r);r.lastToken={style:n,indent:t.indentation(),content:t.current()};return n.replace(/\./g,' ')},indent:function(e){var t=e.lastToken.indent;if(e.lastToken.content.match(l)){t+=2};return t}};return r});var g='(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*',l=RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*'+g+')?))\\s*$'),r='(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))',n={token:'string',regex:'.+'};var t={start:[{token:'comment.doc',regex:'/\\*',next:'comment'},{token:'comment',regex:'#.*'},{token:'keyword',regex:'(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)'+r},{token:'constant.language',regex:'(?:true|false|yes|no|on|off|null|void|undefined)'+r},{token:'invalid.illegal',regex:'(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)'+r},{token:'language.support.class',regex:'(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)'+r},{token:'language.support.function',regex:'(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)'+r},{token:'variable.language',regex:'(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)'+r},{token:'identifier',regex:g+'\\s*:(?![:=])'},{token:'variable',regex:g},{token:'keyword.operator',regex:'(?:\\.{3}|\\s+\\?)'},{token:'keyword.variable',regex:'(?:@+|::|\\.\\.)',next:'key'},{token:'keyword.operator',regex:'\\.\\s*',next:'key'},{token:'string',regex:'\\\\\\S[^\\s,;)}\\]]*'},{token:'string.doc',regex:'\'\'\'',next:'qdoc'},{token:'string.doc',regex:'"""',next:'qqdoc'},{token:'string',regex:'\'',next:'qstring'},{token:'string',regex:'"',next:'qqstring'},{token:'string',regex:'`',next:'js'},{token:'string',regex:'<\\[',next:'words'},{token:'string.regex',regex:'//',next:'heregex'},{token:'string.regex',regex:'\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}',next:'key'},{token:'constant.numeric',regex:'(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)'},{token:'lparen',regex:'[({[]'},{token:'rparen',regex:'[)}\\]]',next:'key'},{token:'keyword.operator',regex:'\\S+'},{token:'text',regex:'\\s+'}],heregex:[{token:'string.regex',regex:'.*?//[gimy$?]{0,4}',next:'start'},{token:'string.regex',regex:'\\s*#{'},{token:'comment.regex',regex:'\\s+(?:#.*)?'},{token:'string.regex',regex:'\\S+'}],key:[{token:'keyword.operator',regex:'[.?@!]+'},{token:'identifier',regex:g,next:'start'},{token:'text',regex:'',next:'start'}],comment:[{token:'comment.doc',regex:'.*?\\*/',next:'start'},{token:'comment.doc',regex:'.+'}],qdoc:[{token:'string',regex:'.*?\'\'\'',next:'key'},n],qqdoc:[{token:'string',regex:'.*?"""',next:'key'},n],qstring:[{token:'string',regex:'[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'',next:'key'},n],qqstring:[{token:'string',regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:'key'},n],js:[{token:'string',regex:'[^\\\\`]*(?:\\\\.[^\\\\`]*)*`',next:'key'},n],words:[{token:'string',regex:'.*?\\]>',next:'key'},n]};for(var s in t){var i=t[s];if(i.splice){for(var o=0,a=i.length;o<a;++o){var x=i[o];if(typeof x.regex==='string'){t[s][o].regex=new RegExp('^'+x.regex)}}} else if(typeof x.regex==='string'){t[s].regex=new RegExp('^'+i.regex)}};e.defineMIME('text/x-livescript','livescript')}); -/* Include script: yaml-frontmatter */ +/* Include script: yaml-frontmatter.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../yaml/yaml'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../yaml/yaml'],e);else e(CodeMirror)})(function(e){var n=0,r=1,t=2;e.defineMode('yaml-frontmatter',function(i,f){var o=e.getMode(i,'yaml'),a=e.getMode(i,f&&f.base||'gfm');function u(e){return e.state==t?a:o};return{startState:function(){return{state:n,inner:e.startState(o)}},copyState:function(t){return{state:t.state,inner:e.copyState(u(t),t.inner)}},token:function(i,f){if(f.state==n){if(i.match(/---/,!1)){f.state=r;return o.token(i,f.inner)} else{f.state=t;f.inner=e.startState(a);return a.token(i,f.inner)}} else if(f.state==r){var u=i.sol()&&i.match(/---/,!1),s=o.token(i,f.inner);if(u){f.state=t;f.inner=e.startState(a)};return s} else{return a.token(i,f.inner)}},innerMode:function(e){return{mode:u(e),state:e.inner}},blankLine:function(e){var t=u(e);if(t.blankLine)return t.blankLine(e.inner)}}})}); -/* Include script: stylus */ +/* Include script: stylus.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('stylus',function(b){var z=b.indentUnit,E='',H=t(i),N=/^(a|b|i|s|col|em)$/i,I=t(o),T=t(l),ee=t(d),te=t(c),re=t(r),ie=f(r),ae=t(n),ne=t(a),oe=t(s),le=/^\s*([.]{2,3}|&&|\|\||\*\*|[?!=:]?=|[-+*\/%<>]=?|\?:|\~)/,se=f(u),ce=t(m),A=new RegExp(/^\-(moz|ms|o|webkit)-/i),de=t(p),W='',w={},v,q,M,h;while(E.length<z)E+=' ';function ue(e,t){W=e.string.match(/(^[\w-]+\s*=\s*$)|(^\s*[\w-]+\s*=\s*[\w-])|(^\s*(\.|#|@|\$|\&|\[|\d|\+|::?|\{|\>|~|\/)?\s*[\w-]*([a-z0-9-]|\*|\/\*)(\(|,)?)/);t.context.line.firstWord=W?W[0].replace(/^\s*/,''):'';t.context.line.indent=e.indentation();v=e.peek();if(e.match('//')){e.skipToEnd();return['comment','comment']};if(e.match('/*')){t.tokenize=O;return O(e,t)};if(v=='"'||v=='\''){e.next();t.tokenize=R(v);return t.tokenize(e,t)};if(v=='@'){e.next();e.eatWhile(/[\w\\-]/);return['def',e.current()]};if(v=='#'){e.next();if(e.match(/^[0-9a-f]{6}|[0-9a-f]{3}/i)){return['atom','atom']};if(e.match(/^[a-z][\w-]*/i)){return['builtin','hash']}};if(e.match(A)){return['meta','vendor-prefixes']};if(e.match(/^-?[0-9]?\.?[0-9]/)){e.eatWhile(/[a-z%]/i);return['number','unit']};if(v=='!'){e.next();return[e.match(/^(important|optional)/i)?'keyword':'operator','important']};if(v=='.'&&e.match(/^\.[a-z][\w-]*/i)){return['qualifier','qualifier']};if(e.match(ie)){if(e.peek()=='(')t.tokenize=me;return['property','word']};if(e.match(/^[a-z][\w-]*\(/i)){e.backUp(1);return['keyword','mixin']};if(e.match(/^(\+|-)[a-z][\w-]*\(/i)){e.backUp(1);return['keyword','block-mixin']};if(e.string.match(/^\s*&/)&&e.match(/^[-_]+[a-z][\w-]*/)){return['qualifier','qualifier']};if(e.match(/^(\/|&)(-|_|:|\.|#|[a-z])/)){e.backUp(1);return['variable-3','reference']};if(e.match(/^&{1}\s*$/)){return['variable-3','reference']};if(e.match(se)){return['operator','operator']};if(e.match(/^\$?[-_]*[a-z0-9]+[\w-]*/i)){if(e.match(/^(\.|\[)[\w-'"\]]+/i,!1)){if(!x(e.current())){e.match(/\./);return['variable-2','variable-name']}};return['variable-2','word']};if(e.match(le)){return['operator',e.current()]};if(/[:;,{}\[\]\(\)]/.test(v)){e.next();return[null,v]};e.next();return[null,null]};function O(e,t){var i=!1,r;while((r=e.next())!=null){if(i&&r=='/'){t.tokenize=null;break};i=(r=='*')};return['comment','comment']};function R(e){return function(t,r){var i=!1,a;while((a=t.next())!=null){if(a==e&&!i){if(e==')')t.backUp(1);break};i=!i&&a=='\\'};if(a==e||!i&&e!=')')r.tokenize=null;return['string','string']}};function me(e,t){e.next();if(!e.match(/\s*["')]/,!1))t.tokenize=R(')');else t.tokenize=null;return[null,'(']};function S(e,t,r,i){this.type=e;this.indent=t;this.prev=r;this.line=i||{firstWord:'',indent:0}};function e(e,t,r,i){i=i>=0?i:z;e.context=new S(r,t.indentation()+i,e.context);return r};function j(e,t){var r=e.context.indent-z;t=t||!1;e.context=e.context.prev;if(t)e.context.indent=r;return e.context.type};function pe(e,t,r){return w[r.context.type](e,t,r)};function U(e,t,r,i){for(var a=i||1;a>0;a--)r.context=r.context.prev;return pe(e,t,r)};function x(e){return e.toLowerCase()in H};function C(e){e=e.toLowerCase();return e in I||e in oe};function B(e){return e.toLowerCase()in ce};function X(e){return e.toLowerCase().match(A)};function L(e){var r=e.toLowerCase(),t='variable-2';if(x(e))t='tag';else if(B(e))t='block-keyword';else if(C(e))t='property';else if(r in ee||r in de)t='atom';else if(r=='return'||r in te)t='keyword';else if(e.match(/^[A-Z]/))t='string';return t};function Y(e,t){return((k(t)&&(e=='{'||e==']'||e=='hash'||e=='qualifier'))||e=='block-mixin')};function Z(e,t){return e=='{'&&t.match(/^\s*\$?[\w-]+/i,!1)};function F(e,t){return e==':'&&t.match(/^[a-z-]+/,!1)};function P(e){return e.sol()||e.string.match(new RegExp('^\\s*'+g(e.current())))};function k(e){return e.eol()||e.match(/^\s*$/,!1)};function y(e){var t=/^\s*[-_]*[a-z0-9]+[\w-]*/i,r=typeof e=='string'?e.match(t):e.string.match(t);return r?r[0].replace(/^\s*/,''):''};w.block=function(r,t,i){if((r=='comment'&&P(t))||(r==','&&k(t))||r=='mixin'){return e(i,t,'block',0)};if(Z(r,t)){return e(i,t,'interpolation')};if(k(t)&&r==']'){if(!/^\s*(\.|#|:|\[|\*|&)/.test(t.string)&&!x(y(t))){return e(i,t,'block',0)}};if(Y(r,t)){return e(i,t,'block')};if(r=='}'&&k(t)){return e(i,t,'block',0)};if(r=='variable-name'){if(t.string.match(/^\s?\$[\w-\.\[\]'"]+$/)||B(y(t))){return e(i,t,'variableName')} else{return e(i,t,'variableName',0)}};if(r=='='){if(!k(t)&&!B(y(t))){return e(i,t,'block',0)};return e(i,t,'block')};if(r=='*'){if(k(t)||t.match(/\s*(,|\.|#|\[|:|{)/,!1)){h='tag';return e(i,t,'block')}};if(F(r,t)){return e(i,t,'pseudo')};if(/@(font-face|media|supports|(-moz-)?document)/.test(r)){return e(i,t,k(t)?'block':'atBlock')};if(/@(-(moz|ms|o|webkit)-)?keyframes$/.test(r)){return e(i,t,'keyframes')};if(/@extends?/.test(r)){return e(i,t,'extend',0)};if(r&&r.charAt(0)=='@'){if(t.indentation()>0&&C(t.current().slice(1))){h='variable-2';return'block'};if(/(@import|@require|@charset)/.test(r)){return e(i,t,'block',0)};return e(i,t,'block')};if(r=='reference'&&k(t)){return e(i,t,'block')};if(r=='('){return e(i,t,'parens')};if(r=='vendor-prefixes'){return e(i,t,'vendorPrefixes')};if(r=='word'){var a=t.current();h=L(a);if(h=='property'){if(P(t)){return e(i,t,'block',0)} else{h='atom';return'block'}};if(h=='tag'){if(/embed|menu|pre|progress|sub|table/.test(a)){if(C(y(t))){h='atom';return'block'}};if(t.string.match(new RegExp('\\[\\s*'+a+'|'+a+'\\s*\\]'))){h='atom';return'block'};if(N.test(a)){if((P(t)&&t.string.match(/=/))||(!P(t)&&!t.string.match(/^(\s*\.|#|\&|\[|\/|>|\*)/)&&!x(y(t)))){h='variable-2';if(B(y(t)))return'block';return e(i,t,'block',0)}};if(k(t))return e(i,t,'block')};if(h=='block-keyword'){h='keyword';if(t.current(/(if|unless)/)&&!P(t)){return'block'};return e(i,t,'block')};if(a=='return')return e(i,t,'block',0);if(h=='variable-2'&&t.string.match(/^\s?\$[\w-\.\[\]'"]+$/)){return e(i,t,'block')}};return i.context.type};w.parens=function(t,r,i){if(t=='(')return e(i,r,'parens');if(t==')'){if(i.context.prev.type=='parens'){return j(i)};if((r.string.match(/^[a-z][\w-]*\(/i)&&k(r))||B(y(r))||/(\.|#|:|\[|\*|&|>|~|\+|\/)/.test(y(r))||(!r.string.match(/^-?[a-z][\w-\.\[\]'"]*\s*=/)&&x(y(r)))){return e(i,r,'block')};if(r.string.match(/^[\$-]?[a-z][\w-\.\[\]'"]*\s*=/)||r.string.match(/^\s*(\(|\)|[0-9])/)||r.string.match(/^\s+[a-z][\w-]*\(/i)||r.string.match(/^\s+[\$-]?[a-z]/i)){return e(i,r,'block',0)};if(k(r))return e(i,r,'block');else return e(i,r,'block',0)};if(t&&t.charAt(0)=='@'&&C(r.current().slice(1))){h='variable-2'};if(t=='word'){var a=r.current();h=L(a);if(h=='tag'&&N.test(a)){h='variable-2'};if(h=='property'||a=='to')h='atom'};if(t=='variable-name'){return e(i,r,'variableName')};if(F(t,r)){return e(i,r,'pseudo')};return i.context.type};w.vendorPrefixes=function(t,r,i){if(t=='word'){h='property';return e(i,r,'block',0)};return j(i)};w.pseudo=function(t,r,i){if(!C(y(r.string))){r.match(/^[a-z-]+/);h='variable-3';if(k(r))return e(i,r,'block');return j(i)};return U(t,r,i)};w.atBlock=function(t,r,i){if(t=='(')return e(i,r,'atBlock_parens');if(Y(t,r)){return e(i,r,'block')};if(Z(t,r)){return e(i,r,'interpolation')};if(t=='word'){var a=r.current().toLowerCase();if(/^(only|not|and|or)$/.test(a))h='keyword';else if(re.hasOwnProperty(a))h='tag';else if(ne.hasOwnProperty(a))h='attribute';else if(ae.hasOwnProperty(a))h='property';else if(T.hasOwnProperty(a))h='string-2';else h=L(r.current());if(h=='tag'&&k(r)){return e(i,r,'block')}};if(t=='operator'&&/^(not|and|or)$/.test(r.current())){h='keyword'};return i.context.type};w.atBlock_parens=function(t,r,i){if(t=='{'||t=='}')return i.context.type;if(t==')'){if(k(r))return e(i,r,'block');else return e(i,r,'atBlock')};if(t=='word'){var a=r.current().toLowerCase();h=L(a);if(/^(max|min)/.test(a))h='property';if(h=='tag'){N.test(a)?h='variable-2':h='atom'};return i.context.type};return w.atBlock(t,r,i)};w.keyframes=function(t,r,i){if(r.indentation()=='0'&&((t=='}'&&P(r))||t==']'||t=='hash'||t=='qualifier'||x(r.current()))){return U(t,r,i)};if(t=='{')return e(i,r,'keyframes');if(t=='}'){if(P(r))return j(i,!0);else return e(i,r,'keyframes')};if(t=='unit'&&/^[0-9]+\%$/.test(r.current())){return e(i,r,'keyframes')};if(t=='word'){h=L(r.current());if(h=='block-keyword'){h='keyword';return e(i,r,'keyframes')}};if(/@(font-face|media|supports|(-moz-)?document)/.test(t)){return e(i,r,k(r)?'block':'atBlock')};if(t=='mixin'){return e(i,r,'block',0)};return i.context.type};w.interpolation=function(t,r,i){if(t=='{')j(i)&&e(i,r,'block');if(t=='}'){if(r.string.match(/^\s*(\.|#|:|\[|\*|&|>|~|\+|\/)/i)||(r.string.match(/^\s*[a-z]/i)&&x(y(r)))){return e(i,r,'block')};if(!r.string.match(/^(\{|\s*\&)/)||r.match(/\s*[\w-]/,!1)){return e(i,r,'block',0)};return e(i,r,'block')};if(t=='variable-name'){return e(i,r,'variableName',0)};if(t=='word'){h=L(r.current());if(h=='tag')h='atom'};return i.context.type};w.extend=function(e,t,r){if(e=='['||e=='=')return'extend';if(e==']')return j(r);if(e=='word'){h=L(t.current());return'extend'};return j(r)};w.variableName=function(e,t,r){if(e=='string'||e=='['||e==']'||t.current().match(/^(\.|\$)/)){if(t.current().match(/^\.[\w-]+/i))h='variable-2';return'variableName'};return U(e,t,r)};return{startState:function(e){return{tokenize:null,state:'block',context:new S('block',e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;q=(t.tokenize||ue)(e,t);if(q&&typeof q=='object'){M=q[1];q=q[0]};h=q;t.state=w[t.state](M,e,t);return h},indent:function(e,t,r){var l=e.context,s=t&&t.charAt(0),n=l.indent,c=y(t),o=r.match(/^\s*/)[0].replace(/\t/g,E).length,i=e.context.prev?e.context.prev.line.firstWord:'',a=e.context.prev?e.context.prev.line.indent:o;if(l.prev&&(s=='}'&&(l.type=='block'||l.type=='atBlock'||l.type=='keyframes')||s==')'&&(l.type=='parens'||l.type=='atBlock_parens')||s=='{'&&(l.type=='at'))){n=l.indent-z} @@ -492,7 +490,7 @@ else if(/^\{/.test(i)){n=o<=a?o:a+z} else if(X(i)||C(i)){n=o>=a?a:o} else if(/^(\.|#|:|\[|\*|&|@|\+|\-|>|~|\/)/.test(i)||/=\s*$/.test(i)||x(i)||/^\$[\w-\.\[\]'"]/.test(i)){n=a+z} else{n=o}}};return n},electricChars:'}',lineComment:'//',fold:'indent'}});var i=['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'],r=['domain','regexp','url','url-prefix'],a=['all','aural','braille','handheld','print','projection','screen','tty','tv','embossed'],n=['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'],o=['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'],l=['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'],s=['font-family','src','unicode-range','font-variant','font-feature-settings','font-stretch','font-weight','font-style'],c=['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'],d=['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','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','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','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','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'],u=['in','and','or','not','is not','is a','is','isnt','defined','if unless'],m=['for','if','else','unless','from','to'],p=['null','true','false','href','title','type','not-allowed','readonly','disabled'],h=['@font-face','@keyframes','@media','@viewport','@page','@host','@supports','@block','@css'],b=i.concat(r,a,n,o,l,c,d,s,u,m,p,h);function f(e){e=e.sort(function(e,t){return t>e});return new RegExp('^(('+e.join(')|(')+'))\\b')};function t(e){var r={};for(var t=0;t<e.length;++t)r[e[t]]=!0;return r};function g(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,'\\$&')};e.registerHelper('hintWords','stylus',b);e.defineMIME('text/x-styl','stylus')}); -/* Include script: markdown */ +/* Include script: markdown.min.js */ (function(t){if(typeof exports=='object'&&typeof module=='object')t(require('../../lib/codemirror'),require('../xml/xml'),require('../meta'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../xml/xml','../meta'],t);else t(CodeMirror)})(function(t){'use strict';t.defineMode('markdown',function(r,e){var o=t.getMode(r,'text/html'),E=o.name=='null';function w(e){if(t.findModeByName){var i=t.findModeByName(e);if(i)e=i.mime||i.mimes[0]};var n=t.getMode(r,e);return n.name=='null'?null:n};if(e.highlightFormatting===undefined)e.highlightFormatting=!1;if(e.maxBlockquoteDepth===undefined)e.maxBlockquoteDepth=0;if(e.taskLists===undefined)e.taskLists=!1;if(e.strikethrough===undefined)e.strikethrough=!1;if(e.emoji===undefined)e.emoji=!1;if(e.fencedCodeBlockHighlighting===undefined)e.fencedCodeBlockHighlighting=!0;if(e.xml===undefined)e.xml=!0;if(e.tokenTypeOverrides===undefined)e.tokenTypeOverrides={};var i={header:'header',code:'comment',quote:'quote',list1:'variable-2',list2:'variable-3',list3:'keyword',hr:'hr',image:'image',imageAltText:'image-alt-text',imageMarker:'image-marker',formatting:'formatting',linkInline:'link',linkEmail:'link',linkText:'link',linkHref:'string',em:'em',strong:'strong',strikethrough:'strikethrough',emoji:'builtin'};for(var h in i){if(i.hasOwnProperty(h)&&e.tokenTypeOverrides[h]){i[h]=e.tokenTypeOverrides[h]}};var x=/^([*\-_])(?:\s*\1){2,}\s*$/,v=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,m=/^\[(x| )\](?=\s)/i,L=e.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,T=/^ *(?:\={1,}|-{1,})\s*$/,q=/^[^#!\[\]*_\\<>` "'(~:]+/,M=/^(~~~+|```+)[ \t]*([\w+#-]*)[^\n`]*$/,F=/^\s*\[[^\]]+?\]:\s*\S+(\s*\S*\s*)?$/,l=/[!"#$%&'()*+,\-\.\/:;<=>?@\[\\\]^_`{|}~—]/,b=' ';function g(t,e,i){e.f=e.inline=i;return i(t,e)};function d(t,e,i){e.f=e.block=i;return i(t,e)};function y(t){return!t||!/\S/.test(t.string)};function c(t){t.linkTitle=!1;t.em=!1;t.strong=!1;t.strikethrough=!1;t.quote=0;t.indentedCode=!1;if(t.f==s){t.f=a;t.block=f};t.trailingSpace=0;t.trailingSpaceNewLine=!1;t.prevLine=t.thisLine;t.thisLine={stream:null};return null};function f(a,r){var f=a.column()===r.indentation,u=y(r.prevLine.stream),c=r.indentedCode,k=r.prevLine.hr,d=r.list!==!1,o=(r.listStack[r.listStack.length-1]||0)+3;r.indentedCode=!1;var h=r.indentation;if(r.indentationDiff===null){r.indentationDiff=r.indentation;if(d){r.list=null;while(h<r.listStack[r.listStack.length-1]){r.listStack.pop();if(r.listStack.length){r.indentation=r.listStack[r.listStack.length-1]} else{r.list=!1}};if(r.list!==!1){r.indentationDiff=h-r.listStack[r.listStack.length-1]}}};var S=(!u&&!k&&!r.prevLine.header&&(!d||!c)&&!r.prevLine.fencedCodeEnd),s=(r.list===!1||k||u)&&r.indentation<=o&&a.match(x),l=null;if(r.indentationDiff>=4&&(c||r.prevLine.fencedCodeEnd||r.prevLine.header||u)){a.skipToEnd();r.indentedCode=!0;return i.code} else if(a.eatSpace()){return null} @@ -526,7 +524,7 @@ else{f.backUp(2)}}}};if(e.emoji&&h===':'&&f.match(/^[a-z_\d+-]+:/)){r.emoji=!0;i else if(r.trailingSpace){r.trailingSpaceNewLine=!0}};return n(r)};function k(t,r){var o=t.next();if(o==='>'){r.f=r.inline=a;if(e.highlightFormatting)r.formatting='link';var l=n(r);if(l){l+=' '} else{l=''};return l+i.linkInline};t.match(/^[^>]+/,!0);return i.linkInline};function p(t,i){if(t.eatSpace()){return null};var r=t.next();if(r==='('||r==='['){i.f=i.inline=B(r==='('?')':']');if(e.highlightFormatting)i.formatting='link-string';i.linkHref=!0;return n(i)};return'error'};var S={')':/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,']':/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function B(t){return function(i,r){var o=i.next();if(o===t){r.f=r.inline=a;if(e.highlightFormatting)r.formatting='link-string';var l=n(r);r.linkHref=!1;return l};i.match(S[t]);r.linkHref=!0;return n(r)}};function H(t,i){if(t.match(/^([^\]\\]|\\.)*\]:/,!1)){i.f=D;t.next();if(e.highlightFormatting)i.formatting='link';i.linkText=!0;return n(i)};return g(t,i,a)};function D(t,r){if(t.match(/^\]:/,!0)){r.f=r.inline=A;if(e.highlightFormatting)r.formatting='link';var a=n(r);r.linkText=!1;return a};t.match(/^([^\]\\]|\\.)+/,!0);return i.linkText};function A(t,e){if(t.eatSpace()){return null};t.match(/^[^\s]+/,!0);if(t.peek()===undefined){e.linkTitle=!0} else{t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0)};e.f=e.inline=a;return i.linkHref+' url'};var u={startState:function(){return{f:f,prevLine:{stream:null},thisLine:{stream:null},block:f,htmlState:null,indentation:0,inline:a,text:C,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(o,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(e,t){t.formatting=!1;if(e!=t.thisLine.stream){t.header=0;t.hr=!1;if(e.match(/^\s*$/,!0)){c(t);return null};t.prevLine=t.thisLine;t.thisLine={stream:e};t.taskList=!1;t.trailingSpace=0;t.trailingSpaceNewLine=!1;if(!t.localState){t.f=t.block;if(t.f!=s){var i=e.match(/^\s*/,!0)[0].replace(/\t/g,b).length;t.indentation=i;t.indentationDiff=null;if(i>0)return null}}};return t.f(e,t)},innerMode:function(t){if(t.block==s)return{state:t.htmlState,mode:o};if(t.localState)return{state:t.localState,mode:t.localMode};return{state:t,mode:u}},indent:function(e,i,n){if(e.block==s&&o.indent)return o.indent(e.htmlState,i,n);if(e.localState&&e.localMode.indent)return e.localMode.indent(e.localState,i,n);return t.Pass},blankLine:c,getType:n,closeBrackets:'()[]{}\'\'""``',fold:'markdown'};return u},'xml');t.defineMIME('text/x-markdown','markdown')}); -/* Include script: jsx */ +/* Include script: jsx.min.js */ (function(t){if(typeof exports=='object'&&typeof module=='object')t(require('../../lib/codemirror'),require('../xml/xml'),require('../javascript/javascript'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../xml/xml','../javascript/javascript'],t);else t(CodeMirror)})(function(t){'use strict';function e(t,e,n,i){this.state=t;this.mode=e;this.depth=n;this.prev=i};function n(i){return new e(t.copyState(i.mode,i.state),i.mode,i.depth,i.prev&&n(i.prev))};t.defineMode('jsx',function(i,s){var r=t.getMode(i,{name:'xml',allowMissing:!0,multilineTagIndentPastTag:!1});var a=t.getMode(i,s&&s.base||'javascript');function o(t){var n=t.tagName;t.tagName=null;var e=r.indent(t,'');t.tagName=n;return e};function c(t,e){if(e.context.mode==r)return f(t,e,e.context);else return p(t,e,e.context)};function f(n,f,s){if(s.depth==2){if(n.match(/^.*?\*\//))s.depth=1;else n.skipToEnd();return'comment'};if(n.peek()=='{'){r.skipAttribute(s.state);var d=o(s.state),p=s.state.context;if(p&&n.match(/^[^>]*>\s*$/,!1)){while(p.prev&&!p.startOfLine)p=p.prev;if(p.startOfLine)d-=i.indentUnit;else if(s.prev.state.lexical)d=s.prev.state.lexical.indented} else if(s.depth==1){d+=i.indentUnit};f.context=new e(t.startState(a,d),a,0,f.context);return null};if(s.depth==1){if(n.peek()=='<'){r.skipAttribute(s.state);f.context=new e(t.startState(r,o(s.state)),r,0,f.context);return null} else if(n.match('//')){n.skipToEnd();return'comment'} @@ -534,7 +532,7 @@ else if(n.match('/*')){s.depth=2;return c(n,f)}};var l=r.token(n,s.state),u=n.cu else if(/^</.test(u)){s.depth=1}} else if(!l&&(x=u.indexOf('{'))>-1){n.backUp(u.length-x)};return l};function p(n,s,i){if(n.peek()=='<'&&a.expressionAllowed(n,i.state)){a.skipExpression(i.state);s.context=new e(t.startState(r,a.indent(i.state,'')),r,0,s.context);return null};var c=a.token(n,i.state);if(!c&&i.depth!=null){var o=n.current();if(o=='{'){i.depth++} else if(o=='}'){if(--i.depth==0)s.context=s.context.prev}};return c};return{startState:function(){return{context:new e(t.startState(a),a)}},copyState:function(t){return{context:n(t.context)}},token:c,indent:function(t,e,n){return t.context.mode.indent(t.context.state,e,n)},innerMode:function(t){return t.context}}},'xml','javascript');t.defineMIME('text/jsx','jsx');t.defineMIME('text/typescript-jsx',{name:'jsx',base:{name:'javascript',typescript:!0}})}); -/* Include script: velocity */ +/* Include script: velocity.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('velocity',function(){function r(e){var n={},r=e.split(' ');for(var t=0;t<r.length;++t)n[r[t]]=!0;return n};var i=r('#end #else #break #stop #[[ #]] #{end} #{else} #{break} #{stop}'),e=r('#if #elseif #foreach #set #include #parse #macro #define #evaluate #{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}'),a=r('$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent'),o=/[+\-*&%=<>!?:\/|]/;function t(e,t,n){t.tokenize=n;return n(e,t)};function n(r,n){var k=n.beforeParams;n.beforeParams=!1;var f=r.next();if((f=='\'')&&!n.inString&&n.inParams){n.lastTokenWasBuiltin=!1;return t(r,n,l(f))} else if((f=='"')){n.lastTokenWasBuiltin=!1;if(n.inString){n.inString=!1;return'string'} else if(n.inParams)return t(r,n,l(f))} @@ -547,9 +545,9 @@ else if(f=='$'){r.eatWhile(/[\w\d\$_\.{}]/);if(a&&a.propertyIsEnumerable(r.curre else{n.lastTokenWasBuiltin=!0;n.beforeParams=!0;return'builtin'}} else if(o.test(f)){n.lastTokenWasBuiltin=!1;r.eatWhile(o);return'operator'} else{r.eatWhile(/[\w\$_{}@]/);var c=r.current();if(i&&i.propertyIsEnumerable(c))return'keyword';if(e&&e.propertyIsEnumerable(c)||(r.current().match(/^#@?[a-z0-9_]+ *$/i)&&r.peek()=='(')&&!(e&&e.propertyIsEnumerable(c.toLowerCase()))){n.beforeParams=!0;n.lastTokenWasBuiltin=!1;return'keyword'};if(n.inString){n.lastTokenWasBuiltin=!1;return'string'};if(r.pos>c.length&&r.string.charAt(r.pos-c.length-1)=='.'&&n.lastTokenWasBuiltin)return'builtin';n.lastTokenWasBuiltin=!1;return null}};function l(e){return function(t,r){var i=!1,a,o=!1;while((a=t.next())!=null){if((a==e)&&!i){o=!0;break};if(e=='"'&&t.peek()=='$'&&!i){r.inString=!0;o=!0;break};i=!i&&a=='\\'};if(o)r.tokenize=n;return'string'}};function s(e,t){var i=!1,r;while(r=e.next()){if(r=='#'&&i){t.tokenize=n;break};i=(r=='*')};return'comment'};function u(e,t){var i=0,r;while(r=e.next()){if(r=='#'&&i==2){t.tokenize=n;break};if(r==']')i++;else if(r!=' ')i=0};return'meta'};return{startState:function(){return{tokenize:n,beforeParams:!1,inParams:!1,inString:!1,lastTokenWasBuiltin:!1}},token:function(e,t){if(e.eatSpace())return null;return t.tokenize(e,t)},blockCommentStart:'#*',blockCommentEnd:'*#',lineComment:'##',fold:'velocity'}});e.defineMIME('text/velocity','velocity')}); -/* Include script: fortran */ +/* Include script: fortran.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('fortran',function(){function e(e){var n={};for(var t=0;t<e.length;++t){n[e[t]]=!0};return n};var n=e(['abstract','accept','allocatable','allocate','array','assign','asynchronous','backspace','bind','block','byte','call','case','class','close','common','contains','continue','cycle','data','deallocate','decode','deferred','dimension','do','elemental','else','encode','end','endif','entry','enumerator','equivalence','exit','external','extrinsic','final','forall','format','function','generic','go','goto','if','implicit','import','include','inquire','intent','interface','intrinsic','module','namelist','non_intrinsic','non_overridable','none','nopass','nullify','open','optional','options','parameter','pass','pause','pointer','print','private','program','protected','public','pure','read','recursive','result','return','rewind','save','select','sequence','stop','subroutine','target','then','to','type','use','value','volatile','where','while','write']),i=e(['abort','abs','access','achar','acos','adjustl','adjustr','aimag','aint','alarm','all','allocated','alog','amax','amin','amod','and','anint','any','asin','associated','atan','besj','besjn','besy','besyn','bit_size','btest','cabs','ccos','ceiling','cexp','char','chdir','chmod','clog','cmplx','command_argument_count','complex','conjg','cos','cosh','count','cpu_time','cshift','csin','csqrt','ctime','c_funloc','c_loc','c_associated','c_null_ptr','c_null_funptr','c_f_pointer','c_null_char','c_alert','c_backspace','c_form_feed','c_new_line','c_carriage_return','c_horizontal_tab','c_vertical_tab','dabs','dacos','dasin','datan','date_and_time','dbesj','dbesj','dbesjn','dbesy','dbesy','dbesyn','dble','dcos','dcosh','ddim','derf','derfc','dexp','digits','dim','dint','dlog','dlog','dmax','dmin','dmod','dnint','dot_product','dprod','dsign','dsinh','dsin','dsqrt','dtanh','dtan','dtime','eoshift','epsilon','erf','erfc','etime','exit','exp','exponent','extends_type_of','fdate','fget','fgetc','float','floor','flush','fnum','fputc','fput','fraction','fseek','fstat','ftell','gerror','getarg','get_command','get_command_argument','get_environment_variable','getcwd','getenv','getgid','getlog','getpid','getuid','gmtime','hostnm','huge','iabs','iachar','iand','iargc','ibclr','ibits','ibset','ichar','idate','idim','idint','idnint','ieor','ierrno','ifix','imag','imagpart','index','int','ior','irand','isatty','ishft','ishftc','isign','iso_c_binding','is_iostat_end','is_iostat_eor','itime','kill','kind','lbound','len','len_trim','lge','lgt','link','lle','llt','lnblnk','loc','log','logical','long','lshift','lstat','ltime','matmul','max','maxexponent','maxloc','maxval','mclock','merge','move_alloc','min','minexponent','minloc','minval','mod','modulo','mvbits','nearest','new_line','nint','not','or','pack','perror','precision','present','product','radix','rand','random_number','random_seed','range','real','realpart','rename','repeat','reshape','rrspacing','rshift','same_type_as','scale','scan','second','selected_int_kind','selected_real_kind','set_exponent','shape','short','sign','signal','sinh','sin','sleep','sngl','spacing','spread','sqrt','srand','stat','sum','symlnk','system','system_clock','tan','tanh','time','tiny','transfer','transpose','trim','ttynam','ubound','umask','unlink','unpack','verify','xor','zabs','zcos','zexp','zlog','zsin','zsqrt']),r=e(['c_bool','c_char','c_double','c_double_complex','c_float','c_float_complex','c_funptr','c_int','c_int16_t','c_int32_t','c_int64_t','c_int8_t','c_int_fast16_t','c_int_fast32_t','c_int_fast64_t','c_int_fast8_t','c_int_least16_t','c_int_least32_t','c_int_least64_t','c_int_least8_t','c_intmax_t','c_intptr_t','c_long','c_long_double','c_long_double_complex','c_long_long','c_ptr','c_short','c_signed_char','c_size_t','character','complex','double','integer','logical','real']),t=/[+\-*&=<>\/\:]/,a=new RegExp('(\.and\.|\.or\.|\.eq\.|\.lt\.|\.le\.|\.gt\.|\.ge\.|\.ne\.|\.not\.|\.eqv\.|\.neqv\.)','i');function o(e,l){if(e.match(a)){return'operator'};var o=e.next();if(o=='!'){e.skipToEnd();return'comment'};if(o=='"'||o=='\''){l.tokenize=c(o);return l.tokenize(e,l)};if(/[\[\]\(\),]/.test(o)){return null};if(/\d/.test(o)){e.eatWhile(/[\w\.]/);return'number'};if(t.test(o)){e.eatWhile(t);return'operator'};e.eatWhile(/[\w\$_]/);var s=e.current().toLowerCase();if(n.hasOwnProperty(s)){return'keyword'};if(i.hasOwnProperty(s)||r.hasOwnProperty(s)){return'builtin'};return'variable'};function c(e){return function(t,i){var n=!1,r,a=!1;while((r=t.next())!=null){if(r==e&&!n){a=!0;break};n=!n&&r=='\\'};if(a||!n)i.tokenize=null;return'string'}};return{startState:function(){return{tokenize:null}},token:function(e,t){if(e.eatSpace())return null;var n=(t.tokenize||o)(e,t);if(n=='comment'||n=='meta')return n;return n}}});e.defineMIME('text/x-fortran','fortran')}); -/* Include script: mirc */ +/* Include script: mirc.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMIME('text/mirc','mirc');e.defineMode('mirc',function(){function e(e){var r={},t=e.split(' ');for(var i=0;i<t.length;++i)r[t[i]]=!0;return r};var r=e('$! $$ $& $? $+ $abook $abs $active $activecid $activewid $address $addtok $agent $agentname $agentstat $agentver $alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime $asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind $binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes $chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color $com $comcall $comchan $comerr $compact $compress $comval $cos $count $cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight $dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress $deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll $dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error $eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir $finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve $fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt $group $halted $hash $height $hfind $hget $highlight $hnick $hotline $hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil $inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect $insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile $isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive $lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock $lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer $maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext $menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode $modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile $nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly $opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree $pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo $readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex $reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline $sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin $site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname $sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped $syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp $timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel $ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver $version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor'),t=e('abook ajinvite alias aline ame amsg anick aop auser autojoin avoice away background ban bcopy beep bread break breplace bset btrunc bunset bwrite channel clear clearall cline clipboard close cnick color comclose comopen comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver debug dec describe dialog did didtok disable disconnect dlevel dline dll dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable events exit fclose filter findtext finger firewall flash flist flood flush flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear ialmark identd if ignore iline inc invite iuser join kick linesep links list load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice qme qmsg query queryn quit raw reload remini remote remove rename renwin reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini say scid scon server set showmirc signam sline sockaccept sockclose socklist socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs elseif else goto menu nicklist status title icon size option text edit button check radio box scroll list combo link tab item'),n=e('if elseif else and not or eq ne in ni for foreach while switch'),o=/[+\-*&%=<>!?^\/\|]/;function a(e,i,r){i.tokenize=r;return r(e,i)};function i(e,i){var m=i.beforeParams;i.beforeParams=!1;var c=e.next();if(/[\[\]{}\(\),\.]/.test(c)){if(c=='('&&m)i.inParams=!0;else if(c==')')i.inParams=!1;return null} else if(/\d/.test(c)){e.eatWhile(/[\w\.]/);return'number'} else if(c=='\\'){e.eat('\\');e.eat(/./);return'number'} @@ -562,7 +560,7 @@ else{i.beforeParams=!0;return'builtin'}} else if(c=='%'){e.eatWhile(/[^,\s()]/);i.beforeParams=!0;return'string'} else if(o.test(c)){e.eatWhile(o);return'operator'} else{e.eatWhile(/[\w\$_{}]/);var d=e.current().toLowerCase();if(t&&t.propertyIsEnumerable(d))return'keyword';if(n&&n.propertyIsEnumerable(d)){i.beforeParams=!0;return'keyword'};return null}};function s(e,r){var n=!1,t;while(t=e.next()){if(t=='/'&&n){r.tokenize=i;break};n=(t=='*')};return'comment'};function l(e,r){var n=0,t;while(t=e.next()){if(t==';'&&n==2){r.tokenize=i;break};if(t==')')n++;else if(t!=' ')n=0};return'meta'};return{startState:function(){return{tokenize:i,beforeParams:!1,inParams:!1}},token:function(e,i){if(e.eatSpace())return null;return i.tokenize(e,i)}}})}); -/* Include script: xquery */ +/* Include script: xquery.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('xquery',function(){var a=function(){function o(e){return{type:e,style:'keyword'}};var u=o('operator'),c={type:'atom',style:'atom'},l={type:'punctuation',style:null},f={type:'axis_specifier',style:'qualifier'};var n={',':l};var r=['after','all','allowing','ancestor','ancestor-or-self','any','array','as','ascending','at','attribute','base-uri','before','boundary-space','by','case','cast','castable','catch','child','collation','comment','construction','contains','content','context','copy','copy-namespaces','count','decimal-format','declare','default','delete','descendant','descendant-or-self','descending','diacritics','different','distance','document','document-node','element','else','empty','empty-sequence','encoding','end','entire','every','exactly','except','external','first','following','following-sibling','for','from','ftand','ftnot','ft-option','ftor','function','fuzzy','greatest','group','if','import','in','inherit','insensitive','insert','instance','intersect','into','invoke','is','item','language','last','lax','least','let','levels','lowercase','map','modify','module','most','namespace','next','no','node','nodes','no-inherit','no-preserve','not','occurs','of','only','option','order','ordered','ordering','paragraph','paragraphs','parent','phrase','preceding','preceding-sibling','preserve','previous','processing-instruction','relationship','rename','replace','return','revalidation','same','satisfies','schema','schema-attribute','schema-element','score','self','sensitive','sentence','sentences','sequence','skip','sliding','some','stable','start','stemming','stop','strict','strip','switch','text','then','thesaurus','times','to','transform','treat','try','tumbling','type','typeswitch','union','unordered','update','updating','uppercase','using','validate','value','variable','version','weight','when','where','wildcards','window','with','without','word','words','xquery'];for(var e=0,t=r.length;e<t;e++){n[r[e]]=o(r[e])};var s=['xs:anyAtomicType','xs:anySimpleType','xs:anyType','xs:anyURI','xs:base64Binary','xs:boolean','xs:byte','xs:date','xs:dateTime','xs:dateTimeStamp','xs:dayTimeDuration','xs:decimal','xs:double','xs:duration','xs:ENTITIES','xs:ENTITY','xs:float','xs:gDay','xs:gMonth','xs:gMonthDay','xs:gYear','xs:gYearMonth','xs:hexBinary','xs:ID','xs:IDREF','xs:IDREFS','xs:int','xs:integer','xs:item','xs:java','xs:language','xs:long','xs:Name','xs:NCName','xs:negativeInteger','xs:NMTOKEN','xs:NMTOKENS','xs:nonNegativeInteger','xs:nonPositiveInteger','xs:normalizedString','xs:NOTATION','xs:numeric','xs:positiveInteger','xs:precisionDecimal','xs:QName','xs:short','xs:string','xs:time','xs:token','xs:unsignedByte','xs:unsignedInt','xs:unsignedLong','xs:unsignedShort','xs:untyped','xs:untypedAtomic','xs:yearMonthDuration'];for(var e=0,t=s.length;e<t;e++){n[s[e]]=c};var a=['eq','ne','lt','le','gt','ge',':=','=','>','>=','<','<=','.','|','?','and','or','div','idiv','mod','*','/','+','-'];for(var e=0,t=a.length;e<t;e++){n[a[e]]=u};var i=['self::','attribute::','child::','descendant::','descendant-or-self::','parent::','ancestor::','ancestor-or-self::','following::','preceding::','following-sibling::','preceding-sibling::'];for(var e=0,t=i.length;e<t;e++){n[i[e]]=f};return n}();function r(e,t,n){t.tokenize=n;return n(e,t)};function t(t,i){var s=t.next(),w=!1,v=y(t);if(s=='<'){if(t.match('!--',!0))return r(t,i,d);if(t.match('![CDATA',!1)){i.tokenize=p;return'tag'};if(t.match('?',!1)){return r(t,i,x)};var I=t.eat('/');t.eatSpace();var k='',b;while((b=t.eat(/[^\s\u00a0=<>"'\/?]/)))k+=b;return r(t,i,m(k,I))} else if(s=='{'){n(i,{type:'codeblock'});return null} else if(s=='}'){e(i);return null} @@ -582,13 +580,13 @@ while(c=s.next()){if(c==r){e(u);if(a)u.tokenize=a;break} else{if(s.match('{',!1)&&i(u)){u.tokenize=t;return'string'}}};return'string'}};function f(e,n){var r=/[\w\$_-]/;if(e.eat('"')){while(e.next()!=='"'){};e.eat(':')} else{e.eatWhile(r);if(!e.match(':=',!1))e.eat(':')};e.eatWhile(r);n.tokenize=t;return'variable'};function m(r,i){return function(a,s){a.eatSpace();if(i&&a.eat('>')){e(s);s.tokenize=t;return'tag'};if(!a.eat('/'))n(s,{type:'tag',name:r,tokenize:t});if(!a.eat('>')){s.tokenize=u;return'tag'} else{s.tokenize=t};return'tag'}};function u(a,s){var l=a.next();if(l=='/'&&a.eat('>')){if(i(s))e(s);if(c(s))e(s);return'tag'};if(l=='>'){if(i(s))e(s);return'tag'};if(l=='=')return null;if(l=='"'||l=='\'')return r(a,s,o(l,u));if(!i(s))n(s,{type:'attribute',tokenize:u});a.eat(/[a-zA-Z_:]/);a.eatWhile(/[-a-zA-Z0-9_:.]/);a.eatSpace();if(a.match('>',!1)||a.match('/',!1)){e(s);s.tokenize=t};return'attribute'};function d(e,n){var r;while(r=e.next()){if(r=='-'&&e.match('->',!0)){n.tokenize=t;return'comment'}}};function p(e,n){var r;while(r=e.next()){if(r==']'&&e.match(']',!0)){n.tokenize=t;return'comment'}}};function x(e,n){var r;while(r=e.next()){if(r=='?'&&e.match('>',!0)){n.tokenize=t;return'comment meta'}}};function c(e){return s(e,'tag')};function i(e){return s(e,'attribute')};function g(e){return s(e,'xmlconstructor')};function h(e){return s(e,'string')};function y(e){if(e.current()==='"')return e.match(/^[^"]+"\:/,!1);else if(e.current()==='\'')return e.match(/^[^"]+'\:/,!1);else return!1};function s(e,t){return(e.stack.length&&e.stack[e.stack.length-1].type==t)};function n(e,t){e.stack.push(t)};function e(e){e.stack.pop();var n=e.stack.length&&e.stack[e.stack.length-1].tokenize;e.tokenize=n||t};return{startState:function(){return{tokenize:t,cc:[],stack:[]}},token:function(e,t){if(e.eatSpace())return null;var n=t.tokenize(e,t);return n},blockCommentStart:'(:',blockCommentEnd:':)'}});e.defineMIME('application/xquery','xquery')}); -/* Include script: elm */ +/* Include script: elm.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('elm',function(){function n(e,t,r){t(r);return r(e,t)};var l=/[a-z_]/,c=/[A-Z]/,t=/[0-9]/,s=/[0-9A-Fa-f]/,m=/[0-7]/,f=/[a-z_A-Z0-9']/,r=/[-!#$%&*+.\/<=>?@\\^|~:\u03BB\u2192]/,h=/[(),;[\]`{}]/,u=/[ \t\v\f]/;function e(){return function(e,v){if(e.eatWhile(u)){return null};var i=e.next();if(h.test(i)){if(i=='{'&&e.eat('-')){var p='comment';if(e.eat('#'))p='meta';return n(e,v,a(p,1))};return null};if(i=='\''){if(e.eat('\\'))e.next();else e.next();if(e.eat('\''))return'string';return'error'};if(i=='"'){return n(e,v,o)};if(c.test(i)){e.eatWhile(f);if(e.eat('.'))return'qualifier';return'variable-2'};if(l.test(i)){var x=e.pos===1;e.eatWhile(f);return x?'type':'variable'};if(t.test(i)){if(i=='0'){if(e.eat(/[xX]/)){e.eatWhile(s);return'integer'};if(e.eat(/[oO]/)){e.eatWhile(m);return'number'}};e.eatWhile(t);var p='number';if(e.eat('.')){p='number';e.eatWhile(t)};if(e.eat(/[eE]/)){p='number';e.eat(/[-+]/);e.eatWhile(t)};return p};if(r.test(i)){if(i=='-'&&e.eat(/-/)){e.eatWhile(/-/);if(!e.eat(r)){e.skipToEnd();return'comment'}};e.eatWhile(r);return'builtin'};return'error'}};function a(t,r){if(r==0){return e()};return function(n,i){var f=r;while(!n.eol()){var u=n.next();if(u=='{'&&n.eat('-')){++f} else if(u=='-'&&n.eat('}')){--f;if(f==0){i(e());return t}}};i(a(t,f));return t}};function o(t,r){while(!t.eol()){var n=t.next();if(n=='"'){r(e());return'string'};if(n=='\\'){if(t.eol()||t.eat(u)){r(v);return'string'};if(!t.eat('&'))t.next()}};r(e());return'error'};function v(t,r){if(t.eat('\\')){return n(t,r,o)};t.next();r(e());return'error'};var i=(function(){var r={};var t=['case','of','as','if','then','else','let','in','infix','infixl','infixr','type','alias','input','output','foreign','loopback','module','where','import','exposing','_','..','|',':','=','\\','"','->','<-'];for(var e=t.length;e--;)r[t[e]]='keyword';return r})();return{startState:function(){return{f:e()}},copyState:function(e){return{f:e.f}},token:function(e,t){var n=t.f(e,function(e){t.f=e}),r=e.current();return(i.hasOwnProperty(r))?i[r]:n}}});e.defineMIME('text/x-elm','elm')}); -/* Include script: vhdl */ +/* Include script: vhdl.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";function t(e){var r={},n=e.split(",");for(var t=0;t<n.length;++t){var i=n[t].toUpperCase(),o=n[t].charAt(0).toUpperCase()+n[t].slice(1);r[n[t]]=!0;r[i]=!0;r[o]=!0};return r};function n(e){e.eatWhile(/[\w\$_]/);return"meta"};e.defineMode("vhdl",function(e,i){var u=e.indentUnit,h=i.atoms||t("null"),f=i.hooks||{"`":n,"$":n},c=i.multiLineStrings;var p=t("abs,access,after,alias,all,and,architecture,array,assert,attribute,begin,block,body,buffer,bus,case,component,configuration,constant,disconnect,downto,else,elsif,end,end block,end case,end component,end for,end generate,end if,end loop,end process,end record,end units,entity,exit,file,for,function,generate,generic,generic map,group,guarded,if,impure,in,inertial,inout,is,label,library,linkage,literal,loop,map,mod,nand,new,next,nor,null,of,on,open,or,others,out,package,package body,port,port map,postponed,procedure,process,pure,range,record,register,reject,rem,report,return,rol,ror,select,severity,signal,sla,sll,sra,srl,subtype,then,to,transport,type,unaffected,units,until,use,variable,wait,when,while,with,xnor,xor"),m=t("architecture,entity,begin,case,port,else,elsif,end,for,function,if"),s=/[&|~><!\)\(*#%@+\/=?\:;}{,\.\^\-\[\]]/,r;function a(e,t){var n=e.next();if(f[n]){var o=f[n](e,t);if(o!==!1)return o};if(n=="\""){t.tokenize=b(n);return t.tokenize(e,t)};if(n=="'"){t.tokenize=y(n);return t.tokenize(e,t)};if(/[\[\]{}\(\),;\:\.]/.test(n)){r=n;return null};if(/[\d']/.test(n)){e.eatWhile(/[\w\.']/);return"number"};if(n=="-"){if(e.eat("-")){e.skipToEnd();return"comment"}};if(s.test(n)){e.eatWhile(s);return"operator"};e.eatWhile(/[\w\$_]/);var i=e.current();if(p.propertyIsEnumerable(i.toLowerCase())){if(m.propertyIsEnumerable(i))r="newstatement";return"keyword"};if(h.propertyIsEnumerable(i))return"atom";return"variable"};function y(e){return function(t,n){var r=!1,i,o=!1;while((i=t.next())!=null){if(i==e&&!r){o=!0;break};r=!r&&i=="--"};if(o||!(r||c))n.tokenize=a;return"string"}};function b(e){return function(t,n){var r=!1,i,o=!1;while((i=t.next())!=null){if(i==e&&!r){o=!0;break};r=!r&&i=="--"};if(o||!(r||c))n.tokenize=a;return"string-2"}};function d(e,t,n,r,i){this.indented=e;this.column=t;this.type=n;this.align=r;this.prev=i};function l(e,t,n){return e.context=new d(e.indented,t,n,null,e.context)};function o(e){var t=e.context.type;if(t==")"||t=="]"||t=="}")e.indented=e.context.indented;return e.context=e.context.prev};return{startState:function(e){return{tokenize:null,context:new d((e||0)-u,0,"top",!1),indented:0,startOfLine:!0}},token:function(e,t){var n=t.context;if(e.sol()){if(n.align==null)n.align=!1;t.indented=e.indentation();t.startOfLine=!0};if(e.eatSpace())return null;r=null;var i=(t.tokenize||a)(e,t);if(i=="comment"||i=="meta")return i;if(n.align==null)n.align=!0;if((r==";"||r==":")&&n.type=="statement")o(t);else if(r=="{")l(t,e.column(),"}");else if(r=="[")l(t,e.column(),"]");else if(r=="(")l(t,e.column(),")");else if(r=="}"){while(n.type=="statement")n=o(t);if(n.type=="}")n=o(t);while(n.type=="statement")n=o(t)} else if(r==n.type)o(t);else if(n.type=="}"||n.type=="top"||(n.type=="statement"&&r=="newstatement"))l(t,e.column(),"statement");t.startOfLine=!1;return i},indent:function(e,t){if(e.tokenize!=a&&e.tokenize!=null)return 0;var r=t&&t.charAt(0),n=e.context,i=r==n.type;if(n.type=="statement")return n.indented+(r=="{"?0:u);else if(n.align)return n.column+(i?0:1);else return n.indented+(i?0:u)},electricChars:"{}"}});e.defineMIME("text/x-vhdl","vhdl")}); -/* Include script: verilog */ +/* Include script: verilog.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("verilog",function(t,n){var f=t.indentUnit,p=n.statementIndentUnit||f,q=n.dontAlignCalls,v=n.noIndentKeywords||[],L=n.multiLineStrings,a=n.hooks||{};function d(e){var n={},i=e.split(" ");for(var t=0;t<i.length;++t)n[i[t]]=!0;return n};var w=d("accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 null or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor"),x=/[\+\-\*\/!~&|^%=?:]/,I=/[\[\]{}()]/,C=/\d[0-9_]*/,z=/\d*\s*'s?d\s*\d[0-9_]*/i,S=/\d*\s*'s?b\s*[xz01][xz01_]*/i,j=/\d*\s*'s?o\s*[xz0-7][xz0-7_]*/i,E=/\d*\s*'s?h\s*[0-9a-fxz?][0-9a-fxz?_]*/i,m=/(\d[\d_]*(\.\d[\d_]*)?E-?[\d_]+)|(\d[\d_]*\.\d[\d_]*)/i,M=/^((\w+)|[)}\]])/,A=/[)}\]]/,r,l,B=d("case checker class clocking config function generate interface module package primitive program property specify sequence table task"),i={};for(var s in B){i[s]="end"+s};i["begin"]="end";i["casex"]="endcase";i["casez"]="endcase";i["do"]="while";i["fork"]="join;join_any;join_none";i["covergroup"]="endgroup";for(var b in v){var s=v[b];if(i[s]){i[s]=undefined}};var k=d("always always_comb always_ff always_latch assert assign assume else export for foreach forever if import initial repeat while");function c(e,t){var n=e.peek(),s;if(a[n]&&(s=a[n](e,t))!=!1)return s;if(a.tokenBase&&(s=a.tokenBase(e,t))!=!1)return s;if(/[,;:\.]/.test(n)){r=e.next();return null};if(I.test(n)){r=e.next();return"bracket"};if(n=="`"){e.next();if(e.eatWhile(/[\w\$_]/)){return"def"} else{return null}};if(n=="$"){e.next();if(e.eatWhile(/[\w\$_]/)){return"meta"} else{return null}};if(n=="#"){e.next();e.eatWhile(/[\d_.]/);return"def"};if(n=="\""){e.next();t.tokenize=T(n);return t.tokenize(e,t)};if(n=="/"){e.next();if(e.eat("*")){t.tokenize=h;return h(e,t)};if(e.eat("/")){e.skipToEnd();return"comment"};e.backUp(1)};if(e.match(m)||e.match(z)||e.match(S)||e.match(j)||e.match(E)||e.match(C)||e.match(m)){return"number"};if(e.eatWhile(x)){return"meta"};if(e.eatWhile(/[\w\$_]/)){var o=e.current();if(w[o]){if(i[o]){r="newblock"};if(k[o]){r="newstatement"};l=o;return"keyword"};return"variable"};e.next();return null};function T(e){return function(t,n){var i=!1,r,a=!1;while((r=t.next())!=null){if(r==e&&!i){a=!0;break};i=!i&&r=="\\"};if(a||!(i||L))n.tokenize=c;return"string"}};function h(e,t){var i=!1,n;while(n=e.next()){if(n=="/"&&i){t.tokenize=c;break};i=(n=="*")};return"comment"};function g(e,t,n,i,r){this.indented=e;this.column=t;this.type=n;this.align=i;this.prev=r};function o(e,t,n){var i=e.indented,r=new g(i,t,n,null,e.context);return e.context=r};function u(e){var t=e.context.type;if(t==")"||t=="]"||t=="}"){e.indented=e.context.indented};return e.context=e.context.prev};function y(e,t){if(e==t){return!0} @@ -618,14 +616,14 @@ else{u="tlv-default"}} else if(e.match(/^[\w\d_]+/)){u="number"} else{e.next();u="tlv-default"};if(v){u+=" tlv-statement"}} else{if(e.match(/^[mM]4([\w\d_]*)/)){u="tlv-m4"}};return u},indent:function(e){return(e.tlvCodeActive==!0)?e.tlvNextIndent:-1},startState:function(e){e.tlvIndentationStyle=[];e.tlvCodeActive=!0;e.tlvNextIndent=-1;e.tlvInBlockComment=!1;if(n){e.statementComment=!1}}}})}); -/* Include script: spreadsheet */ +/* Include script: spreadsheet.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('spreadsheet',function(){return{startState:function(){return{stringType:null,stack:[]}},token:function(e,t){if(!e)return;if(t.stack.length===0){if((e.peek()=='"')||(e.peek()=='\'')){t.stringType=e.peek();e.next();t.stack.unshift('string')}};switch(t.stack[0]){case'string':while(t.stack[0]==='string'&&!e.eol()){if(e.peek()===t.stringType){e.next();t.stack.shift()} else if(e.peek()==='\\'){e.next();e.next()} else{e.match(/^.[^\\"']*/)}};return'string';case'characterClass':while(t.stack[0]==='characterClass'&&!e.eol()){if(!(e.match(/^[^\]\\]+/)||e.match(/^\\./)))t.stack.shift()};return'operator'};var r=e.peek();switch(r){case'[':e.next();t.stack.unshift('characterClass');return'bracket';case':':e.next();return'operator';case'\\':if(e.match(/\\[a-z]+/))return'string-2';else{e.next();return'atom'};case'.':case',':case';':case'*':case'-':case'+':case'^':case'<':case'/':case'=':e.next();return'atom';case'$':e.next();return'builtin'};if(e.match(/\d+/)){if(e.match(/^\w+/))return'error';return'number'} else if(e.match(/^[a-zA-Z_]\w*/)){if(e.match(/(?=[\(.])/,!1))return'keyword';return'variable-2'} else if(['[',']','(',')','{','}'].indexOf(r)!=-1){e.next();return'bracket'} else if(!e.eatSpace()){e.next()};return null}}});e.defineMIME('text/x-spreadsheet','spreadsheet')}); -/* Include script: coffeescript */ +/* Include script: coffeescript.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('coffeescript',function(e,t){var f='error';function i(e){return new RegExp('^(('+e.join(')|(')+'))\\b')};var m=/^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?|(or|and|\|\||&&|\?)=)/,v=/^(?:[()\[\]{},:`=;]|\.\.?\.?)/,a=/^[_A-Za-z$][_A-Za-z$0-9]*/,k=/^@[_A-Za-z$][_A-Za-z$0-9]*/,y=i(['and','or','not','is','isnt','in','instanceof','typeof']),r=['for','while','loop','if','unless','else','switch','try','catch','finally','class'],g=['break','by','continue','debugger','delete','do','in','of','new','return','then','this','@','throw','when','until','extends'],b=i(r.concat(g));r=i(r);var u=/^('{3}|"{3}|['"])/,l=/^(\/{3}|\/)/,d=['Infinity','NaN','undefined','null','true','false','on','off','yes','no'],h=i(d);function n(e,t){if(e.sol()){if(t.scope.align===null)t.scope.align=!1;var i=t.scope.offset;if(e.eatSpace()){var o=e.indentation();if(o>i&&t.scope.type=='coffee'){return'indent'} else if(o<i){return'dedent'};return null} else{if(i>0){c(e,t)}}};if(e.eatSpace()){return null};var s=e.peek();if(e.match('####')){e.skipToEnd();return'comment'};if(e.match('###')){t.tokenize=z;return t.tokenize(e,t)};if(s==='#'){e.skipToEnd();return'comment'};if(e.match(/^-?[0-9\.]/,!1)){var r=!1;if(e.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)){r=!0};if(e.match(/^-?\d+\.\d*/)){r=!0};if(e.match(/^-?\.\d+/)){r=!0};if(r){if(e.peek()=='.'){e.backUp(1)};return'number'};var n=!1;if(e.match(/^-?0x[0-9a-f]+/i)){n=!0};if(e.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)){n=!0};if(e.match(/^-?0(?![\dx])/i)){n=!0};if(n){return'number'}};if(e.match(u)){t.tokenize=p(e.current(),!1,'string');return t.tokenize(e,t)};if(e.match(l)){if(e.current()!='/'||e.match(/^.*\//,!1)){t.tokenize=p(e.current(),!0,'string-2');return t.tokenize(e,t)} @@ -636,14 +634,14 @@ else{c.tokenize=n}};return i}};function z(e,t){while(!e.eol()){e.eatWhile(/[^#]/ else if(n.scope.align){n.scope.align=!1};n.scope={offset:f,type:i,prev:n.scope,align:o,alignOffset:c}};function c(t,e){if(!e.scope.prev)return;if(e.scope.type==='coffee'){var r=t.indentation(),i=!1;for(var n=e.scope;n;n=n.prev){if(r===n.offset){i=!0;break}};if(!i){return!0} while(e.scope.prev&&e.scope.offset!==r){e.scope=e.scope.prev};return!1} else{e.scope=e.scope.prev;return!1}};function x(t,e){var a=e.tokenize(t,e),n=t.current();if(n==='return'){e.dedent=!0};if(((n==='->'||n==='=>')&&t.eol())||a==='indent'){o(t,e)};var i='[({'.indexOf(n);if(i!==-1){o(t,e,'])}'.slice(i,i+1))};if(r.exec(n)){o(t,e)};if(n=='then'){c(t,e)};if(a==='dedent'){if(c(t,e)){return f}};i='])}'.indexOf(n);if(i!==-1){while(e.scope.type=='coffee'&&e.scope.prev)e.scope=e.scope.prev;if(e.scope.type==n)e.scope=e.scope.prev};if(e.dedent&&t.eol()){if(e.scope.type=='coffee'&&e.scope.prev)e.scope=e.scope.prev;e.dedent=!1};return a};var s={startState:function(e){return{tokenize:n,scope:{offset:e||0,type:'coffee',prev:null,align:!1},prop:!1,dedent:0}},token:function(e,t){var r=t.scope.align===null&&t.scope;if(r&&e.sol())r.align=!1;var n=x(e,t);if(n&&n!='comment'){if(r)r.align=!0;t.prop=n=='punctuation'&&e.current()=='.'};return n},indent:function(e,t){if(e.tokenize!=n)return 0;var r=e.scope,f=t&&'])}'.indexOf(t.charAt(0))>-1;if(f)while(r.type=='coffee'&&r.prev)r=r.prev;var i=f&&r.type===t.charAt(0);if(r.align)return r.alignOffset-(i?1:0);else return(i?r.prev:r).offset},lineComment:'#',fold:'indent'};return s});e.defineMIME('application/vnd.coffeescript','coffeescript');e.defineMIME('text/x-coffeescript','coffeescript');e.defineMIME('text/coffeescript','coffeescript')}); -/* Include script: tiddlywiki */ +/* Include script: tiddlywiki.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("tiddlywiki",function(){var b={};var s={"allTags":!0,"closeAll":!0,"list":!0,"newJournal":!0,"newTiddler":!0,"permaview":!0,"saveChanges":!0,"search":!0,"slider":!0,"tabs":!0,"tag":!0,"tagging":!0,"tags":!0,"tiddler":!0,"timeline":!0,"today":!0,"version":!0,"option":!0,"with":!0,"filter":!0};var n=/[\w_\-]/i,i=/^\-\-\-\-+$/,u=/^\/\*\*\*$/,o=/^\*\*\*\/$/,a=/^<<<$/,f=/^\/\/\{\{\{$/,c=/^\/\/\}\}\}$/,l=/^<!--\{\{\{-->$/,m=/^<!--\}\}\}-->$/,h=/^\{\{\{$/,k=/^\}\}\}$/,d=/.*?\}\}\}/;function t(e,t,r){t.tokenize=r;return r(e,t)};function e(e,d){var s=e.sol(),k=e.peek();d.block=!1;if(s&&/[<\/\*{}\-]/.test(k)){if(e.match(h)){d.block=!0;return t(e,d,r)};if(e.match(a))return"quote";if(e.match(u)||e.match(o))return"comment";if(e.match(f)||e.match(c)||e.match(l)||e.match(m))return"comment";if(e.match(i))return"hr"};e.next();if(s&&/[\/\*!#;:>|]/.test(k)){if(k=="!"){e.skipToEnd();return"header"};if(k=="*"){e.eatWhile("*");return"comment"};if(k=="#"){e.eatWhile("#");return"comment"};if(k==";"){e.eatWhile(";");return"comment"};if(k==":"){e.eatWhile(":");return"comment"};if(k==">"){e.eatWhile(">");return"quote"};if(k=="|")return"header"};if(k=="{"&&e.match(/\{\{/))return t(e,d,r);if(/[hf]/i.test(k)&&/[ti]/i.test(e.peek())&&e.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i))return"link";if(k=="\"")return"string";if(k=="~")return"brace";if(/[\[\]]/.test(k)&&e.match(k))return"brace";if(k=="@"){e.eatWhile(n);return"link"};if(/\d/.test(k)){e.eatWhile(/\d/);return"number"};if(k=="/"){if(e.eat("%")){return t(e,d,p)} else if(e.eat("/")){return t(e,d,v)}};if(k=="_"&&e.eat("_"))return t(e,d,x);if(k=="-"&&e.eat("-")){if(e.peek()!=" ")return t(e,d,z);if(e.peek()==" ")return"brace"};if(k=="'"&&e.eat("'"))return t(e,d,w);if(k=="<"&&e.eat("<"))return t(e,d,y);e.eatWhile(/[\w\$_]/);return b.propertyIsEnumerable(e.current())?"keyword":null};function p(t,r){var i=!1,n;while(n=t.next()){if(n=="/"&&i){r.tokenize=e;break};i=(n=="%")};return"comment"};function w(t,r){var i=!1,n;while(n=t.next()){if(n=="'"&&i){r.tokenize=e;break};i=(n=="'")};return"strong"};function r(t,r){var n=r.block;if(n&&t.current()){return"comment"};if(!n&&t.match(d)){r.tokenize=e;return"comment"};if(n&&t.sol()&&t.match(k)){r.tokenize=e;return"comment"};t.next();return"comment"};function v(t,r){var i=!1,n;while(n=t.next()){if(n=="/"&&i){r.tokenize=e;break};i=(n=="/")};return"em"};function x(t,r){var i=!1,n;while(n=t.next()){if(n=="_"&&i){r.tokenize=e;break};i=(n=="_")};return"underlined"};function z(t,r){var i=!1,n;while(n=t.next()){if(n=="-"&&i){r.tokenize=e;break};i=(n=="-")};return"strikethrough"};function y(t,r){if(t.current()=="<<"){return"macro"};var n=t.next();if(!n){r.tokenize=e;return null};if(n==">"){if(t.peek()==">"){t.next();r.tokenize=e;return"macro"}};t.eatWhile(/[\w\$_]/);return s.propertyIsEnumerable(t.current())?"keyword":null};return{startState:function(){return{tokenize:e}},token:function(e,t){if(e.eatSpace())return null;var r=t.tokenize(e,t);return r}}});e.defineMIME("text/x-tiddlywiki","tiddlywiki")}); -/* Include script: mumps */ +/* Include script: mumps.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("mumps",function(){function e(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")};var t=new RegExp("^[\\+\\-\\*/&#!_?\\\\<>=\\'\\[\\]]"),r=new RegExp("^(('=)|(<=)|(>=)|('>)|('<)|([[)|(]])|(^$))"),n=new RegExp("^[\\.,:]"),i=new RegExp("[()]"),o=new RegExp("^[%A-Za-z][A-Za-z0-9]*"),a=["break","close","do","else","for","goto","halt","hang","if","job","kill","lock","merge","new","open","quit","read","set","tcommit","trollback","tstart","use","view","write","xecute","b","c","d","e","f","g","h","i","j","k","l","m","n","o","q","r","s","tc","tro","ts","u","v","w","x"],c=["\\$ascii","\\$char","\\$data","\\$ecode","\\$estack","\\$etrap","\\$extract","\\$find","\\$fnumber","\\$get","\\$horolog","\\$io","\\$increment","\\$job","\\$justify","\\$length","\\$name","\\$next","\\$order","\\$piece","\\$qlength","\\$qsubscript","\\$query","\\$quit","\\$random","\\$reverse","\\$select","\\$stack","\\$test","\\$text","\\$translate","\\$view","\\$x","\\$y","\\$a","\\$c","\\$d","\\$e","\\$ec","\\$es","\\$et","\\$f","\\$fn","\\$g","\\$h","\\$i","\\$j","\\$l","\\$n","\\$na","\\$o","\\$p","\\$q","\\$ql","\\$qs","\\$r","\\$re","\\$s","\\$st","\\$t","\\$tr","\\$v","\\$z"],m=e(c),d=e(a);function f(e,a){if(e.sol()){a.label=!0;a.commandMode=0};var c=e.peek();if(c==" "||c=="\t"){a.label=!1;if(a.commandMode==0)a.commandMode=1;else if((a.commandMode<0)||(a.commandMode==2))a.commandMode=0} else if((c!=".")&&(a.commandMode>0)){if(c==":")a.commandMode=-1;else a.commandMode=2};if((c==="(")||(c==="\u0009"))a.label=!1;if(c===";"){e.skipToEnd();return"comment"};if(e.match(/^[-+]?\d+(\.\d+)?([eE][-+]?\d+)?/))return"number";if(c=="\""){if(e.skipTo("\"")){e.next();return"string"} else{e.skipToEnd();return"error"}};if(e.match(r)||e.match(t))return"operator";if(e.match(n))return null;if(i.test(c)){e.next();return"bracket"};if(a.commandMode>0&&e.match(d))return"variable-2";if(e.match(m))return"builtin";if(e.match(o))return"variable";if(c==="$"||c==="^"){e.next();return"builtin"};if(c==="@"){e.next();return"string-2"};if(/[\w%]/.test(c)){e.eatWhile(/[\w%]/);return"variable"};e.next();return"error"};return{startState:function(){return{label:!1,commandMode:0}},token:function(e,t){var r=f(e,t);if(t.label)return"tag";return r}}});e.defineMIME("text/x-mumps","mumps")}); -/* Include script: eiffel */ +/* Include script: eiffel.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('eiffel',function(){function e(e){var r={};for(var t=0,n=e.length;t<n;++t)r[e[t]]=!0;return r};var t=e(['note','across','when','variant','until','unique','undefine','then','strip','select','retry','rescue','require','rename','reference','redefine','prefix','once','old','obsolete','loop','local','like','is','inspect','infix','include','if','frozen','from','external','export','ensure','end','elseif','else','do','creation','create','check','alias','agent','separate','invariant','inherit','indexing','feature','expanded','deferred','class','Void','True','Result','Precursor','False','Current','create','attached','detachable','as','and','implies','not','or']),r=e([':=','and then','and','or','<<','>>']);function n(e,t,r){r.tokenize.push(e);return e(t,r)};function i(e,r){if(e.eatSpace())return null;var t=e.next();if(t=='"'||t=='\''){return n(o(t,'string'),e,r)} else if(t=='-'&&e.eat('-')){e.skipToEnd();return'comment'} else if(t==':'&&e.eat('=')){return'operator'} @@ -651,11 +649,11 @@ else if(/[0-9]/.test(t)){e.eatWhile(/[xXbBCc0-9\.]/);e.eat(/[\?\!]/);return'iden else if(/[a-zA-Z_0-9]/.test(t)){e.eatWhile(/[a-zA-Z_0-9]/);e.eat(/[\?\!]/);return'ident'} else if(/[=+\-\/*^%<>~]/.test(t)){e.eatWhile(/[=+\-\/*^%<>~]/);return'operator'} else{return null}};function o(e,t,r){return function(n,i){var o=!1,a;while((a=n.next())!=null){if(a==e&&(r||!o)){i.tokenize.pop();break};o=!o&&a=='%'};return t}};return{startState:function(){return{tokenize:[i]}},token:function(e,n){var o=n.tokenize[n.tokenize.length-1](e,n);if(o=='ident'){var i=e.current();o=t.propertyIsEnumerable(e.current())?'keyword':r.propertyIsEnumerable(e.current())?'operator':/^[A-Z][A-Z_0-9]*$/g.test(i)?'tag':/^0[bB][0-1]+$/g.test(i)?'number':/^0[cC][0-7]+$/g.test(i)?'number':/^0[xX][a-fA-F0-9]+$/g.test(i)?'number':/^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(i)?'number':/^[0-9]+$/g.test(i)?'number':'variable'};return o},lineComment:'--'}});e.defineMIME('text/x-eiffel','eiffel')}); -/* Include script: webidl */ +/* Include script: webidl.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';function t(e){return new RegExp('^(('+e.join(')|(')+'))\\b')};var n=['Clamp','Constructor','EnforceRange','Exposed','ImplicitThis','Global','PrimaryGlobal','LegacyArrayClass','LegacyUnenumerableNamedProperties','LenientThis','NamedConstructor','NewObject','NoInterfaceObject','OverrideBuiltins','PutForwards','Replaceable','SameObject','TreatNonObjectAsNull','TreatNullAs','EmptyString','Unforgeable','Unscopeable'],g=t(n),i=['unsigned','short','long','unrestricted','float','double','boolean','byte','octet','Promise','ArrayBuffer','DataView','Int8Array','Int16Array','Int32Array','Uint8Array','Uint16Array','Uint32Array','Uint8ClampedArray','Float32Array','Float64Array','ByteString','DOMString','USVString','sequence','object','RegExp','Error','DOMException','FrozenArray','any','void'],D=t(i),a=['attribute','callback','const','deleter','dictionary','enum','getter','implements','inherit','interface','iterable','legacycaller','maplike','partial','required','serializer','setlike','setter','static','stringifier','typedef','optional','readonly','or'],E=t(a),o=['true','false','Infinity','NaN','null'],k=t(o);e.registerHelper('hintWords','webidl',n.concat(i).concat(a).concat(o));var c=['callback','dictionary','enum','interface'],l=t(c),f=['typedef'],m=t(f),u=/^[:<=>?]/,s=/^-?([1-9][0-9]*|0[Xx][0-9A-Fa-f]+|0[0-7]*)/,d=/^-?(([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([Ee][+-]?[0-9]+)?|[0-9]+[Ee][+-]?[0-9]+)/,r=/^_?[A-Za-z][0-9A-Z_a-z-]*/,b=/^_?[A-Za-z][0-9A-Z_a-z-]*(?=\s*;)/,y=/^"[^"]*"/,p=/^\/\*.*?\*\//,h=/^\/\*.*/,A=/^.*?\*\//;function C(e,t){if(e.eatSpace())return null;if(t.inComment){if(e.match(A)){t.inComment=!1;return'comment'};e.skipToEnd();return'comment'};if(e.match('//')){e.skipToEnd();return'comment'};if(e.match(p))return'comment';if(e.match(h)){t.inComment=!0;return'comment'};if(e.match(/^-?[0-9\.]/,!1)){if(e.match(s)||e.match(d))return'number'};if(e.match(y))return'string';if(t.startDef&&e.match(r))return'def';if(t.endDef&&e.match(b)){t.endDef=!1;return'def'};if(e.match(E))return'keyword';if(e.match(D)){var n=t.lastToken,i=(e.match(/^\s*(.+?)\b/,!1)||[])[1];if(n===':'||n==='implements'||i==='implements'||i==='='){return'builtin'} else{return'variable-3'}};if(e.match(g))return'builtin';if(e.match(k))return'atom';if(e.match(r))return'variable';if(e.match(u))return'operator';e.next();return null};e.defineMode('webidl',function(){return{startState:function(){return{inComment:!1,lastToken:'',startDef:!1,endDef:!1}},token:function(t,e){var n=C(t,e);if(n){var r=t.current();e.lastToken=r;if(n==='keyword'){e.startDef=l.test(r);e.endDef=e.endDef||m.test(r)} else{e.startDef=!1}};return n}}});e.defineMIME('text/x-webidl','webidl')}); -/* Include script: ebnf */ +/* Include script: ebnf.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('ebnf',function(a){var c={slash:0,parenthesis:1};var t={comment:0,_string:1,characterClass:2};var r=null;if(a.bracesMode)r=e.getMode(a,a.bracesMode);return{startState:function(){return{stringType:null,commentType:null,braced:0,lhs:!0,localState:null,stack:[],inDefinition:!1}},token:function(a,n){if(!a)return;if(n.stack.length===0){if((a.peek()=='"')||(a.peek()=='\'')){n.stringType=a.peek();a.next();n.stack.unshift(t._string)} else if(a.match(/^\/\*/)){n.stack.unshift(t.comment);n.commentType=c.slash} else if(a.match(/^\(\*/)){n.stack.unshift(t.comment);n.commentType=c.parenthesis}};switch(n.stack[0]){case t._string:while(n.stack[0]===t._string&&!a.eol()){if(a.peek()===n.stringType){a.next();n.stack.shift()} @@ -672,7 +670,7 @@ else if(a.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)){if(a.match(/(?=[\(.])/)){return'vari else if(a.match(/(?=[\s\n]*[:=])/)){return'def'};return'variable-2'} else if(['[',']','(',')'].indexOf(a.peek())!=-1){a.next();return'bracket'} else if(!a.eatSpace()){a.next()};return null}}});e.defineMIME('text/x-ebnf','ebnf')}); -/* Include script: http */ +/* Include script: http.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('http',function(){function r(r,t){r.skipToEnd();t.cur=e;return'error'};function n(e,t){if(e.match(/^HTTP\/\d\.\d/)){t.cur=i;return'keyword'} else if(e.match(/^[A-Z]+/)&&/[ \t]/.test(e.peek())){t.cur=o;return'keyword'} else{return r(e,t)}};function i(e,n){var i=e.match(/^\d+/);if(!i)return r(e,n);n.cur=u;var t=Number(i[0]);if(t>=100&&t<200){return'positive informational'} @@ -684,7 +682,7 @@ else{return'error'}};function u(r,t){r.skipToEnd();t.cur=e;return null};function else{return r(t,n)}};function e(e){if(e.sol()&&!e.eat(/[ \t]/)){if(e.match(/^.*?:/)){return'atom'} else{e.skipToEnd();return'error'}} else{e.skipToEnd();return'string'}};function t(e){e.skipToEnd();return null};return{token:function(r,n){var i=n.cur;if(i!=e&&i!=t&&r.eatSpace())return null;return i(r,n)},blankLine:function(e){e.cur=t},startState:function(){return{cur:n}}}});e.defineMIME('message/http','http')}); -/* Include script: textile */ +/* Include script: textile.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object'){e(require('../../lib/codemirror'))} else if(typeof define=='function'&&define.amd){define(['../../lib/codemirror'],e)} else{e(CodeMirror)}})(function(i){'use strict';var r={addition:'positive',attributes:'attribute',bold:'strong',cite:'keyword',code:'atom',definitionList:'number',deletion:'negative',div:'punctuation',em:'em',footnote:'variable',footCite:'qualifier',header:'header',html:'comment',image:'string',italic:'em',link:'link',linkDefinition:'link',list1:'variable-2',list2:'variable-3',list3:'keyword',notextile:'string-2',pre:'operator',p:'property',quote:'bracket',span:'quote',specialChar:'tag',strong:'strong',sub:'builtin',sup:'builtin',table:'variable-3',tableHeading:'operator'};function f(e,i){i.mode=n.newLayout;i.tableHeading=!1;if(i.layoutType==='definitionList'&&i.spanningLayout&&e.match(t('definitionListEnd'),!1))i.spanningLayout=!1};function s(e,t,i){if(i==='_'){if(e.eat('_'))return l(e,t,'italic',/__/,2);else return l(e,t,'em',/_/,1)};if(i==='*'){if(e.eat('*')){return l(e,t,'bold',/\*\*/,2)};return l(e,t,'strong',/\*/,1)};if(i==='['){if(e.match(/\d+\]/))t.footCite=!0;return a(t)};if(i==='('){var u=e.match(/^(r|tm|c)\)/);if(u)return o(t,r.specialChar)};if(i==='<'&&e.match(/(\w+)[^>]+>[^<]+<\/\1>/))return o(t,r.html);if(i==='?'&&e.eat('?'))return l(e,t,'cite',/\?\?/,2);if(i==='='&&e.eat('='))return l(e,t,'notextile',/==/,2);if(i==='-'&&!e.eat('-'))return l(e,t,'deletion',/-/,1);if(i==='+')return l(e,t,'addition',/\+/,1);if(i==='~')return l(e,t,'sub',/~/,1);if(i==='^')return l(e,t,'sup',/\^/,1);if(i==='%')return l(e,t,'span',/%/,1);if(i==='@')return l(e,t,'code',/@/,1);if(i==='!'){var n=l(e,t,'image',/(?:\([^\)]+\))?!/,1);e.match(/^:\S+/);return n};return a(t)};function l(e,t,i,u,o){var r=e.pos>o?e.string.charAt(e.pos-o-1):null,l=e.peek();if(t[i]){if((!l||/\W/.test(l))&&r&&/\S/.test(r)){var s=a(t);t[i]=!1;return s}} @@ -696,7 +694,7 @@ else if(r.match(t('notextile'))){e.layoutType='notextile'} else if(r.match(t('pre'))){e.layoutType='pre'} else if(r.match(t('div'))){e.layoutType='div'} else if(r.match(t('table'))){e.layoutType='table'};e.mode=n.attributes;return a(e)},text:function(e,i){if(e.match(t('text')))return a(i);var r=e.next();if(r==='"')return(i.mode=n.link)(e,i);return s(e,i,r)},attributes:function(e,i){i.mode=n.layoutLength;if(e.match(t('attributes')))return o(i,r.attributes);else return a(i)},layoutLength:function(e,t){if(e.eat('.')&&e.eat('.'))t.spanningLayout=!0;t.mode=n.text;return a(t)},list:function(e,i){var l=e.match(t('list'));i.listDepth=l[0].length;var r=(i.listDepth-1)%3;if(!r)i.layoutType='list1';else if(r===1)i.layoutType='list2';else i.layoutType='list3';i.mode=n.attributes;return a(i)},link:function(e,i){i.mode=n.text;if(e.match(t('link'))){e.match(/\S+/);return o(i,r.link)};return a(i)},linkDefinition:function(e,t){e.skipToEnd();return o(t,r.linkDefinition)},definitionList:function(e,i){e.match(t('definitionList'));i.layoutType='definitionList';if(e.match(/\s*$/))i.spanningLayout=!0;else i.mode=n.attributes;return a(i)},html:function(e,t){e.skipToEnd();return o(t,r.html)},table:function(e,t){t.layoutType='table';return(t.mode=n.tableCell)(e,t)},tableCell:function(e,i){if(e.match(t('tableHeading')))i.tableHeading=!0;else e.eat('|');i.mode=n.tableCellAttributes;return a(i)},tableCellAttributes:function(e,i){i.mode=n.tableText;if(e.match(t('tableCellAttributes')))return o(i,r.attributes);else return a(i)},tableText:function(e,i){if(e.match(t('tableText')))return a(i);if(e.peek()==='|'){i.mode=n.tableCell;return a(i)};return s(e,i,e.next())}};i.defineMode('textile',function(){return{startState:function(){return{mode:n.newLayout}},token:function(e,t){if(e.sol())f(e,t);return t.mode(e,t)},blankLine:d}});i.defineMIME('text/x-textile','textile')}); -/* Include script: r */ +/* Include script: r.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.registerHelper('wordChars','r',/[\w.]/);e.defineMode('r',function(e){function r(e){var r=e.split(' '),n={};for(var t=0;t<r.length;++t)n[r[t]]=!0;return n};var s=r('NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_'),d=r('list quote bquote eval return call parse deparse'),p=r('if else repeat while function for in next break'),m=r('if else repeat while function for'),u=/[+\-*\/^<>=!&|~$:]/,t;function a(e,n){t=null;var r=e.next();if(r=='#'){e.skipToEnd();return'comment'} else if(r=='0'&&e.eat('x')){e.eatWhile(/[\da-f]/i);return'number'} else if(r=='.'&&e.eat(/\d/)){e.match(/\d*(?:e[+\-]?\d+)?/);return'number'} @@ -713,7 +711,7 @@ else if(/[\(\){}\[\];]/.test(r)){t=r;if(r==';')return'semi';return null} else{return null}};function x(e){return function(t,r){if(t.eat('\\')){var n=t.next();if(n=='x')t.match(/^[a-f0-9]{2}/i);else if((n=='u'||n=='U')&&t.eat('{')&&t.skipTo('}'))t.next();else if(n=='u')t.match(/^[a-f0-9]{4}/i);else if(n=='U')t.match(/^[a-f0-9]{8}/i);else if(/[0-7]/.test(n))t.match(/^[0-7]{1,2}/);return'string-2'} else{var i;while((i=t.next())!=null){if(i==e){r.tokenize=a;break};if(i=='\\'){t.backUp(1);break}};return'string'}}};var o=1,i=2,f=4;function n(e,t,r){e.ctx={type:t,indent:e.indent,flags:0,column:r.column(),prev:e.ctx}};function c(e,t){var r=e.ctx;e.ctx={type:r.type,indent:r.indent,flags:r.flags|t,column:r.column,prev:r.prev}};function l(e){e.indent=e.ctx.indent;e.ctx=e.ctx.prev};return{startState:function(){return{tokenize:a,ctx:{type:'top',indent:-e.indentUnit,flags:i},indent:0,afterIdent:!1}},token:function(r,e){if(r.sol()){if((e.ctx.flags&3)==0)e.ctx.flags|=i;if(e.ctx.flags&f)l(e);e.indent=r.indentation()};if(r.eatSpace())return null;var a=e.tokenize(r,e);if(a!='comment'&&(e.ctx.flags&i)==0)c(e,o);if((t==';'||t=='{'||t=='}')&&e.ctx.type=='block')l(e);if(t=='{')n(e,'}',r);else if(t=='('){n(e,')',r);if(e.afterIdent)e.ctx.argList=!0} else if(t=='[')n(e,']',r);else if(t=='block')n(e,'block',r);else if(t==e.ctx.type)l(e);else if(e.ctx.type=='block'&&a!='comment')c(e,f);e.afterIdent=a=='variable'||a=='keyword';return a},indent:function(t,n){if(t.tokenize!=a)return 0;var i=n&&n.charAt(0),r=t.ctx,l=i==r.type;if(r.flags&f)r=r.prev;if(r.type=='block')return r.indent+(i=='{'?0:e.indentUnit);else if(r.flags&o)return r.column+(l?0:1);else return r.indent+(l?0:e.indentUnit)},lineComment:'#'}});e.defineMIME('text/x-rsrc','r')}); -/* Include script: haml */ +/* Include script: haml.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../htmlmixed/htmlmixed'),require('../ruby/ruby'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../htmlmixed/htmlmixed','../ruby/ruby'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('haml',function(t){var r=e.getMode(t,{name:'htmlmixed'});var i=e.getMode(t,'ruby');function u(e){return function(t,i){var r=t.peek();if(r==e&&i.rubyState.tokenize.length==1){t.next();i.tokenize=o;return'closeAttributeTag'} else{return n(t,i)}}};function n(e,t){if(e.match('-#')){e.skipToEnd();return'comment'};return i.token(e,t.rubyState)};function o(t,e){var i=t.peek();if(e.previousToken.style=='comment'){if(e.indented>e.previousToken.indented){t.skipToEnd();return'commentLine'}};if(e.startOfLine){if(i=='!'&&t.match('!!')){t.skipToEnd();return'tag'} else if(t.match(/^%[\w:#\.]+=/)){e.tokenize=n;return'hamlTag'} @@ -723,7 +721,7 @@ else if(i=='{'){if(!t.match(/^\{%.*/)){e.tokenize=u('}');return e.tokenize(t,e)} else if(i=='commentLine'){i='comment'} else if(i=='hamlAttribute'){i='attribute'} else if(i=='closeAttributeTag'){i=null};return i}}},'htmlmixed','ruby');e.defineMIME('text/x-haml','haml')}); -/* Include script: ecl */ +/* Include script: ecl.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('ecl',function(t){function n(e){var n={},r=e.split(' ');for(var t=0;t<r.length;++t)n[r[t]]=!0;return n};function v(e,t){if(!t.startOfLine)return!1;e.skipToEnd();return'meta'};var l=t.indentUnit,p=n('abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode'),m=n('apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait'),h=n('__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath'),c=n('ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode'),y=n('checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when'),r=n('catch class do else finally for if switch try while'),b=n('true false null'),u={'#':v};var s=/[+\-*&%=<>!?|\/]/,e;function o(t,i){var o=t.next();if(u[o]){var f=u[o](t,i);if(f!==!1)return f};if(o=='"'||o=='\''){i.tokenize=g(o);return i.tokenize(t,i)};if(/[\[\]{}\(\),;\:\.]/.test(o)){e=o;return null};if(/\d/.test(o)){t.eatWhile(/[\w\.]/);return'number'};if(o=='/'){if(t.eat('*')){i.tokenize=d;return d(t,i)};if(t.eat('/')){t.skipToEnd();return'comment'}};if(s.test(o)){t.eatWhile(s);return'operator'};t.eatWhile(/[\w\$_]/);var n=t.current().toLowerCase();if(p.propertyIsEnumerable(n)){if(r.propertyIsEnumerable(n))e='newstatement';return'keyword'} else if(m.propertyIsEnumerable(n)){if(r.propertyIsEnumerable(n))e='newstatement';return'variable'} else if(h.propertyIsEnumerable(n)){if(r.propertyIsEnumerable(n))e='newstatement';return'variable-2'} @@ -731,7 +729,7 @@ else if(c.propertyIsEnumerable(n)){if(r.propertyIsEnumerable(n))e='newstatement' else if(y.propertyIsEnumerable(n)){if(r.propertyIsEnumerable(n))e='newstatement';return'builtin'} else{var a=n.length-1;while(a>=0&&(!isNaN(n[a])||n[a]=='_'))--a;if(a>0){var l=n.substr(0,a+1);if(c.propertyIsEnumerable(l)){if(r.propertyIsEnumerable(l))e='newstatement';return'variable-3'}}};if(b.propertyIsEnumerable(n))return'atom';return null};function g(e){return function(t,n){var r=!1,i,a=!1;while((i=t.next())!=null){if(i==e&&!r){a=!0;break};r=!r&&i=='\\'};if(a||!r)n.tokenize=o;return'string'}};function d(e,t){var r=!1,n;while(n=e.next()){if(n=='/'&&r){t.tokenize=o;break};r=(n=='*')};return'comment'};function f(e,t,n,r,i){this.indented=e;this.column=t;this.type=n;this.align=r;this.prev=i};function a(e,t,n){return e.context=new f(e.indented,t,n,null,e.context)};function i(e){var t=e.context.type;if(t==')'||t==']'||t=='}')e.indented=e.context.indented;return e.context=e.context.prev};return{startState:function(e){return{tokenize:null,context:new f((e||0)-l,0,'top',!1),indented:0,startOfLine:!0}},token:function(t,n){var r=n.context;if(t.sol()){if(r.align==null)r.align=!1;n.indented=t.indentation();n.startOfLine=!0};if(t.eatSpace())return null;e=null;var l=(n.tokenize||o)(t,n);if(l=='comment'||l=='meta')return l;if(r.align==null)r.align=!0;if((e==';'||e==':')&&r.type=='statement')i(n);else if(e=='{')a(n,t.column(),'}');else if(e=='[')a(n,t.column(),']');else if(e=='(')a(n,t.column(),')');else if(e=='}'){while(r.type=='statement')r=i(n);if(r.type=='}')r=i(n);while(r.type=='statement')r=i(n)} else if(e==r.type)i(n);else if(r.type=='}'||r.type=='top'||(r.type=='statement'&&e=='newstatement'))a(n,t.column(),'statement');n.startOfLine=!1;return l},indent:function(e,t){if(e.tokenize!=o&&e.tokenize!=null)return 0;var n=e.context,r=t&&t.charAt(0);if(n.type=='statement'&&r=='}')n=n.prev;var i=r==n.type;if(n.type=='statement')return n.indented+(r=='{'?0:l);else if(n.align)return n.column+(i?0:1);else return n.indented+(i?0:l)},electricChars:'{}'}});e.defineMIME('text/x-ecl','ecl')}); -/* Include script: cypher */ +/* Include script: cypher.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';var t=function(e){return new RegExp('^(?:'+e.join('|')+')$','i')};e.defineMode('cypher',function(n){var c=function(e){var t=e.next();if(t==='"'){e.match(/.*?"/);return'string'};if(t==='\''){e.match(/.*?'/);return'string'};if(/[{}\(\),\.;\[\]]/.test(t)){r=t;return'node'} else if(t==='/'&&e.eat('/')){e.skipToEnd();return'comment'} else if(a.test(t)){e.eatWhile(a);return null} @@ -742,9 +740,9 @@ else if(/[\]\}\)]/.test(r)){while(e.context&&e.context.type==='pattern'){o(e)};i else if(r==='.'&&e.context&&e.context.type==='pattern'){o(e)} else if(/atom|string|variable/.test(n)&&e.context){if(/[\}\]]/.test(e.context.type)){i(e,'pattern',t.column())} else if(e.context.type==='pattern'&&!e.context.align){e.context.align=!0;e.context.col=t.column()}};return n},indent:function(n,r){var o=r&&r.charAt(0),t=n.context;if(/[\]\}]/.test(o)){while(t&&t.type==='pattern'){t=t.prev}};var i=t&&o===t.type;if(!t)return 0;if(t.type==='keywords')return e.commands.newlineAndIndent;if(t.align)return t.col+(i?0:1);return t.indent+(i?0:s)}}});e.modeExtensions['cypher']={autoFormatLineBreaks:function(e){var t,n,r,n=e.split('\n'),r=/\s+\b(return|where|order by|match|with|skip|limit|create|delete|set)\b\s/g;for(var t=0;t<n.length;t++)n[t]=n[t].replace(r,' \n$1 ').trim();return n.join('\n')}};e.defineMIME('application/x-cypher-query','cypher')}); -/* Include script: sieve */ +/* Include script: sieve.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('sieve',function(e){function t(e){var t={},r=e.split(' ');for(var n=0;n<r.length;++n)t[r[n]]=!0;return t};var i=t('if elsif else stop require'),u=t('true false not'),o=e.indentUnit;function n(e,n){var t=e.next();if(t=='/'&&e.eat('*')){n.tokenize=r;return r(e,n)};if(t==='#'){e.skipToEnd();return'comment'};if(t=='"'){n.tokenize=l(t);return n.tokenize(e,n)};if(t=='('){n._indent.push('(');n._indent.push('{');return null};if(t==='{'){n._indent.push('{');return null};if(t==')'){n._indent.pop();n._indent.pop()};if(t==='}'){n._indent.pop();return null};if(t==',')return null;if(t==';')return null;if(/[{}\(\),;]/.test(t))return null;if(/\d/.test(t)){e.eatWhile(/[\d]/);e.eat(/[KkMmGg]/);return'number'};if(t==':'){e.eatWhile(/[a-zA-Z_]/);e.eatWhile(/[a-zA-Z0-9_]/);return'operator'};e.eatWhile(/\w/);var o=e.current();if((o=='text')&&e.eat(':')){n.tokenize=f;return'string'};if(i.propertyIsEnumerable(o))return'keyword';if(u.propertyIsEnumerable(o))return'atom';return null};function f(e,t){t._multiLineString=!0;if(!e.sol()){e.eatSpace();if(e.peek()=='#'){e.skipToEnd();return'comment'};e.skipToEnd();return'string'};if((e.next()=='.')&&(e.eol())){t._multiLineString=!1;t.tokenize=n};return'string'};function r(e,t){var i=!1,r;while((r=e.next())!=null){if(i&&r=='/'){t.tokenize=n;break};i=(r=='*')};return'comment'};function l(e){return function(t,r){var i=!1,u;while((u=t.next())!=null){if(u==e&&!i)break;i=!i&&u=='\\'};if(!i)r.tokenize=n;return'string'}};return{startState:function(e){return{tokenize:n,baseIndent:e||0,_indent:[]}},token:function(e,t){if(e.eatSpace())return null;return(t.tokenize||n)(e,t)},indent:function(e,n){var t=e._indent.length;if(n&&(n[0]=='}'))t--;if(t<0)t=0;return t*o},electricChars:'}'}});e.defineMIME('application/sieve','sieve')}); -/* Include script: soy */ +/* Include script: soy.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../htmlmixed/htmlmixed'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../htmlmixed/htmlmixed'],e);else e(CodeMirror)})(function(e){'use strict';var t=['template','literal','msg','fallbackmsg','let','if','elseif','else','switch','case','default','foreach','ifempty','for','call','param','deltemplate','delcall','log'];e.defineMode('soy',function(a){var r=e.getMode(a,'text/plain'),s={html:e.getMode(a,{name:'text/html',multilineTagIndentFactor:2,multilineTagIndentPastTag:!1}),attributes:r,text:r,uri:r,css:e.getMode(a,'text/css'),js:e.getMode(a,{name:'text/javascript',statementIndent:2*a.indentUnit})};function n(e){return e[e.length-1]};function l(e,t,s){if(e.sol()){for(var i=0;i<t.indent;i++){if(!e.eat(/\s/))break};if(i)return null};var a=e.string,r=s.exec(a.substr(e.pos));if(r){e.string=a.substr(0,e.pos+r.index)};var l=e.hideFirstChars(t.indent,function(){var a=n(t.localStates);return a.mode.token(e,a.state)});e.string=a;return l};function d(e,t){while(e){if(e.element===t)return!0;e=e.next};return!1};function i(e,t){return{element:t,next:e}};function o(e,t,a){return d(e,t)?'variable-2':(a?'variable':'variable-2 error')};function c(e){if(e.scopes){e.variables=e.scopes.element;e.scopes=e.scopes.next}};return{startState:function(){return{kind:[],kindTag:[],soyState:[],templates:null,variables:i(null,'ij'),scopes:null,indent:0,quoteKind:null,localStates:[{mode:s.html,state:e.startState(s.html)}]}},copyState:function(t){return{tag:t.tag,kind:t.kind.concat([]),kindTag:t.kindTag.concat([]),soyState:t.soyState.concat([]),templates:t.templates,variables:t.variables,scopes:t.scopes,indent:t.indent,quoteKind:t.quoteKind,localStates:t.localStates.map(function(t){return{mode:t.mode,state:e.copyState(t.mode,t.state)}})}},token:function(d,r){var u;switch(n(r.soyState)){case'comment':if(d.match(/^.*?\*\//)){r.soyState.pop()} else{d.skipToEnd()};if(!r.scopes){var h=/@param\??\s+(\S+)/g,g=d.current();for(var u;(u=h.exec(g));){r.variables=i(r.variables,u[1])}};return'comment';case'string':var u=d.match(/^.*?(["']|\\[\s\S])/);if(!u){d.skipToEnd()} else if(u[1]==r.quoteKind){r.quoteKind=null;r.soyState.pop()};return'string'};if(d.match(/^\/\*/)){r.soyState.push('comment');return'comment'} @@ -760,7 +758,7 @@ else if(r.tag=='namespace'){if(!r.scopes){r.variables=i(null,'ij')}} else if(r.tag.match(/^@(?:param\??|inject)/)){r.soyState.push('param-def')};return'keyword'} else if(d.eat('{')){r.tag='print';r.indent+=2*a.indentUnit;r.soyState.push('tag');return'keyword'};return l(d,r,/\{|\s+\/\/|\/\*/)},indent:function(t,i){var s=t.indent,l=n(t.soyState);if(l=='comment')return e.Pass;if(l=='literal'){if(/^\{\/literal}/.test(i))s-=a.indentUnit} else{if(/^\s*\{\/(template|deltemplate)\b/.test(i))return 0;if(/^\{(\/|(fallbackmsg|elseif|else|ifempty)\b)/.test(i))s-=a.indentUnit;if(t.tag!='switch'&&/^\{(case|default)\b/.test(i))s-=a.indentUnit;if(/^\{\/switch\b/.test(i))s-=a.indentUnit};var r=n(t.localStates);if(s&&r.mode.indent){s+=r.mode.indent(r.state,i)};return s},innerMode:function(e){if(e.soyState.length&&n(e.soyState)!='literal')return null;else return n(e.localStates)},electricInput:/^\s*\{(\/|\/template|\/deltemplate|\/switch|fallbackmsg|elseif|else|case|default|ifempty|\/literal\})$/,lineComment:'//',blockCommentStart:'/*',blockCommentEnd:'*/',blockCommentContinue:' * ',useInnerComments:!1,fold:'indent'}},'htmlmixed');e.registerHelper('hintWords','soy',t.concat(['delpackage','namespace','alias','print','css','debugger']));e.defineMIME('text/x-soy','soy')}); -/* Include script: pig */ +/* Include script: pig.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('pig',function(e,O){var E=O.keywords,t=O.builtins,I=O.types,A=O.multiLineStrings,T=/[*+\-%<>=&?:\/!|]/;function N(e,O,T){O.tokenize=T;return T(e,O)};function n(e,O){var E=!1,T;while(T=e.next()){if(T=='/'&&E){O.tokenize=r;break};E=(T=='*')};return'comment'};function R(e){return function(O,T){var E=!1,t,I=!1;while((t=O.next())!=null){if(t==e&&!E){I=!0;break};E=!E&&t=='\\'};if(I||!(E||A))T.tokenize=r;return'error'}};function r(e,r){var O=e.next();if(O=='"'||O=='\'')return N(e,r,R(O));else if(/[\[\]{}\(\),;\.]/.test(O))return null;else if(/\d/.test(O)){e.eatWhile(/[\w\.]/);return'number'} else if(O=='/'){if(e.eat('*')){return N(e,r,n)} else{e.eatWhile(T);return'operator'}} @@ -768,11 +766,11 @@ else if(O=='-'){if(e.eat('-')){e.skipToEnd();return'comment'} else{e.eatWhile(T);return'operator'}} else if(T.test(O)){e.eatWhile(T);return'operator'} else{e.eatWhile(/[\w\$_]/);if(E&&E.propertyIsEnumerable(e.current().toUpperCase())){if(!e.eat(')')&&!e.eat('.'))return'keyword'};if(t&&t.propertyIsEnumerable(e.current().toUpperCase()))return'variable-2';if(I&&I.propertyIsEnumerable(e.current().toUpperCase()))return'variable-3';return'variable'}};return{startState:function(){return{tokenize:r,startOfLine:!0}},token:function(e,O){if(e.eatSpace())return null;var T=O.tokenize(e,O);return T}}});(function(){function O(e){var T={},r=e.split(' ');for(var O=0;O<r.length;++O)T[r[O]]=!0;return T};var T='ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER ',r='VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE NEQ MATCHES TRUE FALSE DUMP',E='BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP ';e.defineMIME('text/x-pig',{name:'pig',builtins:O(T),keywords:O(r),types:O(E)});e.registerHelper('hintWords','pig',(T+E+r).split(' '))}())}); -/* Include script: apl */ +/* Include script: apl.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('apl',function(){var a={'.':'innerProduct','\\':'scan','/':'reduce','⌿':'reduce1Axis','⍀':'scan1Axis','¨':'each','⍣':'power'};var e={'+':['conjugate','add'],'−':['negate','subtract'],'×':['signOf','multiply'],'÷':['reciprocal','divide'],'⌈':['ceiling','greaterOf'],'⌊':['floor','lesserOf'],'∣':['absolute','residue'],'⍳':['indexGenerate','indexOf'],'?':['roll','deal'],'⋆':['exponentiate','toThePowerOf'],'⍟':['naturalLog','logToTheBase'],'○':['piTimes','circularFuncs'],'!':['factorial','binomial'],'⌹':['matrixInverse','matrixDivide'],'<':[null,'lessThan'],'≤':[null,'lessThanOrEqual'],'=':[null,'equals'],'>':[null,'greaterThan'],'≥':[null,'greaterThanOrEqual'],'≠':[null,'notEqual'],'≡':['depth','match'],'≢':[null,'notMatch'],'∈':['enlist','membership'],'⍷':[null,'find'],'∪':['unique','union'],'∩':[null,'intersection'],'∼':['not','without'],'∨':[null,'or'],'∧':[null,'and'],'⍱':[null,'nor'],'⍲':[null,'nand'],'⍴':['shapeOf','reshape'],',':['ravel','catenate'],'⍪':[null,'firstAxisCatenate'],'⌽':['reverse','rotate'],'⊖':['axis1Reverse','axis1Rotate'],'⍉':['transpose',null],'↑':['first','take'],'↓':[null,'drop'],'⊂':['enclose','partitionWithAxis'],'⊃':['diclose','pick'],'⌷':[null,'index'],'⍋':['gradeUp',null],'⍒':['gradeDown',null],'⊤':['encode',null],'⊥':['decode',null],'⍕':['format','formatByExample'],'⍎':['execute',null],'⊣':['stop','left'],'⊢':['pass','right']};var n=/[\.\/⌿⍀¨⍣]/,t=/⍬/,r=/[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/,l=/←/,i=/[⍝#].*$/,u=function(e){var n;n=!1;return function(t){n=t;if(t===e){return n==='\\'};return!0}};return{startState:function(){return{prev:!1,func:!1,op:!1,string:!1,escape:!1}},token:function(s,f){var o,c;if(s.eatSpace()){return null};o=s.next();if(o==='"'||o==='\''){s.eatWhile(u(o));s.next();f.prev=!0;return'string'};if(/[\[{\(]/.test(o)){f.prev=!1;return null};if(/[\]}\)]/.test(o)){f.prev=!0;return null};if(t.test(o)){f.prev=!1;return'niladic'};if(/[¯\d]/.test(o)){if(f.func){f.func=!1;f.prev=!1} else{f.prev=!0};s.eatWhile(/[\w\.]/);return'number'};if(n.test(o)){return'operator apl-'+a[o]};if(l.test(o)){return'apl-arrow'};if(r.test(o)){c='apl-';if(e[o]!=null){if(f.prev){c+=e[o][1]} else{c+=e[o][0]}};f.func=!0;f.prev=!1;return'function '+c};if(i.test(o)){s.skipToEnd();return'comment'};if(o==='∘'&&s.peek()==='.'){s.next();return'function jot-dot'};s.eatWhile(/[\w\$_]/);f.prev=!0;return'keyword'}}});e.defineMIME('text/apl','apl')}); -/* Include script: crystal */ +/* Include script: crystal.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('crystal',function(e){function r(e,t){return new RegExp((t?'':'^')+'(?:'+e.join('|')+')'+(t?'$':'\\b'))};function t(e,t,n){n.tokenize.push(e);return e(t,n)};var c=/^(?:[-+/%|&^]|\*\*?|[<>]{2})/,s=/^(?:[=!]~|===|<=>|[<>=!]=?|[|&]{2}|~)/,h=/^(?:\[\][?=]?)/,z=/^(?:\.(?:\.{2})?|->|[?:])/,u=/^[a-z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,o=/^[A-Z_\u009F-\uFFFF][a-zA-Z0-9_\u009F-\uFFFF]*/,b=r(['abstract','alias','as','asm','begin','break','case','class','def','do','else','elsif','end','ensure','enum','extend','for','fun','if','include','instance_sizeof','lib','macro','module','next','of','out','pointerof','private','protected','rescue','return','require','select','sizeof','struct','super','then','type','typeof','uninitialized','union','unless','until','when','while','with','yield','__DIR__','__END_LINE__','__FILE__','__LINE__']),x=r(['true','false','nil','self']),y=['def','fun','macro','class','module','struct','lib','enum','union','do','for'],g=r(y),I=['if','unless','case','while','until','begin','then'],w=r(I),p=['end','else','elsif','rescue','ensure'],v=r(p),d=['\\)','\\}','\\]'],S=new RegExp('^(?:'+d.join('|')+')$'),k={'def':F,'fun':F,'macro':E,'class':i,'module':i,'struct':i,'lib':i,'enum':i,'union':i};var f={'[':']','{':'}','(':')','<':'>'};function l(e,r){if(e.eatSpace()){return null};if(r.lastToken!='\\'&&e.match('{%',!1)){return t(n('%','%'),e,r)};if(r.lastToken!='\\'&&e.match('{{',!1)){return t(n('{','}'),e,r)};if(e.peek()=='#'){e.skipToEnd();return'comment'};var i;if(e.match(u)){e.eat(/[?!]/);i=e.current();if(e.eat(':')){return'atom'} else if(r.lastToken=='.'){return'property'} else if(b.test(i)){if(g.test(i)){if(!(i=='fun'&&r.blocks.indexOf('lib')>=0)&&!(i=='def'&&r.lastToken=='abstract')){r.blocks.push(i);r.currentIndent+=1}} @@ -790,18 +788,18 @@ else if(e.eat('b')){e.match(/^[01]+/)};return'number'};if(e.eat(/^\d/)){e.match( else{e.match(c)||e.match(s)||e.match(h)};t.tokenize.pop();return'def'};function i(e,t){if(e.eatSpace()){return null};e.match(o);t.tokenize.pop();return'def'};function m(t,e,r){return function(i,u){var o=!1;while(i.peek()){if(!o){if(i.match('{%',!1)){u.tokenize.push(n('%','%'));return e};if(i.match('{{',!1)){u.tokenize.push(n('{','}'));return e};if(r&&i.match('#{',!1)){u.tokenize.push(a('#{','}','meta'));return e};var f=i.next();if(f==t){u.tokenize.pop();return e};o=r&&f=='\\'} else{i.next();o=!1}};return e}};function A(e,t){return function(r,i){if(r.sol()){r.eatSpace();if(r.match(e)){i.tokenize.pop();return'string'}};var u=!1;while(r.peek()){if(!u){if(r.match('{%',!1)){i.tokenize.push(n('%','%'));return'string'};if(r.match('{{',!1)){i.tokenize.push(n('{','}'));return'string'};if(t&&r.match('#{',!1)){i.tokenize.push(a('#{','}','meta'));return'string'};u=t&&r.next()=='\\'} else{r.next();u=!1}};return'string'}};return{startState:function(){return{tokenize:[l],currentIndent:0,lastToken:null,lastStyle:null,blocks:[]}},token:function(e,t){var n=t.tokenize[t.tokenize.length-1](e,t),r=e.current();if(n&&n!='comment'){t.lastToken=r;t.lastStyle=n};return n},indent:function(t,n){n=n.replace(/^\s*(?:\{%)?\s*|\s*(?:%\})?\s*$/g,'');if(v.test(n)||S.test(n)){return e.indentUnit*(t.currentIndent-1)};return e.indentUnit*t.currentIndent},fold:'indent',electricInput:r(d.concat(p),!0),lineComment:'#'}});e.defineMIME('text/x-crystal','crystal')}); -/* Include script: clike */ +/* Include script: clike.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(t){'use strict';function d(e,t,n,r,i,a){this.indented=e;this.column=t;this.type=n;this.info=r;this.align=i;this.prev=a};function u(e,t,n,r){var i=e.indented;if(e.context&&e.context.type=='statement'&&n!='statement')i=e.context.indented;return e.context=new d(i,t,n,r,null,e.context)};function l(e){var t=e.context.type;if(t==')'||t==']'||t=='}')e.indented=e.context.indented;return e.context=e.context.prev};function p(e,t,n){if(t.prevToken=='variable'||t.prevToken=='type')return!0;if(/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(e.string.slice(0,n)))return!0;if(t.typeAtEndOfLine&&e.column()==e.indentation())return!0};function m(e){for(;;){if(!e||e.type=='top')return!0;if(e.type=='}'&&e.prev.info!='namespace')return!1;e=e.prev}};t.defineMode('clike',function(n,e){var o=n.indentUnit,c=e.statementIndentUnit||o,k=e.dontAlignCalls,v=e.keywords||{},S=e.types||{},C=e.builtin||{},f=e.blockKeywords||{},T=e.defKeywords||{},M=e.atoms||{},a=e.hooks||{},P=e.multiLineStrings,D=e.indentStatements!==!1,L=e.indentSwitch!==!1,h=e.namespaceSeparator,I=e.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,F=e.numberStart||/[\d\.]/,z=e.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,g=e.isOperatorChar||/[+\-*&%=<>!?|\/]/,y=e.isIdentifierChar||/[\w\$_\xa1-\uffff]/;var r,s;function x(e,t){var n=e.next();if(a[n]){var l=a[n](e,t);if(l!==!1)return l};if(n=='"'||n=='\''){t.tokenize=j(n);return t.tokenize(e,t)};if(I.test(n)){r=n;return null};if(F.test(n)){e.backUp(1);if(e.match(z))return'number';e.next()};if(n=='/'){if(e.eat('*')){t.tokenize=w;return w(e,t)};if(e.eat('/')){e.skipToEnd();return'comment'}};if(g.test(n)){while(!e.match(/^\/[\/*]/,!1)&&e.eat(g)){};return'operator'};e.eatWhile(y);if(h)while(e.match(h))e.eatWhile(y);var o=e.current();if(i(v,o)){if(i(f,o))r='newstatement';if(i(T,o))s=!0;return'keyword'};if(i(S,o))return'type';if(i(C,o)){if(i(f,o))r='newstatement';return'builtin'};if(i(M,o))return'atom';return'variable'};function j(e){return function(t,n){var r=!1,i,a=!1;while((i=t.next())!=null){if(i==e&&!r){a=!0;break};r=!r&&i=='\\'};if(a||!(r||P))n.tokenize=null;return'string'}};function w(e,t){var r=!1,n;while(n=e.next()){if(n=='/'&&r){t.tokenize=null;break};r=(n=='*')};return'comment'};function b(t,n){if(e.typeFirstDefinitions&&t.eol()&&m(n.context))n.typeAtEndOfLine=p(t,n,t.pos)};return{startState:function(e){return{tokenize:null,context:new d((e||0)-o,0,'top',null,!1),indented:0,startOfLine:!0,prevToken:null}},token:function(t,n){var i=n.context;if(t.sol()){if(i.align==null)i.align=!1;n.indented=t.indentation();n.startOfLine=!0};if(t.eatSpace()){b(t,n);return null};r=s=null;var o=(n.tokenize||x)(t,n);if(o=='comment'||o=='meta')return o;if(i.align==null)i.align=!0;if(r==';'||r==':'||(r==','&&t.match(/^\s*(?:\/\/.*)?$/,!1)))while(n.context.type=='statement')l(n);else if(r=='{')u(n,t.column(),'}');else if(r=='[')u(n,t.column(),']');else if(r=='(')u(n,t.column(),')');else if(r=='}'){while(i.type=='statement')i=l(n);if(i.type=='}')i=l(n);while(i.type=='statement')i=l(n)} else if(r==i.type)l(n);else if(D&&(((i.type=='}'||i.type=='top')&&r!=';')||(i.type=='statement'&&r=='newstatement'))){u(n,t.column(),'statement',t.current())};if(o=='variable'&&((n.prevToken=='def'||(e.typeFirstDefinitions&&p(t,n,t.start)&&m(n.context)&&t.match(/^\s*\(/,!1)))))o='def';if(a.token){var c=a.token(t,n,o);if(c!==undefined)o=c};if(o=='def'&&e.styleDefs===!1)o='variable';n.startOfLine=!1;n.prevToken=s?'def':o||r;b(t,n);return o},indent:function(n,r){if(n.tokenize!=x&&n.tokenize!=null||n.typeAtEndOfLine)return t.Pass;var i=n.context,s=r&&r.charAt(0);if(i.type=='statement'&&s=='}')i=i.prev;if(e.dontIndentStatements)while(i.type=='statement'&&e.dontIndentStatements.test(i.info))i=i.prev;if(a.indent){var u=a.indent(n,i,r);if(typeof u=='number')return u};var l=s==i.type,f=i.prev&&i.prev.info=='switch';if(e.allmanIndentation&&/[{(]/.test(s)){while(i.type!='top'&&i.type!='}')i=i.prev;return i.indented};if(i.type=='statement')return i.indented+(s=='{'?0:c);if(i.align&&(!k||i.type!=')'))return i.column+(l?0:1);if(i.type==')'&&!l)return i.indented+c;return i.indented+(l?0:o)+(!l&&f&&!/^(?:case|default)\b/.test(r)?o:0)},electricInput:L?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:'/*',blockCommentEnd:'*/',blockCommentContinue:' * ',lineComment:'//',fold:'brace'}});function e(e){var n={},r=e.split(' ');for(var t=0;t<r.length;++t)n[r[t]]=!0;return n};function i(e,t){if(typeof e==='function'){return e(t)} else{return e.propertyIsEnumerable(t)}};var c='auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile',o='int long char short double float unsigned signed void size_t ptrdiff_t';function a(e,t){if(!t.startOfLine)return!1;for(var n,r=null;n=e.peek();){if(n=='\\'&&e.match(/^.$/)){r=a;break} else if(n=='/'&&e.match(/^\/[\/\*]/,!1)){break};e.next()};t.tokenize=r;return'meta'};function h(e,t){if(t.prevToken=='type')return'type';return!1};function r(e){e.eatWhile(/[\w\.']/);return'number'};function f(e,t){e.backUp(1);if(e.match(/(R|u8R|uR|UR|LR)/)){var n=e.match(/"([^\s\\()]{0,16})\(/);if(!n){return!1};t.cpp11RawStringDelim=n[1];t.tokenize=y;return y(e,t)};if(e.match(/(u8|u|U|L)/)){if(e.match(/["']/,!1)){return'string'};return!1};e.next();return!1};function w(e){var t=/(\w+)::~?(\w+)$/.exec(e);return t&&t[1]==t[2]};function g(e,t){var n;while((n=e.next())!=null){if(n=='"'&&!e.eat('"')){t.tokenize=null;break}};return'string'};function y(e,t){var n=t.cpp11RawStringDelim.replace(/[^\w\s]/g,'\\$&'),r=e.match(new RegExp('.*?\\)'+n+'"'));if(r)t.tokenize=null;else e.skipToEnd();return'string'};function n(e,n){if(typeof e=='string')e=[e];var a=[];function r(e){if(e)for(var t in e)if(e.hasOwnProperty(t))a.push(t)};r(n.keywords);r(n.types);r(n.builtin);r(n.atoms);if(a.length){n.helperType=e[0];t.registerHelper('hintWords',e[0],a)};for(var i=0;i<e.length;++i)t.defineMIME(e[i],n)};n(['text/x-csrc','text/x-c','text/x-chdr'],{name:'clike',keywords:e(c),types:e(o+' bool _Complex _Bool float_t double_t intptr_t intmax_t int8_t int16_t int32_t int64_t uintptr_t uintmax_t uint8_t uint16_t uint32_t uint64_t'),blockKeywords:e('case do else for if switch while struct'),defKeywords:e('struct'),typeFirstDefinitions:!0,atoms:e('null true false'),hooks:{'#':a,'*':h},modeProps:{fold:['brace','include']}});n(['text/x-c++src','text/x-c++hdr'],{name:'clike',keywords:e(c+' asm dynamic_cast namespace reinterpret_cast try explicit new static_cast typeid catch operator template typename class friend private this using const_cast inline public throw virtual delete mutable protected alignas alignof constexpr decltype nullptr noexcept thread_local final static_assert override'),types:e(o+' bool wchar_t'),blockKeywords:e('catch class do else finally for if struct switch try while'),defKeywords:e('class namespace struct enum union'),typeFirstDefinitions:!0,atoms:e('true false null'),dontIndentStatements:/^template$/,isIdentifierChar:/[\w\$_~\xa1-\uffff]/,hooks:{'#':a,'*':h,'u':f,'U':f,'L':f,'R':f,'0':r,'1':r,'2':r,'3':r,'4':r,'5':r,'6':r,'7':r,'8':r,'9':r,token:function(e,t,n){if(n=='variable'&&e.peek()=='('&&(t.prevToken==';'||t.prevToken==null||t.prevToken=='}')&&w(e.current()))return'def'}},namespaceSeparator:'::',modeProps:{fold:['brace','include']}});n('text/x-java',{name:'clike',keywords:e('abstract assert break case catch class const continue default do else enum extends final finally float for goto if implements import instanceof interface native new package private protected public return static strictfp super switch synchronized this throw throws transient try volatile while @interface'),types:e('byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void'),blockKeywords:e('catch class do else finally for if switch try while'),defKeywords:e('class interface enum @interface'),typeFirstDefinitions:!0,atoms:e('true false null'),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{'@':function(e){if(e.match('interface',!1))return!1;e.eatWhile(/[\w\$_]/);return'meta'}},modeProps:{fold:['brace','import']}});n('text/x-csharp',{name:'clike',keywords:e('abstract as async await base break case catch checked class const continue default delegate do else enum event explicit extern finally fixed for foreach goto if implicit in interface internal is lock namespace new operator out override params private protected public readonly ref return sealed sizeof stackalloc static struct switch this throw try typeof unchecked unsafe using virtual void volatile while add alias ascending descending dynamic from get global group into join let orderby partial remove select set value var yield'),types:e('Action Boolean Byte Char DateTime DateTimeOffset Decimal Double Func Guid Int16 Int32 Int64 Object SByte Single String Task TimeSpan UInt16 UInt32 UInt64 bool byte char decimal double short int long object sbyte float string ushort uint ulong'),blockKeywords:e('catch class do else finally for foreach if struct switch try while'),defKeywords:e('class interface namespace struct var'),typeFirstDefinitions:!0,atoms:e('true false null'),hooks:{'@':function(e,t){if(e.eat('"')){t.tokenize=g;return g(e,t)};e.eatWhile(/[\w\$_]/);return'meta'}}});function b(e,t){var n=!1;while(!e.eol()){if(!n&&e.match('"""')){t.tokenize=null;break};n=e.next()=='\\'&&!n};return'string'};n('text/x-scala',{name:'clike',keywords:e('abstract case catch class def do else extends final finally for forSome if implicit import lazy match new null object override package private protected return sealed super this throw trait try type val var while with yield _ assert assume require print println printf readLine readBoolean readByte readShort readChar readInt readLong readFloat readDouble'),types:e('AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either Enumeration Equiv Error Exception Fractional Function IndexedSeq Int Integral Iterable Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void'),multiLineStrings:!0,blockKeywords:e('catch class enum do else finally for forSome if match switch try while'),defKeywords:e('class enum def object package trait type val var'),atoms:e('true false null'),indentStatements:!1,indentSwitch:!1,isOperatorChar:/[+\-*&%=<>!?|\/#:@]/,hooks:{'@':function(e){e.eatWhile(/[\w\$_]/);return'meta'},'"':function(e,t){if(!e.match('""'))return!1;t.tokenize=b;return t.tokenize(e,t)},'\'':function(e){e.eatWhile(/[\w\$_\xa1-\uffff]/);return'atom'},'=':function(e,t){var n=t.context;if(n.type=='}'&&n.align&&e.eat('>')){t.context=new d(n.indented,n.column,n.type,n.info,null,n.prev);return'operator'} else{return!1}}},modeProps:{closeBrackets:{triples:'"'}}});function k(e){return function(t,n){var r=!1,i,a=!1;while(!t.eol()){if(!e&&!r&&t.match('"')){a=!0;break};if(e&&t.match('"""')){a=!0;break};i=t.next();if(!r&&i=='$'&&t.match('{'))t.skipTo('}');r=!r&&i=='\\'&&!e};if(a||!e)n.tokenize=null;return'string'}};n('text/x-kotlin',{name:'clike',keywords:e('package as typealias class interface this super val var fun for is in This throw return break continue object if else while do try when !in !is as? file import where by get set abstract enum open inner override private public internal protected catch finally out final vararg reified dynamic companion constructor init sealed field property receiver param sparam lateinit data inline noinline tailrec external annotation crossinline const operator infix suspend'),types:e('Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable Compiler Double Exception Float Integer Long Math Number Object Package Pair Process Runtime Runnable SecurityManager Short StackTraceElement StrictMath String StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void'),intendSwitch:!1,indentStatements:!1,multiLineStrings:!0,number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,blockKeywords:e('catch class do else finally for if where try while enum'),defKeywords:e('class val var object interface fun'),atoms:e('true false null this'),hooks:{'"':function(e,t){t.tokenize=k(e.match('""'));return t.tokenize(e,t)}},modeProps:{closeBrackets:{triples:'"'}}});n(['x-shader/x-vertex','x-shader/x-fragment'],{name:'clike',keywords:e('sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout'),types:e('float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4'),blockKeywords:e('for while do if else struct'),builtin:e('radians degrees sin cos tan asin acos atan pow exp log exp2 sqrt inversesqrt abs sign floor ceil fract mod min max clamp mix step smoothstep length distance dot cross normalize ftransform faceforward reflect refract matrixCompMult lessThan lessThanEqual greaterThan greaterThanEqual equal notEqual any all not texture1D texture1DProj texture1DLod texture1DProjLod texture2D texture2DProj texture2DLod texture2DProjLod texture3D texture3DProj texture3DLod texture3DProjLod textureCube textureCubeLod shadow1D shadow2D shadow1DProj shadow2DProj shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod dFdx dFdy fwidth noise1 noise2 noise3 noise4'),atoms:e('true false gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_FogCoord gl_PointCoord gl_Position gl_PointSize gl_ClipVertex gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor gl_TexCoord gl_FogFragCoord gl_FragCoord gl_FrontFacing gl_FragData gl_FragDepth gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose gl_ProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixInverseTranspose gl_TextureMatrixInverseTranspose gl_NormalScale gl_DepthRange gl_ClipPlane gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel gl_FrontLightModelProduct gl_BackLightModelProduct gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ gl_FogParameters gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits gl_MaxDrawBuffers'),indentSwitch:!1,hooks:{'#':a},modeProps:{fold:['brace','include']}});n('text/x-nesc',{name:'clike',keywords:e(c+'as atomic async call command component components configuration event generic implementation includes interface module new norace nx_struct nx_union post provides signal task uses abstract extends'),types:e(o),blockKeywords:e('case do else for if switch while struct'),atoms:e('null true false'),hooks:{'#':a},modeProps:{fold:['brace','include']}});n('text/x-objectivec',{name:'clike',keywords:e(c+'inline restrict _Bool _Complex _Imaginary BOOL Class bycopy byref id IMP in inout nil oneway out Protocol SEL self super atomic nonatomic retain copy readwrite readonly'),types:e(o),atoms:e('YES NO NULL NILL ON OFF true false'),hooks:{'@':function(e){e.eatWhile(/[\w\$]/);return'keyword'},'#':a,indent:function(e,t,n){if(t.type=='statement'&&/^@\w/.test(n))return t.indented}},modeProps:{fold:'brace'}});n('text/x-squirrel',{name:'clike',keywords:e('base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static'),types:e(o),blockKeywords:e('case catch class else for foreach if switch try while'),defKeywords:e('function local class'),typeFirstDefinitions:!0,atoms:e('true false null'),hooks:{'#':a},modeProps:{fold:['brace','include']}});var s=null;function x(e){return function(t,n){var r=!1,a,i=!1;while(!t.eol()){if(!r&&t.match('"')&&(e=='single'||t.match('""'))){i=!0;break};if(!r&&t.match('``')){s=x(e);i=!0;break};a=t.next();r=e=='single'&&!r&&a=='\\'};if(i)n.tokenize=null;return'string'}};n('text/x-ceylon',{name:'clike',keywords:e('abstracts alias assembly assert assign break case catch class continue dynamic else exists extends finally for function given if import in interface is let module new nonempty object of out outer package return satisfies super switch then this throw try value void while'),types:function(e){var t=e.charAt(0);return(t===t.toUpperCase()&&t!==t.toLowerCase())},blockKeywords:e('case catch class dynamic else finally for function if interface module new object switch try while'),defKeywords:e('class dynamic function interface module object package value'),builtin:e('abstract actual aliased annotation by default deprecated doc final formal late license native optional sealed see serializable shared suppressWarnings tagged throws variable'),isPunctuationChar:/[\[\]{}\(\),;\:\.`]/,isOperatorChar:/[+\-*&%=<>!?|^~:\/]/,numberStart:/[\d#$]/,number:/^(?:#[\da-fA-F_]+|\$[01_]+|[\d_]+[kMGTPmunpf]?|[\d_]+\.[\d_]+(?:[eE][-+]?\d+|[kMGTPmunpf]|)|)/i,multiLineStrings:!0,typeFirstDefinitions:!0,atoms:e('true false null larger smaller equal empty finished'),indentSwitch:!1,styleDefs:!1,hooks:{'@':function(e){e.eatWhile(/[\w\$_]/);return'meta'},'"':function(e,t){t.tokenize=x(e.match('""')?'triple':'single');return t.tokenize(e,t)},'`':function(e,t){if(!s||!e.match('`'))return!1;t.tokenize=s;s=null;return t.tokenize(e,t)},'\'':function(e){e.eatWhile(/[\w\$_\xa1-\uffff]/);return'atom'},token:function(e,t,n){if((n=='variable'||n=='type')&&t.prevToken=='.'){return'variable-2'}}},modeProps:{fold:['brace','import'],closeBrackets:{triples:'"'}}})}); -/* Include script: oz */ +/* Include script: oz.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('oz',function(e){function n(e){return new RegExp('^(('+e.join(')|(')+'))\\b')};var c=/[\^@!\|<>#~\.\*\-\+\\/,=]/,f=/(<-)|(:=)|(=<)|(>=)|(<=)|(<:)|(>:)|(=:)|(\\=)|(\\=:)|(!!)|(==)|(::)/,s=/(:::)|(\.\.\.)|(=<:)|(>=:)/,r=['in','then','else','of','elseof','elsecase','elseif','catch','finally','with','require','prepare','import','export','define','do'],i=['end'],l=n(['true','false','nil','unit']),d=n(['andthen','at','attr','declare','feat','from','lex','mod','div','mode','orelse','parser','prod','prop','scanner','self','syn','token']),m=n(['local','proc','fun','case','class','if','cond','or','dis','choice','not','thread','try','raise','lock','for','suchthat','meth','functor']),o=n(r),a=n(i);function t(e,t){if(e.eatSpace()){return null};if(e.match(/[{}]/)){return'bracket'};if(e.match(/(\[])/)){return'keyword'};if(e.match(s)||e.match(f)){return'operator'};if(e.match(l)){return'atom'};var r=e.match(m);if(r){if(!t.doInCurrentLine)t.currentIndent++;else t.doInCurrentLine=!1;if(r[0]=='proc'||r[0]=='fun')t.tokenize=p;else if(r[0]=='class')t.tokenize=h;else if(r[0]=='meth')t.tokenize=k;return'keyword'};if(e.match(o)||e.match(d)){return'keyword'};if(e.match(a)){t.currentIndent--;return'keyword'};var n=e.next();if(n=='"'||n=='\''){t.tokenize=z(n);return t.tokenize(e,t)};if(/[~\d]/.test(n)){if(n=='~'){if(!/^[0-9]/.test(e.peek()))return null;else if((e.next()=='0'&&e.match(/^[xX][0-9a-fA-F]+/))||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/))return'number'};if((n=='0'&&e.match(/^[xX][0-9a-fA-F]+/))||e.match(/^[0-9]*(\.[0-9]+)?([eE][~+]?[0-9]+)?/))return'number';return null};if(n=='%'){e.skipToEnd();return'comment'} else if(n=='/'){if(e.eat('*')){t.tokenize=u;return u(e,t)}};if(c.test(n)){return'operator'};e.eatWhile(/\w/);return'variable'};function h(e,n){if(e.eatSpace()){return null};e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)/);n.tokenize=t;return'variable-3'};function k(e,n){if(e.eatSpace()){return null};e.match(/([a-zA-Z][A-Za-z0-9_]*)|(`.+`)/);n.tokenize=t;return'def'};function p(e,n){if(e.eatSpace()){return null};if(!n.hasPassedFirstStage&&e.eat('{')){n.hasPassedFirstStage=!0;return'bracket'} else if(n.hasPassedFirstStage){e.match(/([A-Z][A-Za-z0-9_]*)|(`.+`)|\$/);n.hasPassedFirstStage=!1;n.tokenize=t;return'def'} else{n.tokenize=t;return null}};function u(e,n){var i=!1,r;while(r=e.next()){if(r=='/'&&i){n.tokenize=t;break};i=(r=='*')};return'comment'};function z(e){return function(n,r){var i=!1,o,a=!1;while((o=n.next())!=null){if(o==e&&!i){a=!0;break};i=!i&&o=='\\'};if(a||!i)r.tokenize=t;return'string'}};function b(){var e=r.concat(i);return new RegExp('[\\[\\]]|('+e.join('|')+')$')};return{startState:function(){return{tokenize:t,currentIndent:0,doInCurrentLine:!1,hasPassedFirstStage:!1}},token:function(e,t){if(e.sol())t.doInCurrentLine=0;return t.tokenize(e,t)},indent:function(t,n){var r=n.replace(/^\s+|\s+$/g,'');if(r.match(a)||r.match(o)||r.match(/(\[])/))return e.indentUnit*(t.currentIndent-1);if(t.currentIndent<0)return 0;return t.currentIndent*e.indentUnit},fold:'indent',electricInput:b(),lineComment:'%',blockCommentStart:'/*',blockCommentEnd:'*/'}});e.defineMIME('text/x-oz','oz')}); -/* Include script: modelica */ +/* Include script: modelica.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("modelica",function(t,n){var u=t.indentUnit,f=n.keywords||{};var s=n.builtin||{};var a=n.atoms||{};var o=/[;=\(:\),{}.*<>+\-\/^\[\]]/,l=/(:=|<=|>=|==|<>|\.\+|\.\-|\.\*|\.\/|\.\^)/,i=/[0-9]/,r=/[_a-zA-Z]/;function c(e,t){e.skipToEnd();t.tokenize=null;return"comment"};function p(e,t){var i=!1,n;while(n=e.next()){if(i&&n=="/"){t.tokenize=null;break};i=(n=="*")};return"comment"};function d(e,t){var n=!1,i;while((i=e.next())!=null){if(i=="\""&&!n){t.tokenize=null;t.sol=!1;break};n=!n&&i=="\\"};return"string"};function m(e,t){e.eatWhile(i);while(e.eat(i)||e.eat(r)){};var n=e.current();if(t.sol&&(n=="package"||n=="model"||n=="when"||n=="connector"))t.level++;else if(t.sol&&n=="end"&&t.level>0)t.level--;t.tokenize=null;t.sol=!1;if(f.propertyIsEnumerable(n))return"keyword";else if(s.propertyIsEnumerable(n))return"builtin";else if(a.propertyIsEnumerable(n))return"atom";else return"variable"};function k(e,t){while(e.eat(/[^']/)){};t.tokenize=null;t.sol=!1;if(e.eat("'"))return"variable";else return"error"};function h(e,t){e.eatWhile(i);if(e.eat(".")){e.eatWhile(i)};if(e.eat("e")||e.eat("E")){if(!e.eat("-"))e.eat("+");e.eatWhile(i)};t.tokenize=null;t.sol=!1;return"number"};return{startState:function(){return{tokenize:null,level:0,sol:!0}},token:function(t,e){if(e.tokenize!=null){return e.tokenize(t,e)};if(t.sol()){e.sol=!0};if(t.eatSpace()){e.tokenize=null;return null};var n=t.next();if(n=="/"&&t.eat("/")){e.tokenize=c} else if(n=="/"&&t.eat("*")){e.tokenize=p} else if(l.test(n+t.peek())){t.next();e.tokenize=null;return"operator"} @@ -811,7 +809,7 @@ else if(n=="'"&&t.peek()&&t.peek()!="'"){e.tokenize=k} else if(n=="\""){e.tokenize=d} else if(i.test(n)){e.tokenize=h} else{e.tokenize=null;return"error"};return e.tokenize(t,e)},indent:function(t,n){if(t.tokenize!=null)return e.Pass;var i=t.level;if(/(algorithm)/.test(n))i--;if(/(equation)/.test(n))i--;if(/(initial algorithm)/.test(n))i--;if(/(initial equation)/.test(n))i--;if(/(end)/.test(n))i--;if(i>0)return u*i;else return 0},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}});function t(e){var n={},i=e.split(" ");for(var t=0;t<i.length;++t)n[i[t]]=!0;return n};var n="algorithm and annotation assert block break class connect connector constant constrainedby der discrete each else elseif elsewhen encapsulated end enumeration equation expandable extends external false final flow for function if import impure in initial inner input loop model not operator or outer output package parameter partial protected public pure record redeclare replaceable return stream then true type when while within",i="abs acos actualStream asin atan atan2 cardinality ceil cos cosh delay div edge exp floor getInstanceName homotopy inStream integer log log10 mod pre reinit rem semiLinear sign sin sinh spatialDistribution sqrt tan tanh",r="Real Boolean Integer String";function o(t,n){if(typeof t=="string")t=[t];var r=[];function o(e){if(e)for(var t in e)if(e.hasOwnProperty(t))r.push(t)};o(n.keywords);o(n.builtin);o(n.atoms);if(r.length){n.helperType=t[0];e.registerHelper("hintWords",t[0],r)};for(var i=0;i<t.length;++i)e.defineMIME(t[i],n)};o(["text/x-modelica"],{name:"modelica",keywords:t(n),builtin:t(i),atoms:t(r)})}); -/* Include script: gherkin */ +/* Include script: gherkin.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("gherkin",function(){return{startState:function(){return{lineNumber:0,tableHeaderLine:!1,allowFeature:!0,allowBackground:!1,allowScenario:!1,allowSteps:!1,allowPlaceholders:!1,allowMultilineArgument:!1,inMultilineString:!1,inMultilineTable:!1,inKeywordLine:!1}},token:function(a,e){if(a.sol()){e.lineNumber++;e.inKeywordLine=!1;if(e.inMultilineTable){e.tableHeaderLine=!1;if(!a.match(/\s*\|/,!1)){e.allowMultilineArgument=!1;e.inMultilineTable=!1}}};a.eatSpace();if(e.allowMultilineArgument){if(e.inMultilineString){if(a.match("\"\"\"")){e.inMultilineString=!1;e.allowMultilineArgument=!1} else{a.match(/.*/)};return"string"};if(e.inMultilineTable){if(a.match(/\|\s*/)){return"bracket"} else{a.match(/[^\|]*/);return e.tableHeaderLine?"header":"string"}};if(a.match("\"\"\"")){e.inMultilineString=!0;return"string"} @@ -826,12 +824,12 @@ else if(!e.inKeywordLine&&e.allowSteps&&a.match(/(那麼|那么|而且|當|当| else if(a.match(/"[^"]*"?/)){return"string"} else if(e.allowPlaceholders&&a.match(/<[^>]*>?/)){return"variable"} else{a.next();a.eatWhile(/[^@"<#]/);return null}}}});e.defineMIME("text/x-feature","gherkin")}); -/* Include script: swift */ +/* Include script: swift.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';function t(e){var n={};for(var t=0;t<e.length;t++)n[e[t]]=!0;return n};var i=t(['_','var','let','class','enum','extension','import','protocol','struct','func','typealias','associatedtype','open','public','internal','fileprivate','private','deinit','init','new','override','self','subscript','super','convenience','dynamic','final','indirect','lazy','required','static','unowned','unowned(safe)','unowned(unsafe)','weak','as','is','break','case','continue','default','else','fallthrough','for','guard','if','in','repeat','switch','where','while','defer','return','inout','mutating','nonmutating','catch','do','rethrows','throw','throws','try','didSet','get','set','willSet','assignment','associativity','infix','left','none','operator','postfix','precedence','precedencegroup','prefix','right','Any','AnyObject','Type','dynamicType','Self','Protocol','__COLUMN__','__FILE__','__FUNCTION__','__LINE__']),o=t(['var','let','class','enum','extension','import','protocol','struct','func','typealias','associatedtype','for']),a=t(['true','false','nil','self','super','_']),u=t(['Array','Bool','Character','Dictionary','Double','Float','Int','Int8','Int16','Int32','Int64','Never','Optional','Set','String','UInt8','UInt16','UInt32','UInt64','Void']),c='+-/*%=|&<>~^?!',f=':;,.(){}[]',l=/^\-?0b[01][01_]*/,d=/^\-?0o[0-7][0-7_]*/,s=/^\-?0x[\dA-Fa-f][\dA-Fa-f_]*(?:(?:\.[\dA-Fa-f][\dA-Fa-f_]*)?[Pp]\-?\d[\d_]*)?/,p=/^\-?\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee]\-?\d[\d_]*)?/,m=/^\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1/,h=/^\.(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/,v=/^\#[A-Za-z]+/,x=/^@(?:\$\d+|(`?)[_A-Za-z][_A-Za-z$0-9]*\1)/;function n(e,t,k){if(e.sol())t.indented=e.indentation();if(e.eatSpace())return null;var n=e.peek();if(n=='/'){if(e.match('//')){e.skipToEnd();return'comment'};if(e.match('/*')){t.tokenize.push(r);return r(e,t)}};if(e.match(v))return'builtin';if(e.match(x))return'attribute';if(e.match(l))return'number';if(e.match(d))return'number';if(e.match(s))return'number';if(e.match(p))return'number';if(e.match(h))return'property';if(c.indexOf(n)>-1){e.next();return'operator'};if(f.indexOf(n)>-1){e.next();e.match('..');return'punctuation'};if(n=='"'||n=='\''){e.next();var w=b(n);t.tokenize.push(w);return w(e,t)};if(e.match(m)){var y=e.current();if(u.hasOwnProperty(y))return'variable-2';if(a.hasOwnProperty(y))return'atom';if(i.hasOwnProperty(y)){if(o.hasOwnProperty(y))t.prev='define';return'keyword'};if(k=='define')return'def';return'variable'};e.next();return null};function y(){var e=0;return function(t,r,i){var o=n(t,r,i);if(o=='punctuation'){if(t.current()=='(')++e;else if(t.current()==')'){if(e==0){t.backUp(1);r.tokenize.pop();return r.tokenize[r.tokenize.length-1](t,r)} else--e}};return o}};function b(e){return function(t,n){var r,i=!1;while(r=t.next()){if(i){if(r=='('){n.tokenize.push(y());return'string'};i=!1} else if(r==e){break} else{i=r=='\\'}};n.tokenize.pop();return'string'}};function r(e,t){e.match(/^(?:[^*]|\*(?!\/))*/);if(e.match('*/'))t.tokenize.pop();return'comment'};function k(e,t,n){this.prev=e;this.align=t;this.indented=n};function w(e,t){var n=t.match(/^\s*($|\/[\/\*])/,!1)?null:t.column()+1;e.context=new k(e.context,n,e.indented)};function z(e){if(e.context){e.indented=e.context.indented;e.context=e.context.prev}};e.defineMode('swift',function(e){return{startState:function(){return{prev:null,context:null,indented:0,tokenize:[]}},token:function(e,t){var o=t.prev;t.prev=null;var a=t.tokenize[t.tokenize.length-1]||n,r=a(e,t,o);if(!r||r=='comment')t.prev=o;else if(!t.prev)t.prev=r;if(r=='punctuation'){var i=/[\(\[\{]|([\]\)\}])/.exec(e.current());if(i)(i[1]?z:w)(t,e)};return r},indent:function(t,n){var r=t.context;if(!r)return 0;var i=/^[\]\}\)]/.test(n);if(r.align!=null)return r.align-(i?1:0);return r.indented+(i?0:e.indentUnit)},electricInput:/^\s*[\)\}\]]$/,lineComment:'//',blockCommentStart:'/*',blockCommentEnd:'*/',fold:'brace',closeBrackets:'()[]{}\'\'""``'}});e.defineMIME('text/x-swift','swift')}); -/* Include script: scheme */ +/* Include script: scheme.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('scheme',function(){var p='builtin',e='comment',r='string',a='atom',c='number',l='bracket',h=2;function s(e){var i={},n=e.split(' ');for(var t=0;t<n.length;++t)i[n[t]]=!0;return i};var n=s('λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?'),m=s('define let letrec let* lambda');function g(e,t,i){this.indent=e;this.type=t;this.prev=i};function t(e,t,i){e.indentStack=new g(t,i,e.indentStack)};function x(e){e.indentStack=e.indentStack.prev};var o=new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i),d=new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i),f=new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i),u=new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i);function b(e){return e.match(o)};function v(e){return e.match(d)};function i(e,t){if(t===!0){e.backUp(1)};return e.match(u)};function k(e){return e.match(f)};return{startState:function(){return{indentStack:null,indentation:0,mode:!1,sExprComment:!1}},token:function(s,o){if(o.indentStack==null&&s.sol()){o.indentation=s.indentation()};if(s.eatSpace()){return null};var d=null;switch(o.mode){case'string':var g,S=!1;while((g=s.next())!=null){if(g=='"'&&!S){o.mode=!1;break};S=!S&&g=='\\'};d=r;break;case'comment':var g,M=!1;while((g=s.next())!=null){if(g=='#'&&M){o.mode=!1;break};M=(g=='|')};d=e;break;case's-expr-comment':o.mode=!1;if(s.peek()=='('||s.peek()=='['){o.sExprComment=0} else{s.eatWhile(/[^/s]/);d=e;break};default:var f=s.next();if(f=='"'){o.mode='string';d=r} else if(f=='\''){d=a} @@ -853,16 +851,16 @@ else{t(o,w+s.current().length,f)}};s.backUp(s.current().length-1);if(typeof o.sE else if(f==')'||f==']'){d=l;if(o.indentStack!=null&&o.indentStack.type==(f==')'?'(':'[')){x(o);if(typeof o.sExprComment=='number'){if(--o.sExprComment==0){d=e;o.sExprComment=!1}}}} else{s.eatWhile(/[\w_\-!$%&*+\.\/:<=>?@\^~]/);if(n&&n.propertyIsEnumerable(s.current())){d=p} else d='variable'}};return(typeof o.sExprComment=='number')?e:d},indent:function(e){if(e.indentStack==null)return e.indentation;return e.indentStack.indent},closeBrackets:{pairs:'()[]{}""'},lineComment:';;'}});e.defineMIME('text/x-scheme','scheme')}); -/* Include script: idl */ +/* Include script: idl.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';function i(e){return new RegExp('^(('+e.join(')|(')+'))\\b','i')};var t=['a_correlate','abs','acos','adapt_hist_equal','alog','alog2','alog10','amoeba','annotate','app_user_dir','app_user_dir_query','arg_present','array_equal','array_indices','arrow','ascii_template','asin','assoc','atan','axis','axis','bandpass_filter','bandreject_filter','barplot','bar_plot','beseli','beselj','beselk','besely','beta','biginteger','bilinear','bin_date','binary_template','bindgen','binomial','bit_ffs','bit_population','blas_axpy','blk_con','boolarr','boolean','boxplot','box_cursor','breakpoint','broyden','bubbleplot','butterworth','bytarr','byte','byteorder','bytscl','c_correlate','calendar','caldat','call_external','call_function','call_method','call_procedure','canny','catch','cd','cdf','ceil','chebyshev','check_math','chisqr_cvf','chisqr_pdf','choldc','cholsol','cindgen','cir_3pnt','clipboard','close','clust_wts','cluster','cluster_tree','cmyk_convert','code_coverage','color_convert','color_exchange','color_quan','color_range_map','colorbar','colorize_sample','colormap_applicable','colormap_gradient','colormap_rotation','colortable','comfit','command_line_args','common','compile_opt','complex','complexarr','complexround','compute_mesh_normals','cond','congrid','conj','constrained_min','contour','contour','convert_coord','convol','convol_fft','coord2to3','copy_lun','correlate','cos','cosh','cpu','cramer','createboxplotdata','create_cursor','create_struct','create_view','crossp','crvlength','ct_luminance','cti_test','cursor','curvefit','cv_coord','cvttobm','cw_animate','cw_animate_getp','cw_animate_load','cw_animate_run','cw_arcball','cw_bgroup','cw_clr_index','cw_colorsel','cw_defroi','cw_field','cw_filesel','cw_form','cw_fslider','cw_light_editor','cw_light_editor_get','cw_light_editor_set','cw_orient','cw_palette_editor','cw_palette_editor_get','cw_palette_editor_set','cw_pdmenu','cw_rgbslider','cw_tmpl','cw_zoom','db_exists','dblarr','dcindgen','dcomplex','dcomplexarr','define_key','define_msgblk','define_msgblk_from_file','defroi','defsysv','delvar','dendro_plot','dendrogram','deriv','derivsig','determ','device','dfpmin','diag_matrix','dialog_dbconnect','dialog_message','dialog_pickfile','dialog_printersetup','dialog_printjob','dialog_read_image','dialog_write_image','dictionary','digital_filter','dilate','dindgen','dissolve','dist','distance_measure','dlm_load','dlm_register','doc_library','double','draw_roi','edge_dog','efont','eigenql','eigenvec','ellipse','elmhes','emboss','empty','enable_sysrtn','eof','eos','erase','erf','erfc','erfcx','erode','errorplot','errplot','estimator_filter','execute','exit','exp','expand','expand_path','expint','extrac','extract_slice','f_cvf','f_pdf','factorial','fft','file_basename','file_chmod','file_copy','file_delete','file_dirname','file_expand_path','file_gunzip','file_gzip','file_info','file_lines','file_link','file_mkdir','file_move','file_poll_input','file_readlink','file_same','file_search','file_tar','file_test','file_untar','file_unzip','file_which','file_zip','filepath','findgen','finite','fix','flick','float','floor','flow3','fltarr','flush','format_axis_values','forward_function','free_lun','fstat','fulstr','funct','function','fv_test','fx_root','fz_roots','gamma','gamma_ct','gauss_cvf','gauss_pdf','gauss_smooth','gauss2dfit','gaussfit','gaussian_function','gaussint','get_drive_list','get_dxf_objects','get_kbrd','get_login_info','get_lun','get_screen_size','getenv','getwindows','greg2jul','grib','grid_input','grid_tps','grid3','griddata','gs_iter','h_eq_ct','h_eq_int','hanning','hash','hdf','hdf5','heap_free','heap_gc','heap_nosave','heap_refcount','heap_save','help','hilbert','hist_2d','hist_equal','histogram','hls','hough','hqr','hsv','i18n_multibytetoutf8','i18n_multibytetowidechar','i18n_utf8tomultibyte','i18n_widechartomultibyte','ibeta','icontour','iconvertcoord','idelete','identity','idl_base64','idl_container','idl_validname','idlexbr_assistant','idlitsys_createtool','idlunit','iellipse','igamma','igetcurrent','igetdata','igetid','igetproperty','iimage','image','image_cont','image_statistics','image_threshold','imaginary','imap','indgen','int_2d','int_3d','int_tabulated','intarr','interpol','interpolate','interval_volume','invert','ioctl','iopen','ir_filter','iplot','ipolygon','ipolyline','iputdata','iregister','ireset','iresolve','irotate','isa','isave','iscale','isetcurrent','isetproperty','ishft','isocontour','isosurface','isurface','itext','itranslate','ivector','ivolume','izoom','journal','json_parse','json_serialize','jul2greg','julday','keyword_set','krig2d','kurtosis','kw_test','l64indgen','la_choldc','la_cholmprove','la_cholsol','la_determ','la_eigenproblem','la_eigenql','la_eigenvec','la_elmhes','la_gm_linear_model','la_hqr','la_invert','la_least_square_equality','la_least_squares','la_linear_equation','la_ludc','la_lumprove','la_lusol','la_svd','la_tridc','la_trimprove','la_triql','la_trired','la_trisol','label_date','label_region','ladfit','laguerre','lambda','lambdap','lambertw','laplacian','least_squares_filter','leefilt','legend','legendre','linbcg','lindgen','linfit','linkimage','list','ll_arc_distance','lmfit','lmgr','lngamma','lnp_test','loadct','locale_get','logical_and','logical_or','logical_true','lon64arr','lonarr','long','long64','lsode','lu_complex','ludc','lumprove','lusol','m_correlate','machar','make_array','make_dll','make_rt','map','mapcontinents','mapgrid','map_2points','map_continents','map_grid','map_image','map_patch','map_proj_forward','map_proj_image','map_proj_info','map_proj_init','map_proj_inverse','map_set','matrix_multiply','matrix_power','max','md_test','mean','meanabsdev','mean_filter','median','memory','mesh_clip','mesh_decimate','mesh_issolid','mesh_merge','mesh_numtriangles','mesh_obj','mesh_smooth','mesh_surfacearea','mesh_validate','mesh_volume','message','min','min_curve_surf','mk_html_help','modifyct','moment','morph_close','morph_distance','morph_gradient','morph_hitormiss','morph_open','morph_thin','morph_tophat','multi','n_elements','n_params','n_tags','ncdf','newton','noise_hurl','noise_pick','noise_scatter','noise_slur','norm','obj_class','obj_destroy','obj_hasmethod','obj_isa','obj_new','obj_valid','objarr','on_error','on_ioerror','online_help','openr','openu','openw','oplot','oploterr','orderedhash','p_correlate','parse_url','particle_trace','path_cache','path_sep','pcomp','plot','plot3d','plot','plot_3dbox','plot_field','ploterr','plots','polar_contour','polar_surface','polyfill','polyshade','pnt_line','point_lun','polarplot','poly','poly_2d','poly_area','poly_fit','polyfillv','polygon','polyline','polywarp','popd','powell','pref_commit','pref_get','pref_set','prewitt','primes','print','printf','printd','pro','product','profile','profiler','profiles','project_vol','ps_show_fonts','psafm','pseudo','ptr_free','ptr_new','ptr_valid','ptrarr','pushd','qgrid3','qhull','qromb','qromo','qsimp','query_*','query_ascii','query_bmp','query_csv','query_dicom','query_gif','query_image','query_jpeg','query_jpeg2000','query_mrsid','query_pict','query_png','query_ppm','query_srf','query_tiff','query_video','query_wav','r_correlate','r_test','radon','randomn','randomu','ranks','rdpix','read','readf','read_ascii','read_binary','read_bmp','read_csv','read_dicom','read_gif','read_image','read_interfile','read_jpeg','read_jpeg2000','read_mrsid','read_pict','read_png','read_ppm','read_spr','read_srf','read_sylk','read_tiff','read_video','read_wav','read_wave','read_x11_bitmap','read_xwd','reads','readu','real_part','rebin','recall_commands','recon3','reduce_colors','reform','region_grow','register_cursor','regress','replicate','replicate_inplace','resolve_all','resolve_routine','restore','retall','return','reverse','rk4','roberts','rot','rotate','round','routine_filepath','routine_info','rs_test','s_test','save','savgol','scale3','scale3d','scatterplot','scatterplot3d','scope_level','scope_traceback','scope_varfetch','scope_varname','search2d','search3d','sem_create','sem_delete','sem_lock','sem_release','set_plot','set_shading','setenv','sfit','shade_surf','shade_surf_irr','shade_volume','shift','shift_diff','shmdebug','shmmap','shmunmap','shmvar','show3','showfont','signum','simplex','sin','sindgen','sinh','size','skewness','skip_lun','slicer3','slide_image','smooth','sobel','socket','sort','spawn','sph_4pnt','sph_scat','spher_harm','spl_init','spl_interp','spline','spline_p','sprsab','sprsax','sprsin','sprstp','sqrt','standardize','stddev','stop','strarr','strcmp','strcompress','streamline','streamline','stregex','stretch','string','strjoin','strlen','strlowcase','strmatch','strmessage','strmid','strpos','strput','strsplit','strtrim','struct_assign','struct_hide','strupcase','surface','surface','surfr','svdc','svdfit','svsol','swap_endian','swap_endian_inplace','symbol','systime','t_cvf','t_pdf','t3d','tag_names','tan','tanh','tek_color','temporary','terminal_size','tetra_clip','tetra_surface','tetra_volume','text','thin','thread','threed','tic','time_test2','timegen','timer','timestamp','timestamptovalues','tm_test','toc','total','trace','transpose','tri_surf','triangulate','trigrid','triql','trired','trisol','truncate_lun','ts_coef','ts_diff','ts_fcast','ts_smooth','tv','tvcrs','tvlct','tvrd','tvscl','typename','uindgen','uint','uintarr','ul64indgen','ulindgen','ulon64arr','ulonarr','ulong','ulong64','uniq','unsharp_mask','usersym','value_locate','variance','vector','vector_field','vel','velovect','vert_t3d','voigt','volume','voronoi','voxel_proj','wait','warp_tri','watershed','wdelete','wf_draw','where','widget_base','widget_button','widget_combobox','widget_control','widget_displaycontextmenu','widget_draw','widget_droplist','widget_event','widget_info','widget_label','widget_list','widget_propertysheet','widget_slider','widget_tab','widget_table','widget_text','widget_tree','widget_tree_move','widget_window','wiener_filter','window','window','write_bmp','write_csv','write_gif','write_image','write_jpeg','write_jpeg2000','write_nrif','write_pict','write_png','write_ppm','write_spr','write_srf','write_sylk','write_tiff','write_video','write_wav','write_wave','writeu','wset','wshow','wtn','wv_applet','wv_cwt','wv_cw_wavelet','wv_denoise','wv_dwt','wv_fn_coiflet','wv_fn_daubechies','wv_fn_gaussian','wv_fn_haar','wv_fn_morlet','wv_fn_paul','wv_fn_symlet','wv_import_data','wv_import_wavelet','wv_plot3d_wps','wv_plot_multires','wv_pwt','wv_tool_denoise','xbm_edit','xdisplayfile','xdxf','xfont','xinteranimate','xloadct','xmanager','xmng_tmpl','xmtool','xobjview','xobjview_rotate','xobjview_write_image','xpalette','xpcolor','xplot3d','xregistered','xroi','xsq_test','xsurface','xvaredit','xvolume','xvolume_rotate','xvolume_write_image','xyouts','zlib_compress','zlib_uncompress','zoom','zoom_24'],s=i(t),r=['begin','end','endcase','endfor','endwhile','endif','endrep','endforeach','break','case','continue','for','foreach','goto','if','then','else','repeat','until','switch','while','do','pro','function'],n=i(r);e.registerHelper('hintWords','idl',t.concat(r));var a=new RegExp('^[_a-z\xa1-\uffff][_a-z0-9\xa1-\uffff]*','i'),o=/[+\-*&=<>\/@#~$]/,l=new RegExp('(and|or|eq|lt|le|gt|ge|ne|not)','i');function d(e){if(e.eatSpace())return null;if(e.match(';')){e.skipToEnd();return'comment'};if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+/))return'number';if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))return'number';if(e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))return'number'};if(e.match(/^"([^"]|(""))*"/)){return'string'};if(e.match(/^'([^']|(''))*'/)){return'string'};if(e.match(n)){return'keyword'};if(e.match(s)){return'builtin'};if(e.match(a)){return'variable'};if(e.match(o)||e.match(l)){return'operator'};e.next();return null};e.defineMode('idl',function(){return{token:function(e){return d(e)}}});e.defineMIME('text/x-idl','idl')}); -/* Include script: yaml */ +/* Include script: yaml.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('yaml',function(){var e=['true','false','on','off','yes','no'],i=new RegExp('\\b(('+e.join(')|(')+'))$','i');return{token:function(t,e){var r=t.peek(),n=e.escaped;e.escaped=!1;if(r=='#'&&(t.pos==0||/\s/.test(t.string.charAt(t.pos-1)))){t.skipToEnd();return'comment'};if(t.match(/^('([^']|\\.)*'?|"([^"]|\\.)*"?)/))return'string';if(e.literal&&t.indentation()>e.keyCol){t.skipToEnd();return'string'} else if(e.literal){e.literal=!1};if(t.sol()){e.keyCol=0;e.pair=!1;e.pairStart=!1;if(t.match(/---/)){return'def'};if(t.match(/\.\.\./)){return'def'};if(t.match(/\s*-\s+/)){return'meta'}};if(t.match(/^(\{|\}|\[|\])/)){if(r=='{')e.inlinePairs++;else if(r=='}')e.inlinePairs--;else if(r=='[')e.inlineList++;else e.inlineList--;return'meta'};if(e.inlineList>0&&!n&&r==','){t.next();return'meta'};if(e.inlinePairs>0&&!n&&r==','){e.keyCol=0;e.pair=!1;e.pairStart=!1;t.next();return'meta'};if(e.pairStart){if(t.match(/^\s*(\||\>)\s*/)){e.literal=!0;return'meta'};if(t.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i)){return'variable-2'};if(e.inlinePairs==0&&t.match(/^\s*-?[0-9\.\,]+\s?$/)){return'number'};if(e.inlinePairs>0&&t.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/)){return'number'};if(t.match(i)){return'keyword'}};if(!e.pair&&t.match(/^\s*(?:[,\[\]{}&*!|>'"%@`][^\s'":]|[^,\[\]{}#&*!|>'"%@`])[^#]*?(?=\s*:($|\s))/)){e.pair=!0;e.keyCol=t.indentation();return'atom'};if(e.pair&&t.match(/^:\s*/)){e.pairStart=!0;return'meta'};e.pairStart=!1;e.escaped=(r=='\\');t.next();return null},startState:function(){return{pair:!1,pairStart:!1,keyCol:0,inlinePairs:0,inlineList:0,literal:!1,escaped:!1}}}});e.defineMIME('text/x-yaml','yaml');e.defineMIME('text/yaml','yaml')}); -/* Include script: vue */ +/* Include script: vue.min.js */ (function(e){'use strict';if(typeof exports==='object'&&typeof module==='object'){e(require('../../lib/codemirror'),require('../../addon/mode/overlay'),require('../xml/xml'),require('../javascript/javascript'),require('../coffeescript/coffeescript'),require('../css/css'),require('../sass/sass'),require('../stylus/stylus'),require('../pug/pug'),require('../handlebars/handlebars'))} else if(typeof define==='function'&&define.amd){define(['../../lib/codemirror','../../addon/mode/overlay','../xml/xml','../javascript/javascript','../coffeescript/coffeescript','../css/css','../sass/sass','../stylus/stylus','../pug/pug','../handlebars/handlebars'],e)} else{e(CodeMirror)}})(function(e){var s={script:[['lang',/coffee(script)?/,'coffeescript'],['type',/^(?:text|application)\/(?:x-)?coffee(?:script)?$/,'coffeescript'],['lang',/^babel$/,'javascript'],['type',/^text\/babel$/,'javascript'],['type',/^text\/ecmascript-\d+$/,'javascript']],style:[['lang',/^stylus$/i,'stylus'],['lang',/^sass$/i,'sass'],['lang',/^less$/i,'text/x-less'],['lang',/^scss$/i,'text/x-scss'],['type',/^(text\/)?(x-)?styl(us)?$/i,'stylus'],['type',/^text\/sass/i,'sass'],['type',/^(text\/)?(x-)?scss$/i,'text/x-scss'],['type',/^(text\/)?(x-)?less$/i,'text/x-less']],template:[['lang',/^vue-template$/i,'vue'],['lang',/^pug$/i,'pug'],['lang',/^handlebars$/i,'handlebars'],['type',/^(text\/)?(x-)?pug$/i,'pug'],['type',/^text\/x-handlebars-template$/i,'handlebars'],[null,null,'vue-template']]};e.defineMode('vue-template',function(s,t){var a={token:function(e){if(e.match(/^\{\{.*?\}\}/))return'meta mustache';while(e.next()&&!e.match('{{',!1)){};return null}};return e.overlayMode(e.getMode(s,t.backdrop||'text/html'),a)});e.defineMode('vue',function(t){return e.getMode(t,{name:'htmlmixed',tags:s})},'htmlmixed','xml','javascript','coffeescript','css','sass','stylus','pug','handlebars');e.defineMIME('script/x-vue','vue');e.defineMIME('text/x-vue','vue')}); -/* Include script: twig */ +/* Include script: twig.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../../addon/mode/multiplex'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../../addon/mode/multiplex'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('twig:inner',function(){var t=['and','as','autoescape','endautoescape','block','do','endblock','else','elseif','extends','for','endfor','embed','endembed','filter','endfilter','flush','from','if','endif','in','is','include','import','not','or','set','spaceless','endspaceless','with','endwith','trans','endtrans','blocktrans','endblocktrans','macro','endmacro','use','verbatim','endverbatim'],i=/^[+\-*&%=<>!?|~^]/,r=/^[:\[\(\{]/,e=['true','false','null','empty','defined','divisibleby','divisible by','even','odd','iterable','sameas','same as'],n=/^(\d[+\-\*\/])?\d+(\.\d+)?/;t=new RegExp('(('+t.join(')|(')+'))\\b');e=new RegExp('(('+e.join(')|(')+'))\\b');function o(o,a){var s=o.peek();if(a.incomment){if(!o.skipTo('#}')){o.skipToEnd()} else{o.eatWhile(/\#|}/);a.incomment=!1};return'comment'} else if(a.intag){if(a.operator){a.operator=!1;if(o.match(e)){return'atom'};if(o.match(n)){return'number'}};if(a.sign){a.sign=!1;if(o.match(e)){return'atom'};if(o.match(n)){return'number'}};if(a.instring){if(s==a.instring){a.instring=!1};o.next();return'string'} @@ -875,10 +873,10 @@ else{o.next()}};return'variable'} else if(o.eat('{')){if(o.eat('#')){a.incomment=!0;if(!o.skipTo('#}')){o.skipToEnd()} else{o.eatWhile(/\#|}/);a.incomment=!1};return'comment'} else if(s=o.eat(/\{|%/)){a.intag=s;if(s=='{'){a.intag='}'};o.eat('-');return'tag'}};o.next()};return{startState:function(){return{}},token:function(e,t){return o(e,t)}}});e.defineMode('twig',function(t,n){var i=e.getMode(t,'twig:inner');if(!n||!n.base)return i;return e.multiplexingMode(e.getMode(t,n.base),{open:/\{[{#%]/,close:/[}#%]\}/,mode:i,parseDelimiters:!0})});e.defineMIME('text/x-twig','twig')}); -/* Include script: cmake */ +/* Include script: cmake.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('cmake',function(){var n=/({)?[a-zA-Z0-9_]+(})?/;function e(e,n){var i,t,r=!1;while(!e.eol()&&(i=e.next())!=n.pending){if(i==='$'&&t!='\\'&&n.pending=='"'){r=!0;break};t=i};if(r){e.backUp(1)};if(i==n.pending){n.continueString=!1} else{n.continueString=!0};return'string'};function i(i,r){var t=i.next();if(t==='$'){if(i.match(n)){return'variable-2'};return'variable'};if(r.continueString){i.backUp(1);return e(i,r)};if(i.match(/(\s+)?\w+\(/)||i.match(/(\s+)?\w+\ \(/)){i.backUp(1);return'def'};if(t=='#'){i.skipToEnd();return'comment'};if(t=='\''||t=='"'){r.pending=t;return e(i,r)};if(t=='('||t==')'){return'bracket'};if(t.match(/[0-9]/)){return'number'};i.eatWhile(/[\w-]/);return null};return{startState:function(){var e={};e.inDefinition=!1;e.inInclude=!1;e.continueString=!1;e.pending=!1;return e},token:function(e,n){if(e.eatSpace())return null;return i(e,n)}}});e.defineMIME('text/x-cmake','cmake')}); -/* Include script: asciiarmor */ +/* Include script: asciiarmor.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';function t(e){var t=e.match(/^\s*\S/);e.skipToEnd();return t?'error':null};e.defineMode('asciiarmor',function(){return{token:function(e,r){var i;if(r.state=='top'){if(e.sol()&&(i=e.match(/^-----BEGIN (.*)?-----\s*$/))){r.state='headers';r.type=i[1];return'tag'};return t(e)} else if(r.state=='headers'){if(e.sol()&&e.match(/^\w+:/)){r.state='header';return'atom'} else{var n=t(e);if(n)r.state='body';return n}} @@ -887,7 +885,7 @@ else if(r.state=='body'){if(e.sol()&&(i=e.match(/^-----END (.*)?-----\s*$/))){if else{if(e.eatWhile(/[A-Za-z0-9+\/=]/)){return null} else{e.next();return'error'}}} else if(r.state=='end'){return t(e)}},blankLine:function(e){if(e.state=='headers')e.state='body'},startState:function(){return{state:'top',type:null}}}});e.defineMIME('application/pgp','asciiarmor');e.defineMIME('application/pgp-encrypted','asciiarmor');e.defineMIME('application/pgp-keys','asciiarmor');e.defineMIME('application/pgp-signature','asciiarmor')}); -/* Include script: pegjs */ +/* Include script: pegjs.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../javascript/javascript'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../javascript/javascript'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('pegjs',function(t){var n=e.getMode(t,'javascript');function i(e){return e.match(/^[a-zA-Z_][a-zA-Z0-9_]*/)};return{startState:function(){return{inString:!1,stringType:null,inComment:!1,inCharacterClass:!1,braced:0,lhs:!0,localState:null}},token:function(t,r){if(t)if(!r.inString&&!r.inComment&&((t.peek()=='"')||(t.peek()=='\''))){r.stringType=t.peek();t.next();r.inString=!0};if(!r.inString&&!r.inComment&&t.match(/^\/\*/)){r.inComment=!0};if(r.inString){while(r.inString&&!t.eol()){if(t.peek()===r.stringType){t.next();r.inString=!1} else if(t.peek()==='\\'){t.next();t.next()} else{t.match(/^.[^\\"']*/)}};return r.lhs?'property string':'string'} @@ -901,9 +899,9 @@ else if(l[a]==='}'){r.braced--}}};return c} else if(i(t)){if(t.peek()===':'){return'variable'};return'variable-2'} else if(['[',']','(',')'].indexOf(t.peek())!=-1){t.next();return'bracket'} else if(!t.eatSpace()){t.next()};return null}}},'javascript')}); -/* Include script: solr */ +/* Include script: solr.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('solr',function(){'use strict';var t=/[^\s\|\!\+\-\*\?\~\^\&\:\(\)\[\]\{\}"\\]/,n=/[\|\!\+\-\*\?\~\^\&]/,i=/^(OR|AND|NOT|TO)$/i;function r(e){return parseFloat(e).toString()===e};function o(t){return function(n,i){var r=!1,o;while((o=n.next())!=null){if(o==t&&!r)break;r=!r&&o=='\\'};if(!r)i.tokenize=e;return'string'}};function f(t){return function(n,i){var r='operator';if(t=='+')r+=' positive';else if(t=='-')r+=' negative';else if(t=='|')n.eat(/\|/);else if(t=='&')n.eat(/\&/);else if(t=='^')r+=' boost';i.tokenize=e;return r}};function u(n){return function(o,f){var u=n;while((n=o.peek())&&n.match(t)!=null){u+=o.next()};f.tokenize=e;if(i.test(u))return'operator';else if(r(u))return'number';else if(o.peek()==':')return'field';else return'string'}};function e(i,r){var l=i.next();if(l=='"')r.tokenize=o(l);else if(n.test(l))r.tokenize=f(l);else if(t.test(l))r.tokenize=u(l);return(r.tokenize!=e)?r.tokenize(i,r):null};return{startState:function(){return{tokenize:e}},token:function(e,t){if(e.eatSpace())return null;return t.tokenize(e,t)}}});e.defineMIME('text/x-solr','solr')}); -/* Include script: tiki */ +/* Include script: tiki.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("tiki",function(e){function i(e,t,n){return function(i,u){while(!i.eol()){if(i.match(t)){u.tokenize=r;break};i.next()};if(n)u.tokenize=n;return e}};function a(e){return function(t,n){while(!t.eol()){t.next()};n.tokenize=r;return e}};function r(e,n){function t(t){n.tokenize=t;return t(e,n)};var o=e.sol(),u=e.next();switch(u){case"{":e.eat("/");e.eatSpace();e.eatWhile(/[^\s\u00a0="'\/?(}]/);n.tokenize=s;return"tag";case"_":if(e.eat("_"))return t(i("strong","__",r));break;case"'":if(e.eat("'"))return t(i("em","''",r));break;case"(":if(e.eat("("))return t(i("variable-2","))",r));break;case"[":return t(i("variable-3","]",r));break;case"|":if(e.eat("|"))return t(i("comment","||"));break;case"-":if(e.eat("=")){return t(i("header string","=-",r))} else if(e.eat("-")){return t(i("error tw-deleted","--",r))};break;case"=":if(e.match("=="))return t(i("tw-underline","===",r));break;case":":if(e.eat(":"))return t(i("comment","::"));break;case"^":return t(i("tw-box","^"));break;case"~":if(e.match("np~"))return t(i("meta","~/np~"));break};if(o){switch(u){case"!":if(e.match("!!!!!")){return t(a("header string"))} else if(e.match("!!!!")){return t(a("header string"))} @@ -918,19 +916,19 @@ else if(e=="closePlugin"){var i=!1;if(t.context){i=t.context.pluginName!=c;k()} else{i=!0};if(i)u="error";return n(v(i))} else if(e=="string"){if(!t.context||t.context.name!="!cdata")d("!cdata");if(t.tokenize==r)k();return n()} else return n()};function x(e){return function(r){if(r=="selfclosePlugin"||r=="endPlugin")return n();if(r=="endPlugin"){d(t.pluginName,e);return n()};return n()}};function v(e){return function(t){if(e)u="error";if(t=="endPlugin")return n();return o()}};function l(e){if(e=="keyword"){u="attribute";return n(l)};if(e=="equals")return n(w,l);return o()};function w(e){if(e=="keyword"){u="string";return n()};if(e=="string")return n(g);return o()};function g(e){if(e=="string")return n(g);else return o()};return{startState:function(){return{tokenize:r,cc:[],indented:0,startOfLine:!0,pluginName:null,context:null}},token:function(e,n){if(e.sol()){n.startOfLine=!0;n.indented=e.indentation()};if(e.eatSpace())return null;u=f=c=null;var r=n.tokenize(e,n);if((r||f)&&r!="comment"){t=n;while(!0){var i=n.cc.pop()||h;if(i(f||r))break}};n.startOfLine=!1;return u||r},indent:function(e,n){var t=e.context;if(t&&t.noIndent)return 0;if(t&&/^{\//.test(n))t=t.prev;while(t&&!t.startOfLine)t=t.prev;if(t)return t.indent+m;else return 0},electricChars:"/"}});e.defineMIME("text/tiki","tiki")}); -/* Include script: slim */ +/* Include script: slim.min.js */ (function(t){if(typeof exports=="object"&&typeof module=="object")t(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../ruby/ruby"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror","../htmlmixed/htmlmixed","../ruby/ruby"],t);else t(CodeMirror)})(function(t){"use strict";t.defineMode("slim",function(e){var s=t.getMode(e,{name:"htmlmixed"});var u=t.getMode(e,"ruby"),f={html:s,ruby:u};var h={ruby:"ruby",javascript:"javascript",css:"text/css",sass:"text/x-sass",scss:"text/x-scss",less:"text/x-less",styl:"text/x-styl",coffee:"coffeescript",asciidoc:"text/x-asciidoc",markdown:"text/x-markdown",textile:"text/x-textile",creole:"text/x-creole",wiki:"text/x-wiki",mediawiki:"text/x-mediawiki",rdoc:"text/x-rdoc",builder:"text/x-builder",nokogiri:"text/x-nokogiri",erb:"application/x-erb"};var U=function(t){var e=[];for(var n in t)e.push(n);return new RegExp("^("+e.join("|")+"):")}(h),x={"commentLine":"comment","slimSwitch":"operator special","slimTag":"tag","slimId":"attribute def","slimClass":"attribute qualifier","slimAttribute":"attribute","slimSubmode":"keyword special","closeAttributeTag":null,"slimDoctype":null,"lineContinuation":null};var T={"{":"}","[":"]","(":")"};var c="_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD",l=c+"\\-0-9\xB7\u0300-\u036F\u203F-\u2040",C=new RegExp("^[:"+c+"](?::["+l+"]|["+l+"]*)"),D=new RegExp("^[:"+c+"][:\\."+l+"]*(?=\\s*=)"),E=new RegExp("^[:"+c+"][:\\."+l+"]*"),A=/^\.-?[_a-zA-Z]+[\w\-]*/,L=/^#[_a-zA-Z]+[\w\-]*/;function O(t,e,n){var i=function(i,r){r.tokenize=e;if(i.pos<t){i.pos=t;return n};return r.tokenize(i,r)};return function(t,n){n.tokenize=i;return e(t,n)}};function R(t,e,n,r,i){var u=t.current(),o=u.search(n);if(o>-1){e.tokenize=O(t.pos,e.tokenize,i);t.backUp(u.length-o-r)};return i};function k(t,e){t.stack={parent:t.stack,style:"continuation",indented:e,tokenize:t.line};t.line=t.tokenize};function d(t){if(t.line==t.tokenize){t.line=t.stack.tokenize;t.stack=t.stack.parent}};function j(t,e){return function(n,i){d(i);if(n.match(/^\\$/)){k(i,t);return"lineContinuation"};var r=e(n,i);if(n.eol()&&n.current().match(/(?:^|[^\\])(?:\\\\)*\\$/)){n.backUp(1)};return r}};function I(t,e){return function(n,i){d(i);var r=e(n,i);if(n.eol()&&n.current().match(/,$/)){k(i,t)};return r}};function m(t,e){return function(n,i){var r=n.peek();if(r==t&&i.rubyState.tokenize.length==1){n.next();i.tokenize=e;return"closeAttributeTag"} else{return o(n,i)}}};function n(e){var n,i=function(t,i){if(i.rubyState.tokenize.length==1&&!i.rubyState.context.prev){t.backUp(1);if(t.eatSpace()){i.rubyState=n;i.tokenize=e;return e(t,i)};t.next()};return o(t,i)};return function(e,r){n=r.rubyState;r.rubyState=t.startState(u);r.tokenize=i;return o(e,r)}};function o(t,e){return u.token(t,e.rubyState)};function P(t,e){if(t.match(/^\\$/)){return"lineContinuation"};return y(t,e)};function y(t,e){if(t.match(/^#\{/)){e.tokenize=m("}",e.tokenize);return null};return R(t,e,/[^\\]#\{/,1,s.token(t,e.htmlState))};function q(t){return function(e,n){var i=P(e,n);if(e.eol())n.tokenize=t;return i}};function S(t,e,n){e.stack={parent:e.stack,style:"html",indented:t.column()+n,tokenize:e.line};e.line=e.tokenize=y;return null};function v(t,e){t.skipToEnd();return e.stack.style};function Z(t,e){e.stack={parent:e.stack,style:"comment",indented:e.indented+1,tokenize:e.line};e.line=v;return v(t,e)};function r(t,e){if(t.eat(e.stack.endQuote)){e.line=e.stack.line;e.tokenize=e.stack.tokenize;e.stack=e.stack.parent;return null};if(t.match(E)){e.tokenize=Q;return"slimAttribute"};t.next();return null};function Q(t,e){if(t.match(/^==?/)){e.tokenize=V;return null};return r(t,e)};function V(t,e){var i=t.peek();if(i=="\""||i=="'"){e.tokenize=g(i,"string",!0,!1,r);t.next();return e.tokenize(t,e)};if(i=="["){return n(r)(t,e)};if(t.match(/^(true|false|nil)\b/)){e.tokenize=r;return"keyword"};return n(r)(t,e)};function B(t,e,n){t.stack={parent:t.stack,style:"wrapper",indented:t.indented+1,tokenize:n,line:t.line,endQuote:e};t.line=t.tokenize=r;return null};function tt(e,n){if(e.match(/^#\{/)){n.tokenize=m("}",n.tokenize);return null};var i=new t.StringStream(e.string.slice(n.stack.indented),e.tabSize);i.pos=e.pos-n.stack.indented;i.start=e.start-n.stack.indented;i.lastColumnPos=e.lastColumnPos-n.stack.indented;i.lastColumnValue=e.lastColumnValue-n.stack.indented;var r=n.subMode.token(i,n.subState);e.pos=i.pos+n.stack.indented;return r};function et(t,e){e.stack.indented=t.column();e.line=e.tokenize=tt;return e.tokenize(t,e)};function nt(n){var i=h[n],u=t.mimeModes[i];if(u){return t.getMode(e,u)};var r=t.modes[i];if(r){return r(e,{name:i})};return t.getMode(e,"null")};function it(t){if(!f.hasOwnProperty(t)){return f[t]=nt(t)};return f[t]};function rt(e,n){var i=it(e),r=t.startState(i);n.subMode=i;n.subState=r;n.stack={parent:n.stack,style:"sub",indented:n.indented+1,tokenize:n.line};n.line=n.tokenize=et;return"slimSubmode"};function ut(t,e){t.skipToEnd();return"slimDoctype"};function ot(t,e){var i=t.peek();if(i=="<"){return(e.tokenize=q(e.tokenize))(t,e)};if(t.match(/^[|']/)){return S(t,e,1)};if(t.match(/^\/(!|\[\w+])?/)){return Z(t,e)};if(t.match(/^(-|==?[<>]?)/)){e.tokenize=j(t.column(),I(t.column(),o));return"slimSwitch"};if(t.match(/^doctype\b/)){e.tokenize=ut;return"keyword"};var n=t.match(U);if(n){return rt(n[1],e)};return z(t,e)};function b(t,e){if(e.startOfLine){return ot(t,e)};return z(t,e)};function z(t,e){if(t.eat("*")){e.tokenize=n(w);return null};if(t.match(C)){e.tokenize=w;return"slimTag"};return a(t,e)};function w(t,e){if(t.match(/^(<>?|><?)/)){e.tokenize=a;return null};return a(t,e)};function a(t,e){if(t.match(L)){e.tokenize=a;return"slimId"};if(t.match(A)){e.tokenize=a;return"slimClass"};return i(t,e)};function i(t,e){if(t.match(/^([\[\{\(])/)){return B(e,T[RegExp.$1],i)};if(t.match(D)){e.tokenize=at;return"slimAttribute"};if(t.peek()=="*"){t.next();e.tokenize=n(F);return null};return F(t,e)};function at(t,e){if(t.match(/^==?/)){e.tokenize=ct;return null};return i(t,e)};function ct(t,e){var r=t.peek();if(r=="\""||r=="'"){e.tokenize=g(r,"string",!0,!1,i);t.next();return e.tokenize(t,e)};if(r=="["){return n(i)(t,e)};if(r==":"){return n(M)(t,e)};if(t.match(/^(true|false|nil)\b/)){e.tokenize=i;return"keyword"};return n(i)(t,e)};function M(t,e){t.backUp(1);if(t.match(/^[^\s],(?=:)/)){e.tokenize=n(M);return null};t.next();return i(t,e)};function g(t,e,n,i,r){return function(u,o){d(o);var l=u.current().length==0;if(u.match(/^\\$/,l)){if(!l)return e;k(o,o.indented);return"lineContinuation"};if(u.match(/^#\{/,l)){if(!l)return e;o.tokenize=m("}",o.tokenize);return null};var a=!1,c;while((c=u.next())!=null){if(c==t&&(i||!a)){o.tokenize=r;break};if(n&&c=="#"&&!a){if(u.eat("{")){u.backUp(2);break}};a=!a&&c=="\\"};if(u.eol()&&a){u.backUp(1)};return e}};function F(t,e){if(t.match(/^==?/)){e.tokenize=o;return"slimSwitch"};if(t.match(/^\/$/)){e.tokenize=b;return null};if(t.match(/^:/)){e.tokenize=z;return"slimSwitch"};S(t,e,0);return e.tokenize(t,e)};var p={startState:function(){var e=t.startState(s),n=t.startState(u);return{htmlState:e,rubyState:n,stack:null,last:null,tokenize:b,line:b,indented:0}},copyState:function(e){return{htmlState:t.copyState(s,e.htmlState),rubyState:t.copyState(u,e.rubyState),subMode:e.subMode,subState:e.subMode&&t.copyState(e.subMode,e.subState),stack:e.stack,last:e.last,tokenize:e.tokenize,line:e.line}},token:function(e,t){if(e.sol()){t.indented=e.indentation();t.startOfLine=!0;t.tokenize=t.line;while(t.stack&&t.stack.indented>t.indented&&t.last!="slimSubmode"){t.line=t.tokenize=t.stack.tokenize;t.stack=t.stack.parent;t.subMode=null;t.subState=null}};if(e.eatSpace())return null;var n=t.tokenize(e,t);t.startOfLine=!1;if(n)t.last=n;return x.hasOwnProperty(n)?x[n]:n},blankLine:function(t){if(t.subMode&&t.subMode.blankLine){return t.subMode.blankLine(t.subState)}},innerMode:function(t){if(t.subMode)return{state:t.subState,mode:t.subMode};return{state:t,mode:p}}};return p},"htmlmixed","ruby");t.defineMIME("text/x-slim","slim");t.defineMIME("application/x-slim","slim")}); -/* Include script: puppet */ +/* Include script: puppet.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('puppet',function(){var i={};var t=/({)?([a-z][a-z0-9_]*)?((::[a-z][a-z0-9_]*)*::)?[a-zA-Z0-9_]+(})?/;function e(e,n){var r=n.split(' ');for(var t=0;t<r.length;t++){i[r[t]]=e}};e('keyword','class define site node include import inherits');e('keyword','case if else in and elsif default or');e('atom','false true running present absent file directory undef');e('builtin','action augeas burst chain computer cron destination dport exec file filebucket group host icmp iniface interface jump k5login limit log_level log_prefix macauthorization mailalias maillist mcx mount nagios_command nagios_contact nagios_contactgroup nagios_host nagios_hostdependency nagios_hostescalation nagios_hostextinfo nagios_hostgroup nagios_service nagios_servicedependency nagios_serviceescalation nagios_serviceextinfo nagios_servicegroup nagios_timeperiod name notify outiface package proto reject resources router schedule scheduled_task selboolean selmodule service source sport ssh_authorized_key sshkey stage state table tidy todest toports tosource user vlan yumrepo zfs zone zpool');function n(e,i){var n,t,r=!1;while(!e.eol()&&(n=e.next())!=i.pending){if(n==='$'&&t!='\\'&&i.pending=='"'){r=!0;break};t=n};if(r){e.backUp(1)};if(n==i.pending){i.continueString=!1} else{i.continueString=!0};return'string'};function r(e,r){var a=e.match(/[\w]+/,!1),s=e.match(/(\s+)?\w+\s+=>.*/,!1),c=e.match(/(\s+)?[\w:_]+(\s+)?{/,!1),u=e.match(/(\s+)?[@]{1,2}[\w:_]+(\s+)?{/,!1),o=e.next();if(o==='$'){if(e.match(t)){return r.continueString?'variable-2':'variable'};return'error'};if(r.continueString){e.backUp(1);return n(e,r)};if(r.inDefinition){if(e.match(/(\s+)?[\w:_]+(\s+)?/)){return'def'};e.match(/\s+{/);r.inDefinition=!1};if(r.inInclude){e.match(/(\s+)?\S+(\s+)?/);r.inInclude=!1;return'def'};if(e.match(/(\s+)?\w+\(/)){e.backUp(1);return'def'};if(s){e.match(/(\s+)?\w+/);return'tag'};if(a&&i.hasOwnProperty(a)){e.backUp(1);e.match(/[\w]+/);if(e.match(/\s+\S+\s+{/,!1)){r.inDefinition=!0};if(a=='include'){r.inInclude=!0};return i[a]};if(/(^|\s+)[A-Z][\w:_]+/.test(a)){e.backUp(1);e.match(/(^|\s+)[A-Z][\w:_]+/);return'def'};if(c){e.match(/(\s+)?[\w:_]+/);return'def'};if(u){e.match(/(\s+)?[@]{1,2}/);return'special'};if(o=='#'){e.skipToEnd();return'comment'};if(o=='\''||o=='"'){r.pending=o;return n(e,r)};if(o=='{'||o=='}'){return'bracket'};if(o=='/'){e.match(/.*?\//);return'variable-3'};if(o.match(/[0-9]/)){e.eatWhile(/[0-9]+/);return'number'};if(o=='='){if(e.peek()=='>'){e.next()};return'operator'};e.eatWhile(/[\w-]/);return null};return{startState:function(){var e={};e.inDefinition=!1;e.inInclude=!1;e.continueString=!1;e.pending=!1;return e},token:function(e,i){if(e.eatSpace())return null;return r(e,i)}}});e.defineMIME('text/x-puppet','puppet')}); -/* Include script: meta */ +/* Include script: meta.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.modeInfo=[{name:'APL',mime:'text/apl',mode:'apl',ext:['dyalog','apl']},{name:'PGP',mimes:['application/pgp','application/pgp-encrypted','application/pgp-keys','application/pgp-signature'],mode:'asciiarmor',ext:['asc','pgp','sig']},{name:'ASN.1',mime:'text/x-ttcn-asn',mode:'asn.1',ext:['asn','asn1']},{name:'Asterisk',mime:'text/x-asterisk',mode:'asterisk',file:/^extensions\.conf$/i},{name:'Brainfuck',mime:'text/x-brainfuck',mode:'brainfuck',ext:['b','bf']},{name:'C',mime:'text/x-csrc',mode:'clike',ext:['c','h']},{name:'C++',mime:'text/x-c++src',mode:'clike',ext:['cpp','c++','cc','cxx','hpp','h++','hh','hxx'],alias:['cpp']},{name:'Cobol',mime:'text/x-cobol',mode:'cobol',ext:['cob','cpy']},{name:'C#',mime:'text/x-csharp',mode:'clike',ext:['cs'],alias:['csharp']},{name:'Clojure',mime:'text/x-clojure',mode:'clojure',ext:['clj','cljc','cljx']},{name:'ClojureScript',mime:'text/x-clojurescript',mode:'clojure',ext:['cljs']},{name:'Closure Stylesheets (GSS)',mime:'text/x-gss',mode:'css',ext:['gss']},{name:'CMake',mime:'text/x-cmake',mode:'cmake',ext:['cmake','cmake.in'],file:/^CMakeLists.txt$/},{name:'CoffeeScript',mimes:['application/vnd.coffeescript','text/coffeescript','text/x-coffeescript'],mode:'coffeescript',ext:['coffee'],alias:['coffee','coffee-script']},{name:'Common Lisp',mime:'text/x-common-lisp',mode:'commonlisp',ext:['cl','lisp','el'],alias:['lisp']},{name:'Cypher',mime:'application/x-cypher-query',mode:'cypher',ext:['cyp','cypher']},{name:'Cython',mime:'text/x-cython',mode:'python',ext:['pyx','pxd','pxi']},{name:'Crystal',mime:'text/x-crystal',mode:'crystal',ext:['cr']},{name:'CSS',mime:'text/css',mode:'css',ext:['css']},{name:'CQL',mime:'text/x-cassandra',mode:'sql',ext:['cql']},{name:'D',mime:'text/x-d',mode:'d',ext:['d']},{name:'Dart',mimes:['application/dart','text/x-dart'],mode:'dart',ext:['dart']},{name:'diff',mime:'text/x-diff',mode:'diff',ext:['diff','patch']},{name:'Django',mime:'text/x-django',mode:'django'},{name:'Dockerfile',mime:'text/x-dockerfile',mode:'dockerfile',file:/^Dockerfile$/},{name:'DTD',mime:'application/xml-dtd',mode:'dtd',ext:['dtd']},{name:'Dylan',mime:'text/x-dylan',mode:'dylan',ext:['dylan','dyl','intr']},{name:'EBNF',mime:'text/x-ebnf',mode:'ebnf'},{name:'ECL',mime:'text/x-ecl',mode:'ecl',ext:['ecl']},{name:'edn',mime:'application/edn',mode:'clojure',ext:['edn']},{name:'Eiffel',mime:'text/x-eiffel',mode:'eiffel',ext:['e']},{name:'Elm',mime:'text/x-elm',mode:'elm',ext:['elm']},{name:'Embedded Javascript',mime:'application/x-ejs',mode:'htmlembedded',ext:['ejs']},{name:'Embedded Ruby',mime:'application/x-erb',mode:'htmlembedded',ext:['erb']},{name:'Erlang',mime:'text/x-erlang',mode:'erlang',ext:['erl']},{name:'Esper',mime:'text/x-esper',mode:'sql'},{name:'Factor',mime:'text/x-factor',mode:'factor',ext:['factor']},{name:'FCL',mime:'text/x-fcl',mode:'fcl'},{name:'Forth',mime:'text/x-forth',mode:'forth',ext:['forth','fth','4th']},{name:'Fortran',mime:'text/x-fortran',mode:'fortran',ext:['f','for','f77','f90']},{name:'F#',mime:'text/x-fsharp',mode:'mllike',ext:['fs'],alias:['fsharp']},{name:'Gas',mime:'text/x-gas',mode:'gas',ext:['s']},{name:'Gherkin',mime:'text/x-feature',mode:'gherkin',ext:['feature']},{name:'GitHub Flavored Markdown',mime:'text/x-gfm',mode:'gfm',file:/^(readme|contributing|history).md$/i},{name:'Go',mime:'text/x-go',mode:'go',ext:['go']},{name:'Groovy',mime:'text/x-groovy',mode:'groovy',ext:['groovy','gradle'],file:/^Jenkinsfile$/},{name:'HAML',mime:'text/x-haml',mode:'haml',ext:['haml']},{name:'Haskell',mime:'text/x-haskell',mode:'haskell',ext:['hs']},{name:'Haskell (Literate)',mime:'text/x-literate-haskell',mode:'haskell-literate',ext:['lhs']},{name:'Haxe',mime:'text/x-haxe',mode:'haxe',ext:['hx']},{name:'HXML',mime:'text/x-hxml',mode:'haxe',ext:['hxml']},{name:'ASP.NET',mime:'application/x-aspx',mode:'htmlembedded',ext:['aspx'],alias:['asp','aspx']},{name:'HTML',mime:'text/html',mode:'htmlmixed',ext:['html','htm'],alias:['xhtml']},{name:'HTTP',mime:'message/http',mode:'http'},{name:'IDL',mime:'text/x-idl',mode:'idl',ext:['pro']},{name:'Pug',mime:'text/x-pug',mode:'pug',ext:['jade','pug'],alias:['jade']},{name:'Java',mime:'text/x-java',mode:'clike',ext:['java']},{name:'Java Server Pages',mime:'application/x-jsp',mode:'htmlembedded',ext:['jsp'],alias:['jsp']},{name:'JavaScript',mimes:['text/javascript','text/ecmascript','application/javascript','application/x-javascript','application/ecmascript'],mode:'javascript',ext:['js'],alias:['ecmascript','js','node']},{name:'JSON',mimes:['application/json','application/x-json'],mode:'javascript',ext:['json','map'],alias:['json5']},{name:'JSON-LD',mime:'application/ld+json',mode:'javascript',ext:['jsonld'],alias:['jsonld']},{name:'JSX',mime:'text/jsx',mode:'jsx',ext:['jsx']},{name:'Jinja2',mime:'null',mode:'jinja2'},{name:'Julia',mime:'text/x-julia',mode:'julia',ext:['jl']},{name:'Kotlin',mime:'text/x-kotlin',mode:'clike',ext:['kt']},{name:'LESS',mime:'text/x-less',mode:'css',ext:['less']},{name:'LiveScript',mime:'text/x-livescript',mode:'livescript',ext:['ls'],alias:['ls']},{name:'Lua',mime:'text/x-lua',mode:'lua',ext:['lua']},{name:'Markdown',mime:'text/x-markdown',mode:'markdown',ext:['markdown','md','mkd']},{name:'mIRC',mime:'text/mirc',mode:'mirc'},{name:'MariaDB SQL',mime:'text/x-mariadb',mode:'sql'},{name:'Mathematica',mime:'text/x-mathematica',mode:'mathematica',ext:['m','nb']},{name:'Modelica',mime:'text/x-modelica',mode:'modelica',ext:['mo']},{name:'MUMPS',mime:'text/x-mumps',mode:'mumps',ext:['mps']},{name:'MS SQL',mime:'text/x-mssql',mode:'sql'},{name:'mbox',mime:'application/mbox',mode:'mbox',ext:['mbox']},{name:'MySQL',mime:'text/x-mysql',mode:'sql'},{name:'Nginx',mime:'text/x-nginx-conf',mode:'nginx',file:/nginx.*\.conf$/i},{name:'NSIS',mime:'text/x-nsis',mode:'nsis',ext:['nsh','nsi']},{name:'NTriples',mimes:['application/n-triples','application/n-quads','text/n-triples'],mode:'ntriples',ext:['nt','nq']},{name:'Objective C',mime:'text/x-objectivec',mode:'clike',ext:['m','mm'],alias:['objective-c','objc']},{name:'OCaml',mime:'text/x-ocaml',mode:'mllike',ext:['ml','mli','mll','mly']},{name:'Octave',mime:'text/x-octave',mode:'octave',ext:['m']},{name:'Oz',mime:'text/x-oz',mode:'oz',ext:['oz']},{name:'Pascal',mime:'text/x-pascal',mode:'pascal',ext:['p','pas']},{name:'PEG.js',mime:'null',mode:'pegjs',ext:['jsonld']},{name:'Perl',mime:'text/x-perl',mode:'perl',ext:['pl','pm']},{name:'PHP',mime:['application/x-httpd-php','text/x-php'],mode:'php',ext:['php','php3','php4','php5','php7','phtml']},{name:'Pig',mime:'text/x-pig',mode:'pig',ext:['pig']},{name:'Plain Text',mime:'text/plain',mode:'null',ext:['txt','text','conf','def','list','log']},{name:'PLSQL',mime:'text/x-plsql',mode:'sql',ext:['pls']},{name:'PowerShell',mime:'application/x-powershell',mode:'powershell',ext:['ps1','psd1','psm1']},{name:'Properties files',mime:'text/x-properties',mode:'properties',ext:['properties','ini','in'],alias:['ini','properties']},{name:'ProtoBuf',mime:'text/x-protobuf',mode:'protobuf',ext:['proto']},{name:'Python',mime:'text/x-python',mode:'python',ext:['BUILD','bzl','py','pyw'],file:/^(BUCK|BUILD)$/},{name:'Puppet',mime:'text/x-puppet',mode:'puppet',ext:['pp']},{name:'Q',mime:'text/x-q',mode:'q',ext:['q']},{name:'R',mime:'text/x-rsrc',mode:'r',ext:['r','R'],alias:['rscript']},{name:'reStructuredText',mime:'text/x-rst',mode:'rst',ext:['rst'],alias:['rst']},{name:'RPM Changes',mime:'text/x-rpm-changes',mode:'rpm'},{name:'RPM Spec',mime:'text/x-rpm-spec',mode:'rpm',ext:['spec']},{name:'Ruby',mime:'text/x-ruby',mode:'ruby',ext:['rb'],alias:['jruby','macruby','rake','rb','rbx']},{name:'Rust',mime:'text/x-rustsrc',mode:'rust',ext:['rs']},{name:'SAS',mime:'text/x-sas',mode:'sas',ext:['sas']},{name:'Sass',mime:'text/x-sass',mode:'sass',ext:['sass']},{name:'Scala',mime:'text/x-scala',mode:'clike',ext:['scala']},{name:'Scheme',mime:'text/x-scheme',mode:'scheme',ext:['scm','ss']},{name:'SCSS',mime:'text/x-scss',mode:'css',ext:['scss']},{name:'Shell',mimes:['text/x-sh','application/x-sh'],mode:'shell',ext:['sh','ksh','bash'],alias:['bash','sh','zsh'],file:/^PKGBUILD$/},{name:'Sieve',mime:'application/sieve',mode:'sieve',ext:['siv','sieve']},{name:'Slim',mimes:['text/x-slim','application/x-slim'],mode:'slim',ext:['slim']},{name:'Smalltalk',mime:'text/x-stsrc',mode:'smalltalk',ext:['st']},{name:'Smarty',mime:'text/x-smarty',mode:'smarty',ext:['tpl']},{name:'Solr',mime:'text/x-solr',mode:'solr'},{name:'Soy',mime:'text/x-soy',mode:'soy',ext:['soy'],alias:['closure template']},{name:'SPARQL',mime:'application/sparql-query',mode:'sparql',ext:['rq','sparql'],alias:['sparul']},{name:'Spreadsheet',mime:'text/x-spreadsheet',mode:'spreadsheet',alias:['excel','formula']},{name:'SQL',mime:'text/x-sql',mode:'sql',ext:['sql']},{name:'SQLite',mime:'text/x-sqlite',mode:'sql'},{name:'Squirrel',mime:'text/x-squirrel',mode:'clike',ext:['nut']},{name:'Stylus',mime:'text/x-styl',mode:'stylus',ext:['styl']},{name:'Swift',mime:'text/x-swift',mode:'swift',ext:['swift']},{name:'sTeX',mime:'text/x-stex',mode:'stex'},{name:'LaTeX',mime:'text/x-latex',mode:'stex',ext:['text','ltx'],alias:['tex']},{name:'SystemVerilog',mime:'text/x-systemverilog',mode:'verilog',ext:['v','sv','svh']},{name:'Tcl',mime:'text/x-tcl',mode:'tcl',ext:['tcl']},{name:'Textile',mime:'text/x-textile',mode:'textile',ext:['textile']},{name:'TiddlyWiki ',mime:'text/x-tiddlywiki',mode:'tiddlywiki'},{name:'Tiki wiki',mime:'text/tiki',mode:'tiki'},{name:'TOML',mime:'text/x-toml',mode:'toml',ext:['toml']},{name:'Tornado',mime:'text/x-tornado',mode:'tornado'},{name:'troff',mime:'text/troff',mode:'troff',ext:['1','2','3','4','5','6','7','8','9']},{name:'TTCN',mime:'text/x-ttcn',mode:'ttcn',ext:['ttcn','ttcn3','ttcnpp']},{name:'TTCN_CFG',mime:'text/x-ttcn-cfg',mode:'ttcn-cfg',ext:['cfg']},{name:'Turtle',mime:'text/turtle',mode:'turtle',ext:['ttl']},{name:'TypeScript',mime:'application/typescript',mode:'javascript',ext:['ts'],alias:['ts']},{name:'TypeScript-JSX',mime:'text/typescript-jsx',mode:'jsx',ext:['tsx'],alias:['tsx']},{name:'Twig',mime:'text/x-twig',mode:'twig'},{name:'Web IDL',mime:'text/x-webidl',mode:'webidl',ext:['webidl']},{name:'VB.NET',mime:'text/x-vb',mode:'vb',ext:['vb']},{name:'VBScript',mime:'text/vbscript',mode:'vbscript',ext:['vbs']},{name:'Velocity',mime:'text/velocity',mode:'velocity',ext:['vtl']},{name:'Verilog',mime:'text/x-verilog',mode:'verilog',ext:['v']},{name:'VHDL',mime:'text/x-vhdl',mode:'vhdl',ext:['vhd','vhdl']},{name:'Vue.js Component',mimes:['script/x-vue','text/x-vue'],mode:'vue',ext:['vue']},{name:'XML',mimes:['application/xml','text/xml'],mode:'xml',ext:['xml','xsl','xsd','svg'],alias:['rss','wsdl','xsd']},{name:'XQuery',mime:'application/xquery',mode:'xquery',ext:['xy','xquery']},{name:'Yacas',mime:'text/x-yacas',mode:'yacas',ext:['ys']},{name:'YAML',mimes:['text/x-yaml','text/yaml'],mode:'yaml',ext:['yaml','yml'],alias:['yml']},{name:'Z80',mime:'text/x-z80',mode:'z80',ext:['z80']},{name:'mscgen',mime:'text/x-mscgen',mode:'mscgen',ext:['mscgen','mscin','msc']},{name:'xu',mime:'text/x-xu',mode:'mscgen',ext:['xu']},{name:'msgenny',mime:'text/x-msgenny',mode:'mscgen',ext:['msgenny']}];for(var t=0;t<e.modeInfo.length;t++){var m=e.modeInfo[t];if(m.mimes)m.mime=m.mimes[0]};e.findModeByMIME=function(m){m=m.toLowerCase();for(var i=0;i<e.modeInfo.length;i++){var t=e.modeInfo[i];if(t.mime==m)return t;if(t.mimes)for(var a=0;a<t.mimes.length;a++)if(t.mimes[a]==m)return t};if(/\+xml$/.test(m))return e.findModeByMIME('application/xml');if(/\+json$/.test(m))return e.findModeByMIME('application/json')};e.findModeByExtension=function(m){for(var i=0;i<e.modeInfo.length;i++){var t=e.modeInfo[i];if(t.ext)for(var a=0;a<t.ext.length;a++)if(t.ext[a]==m)return t}};e.findModeByFileName=function(m){for(var a=0;a<e.modeInfo.length;a++){var t=e.modeInfo[a];if(t.file&&t.file.test(m))return t};var i=m.lastIndexOf('.'),x=i>-1&&m.substring(i+1,m.length);if(x)return e.findModeByExtension(x)};e.findModeByName=function(m){m=m.toLowerCase();for(var i=0;i<e.modeInfo.length;i++){var t=e.modeInfo[i];if(t.name.toLowerCase()==m)return t;if(t.alias)for(var a=0;a<t.alias.length;a++)if(t.alias[a].toLowerCase()==m)return t}}}); -/* Include script: go */ +/* Include script: go.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('go',function(t){var a=t.indentUnit,s={'break':!0,'case':!0,'chan':!0,'const':!0,'continue':!0,'default':!0,'defer':!0,'else':!0,'fallthrough':!0,'for':!0,'func':!0,'go':!0,'goto':!0,'if':!0,'import':!0,'interface':!0,'map':!0,'package':!0,'range':!0,'return':!0,'select':!0,'struct':!0,'switch':!0,'type':!0,'var':!0,'bool':!0,'byte':!0,'complex64':!0,'complex128':!0,'float32':!0,'float64':!0,'int8':!0,'int16':!0,'int32':!0,'int64':!0,'string':!0,'uint8':!0,'uint16':!0,'uint32':!0,'uint64':!0,'int':!0,'uint':!0,'uintptr':!0,'error':!0,'rune':!0};var u={'true':!0,'false':!0,'iota':!0,'nil':!0,'append':!0,'cap':!0,'close':!0,'complex':!0,'copy':!0,'delete':!0,'imag':!0,'len':!0,'make':!0,'new':!0,'panic':!0,'print':!0,'println':!0,'real':!0,'recover':!0};var o=/[+\-*&^%:=<>!|\/]/,n;function i(e,t){var i=e.next();if(i=='"'||i=='\''||i=='`'){t.tokenize=d(i);return t.tokenize(e,t)};if(/[\d\.]/.test(i)){if(i=='.'){e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/)} else if(i=='0'){e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/)} else{e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/)};return'number'};if(/[\[\]{}\(\),;\:\.]/.test(i)){n=i;return null};if(i=='/'){if(e.eat('*')){t.tokenize=c;return c(e,t)};if(e.eat('/')){e.skipToEnd();return'comment'}};if(o.test(i)){e.eatWhile(o);return'operator'};e.eatWhile(/[\w\$_\xa1-\uffff]/);var r=e.current();if(s.propertyIsEnumerable(r)){if(r=='case'||r=='default')n='case';return'keyword'};if(u.propertyIsEnumerable(r))return'atom';return'variable'};function d(e){return function(t,n){var r=!1,o,a=!1;while((o=t.next())!=null){if(o==e&&!r){a=!0;break};r=!r&&e!='`'&&o=='\\'};if(a||!(r||e=='`'))n.tokenize=i;return'string'}};function c(e,t){var r=!1,n;while(n=e.next()){if(n=='/'&&r){t.tokenize=i;break};r=(n=='*')};return'comment'};function f(e,t,n,i,r){this.indented=e;this.column=t;this.type=n;this.align=i;this.prev=r};function r(e,t,n){return e.context=new f(e.indented,t,n,null,e.context)};function l(e){if(!e.context.prev)return;var t=e.context.type;if(t==')'||t==']'||t=='}')e.indented=e.context.indented;return e.context=e.context.prev};return{startState:function(e){return{tokenize:null,context:new f((e||0)-a,0,'top',!1),indented:0,startOfLine:!0}},token:function(e,t){var o=t.context;if(e.sol()){if(o.align==null)o.align=!1;t.indented=e.indentation();t.startOfLine=!0;if(o.type=='case')o.type='}'};if(e.eatSpace())return null;n=null;var a=(t.tokenize||i)(e,t);if(a=='comment')return a;if(o.align==null)o.align=!0;if(n=='{')r(t,e.column(),'}');else if(n=='[')r(t,e.column(),']');else if(n=='(')r(t,e.column(),')');else if(n=='case')o.type='case';else if(n=='}'&&o.type=='}')l(t);else if(n==o.type)l(t);t.startOfLine=!1;return a},indent:function(t,n){if(t.tokenize!=i&&t.tokenize!=null)return e.Pass;var r=t.context,c=n&&n.charAt(0);if(r.type=='case'&&/^(?:case|default)\b/.test(n)){t.context.type='}';return r.indented};var o=c==r.type;if(r.align)return r.column+(o?0:1);else return r.indented+(o?0:a)},electricChars:'{}):',closeBrackets:'()[]{}\'\'""``',fold:'brace',blockCommentStart:'/*',blockCommentEnd:'*/',lineComment:'//'}});e.defineMIME('text/x-go','go')}); -/* Include script: commonlisp */ +/* Include script: commonlisp.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('commonlisp',function(t){var o=/^(block|let*|return-from|catch|load-time-value|setq|eval-when|locally|symbol-macrolet|flet|macrolet|tagbody|function|multiple-value-call|the|go|multiple-value-prog1|throw|if|progn|unwind-protect|labels|progv|let|quote)$/,i=/^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/,l=/^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/,u=/[^\s'`,@()\[\]";]/,e;function n(e){var t;while(t=e.next()){if(t=='\\')e.next();else if(!u.test(t)){e.backUp(1);break}};return e.current()};function r(t,u){if(t.eatSpace()){e='ws';return null};if(t.match(l))return'number';var r=t.next();if(r=='\\')r=t.next();if(r=='"')return(u.tokenize=c)(t,u);else if(r=='('){e='open';return'bracket'} else if(r==')'||r==']'){e='close';return'bracket'} else if(r==';'){t.skipToEnd();e='ws';return'comment'} @@ -942,9 +940,9 @@ else if(r=='\\'){t.next();n(t);return'string-2'} else return'error'} else{var f=n(t);if(f=='.')return null;e='symbol';if(f=='nil'||f=='t'||f.charAt(0)==':')return'atom';if(u.lastType=='open'&&(o.test(f)||i.test(f)))return'keyword';if(f.charAt(0)=='&')return'variable-2';return'variable'}};function c(e,t){var n=!1,i;while(i=e.next()){if(i=='"'&&!n){t.tokenize=r;break};n=!n&&i=='\\'};return'string'};function s(t,n){var i,o;while(i=t.next()){if(i=='#'&&o=='|'){n.tokenize=r;break};o=i};e='ws';return'comment'};return{startState:function(){return{ctx:{prev:null,start:0,indentTo:0},lastType:null,tokenize:r}},token:function(r,n){if(r.sol()&&typeof n.ctx.indentTo!='number')n.ctx.indentTo=n.ctx.start+1;e=null;var o=n.tokenize(r,n);if(e!='ws'){if(n.ctx.indentTo==null){if(e=='symbol'&&i.test(r.current()))n.ctx.indentTo=n.ctx.start+t.indentUnit;else n.ctx.indentTo='next'} else if(n.ctx.indentTo=='next'){n.ctx.indentTo=r.column()};n.lastType=e};if(e=='open')n.ctx={prev:n.ctx,start:r.column(),indentTo:null};else if(e=='close')n.ctx=n.ctx.prev||n.ctx;return o},indent:function(e,t){var n=e.ctx.indentTo;return typeof n=='number'?n:e.ctx.start+1},closeBrackets:{pairs:'()[]{}""'},lineComment:';;',blockCommentStart:'#|',blockCommentEnd:'|#'}});e.defineMIME('text/x-common-lisp','commonlisp')}); -/* Include script: rust */ +/* Include script: rust.min.js */ -/* Include script: powershell */ +/* Include script: powershell.min.js */ (function(e){'use strict';if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(window.CodeMirror)})(function(e){'use strict';e.defineMode('powershell',function(){function t(e,t){t=t||{};var n=t.prefix!==undefined?t.prefix:'^',i=t.suffix!==undefined?t.suffix:'\\b';for(var r=0;r<e.length;r++){if(e[r]instanceof RegExp){e[r]=e[r].source} else{e[r]=e[r].replace(/[-\/\\^$*+?.()|[\]{}]/g,'\\$&')}};return new RegExp(n+'('+e.join('|')+')'+i,'i')};var a='(?=[^A-Za-z\\d\\-_]|$)',n=/[\w\-:]/,k=t([/begin|break|catch|continue|data|default|do|dynamicparam/,/else|elseif|end|exit|filter|finally|for|foreach|from|function|if|in/,/param|process|return|switch|throw|trap|try|until|where|while/],{suffix:a});var C=/[\[\]{},;`\.]|@[({]/,h=t(['f',/b?not/,/[ic]?split/,'join',/is(not)?/,'as',/[ic]?(eq|ne|[gl][te])/,/[ic]?(not)?(like|match|contains)/,/[ic]?replace/,/b?(and|or|xor)/],{prefix:'-'});var b=/[+\-*\/%]=|\+\+|--|\.\.|[+\-*&^%:=!|\/]|<(?!#)|(?!#)>/,g=t([h,b],{suffix:''});var S=/^((0x[\da-f]+)|((\d+\.\d+|\d\.|\.\d+|\d+)(e[\+\-]?\d+)?))[ld]?([kmgtp]b)?/i,d=/^[A-Za-z\_][A-Za-z\-\_\d]*\b/,P=/[A-Z]:|%|\?/i,v=t([/Add-(Computer|Content|History|Member|PSSnapin|Type)/,/Checkpoint-Computer/,/Clear-(Content|EventLog|History|Host|Item(Property)?|Variable)/,/Compare-Object/,/Complete-Transaction/,/Connect-PSSession/,/ConvertFrom-(Csv|Json|SecureString|StringData)/,/Convert-Path/,/ConvertTo-(Csv|Html|Json|SecureString|Xml)/,/Copy-Item(Property)?/,/Debug-Process/,/Disable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/Disconnect-PSSession/,/Enable-(ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)/,/(Enter|Exit)-PSSession/,/Export-(Alias|Clixml|Console|Counter|Csv|FormatData|ModuleMember|PSSession)/,/ForEach-Object/,/Format-(Custom|List|Table|Wide)/,new RegExp('Get-(Acl|Alias|AuthenticodeSignature|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Counter|Credential|Culture|Date|Event|EventLog|EventSubscriber|ExecutionPolicy|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|PfxCertificate|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|Verb|WinEvent|WmiObject)'),/Group-Object/,/Import-(Alias|Clixml|Counter|Csv|LocalizedData|Module|PSSession)/,/ImportSystemModules/,/Invoke-(Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)/,/Join-Path/,/Limit-EventLog/,/Measure-(Command|Object)/,/Move-Item(Property)?/,new RegExp('New-(Alias|Event|EventLog|Item(Property)?|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy|WinEvent)'),/Out-(Default|File|GridView|Host|Null|Printer|String)/,/Pause/,/(Pop|Push)-Location/,/Read-Host/,/Receive-(Job|PSSession)/,/Register-(EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)/,/Remove-(Computer|Event|EventLog|Item(Property)?|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)/,/Rename-(Computer|Item(Property)?)/,/Reset-ComputerMachinePassword/,/Resolve-Path/,/Restart-(Computer|Service)/,/Restore-Computer/,/Resume-(Job|Service)/,/Save-Help/,/Select-(Object|String|Xml)/,/Send-MailMessage/,new RegExp('Set-(Acl|Alias|AuthenticodeSignature|Content|Date|ExecutionPolicy|Item(Property)?|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)'),/Show-(Command|ControlPanelItem|EventLog)/,/Sort-Object/,/Split-Path/,/Start-(Job|Process|Service|Sleep|Transaction|Transcript)/,/Stop-(Computer|Job|Process|Service|Transcript)/,/Suspend-(Job|Service)/,/TabExpansion2/,/Tee-Object/,/Test-(ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)/,/Trace-Command/,/Unblock-File/,/Undo-Transaction/,/Unregister-(Event|PSSessionConfiguration)/,/Update-(FormatData|Help|List|TypeData)/,/Use-Transaction/,/Wait-(Event|Job|Process)/,/Where-Object/,/Write-(Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning)/,/cd|help|mkdir|more|oss|prompt/,/ac|asnp|cat|cd|chdir|clc|clear|clhy|cli|clp|cls|clv|cnsn|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|dnsn|ebp/,/echo|epal|epcsv|epsn|erase|etsn|exsn|fc|fl|foreach|ft|fw|gal|gbp|gc|gci|gcm|gcs|gdr|ghy|gi|gjb|gl|gm|gmo|gp|gps/,/group|gsn|gsnp|gsv|gu|gv|gwmi|h|history|icm|iex|ihy|ii|ipal|ipcsv|ipmo|ipsn|irm|ise|iwmi|iwr|kill|lp|ls|man|md/,/measure|mi|mount|move|mp|mv|nal|ndr|ni|nmo|npssc|nsn|nv|ogv|oh|popd|ps|pushd|pwd|r|rbp|rcjb|rcsn|rd|rdr|ren|ri/,/rjb|rm|rmdir|rmo|rni|rnp|rp|rsn|rsnp|rujb|rv|rvpa|rwmi|sajb|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls/,/sort|sp|spjb|spps|spsv|start|sujb|sv|swmi|tee|trcm|type|where|wjb|write/],{prefix:'',suffix:''});var f=t([/[$?^_]|Args|ConfirmPreference|ConsoleFileName|DebugPreference|Error|ErrorActionPreference|ErrorView|ExecutionContext/,/FormatEnumerationLimit|Home|Host|Input|MaximumAliasCount|MaximumDriveCount|MaximumErrorCount|MaximumFunctionCount/,/MaximumHistoryCount|MaximumVariableCount|MyInvocation|NestedPromptLevel|OutputEncoding|Pid|Profile|ProgressPreference/,/PSBoundParameters|PSCommandPath|PSCulture|PSDefaultParameterValues|PSEmailServer|PSHome|PSScriptRoot|PSSessionApplicationName/,/PSSessionConfigurationName|PSSessionOption|PSUICulture|PSVersionTable|Pwd|ShellId|StackTrace|VerbosePreference/,/WarningPreference|WhatIfPreference/,/Event|EventArgs|EventSubscriber|Sender/,/Matches|Ofs|ForEach|LastExitCode|PSCmdlet|PSItem|PSSenderInfo|This/,/true|false|null/],{prefix:'\\$',suffix:''});var m=t([P,v,f],{suffix:a});var o={keyword:k,number:S,operator:g,builtin:m,punctuation:C,identifier:d};function e(e,t){var u=t.returnStack[t.returnStack.length-1];if(u&&u.shouldReturnFrom(t)){t.tokenize=u.tokenize;t.returnStack.pop();return t.tokenize(e,t)};if(e.eatSpace()){return null};if(e.eat('(')){t.bracketNesting+=1;return'punctuation'};if(e.eat(')')){t.bracketNesting-=1;return'punctuation'};for(var p in o){if(e.match(o[p])){return p}};var a=e.next();if(a==='\''){return x(e,t)};if(a==='$'){return i(e,t)};if(a==='"'){return s(e,t)};if(a==='<'&&e.eat('#')){t.tokenize=c;return c(e,t)};if(a==='#'){e.skipToEnd();return'comment'};if(a==='@'){var l=e.eat(/["']/);if(l&&e.eol()){t.tokenize=r;t.startQuote=l[0];return r(e,t)} else if(e.eol()){return'error'} @@ -955,7 +953,7 @@ else if(i!=undefined&&i.match(n)){t.eatWhile(n);r.tokenize=e;return'variable-2'} else{r.tokenize=e;return'error'}};function l(t,r){var n;while((n=t.next())!=null){if(n==='}'){r.tokenize=e;break}};return'variable-2'};function r(t,r){var i=r.startQuote;if(t.sol()&&t.match(new RegExp(i+'@'))){r.tokenize=e} else if(i==='"'){while(!t.eol()){var n=t.peek();if(n==='$'){r.tokenize=y;return'string'};t.next();if(n==='`'){t.next()}}} else{t.skipToEnd()};return'string'};var p={startState:function(){return{returnStack:[],bracketNesting:0,tokenize:e}},token:function(e,t){return t.tokenize(e,t)},blockCommentStart:'<#',blockCommentEnd:'#>',lineComment:'#',fold:'brace'};return p});e.defineMIME('application/x-powershell','powershell')}); -/* Include script: stex */ +/* Include script: stex.min.js */ (function(t){if(typeof exports=='object'&&typeof module=='object')t(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],t);else t(CodeMirror)})(function(t){'use strict';t.defineMode('stex',function(){'use strict';function a(t,e){t.cmdState.push(e)};function u(t){if(t.cmdState.length>0){return t.cmdState[t.cmdState.length-1]} else{return null}};function o(t){var e=t.cmdState.pop();if(e){e.closeBracket()}};function f(t){var r=t.cmdState;for(var e=r.length-1;e>=0;e--){var n=r[e];if(n.name=='DEFAULT'){continue};return n};return{styleIdentifier:function(){return null}}};function r(t,e,n){return function(){this.name=t;this.bracketNo=0;this.style=e;this.styles=n;this.argument=null;this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null};this.openBracket=function(){this.bracketNo++;return'bracket'};this.closeBracket=function(){}}};var t={};t['importmodule']=r('importmodule','tag',['string','builtin']);t['documentclass']=r('documentclass','tag',['','atom']);t['usepackage']=r('usepackage','tag',['atom']);t['begin']=r('begin','tag',['atom']);t['end']=r('end','tag',['atom']);t['DEFAULT']=function(){this.name='DEFAULT';this.style='tag';this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function e(t,e){t.f=e};function n(n,r){var o;if(n.match(/^\\[a-zA-Z@]+/)){var l=n.current().slice(1);o=t[l]||t['DEFAULT'];o=new o();a(r,o);e(r,c);return o.style};if(n.match(/^\\[$&%#{}_]/)){return'tag'};if(n.match(/^\\[,;!\/\\]/)){return'tag'};if(n.match('\\[')){e(r,function(t,e){return i(t,e,'\\]')});return'keyword'};if(n.match('$$')){e(r,function(t,e){return i(t,e,'$$')});return'keyword'};if(n.match('$')){e(r,function(t,e){return i(t,e,'$')});return'keyword'};var s=n.next();if(s=='%'){n.skipToEnd();return'comment'} else if(s=='}'||s==']'){o=u(r);if(o){o.closeBracket(s);e(r,c)} @@ -963,19 +961,19 @@ else{return'error'};return'bracket'} else if(s=='{'||s=='['){o=t['DEFAULT'];o=new o();a(r,o);return'bracket'} else if(/\d/.test(s)){n.eatWhile(/[\w.%]/);return'atom'} else{n.eatWhile(/[\w\-_]/);o=f(r);if(o.name=='begin'){o.argument=n.current()};return o.styleIdentifier()}};function i(t,r,a){if(t.eatSpace()){return null};if(t.match(a)){e(r,n);return'keyword'};if(t.match(/^\\[a-zA-Z@]+/)){return'tag'};if(t.match(/^[a-zA-Z]+/)){return'variable-2'};if(t.match(/^\\[$&%#{}_]/)){return'tag'};if(t.match(/^\\[,;!\/]/)){return'tag'};if(t.match(/^[\^_&]/)){return'tag'};if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/)){return null};if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/)){return'number'};var i=t.next();if(i=='{'||i=='}'||i=='['||i==']'||i=='('||i==')'){return'bracket'};if(i=='%'){t.skipToEnd();return'comment'};return'error'};function c(t,r){var i=t.peek(),a;if(i=='{'||i=='['){a=u(r);a.openBracket(i);t.eat(i);e(r,n);return'bracket'};if(/[ \t\r]/.test(i)){t.eat(i);return null};e(r,n);o(r);return n(t,r)};return{startState:function(){return{cmdState:[],f:n}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=n;t.cmdState.length=0},lineComment:'%'}});t.defineMIME('text/x-stex','stex');t.defineMIME('text/x-latex','stex')}); -/* Include script: q */ +/* Include script: q.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('q',function(e){var o=e.indentUnit,t,s=a(['abs','acos','aj','aj0','all','and','any','asc','asin','asof','atan','attr','avg','avgs','bin','by','ceiling','cols','cor','cos','count','cov','cross','csv','cut','delete','deltas','desc','dev','differ','distinct','div','do','each','ej','enlist','eval','except','exec','exit','exp','fby','fills','first','fkeys','flip','floor','from','get','getenv','group','gtime','hclose','hcount','hdel','hopen','hsym','iasc','idesc','if','ij','in','insert','inter','inv','key','keys','last','like','list','lj','load','log','lower','lsq','ltime','ltrim','mavg','max','maxs','mcount','md5','mdev','med','meta','min','mins','mmax','mmin','mmu','mod','msum','neg','next','not','null','or','over','parse','peach','pj','plist','prd','prds','prev','prior','rand','rank','ratios','raze','read0','read1','reciprocal','reverse','rload','rotate','rsave','rtrim','save','scan','select','set','setenv','show','signum','sin','sqrt','ss','ssr','string','sublist','sum','sums','sv','system','tables','tan','til','trim','txf','type','uj','ungroup','union','update','upper','upsert','value','var','view','views','vs','wavg','where','where','while','within','wj','wj1','wsum','xasc','xbar','xcol','xcols','xdesc','xexp','xgroup','xkey','xlog','xprev','xrank']),c=/[|/&^!+:\\\-*%$=~#;@><,?_'"\[\(\]\)\s{}]/;function a(e){return new RegExp('^('+e.join('|')+')$')};function n(e,i){var a=e.sol(),r=e.next();t=null;if(a)if(r=='/')return(i.tokenize=l)(e,i);else if(r=='\\'){if(e.eol()||/\s/.test(e.peek()))return e.skipToEnd(),/^\\\s*$/.test(e.current())?(i.tokenize=d)(e):i.tokenize=n,'comment';else return i.tokenize=n,'builtin'};if(/\s/.test(r))return e.peek()=='/'?(e.skipToEnd(),'comment'):'whitespace';if(r=='"')return(i.tokenize=f)(e,i);if(r=='`')return e.eatWhile(/[A-Za-z\d_:\/.]/),'symbol';if(('.'==r&&/\d/.test(e.peek()))||/\d/.test(r)){var o=null;e.backUp(1);if(e.match(/^\d{4}\.\d{2}(m|\.\d{2}([DT](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/)||e.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/)||e.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/)||e.match(/^\d+[ptuv]{1}/))o='temporal';else if(e.match(/^0[NwW]{1}/)||e.match(/^0x[\da-fA-F]*/)||e.match(/^[01]+[b]{1}/)||e.match(/^\d+[chijn]{1}/)||e.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/))o='number';return(o&&(!(r=e.peek())||c.test(r)))?o:(e.next(),'error')};if(/[A-Za-z]|\./.test(r))return e.eatWhile(/[A-Za-z._\d]/),s.test(e.current())?'keyword':'variable';if(/[|/&^!+:\\\-*%$=~#;@><\.,?_']/.test(r))return null;if(/[{}\(\[\]\)]/.test(r))return null;return'error'};function l(e,t){return e.skipToEnd(),/\/\s*$/.test(e.current())?(t.tokenize=u)(e,t):(t.tokenize=n),'comment'};function u(e,t){var i=e.sol()&&e.peek()=='\\';e.skipToEnd();if(i&&/^\\\s*$/.test(e.current()))t.tokenize=n;return'comment'};function d(e){return e.skipToEnd(),'comment'};function f(e,t){var i=!1,r,o=!1;while((r=e.next())){if(r=='"'&&!i){o=!0;break};i=!i&&r=='\\'};if(o)t.tokenize=n;return'string'};function i(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}};function r(e){e.indent=e.context.indent;e.context=e.context.prev};return{startState:function(){return{tokenize:n,context:null,indent:0,col:0}},token:function(n,e){if(n.sol()){if(e.context&&e.context.align==null)e.context.align=!1;e.indent=n.indentation()};var o=e.tokenize(n,e);if(o!='comment'&&e.context&&e.context.align==null&&e.context.type!='pattern'){e.context.align=!0};if(t=='(')i(e,')',n.column());else if(t=='[')i(e,']',n.column());else if(t=='{')i(e,'}',n.column());else if(/[\]\}\)]/.test(t)){while(e.context&&e.context.type=='pattern')r(e);if(e.context&&t==e.context.type)r(e)} else if(t=='.'&&e.context&&e.context.type=='pattern')r(e);else if(/atom|string|variable/.test(o)&&e.context){if(/[\}\]]/.test(e.context.type))i(e,'pattern',n.column());else if(e.context.type=='pattern'&&!e.context.align){e.context.align=!0;e.context.col=n.column()}};return o},indent:function(e,n){var r=n&&n.charAt(0),t=e.context;if(/[\]\}]/.test(r))while(t&&t.type=='pattern')t=t.prev;var i=t&&r==t.type;if(!t)return 0;else if(t.type=='pattern')return t.col;else if(t.align)return t.col+(i?0:1);else return t.indent+(i?0:o)}}});e.defineMIME('text/x-q','q')}); -/* Include script: htmlembedded */ +/* Include script: htmlembedded.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../htmlmixed/htmlmixed'),require('../../addon/mode/multiplex'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../htmlmixed/htmlmixed','../../addon/mode/multiplex'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('htmlembedded',function(d,i){return e.multiplexingMode(e.getMode(d,'htmlmixed'),{open:i.open||i.scriptStartRegex||'<%',close:i.close||i.scriptEndRegex||'%>',mode:e.getMode(d,i.scriptingModeSpec)})},'htmlmixed');e.defineMIME('application/x-ejs',{name:'htmlembedded',scriptingModeSpec:'javascript'});e.defineMIME('application/x-aspx',{name:'htmlembedded',scriptingModeSpec:'text/x-csharp'});e.defineMIME('application/x-jsp',{name:'htmlembedded',scriptingModeSpec:'text/x-java'});e.defineMIME('application/x-erb',{name:'htmlembedded',scriptingModeSpec:'ruby'})}); -/* Include script: d */ +/* Include script: d.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('d',function(t,n){var a=t.indentUnit,p=n.statementIndentUnit||a,h=n.keywords||{},y=n.builtin||{},u=n.blockKeywords||{},b=n.atoms||{},s=n.hooks||{},v=n.multiLineStrings;var l=/[+\-*&%=<>!?|\/]/,r;function f(e,t){var n=e.next();if(s[n]){var o=s[n](e,t);if(o!==!1)return o};if(n=='"'||n=='\''||n=='`'){t.tokenize=w(n);return t.tokenize(e,t)};if(/[\[\]{}\(\),;\:\.]/.test(n)){r=n;return null};if(/\d/.test(n)){e.eatWhile(/[\w\.]/);return'number'};if(n=='/'){if(e.eat('+')){t.tokenize=d;return d(e,t)};if(e.eat('*')){t.tokenize=c;return c(e,t)};if(e.eat('/')){e.skipToEnd();return'comment'}};if(l.test(n)){e.eatWhile(l);return'operator'};e.eatWhile(/[\w\$_\xa1-\uffff]/);var i=e.current();if(h.propertyIsEnumerable(i)){if(u.propertyIsEnumerable(i))r='newstatement';return'keyword'};if(y.propertyIsEnumerable(i)){if(u.propertyIsEnumerable(i))r='newstatement';return'builtin'};if(b.propertyIsEnumerable(i))return'atom';return'variable'};function w(e){return function(t,n){var r=!1,i,o=!1;while((i=t.next())!=null){if(i==e&&!r){o=!0;break};r=!r&&i=='\\'};if(o||!(r||v))n.tokenize=null;return'string'}};function c(e,t){var r=!1,n;while(n=e.next()){if(n=='/'&&r){t.tokenize=null;break};r=(n=='*')};return'comment'};function d(e,t){var r=!1,n;while(n=e.next()){if(n=='/'&&r){t.tokenize=null;break};r=(n=='+')};return'comment'};function m(e,t,n,r,i){this.indented=e;this.column=t;this.type=n;this.align=r;this.prev=i};function o(e,t,n){var r=e.indented;if(e.context&&e.context.type=='statement')r=e.context.indented;return e.context=new m(r,t,n,null,e.context)};function i(e){var t=e.context.type;if(t==')'||t==']'||t=='}')e.indented=e.context.indented;return e.context=e.context.prev};return{startState:function(e){return{tokenize:null,context:new m((e||0)-a,0,'top',!1),indented:0,startOfLine:!0}},token:function(t,e){var n=e.context;if(t.sol()){if(n.align==null)n.align=!1;e.indented=t.indentation();e.startOfLine=!0};if(t.eatSpace())return null;r=null;var a=(e.tokenize||f)(t,e);if(a=='comment'||a=='meta')return a;if(n.align==null)n.align=!0;if((r==';'||r==':'||r==',')&&n.type=='statement')i(e);else if(r=='{')o(e,t.column(),'}');else if(r=='[')o(e,t.column(),']');else if(r=='(')o(e,t.column(),')');else if(r=='}'){while(n.type=='statement')n=i(e);if(n.type=='}')n=i(e);while(n.type=='statement')n=i(e)} else if(r==n.type)i(e);else if(((n.type=='}'||n.type=='top')&&r!=';')||(n.type=='statement'&&r=='newstatement'))o(e,t.column(),'statement');e.startOfLine=!1;return a},indent:function(t,n){if(t.tokenize!=f&&t.tokenize!=null)return e.Pass;var r=t.context,i=n&&n.charAt(0);if(r.type=='statement'&&i=='}')r=r.prev;var o=i==r.type;if(r.type=='statement')return r.indented+(i=='{'?0:p);else if(r.align)return r.column+(o?0:1);else return r.indented+(o?0:a)},electricChars:'{}'}});function t(e){var n={},r=e.split(' ');for(var t=0;t<r.length;++t)n[r[t]]=!0;return n};var n='body catch class do else enum for foreach foreach_reverse if in interface mixin out scope struct switch try union unittest version while with';e.defineMIME('text/x-d',{name:'d',keywords:t('abstract alias align asm assert auto break case cast cdouble cent cfloat const continue debug default delegate delete deprecated export extern final finally function goto immutable import inout invariant is lazy macro module new nothrow override package pragma private protected public pure ref return shared short static super synchronized template this throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters '+n),blockKeywords:t(n),builtin:t('bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte ucent uint ulong ushort wchar wstring void size_t sizediff_t'),atoms:t('exit failure success true false null'),hooks:{'@':function(e,t){e.eatWhile(/[\w\$_]/);return'meta'}}})}); -/* Include script: protobuf */ +/* Include script: protobuf.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';function i(e){return new RegExp('^(('+e.join(')|(')+'))\\b','i')};var t=['package','message','import','syntax','required','optional','repeated','reserved','default','extensions','packed','bool','bytes','double','enum','float','string','int32','int64','uint32','uint64','sint32','sint64','fixed32','fixed64','sfixed32','sfixed64','option','service','rpc','returns'],n=i(t);e.registerHelper('hintWords','protobuf',t);var r=new RegExp('^[_A-Za-z\xa1-\uffff][_A-Za-z0-9\xa1-\uffff]*');function f(e){if(e.eatSpace())return null;if(e.match('//')){e.skipToEnd();return'comment'};if(e.match(/^[0-9\.+-]/,!1)){if(e.match(/^[+-]?0x[0-9a-fA-F]+/))return'number';if(e.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?/))return'number';if(e.match(/^[+-]?\d+([EeDd][+-]?\d+)?/))return'number'};if(e.match(/^"([^"]|(""))*"/)){return'string'};if(e.match(/^'([^']|(''))*'/)){return'string'};if(e.match(n)){return'keyword'};if(e.match(r)){return'variable'};e.next();return null};e.defineMode('protobuf',function(){return{token:f}});e.defineMIME('text/x-protobuf','protobuf')}); -/* Include script: mscgen */ +/* Include script: mscgen.min.js */ (function(t){if(typeof exports=='object'&&typeof module=='object')t(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],t);else t(CodeMirror)})(function(t){'use strict';var n={mscgen:{'keywords':['msc'],'options':['hscale','width','arcgradient','wordwraparcs'],'constants':['true','false','on','off'],'attributes':['label','idurl','id','url','linecolor','linecolour','textcolor','textcolour','textbgcolor','textbgcolour','arclinecolor','arclinecolour','arctextcolor','arctextcolour','arctextbgcolor','arctextbgcolour','arcskip'],'brackets':['\\{','\\}'],'arcsWords':['note','abox','rbox','box'],'arcsOthers':['\\|\\|\\|','\\.\\.\\.','---','--','<->','==','<<=>>','<=>','\\.\\.','<<>>','::','<:>','->','=>>','=>','>>',':>','<-','<<=','<=','<<','<:','x-','-x'],'singlecomment':['//','#'],'operators':['=']},xu:{'keywords':['msc','xu'],'options':['hscale','width','arcgradient','wordwraparcs','watermark'],'constants':['true','false','on','off','auto'],'attributes':['label','idurl','id','url','linecolor','linecolour','textcolor','textcolour','textbgcolor','textbgcolour','arclinecolor','arclinecolour','arctextcolor','arctextcolour','arctextbgcolor','arctextbgcolour','arcskip'],'brackets':['\\{','\\}'],'arcsWords':['note','abox','rbox','box','alt','else','opt','break','par','seq','strict','neg','critical','ignore','consider','assert','loop','ref','exc'],'arcsOthers':['\\|\\|\\|','\\.\\.\\.','---','--','<->','==','<<=>>','<=>','\\.\\.','<<>>','::','<:>','->','=>>','=>','>>',':>','<-','<<=','<=','<<','<:','x-','-x'],'singlecomment':['//','#'],'operators':['=']},msgenny:{'keywords':null,'options':['hscale','width','arcgradient','wordwraparcs','watermark'],'constants':['true','false','on','off','auto'],'attributes':null,'brackets':['\\{','\\}'],'arcsWords':['note','abox','rbox','box','alt','else','opt','break','par','seq','strict','neg','critical','ignore','consider','assert','loop','ref','exc'],'arcsOthers':['\\|\\|\\|','\\.\\.\\.','---','--','<->','==','<<=>>','<=>','\\.\\.','<<>>','::','<:>','->','=>>','=>','>>',':>','<-','<<=','<=','<<','<:','x-','-x'],'singlecomment':['//','#'],'operators':['=']}};t.defineMode('mscgen',function(t,r){var e=n[r&&r.language||'mscgen'];return{startState:o,copyState:i,token:c(e),lineComment:'#',blockCommentStart:'/*',blockCommentEnd:'*/'}});t.defineMIME('text/x-mscgen','mscgen');t.defineMIME('text/x-xu',{name:'mscgen',language:'xu'});t.defineMIME('text/x-msgenny',{name:'mscgen',language:'msgenny'});function e(t){return new RegExp('\\b('+t.join('|')+')\\b','i')};function r(t){return new RegExp('('+t.join('|')+')','i')};function o(){return{inComment:!1,inString:!1,inAttributeList:!1,inScript:!1}};function i(t){return{inComment:t.inComment,inString:t.inString,inAttributeList:t.inAttributeList,inScript:t.inScript}};function c(t){return function(n,o){if(n.match(r(t.brackets),!0,!0)){return'bracket'};if(!o.inComment){if(n.match(/\/\*[^\*\/]*/,!0,!0)){o.inComment=!0;return'comment'};if(n.match(r(t.singlecomment),!0,!0)){n.skipToEnd();return'comment'}};if(o.inComment){if(n.match(/[^\*\/]*\*\//,!0,!0))o.inComment=!1;else n.skipToEnd();return'comment'};if(!o.inString&&n.match(/"(\\"|[^"])*/,!0,!0)){o.inString=!0;return'string'};if(o.inString){if(n.match(/[^"]*"/,!0,!0))o.inString=!1;else n.skipToEnd();return'string'};if(!!t.keywords&&n.match(e(t.keywords),!0,!0))return'keyword';if(n.match(e(t.options),!0,!0))return'keyword';if(n.match(e(t.arcsWords),!0,!0))return'keyword';if(n.match(r(t.arcsOthers),!0,!0))return'keyword';if(!!t.operators&&n.match(r(t.operators),!0,!0))return'operator';if(!!t.constants&&n.match(r(t.constants),!0,!0))return'variable';if(!t.inAttributeList&&!!t.attributes&&n.match(/\[/,!0,!0)){t.inAttributeList=!0;return'bracket'};if(t.inAttributeList){if(t.attributes!==null&&n.match(e(t.attributes),!0,!0)){return'attribute'};if(n.match(/]/,!0,!0)){t.inAttributeList=!1;return'bracket'}};n.next();return'base'}}}); -/* Include script: django */ +/* Include script: django.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../htmlmixed/htmlmixed'),require('../../addon/mode/overlay'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../htmlmixed/htmlmixed','../../addon/mode/overlay'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('django:inner',function(){var i=['block','endblock','for','endfor','true','false','filter','endfilter','loop','none','self','super','if','elif','endif','as','else','import','with','endwith','without','context','ifequal','endifequal','ifnotequal','endifnotequal','extends','include','load','comment','endcomment','empty','url','static','trans','blocktrans','endblocktrans','now','regroup','lorem','ifchanged','endifchanged','firstof','debug','cycle','csrf_token','autoescape','endautoescape','spaceless','endspaceless','ssi','templatetag','verbatim','endverbatim','widthratio'],e=['add','addslashes','capfirst','center','cut','date','default','default_if_none','dictsort','dictsortreversed','divisibleby','escape','escapejs','filesizeformat','first','floatformat','force_escape','get_digit','iriencode','join','last','length','length_is','linebreaks','linebreaksbr','linenumbers','ljust','lower','make_list','phone2numeric','pluralize','pprint','random','removetags','rjust','safe','safeseq','slice','slugify','stringformat','striptags','time','timesince','timeuntil','title','truncatechars','truncatechars_html','truncatewords','truncatewords_html','unordered_list','upper','urlencode','urlize','urlizetrunc','wordcount','wordwrap','yesno'],n=['==','!=','<','>','<=','>='],o=['in','not','or','and'];i=new RegExp('^\\b('+i.join('|')+')\\b');e=new RegExp('^\\b('+e.join('|')+')\\b');n=new RegExp('^\\b('+n.join('|')+')\\b');o=new RegExp('^\\b('+o.join('|')+')\\b');function t(e,t){if(e.match('{{')){t.tokenize=l;return'tag'} else if(e.match('{%')){t.tokenize=a;return'tag'} else if(e.match('{#')){t.tokenize=u;return'comment'} @@ -993,7 +991,7 @@ else{throw Error('Unexpected error while waiting for filter.')}};if(a.waitProper else if(l.match('"')){a.tokenize=r('"',a.tokenize);return'string'};if(l.match(n)){return'operator'};if(l.match(o)){return'keyword'};var u=l.match(i);if(u){if(u[0]=='comment'){a.blockCommentTag=!0};return'keyword'};if(l.match(/\b(\w+)\b/)){a.waitDot=!0;a.waitPipe=!0;return'variable'};if(l.match('%}')){a.waitProperty=null;a.waitFilter=null;a.waitDot=null;a.waitPipe=null;if(a.blockCommentTag){a.blockCommentTag=!1;a.tokenize=f} else{a.tokenize=t};return'tag'};l.next();return'null'};function u(e,r){if(e.match(/^.*?#\}/))r.tokenize=t;else e.skipToEnd();return'comment'};function f(e,t){if(e.match(/\{%\s*endcomment\s*%\}/,!1)){t.tokenize=a;e.match('{%');return'tag'} else{e.next();return'comment'}};return{startState:function(){return{tokenize:t}},token:function(e,t){return t.tokenize(e,t)},blockCommentStart:'{% comment %}',blockCommentEnd:'{% endcomment %}'}});e.defineMode('django',function(t){var r=e.getMode(t,'text/html'),i=e.getMode(t,'django:inner');return e.overlayMode(r,i)});e.defineMIME('text/x-django','django')}); -/* Include script: toml */ +/* Include script: toml.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('toml',function(){return{startState:function(){return{inString:!1,stringType:'',lhs:!0,inArray:0}},token:function(e,t){if(!t.inString&&((e.peek()=='"')||(e.peek()=='\''))){t.stringType=e.peek();e.next();t.inString=!0};if(e.sol()&&t.inArray===0){t.lhs=!0};if(t.inString){while(t.inString&&!e.eol()){if(e.peek()===t.stringType){e.next();t.inString=!1} else if(e.peek()==='\\'){e.next();e.next()} else{e.match(/^.[^\\"']*/)}};return t.lhs?'property string':'string'} @@ -1008,17 +1006,17 @@ else if(!t.lhs&&(e.match('true')||e.match('false'))){return'atom'} else if(!t.lhs&&e.peek()==='['){t.inArray++;e.next();return'bracket'} else if(!t.lhs&&e.match(/^\-?\d+(?:\.\d+)?/)){return'number'} else if(!e.eatSpace()){e.next()};return null}}});e.defineMIME('text/x-toml','toml')}); -/* Include script: yacas */ +/* Include script: yacas.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("yacas",function(t,r){function p(e){var r={},n=e.split(" ");for(var t=0;t<n.length;++t)r[n[t]]=!0;return r};var a=p("Assert BackQuote D Defun Deriv For ForEach FromFile FromString Function Integrate InverseTaylor Limit LocalSymbols Macro MacroRule MacroRulePattern NIntegrate Rule RulePattern Subst TD TExplicitSum TSum Taylor Taylor1 Taylor2 Taylor3 ToFile ToStdout ToString TraceRule Until While"),u="(?:(?:\\.\\d+|\\d+\\.\\d*|\\d+)(?:[eE][+-]?\\d+)?)",n="(?:[a-zA-Z\\$'][a-zA-Z0-9\\$']*)",c=new RegExp(u),l=new RegExp(n),f=new RegExp(n+"?_"+n),s=new RegExp(n+"\\s*\\(");function i(e,t){var r;r=e.next();if(r==="\""){t.tokenize=m;return t.tokenize(e,t)};if(r==="/"){if(e.eat("*")){t.tokenize=d;return t.tokenize(e,t)};if(e.eat("/")){e.skipToEnd();return"comment"}};e.backUp(1);var i=e.match(/^(\w+)\s*\(/,!1);if(i!==null&&a.hasOwnProperty(i[1]))t.scopes.push("bodied");var n=o(t);if(n==="bodied"&&r==="[")t.scopes.pop();if(r==="["||r==="{"||r==="(")t.scopes.push(r);n=o(t);if(n==="["&&r==="]"||n==="{"&&r==="}"||n==="("&&r===")")t.scopes.pop();if(r===";"){while(n==="bodied"){t.scopes.pop();n=o(t)}};if(e.match(/\d+ *#/,!0,!1)){return"qualifier"};if(e.match(c,!0,!1)){return"number"};if(e.match(f,!0,!1)){return"variable-3"};if(e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)){return"bracket"};if(e.match(s,!0,!1)){e.backUp(1);return"variable"};if(e.match(l,!0,!1)){return"variable-2"};if(e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%|#)/,!0,!1)){return"operator"};return"error"};function m(e,t){var n,o=!1,r=!1;while((n=e.next())!=null){if(n==="\""&&!r){o=!0;break};r=!r&&n==="\\"};if(o&&!r){t.tokenize=i};return"string"};function d(e,t){var n,r;while((r=e.next())!=null){if(n==="*"&&r==="/"){t.tokenize=i;break};n=r};return"comment"};function o(e){var t=null;if(e.scopes.length>0)t=e.scopes[e.scopes.length-1];return t};return{startState:function(){return{tokenize:i,scopes:[]}},token:function(e,t){if(e.eatSpace())return null;return t.tokenize(e,t)},indent:function(r,n){if(r.tokenize!==i&&r.tokenize!==null)return e.Pass;var o=0;if(n==="]"||n==="];"||n==="}"||n==="};"||n===");")o=-1;return(r.scopes.length+o)*t.indentUnit},electricChars:"{}[]();",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}});e.defineMIME("text/x-yacas",{name:"yacas"})}); -/* Include script: dockerfile */ +/* Include script: dockerfile.min.js */ -/* Include script: python */ +/* Include script: python.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';function n(e){return new RegExp('^(('+e.join(')|(')+'))\\b')};var o=n(['and','or','not','is']),r=['as','assert','break','class','continue','def','del','elif','else','except','finally','for','from','global','if','import','lambda','pass','raise','return','try','while','with','yield','in'],i=['abs','all','any','bin','bool','bytearray','callable','chr','classmethod','compile','complex','delattr','dict','dir','divmod','enumerate','eval','filter','float','format','frozenset','getattr','globals','hasattr','hash','help','hex','id','input','int','isinstance','issubclass','iter','len','list','locals','map','max','memoryview','min','next','object','oct','open','ord','pow','property','range','repr','reversed','round','set','setattr','slice','sorted','staticmethod','str','sum','super','tuple','type','vars','zip','__import__','NotImplemented','Ellipsis','__debug__'];e.registerHelper('hintWords','python',r.concat(i));function t(e){return e.scopes[e.scopes.length-1]};e.defineMode('python',function(s,a){var c='error',F=a.delimiters||a.singleDelimiters||/^[\(\)\[\]\{\}@,:`=;\.]/,u=[a.singleOperators,a.doubleOperators,a.doubleDelimiters,a.tripleDelimiters,a.operators||/^([-+*/%\/&|^]=?|[<>=]+|\/\/=?|\*\*=?|!=|[~!@])/];for(var d=0;d<u.length;d++)if(!u[d])u.splice(d--,1);var h=a.hangingIndent||s.indentUnit,l=r,f=i;if(a.extra_keywords!=undefined)l=l.concat(a.extra_keywords);if(a.extra_builtins!=undefined)f=f.concat(a.extra_builtins);var y=!(a.version&&Number(a.version)<3);if(y){var p=a.identifiers||/^[_A-Za-z\u00A1-\uFFFF][_A-Za-z0-9\u00A1-\uFFFF]*/;l=l.concat(['nonlocal','False','True','None','async','await']);f=f.concat(['ascii','bytes','exec','print']);var b=new RegExp('^(([rbuf]|(br))?(\'{3}|"{3}|[\'"]))','i')} else{var p=a.identifiers||/^[_A-Za-z][_A-Za-z0-9]*/;l=l.concat(['exec','print']);f=f.concat(['apply','basestring','buffer','cmp','coerce','execfile','file','intern','long','raw_input','reduce','reload','unichr','unicode','xrange','False','True','None']);var b=new RegExp('^(([rubf]|(ur)|(br))?(\'{3}|"{3}|[\'"]))','i')};var w=n(l),z=n(f);function m(e,n){if(e.sol())n.indent=e.indentation();if(e.sol()&&t(n).type=='py'){var r=t(n).offset;if(e.eatSpace()){var a=e.indentation();if(a>r)v(n);else if(a<r&&x(e,n)&&e.peek()!='#')n.errorToken=!0;return null} else{var i=g(e,n);if(r>0&&x(e,n))i+=' '+c;return i}};return g(e,n)};function g(e,t){if(e.eatSpace())return null;var a=e.peek();if(a=='#'){e.skipToEnd();return'comment'};if(e.match(/^[0-9\.]/,!1)){var r=!1;if(e.match(/^[\d_]*\.\d+(e[\+\-]?\d+)?/i)){r=!0};if(e.match(/^[\d_]+\.\d*/)){r=!0};if(e.match(/^\.\d+/)){r=!0};if(r){e.eat(/J/i);return'number'};var n=!1;if(e.match(/^0x[0-9a-f_]+/i))n=!0;if(e.match(/^0b[01_]+/i))n=!0;if(e.match(/^0o[0-7_]+/i))n=!0;if(e.match(/^[1-9][\d_]*(e[\+\-]?[\d_]+)?/)){e.eat(/J/i);n=!0};if(e.match(/^0(?![\dx])/i))n=!0;if(n){e.eat(/L/i);return'number'}};if(e.match(b)){t.tokenize=E(e.current());return t.tokenize(e,t)};for(var i=0;i<u.length;i++)if(e.match(u[i]))return'operator';if(e.match(F))return'punctuation';if(t.lastToken=='.'&&e.match(p))return'property';if(e.match(w)||e.match(o))return'keyword';if(e.match(z))return'builtin';if(e.match(/^(self|cls)\b/))return'variable-2';if(e.match(p)){if(t.lastToken=='def'||t.lastToken=='class')return'def';return'variable'};e.next();return c};function E(e){while('rubf'.indexOf(e.charAt(0).toLowerCase())>=0)e=e.substr(1);var n=e.length==1,t='string';function r(r,i){while(!r.eol()){r.eatWhile(/[^'"\\]/);if(r.eat('\\')){r.next();if(n&&r.eol())return t} else if(r.match(e)){i.tokenize=m;return t} else{r.eat(/['"]/)}};if(n){if(a.singleLineStringErrors)return c;else i.tokenize=m};return t};r.isString=!0;return r};function v(e){while(t(e).type!='py')e.scopes.pop();e.scopes.push({offset:t(e).offset+s.indentUnit,type:'py',align:null})};function T(e,t,n){var r=e.match(/^([\s\[\{\(]|#.*)*$/,!1)?null:e.column()+1;t.scopes.push({offset:t.indent+h,type:n,align:r})};function x(e,n){var r=e.indentation();while(n.scopes.length>1&&t(n).offset>r){if(t(n).type!='py')return!0;n.scopes.pop()};return t(n).offset!=r};function A(n,e){if(n.sol())e.beginningOfLine=!0;var a=e.tokenize(n,e),r=n.current();if(e.beginningOfLine&&r=='@')return n.match(p,!1)?'meta':y?'operator':c;if(/\S/.test(r))e.beginningOfLine=!1;if((a=='variable'||a=='builtin')&&e.lastToken=='meta')a='meta';if(r=='pass'||r=='return')e.dedent+=1;if(r=='lambda')e.lambda=!0;if(r==':'&&!e.lambda&&t(e).type=='py')v(e);var i=r.length==1?'[({'.indexOf(r):-1;if(i!=-1)T(n,e,'])}'.slice(i,i+1));i='])}'.indexOf(r);if(i!=-1){if(t(e).type==r)e.indent=e.scopes.pop().offset-h;else return c};if(e.dedent>0&&n.eol()&&t(e).type=='py'){if(e.scopes.length>1)e.scopes.pop();e.dedent-=1};return a};var k={startState:function(e){return{tokenize:m,scopes:[{offset:e||0,type:'py',align:null}],indent:e||0,lastToken:null,lambda:!1,dedent:0}},token:function(e,t){var r=t.errorToken;if(r)t.errorToken=!1;var n=A(e,t);if(n&&n!='comment')t.lastToken=(n=='keyword'||n=='punctuation')?e.current():n;if(n=='punctuation')n=null;if(e.eol()&&t.lambda)t.lambda=!1;return r?n+' '+c:n},indent:function(n,r){if(n.tokenize!=m)return n.tokenize.isString?e.Pass:0;var i=t(n),a=i.type==r.charAt(0);if(i.align!=null)return i.align-(a?1:0);else return i.offset-(a?h:0)},electricInput:/^\s*[\}\]\)]$/,closeBrackets:{triples:'\'"'},lineComment:'#',fold:'indent'};return k});e.defineMIME('text/x-python','python');var a=function(e){return e.split(' ')};e.defineMIME('text/x-cython',{name:'python',extra_keywords:a('by cdef cimport cpdef ctypedef enum except extern gil include nogil property public readonly struct union DEF IF ELIF ELSE')})}); -/* Include script: vb */ +/* Include script: vb.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("vb",function(n,t){var i="error";function r(e){return new RegExp("^(("+e.join(")|(")+"))\\b","i")};var v=new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"),x=new RegExp("^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]"),g=new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"),w=new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"),I=new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"),y=new RegExp("^[_A-Za-z][_A-Za-z0-9]*"),u=["class","module","sub","enum","select","while","if","function","get","set","property","try"],f=["else","elseif","case","catch"],d=["next","loop"],l=["and","or","not","xor","in"],E=r(l),s=["as","dim","break","continue","optional","then","until","goto","byval","byref","new","handles","property","return","const","private","protected","friend","public","shared","static","true","false"],m=["integer","string","double","decimal","boolean","short","char","float","single"],L=r(s),z=r(m),C="\"",R=r(u),h=r(f),p=r(d),b=r(["end"]),F=r(["do"]),M=null;e.registerHelper("hintWords","vb",u.concat(f).concat(d).concat(l).concat(s).concat(m));function a(e,n){n.currentIndent++};function o(e,n){n.currentIndent--};function c(e,n){if(e.eatSpace()){return null};var c=e.peek();if(c==="'"){e.skipToEnd();return"comment"};if(e.match(/^((&H)|(&O))?[0-9\.a-f]/i,!1)){var r=!1;if(e.match(/^\d*\.\d+F?/i)){r=!0} else if(e.match(/^\d+\.\d*F?/)){r=!0} else if(e.match(/^\.\d+F?/)){r=!0};if(r){e.eat(/J/i);return"number"};var t=!1;if(e.match(/^&H[0-9a-f]+/i)){t=!0} @@ -1028,9 +1026,9 @@ else if(e.match(/^0(?![\dx])/i)){t=!0};if(t){e.eat(/L/i);return"number"}};if(e.m else{o.eat(/['"]/)}};if(r){if(t.singleLineStringErrors){return i} else{a.tokenize=c}};return n}};function T(e,n){var r=n.tokenize(e,n),c=e.current();if(c==="."){r=n.tokenize(e,n);if(r==="variable"){return"variable"} else{return i}};var t="[({".indexOf(c);if(t!==-1){a(e,n)};if(M==="dedent"){if(o(e,n)){return i}};t="])}".indexOf(c);if(t!==-1){if(o(e,n)){return i}};return r};var k={electricChars:"dDpPtTfFeE ",startState:function(){return{tokenize:c,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1}},token:function(e,n){if(e.sol()){n.currentIndent+=n.nextLineIndent;n.nextLineIndent=0;n.doInCurrentLine=0};var t=T(e,n);n.lastToken={style:t,content:e.current()};return t},indent:function(e,t){var r=t.replace(/^\s+|\s+$/g,"");if(r.match(p)||r.match(b)||r.match(h))return n.indentUnit*(e.currentIndent-1);if(e.currentIndent<0)return 0;return e.currentIndent*n.indentUnit},lineComment:"'"};return k});e.defineMIME("text/x-vb","vb")}); -/* Include script: octave */ +/* Include script: octave.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("octave",function(){function n(e){return new RegExp("^(("+e.join(")|(")+"))\\b")};var r=new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"),i=new RegExp("^[\\(\\[\\{\\},:=;]"),o=new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"),f=new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"),a=new RegExp("^((>>=)|(<<=))"),u=new RegExp("^[\\]\\)]"),c=new RegExp("^[_A-Za-z\xa1-\uffff][_A-Za-z0-9\xa1-\uffff]*"),m=n(["error","eval","function","abs","acos","atan","asin","cos","cosh","exp","log","prod","sum","log10","max","min","sign","sin","sinh","sqrt","tan","reshape","break","zeros","default","margin","round","ones","rand","syn","ceil","floor","size","clear","zeros","eye","mean","std","cov","det","eig","inv","norm","rank","trace","expm","logm","sqrtm","linspace","plot","title","xlabel","ylabel","legend","text","grid","meshgrid","mesh","num2str","fft","ifft","arrayfun","cellfun","input","fliplr","flipud","ismember"]),s=n(["return","case","switch","else","elseif","end","endif","endfunction","if","otherwise","do","for","while","try","catch","classdef","properties","events","methods","global","persistent","endfor","endwhile","printf","sprintf","disp","until","continue","pkg"]);function t(n,t){if(!n.sol()&&n.peek()==="'"){n.next();t.tokenize=e;return"operator"};t.tokenize=e;return e(n,t)};function l(n,t){if(n.match(/^.*%}/)){t.tokenize=e;return"comment"};n.skipToEnd();return"comment"};function e(d,p){if(d.eatSpace())return null;if(d.match("%{")){p.tokenize=l;d.skipToEnd();return"comment"};if(d.match(/^[%#]/)){d.skipToEnd();return"comment"};if(d.match(/^[0-9\.+-]/,!1)){if(d.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/)){d.tokenize=e;return"number"};if(d.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/)){return"number"};if(d.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/)){return"number"}};if(d.match(n(["nan","NaN","inf","Inf"]))){return"number"};var h=d.match(/^"(?:[^"]|"")*("|$)/)||d.match(/^'(?:[^']|'')*('|$)/);if(h){return h[1]?"string":"string error"};if(d.match(s)){return"keyword"};if(d.match(m)){return"builtin"};if(d.match(c)){return"variable"};if(d.match(r)||d.match(o)){return"operator"};if(d.match(i)||d.match(f)||d.match(a)){return null};if(d.match(u)){p.tokenize=t;return null};d.next();return"error"};return{startState:function(){return{tokenize:e}},token:function(e,n){var r=n.tokenize(e,n);if(r==="number"||r==="variable"){n.tokenize=t};return r},lineComment:"%",fold:"indent"}});e.defineMIME("text/x-octave","octave")}); -/* Include script: tcl */ +/* Include script: tcl.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('tcl',function(){function a(e){var t={},n=e.split(' ');for(var r=0;r<n.length;++r)t[n[r]]=!0;return t};var t=a('Tcl safe after append array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd close concat continue dde eof encoding error eval exec exit expr fblocked fconfigure fcopy file fileevent filename filename flush for foreach format gets glob global history http if incr info interp join lappend lindex linsert list llength load lrange lreplace lsearch lset lsort memory msgcat namespace open package parray pid pkg::create pkg_mkIndex proc puts pwd re_syntax read regex regexp registry regsub rename resource return scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_wordBreakAfter tcl_startOfPreviousWord tcl_wordBreakBefore tcltest tclvars tell time trace unknown unset update uplevel upvar variable vwait'),n=a('if elseif else and not or eq ne in ni for foreach while switch'),i=/[+\-*&%=<>!?^\/\|]/;function r(e,r,t){r.tokenize=t;return t(e,r)};function e(e,a){var c=a.beforeParams;a.beforeParams=!1;var s=e.next();if((s=='"'||s=='\'')&&a.inParams){return r(e,a,o(s))} else if(/[\[\]{}\(\),;\.]/.test(s)){if(s=='('&&c)a.inParams=!0;else if(s==')')a.inParams=!1;return null} else if(/\d/.test(s)){e.eatWhile(/[\w\.]/);return'number'} @@ -1039,7 +1037,7 @@ else if(s=='"'){e.skipTo(/"/);return'comment'} else if(s=='$'){e.eatWhile(/[$_a-z0-9A-Z\.{:]/);e.eatWhile(/}/);a.beforeParams=!0;return'builtin'} else if(i.test(s)){e.eatWhile(i);return'comment'} else{e.eatWhile(/[\w\$_{}\xa1-\uffff]/);var u=e.current().toLowerCase();if(t&&t.propertyIsEnumerable(u))return'keyword';if(n&&n.propertyIsEnumerable(u)){a.beforeParams=!0;return'keyword'};return null}};function o(r){return function(t,n){var i=!1,a,o=!1;while((a=t.next())!=null){if(a==r&&!i){o=!0;break};i=!i&&a=='\\'};if(o)n.tokenize=e;return'string'}};function l(r,t){var i=!1,n;while(n=r.next()){if(n=='#'&&i){t.tokenize=e;break};i=(n=='*')};return'comment'};function f(r,t){var i=0,n;while(n=r.next()){if(n=='#'&&i==2){t.tokenize=e;break};if(n==']')i++;else if(n!=' ')i=0};return'meta'};return{startState:function(){return{tokenize:e,beforeParams:!1,inParams:!1}},token:function(e,r){if(e.eatSpace())return null;return r.tokenize(e,r)}}});e.defineMIME('text/x-tcl','tcl')}); -/* Include script: clojure */ +/* Include script: clojure.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("clojure",function(t){var f="builtin",u="comment",d="string",p="string-2",r="atom",h="number",c="bracket",m="keyword",y="variable",g=t.indentUnit||2,b=t.indentUnit||2;function n(e){var n={},r=e.split(" ");for(var t=0;t<r.length;++t)n[r[t]]=!0;return n};var i=n("true false nil"),o=n("defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle"),s=n("* *' *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *compiler-options* *data-readers* *e *err* *file* *flush-on-newline* *fn-loader* *in* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* + +' - -' -> ->> ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods .. / < <= = == > >= EMPTY-NODE accessor aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* bound? butlast byte byte-array bytes case cat cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement completing concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? declare dedupe default-data-readers definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol defrecord defstruct deftype delay delay? deliver denominator deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while eduction empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info extend extend-protocol extend-type extenders extends? false? ffirst file-seq filter filterv find find-keyword find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn fn? fnext fnil for force format frequencies future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash hash-combine hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc inc' init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt keep keep-indexed key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map-indexed map? mapcat mapv max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext nthrest num number? numerator object-array odd? or parents partial partition partition-all partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-dup print-method print-simple print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int rand-nth random-sample range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string realized? reduce reduce-kv reductions ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure reify release-pending-sends rem remove remove-all-methods remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-error-handler! set-error-mode! set-validator! set? short short-array shorts shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync take take-last take-nth take-while test the-ns thread-bound? time to-array to-array-2d trampoline transduce transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive unquote unquote-splicing update update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of vector? volatile! volatile? vreset! vswap! when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision with-redefs with-redefs-fn xml-seq zero? zipmap *default-data-reader-fn* as-> cond-> cond->> reduced reduced? send-via set-agent-send-executor! set-agent-send-off-executor! some-> some->>"),l=n("ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch let letfn binding loop for doseq dotimes when-let if-let defstruct struct-map assoc testing deftest handler-case handle dotrace deftrace"),e={digit:/\d/,digit_or_colon:/[\d:]/,hex:/[0-9a-f]/i,sign:/[+-]/,exponent:/e/i,keyword_char:/[^\s\(\[\;\)\]]/,symbol:/[\w*+!\-\._?:<>\/\xa1-\uffff]/,block_indent:/^(?:def|with)[^\/]+$|\/(?:def|with)/};function k(e,t,n){this.indent=e;this.type=t;this.prev=n};function a(e,t,n){e.indentStack=new k(t,n,e.indentStack)};function v(e){e.indentStack=e.indentStack.prev};function w(n,t){if(n==="0"&&t.eat(/x/i)){t.eatWhile(e.hex);return!0};if((n=="+"||n=="-")&&(e.digit.test(t.peek()))){t.eat(e.sign);n=t.next()};if(e.digit.test(n)){t.eat(n);t.eatWhile(e.digit);if("."==t.peek()){t.eat(".");t.eatWhile(e.digit)} else if("/"==t.peek()){t.eat("/");t.eatWhile(e.digit)};if(t.eat(e.exponent)){t.eat(e.sign);t.eatWhile(e.digit)};return!0};return!1};function x(e){var t=e.next();if(t&&t.match(/[a-z]/)&&e.match(/[a-z]+/,!0)){return};if(t==="u"){e.match(/[0-9a-z]{4}/i,!0)}};return{startState:function(){return{indentStack:null,indentation:0,mode:!1}},token:function(t,k){if(k.indentStack==null&&t.sol()){k.indentation=t.indentation()};if(k.mode!="string"&&t.eatSpace()){return null};var q=null;switch(k.mode){case"string":var E,z=!1;while((E=t.next())!=null){if(E=="\""&&!z){k.mode=!1;break};z=!z&&E=="\\"};q=d;break;default:var n=t.next();if(n=="\""){k.mode="string";q=d} else if(n=="\\"){x(t);q=p} @@ -1055,7 +1053,7 @@ else{t.eatWhile(e.symbol);if(o&&o.propertyIsEnumerable(t.current())){q=m} else if(s&&s.propertyIsEnumerable(t.current())){q=f} else if(i&&i.propertyIsEnumerable(t.current())){q=r} else{q=y}}};return q},indent:function(e){if(e.indentStack==null)return e.indentation;return e.indentStack.indent},closeBrackets:{pairs:"()[]{}\"\""},lineComment:";;"}});e.defineMIME("text/x-clojure","clojure");e.defineMIME("text/x-clojurescript","clojure");e.defineMIME("application/edn","clojure")}); -/* Include script: sass */ +/* Include script: sass.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../css/css'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../css/css'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('sass',function(r){var f=e.mimeModes['text/css'],u=f.propertyKeywords||{},x=f.colorKeywords||{},y=f.valueKeywords||{},v=f.fontProperties||{};function z(e){return new RegExp('^'+e.join('|'))};var d=['true','false','null','auto'],a=new RegExp('^'+d.join('|')),k=['\\(','\\)','=','>','<','==','>=','<=','\\+','-','\\!=','/','\\*','%','and','or','not',';','\\{','\\}',':'],c=z(k),w=/^::?[a-zA-Z_][\w\-]*/,n;function t(e){return!e.peek()||e.match(/\s+$/,!1)};function l(e,r){var t=e.peek();if(t===')'){e.next();r.tokenizer=o;return'operator'} else if(t==='('){e.next();e.eatSpace();return'operator'} else if(t==='\''||t==='"'){r.tokenizer=s(e.next());return'string'} @@ -1074,10 +1072,10 @@ else{if(f==='#'){e.next();if(e.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)){if(t(e)){ else if(x.hasOwnProperty(n)){return'keyword'} else if(u.hasOwnProperty(n)){r.prevProp=e.current().toLowerCase();return'property'} else{return'tag'}};if(t(e)){r.cursorHalf=0;return null}};if(e.match(c))return'operator';e.next();return null};function g(e,t){if(e.sol())t.indentCount=0;var u=t.tokenizer(e,t),i=e.current();if(i==='@return'||i==='}'){m(t)};if(u!==null){var s=e.pos-i.length,a=s+(r.indentUnit*t.indentCount),f=[];for(var n=0;n<t.scopes.length;n++){var o=t.scopes[n];if(o.offset<=a)f.push(o)};t.scopes=f};return u};return{startState:function(){return{tokenizer:o,scopes:[{offset:0,type:'sass'}],indentCount:0,cursorHalf:0,definedVars:[],definedMixins:[]}},token:function(e,r){var t=g(e,r);r.lastToken={style:t,content:e.current()};return t},indent:function(e){return e.scopes[0].offset}}},'css');e.defineMIME('text/x-sass','sass')}); -/* Include script: gas */ +/* Include script: gas.min.js */ (function(i){if(typeof exports=='object'&&typeof module=='object')i(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],i);else i(CodeMirror)})(function(i){'use strict';i.defineMode('gas',function(t,l){'use strict';var r=[],e='',b={'.abort':'builtin','.align':'builtin','.altmacro':'builtin','.ascii':'builtin','.asciz':'builtin','.balign':'builtin','.balignw':'builtin','.balignl':'builtin','.bundle_align_mode':'builtin','.bundle_lock':'builtin','.bundle_unlock':'builtin','.byte':'builtin','.cfi_startproc':'builtin','.comm':'builtin','.data':'builtin','.def':'builtin','.desc':'builtin','.dim':'builtin','.double':'builtin','.eject':'builtin','.else':'builtin','.elseif':'builtin','.end':'builtin','.endef':'builtin','.endfunc':'builtin','.endif':'builtin','.equ':'builtin','.equiv':'builtin','.eqv':'builtin','.err':'builtin','.error':'builtin','.exitm':'builtin','.extern':'builtin','.fail':'builtin','.file':'builtin','.fill':'builtin','.float':'builtin','.func':'builtin','.global':'builtin','.gnu_attribute':'builtin','.hidden':'builtin','.hword':'builtin','.ident':'builtin','.if':'builtin','.incbin':'builtin','.include':'builtin','.int':'builtin','.internal':'builtin','.irp':'builtin','.irpc':'builtin','.lcomm':'builtin','.lflags':'builtin','.line':'builtin','.linkonce':'builtin','.list':'builtin','.ln':'builtin','.loc':'builtin','.loc_mark_labels':'builtin','.local':'builtin','.long':'builtin','.macro':'builtin','.mri':'builtin','.noaltmacro':'builtin','.nolist':'builtin','.octa':'builtin','.offset':'builtin','.org':'builtin','.p2align':'builtin','.popsection':'builtin','.previous':'builtin','.print':'builtin','.protected':'builtin','.psize':'builtin','.purgem':'builtin','.pushsection':'builtin','.quad':'builtin','.reloc':'builtin','.rept':'builtin','.sbttl':'builtin','.scl':'builtin','.section':'builtin','.set':'builtin','.short':'builtin','.single':'builtin','.size':'builtin','.skip':'builtin','.sleb128':'builtin','.space':'builtin','.stab':'builtin','.string':'builtin','.struct':'builtin','.subsection':'builtin','.symver':'builtin','.tag':'builtin','.text':'builtin','.title':'builtin','.type':'builtin','.uleb128':'builtin','.val':'builtin','.version':'builtin','.vtable_entry':'builtin','.vtable_inherit':'builtin','.warning':'builtin','.weak':'builtin','.weakref':'builtin','.word':'builtin'};var i={};function a(t){e='#';i.ax='variable';i.eax='variable-2';i.rax='variable-3';i.bx='variable';i.ebx='variable-2';i.rbx='variable-3';i.cx='variable';i.ecx='variable-2';i.rcx='variable-3';i.dx='variable';i.edx='variable-2';i.rdx='variable-3';i.si='variable';i.esi='variable-2';i.rsi='variable-3';i.di='variable';i.edi='variable-2';i.rdi='variable-3';i.sp='variable';i.esp='variable-2';i.rsp='variable-3';i.bp='variable';i.ebp='variable-2';i.rbp='variable-3';i.ip='variable';i.eip='variable-2';i.rip='variable-3';i.cs='keyword';i.ds='keyword';i.ss='keyword';i.es='keyword';i.fs='keyword';i.gs='keyword'};function o(t){e='@';b.syntax='builtin';i.r0='variable';i.r1='variable';i.r2='variable';i.r3='variable';i.r4='variable';i.r5='variable';i.r6='variable';i.r7='variable';i.r8='variable';i.r9='variable';i.r10='variable';i.r11='variable';i.r12='variable';i.sp='variable-2';i.lr='variable-2';i.pc='variable-2';i.r13=i.sp;i.r14=i.lr;i.r15=i.pc;r.push(function(i,t){if(i==='#'){t.eatWhile(/\w/);return'number'}})};var n=(l.architecture||'x86').toLowerCase();if(n==='x86'){a(l)} else if(n==='arm'||n==='armv6'){o(l)};function s(i,t){var l=!1,e;while((e=i.next())!=null){if(e===t&&!l){return!1};l=!l&&e==='\\'};return l};function u(i,t){var e=!1,l;while((l=i.next())!=null){if(l==='/'&&e){t.tokenize=null;break};e=(l==='*')};return'comment'};return{startState:function(){return{tokenize:null}},token:function(t,n){if(n.tokenize){return n.tokenize(t,n)};if(t.eatSpace()){return null};var a,o,l=t.next();if(l==='/'){if(t.eat('*')){n.tokenize=u;return u(t,n)}};if(l===e){t.skipToEnd();return'comment'};if(l==='"'){s(t,'"');return'string'};if(l==='.'){t.eatWhile(/\w/);o=t.current().toLowerCase();a=b[o];return a||null};if(l==='='){t.eatWhile(/\w/);return'tag'};if(l==='{'){return'braket'};if(l==='}'){return'braket'};if(/\d/.test(l)){if(l==='0'&&t.eat('x')){t.eatWhile(/[0-9a-fA-F]/);return'number'};t.eatWhile(/\d/);return'number'};if(/\w/.test(l)){t.eatWhile(/\w/);if(t.eat(':')){return'tag'};o=t.current().toLowerCase();a=i[o];return a||null};for(var c=0;c<r.length;c++){a=r[c](l,t,n);if(a){return a}}},lineComment:e,blockCommentStart:'/*',blockCommentEnd:'*/'}})}); -/* Include script: sas */ +/* Include script: sas.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('sas',function(){var e={};var n={eq:'operator',lt:'operator',le:'operator',gt:'operator',ge:'operator','in':'operator',ne:'operator',or:'operator'};var r=/(<=|>=|!=|<>)/,s=/[=\(:\),{}.*<>+\-\/^\[\]]/;function t(t,n,s){if(s){var o=n.split(' ');for(var r=0;r<o.length;r++){e[o[r]]={style:t,state:s}}}};t('def','stack pgm view source debug nesting nolist',['inDataStep']);t('def','if while until for do do; end end; then else cancel',['inDataStep']);t('def','label format _n_ _error_',['inDataStep']);t('def','ALTER BUFNO BUFSIZE CNTLLEV COMPRESS DLDMGACTION ENCRYPT ENCRYPTKEY EXTENDOBSCOUNTER GENMAX GENNUM INDEX LABEL OBSBUF OUTREP PW PWREQ READ REPEMPTY REPLACE REUSE ROLE SORTEDBY SPILL TOBSNO TYPE WRITE FILECLOSE FIRSTOBS IN OBS POINTOBS WHERE WHEREUP IDXNAME IDXWHERE DROP KEEP RENAME',['inDataStep']);t('def','filevar finfo finv fipname fipnamel fipstate first firstobs floor',['inDataStep']);t('def','varfmt varinfmt varlabel varlen varname varnum varray varrayx vartype verify vformat vformatd vformatdx vformatn vformatnx vformatw vformatwx vformatx vinarray vinarrayx vinformat vinformatd vinformatdx vinformatn vinformatnx vinformatw vinformatwx vinformatx vlabel vlabelx vlength vlengthx vname vnamex vnferr vtype vtypex weekday',['inDataStep']);t('def','zipfips zipname zipnamel zipstate',['inDataStep']);t('def','put putc putn',['inDataStep']);t('builtin','data run',['inDataStep']);t('def','data',['inProc']);t('def','%if %end %end; %else %else; %do %do; %then',['inMacro']);t('builtin','proc run; quit; libname filename %macro %mend option options',['ALL']);t('def','footnote title libname ods',['ALL']);t('def','%let %put %global %sysfunc %eval ',['ALL']);t('variable','&sysbuffr &syscc &syscharwidth &syscmd &sysdate &sysdate9 &sysday &sysdevic &sysdmg &sysdsn &sysencoding &sysenv &syserr &syserrortext &sysfilrc &syshostname &sysindex &sysinfo &sysjobid &syslast &syslckrc &syslibrc &syslogapplname &sysmacroname &sysmenv &sysmsg &sysncpu &sysodspath &sysparm &syspbuff &sysprocessid &sysprocessname &sysprocname &sysrc &sysscp &sysscpl &sysscpl &syssite &sysstartid &sysstartname &systcpiphostname &systime &sysuserid &sysver &sysvlong &sysvlong4 &syswarningtext',['ALL']);t('def','source2 nosource2 page pageno pagesize',['ALL']);t('def','_all_ _character_ _cmd_ _freq_ _i_ _infile_ _last_ _msg_ _null_ _numeric_ _temporary_ _type_ abort abs addr adjrsq airy alpha alter altlog altprint and arcos array arsin as atan attrc attrib attrn authserver autoexec awscontrol awsdef awsmenu awsmenumerge awstitle backward band base betainv between blocksize blshift bnot bor brshift bufno bufsize bxor by byerr byline byte calculated call cards cards4 catcache cbufno cdf ceil center cexist change chisq cinv class cleanup close cnonct cntllev coalesce codegen col collate collin column comamid comaux1 comaux2 comdef compbl compound compress config continue convert cos cosh cpuid create cross crosstab css curobs cv daccdb daccdbsl daccsl daccsyd dacctab dairy datalines datalines4 datejul datepart datetime day dbcslang dbcstype dclose ddm delete delimiter depdb depdbsl depsl depsyd deptab dequote descending descript design= device dflang dhms dif digamma dim dinfo display distinct dkricond dkrocond dlm dnum do dopen doptname doptnum dread drop dropnote dsname dsnferr echo else emaildlg emailid emailpw emailserver emailsys encrypt end endsas engine eof eov erf erfc error errorcheck errors exist exp fappend fclose fcol fdelete feedback fetch fetchobs fexist fget file fileclose fileexist filefmt filename fileref fmterr fmtsearch fnonct fnote font fontalias fopen foptname foptnum force formatted formchar formdelim formdlim forward fpoint fpos fput fread frewind frlen from fsep fuzz fwrite gaminv gamma getoption getvarc getvarn go goto group gwindow hbar hbound helpenv helploc hms honorappearance hosthelp hostprint hour hpct html hvar ibessel ibr id if index indexc indexw initcmd initstmt inner input inputc inputn inr insert int intck intnx into intrr invaliddata irr is jbessel join juldate keep kentb kurtosis label lag last lbound leave left length levels lgamma lib library libref line linesize link list log log10 log2 logpdf logpmf logsdf lostcard lowcase lrecl ls macro macrogen maps mautosource max maxdec maxr mdy mean measures median memtype merge merror min minute missing missover mlogic mod mode model modify month mopen mort mprint mrecall msglevel msymtabmax mvarsize myy n nest netpv new news nmiss no nobatch nobs nocaps nocardimage nocenter nocharcode nocmdmac nocol nocum nodate nodbcs nodetails nodmr nodms nodmsbatch nodup nodupkey noduplicates noechoauto noequals noerrorabend noexitwindows nofullstimer noicon noimplmac noint nolist noloadlist nomiss nomlogic nomprint nomrecall nomsgcase nomstored nomultenvappl nonotes nonumber noobs noovp nopad nopercent noprint noprintinit normal norow norsasuser nosetinit nosplash nosymbolgen note notes notitle notitles notsorted noverbose noxsync noxwait npv null number numkeys nummousekeys nway obs on open order ordinal otherwise out outer outp= output over ovp p(1 5 10 25 50 75 90 95 99) pad pad2 paired parm parmcards path pathdll pathname pdf peek peekc pfkey pmf point poisson poke position printer probbeta probbnml probchi probf probgam probhypr probit probnegb probnorm probsig probt procleave prt ps pw pwreq qtr quote r ranbin rancau ranexp rangam range ranks rannor ranpoi rantbl rantri ranuni read recfm register regr remote remove rename repeat replace resolve retain return reuse reverse rewind right round rsquare rtf rtrace rtraceloc s s2 samploc sasautos sascontrol sasfrscr sasmsg sasmstore sasscript sasuser saving scan sdf second select selection separated seq serror set setcomm setot sign simple sin sinh siteinfo skewness skip sle sls sortedby sortpgm sortseq sortsize soundex spedis splashlocation split spool sqrt start std stderr stdin stfips stimer stname stnamel stop stopover subgroup subpopn substr sum sumwgt symbol symbolgen symget symput sysget sysin sysleave sysmsg sysparm sysprint sysprintfont sysprod sysrc system t table tables tan tanh tapeclose tbufsize terminal test then timepart tinv tnonct to today tol tooldef totper transformout translate trantab tranwrd trigamma trim trimn trunc truncover type unformatted uniform union until upcase update user usericon uss validate value var weight when where while wincharset window work workinit workterm write wsum xsync xwait yearcutoff yes yyq min max',['inDataStep','inProc']);t('operator','and not ',['inDataStep','inProc']);function o(t,a){var i=t.next();if(i==='/'&&t.eat('*')){a.continueComment=!0;return'comment'} else if(a.continueComment===!0){if(i==='*'&&t.peek()==='/'){t.next();a.continueComment=!1} else if(t.skipTo('*')){t.skipTo('*');t.next();if(t.eat('/'))a.continueComment=!1} @@ -1091,7 +1089,7 @@ else if(r.test(i+t.peek())){t.next();return'operator'} else if(n.hasOwnProperty(c)){t.next();if(t.peek()===' ')return n[c.toLowerCase()]} else if(s.test(i)){return'operator'};var o;if(t.match(/[%&;\w]+/,!1)!=null){o=i+t.match(/[%&;\w]+/,!0);if(/&/.test(o))return'variable'} else{o=i};if(a.nextword){t.match(/[\w]+/);if(t.peek()==='.')t.skipTo(' ');a.nextword=!1;return'variable-2'};o=o.toLowerCase();if(a.inDataStep){if(o==='run;'||t.match(/run\s;/)){a.inDataStep=!1;return'builtin'};if((o)&&t.next()==='.'){if(/\w/.test(t.peek()))return'variable-2';else return'variable'};if(o&&e.hasOwnProperty(o)&&(e[o].state.indexOf('inDataStep')!==-1||e[o].state.indexOf('ALL')!==-1)){if(t.start<t.pos)t.backUp(t.pos-t.start);for(var l=0;l<o.length;++l)t.next();return e[o].style}};if(a.inProc){if(o==='run;'||o==='quit;'){a.inProc=!1;return'builtin'};if(o&&e.hasOwnProperty(o)&&(e[o].state.indexOf('inProc')!==-1||e[o].state.indexOf('ALL')!==-1)){t.match(/[\w]+/);return e[o].style}};if(a.inMacro){if(o==='%mend'){if(t.peek()===';')t.next();a.inMacro=!1;return'builtin'};if(o&&e.hasOwnProperty(o)&&(e[o].state.indexOf('inMacro')!==-1||e[o].state.indexOf('ALL')!==-1)){t.match(/[\w]+/);return e[o].style};return'atom'};if(o&&e.hasOwnProperty(o)){t.backUp(1);t.match(/[\w]+/);if(o==='data'&&/=/.test(t.peek())===!1){a.inDataStep=!0;a.nextword=!0;return'builtin'};if(o==='proc'){a.inProc=!0;a.nextword=!0;return'builtin'};if(o==='%macro'){a.inMacro=!0;a.nextword=!0;return'builtin'};if(/title[1-9]/.test(o))return'def';if(o==='footnote'){t.eat(/[1-9]/);return'def'};if(a.inDataStep===!0&&e[o].state.indexOf('inDataStep')!==-1)return e[o].style;if(a.inProc===!0&&e[o].state.indexOf('inProc')!==-1)return e[o].style;if(a.inMacro===!0&&e[o].state.indexOf('inMacro')!==-1)return e[o].style;if(e[o].state.indexOf('ALL')!==-1)return e[o].style;return null};return null};return{startState:function(){return{inDataStep:!1,inProc:!1,inMacro:!1,nextword:!1,continueString:null,continueComment:!1}},token:function(e,t){if(e.eatSpace())return null;return o(e,t)},blockCommentStart:'/*',blockCommentEnd:'*/'}});e.defineMIME('text/x-sas','sas')}); -/* Include script: julia */ +/* Include script: julia.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('julia',function(e,t){function i(e,t){if(typeof t==='undefined'){t='\\b'};return new RegExp('^(('+e.join(')|(')+'))'+t)};var u='\\\\[0-7]{1,3}',s='\\\\x[A-Fa-f0-9]{1,2}',c='\\\\[abefnrtv0%?\'"\\\\]',l='([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])',m=t.operators||i(['[<>]:','[<>=]=','<<=?','>>>?=?','=>','->','\\/\\/','[\\\\%*+\\-<>!=\\/^|&\\u00F7\\u22BB]=?','\\?','\\$','~',':','\\u00D7','\\u2208','\\u2209','\\u220B','\\u220C','\\u2218','\\u221A','\\u221B','\\u2229','\\u222A','\\u2260','\\u2264','\\u2265','\\u2286','\\u2288','\\u228A','\\u22C5','\\b(in|isa)\\b(?!\.?\\()'],''),h=t.delimiters||/^[;,()[\]{}]/,p=t.identifiers||/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,d=i([u,s,c,l],'\''),v=i(['begin','function','type','struct','immutable','let','macro','for','while','quote','if','else','elseif','try','finally','catch','do']),k=i(['end','else','elseif','catch','finally']),b=i(['if','else','elseif','while','for','begin','let','end','do','try','catch','finally','return','break','continue','global','local','const','export','import','importall','using','function','where','macro','module','baremodule','struct','type','mutable','immutable','quote','typealias','abstract','primitive','bitstype']),F=i(['true','false','nothing','NaN','Inf']),g=/^@[_A-Za-z][\w]*/,x=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,z=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/;function a(e){return o(e,'[')};function o(e,t){var n=r(e),i=r(e,1);if(typeof(t)==='undefined'){t='('};if(n===t||(i===t&&n==='for')){return!0};return!1};function r(e,t){if(typeof(t)==='undefined'){t=0};if(e.scopes.length<=t){return null};return e.scopes[e.scopes.length-(t+1)]};function n(e,t){if(e.match(/^#=/,!1)){t.tokenize=E;return t.tokenize(e,t)};var f=t.leavingExpr;if(e.sol()){f=!1};t.leavingExpr=!1;if(f){if(e.match(/^'+/)){return'operator'}};if(e.match(/\.{4,}/)){return'error'} else if(e.match(/\.{1,3}/)){return'operator'};if(e.eatSpace()){return null};var i=e.peek();if(i==='#'){e.skipToEnd();return'comment'};if(i==='['){t.scopes.push('[')};if(i==='('){t.scopes.push('(')};var s=r(t);if(a(t)&&i===']'){if(s==='for'){t.scopes.pop()};t.scopes.pop();t.leavingExpr=!0};if(o(t)&&i===')'){if(s==='for'){t.scopes.pop()};t.scopes.pop();t.leavingExpr=!0};if(a(t)){if(t.lastToken=='end'&&e.match(/^:/)){return'operator'};if(e.match(/^end/)){return'number'}};var u;if(u=e.match(v,!1)){t.scopes.push(u[0])};if(e.match(k,!1)){t.scopes.pop()};if(e.match(/^::(?![:\$])/)){t.tokenize=y;return t.tokenize(e,t)};if(!f&&e.match(x)||e.match(/:([<>]:|<<=?|>>>?=?|->|\/\/|\.{2,3}|[\.\\%*+\-<>!\/^|&]=?|[~\?\$])/)){return'builtin'};if(e.match(m)){return'operator'};if(e.match(/^\.?\d/,!1)){var l=RegExp(/^im\b/),n=!1;if(e.match(/^\d*\.(?!\.)\d*([Eef][\+\-]?\d+)?/i)){n=!0};if(e.match(/^\d+\.(?!\.)\d*/)){n=!0};if(e.match(/^\.\d+/)){n=!0};if(e.match(/^0x\.[0-9a-f]+p[\+\-]?\d+/i)){n=!0};if(e.match(/^0x[0-9a-f]+/i)){n=!0};if(e.match(/^0b[01]+/i)){n=!0};if(e.match(/^0o[0-7]+/i)){n=!0};if(e.match(/^[1-9]\d*(e[\+\-]?\d+)?/)){n=!0};if(e.match(/^0(?![\dx])/i)){n=!0};if(n){e.match(l);t.leavingExpr=!0;return'number'}};if(e.match(/^'/)){t.tokenize=P;return t.tokenize(e,t)};if(e.match(z)){t.tokenize=D(e.current());return t.tokenize(e,t)};if(e.match(g)){return'meta'};if(e.match(h)){return null};if(e.match(b)){return'keyword'};if(e.match(F)){return'builtin'};var c=t.isDefinition||t.lastToken=='function'||t.lastToken=='macro'||t.lastToken=='type'||t.lastToken=='struct'||t.lastToken=='immutable';if(e.match(p)){if(c){if(e.peek()==='.'){t.isDefinition=!0;return'variable'};t.isDefinition=!1;return'def'};if(e.match(/^({[^}]*})*\(/,!1)){t.tokenize=A;return t.tokenize(e,t)};t.leavingExpr=!0;return'variable'};e.next();return'error'};function A(t,e){var i=t.match(/^(\(\s*)/);if(i){if(e.firstParenPos<0)e.firstParenPos=e.scopes.length;e.scopes.push('(');e.charsAdvanced+=i[1].length};if(r(e)=='('&&t.match(/^\)/)){e.scopes.pop();e.charsAdvanced+=1;if(e.scopes.length<=e.firstParenPos){var a=t.match(/^(\s*where\s+[^\s=]+)*\s*?=(?!=)/,!1);t.backUp(e.charsAdvanced);e.firstParenPos=-1;e.charsAdvanced=0;e.tokenize=n;if(a)return'def';return'builtin'}};if(t.match(/^$/g,!1)){t.backUp(e.charsAdvanced);while(e.scopes.length>e.firstParenPos)e.scopes.pop();e.firstParenPos=-1;e.charsAdvanced=0;e.tokenize=n;return'builtin'};e.charsAdvanced+=t.match(/^([^()]*)/)[1].length;return e.tokenize(t,e)};function y(e,t){e.match(/.*?(?=,|;|{|}|\(|\)|=|$|\s)/);if(e.match(/^{/)){t.nestedLevels++} else if(e.match(/^}/)){t.nestedLevels--};if(t.nestedLevels>0){e.match(/.*?(?={|})/)||e.next()} @@ -1101,20 +1099,20 @@ else if(a=e.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var i=parseInt(a[1],16);if(i<=1 else if(e.substr(-1)==='"'){e='"'};function t(t,i){if(t.eat('\\')){t.next()} else if(t.match(e)){i.tokenize=n;i.leavingExpr=!0;return'string'} else{t.eat(/[`"]/)};t.eatWhile(/[^\\`"]/);return'string'};return t};var f={startState:function(){return{tokenize:n,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedLevels:0,charsAdvanced:0,firstParenPos:-1}},token:function(e,t){var n=t.tokenize(e,t),i=e.current();if(i&&n){t.lastToken=i};return n},indent:function(n,t){var i=0;if(t===']'||t===')'||t==='end'||t==='else'||t==='catch'||t==='elseif'||t==='finally'){i=-1};return(n.scopes.length+i)*e.indentUnit},electricInput:/\b(end|else|catch|finally)\b/,blockCommentStart:'#=',blockCommentEnd:'=#',lineComment:'#',fold:'indent'};return f});e.defineMIME('text/x-julia','julia')}); -/* Include script: fcl */ +/* Include script: fcl.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('fcl',function(e){var o=e.indentUnit,l={'term':!0,'method':!0,'accu':!0,'rule':!0,'then':!0,'is':!0,'and':!0,'or':!0,'if':!0,'default':!0};var i={'var_input':!0,'var_output':!0,'fuzzify':!0,'defuzzify':!0,'function_block':!0,'ruleblock':!0};var n={'end_ruleblock':!0,'end_defuzzify':!0,'end_function_block':!0,'end_fuzzify':!0,'end_var':!0};var a={'true':!0,'false':!0,'nan':!0,'real':!0,'min':!0,'max':!0,'cog':!0,'cogs':!0};var r=/[+\-*&^%:=<>!|\/]/;function t(e,t){var o=e.next();if(/[\d\.]/.test(o)){if(o=='.'){e.match(/^[0-9]+([eE][\-+]?[0-9]+)?/)} else if(o=='0'){e.match(/^[xX][0-9a-fA-F]+/)||e.match(/^0[0-7]+/)} else{e.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/)};return'number'};if(o=='/'||o=='('){if(e.eat('*')){t.tokenize=u;return u(e,t)};if(e.eat('/')){e.skipToEnd();return'comment'}};if(r.test(o)){e.eatWhile(r);return'operator'};e.eatWhile(/[\w\$_\xa1-\uffff]/);var f=e.current().toLowerCase();if(l.propertyIsEnumerable(f)||i.propertyIsEnumerable(f)||n.propertyIsEnumerable(f)){return'keyword'};if(a.propertyIsEnumerable(f))return'atom';return'variable'};function u(e,n){var i=!1,r;while(r=e.next()){if((r=='/'||r==')')&&i){n.tokenize=t;break};i=(r=='*')};return'comment'};function f(e,n,t,r,i){this.indented=e;this.column=n;this.type=t;this.align=r;this.prev=i};function c(e,n,t){return e.context=new f(e.indented,n,t,null,e.context)};function d(e){if(!e.context.prev)return;var n=e.context.type;if(n=='end_block')e.indented=e.context.indented;return e.context=e.context.prev};return{startState:function(e){return{tokenize:null,context:new f((e||0)-o,0,'top',!1),indented:0,startOfLine:!0}},token:function(e,r){var o=r.context;if(e.sol()){if(o.align==null)o.align=!1;r.indented=e.indentation();r.startOfLine=!0};if(e.eatSpace())return null;var u=(r.tokenize||t)(e,r);if(u=='comment')return u;if(o.align==null)o.align=!0;var f=e.current().toLowerCase();if(i.propertyIsEnumerable(f))c(r,e.column(),'end_block');else if(n.propertyIsEnumerable(f))d(r);r.startOfLine=!1;return u},indent:function(e,r){if(e.tokenize!=t&&e.tokenize!=null)return 0;var i=e.context,u=n.propertyIsEnumerable(r);if(i.align)return i.column+(u?0:1);else return i.indented+(u?0:o)},electricChars:'ryk',fold:'brace',blockCommentStart:'(*',blockCommentEnd:'*)',lineComment:'//'}});e.defineMIME('text/x-fcl','fcl')}); -/* Include script: tornado */ +/* Include script: tornado.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../htmlmixed/htmlmixed'),require('../../addon/mode/overlay'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../htmlmixed/htmlmixed','../../addon/mode/overlay'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('tornado:inner',function(){var e=['and','as','assert','autoescape','block','break','class','comment','context','continue','datetime','def','del','elif','else','end','escape','except','exec','extends','false','finally','for','from','global','if','import','in','include','is','json_encode','lambda','length','linkify','load','module','none','not','or','pass','print','put','raise','raw','return','self','set','squeeze','super','true','try','url_escape','while','with','without','xhtml_escape','yield'];e=new RegExp('^(('+e.join(')|(')+'))\\b');function t(e,t){e.eatWhile(/[^\{]/);var o=e.next();if(o=='{'){if(o=e.eat(/\{|%|#/)){t.tokenize=n(o);return'tag'}}};function n(n){if(n=='{'){n='}'};return function(o,r){var i=o.next();if((i==n)&&o.eat('}')){r.tokenize=t;return'tag'};if(o.match(e)){return'keyword'};return n=='#'?'comment':'string'}};return{startState:function(){return{tokenize:t}},token:function(e,t){return t.tokenize(e,t)}}});e.defineMode('tornado',function(t){var n=e.getMode(t,'text/html'),o=e.getMode(t,'tornado:inner');return e.overlayMode(n,o)});e.defineMIME('text/x-tornado','tornado')}); -/* Include script: asterisk */ +/* Include script: asterisk.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('asterisk',function(){var e=['exten','same','include','ignorepat','switch'],t=['#include','#exec'],i=['addqueuemember','adsiprog','aelsub','agentlogin','agentmonitoroutgoing','agi','alarmreceiver','amd','answer','authenticate','background','backgrounddetect','bridge','busy','callcompletioncancel','callcompletionrequest','celgenuserevent','changemonitor','chanisavail','channelredirect','chanspy','clearhash','confbridge','congestion','continuewhile','controlplayback','dahdiacceptr2call','dahdibarge','dahdiras','dahdiscan','dahdisendcallreroutingfacility','dahdisendkeypadfacility','datetime','dbdel','dbdeltree','deadagi','dial','dictate','directory','disa','dumpchan','eagi','echo','endwhile','exec','execif','execiftime','exitwhile','extenspy','externalivr','festival','flash','followme','forkcdr','getcpeid','gosub','gosubif','goto','gotoif','gotoiftime','hangup','iax2provision','ices','importvar','incomplete','ivrdemo','jabberjoin','jabberleave','jabbersend','jabbersendgroup','jabberstatus','jack','log','macro','macroexclusive','macroexit','macroif','mailboxexists','meetme','meetmeadmin','meetmechanneladmin','meetmecount','milliwatt','minivmaccmess','minivmdelete','minivmgreet','minivmmwi','minivmnotify','minivmrecord','mixmonitor','monitor','morsecode','mp3player','mset','musiconhold','nbscat','nocdr','noop','odbc','odbc','odbcfinish','originate','ospauth','ospfinish','osplookup','ospnext','page','park','parkandannounce','parkedcall','pausemonitor','pausequeuemember','pickup','pickupchan','playback','playtones','privacymanager','proceeding','progress','queue','queuelog','raiseexception','read','readexten','readfile','receivefax','receivefax','receivefax','record','removequeuemember','resetcdr','retrydial','return','ringing','sayalpha','saycountedadj','saycountednoun','saycountpl','saydigits','saynumber','sayphonetic','sayunixtime','senddtmf','sendfax','sendfax','sendfax','sendimage','sendtext','sendurl','set','setamaflags','setcallerpres','setmusiconhold','sipaddheader','sipdtmfmode','sipremoveheader','skel','slastation','slatrunk','sms','softhangup','speechactivategrammar','speechbackground','speechcreate','speechdeactivategrammar','speechdestroy','speechloadgrammar','speechprocessingsound','speechstart','speechunloadgrammar','stackpop','startmusiconhold','stopmixmonitor','stopmonitor','stopmusiconhold','stopplaytones','system','testclient','testserver','transfer','tryexec','trysystem','unpausemonitor','unpausequeuemember','userevent','verbose','vmauthenticate','vmsayname','voicemail','voicemailmain','wait','waitexten','waitfornoise','waitforring','waitforsilence','waitmusiconhold','waituntil','while','zapateller'];function n(i,a){var r='',n=i.next();if(n==';'){i.skipToEnd();return'comment'};if(n=='['){i.skipTo(']');i.eat(']');return'header'};if(n=='"'){i.skipTo('"');return'string'};if(n=='\''){i.skipTo('\'');return'string-2'};if(n=='#'){i.eatWhile(/\w/);r=i.current();if(t.indexOf(r)!==-1){i.skipToEnd();return'strong'}};if(n=='$'){var o=i.peek();if(o=='{'){i.skipTo('}');i.eat('}');return'variable-3'}};i.eatWhile(/\w/);r=i.current();if(e.indexOf(r)!==-1){a.extenStart=!0;switch(r){case'same':a.extenSame=!0;break;case'include':case'switch':case'ignorepat':a.extenInclude=!0;break;default:break};return'atom'}};return{startState:function(){return{extenStart:!1,extenSame:!1,extenInclude:!1,extenExten:!1,extenPriority:!1,extenApplication:!1}},token:function(t,e){var r='';if(t.eatSpace())return null;if(e.extenStart){t.eatWhile(/[^\s]/);r=t.current();if(/^=>?$/.test(r)){e.extenExten=!0;e.extenStart=!1;return'strong'} else{e.extenStart=!1;t.skipToEnd();return'error'}} else if(e.extenExten){e.extenExten=!1;e.extenPriority=!0;t.eatWhile(/[^,]/);if(e.extenInclude){t.skipToEnd();e.extenPriority=!1;e.extenInclude=!1};if(e.extenSame){e.extenPriority=!1;e.extenSame=!1;e.extenApplication=!0};return'tag'} else if(e.extenPriority){e.extenPriority=!1;e.extenApplication=!0;t.next();if(e.extenSame)return null;t.eatWhile(/[^,]/);return'number'} else if(e.extenApplication){t.eatWhile(/,/);r=t.current();if(r===',')return null;t.eatWhile(/\w/);r=t.current().toLowerCase();e.extenApplication=!1;if(i.indexOf(r)!==-1){return'def strong'}} else{return n(t,e)};return null}}});e.defineMIME('text/x-asterisk','asterisk')}); -/* Include script: sql */ +/* Include script: sql.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('sql',function(t,r){'use strict';var c=r.client||{},u=r.atoms||{'false':!0,'true':!0,'null':!0},d=r.builtin||{},m=r.keywords||{},s=r.operatorChars||/^[*+\-%<>!=&|~^]/,a=r.support||{},o=r.hooks||{},p=r.dateSQL||{'date':!0,'time':!0,'timestamp':!0};function i(e,r){var t=e.next();if(o[t]){var l=o[t](e,r);if(l!==!1)return l};if(a.hexNumber&&((t=='0'&&e.match(/^[xX][0-9a-fA-F]+/))||(t=='x'||t=='X')&&e.match(/^'[0-9a-fA-F]+'/))){return'number'} else if(a.binaryNumber&&(((t=='b'||t=='B')&&e.match(/^'[01]+'/))||(t=='0'&&e.match(/^b[01]+/)))){return'number'} else if(t.charCodeAt(0)>47&&t.charCodeAt(0)<58){e.match(/^[0-9]*(\.[0-9]+)?([eE][-+]?[0-9]+)?/);a.decimallessFloat&&e.match(/^\.(?!\.)/);return'number'} @@ -1132,14 +1130,14 @@ else{e.eatWhile(/^[_\w\d]/);var i=e.current().toLowerCase();if(p.hasOwnProperty( else if(e.eat('"')){e.match(/^.*"/);return'variable-2'} else if(e.eat('`')){e.match(/^.*`/);return'variable-2'} else if(e.match(/^[0-9a-zA-Z$\.\_]+/)){return'variable-2'};return null};function n(e){if(e.eat('N')){return'atom'};return e.match(/^[a-zA-Z.#!?]/)?'variable-2':null};var a='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 ';function t(e){var r={},a=e.split(' ');for(var t=0;t<a.length;++t)r[a[t]]=!0;return r};e.defineMIME('text/x-sql',{name:'sql',keywords:t(a+'begin'),builtin:t('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'),atoms:t('false true null unknown'),operatorChars:/^[*+\-%<>!=]/,dateSQL:t('date time timestamp'),support:t('ODBCdotTable doubleQuote binaryNumber hexNumber')});e.defineMIME('text/x-mssql',{name:'sql',client:t('charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee'),keywords:t(a+'begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered declare exec'),builtin:t('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 '),atoms:t('false true null unknown'),operatorChars:/^[*+\-%<>!=]/,dateSQL:t('date datetimeoffset datetime2 smalldatetime datetime time'),hooks:{'@':r}});e.defineMIME('text/x-mysql',{name:'sql',client:t('charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee'),keywords:t(a+'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'),builtin:t('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'),atoms:t('false true null unknown'),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:t('date time timestamp'),support:t('ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired'),hooks:{'@':r,'`':i,'\\':n}});e.defineMIME('text/x-mariadb',{name:'sql',client:t('charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee'),keywords:t(a+'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 groupby_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'),builtin:t('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'),atoms:t('false true null unknown'),operatorChars:/^[*+\-%<>!=&|^]/,dateSQL:t('date time timestamp'),support:t('ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired'),hooks:{'@':r,'`':i,'\\':n}});e.defineMIME('text/x-sqlite',{name:'sql',client:t('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'),keywords:t(a+'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'),builtin:t('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'),atoms:t('null current_date current_time current_timestamp'),operatorChars:/^[*+\-%<>!=&|/~]/,dateSQL:t('date time timestamp datetime'),support:t('decimallessFloat zerolessFloat'),identifierQuote:'"',hooks:{'@':r,':':r,'?':r,'$':r,'"':s,'`':i}});e.defineMIME('text/x-cassandra',{name:'sql',client:{},keywords:t('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'),builtin:t('ascii bigint blob boolean counter decimal double float frozen inet int list map static text timestamp timeuuid tuple uuid varchar varint'),atoms:t('false true infinity NaN'),operatorChars:/^[<>=]/,dateSQL:{},support:t('commentSlashSlash decimallessFloat'),hooks:{}});e.defineMIME('text/x-plsql',{name:'sql',client:t('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'),keywords:t('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'),builtin:t('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'),operatorChars:/^[*+\-%<>!=~]/,dateSQL:t('date time timestamp'),support:t('doubleQuote nCharCast zerolessFloat binaryNumber hexNumber')});e.defineMIME('text/x-hive',{name:'sql',keywords:t('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 false 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 true unarchive undo union uniquejoin unlock update use using utc utc_tmestamp view when where while with'),builtin:t('bool boolean long timestamp tinyint smallint bigint int float double date datetime unsigned string array struct map uniontype'),atoms:t('false true null unknown'),operatorChars:/^[*+\-%<>!=]/,dateSQL:t('date timestamp'),support:t('ODBCdotTable doubleQuote binaryNumber hexNumber')});e.defineMIME('text/x-pgsql',{name:'sql',client:t('source'),keywords:t(a+'a abort abs absent absolute access according action ada add admin after aggregate all allocate also always analyse analyze any are array array_agg array_max_cardinality asensitive assertion assignment asymmetric at atomic attribute attributes authorization avg backward base64 before begin begin_frame begin_partition bernoulli binary bit_length blob blocked bom both breadth c cache call called cardinality cascade cascaded case cast catalog catalog_name ceil ceiling chain characteristics characters character_length character_set_catalog character_set_name character_set_schema char_length check checkpoint class class_origin clob close cluster coalesce cobol collate collation collation_catalog collation_name collation_schema collect column columns column_name command_function command_function_code comment comments commit committed concurrently condition condition_number configuration conflict connect connection connection_name constraint constraints constraint_catalog constraint_name constraint_schema constructor contains content continue control conversion convert copy corr corresponding cost covar_pop covar_samp 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 datetime_interval_code datetime_interval_precision day db deallocate dec declare default defaults deferrable deferred defined definer degree delimiter delimiters dense_rank depth deref derived describe descriptor deterministic diagnostics dictionary disable discard disconnect dispatch dlnewcopy dlpreviouscopy dlurlcomplete dlurlcompleteonly dlurlcompletewrite dlurlpath dlurlpathonly dlurlpathwrite dlurlscheme dlurlserver dlvalue do document domain dynamic dynamic_function dynamic_function_code each element else empty enable encoding encrypted end end-exec end_frame end_partition enforced enum equals escape event every except exception exclude excluding exclusive exec execute exists exp explain expression extension external extract false family fetch file filter final first first_value flag float floor following for force foreign fortran forward found frame_row free freeze fs full function functions fusion g general generated get global go goto grant granted greatest grouping groups handler header hex hierarchy hold hour id identity if ignore ilike immediate immediately immutable implementation implicit import including increment indent index indexes indicator inherit inherits initially inline inner inout input insensitive instance instantiable instead integrity intersect intersection invoker isnull isolation k key key_member key_type label lag language large last last_value lateral lead leading leakproof least left length level library like_regex link listen ln load local localtime localtimestamp location locator lock locked logged lower m map mapping match matched materialized max maxvalue max_cardinality member merge 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 nothing notify notnull nowait nth_value ntile null nullable nullif nulls number object occurrences_regex octets octet_length of off offset oids old only open operator option options 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 percent percentile_cont percentile_disc percent_rank period permission placing plans pli policy portion position position_regex power precedes preceding prepare prepared preserve primary prior privileges procedural procedure program public quote range rank read reads 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 restricted result return returned_cardinality returned_length returned_octet_length returned_sqlstate returning returns revoke right role rollback rollup routine routine_catalog routine_name routine_schema row rows row_count row_number rule savepoint scale schema schema_name scope scope_catalog scope_name scope_schema scroll search second section security selective self sensitive sequence sequences serializable server server_name session session_user setof sets share show similar simple size skip snapshot some source space specific specifictype specific_name sql sqlcode sqlerror sqlexception sqlstate sqlwarning sqrt stable standalone start state statement static statistics stddev_pop stddev_samp stdin stdout storage strict strip structure style subclass_origin submultiset substring substring_regex succeeds sum symmetric sysid system system_time system_user t tables tablesample tablespace table_name temp template temporary then ties timezone_hour timezone_minute to token top_level_count trailing transaction transactions_committed transactions_rolled_back transaction_active 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 unique unknown unlink unlisten unlogged unnamed unnest until untyped upper uri usage 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 varbinary variadic var_pop var_samp verbose version versioning view views volatile when whenever whitespace width_bucket window within work wrapper write xmlagg xmlattributes xmlbinary xmlcast xmlcomment xmlconcat xmldeclaration xmldocument xmlelement xmlexists xmlforest xmliterate xmlnamespaces xmlparse xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltext xmlvalidate year yes loop repeat attach path depends detach zone'),builtin:t('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'),atoms:t('false true null unknown'),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:t('date time timestamp'),support:t('ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast')});e.defineMIME('text/x-gql',{name:'sql',keywords:t('ancestor and asc by contains desc descendant distinct from group has in is limit offset on order select superset where'),atoms:t('false true'),builtin:t('blob datetime first key __key__ string integer double boolean null'),operatorChars:/^[*+\-%<>!=]/});e.defineMIME('text/x-gpsql',{name:'sql',client:t('source'),keywords:t('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'),builtin:t('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'),atoms:t('false true null unknown'),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:t('date time timestamp'),support:t('ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber nCharCast charsetCast')});e.defineMIME('text/x-sparksql',{name:'sql',keywords:t('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 datata dbproperties defined delete delimited 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 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'),builtin:t('tinyint smallint int bigint boolean float double string binary timestamp decimal array map struct uniontype delimited serde sequencefile textfile rcfile inputformat outputformat'),atoms:t('false true null'),operatorChars:/^[*+\-%<>!=~&|^]/,dateSQL:t('date time timestamp'),support:t('ODBCdotTable doubleQuote zerolessFloat')});e.defineMIME('text/x-esper',{name:'sql',client:t('source'),keywords:t('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'),builtin:{},atoms:t('false true null'),operatorChars:/^[*+\-%<>!=&|^\/#@?~]/,dateSQL:t('time'),support:t('decimallessFloat zerolessFloat binaryNumber hexNumber')})}())}); -/* Include script: gfm */ +/* Include script: gfm.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../markdown/markdown'),require('../../addon/mode/overlay'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../markdown/markdown','../../addon/mode/overlay'],e);else e(CodeMirror)})(function(e){'use strict';var t=/^((?:(?:aaas?|about|acap|adiumxtra|af[ps]|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|cap|chrome(?:-extension)?|cid|coap|com-eventbrite-attendee|content|crid|cvs|data|dav|dict|dlna-(?:playcontainer|playsingle)|dns|doi|dtn|dvb|ed2k|facetime|feed|file|finger|fish|ftp|geo|gg|git|gizmoproject|go|gopher|gtalk|h323|hcp|https?|iax|icap|icon|im|imap|info|ipn|ipp|irc[6s]?|iris(?:\.beep|\.lwz|\.xpc|\.xpcs)?|itms|jar|javascript|jms|keyparc|lastfm|ldaps?|magnet|mailto|maps|market|message|mid|mms|ms-help|msnim|msrps?|mtqp|mumble|mupdate|mvn|news|nfs|nih?|nntp|notes|oid|opaquelocktoken|palm|paparazzi|platform|pop|pres|proxy|psyc|query|res(?:ource)?|rmi|rsync|rtmp|rtsp|secondlife|service|session|sftp|sgn|shttp|sieve|sips?|skype|sm[bs]|snmp|soap\.beeps?|soldat|spotify|ssh|steam|svn|tag|teamspeak|tel(?:net)?|tftp|things|thismessage|tip|tn3270|tv|udp|unreal|urn|ut2004|vemmi|ventrilo|view-source|webcal|wss?|wtai|wyciwyg|xcon(?:-userid)?|xfire|xmlrpc\.beeps?|xmpp|xri|ymsgr|z39\.50[rs]?):(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`*!()\[\]{};:'".,<>?«»“”‘’]))/i;e.defineMode('gfm',function(a,n){var r=0;function c(e){e.code=!1;return null};var s={startState:function(){return{code:!1,codeBlock:!1,ateSpace:!1}},copyState:function(e){return{code:e.code,codeBlock:e.codeBlock,ateSpace:e.ateSpace}},token:function(e,a){a.combineTokens=null;if(a.codeBlock){if(e.match(/^```+/)){a.codeBlock=!1;return null};e.skipToEnd();return null};if(e.sol()){a.code=!1};if(e.sol()&&e.match(/^```+/)){e.skipToEnd();a.codeBlock=!0;return null};if(e.peek()==='`'){e.next();var i=e.pos;e.eatWhile('`');var o=1+e.pos-i;if(!a.code){r=o;a.code=!0} else{if(o===r){a.code=!1}};return null} else if(a.code){e.next();return null};if(e.eatSpace()){a.ateSpace=!0;return null};if(e.sol()||a.ateSpace){a.ateSpace=!1;if(n.gitHubSpice!==!1){if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?=.{0,6}\d)(?:[a-f0-9]{7,40}\b)/)){a.combineTokens=!0;return'link'} else if(e.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)){a.combineTokens=!0;return'link'}}};if(e.match(t)&&e.string.slice(e.start-2,e.start)!=']('&&(e.start==0||/\W/.test(e.string.charAt(e.start-1)))){a.combineTokens=!0;return'link'};e.next();return null},blankLine:c};var o={taskLists:!0,strikethrough:!0,emoji:!0};for(var i in n){o[i]=n[i]};o.name='markdown';return e.overlayMode(e.getMode(a,o),s)},'markdown');e.defineMIME('text/x-gfm','gfm')}); -/* Include script: mllike */ +/* Include script: mllike.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('mllike',function(r,e){var o={'let':'keyword','rec':'keyword','in':'keyword','of':'keyword','and':'keyword','if':'keyword','then':'keyword','else':'keyword','for':'keyword','to':'keyword','while':'keyword','do':'keyword','done':'keyword','fun':'keyword','function':'keyword','val':'keyword','type':'keyword','mutable':'keyword','match':'keyword','with':'keyword','try':'keyword','open':'builtin','ignore':'builtin','begin':'keyword','end':'keyword'};var i=e.extraWords||{};for(var t in i){if(i.hasOwnProperty(t)){o[t]=e.extraWords[t]}};function n(r,t){var n=r.next();if(n==='"'){t.tokenize=d;return t.tokenize(r,t)};if(n==='('){if(r.eat('*')){t.commentLevel++;t.tokenize=l;return t.tokenize(r,t)}};if(n==='~'){r.eatWhile(/\w/);return'variable-2'};if(n==='`'){r.eatWhile(/\w/);return'quote'};if(n==='/'&&e.slashComments&&r.eat('/')){r.skipToEnd();return'comment'};if(/\d/.test(n)){r.eatWhile(/[\d]/);if(r.eat('.')){r.eatWhile(/[\d]/)};return'number'};if(/[+\-*&%=<>!?|]/.test(n)){return'operator'};if(/[\w\xa1-\uffff]/.test(n)){r.eatWhile(/[\w\xa1-\uffff]/);var i=r.current();return o.hasOwnProperty(i)?o[i]:'variable'};return null};function d(e,r){var o,i=!1,t=!1;while((o=e.next())!=null){if(o==='"'&&!t){i=!0;break};t=!t&&o==='\\'};if(i&&!t){r.tokenize=n};return'string'};function l(r,e){var o,t;while(e.commentLevel>0&&(t=r.next())!=null){if(o==='('&&t==='*')e.commentLevel++;if(o==='*'&&t===')')e.commentLevel--;o=t};if(e.commentLevel<=0){e.tokenize=n};return'comment'};return{startState:function(){return{tokenize:n,commentLevel:0}},token:function(e,r){if(e.eatSpace())return null;return r.tokenize(e,r)},blockCommentStart:'(*',blockCommentEnd:'*)',lineComment:e.slashComments?'//':null}});e.defineMIME('text/x-ocaml',{name:'mllike',extraWords:{'succ':'keyword','trace':'builtin','exit':'builtin','print_string':'builtin','print_endline':'builtin','true':'atom','false':'atom','raise':'keyword'}});e.defineMIME('text/x-fsharp',{name:'mllike',extraWords:{'abstract':'keyword','as':'keyword','assert':'keyword','base':'keyword','class':'keyword','default':'keyword','delegate':'keyword','downcast':'keyword','downto':'keyword','elif':'keyword','exception':'keyword','extern':'keyword','finally':'keyword','global':'keyword','inherit':'keyword','inline':'keyword','interface':'keyword','internal':'keyword','lazy':'keyword','let!':'keyword','member':'keyword','module':'keyword','namespace':'keyword','new':'keyword','null':'keyword','override':'keyword','private':'keyword','public':'keyword','return':'keyword','return!':'keyword','select':'keyword','static':'keyword','struct':'keyword','upcast':'keyword','use':'keyword','use!':'keyword','val':'keyword','when':'keyword','yield':'keyword','yield!':'keyword','List':'builtin','Seq':'builtin','Map':'builtin','Set':'builtin','int':'builtin','string':'builtin','raise':'builtin','failwith':'builtin','not':'builtin','true':'builtin','false':'builtin'},slashComments:!0})}); -/* Include script: rst */ +/* Include script: rst.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../python/python'),require('../stex/stex'),require('../../addon/mode/overlay'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../python/python','../stex/stex','../../addon/mode/overlay'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('rst',function(t,a){var c=/^\*\*[^\*\s](?:[^\*]*[^\*\s])?\*\*/,n=/^\*[^\*\s](?:[^\*]*[^\*\s])?\*/,r=/^``[^`\s](?:[^`]*[^`\s])``/,m=/^(?:[\d]+(?:[\.,]\d+)*)/,o=/^(?:\s\+[\d]+(?:[\.,]\d+)*)/,s=/^(?:\s\-[\d]+(?:[\.,]\d+)*)/,f='[Hh][Tt][Tt][Pp][Ss]?://',h='(?:[\\d\\w.-]+)\\.(?:\\w{2,6})',p='(?:/[\\d\\w\\#\\%\\&\\-\\.\\,\\/\\:\\=\\?\\~]+)*',i=new RegExp('^'+f+h+p),u={token:function(e){if(e.match(c)&&e.match(/\W+|$/,!1))return'strong';if(e.match(n)&&e.match(/\W+|$/,!1))return'em';if(e.match(r)&&e.match(/\W+|$/,!1))return'string-2';if(e.match(m))return'number';if(e.match(o))return'positive';if(e.match(s))return'negative';if(e.match(i))return'link';while(e.next()!=null){if(e.match(c,!1))break;if(e.match(n,!1))break;if(e.match(r,!1))break;if(e.match(m,!1))break;if(e.match(o,!1))break;if(e.match(s,!1))break;if(e.match(i,!1))break};return null}};var l=e.getMode(t,a.backdrop||'rst-base');return e.overlayMode(l,u,!0)},'python','stex');e.defineMode('rst-base',function(r){function n(e){var t=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,a){return typeof t[a]!='undefined'?t[a]:e})};var b=e.getMode(r,'python'),w=e.getMode(r,'stex'),y='\\s+',m='(?:\\s*|\\W|$)',v=new RegExp(n('^{0}',m)),k='(?:[^\\W\\d_](?:[\\w!"#$%&\'()\\*\\+,\\-\\.\/:;<=>\\?]*[^\\W_])?)',S=new RegExp(n('^{0}',k)),j='(?:[^\\W\\d_](?:[\\w\\s!"#$%&\'()\\*\\+,\\-\\.\/:;<=>\\?]*[^\\W_])?)',o=n('(?:{0}|`{1}`)',k,j),M='(?:[^\\s\\|](?:[^\\|]*[^\\s\\|])?)',g='(?:[^\\`]+)',W=new RegExp(n('^{0}',g)),A=new RegExp('^([!\'#$%&"()*+,-./:;<=>?@\\[\\\\\\]^_`{|}~])\\1{3,}\\s*$'),C=new RegExp(n('^\\.\\.{0}',y)),E=new RegExp(n('^_{0}:{1}|^__:{1}',o,m)),x=new RegExp(n('^{0}::{1}',o,m)),u=new RegExp(n('^\\|{0}\\|{1}{2}::{3}',M,y,o,m)),H=new RegExp(n('^\\[(?:\\d+|#{0}?|\\*)]{1}',o,m)),P=new RegExp(n('^\\[{0}\\]{1}',o,m)),R=new RegExp(n('^\\|{0}\\|',M)),ee=new RegExp(n('^\\[(?:\\d+|#{0}?|\\*)]_',o)),te=new RegExp(n('^\\[{0}\\]_',o)),ae=new RegExp(n('^{0}__?',o)),p=new RegExp(n('^`{0}`_',g)),i=new RegExp(n('^:{0}:`{1}`{2}',k,g,m)),l=new RegExp(n('^`{1}`:{0}:{2}',k,g,m)),d=new RegExp(n('^:{0}:{1}',k,m)),ce=new RegExp(n('^{0}',o)),ne=new RegExp(n('^::{0}',m)),T=new RegExp(n('^\\|{0}\\|',M)),re=new RegExp(n('^{0}',y)),me=new RegExp(n('^{0}',o)),oe=new RegExp(n('^::{0}',m)),se=new RegExp('^_'),ie=new RegExp(n('^{0}|_',o)),le=new RegExp(n('^:{0}',m)),fe=new RegExp('^::\\s*$'),he=new RegExp('^\\s+(?:>>>|In \\[\\d+\\]:)\\s');function a(n,r){var m=null;if(n.sol()&&n.match(he,!1)){t(r,q,{mode:b,local:e.startState(b)})} else if(n.sol()&&n.match(C)){t(r,s);m='meta'} else if(n.sol()&&n.match(A)){t(r,a);m='header'} @@ -1161,9 +1159,9 @@ else if(n.match(P)){t(r,a);m='quote'} else{n.eatSpace();if(n.eol()){t(r,a)} else{n.skipToEnd();t(r,pe);m='comment'}};return m};function pe(e,t){return I(e,t,'comment')};function ue(e,t){return I(e,t,'meta')};function I(e,c,n){if(e.eol()||e.eatSpace()){e.skipToEnd();return n} else{t(c,a);return null}};function q(e,c){if(c.ctx.mode&&c.ctx.local){if(e.sol()){if(!e.eatSpace())t(c,a);return null};return c.ctx.mode.token(e,c.ctx.local)};t(c,a);return null};function c(e,t,a,c){return{phase:e,stage:t,mode:a,local:c}};function t(e,t,a){e.tok=t;e.ctx=a||{}};function f(e){return e.ctx.stage||0};function h(e){return e.ctx.phase};return{startState:function(){return{tok:a,ctx:c(undefined,0)}},copyState:function(t){var a=t.ctx,c=t.tmp;if(a.local)a={mode:a.mode,local:e.copyState(a.mode,a.local)};if(c)c={mode:c.mode,local:e.copyState(c.mode,c.local)};return{tok:t.tok,ctx:a,tmp:c}},innerMode:function(e){return e.tmp?{state:e.tmp.local,mode:e.tmp.mode}:e.ctx.mode?{state:e.ctx.local,mode:e.ctx.mode}:null},token:function(e,t){return t.tok(e,t)}}},'python','stex');e.defineMIME('text/x-rst','rst')}); -/* Include script: ntriples */ +/* Include script: ntriples.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('ntriples',function(){var e={PRE_SUBJECT:0,WRITING_SUB_URI:1,WRITING_BNODE_URI:2,PRE_PRED:3,WRITING_PRED_URI:4,PRE_OBJ:5,WRITING_OBJ_URI:6,WRITING_OBJ_BNODE:7,WRITING_OBJ_LITERAL:8,WRITING_LIT_LANG:9,WRITING_LIT_TYPE:10,POST_OBJ:11,ERROR:12};function i(t,r){var i=t.location,n;if(i==e.PRE_SUBJECT&&r=='<')n=e.WRITING_SUB_URI;else if(i==e.PRE_SUBJECT&&r=='_')n=e.WRITING_BNODE_URI;else if(i==e.PRE_PRED&&r=='<')n=e.WRITING_PRED_URI;else if(i==e.PRE_OBJ&&r=='<')n=e.WRITING_OBJ_URI;else if(i==e.PRE_OBJ&&r=='_')n=e.WRITING_OBJ_BNODE;else if(i==e.PRE_OBJ&&r=='"')n=e.WRITING_OBJ_LITERAL;else if(i==e.WRITING_SUB_URI&&r=='>')n=e.PRE_PRED;else if(i==e.WRITING_BNODE_URI&&r==' ')n=e.PRE_PRED;else if(i==e.WRITING_PRED_URI&&r=='>')n=e.PRE_OBJ;else if(i==e.WRITING_OBJ_URI&&r=='>')n=e.POST_OBJ;else if(i==e.WRITING_OBJ_BNODE&&r==' ')n=e.POST_OBJ;else if(i==e.WRITING_OBJ_LITERAL&&r=='"')n=e.POST_OBJ;else if(i==e.WRITING_LIT_LANG&&r==' ')n=e.POST_OBJ;else if(i==e.WRITING_LIT_TYPE&&r=='>')n=e.POST_OBJ;else if(i==e.WRITING_OBJ_LITERAL&&r=='@')n=e.WRITING_LIT_LANG;else if(i==e.WRITING_OBJ_LITERAL&&r=='^')n=e.WRITING_LIT_TYPE;else if(r==' '&&(i==e.PRE_SUBJECT||i==e.PRE_PRED||i==e.PRE_OBJ||i==e.POST_OBJ))n=i;else if(i==e.POST_OBJ&&r=='.')n=e.PRE_SUBJECT;else n=e.ERROR;t.location=n};return{startState:function(){return{location:e.PRE_SUBJECT,uris:[],anchors:[],bnodes:[],langs:[],types:[]}},token:function(e,n){var r=e.next();if(r=='<'){i(n,r);var T='';e.eatWhile(function(e){if(e!='#'&&e!='>'){T+=e;return!0};return!1});n.uris.push(T);if(e.match('#',!1))return'variable';e.next();i(n,'>');return'variable'};if(r=='#'){var f='';e.eatWhile(function(e){if(e!='>'&&e!=' '){f+=e;return!0};return!1});n.anchors.push(f);return'variable-2'};if(r=='>'){i(n,'>');return'variable'};if(r=='_'){i(n,r);var R='';e.eatWhile(function(e){if(e!=' '){R+=e;return!0};return!1});n.bnodes.push(R);e.next();i(n,' ');return'builtin'};if(r=='"'){i(n,r);e.eatWhile(function(e){return e!='"'});e.next();if(e.peek()!='@'&&e.peek()!='^'){i(n,'"')};return'string'};if(r=='@'){i(n,'@');var I='';e.eatWhile(function(e){if(e!=' '){I+=e;return!0};return!1});n.langs.push(I);e.next();i(n,' ');return'string-2'};if(r=='^'){e.next();i(n,'^');var t='';e.eatWhile(function(e){if(e!='>'){t+=e;return!0};return!1});n.types.push(t);e.next();i(n,'>');return'variable'};if(r==' '){i(n,r)};if(r=='.'){i(n,r)}}}});e.defineMIME('application/n-triples','ntriples');e.defineMIME('application/n-quads','ntriples');e.defineMIME('text/n-triples','ntriples')}); -/* Include script: sparql */ +/* Include script: sparql.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('sparql',function(e){var l=e.indentUnit,t;function o(e){return new RegExp('^(?:'+e.join('|')+')$','i')};var s=o(['str','lang','langmatches','datatype','bound','sameterm','isiri','isuri','iri','uri','bnode','count','sum','min','max','avg','sample','group_concat','rand','abs','ceil','floor','round','concat','substr','strlen','replace','ucase','lcase','encode_for_uri','contains','strstarts','strends','strbefore','strafter','year','month','day','hours','minutes','seconds','timezone','tz','now','uuid','struuid','md5','sha1','sha256','sha384','sha512','coalesce','if','strlang','strdt','isnumeric','regex','exists','isblank','isliteral','a','bind']),c=o(['base','prefix','select','distinct','reduced','construct','describe','ask','from','named','where','order','limit','offset','filter','optional','graph','by','asc','desc','as','having','undef','values','group','minus','in','not','service','silent','using','insert','delete','union','true','false','with','data','copy','to','move','add','create','drop','clear','load']),i=/[*+\-<>=&|\^\/!\?]/;function a(e,r){var n=e.next();t=null;if(n=='$'||n=='?'){if(n=='?'&&e.match(/\s/,!1)){return'operator'};e.match(/^[\w\d]*/);return'variable-2'} else if(n=='<'&&!e.match(/^[\s\u00a0=]/,!1)){e.match(/^[^\s\u00a0>]*>?/);return'atom'} else if(n=='"'||n=='\''){r.tokenize=u(n);return r.tokenize(e,r)} @@ -1174,20 +1172,20 @@ else if(n==':'){e.eatWhile(/[\w\d\._\-]/);return'atom'} else if(n=='@'){e.eatWhile(/[a-z\d\-]/i);return'meta'} else{e.eatWhile(/[_\w\d]/);if(e.eat(':')){e.eatWhile(/[\w\d_\-]/);return'atom'};var o=e.current();if(s.test(o))return'builtin';else if(c.test(o))return'keyword';else return'variable'}};function u(e){return function(t,n){var r=!1,i;while((i=t.next())!=null){if(i==e&&!r){n.tokenize=a;break};r=!r&&i=='\\'};return'string'}};function n(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}};function r(e){e.indent=e.context.indent;e.context=e.context.prev};return{startState:function(){return{tokenize:a,context:null,indent:0,col:0}},token:function(i,e){if(i.sol()){if(e.context&&e.context.align==null)e.context.align=!1;e.indent=i.indentation()};if(i.eatSpace())return null;var o=e.tokenize(i,e);if(o!='comment'&&e.context&&e.context.align==null&&e.context.type!='pattern'){e.context.align=!0};if(t=='(')n(e,')',i.column());else if(t=='[')n(e,']',i.column());else if(t=='{')n(e,'}',i.column());else if(/[\]\}\)]/.test(t)){while(e.context&&e.context.type=='pattern')r(e);if(e.context&&t==e.context.type){r(e);if(t=='}'&&e.context&&e.context.type=='pattern')r(e)}} else if(t=='.'&&e.context&&e.context.type=='pattern')r(e);else if(/atom|string|variable/.test(o)&&e.context){if(/[\}\]]/.test(e.context.type))n(e,'pattern',i.column());else if(e.context.type=='pattern'&&!e.context.align){e.context.align=!0;e.context.col=i.column()}};return o},indent:function(t,n){var i=n&&n.charAt(0),e=t.context;if(/[\]\}]/.test(i))while(e&&e.type=='pattern')e=e.prev;var r=e&&i==e.type;if(!e)return 0;else if(e.type=='pattern')return e.col;else if(e.align)return e.col+(r?0:1);else return e.indent+(r?0:l)},lineComment:'#'}});e.defineMIME('application/sparql-query','sparql')}); -/* Include script: properties */ +/* Include script: properties.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('properties',function(){return{token:function(i,e){var n=i.sol()||e.afterSection,o=i.eol();e.afterSection=!1;if(n){if(e.nextMultiline){e.inMultiline=!0;e.nextMultiline=!1} else{e.position='def'}};if(o&&!e.nextMultiline){e.inMultiline=!1;e.position='def'};if(n){while(i.eatSpace()){}};var t=i.next();if(n&&(t==='#'||t==='!'||t===';')){e.position='comment';i.skipToEnd();return'comment'} else if(n&&t==='['){e.afterSection=!0;i.skipTo(']');i.eat(']');return'header'} else if(t==='='||t===':'){e.position='quote';return null} else if(t==='\\'&&e.position==='quote'){if(i.eol()){e.nextMultiline=!0}};return e.position},startState:function(){return{position:'def',nextMultiline:!1,inMultiline:!1,afterSection:!1}}}});e.defineMIME('text/x-properties','properties');e.defineMIME('text/x-ini','properties')}); -/* Include script: rpm */ +/* Include script: rpm.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('rpm-changes',function(){var e=/^-+$/,r=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /,t=/^[\w+.-]+@[\w.-]+/;return{token:function(n){if(n.sol()){if(n.match(e)){return'tag'};if(n.match(r)){return'tag'}};if(n.match(t)){return'string'};n.next();return null}}});e.defineMIME('text/x-rpm-changes','rpm-changes');e.defineMode('rpm-spec',function(){var e=/^(i386|i586|i686|x86_64|ppc64le|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/,r=/^[a-zA-Z0-9()]+:/,t=/^%(debug_package|package|description|prep|build|install|files|clean|changelog|preinstall|preun|postinstall|postun|pretrans|posttrans|pre|post|triggerin|triggerun|verifyscript|check|triggerpostun|triggerprein|trigger)/,n=/^%(ifnarch|ifarch|if)/,i=/^%(else|endif)/,o=/^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/;return{startState:function(){return{controlFlow:!1,macroParameters:!1,section:!1}},token:function(a,c){var f=a.peek();if(f=='#'){a.skipToEnd();return'comment'};if(a.sol()){if(a.match(r)){return'header'};if(a.match(t)){return'atom'}};if(a.match(/^\$\w+/)){return'def'};if(a.match(/^\$\{\w+\}/)){return'def'};if(a.match(i)){return'keyword'};if(a.match(n)){c.controlFlow=!0;return'keyword'};if(c.controlFlow){if(a.match(o)){return'operator'};if(a.match(/^(\d+)/)){return'number'};if(a.eol()){c.controlFlow=!1}};if(a.match(e)){if(a.eol()){c.controlFlow=!1};return'number'};if(a.match(/^%[\w]+/)){if(a.match(/^\(/)){c.macroParameters=!0};return'keyword'};if(c.macroParameters){if(a.match(/^\d+/)){return'number'};if(a.match(/^\)/)){c.macroParameters=!1;return'keyword'}};if(a.match(/^%\{\??[\w \-\:\!]+\}/)){if(a.eol()){c.controlFlow=!1};return'def'};a.next();return null}}});e.defineMIME('text/x-rpm-spec','rpm-spec')}); -/* Include script: htmlmixed */ +/* Include script: htmlmixed.min.js */ (function(t){if(typeof exports=='object'&&typeof module=='object')t(require('../../lib/codemirror'),require('../xml/xml'),require('../javascript/javascript'),require('../css/css'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../xml/xml','../javascript/javascript','../css/css'],t);else t(CodeMirror)})(function(t){'use strict';var l={script:[['lang',/(javascript|babel)/i,'javascript'],['type',/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,'javascript'],['type',/./,'text/plain'],[null,null,'javascript']],style:[['lang',/^css$/i,'css'],['type',/^(text\/)?(x-)?(stylesheet|css)$/i,'css'],['type',/./,'text/plain'],[null,null,'css']]};function r(t,e,n){var a=t.current(),l=a.search(e);if(l>-1){t.backUp(a.length-l)} else if(a.match(/<\/?$/)){t.backUp(a.length);if(!t.match(e,!1))t.match(a)};return n};var e={};function i(t){var a=e[t];if(a)return a;return e[t]=new RegExp('\\s+'+t+'\\s*=\\s*(\'|")?([^\'"]+)(\'|")?\\s*')};function o(t,e){var a=t.match(i(e));return a?/^\s*(.*?)\s*$/.exec(a[2])[1]:''};function a(t,e){return new RegExp((e?'^':'')+'<\/\s*'+t+'\s*>','i')};function n(t,e){for(var n in t){var r=e[n]||(e[n]=[]),l=t[n];for(var a=l.length-1;a>=0;a--)r.unshift(l[a])}};function c(t,e){for(var n=0;n<t.length;n++){var a=t[n];if(!a[0]||a[1].test(o(e,a[0])))return a[2]}};t.defineMode('htmlmixed',function(e,i){var o=t.getMode(e,{name:'xml',htmlMode:!0,multilineTagIndentFactor:i.multilineTagIndentFactor,multilineTagIndentPastTag:i.multilineTagIndentPastTag});var s={};var m=i&&i.tags,f=i&&i.scriptTypes;n(l,s);if(m)n(m,s);if(f)for(var u=f.length-1;u>=0;u--)s.script.unshift(['type',f[u].matches,f[u].mode]);function d(l,n){var m=o.token(l,n.htmlState),p=/\btag\b/.test(m),u;if(p&&!/[<>\s\/]/.test(l.current())&&(u=n.htmlState.tagName&&n.htmlState.tagName.toLowerCase())&&s.hasOwnProperty(u)){n.inTag=u+' '} else if(n.inTag&&p&&/>$/.test(l.current())){var i=/^([\S]+) (.*)/.exec(n.inTag);n.inTag=null;var g=l.current()=='>'&&c(s[i[1]],i[2]),f=t.getMode(e,g),h=a(i[1],!0),v=a(i[1],!1);n.token=function(t,e){if(t.match(h,!1)){e.token=d;e.localState=e.localMode=null;return null};return r(t,v,e.localMode.token(t,e.localState))};n.localMode=f;n.localState=t.startState(f,o.indent(n.htmlState,''))} else if(n.inTag){n.inTag+=l.current();if(l.eol())n.inTag+=' '};return m};return{startState:function(){var e=t.startState(o);return{token:d,inTag:null,localMode:null,localState:null,htmlState:e}},copyState:function(e){var a;if(e.localState){a=t.copyState(e.localMode,e.localState)};return{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:a,htmlState:t.copyState(o,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,a,n){if(!e.localMode||/^\s*<\//.test(a))return o.indent(e.htmlState,a);else if(e.localMode.indent)return e.localMode.indent(e.localState,a,n);else return t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||o}}}},'xml','javascript','css');t.defineMIME('text/html','htmlmixed')}); -/* Include script: xml */ +/* Include script: xml.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';var r={autoSelfClosers:{'area':!0,'base':!0,'br':!0,'col':!0,'command':!0,'embed':!0,'frame':!0,'hr':!0,'img':!0,'input':!0,'keygen':!0,'link':!0,'meta':!0,'param':!0,'source':!0,'track':!0,'wbr':!0,'menuitem':!0},implicitlyClosed:{'dd':!0,'li':!0,'optgroup':!0,'option':!0,'p':!0,'rp':!0,'rt':!0,'tbody':!0,'td':!0,'tfoot':!0,'th':!0,'tr':!0},contextGrabbers:{'dd':{'dd':!0,'dt':!0},'dt':{'dd':!0,'dt':!0},'li':{'li':!0},'option':{'option':!0,'optgroup':!0},'optgroup':{'optgroup':!0},'p':{'address':!0,'article':!0,'aside':!0,'blockquote':!0,'dir':!0,'div':!0,'dl':!0,'fieldset':!0,'footer':!0,'form':!0,'h1':!0,'h2':!0,'h3':!0,'h4':!0,'h5':!0,'h6':!0,'header':!0,'hgroup':!0,'hr':!0,'menu':!0,'nav':!0,'ol':!0,'p':!0,'pre':!0,'section':!0,'table':!0,'ul':!0},'rp':{'rp':!0,'rt':!0},'rt':{'rp':!0,'rt':!0},'tbody':{'tbody':!0,'tfoot':!0},'td':{'td':!0,'th':!0},'tfoot':{'tbody':!0},'th':{'td':!0,'th':!0},'thead':{'tbody':!0,'tfoot':!0},'tr':{'tr':!0}},doNotIndent:{'pre':!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0};var t={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode('xml',function(n,i){var c=n.indentUnit,o={};var x=i.htmlMode?r:t;for(var f in x)o[f]=x[f];for(var f in i)o[f]=i[f];var s,a;function l(e,t){function n(r){t.tokenize=r;return r(e,t)};var i=e.next();if(i=='<'){if(e.eat('!')){if(e.eat('[')){if(e.match('CDATA['))return n(g('atom',']]>'));else return null} else if(e.match('--')){return n(g('comment','-->'))} else if(e.match('DOCTYPE',!0,!0)){e.eatWhile(/[\w\._\-]/);return n(h(1))} @@ -1215,15 +1213,15 @@ else if(o.implicitlyClosed.hasOwnProperty(n.tagName)){n=n.prev} else{break}}} else if(a){while(n){var u=o.contextGrabbers[n.tagName];if(u&&u.hasOwnProperty(a[2]))n=n.prev;else break}} while(n&&n.prev&&!n.startOfLine)n=n.prev;if(n)return n.indent+c;else return t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:'<!--',blockCommentEnd:'-->',configuration:o.htmlMode?'html':'xml',helperType:o.htmlMode?'html':'xml',skipAttribute:function(e){if(e.state==y)e.state=u}}});e.defineMIME('text/xml','xml');e.defineMIME('application/xml','xml');if(!e.mimeModes.hasOwnProperty('text/html'))e.defineMIME('text/html',{name:'xml',htmlMode:!0})}); -/* Include script: ttcn-cfg */ +/* Include script: ttcn-cfg.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('ttcn-cfg',function(e,n){var C=e.indentUnit,N=n.keywords||{},o=n.fileNCtrlMaskOptions||{},I=n.externalCommands||{},l=n.multiLineStrings,A=n.indentStatements!==!1;var i=/[\|]/,t;function U(e,T){var n=e.next();if(n=='"'||n=='\''){T.tokenize=O(n);return T.tokenize(e,T)};if(/[:=]/.test(n)){t=n;return'punctuation'};if(n=='#'){e.skipToEnd();return'comment'};if(/\d/.test(n)){e.eatWhile(/[\w\.]/);return'number'};if(i.test(n)){e.eatWhile(i);return'operator'};if(n=='['){e.eatWhile(/[\w_\]]/);return'number sectionTitle'};e.eatWhile(/[\w\$_]/);var E=e.current();if(N.propertyIsEnumerable(E))return'keyword';if(o.propertyIsEnumerable(E))return'negative fileNCtrlMaskOptions';if(I.propertyIsEnumerable(E))return'negative externalCommands';return'variable'};function O(e){return function(t,n){var E=!1,i,r=!1;while((i=t.next())!=null){if(i==e&&!E){var T=t.peek();if(T){T=T.toLowerCase();if(T=='b'||T=='h'||T=='o')t.next()};r=!0;break};E=!E&&i=='\\'};if(r||!(E||l))n.tokenize=null;return'string'}};function r(e,t,n,T,E){this.indented=e;this.column=t;this.type=n;this.align=T;this.prev=E};function E(e,t,n){var T=e.indented;if(e.context&&e.context.type=='statement')T=e.context.indented;return e.context=new r(T,t,n,null,e.context)};function T(e){var t=e.context.type;if(t==')'||t==']'||t=='}')e.indented=e.context.indented;return e.context=e.context.prev};return{startState:function(e){return{tokenize:null,context:new r((e||0)-C,0,'top',!1),indented:0,startOfLine:!0}},token:function(n,e){var i=e.context;if(n.sol()){if(i.align==null)i.align=!1;e.indented=n.indentation();e.startOfLine=!0};if(n.eatSpace())return null;t=null;var r=(e.tokenize||U)(n,e);if(r=='comment')return r;if(i.align==null)i.align=!0;if((t==';'||t==':'||t==',')&&i.type=='statement'){T(e)} else if(t=='{')E(e,n.column(),'}');else if(t=='[')E(e,n.column(),']');else if(t=='(')E(e,n.column(),')');else if(t=='}'){while(i.type=='statement')i=T(e);if(i.type=='}')i=T(e);while(i.type=='statement')i=T(e)} else if(t==i.type)T(e);else if(A&&(((i.type=='}'||i.type=='top')&&t!=';')||(i.type=='statement'&&t=='newstatement')))E(e,n.column(),'statement');e.startOfLine=!1;return r},electricChars:'{}',lineComment:'#',fold:'brace'}});function t(e){var n={},T=e.split(' ');for(var t=0;t<T.length;++t)n[T[t]]=!0;return n};e.defineMIME('text/x-ttcn-cfg',{name:'ttcn-cfg',keywords:t('Yes No LogFile FileMask ConsoleMask AppendFile TimeStampFormat LogEventTypes SourceInfoFormat LogEntityName LogSourceInfo DiskFullAction LogFileNumber LogFileSize MatchingHints Detailed Compact SubCategories Stack Single None Seconds DateTime Time Stop Error Retry Delete TCPPort KillTimer NumHCs UnixSocketsEnabled LocalAddress'),fileNCtrlMaskOptions:t('TTCN_EXECUTOR TTCN_ERROR TTCN_WARNING TTCN_PORTEVENT TTCN_TIMEROP TTCN_VERDICTOP TTCN_DEFAULTOP TTCN_TESTCASE TTCN_ACTION TTCN_USER TTCN_FUNCTION TTCN_STATISTICS TTCN_PARALLEL TTCN_MATCHING TTCN_DEBUG EXECUTOR ERROR WARNING PORTEVENT TIMEROP VERDICTOP DEFAULTOP TESTCASE ACTION USER FUNCTION STATISTICS PARALLEL MATCHING DEBUG LOG_ALL LOG_NOTHING ACTION_UNQUALIFIED DEBUG_ENCDEC DEBUG_TESTPORT DEBUG_UNQUALIFIED DEFAULTOP_ACTIVATE DEFAULTOP_DEACTIVATE DEFAULTOP_EXIT DEFAULTOP_UNQUALIFIED ERROR_UNQUALIFIED EXECUTOR_COMPONENT EXECUTOR_CONFIGDATA EXECUTOR_EXTCOMMAND EXECUTOR_LOGOPTIONS EXECUTOR_RUNTIME EXECUTOR_UNQUALIFIED FUNCTION_RND FUNCTION_UNQUALIFIED MATCHING_DONE MATCHING_MCSUCCESS MATCHING_MCUNSUCC MATCHING_MMSUCCESS MATCHING_MMUNSUCC MATCHING_PCSUCCESS MATCHING_PCUNSUCC MATCHING_PMSUCCESS MATCHING_PMUNSUCC MATCHING_PROBLEM MATCHING_TIMEOUT MATCHING_UNQUALIFIED PARALLEL_PORTCONN PARALLEL_PORTMAP PARALLEL_PTC PARALLEL_UNQUALIFIED PORTEVENT_DUALRECV PORTEVENT_DUALSEND PORTEVENT_MCRECV PORTEVENT_MCSEND PORTEVENT_MMRECV PORTEVENT_MMSEND PORTEVENT_MQUEUE PORTEVENT_PCIN PORTEVENT_PCOUT PORTEVENT_PMIN PORTEVENT_PMOUT PORTEVENT_PQUEUE PORTEVENT_STATE PORTEVENT_UNQUALIFIED STATISTICS_UNQUALIFIED STATISTICS_VERDICT TESTCASE_FINISH TESTCASE_START TESTCASE_UNQUALIFIED TIMEROP_GUARD TIMEROP_READ TIMEROP_START TIMEROP_STOP TIMEROP_TIMEOUT TIMEROP_UNQUALIFIED USER_UNQUALIFIED VERDICTOP_FINAL VERDICTOP_GETVERDICT VERDICTOP_SETVERDICT VERDICTOP_UNQUALIFIED WARNING_UNQUALIFIED'),externalCommands:t('BeginControlPart EndControlPart BeginTestCase EndTestCase'),multiLineStrings:!0})}); -/* Include script: ttcn */ +/* Include script: ttcn.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('ttcn',function(t,e){var l=t.indentUnit,c=e.keywords||{},u=e.builtin||{},p=e.timerOps||{},f=e.portOps||{},d=e.configOps||{},m=e.verdictOps||{},b=e.sutOps||{},h=e.functionOps||{},y=e.verdictConsts||{},v=e.booleanConsts||{},x=e.otherConsts||{},g=e.types||{},k=e.visibilityModifiers||{},O=e.templateMatch||{},w=e.multiLineStrings,E=e.indentStatements!==!1;var o=/[+\-*&@=<>!\/]/,n;function C(e,r){var i=e.next();if(i=='"'||i=='\''){r.tokenize=I(i);return r.tokenize(e,r)};if(/[\[\]{}\(\),;\\:\?\.]/.test(i)){n=i;return'punctuation'};if(i=='#'){e.skipToEnd();return'atom preprocessor'};if(i=='%'){e.eatWhile(/\b/);return'atom ttcn3Macros'};if(/\d/.test(i)){e.eatWhile(/[\w\.]/);return'number'};if(i=='/'){if(e.eat('*')){r.tokenize=s;return s(e,r)};if(e.eat('/')){e.skipToEnd();return'comment'}};if(o.test(i)){if(i=='@'){if(e.match('try')||e.match('catch')||e.match('lazy')){return'keyword'}};e.eatWhile(o);return'operator'};e.eatWhile(/[\w\$_\xa1-\uffff]/);var t=e.current();if(c.propertyIsEnumerable(t))return'keyword';if(u.propertyIsEnumerable(t))return'builtin';if(p.propertyIsEnumerable(t))return'def timerOps';if(d.propertyIsEnumerable(t))return'def configOps';if(m.propertyIsEnumerable(t))return'def verdictOps';if(f.propertyIsEnumerable(t))return'def portOps';if(b.propertyIsEnumerable(t))return'def sutOps';if(h.propertyIsEnumerable(t))return'def functionOps';if(y.propertyIsEnumerable(t))return'string verdictConsts';if(v.propertyIsEnumerable(t))return'string booleanConsts';if(x.propertyIsEnumerable(t))return'string otherConsts';if(g.propertyIsEnumerable(t))return'builtin types';if(k.propertyIsEnumerable(t))return'builtin visibilityModifiers';if(O.propertyIsEnumerable(t))return'atom templateMatch';return'variable'};function I(e){return function(t,n){var i=!1,o,s=!1;while((o=t.next())!=null){if(o==e&&!i){var r=t.peek();if(r){r=r.toLowerCase();if(r=='b'||r=='h'||r=='o')t.next()};s=!0;break};i=!i&&o=='\\'};if(s||!(i||w))n.tokenize=null;return'string'}};function s(e,t){var r=!1,n;while(n=e.next()){if(n=='/'&&r){t.tokenize=null;break};r=(n=='*')};return'comment'};function a(e,t,n,r,i){this.indented=e;this.column=t;this.type=n;this.align=r;this.prev=i};function i(e,t,n){var r=e.indented;if(e.context&&e.context.type=='statement')r=e.context.indented;return e.context=new a(r,t,n,null,e.context)};function r(e){var t=e.context.type;if(t==')'||t==']'||t=='}')e.indented=e.context.indented;return e.context=e.context.prev};return{startState:function(e){return{tokenize:null,context:new a((e||0)-l,0,'top',!1),indented:0,startOfLine:!0}},token:function(e,t){var o=t.context;if(e.sol()){if(o.align==null)o.align=!1;t.indented=e.indentation();t.startOfLine=!0};if(e.eatSpace())return null;n=null;var s=(t.tokenize||C)(e,t);if(s=='comment')return s;if(o.align==null)o.align=!0;if((n==';'||n==':'||n==',')&&o.type=='statement'){r(t)} else if(n=='{')i(t,e.column(),'}');else if(n=='[')i(t,e.column(),']');else if(n=='(')i(t,e.column(),')');else if(n=='}'){while(o.type=='statement')o=r(t);if(o.type=='}')o=r(t);while(o.type=='statement')o=r(t)} else if(n==o.type)r(t);else if(E&&(((o.type=='}'||o.type=='top')&&n!=';')||(o.type=='statement'&&n=='newstatement')))i(t,e.column(),'statement');t.startOfLine=!1;return s},electricChars:'{}',blockCommentStart:'/*',blockCommentEnd:'*/',lineComment:'//',fold:'brace'}});function t(e){var n={},r=e.split(' ');for(var t=0;t<r.length;++t)n[r[t]]=!0;return n};function n(t,n){if(typeof t=='string')t=[t];var o=[];function r(e){if(e)for(var t in e)if(e.hasOwnProperty(t))o.push(t)};r(n.keywords);r(n.builtin);r(n.timerOps);r(n.portOps);if(o.length){n.helperType=t[0];e.registerHelper('hintWords',t[0],o)};for(var i=0;i<t.length;++i)e.defineMIME(t[i],n)};n(['text/x-ttcn','text/x-ttcn3','text/x-ttcnpp'],{name:'ttcn',keywords:t('activate address alive all alt altstep and and4b any break case component const continue control deactivate display do else encode enumerated except exception execute extends extension external for from function goto group if import in infinity inout interleave label language length log match message mixed mod modifies module modulepar mtc noblock not not4b nowait of on optional or or4b out override param pattern port procedure record recursive rem repeat return runs select self sender set signature system template testcase to type union value valueof var variant while with xor xor4b'),builtin:t('bit2hex bit2int bit2oct bit2str char2int char2oct encvalue decomp decvalue float2int float2str hex2bit hex2int hex2oct hex2str int2bit int2char int2float int2hex int2oct int2str int2unichar isbound ischosen ispresent isvalue lengthof log2str oct2bit oct2char oct2hex oct2int oct2str regexp replace rnd sizeof str2bit str2float str2hex str2int str2oct substr unichar2int unichar2char enum2int'),types:t('anytype bitstring boolean char charstring default float hexstring integer objid octetstring universal verdicttype timer'),timerOps:t('read running start stop timeout'),portOps:t('call catch check clear getcall getreply halt raise receive reply send trigger'),configOps:t('create connect disconnect done kill killed map unmap'),verdictOps:t('getverdict setverdict'),sutOps:t('action'),functionOps:t('apply derefers refers'),verdictConsts:t('error fail inconc none pass'),booleanConsts:t('true false'),otherConsts:t('null NULL omit'),visibilityModifiers:t('private public friend'),templateMatch:t('complement ifpresent subset superset permutation'),multiLineStrings:!0})}); -/* Include script: z80 */ +/* Include script: z80.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('z80',function(e,i){var l=i.ez80,t,r;if(l){t=/^(exx?|(ld|cp)([di]r?)?|[lp]ea|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|[de]i|halt|im|in([di]mr?|ir?|irx|2r?)|ot(dmr?|[id]rx|imr?)|out(0?|[di]r?|[di]2r?)|tst(io)?|slp)(\.([sl]?i)?[sl])?\b/i;r=/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i} else{t=/^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i;r=/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i};var s=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,o=/^(n?[zc]|p[oe]?|m)\b/i,c=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,n=/^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;return{startState:function(){return{context:0}},token:function(e,i){if(!e.column())i.context=0;if(e.eatSpace())return null;var a;if(e.eatWhile(/\w/)){if(l&&e.eat('.')){e.eatWhile(/\w/)};a=e.current();if(e.indentation()){if((i.context==1||i.context==4)&&s.test(a)){i.context=4;return'var2'};if(i.context==2&&o.test(a)){i.context=4;return'var3'};if(t.test(a)){i.context=1;return'keyword'} else if(r.test(a)){i.context=2;return'keyword'} @@ -1237,17 +1235,17 @@ else if(e.eat('.')||e.sol()&&e.eat('#')){i.context=5;if(e.eatWhile(/\w/))return' else if(e.eat('$')){if(e.eatWhile(/[\da-f]/i))return'number'} else if(e.eat('%')){if(e.eatWhile(/[01]/))return'number'} else{e.next()};return null}}});e.defineMIME('text/x-z80','z80');e.defineMIME('text/x-ez80',{name:'z80',ez80:!0})}); -/* Include script: brainfuck */ +/* Include script: brainfuck.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';var n='><+-.,[]'.split('');e.defineMode('brainfuck',function(){return{startState:function(){return{commentLine:!1,left:0,right:0,commentLoop:!1}},token:function(t,i){if(t.eatSpace())return null;if(t.sol()){i.commentLine=!1};var e=t.next().toString();if(n.indexOf(e)!==-1){if(i.commentLine===!0){if(t.eol()){i.commentLine=!1};return'comment'};if(e===']'||e==='['){if(e==='['){i.left++} else{i.right++};return'bracket'} else if(e==='+'||e==='-'){return'keyword'} else if(e==='<'||e==='>'){return'atom'} else if(e==='.'||e===','){return'def'}} else{i.commentLine=!0;if(t.eol()){i.commentLine=!1};return'comment'};if(t.eol()){i.commentLine=!1}}}});e.defineMIME('text/x-brainfuck','brainfuck')}); -/* Include script: forth */ +/* Include script: forth.min.js */ (function(t){if(typeof exports=='object'&&typeof module=='object')t(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],t);else t(CodeMirror)})(function(t){'use strict';function e(t){var e=[];t.split(' ').forEach(function(t){e.push({name:t})});return e};var E=e('INVERT AND OR XOR 2* 2/ LSHIFT RSHIFT 0= = 0< < > U< MIN MAX 2DROP 2DUP 2OVER 2SWAP ?DUP DEPTH DROP DUP OVER ROT SWAP >R R> R@ + - 1+ 1- ABS NEGATE S>D * M* UM* FM/MOD SM/REM UM/MOD */ */MOD / /MOD MOD HERE , @ ! CELL+ CELLS C, C@ C! CHARS 2@ 2! ALIGN ALIGNED +! ALLOT CHAR [CHAR] [ ] BL FIND EXECUTE IMMEDIATE COUNT LITERAL STATE ; DOES> >BODY EVALUATE SOURCE >IN <# # #S #> HOLD SIGN BASE >NUMBER HEX DECIMAL FILL MOVE . CR EMIT SPACE SPACES TYPE U. .R U.R ACCEPT TRUE FALSE <> U> 0<> 0> NIP TUCK ROLL PICK 2>R 2R@ 2R> WITHIN UNUSED MARKER I J TO COMPILE, [COMPILE] SAVE-INPUT RESTORE-INPUT PAD ERASE 2LITERAL DNEGATE D- D+ D0< D0= D2* D2/ D< D= DMAX DMIN D>S DABS M+ M*/ D. D.R 2ROT DU< CATCH THROW FREE RESIZE ALLOCATE CS-PICK CS-ROLL GET-CURRENT SET-CURRENT FORTH-WORDLIST GET-ORDER SET-ORDER PREVIOUS SEARCH-WORDLIST WORDLIST FIND ALSO ONLY FORTH DEFINITIONS ORDER -TRAILING /STRING SEARCH COMPARE CMOVE CMOVE> BLANK SLITERAL'),i=e('IF ELSE THEN BEGIN WHILE REPEAT UNTIL RECURSE [IF] [ELSE] [THEN] ?DO DO LOOP +LOOP UNLOOP LEAVE EXIT AGAIN CASE OF ENDOF ENDCASE');t.defineMode('forth',function(){function t(t,E){var e;for(e=t.length-1;e>=0;e--){if(t[e].name===E.toUpperCase()){return t[e]}};return undefined};return{startState:function(){return{state:'',base:10,coreWordList:E,immediateWordList:i,wordList:[]}},token:function(e,E){var i;if(e.eatSpace()){return null};if(E.state===''){if(e.match(/^(\]|:NONAME)(\s|$)/i)){E.state=' compilation';return'builtin compilation'};i=e.match(/^(\:)\s+(\S+)(\s|$)+/);if(i){E.wordList.push({name:i[2].toUpperCase()});E.state=' compilation';return'def'+E.state};i=e.match(/^(VARIABLE|2VARIABLE|CONSTANT|2CONSTANT|CREATE|POSTPONE|VALUE|WORD)\s+(\S+)(\s|$)+/i);if(i){E.wordList.push({name:i[2].toUpperCase()});return'def'+E.state};i=e.match(/^('|\['\])\s+(\S+)(\s|$)+/);if(i){return'builtin'+E.state}} else{if(e.match(/^(\;|\[)(\s)/)){E.state='';e.backUp(1);return'builtin compilation'};if(e.match(/^(\;|\[)($)/)){E.state='';return'builtin compilation'};if(e.match(/^(POSTPONE)\s+\S+(\s|$)+/)){return'builtin'}};i=e.match(/^(\S+)(\s+|$)/);if(i){if(t(E.wordList,i[1])!==undefined){return'variable'+E.state};if(i[1]==='\\'){e.skipToEnd();return'comment'+E.state};if(t(E.coreWordList,i[1])!==undefined){return'builtin'+E.state};if(t(E.immediateWordList,i[1])!==undefined){return'keyword'+E.state};if(i[1]==='('){e.eatWhile(function(t){return t!==')'});e.eat(')');return'comment'+E.state};if(i[1]==='.('){e.eatWhile(function(t){return t!==')'});e.eat(')');return'string'+E.state};if(i[1]==='S"'||i[1]==='."'||i[1]==='C"'){e.eatWhile(function(t){return t!=='"'});e.eat('"');return'string'+E.state};if(i[1]-0xfffffffff){return'number'+E.state};return'atom'+E.state}}}});t.defineMIME('text/x-forth','forth')}); -/* Include script: nginx */ +/* Include script: nginx.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('nginx',function(e){function s(e){var i={},r=e.split(' ');for(var t=0;t<r.length;++t)i[r[t]]=!0;return i};var n=s('break return rewrite set accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23'),c=s('http mail events server types location upstream charset_map limit_except if geo map'),l=s('include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files'),p=e.indentUnit,i;function t(e,t){i=t;return e};function r(e,r){e.eatWhile(/[\w\$_]/);var s=e.current();if(n.propertyIsEnumerable(s)){return'keyword'} else if(c.propertyIsEnumerable(s)){return'variable-2'} else if(l.propertyIsEnumerable(s)){return'string-2'};var i=e.next();if(i=='@'){e.eatWhile(/[\w\\\-]/);return t('meta',e.current())} @@ -1261,7 +1259,7 @@ else if(/[,.+>*\/]/.test(i)){return t(null,'select-op')} else if(/[;{}:\[\]]/.test(i)){return t(null,i)} else{e.eatWhile(/[\w\\\-]/);return t('variable','variable')}};function a(e,i){var a=!1,s;while((s=e.next())!=null){if(a&&s=='/'){i.tokenize=r;break};a=(s=='*')};return t('comment','comment')};function o(e,i){var s=0,a;while((a=e.next())!=null){if(s>=2&&a=='>'){i.tokenize=r;break};s=(a=='-')?s+1:0};return t('comment','comment')};function u(e){return function(i,s){var a=!1,o;while((o=i.next())!=null){if(o==e&&!a)break;a=!a&&o=='\\'};if(!a)s.tokenize=r;return t('string','string')}};return{startState:function(e){return{tokenize:r,baseIndent:e||0,stack:[]}},token:function(t,e){if(t.eatSpace())return null;i=null;var s=e.tokenize(t,e),r=e.stack[e.stack.length-1];if(i=='hash'&&r=='rule')s='atom';else if(s=='variable'){if(r=='rule')s='number';else if(!r||r=='@media{')s='tag'};if(r=='rule'&&/^[\{\};]$/.test(i))e.stack.pop();if(i=='{'){if(r=='@media')e.stack[e.stack.length-1]='@media{';else e.stack.push('{')} else if(i=='}')e.stack.pop();else if(i=='@media')e.stack.push('@media');else if(r=='{'&&i!='comment')e.stack.push('rule');return s},indent:function(e,t){var i=e.stack.length;if(/^\}/.test(t))i-=e.stack[e.stack.length-1]=='rule'?2:1;return e.baseIndent+i*p},electricChars:'}'}});e.defineMIME('text/x-nginx-conf','nginx')}); -/* Include script: javascript */ +/* Include script: javascript.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('javascript',function(t,i){var M=t.indentUnit,ce=i.statementIndent,P=i.jsonld,b=i.json||P,d=i.typescript,ne=i.wordCharacters||/[\w$\xa1-\uffff]/,de=function(){function e(e){return{type:e,style:'keyword'}};var l=e('keyword a'),i=e('keyword b'),r=e('keyword c'),a=e('keyword d'),f=e('operator'),t={type:'atom',style:'atom'};var s={'if':e('if'),'while':l,'with':l,'else':i,'do':i,'try':i,'finally':i,'return':a,'break':a,'continue':a,'new':e('new'),'delete':r,'void':r,'throw':r,'debugger':e('debugger'),'var':e('var'),'const':e('var'),'let':e('var'),'function':e('function'),'catch':e('catch'),'for':e('for'),'switch':e('switch'),'case':e('case'),'default':e('default'),'in':f,'typeof':f,'instanceof':f,'true':t,'false':t,'null':t,'undefined':t,'NaN':t,'Infinity':t,'this':e('this'),'class':e('class'),'super':e('atom'),'yield':r,'export':e('export'),'import':e('import'),'extends':r,'await':r};if(d){var n={type:'variable',style:'type'};var o={'interface':e('class'),'implements':r,'namespace':r,'public':e('modifier'),'private':e('modifier'),'protected':e('modifier'),'abstract':e('modifier'),'readonly':e('modifier'),'string':n,'number':n,'boolean':n,'any':n};for(var u in o){s[u]=o[u]}};return s}(),pe=/[+\-*&%=<>!?|~^@]/,ze=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function Te(e){var n=!1,r,t=!1;while((r=e.next())!=null){if(!n){if(r=='/'&&!t)return;if(r=='[')t=!0;else if(t&&r==']')t=!1};n=!n&&r=='\\'}};var A,q;function l(e,r,t){A=e;q=t;return r};function w(e,r){var t=e.next();if(t=='"'||t=='\''){r.tokenize=Ce(t);return r.tokenize(e,r)} else if(t=='.'&&e.match(/^\d+(?:[eE][+\-]?\d+)?/)){return l('number','number')} else if(t=='.'&&e.match('..')){return l('spread','meta')} @@ -1302,9 +1300,9 @@ else if(t=='?'){return r(H)} else if(e==':'){return r(c)} else if(e=='['){return r(s,B,u(']'),H)}};function be(e){if(e=='variable')return r(be);else if(e==':')return r(c)};function g(e,t){if(t=='<')return r(f('>'),v(c,'>'),a,g);if(t=='|'||e=='.')return r(c);if(e=='[')return r(u(']'),g);if(t=='extends')return r(c)};function nr(e,t){if(t=='<')return r(f('>'),v(c,'>'),a,g)};function we(){return o(c,ir)};function ir(e,t){if(t=='=')return r(c)};function oe(){return o(k,B,C,fr)};function k(e,t){if(e=='modifier')return r(k);if(e=='variable'){E(t);return r()};if(e=='spread')return r(k);if(e=='[')return T(k,']');if(e=='{')return T(ar,'}')};function ar(e,t){if(e=='variable'&&!n.stream.match(/^\s*:/,!1)){E(t);return r(C)};if(e=='variable')n.marked='property';if(e=='spread')return r(k);if(e=='}')return o();return r(u(':'),k,C)};function C(e,t){if(t=='=')return r(m)};function fr(e){if(e==',')return r(oe)};function he(e,t){if(e=='keyword b'&&t=='else')return r(f('form','else'),p,a)};function ur(e){if(e=='(')return r(f(')'),or,u(')'),a)};function or(e){if(e=='var')return r(oe,u(';'),ee);if(e==';')return r(ee);if(e=='variable')return r(sr);return o(s,u(';'),ee)};function sr(e,t){if(t=='in'||t=='of'){n.marked='keyword';return r(s)};return r(h,ee)};function ee(e,t){if(e==';')return r(xe);if(t=='in'||t=='of'){n.marked='keyword';return r(s)};return o(s,u(';'),xe)};function xe(e){if(e!=')')r(s)};function y(e,t){if(t=='*'){n.marked='keyword';return r(y)};if(e=='variable'){E(t);return r(y)};if(e=='(')return r(I,f(')'),v(O,')'),a,er,p,z);if(d&&t=='<')return r(f('>'),v(we,'>'),a,y)};function O(e,t){if(t=='@')r(s,O);if(e=='spread'||e=='modifier')return r(O);return o(k,B,C)};function lr(e,r){if(e=='variable')return ge(e,r);return re(e,r)};function ge(e,t){if(e=='variable'){E(t);return r(re)}};function re(e,t){if(t=='<')return r(f('>'),v(we,'>'),a,re);if(t=='extends'||t=='implements'||(d&&e==','))return r(d?c:s,re);if(e=='{')return r(f('}'),j,a)};function j(e,t){if(e=='modifier'||e=='async'||(e=='variable'&&(t=='static'||t=='get'||t=='set')&&n.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))){n.marked='keyword';return r(j)};if(e=='variable'||n.style=='keyword'){n.marked='property';return r(d?se:y,j)};if(e=='[')return r(s,u(']'),d?se:y,j);if(t=='*'){n.marked='keyword';return r(j)};if(e==';')return r(j);if(e=='}')return r();if(t=='@')return r(s,j)};function se(e,t){if(t=='?')return r(se);if(e==':')return r(c,C);if(t=='=')return r(m);return o(y)};function cr(e,t){if(t=='*'){n.marked='keyword';return r(le,u(';'))};if(t=='default'){n.marked='keyword';return r(s,u(';'))};if(e=='{')return r(v(je,'}'),le,u(';'));return o(p)};function je(e,t){if(t=='as'){n.marked='keyword';return r(u('variable'))};if(e=='variable')return o(m,je)};function dr(e){if(e=='string')return r();return o(te,Me,le)};function te(e,t){if(e=='{')return T(te,'}');if(e=='variable')E(t);if(t=='*')n.marked='keyword';return r(pr)};function Me(e){if(e==',')return r(te,Me)};function pr(e,t){if(t=='as'){n.marked='keyword';return r(te)}};function le(e,t){if(t=='from'){n.marked='keyword';return r(s)}};function mr(e){if(e==']')return r();return o(v(m,']'))};function vr(e,r){return e.lastType=='operator'||e.lastType==','||pe.test(r.charAt(0))||/[,.]/.test(r.charAt(0))};function Ve(e,r,t){return r.tokenize==w&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(r.lastType)||(r.lastType=='quasi'&&/\{\s*$/.test(e.string.slice(0,e.pos-(t||0))))};return{startState:function(e){var r={tokenize:w,lastType:'sof',cc:[],lexical:new me((e||0)-M,0,'block',!1),localVars:i.localVars,context:i.localVars&&{vars:i.localVars},indented:e||0};if(i.globalVars&&typeof i.globalVars=='object')r.globalVars=i.globalVars;return r},token:function(e,r){if(e.sol()){if(!r.lexical.hasOwnProperty('align'))r.lexical.align=!1;r.indented=e.indentation();ae(e,r)};if(r.tokenize!=S&&e.eatSpace())return null;var t=r.tokenize(e,r);if(A=='comment')return t;r.lastType=A=='operator'&&(q=='++'||q=='--')?'incdec':A;return qe(r,t,A,q,e)},indent:function(r,t){if(r.tokenize==S)return e.Pass;if(r.tokenize!=w)return 0;var s=t&&t.charAt(0),n=r.lexical,l;if(!/^\s*else\b/.test(t))for(var o=r.cc.length-1;o>=0;--o){var c=r.cc[o];if(c==a)n=n.prev;else if(c!=he)break} while((n.type=='stat'||n.type=='form')&&(s=='}'||((l=r.cc[r.cc.length-1])&&(l==h||l==V)&&!/^[,\.=+\-*:?[\(]/.test(t))))n=n.prev;if(ce&&n.type==')'&&n.prev.type=='stat')n=n.prev;var f=n.type,u=s==f;if(f=='vardef')return n.indented+(r.lastType=='operator'||r.lastType==','?n.info+1:0);else if(f=='form'&&s=='{')return n.indented;else if(f=='form')return n.indented+M;else if(f=='stat')return n.indented+(vr(r,t)?ce||M:0);else if(n.info=='switch'&&!u&&i.doubleIndentSwitch!=!1)return n.indented+(/^(?:case|default)\b/.test(t)?M:2*M);else if(n.align)return n.column+(u?0:1);else return n.indented+(u?0:M)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:b?null:'/*',blockCommentEnd:b?null:'*/',blockCommentContinue:b?null:' * ',lineComment:b?null:'//',fold:'brace',closeBrackets:'()[]{}\'\'""``',helperType:b?'json':'javascript',jsonldMode:P,jsonMode:b,expressionAllowed:Ve,skipExpression:function(e){var r=e.cc[e.cc.length-1];if(r==s||r==m)e.cc.pop()}}});e.registerHelper('wordChars','javascript',/[\w$]/);e.defineMIME('text/javascript','javascript');e.defineMIME('text/ecmascript','javascript');e.defineMIME('application/javascript','javascript');e.defineMIME('application/x-javascript','javascript');e.defineMIME('application/ecmascript','javascript');e.defineMIME('application/json',{name:'javascript',json:!0});e.defineMIME('application/x-json',{name:'javascript',json:!0});e.defineMIME('application/ld+json',{name:'javascript',jsonld:!0});e.defineMIME('text/typescript',{name:'javascript',typescript:!0});e.defineMIME('application/typescript',{name:'javascript',typescript:!0})}); -/* Include script: pascal */ +/* Include script: pascal.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('pascal',function(){function i(e){var t={},n=e.split(' ');for(var r=0;r<n.length;++r)t[n[r]]=!0;return t};var t=i('and array begin case const div do downto else end file for forward integer boolean char function goto if in label mod nil not of or packed procedure program record repeat set string then to type until var while with'),n={'null':!0};var e=/[+\-*&%=<>!?|\/]/;function o(i,o){var u=i.next();if(u=='#'&&o.startOfLine){i.skipToEnd();return'meta'};if(u=='"'||u=='\''){o.tokenize=a(u);return o.tokenize(i,o)};if(u=='('&&i.eat('*')){o.tokenize=r;return r(i,o)};if(/[\[\]{}\(\),;\:\.]/.test(u)){return null};if(/\d/.test(u)){i.eatWhile(/[\w\.]/);return'number'};if(u=='/'){if(i.eat('/')){i.skipToEnd();return'comment'}};if(e.test(u)){i.eatWhile(e);return'operator'};i.eatWhile(/[\w\$_]/);var f=i.current();if(t.propertyIsEnumerable(f))return'keyword';if(n.propertyIsEnumerable(f))return'atom';return'variable'};function a(e){return function(r,t){var n=!1,i,o=!1;while((i=r.next())!=null){if(i==e&&!n){o=!0;break};n=!n&&i=='\\'};if(o||!n)t.tokenize=null;return'string'}};function r(e,r){var n=!1,t;while(t=e.next()){if(t==')'&&n){r.tokenize=null;break};n=(t=='*')};return'comment'};return{startState:function(){return{tokenize:null}},token:function(e,r){if(e.eatSpace())return null;var t=(r.tokenize||o)(e,r);if(t=='comment'||t=='meta')return t;return t},electricChars:'{}'}});e.defineMIME('text/x-pascal','pascal')}); -/* Include script: haxe */ +/* Include script: haxe.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("haxe",function(t,r){var b=t.indentUnit;function a(e){return{type:e,style:"keyword"}};var O=a("keyword a"),A=a("keyword b"),v=a("keyword c"),ne=a("operator"),S={type:"atom",style:"atom"},h={type:"attribute",style:"attribute"};var f=a("typedef"),I={"if":O,"while":O,"else":A,"do":A,"try":A,"return":v,"break":v,"continue":v,"new":v,"throw":v,"var":a("var"),"inline":h,"static":h,"using":a("import"),"public":h,"private":h,"cast":a("cast"),"import":a("import"),"macro":a("macro"),"function":a("function"),"catch":a("catch"),"untyped":a("untyped"),"callback":a("cb"),"for":a("for"),"switch":a("switch"),"case":a("case"),"default":a("default"),"in":ne,"never":a("property_access"),"trace":a("trace"),"class":f,"abstract":f,"enum":f,"interface":f,"typedef":f,"extends":f,"implements":f,"dynamic":f,"true":S,"false":S,"null":S};var V=/[+\-*&%=<>!?|]/;function P(e,t,r){t.tokenize=r;return r(e,t)};function D(e,t){var r=!1,n;while((n=e.next())!=null){if(n==t&&!r)return!0;r=!r&&n=="\\"}};var f,Z;function o(e,t,r){f=e;Z=r;return t};function x(e,t){var r=e.next();if(r=="\""||r=="'"){return P(e,t,ie(r))} else if(/[\[\]{}\(\),;\:\.]/.test(r)){return o(r)} else if(r=="0"&&e.eat(/x/i)){e.eatWhile(/[\da-f]/i);return o("number","number")} @@ -1323,7 +1321,7 @@ else if(t=="variable"||t=="property"||t=="."||r=="*")return e(q)};function ce(t, else if(t=="type"&&/[A-Z]/.test(r.charAt(0))){return e()}};function se(t){if(t==":")return e(i,m);return d(s,l(";"),i)};function de(t){if(t=="variable"){n.marked="property";return e()}};function me(t){if(t=="variable")n.marked="property";if(T.hasOwnProperty(t))return e(l(":"),c)};function p(t,r){function n(i){if(i==",")return e(t,n);if(i==r)return e();return e(l(r))};return function(i){if(i==r)return e();else return d(t,n)}};function z(t){if(t=="}")return e();return d(m,z)};function C(t,r){if(t=="variable"){k(r);return e(g,ee)};return e()};function ee(t,r){if(r=="=")return e(c,ee);if(t==",")return e(C)};function pe(t,r){if(t=="variable"){k(r);return e(ve,c)} else{return d()}};function ve(t,r){if(r=="in")return e()};function y(t,r){if(t=="variable"||t=="type"){k(r);return e(y)};if(r=="new")return e(y);if(t=="(")return e(u(")"),E,p(te,")"),i,g,m,w)};function g(t){if(t==":")return e(be)};function be(t){if(t=="type")return e();if(t=="variable")return e();if(t=="{")return e(u("}"),p(ye,"}"),i)};function ye(t){if(t=="variable")return e(g)};function te(t,r){if(t=="variable"){k(r);return e(g)}};return{startState:function(e){var n=["Int","Float","String","Void","Std","Bool","Dynamic","Array"],t={tokenize:x,reAllowed:!0,kwAllowed:!0,cc:[],lexical:new j((e||0)-b,0,"block",!1),localVars:r.localVars,importedtypes:n,context:r.localVars&&{vars:r.localVars},indented:0};if(r.globalVars&&typeof r.globalVars=="object")t.globalVars=r.globalVars;return t},token:function(e,t){if(e.sol()){if(!t.lexical.hasOwnProperty("align"))t.lexical.align=!1;t.indented=e.indentation()};if(e.eatSpace())return null;var r=t.tokenize(e,t);if(f=="comment")return r;t.reAllowed=!!(f=="operator"||f=="keyword c"||f.match(/^[\[{}\(,;:]$/));t.kwAllowed=f!=".";return fe(t,r,f,Z,e)},indent:function(e,t){if(e.tokenize!=x)return 0;var a=t&&t.charAt(0),r=e.lexical;if(r.type=="stat"&&a=="}")r=r.prev;var n=r.type,i=a==n;if(n=="vardef")return r.indented+4;else if(n=="form"&&a=="{")return r.indented;else if(n=="stat"||n=="form")return r.indented+b;else if(r.info=="switch"&&!i)return r.indented+(/^(?:case|default)\b/.test(t)?b:2*b);else if(r.align)return r.column+(i?0:1);else return r.indented+(i?0:b)},electricChars:"{}",blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//"}});e.defineMIME("text/x-haxe","haxe");e.defineMode("hxml",function(){return{startState:function(){return{define:!1,inString:!1}},token:function(e,t){var r=e.peek(),i=e.sol();if(r=="#"){e.skipToEnd();return"comment"};if(i&&r=="-"){var n="variable-2";e.eat(/-/);if(e.peek()=="-"){e.eat(/-/);n="keyword a"};if(e.peek()=="D"){e.eat(/[D]/);n="keyword c";t.define=!0};e.eatWhile(/[A-Z]/i);return n};var r=e.peek();if(t.inString==!1&&r=="'"){t.inString=!0;e.next()};if(t.inString==!0){if(e.skipTo("'")){} else{e.skipToEnd()};if(e.peek()=="'"){e.next();t.inString=!1};return"string"};e.next();return null},lineComment:"#"}});e.defineMIME("text/x-hxml","hxml")}); -/* Include script: perl */ +/* Include script: perl.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(r){'use strict';r.defineMode('perl',function(){var a={'->':4,'++':4,'--':4,'**':4,'=~':4,'!~':4,'*':4,'/':4,'%':4,'x':4,'+':4,'-':4,'.':4,'<<':4,'>>':4,'<':4,'>':4,'<=':4,'>=':4,'lt':4,'gt':4,'le':4,'ge':4,'==':4,'!=':4,'<=>':4,'eq':4,'ne':4,'cmp':4,'~~':4,'&':4,'|':4,'^':4,'&&':4,'||':4,'//':4,'..':4,'...':4,'?':4,':':4,'=':4,'+=':4,'-=':4,'*=':4,',':4,'=>':4,'::':4,'not':4,'and':4,'or':4,'xor':4,'BEGIN':[5,1],'END':[5,1],'PRINT':[5,1],'PRINTF':[5,1],'GETC':[5,1],'READ':[5,1],'READLINE':[5,1],'DESTROY':[5,1],'TIE':[5,1],'TIEHANDLE':[5,1],'UNTIE':[5,1],'STDIN':5,'STDIN_TOP':5,'STDOUT':5,'STDOUT_TOP':5,'STDERR':5,'STDERR_TOP':5,'$ARG':5,'$_':5,'@ARG':5,'@_':5,'$LIST_SEPARATOR':5,'$"':5,'$PROCESS_ID':5,'$PID':5,'$$':5,'$REAL_GROUP_ID':5,'$GID':5,'$(':5,'$EFFECTIVE_GROUP_ID':5,'$EGID':5,'$)':5,'$PROGRAM_NAME':5,'$0':5,'$SUBSCRIPT_SEPARATOR':5,'$SUBSEP':5,'$;':5,'$REAL_USER_ID':5,'$UID':5,'$<':5,'$EFFECTIVE_USER_ID':5,'$EUID':5,'$>':5,'$a':5,'$b':5,'$COMPILING':5,'$^C':5,'$DEBUGGING':5,'$^D':5,'${^ENCODING}':5,'$ENV':5,'%ENV':5,'$SYSTEM_FD_MAX':5,'$^F':5,'@F':5,'${^GLOBAL_PHASE}':5,'$^H':5,'%^H':5,'@INC':5,'%INC':5,'$INPLACE_EDIT':5,'$^I':5,'$^M':5,'$OSNAME':5,'$^O':5,'${^OPEN}':5,'$PERLDB':5,'$^P':5,'$SIG':5,'%SIG':5,'$BASETIME':5,'$^T':5,'${^TAINT}':5,'${^UNICODE}':5,'${^UTF8CACHE}':5,'${^UTF8LOCALE}':5,'$PERL_VERSION':5,'$^V':5,'${^WIN32_SLOPPY_STAT}':5,'$EXECUTABLE_NAME':5,'$^X':5,'$1':5,'$MATCH':5,'$&':5,'${^MATCH}':5,'$PREMATCH':5,'$`':5,'${^PREMATCH}':5,'$POSTMATCH':5,'$\'':5,'${^POSTMATCH}':5,'$LAST_PAREN_MATCH':5,'$+':5,'$LAST_SUBMATCH_RESULT':5,'$^N':5,'@LAST_MATCH_END':5,'@+':5,'%LAST_PAREN_MATCH':5,'%+':5,'@LAST_MATCH_START':5,'@-':5,'%LAST_MATCH_START':5,'%-':5,'$LAST_REGEXP_CODE_RESULT':5,'$^R':5,'${^RE_DEBUG_FLAGS}':5,'${^RE_TRIE_MAXBUF}':5,'$ARGV':5,'@ARGV':5,'ARGV':5,'ARGVOUT':5,'$OUTPUT_FIELD_SEPARATOR':5,'$OFS':5,'$,':5,'$INPUT_LINE_NUMBER':5,'$NR':5,'$.':5,'$INPUT_RECORD_SEPARATOR':5,'$RS':5,'$/':5,'$OUTPUT_RECORD_SEPARATOR':5,'$ORS':5,'$\\':5,'$OUTPUT_AUTOFLUSH':5,'$|':5,'$ACCUMULATOR':5,'$^A':5,'$FORMAT_FORMFEED':5,'$^L':5,'$FORMAT_PAGE_NUMBER':5,'$%':5,'$FORMAT_LINES_LEFT':5,'$-':5,'$FORMAT_LINE_BREAK_CHARACTERS':5,'$:':5,'$FORMAT_LINES_PER_PAGE':5,'$=':5,'$FORMAT_TOP_NAME':5,'$^':5,'$FORMAT_NAME':5,'$~':5,'${^CHILD_ERROR_NATIVE}':5,'$EXTENDED_OS_ERROR':5,'$^E':5,'$EXCEPTIONS_BEING_CAUGHT':5,'$^S':5,'$WARNING':5,'$^W':5,'${^WARNING_BITS}':5,'$OS_ERROR':5,'$ERRNO':5,'$!':5,'%OS_ERROR':5,'%ERRNO':5,'%!':5,'$CHILD_ERROR':5,'$?':5,'$EVAL_ERROR':5,'$@':5,'$OFMT':5,'$#':5,'$*':5,'$ARRAY_BASE':5,'$[':5,'$OLD_PERL_VERSION':5,'$]':5,'if':[1,1],elsif:[1,1],'else':[1,1],'while':[1,1],unless:[1,1],'for':[1,1],foreach:[1,1],'abs':1,accept:1,alarm:1,'atan2':1,bind:1,binmode:1,bless:1,bootstrap:1,'break':1,caller:1,chdir:1,chmod:1,chomp:1,chop:1,chown:1,chr:1,chroot:1,close:1,closedir:1,connect:1,'continue':[1,1],'cos':1,crypt:1,dbmclose:1,dbmopen:1,'default':1,defined:1,'delete':1,die:1,'do':1,dump:1,each:1,endgrent:1,endhostent:1,endnetent:1,endprotoent:1,endpwent:1,endservent:1,eof:1,'eval':1,'exec':1,exists:1,exit:1,'exp':1,fcntl:1,fileno:1,flock:1,fork:1,format:1,formline:1,getc:1,getgrent:1,getgrgid:1,getgrnam:1,gethostbyaddr:1,gethostbyname:1,gethostent:1,getlogin:1,getnetbyaddr:1,getnetbyname:1,getnetent:1,getpeername:1,getpgrp:1,getppid:1,getpriority:1,getprotobyname:1,getprotobynumber:1,getprotoent:1,getpwent:1,getpwnam:1,getpwuid:1,getservbyname:1,getservbyport:1,getservent:1,getsockname:1,getsockopt:1,given:1,glob:1,gmtime:1,'goto':1,grep:1,hex:1,'import':1,index:1,'int':1,ioctl:1,'join':1,keys:1,kill:1,last:1,lc:1,lcfirst:1,length:1,'link':1,listen:1,local:2,localtime:1,lock:1,'log':1,lstat:1,m:null,map:1,mkdir:1,msgctl:1,msgget:1,msgrcv:1,msgsnd:1,my:2,'new':1,next:1,no:1,oct:1,open:1,opendir:1,ord:1,our:2,pack:1,'package':1,pipe:1,pop:1,pos:1,print:1,printf:1,prototype:1,push:1,q:null,qq:null,qr:null,quotemeta:null,qw:null,qx:null,rand:1,read:1,readdir:1,readline:1,readlink:1,readpipe:1,recv:1,redo:1,ref:1,rename:1,require:1,reset:1,'return':1,reverse:1,rewinddir:1,rindex:1,rmdir:1,s:null,say:1,scalar:1,seek:1,seekdir:1,select:1,semctl:1,semget:1,semop:1,send:1,setgrent:1,sethostent:1,setnetent:1,setpgrp:1,setpriority:1,setprotoent:1,setpwent:1,setservent:1,setsockopt:1,shift:1,shmctl:1,shmget:1,shmread:1,shmwrite:1,shutdown:1,'sin':1,sleep:1,socket:1,socketpair:1,'sort':1,splice:1,'split':1,sprintf:1,'sqrt':1,srand:1,stat:1,state:1,study:1,'sub':1,'substr':1,symlink:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,tell:1,telldir:1,tie:1,tied:1,time:1,times:1,tr:null,truncate:1,uc:1,ucfirst:1,umask:1,undef:1,unlink:1,unpack:1,unshift:1,untie:1,use:1,utime:1,values:1,vec:1,wait:1,waitpid:1,wantarray:1,warn:1,when:1,write:1,y:null};var s='string-2',u=/[goseximacplud]/;function r(t,e,r,n,i){e.chain=null;e.style=null;e.tail=null;e.tokenize=function(e,t){var s=!1,u,a=0;while(u=e.next()){if(u===r[a]&&!s){if(r[++a]!==undefined){t.chain=r[a];t.style=n;t.tail=i} else if(i)e.eatWhile(i);t.tokenize=f;return n};s=!s&&u=='\\'};return n};return e.tokenize(t,e)};function l(e,t,r){t.tokenize=function(e,t){if(e.string==r)t.tokenize=f;e.skipToEnd();return'string'};return t.tokenize(e,t)};function f(f,E){if(f.eatSpace())return null;if(E.chain)return r(f,E,E.chain,E.style,E.tail);if(f.match(/^\-?[\d\.]/,!1))if(f.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))return'number';if(f.match(/^<<(?=\w)/)){f.eatWhile(/\w/);return l(f,E,f.current().substr(2))};if(f.sol()&&f.match(/^\=item(?!\w)/)){return l(f,E,'=cut')};var R=f.next();if(R=='"'||R=='\''){if(i(f,3)=='<<'+R){var c=f.pos;f.eatWhile(/\w/);var T=f.current().substr(1);if(T&&f.eat(R))return l(f,E,T);f.pos=c};return r(f,E,[R],'string')};if(R=='q'){var o=t(f,-2);if(!(o&&/\w/.test(o))){o=t(f,0);if(o=='x'){o=t(f,1);if(o=='('){e(f,2);return r(f,E,[')'],s,u)};if(o=='['){e(f,2);return r(f,E,[']'],s,u)};if(o=='{'){e(f,2);return r(f,E,['}'],s,u)};if(o=='<'){e(f,2);return r(f,E,['>'],s,u)};if(/[\^'"!~\/]/.test(o)){e(f,1);return r(f,E,[f.eat(o)],s,u)}} else if(o=='q'){o=t(f,1);if(o=='('){e(f,2);return r(f,E,[')'],'string')};if(o=='['){e(f,2);return r(f,E,[']'],'string')};if(o=='{'){e(f,2);return r(f,E,['}'],'string')};if(o=='<'){e(f,2);return r(f,E,['>'],'string')};if(/[\^'"!~\/]/.test(o)){e(f,1);return r(f,E,[f.eat(o)],'string')}} @@ -1336,9 +1334,9 @@ else{var o=a[f.current()];if(!o)return'meta';if(o[1])o=o[0];if(p!=':'){if(o==1)r else return'meta'}};if(/[a-zA-Z_]/.test(R)){var p=t(f,-2);f.eatWhile(/\w/);var o=a[f.current()];if(!o)return'meta';if(o[1])o=o[0];if(p!=':'){if(o==1)return'keyword';else if(o==2)return'def';else if(o==3)return'atom';else if(o==4)return'operator';else if(o==5)return'variable-2';else return'meta'} else return'meta'};return null};return{startState:function(){return{tokenize:f,chain:null,style:null,tail:null}},token:function(e,t){return(t.tokenize||f)(e,t)},lineComment:'#'}});r.registerHelper('wordChars','perl',/[\w$]/);r.defineMIME('text/x-perl','perl');function t(e,t){return e.string.charAt(e.pos+(t||0))};function i(e,t){if(t){var r=e.pos-t;return e.string.substr((r>=0?r:0),t)} else{return e.string.substr(0,e.pos-1)}};function n(e,t){var r=e.string.length,n=r-e.pos+1;return e.string.substr(e.pos,(t&&t<r?t:n))};function e(e,t){var r=e.pos+t,n;if(r<=0)e.pos=0;else if(r>=(n=e.string.length-1))e.pos=n;else e.pos=r}}); -/* Include script: factor */ +/* Include script: factor.min.js */ -/* Include script: smarty */ +/* Include script: smarty.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('smarty',function(r,i){var s=i.rightDelimiter||'}',a=i.leftDelimiter||'{',u=i.version||2,o=e.getMode(r,i.baseMode||'null'),d=['debug','extends','function','include','literal'],n={operatorChars:/[+\-*&%=<>!?]/,validIdentifier:/[a-zA-Z0-9_]/,stringChar:/['"]/};var f;function t(e,t){f=t;return e};function p(e,t,r){t.tokenize=r;return r(e,t)};function h(e,t){if(t==null)t=e.pos;return u===3&&a=='{'&&(t==e.string.length||/\s/.test(e.string.charAt(t)))};function l(e,t){var i=e.string;for(var n=e.pos;;){var r=i.indexOf(a,n);n=r+a.length;if(r==-1||!h(e,r+a.length))break};if(r==e.pos){e.match(a);if(e.eat('*')){return p(e,t,k('comment','*'+s))} else{t.depth++;t.tokenize=c;f='startTag';return'tag'}};if(r>-1)e.string=i.slice(0,r);var l=o.token(e,t.base);if(r>-1)e.string=i;return l};function c(e,r){if(e.match(s,!0)){if(u===3){r.depth--;if(r.depth<=0){r.tokenize=l}} else{r.tokenize=l};return t('tag',null)};if(e.match(a,!0)){r.depth++;return t('tag','startTag')};var i=e.next();if(i=='$'){e.eatWhile(n.validIdentifier);return t('variable-2','variable')} @@ -1354,7 +1352,7 @@ else if(i=='|'){e.eatWhile(n.validIdentifier);return t('qualifier','modifier')}} else if(r.last=='pipe'){e.eatWhile(n.validIdentifier);return t('qualifier','modifier')} else if(r.last=='whitespace'){e.eatWhile(n.validIdentifier);return t('attribute','modifier')};if(r.last=='property'){e.eatWhile(n.validIdentifier);return t('property',null)} else if(/\s/.test(i)){f='whitespace';return null};var c='';if(i!='/'){c+=i};var p=null;while(p=e.eat(n.validIdentifier)){c+=p};for(var o=0,h=d.length;o<h;o++){if(d[o]==c){return t('keyword','keyword')}};if(/\s/.test(i)){return null};return t('tag','tag')}};function b(e){return function(t,r){var i=null,n=null;while(!t.eol()){n=t.peek();if(t.next()==e&&i!=='\\'){r.tokenize=c;break};i=n};return'string'}};function k(e,t){return function(r,i){while(!r.eol()){if(r.match(t)){i.tokenize=l;break};r.next()};return e}};return{startState:function(){return{base:e.startState(o),tokenize:l,last:null,depth:0}},copyState:function(t){return{base:e.copyState(o,t.base),tokenize:t.tokenize,last:t.last,depth:t.depth}},innerMode:function(e){if(e.tokenize==l)return{mode:o,state:e.base}},token:function(e,t){var r=t.tokenize(e,t);t.last=f;return r},indent:function(t,r){if(t.tokenize==l&&o.indent)return o.indent(t.base,r);else return e.Pass},blockCommentStart:a+'*',blockCommentEnd:'*'+s}});e.defineMIME('text/x-smarty','smarty')}); -/* Include script: vbscript */ +/* Include script: vbscript.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('vbscript',function(e,r){var a='error';function t(e){return new RegExp('^(('+e.join(')|(')+'))\\b','i')};var I=new RegExp('^[\\+\\-\\*/&\\\\\\^<>=]'),C=new RegExp('^((<>)|(<=)|(>=))'),L=new RegExp('^[\\.,]'),E=new RegExp('^[\\(\\)]'),D=new RegExp('^[A-Za-z][_A-Za-z0-9]*'),S=['class','sub','select','while','if','function','property','with','for'],T=['else','elseif','case'],O=['next','loop','wend'],j=t(['and','or','not','xor','is','mod','eqv','imp']),F=['dim','redim','then','until','randomize','byval','byref','new','property','exit','in','const','private','public','get','set','let','stop','on error resume next','on error goto 0','option explicit','call','me'],R=['true','false','nothing','empty','null'],z=['abs','array','asc','atn','cbool','cbyte','ccur','cdate','cdbl','chr','cint','clng','cos','csng','cstr','date','dateadd','datediff','datepart','dateserial','datevalue','day','escape','eval','execute','exp','filter','formatcurrency','formatdatetime','formatnumber','formatpercent','getlocale','getobject','getref','hex','hour','inputbox','instr','instrrev','int','fix','isarray','isdate','isempty','isnull','isnumeric','isobject','join','lbound','lcase','left','len','loadpicture','log','ltrim','rtrim','trim','maths','mid','minute','month','monthname','msgbox','now','oct','replace','rgb','right','rnd','round','scriptengine','scriptenginebuildversion','scriptenginemajorversion','scriptengineminorversion','second','setlocale','sgn','sin','space','split','sqr','strcomp','string','strreverse','tan','time','timer','timeserial','timevalue','typename','ubound','ucase','unescape','vartype','weekday','weekdayname','year'],B=['vbBlack','vbRed','vbGreen','vbYellow','vbBlue','vbMagenta','vbCyan','vbWhite','vbBinaryCompare','vbTextCompare','vbSunday','vbMonday','vbTuesday','vbWednesday','vbThursday','vbFriday','vbSaturday','vbUseSystemDayOfWeek','vbFirstJan1','vbFirstFourDays','vbFirstFullWeek','vbGeneralDate','vbLongDate','vbShortDate','vbLongTime','vbShortTime','vbObjectError','vbOKOnly','vbOKCancel','vbAbortRetryIgnore','vbYesNoCancel','vbYesNo','vbRetryCancel','vbCritical','vbQuestion','vbExclamation','vbInformation','vbDefaultButton1','vbDefaultButton2','vbDefaultButton3','vbDefaultButton4','vbApplicationModal','vbSystemModal','vbOK','vbCancel','vbAbort','vbRetry','vbIgnore','vbYes','vbNo','vbCr','VbCrLf','vbFormFeed','vbLf','vbNewLine','vbNullChar','vbNullString','vbTab','vbVerticalTab','vbUseDefault','vbTrue','vbFalse','vbEmpty','vbNull','vbInteger','vbLong','vbSingle','vbDouble','vbCurrency','vbDate','vbString','vbObject','vbError','vbBoolean','vbVariant','vbDataObject','vbDecimal','vbByte','vbArray'],n=['WScript','err','debug','RegExp'],M=['description','firstindex','global','helpcontext','helpfile','ignorecase','length','number','pattern','source','value','count'],A=['clear','execute','raise','replace','test','write','writeline','close','open','state','eof','update','addnew','end','createobject','quit'],N=['server','response','request','session','application'],W=['buffer','cachecontrol','charset','contenttype','expires','expiresabsolute','isclientconnected','pics','status','clientcertificate','cookies','form','querystring','servervariables','totalbytes','contents','staticobjects','codepage','lcid','sessionid','timeout','scripttimeout'],q=['addheader','appendtolog','binarywrite','end','flush','redirect','binaryread','remove','removeall','lock','unlock','abandon','getlasterror','htmlencode','mappath','transfer','urlencode'],i=A.concat(M);n=n.concat(B);if(e.isASP){n=n.concat(N);i=i.concat(q,W)};var v=t(F),f=t(R),m=t(z),p=t(n),h=t(i),y='"',g=t(S),u=t(T),s=t(O),l=t(['end']),x=t(['do']),k=t(['on error resume next','exit']),w=t(['rem']);function b(e,t){t.currentIndent++};function o(e,t){t.currentIndent--};function c(e,t){if(e.eatSpace()){return'space'};var i=e.peek();if(i==='\''){e.skipToEnd();return'comment'};if(e.match(w)){e.skipToEnd();return'comment'};if(e.match(/^((&H)|(&O))?[0-9\.]/i,!1)&&!e.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i,!1)){var n=!1;if(e.match(/^\d*\.\d+/i)){n=!0} else if(e.match(/^\d+\.\d*/)){n=!0} else if(e.match(/^\.\d+/)){n=!0};if(n){e.eat(/J/i);return'number'};var r=!1;if(e.match(/^&H[0-9a-f]+/i)){r=!0} @@ -1364,7 +1362,7 @@ else if(e.match(/^0(?![\dx])/i)){r=!0};if(r){e.eat(/L/i);return'number'}};if(e.m else{i.eat(/['"]/)}};if(n){if(r.singleLineStringErrors){return a} else{o.tokenize=c}};return t}};function U(e,t){var r=t.tokenize(e,t),n=e.current();if(n==='.'){r=t.tokenize(e,t);n=e.current();if(r&&(r.substr(0,8)==='variable'||r==='builtin'||r==='keyword')){if(r==='builtin'||r==='keyword')r='variable';if(i.indexOf(n.substr(1))>-1)r='variable-2';return r} else{return a}};return r};var d={electricChars:'dDpPtTfFeE ',startState:function(){return{tokenize:c,lastToken:null,currentIndent:0,nextLineIndent:0,doInCurrentLine:!1,ignoreKeyword:!1}},token:function(e,t){if(e.sol()){t.currentIndent+=t.nextLineIndent;t.nextLineIndent=0;t.doInCurrentLine=0};var r=U(e,t);t.lastToken={style:r,content:e.current()};if(r==='space')r=null;return r},indent:function(t,r){var n=r.replace(/^\s+|\s+$/g,'');if(n.match(s)||n.match(l)||n.match(u))return e.indentUnit*(t.currentIndent-1);if(t.currentIndent<0)return 0;return t.currentIndent*e.indentUnit}};return d});e.defineMIME('text/vbscript','vbscript')}); -/* Include script: dylan */ +/* Include script: dylan.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';function n(e,n){for(var t=0;t<e.length;t++)n(e[t],t)};function t(e,n){for(var t=0;t<e.length;t++)if(n(e[t],t))return!0;return!1};e.defineMode('dylan',function(i){var e={unnamedDefinition:['interface'],namedDefinition:['module','library','macro','C-struct','C-union','C-function','C-callable-wrapper'],typeParameterizedDefinition:['class','C-subtype','C-mapped-subtype'],otherParameterizedDefinition:['method','function','C-variable','C-address'],constantSimpleDefinition:['constant'],variableSimpleDefinition:['variable'],otherSimpleDefinition:['generic','domain','C-pointer-type','table'],statement:['if','block','begin','method','case','for','select','when','unless','until','while','iterate','profiling','dynamic-bind'],separator:['finally','exception','cleanup','else','elseif','afterwards'],other:['above','below','by','from','handler','in','instance','let','local','otherwise','slot','subclass','then','to','keyed-by','virtual'],signalingCalls:['signal','error','cerror','break','check-type','abort']};e['otherDefinition']=e['unnamedDefinition'].concat(e['namedDefinition']).concat(e['otherParameterizedDefinition']);e['definition']=e['typeParameterizedDefinition'].concat(e['otherDefinition']);e['parameterizedDefinition']=e['typeParameterizedDefinition'].concat(e['otherParameterizedDefinition']);e['simpleDefinition']=e['constantSimpleDefinition'].concat(e['variableSimpleDefinition']).concat(e['otherSimpleDefinition']);e['keyword']=e['statement'].concat(e['separator']).concat(e['other']);var a='[-_a-zA-Z?!*@<>$%]+',p=new RegExp('^'+a),r={symbolKeyword:a+':',symbolClass:'<'+a+'>',symbolGlobal:'\\*'+a+'\\*',symbolConstant:'\\$'+a};var d={symbolKeyword:'atom',symbolClass:'tag',symbolGlobal:'variable-2',symbolConstant:'variable-3'};for(var l in r)if(r.hasOwnProperty(l))r[l]=new RegExp('^'+r[l]);r['keyword']=[/^with(?:out)?-[-_a-zA-Z?!*@<>$%]+/];var o={};o['keyword']='keyword';o['definition']='def';o['simpleDefinition']='def';o['signalingCalls']='builtin';var c={};var u={};n(['keyword','definition','simpleDefinition','signalingCalls'],function(t){n(e[t],function(e){c[e]=t;u[e]=o[t]})});function f(e,n,t){n.tokenize=t;return t(e,n)};function s(e,i){var n=e.peek();if(n=='\''||n=='"'){e.next();return f(e,i,m(n,'string'))} else if(n=='/'){e.next();if(e.eat('*')){return f(e,i,b)} else if(e.eat('/')){e.skipToEnd();return'comment'};e.backUp(1)} @@ -1388,11 +1386,11 @@ else if(e.current().match(p)){return'variable'} else{e.next();return'variable-2'}}};function b(e,n){var r=!1,o=!1,i=0,t;while((t=e.next())){if(t=='/'&&r){if(i>0){i--} else{n.tokenize=s;break}} else if(t=='*'&&o){i++};r=(t=='*');o=(t=='/')};return'comment'};function m(e,n){return function(t,i){var r=!1,o,a=!1;while((o=t.next())!=null){if(o==e&&!r){a=!0;break};r=!r&&o=='\\'};if(a||!r){i.tokenize=s};return n}};return{startState:function(){return{tokenize:s,currentIndent:0}},token:function(e,n){if(e.eatSpace())return null;var t=n.tokenize(e,n);return t},blockCommentStart:'/*',blockCommentEnd:'*/'}});e.defineMIME('text/x-dylan','dylan')}); -/* Include script: asn.1 */ +/* Include script: asn.1.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('asn.1',function(t,e){var a=t.indentUnit,s=e.keywords||{},I=e.cmipVerbs||{},T=e.compareTypes||{},u=e.status||{},l=e.tags||{},S=e.storage||{},f=e.modifier||{},c=e.accessTypes||{},A=e.multiLineStrings,p=e.indentStatements!==!1;var o=/[\|\^]/,n;function N(e,t){var i=e.next();if(i=='"'||i=='\''){t.tokenize=m(i);return t.tokenize(e,t)};if(/[\[\]\(\){}:=,;]/.test(i)){n=i;return'punctuation'};if(i=='-'){if(e.eat('-')){e.skipToEnd();return'comment'}};if(/\d/.test(i)){e.eatWhile(/[\w\.]/);return'number'};if(o.test(i)){e.eatWhile(o);return'operator'};e.eatWhile(/[\w\-]/);var r=e.current();if(s.propertyIsEnumerable(r))return'keyword';if(I.propertyIsEnumerable(r))return'variable cmipVerbs';if(T.propertyIsEnumerable(r))return'atom compareTypes';if(u.propertyIsEnumerable(r))return'comment status';if(l.propertyIsEnumerable(r))return'variable-3 tags';if(S.propertyIsEnumerable(r))return'builtin storage';if(f.propertyIsEnumerable(r))return'string-2 modifier';if(c.propertyIsEnumerable(r))return'atom accessTypes';return'variable'};function m(e){return function(t,n){var i=!1,o,E=!1;while((o=t.next())!=null){if(o==e&&!i){var r=t.peek();if(r){r=r.toLowerCase();if(r=='b'||r=='h'||r=='o')t.next()};E=!0;break};i=!i&&o=='\\'};if(E||!(i||A))n.tokenize=null;return'string'}};function E(e,t,n,r,i){this.indented=e;this.column=t;this.type=n;this.align=r;this.prev=i};function i(e,t,n){var r=e.indented;if(e.context&&e.context.type=='statement')r=e.context.indented;return e.context=new E(r,t,n,null,e.context)};function r(e){var t=e.context.type;if(t==')'||t==']'||t=='}')e.indented=e.context.indented;return e.context=e.context.prev};return{startState:function(e){return{tokenize:null,context:new E((e||0)-a,0,'top',!1),indented:0,startOfLine:!0}},token:function(t,e){var o=e.context;if(t.sol()){if(o.align==null)o.align=!1;e.indented=t.indentation();e.startOfLine=!0};if(t.eatSpace())return null;n=null;var E=(e.tokenize||N)(t,e);if(E=='comment')return E;if(o.align==null)o.align=!0;if((n==';'||n==':'||n==',')&&o.type=='statement'){r(e)} else if(n=='{')i(e,t.column(),'}');else if(n=='[')i(e,t.column(),']');else if(n=='(')i(e,t.column(),')');else if(n=='}'){while(o.type=='statement')o=r(e);if(o.type=='}')o=r(e);while(o.type=='statement')o=r(e)} else if(n==o.type)r(e);else if(p&&(((o.type=='}'||o.type=='top')&&n!=';')||(o.type=='statement'&&n=='newstatement')))i(e,t.column(),'statement');e.startOfLine=!1;return E},electricChars:'{}',lineComment:'--',fold:'brace'}});function t(e){var n={},r=e.split(' ');for(var t=0;t<r.length;++t)n[r[t]]=!0;return n};e.defineMIME('text/x-ttcn-asn',{name:'asn.1',keywords:t('DEFINITIONS OBJECTS IF DERIVED INFORMATION ACTION REPLY ANY NAMED CHARACTERIZED BEHAVIOUR REGISTERED WITH AS IDENTIFIED CONSTRAINED BY PRESENT BEGIN IMPORTS FROM UNITS SYNTAX MIN-ACCESS MAX-ACCESS MINACCESS MAXACCESS REVISION STATUS DESCRIPTION SEQUENCE SET COMPONENTS OF CHOICE DistinguishedName ENUMERATED SIZE MODULE END INDEX AUGMENTS EXTENSIBILITY IMPLIED EXPORTS'),cmipVerbs:t('ACTIONS ADD GET NOTIFICATIONS REPLACE REMOVE'),compareTypes:t('OPTIONAL DEFAULT MANAGED MODULE-TYPE MODULE_IDENTITY MODULE-COMPLIANCE OBJECT-TYPE OBJECT-IDENTITY OBJECT-COMPLIANCE MODE CONFIRMED CONDITIONAL SUBORDINATE SUPERIOR CLASS TRUE FALSE NULL TEXTUAL-CONVENTION'),status:t('current deprecated mandatory obsolete'),tags:t('APPLICATION AUTOMATIC EXPLICIT IMPLICIT PRIVATE TAGS UNIVERSAL'),storage:t('BOOLEAN INTEGER OBJECT IDENTIFIER BIT OCTET STRING UTCTime InterfaceIndex IANAifType CMIP-Attribute REAL PACKAGE PACKAGES IpAddress PhysAddress NetworkAddress BITS BMPString TimeStamp TimeTicks TruthValue RowStatus DisplayString GeneralString GraphicString IA5String NumericString PrintableString SnmpAdminAtring TeletexString UTF8String VideotexString VisibleString StringStore ISO646String T61String UniversalString Unsigned32 Integer32 Gauge Gauge32 Counter Counter32 Counter64'),modifier:t('ATTRIBUTE ATTRIBUTES MANDATORY-GROUP MANDATORY-GROUPS GROUP GROUPS ELEMENTS EQUALITY ORDERING SUBSTRINGS DEFINED'),accessTypes:t('not-accessible accessible-for-notify read-only read-create read-write'),multiLineStrings:!0})}); -/* Include script: ruby */ +/* Include script: ruby.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('ruby',function(e){function a(e){var n={};for(var t=0,i=e.length;t<i;++t)n[e[t]]=!0;return n};var l=a(['alias','and','BEGIN','begin','break','case','class','def','defined?','do','else','elsif','END','end','ensure','false','for','if','in','module','next','not','or','redo','rescue','retry','return','self','super','then','true','undef','unless','until','when','while','yield','nil','raise','throw','catch','fail','loop','callcc','caller','lambda','proc','public','protected','private','require','load','require_relative','extend','autoload','__END__','__FILE__','__LINE__','__dir__']),u=a(['def','class','case','for','while','until','module','then','catch','loop','proc','begin']),s=a(['end','until']),o={'[':']','{':'}','(':')'};var t;function n(e,t,n){n.tokenize.push(e);return e(t,n)};function r(e,a){if(e.sol()&&e.match('=begin')&&e.eol()){a.tokenize.push(k);return'comment'};if(e.eatSpace())return null;var r=e.next(),s;if(r=='`'||r=='\''||r=='"'){return n(i(r,'string',r=='"'||r=='`'),e,a)} else if(r=='/'){if(d(e))return n(i(r,'string-2',!0),e,a);else return'operator'} else if(r=='%'){var l='string',u=!0;if(e.eat('s'))l='atom';else if(e.eat(/[WQ]/))l='string';else if(e.eat(/[r]/))l='string-2';else if(e.eat(/[wxq]/)){l='string';u=!1};var f=e.eat(/[^\w\s=]/);if(!f)return'operator';if(o.propertyIsEnumerable(f))f=o[f];return n(i(f,l,u,!0),e,a)} @@ -1419,9 +1417,9 @@ else{n.tokenize[n.tokenize.length-1]=f(e-1)}} else if(t.peek()=='{'){n.tokenize[n.tokenize.length-1]=f(e+1)};return r(t,n)}};function c(){var e=!1;return function(t,n){if(e){n.tokenize.pop();return n.tokenize[n.tokenize.length-1](t,n)};e=!0;return r(t,n)}};function i(e,t,n,i){return function(r,o){var a=!1,l;if(o.context.type==='read-quoted-paused'){o.context=o.context.prev;r.eat('}')} while((l=r.next())!=null){if(l==e&&(i||!a)){o.tokenize.pop();break};if(n&&l=='#'&&!a){if(r.eat('{')){if(e=='}'){o.context={prev:o.context,type:'read-quoted-paused'}};o.tokenize.push(f());break} else if(/[@\$]/.test(r.peek())){o.tokenize.push(c());break}};a=!a&&l=='\\'};return t}};function p(e){return function(t,n){if(t.match(e))n.tokenize.pop();else t.skipToEnd();return'string'}};function k(e,t){if(e.sol()&&e.match('=end')&&e.eol())t.tokenize.pop();e.skipToEnd();return'comment'};return{startState:function(){return{tokenize:[r],indented:0,context:{type:'top',indented:-e.indentUnit},continuedLine:!1,lastTok:null,varList:!1}},token:function(n,e){t=null;if(n.sol())e.indented=n.indentation();var i=e.tokenize[e.tokenize.length-1](n,e),o,a=t;if(i=='ident'){var r=n.current();i=e.lastTok=='.'?'property':l.propertyIsEnumerable(n.current())?'keyword':/^[A-Z]/.test(r)?'tag':(e.lastTok=='def'||e.lastTok=='class'||e.varList)?'def':'variable';if(i=='keyword'){a=r;if(u.propertyIsEnumerable(r))o='indent';else if(s.propertyIsEnumerable(r))o='dedent';else if((r=='if'||r=='unless')&&n.column()==n.indentation())o='indent';else if(r=='do'&&e.context.indented<e.indented)o='indent'}};if(t||(i&&i!='comment'))e.lastTok=a;if(t=='|')e.varList=!e.varList;if(o=='indent'||/[\(\[\{]/.test(t))e.context={prev:e.context,type:t||i,indented:e.indented};else if((o=='dedent'||/[\)\]\}]/.test(t))&&e.context.prev)e.context=e.context.prev;if(n.eol())e.continuedLine=(t=='\\'||i=='operator');return i},indent:function(t,n){if(t.tokenize[t.tokenize.length-1]!=r)return 0;var a=n&&n.charAt(0),i=t.context,f=i.type==o[a]||i.type=='keyword'&&/^(?:end|until|else|elsif|when|rescue)\b/.test(n);return i.indented+(f?0:e.indentUnit)+(t.continuedLine?e.indentUnit:0)},electricInput:/^\s*(?:end|rescue|elsif|else|\})$/,lineComment:'#',fold:'indent'}});e.defineMIME('text/x-ruby','ruby')}); -/* Include script: nsis */ +/* Include script: nsis.min.js */ -/* Include script: css */ +/* Include script: css.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('css',function(r,t){var y=t.inline;if(!t.propertyKeywords)t=e.resolveMode('text/css');var p=r.indentUnit,m=t.tokenHooks,x=t.documentTypes||{},z=t.mediaTypes||{},j=t.mediaFeatures||{},P=t.mediaValueKeywords||{},f=t.propertyKeywords||{},h=t.nonStandardPropertyKeywords||{},q=t.fontProperties||{},K=t.counterDescriptors||{},g=t.colorKeywords||{},b=t.valueKeywords||{},c=t.allowNested,C=t.lineComment,B=t.supportsAtComponent===!0;var u,i;function n(e,t){u=t;return e};function T(e,t){var r=e.next();if(m[r]){var i=m[r](e,t);if(i!==!1)return i};if(r=='@'){e.eatWhile(/[\w\\\-]/);return n('def',e.current())} else if(r=='='||(r=='~'||r=='|')&&e.eat('=')){return n(null,'compare')} else if(r=='"'||r=='\''){t.tokenize=w(r);return t.tokenize(e,t)} @@ -1464,13 +1462,13 @@ else if(e.eat('*')){t.tokenize=r;return r(e,t)} else{return['operator','operator']}},':':function(e){if(e.match(/\s*\{/,!1))return[null,null];return!1},'$':function(e){e.match(/^[\w-]+/);if(e.match(/^\s*:/,!1))return['variable-2','variable-definition'];return['variable-2','variable']},'#':function(e){if(!e.eat('{'))return!1;return[null,'interpolation']}},name:'css',helperType:'scss'});e.defineMIME('text/x-less',{mediaTypes:i,mediaFeatures:o,mediaValueKeywords:d,propertyKeywords:a,nonStandardPropertyKeywords:n,colorKeywords:s,valueKeywords:c,fontProperties:l,allowNested:!0,lineComment:'//',tokenHooks:{'/':function(e,t){if(e.eat('/')){e.skipToEnd();return['comment','comment']} else if(e.eat('*')){t.tokenize=r;return r(e,t)} else{return['operator','operator']}},'@':function(e){if(e.eat('{'))return[null,'interpolation'];if(e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,!1))return!1;e.eatWhile(/[\w\\\-]/);if(e.match(/^\s*:/,!1))return['variable-2','variable-definition'];return['variable-2','variable']},'&':function(){return['atom','atom']}},name:'css',helperType:'less'});e.defineMIME('text/x-gss',{documentTypes:p,mediaTypes:i,mediaFeatures:o,propertyKeywords:a,nonStandardPropertyKeywords:n,fontProperties:l,counterDescriptors:y,colorKeywords:s,valueKeywords:c,supportsAtComponent:!0,tokenHooks:{'/':function(e,t){if(!e.eat('*'))return!1;t.tokenize=r;return r(e,t)}},name:'css',helperType:'gss'})}); -/* Include script: haskell-literate */ +/* Include script: haskell-literate.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../haskell/haskell'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../haskell/haskell'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('haskell-literate',function(t,n){var i=e.getMode(t,(n&&n.base)||'haskell');return{startState:function(){return{inCode:!1,baseState:e.startState(i)}},token:function(e,t){if(e.sol()){if(t.inCode=e.eat('>'))return'meta'};if(t.inCode){return i.token(e,t.baseState)} else{e.skipToEnd();return'comment'}},innerMode:function(e){return e.inCode?{state:e.baseState,mode:i}:null}}},'haskell');e.defineMIME('text/x-literate-haskell','haskell-literate')}); -/* Include script: mbox */ +/* Include script: mbox.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';var r=['From','Sender','Reply-To','To','Cc','Bcc','Message-ID','In-Reply-To','References','Resent-From','Resent-Sender','Resent-To','Resent-Cc','Resent-Bcc','Resent-Message-ID','Return-Path','Received'],n=['Date','Subject','Comments','Keywords','Resent-Date'];e.registerHelper('hintWords','mbox',r.concat(n));var t=/^[ \t]/,i=/^From /,a=new RegExp('^('+r.join('|')+'): '),o=new RegExp('^('+n.join('|')+'): '),d=/^[^:]+:/,c=/^[^ ]+@[^ ]+/,m=/^.*?(?=[^ ]+?@[^ ]+)/,s=/^<.*?>/,u=/^.*?(?=<.*>)/;function f(e){if(e==='Subject')return'header';return'string'};function l(r,e){if(r.sol()){e.inSeparator=!1;if(e.inHeader&&r.match(t)){return null} else{e.inHeader=!1;e.header=null};if(r.match(i)){e.inHeaders=!0;e.inSeparator=!0;return'atom'};var n,p=!1;if((n=r.match(o))||(p=!0)&&(n=r.match(a))){e.inHeaders=!0;e.inHeader=!0;e.emailPermitted=p;e.header=n[1];return'atom'};if(e.inHeaders&&(n=r.match(d))){e.inHeader=!0;e.emailPermitted=!0;e.header=n[1];return'atom'};e.inHeaders=!1;r.skipToEnd();return null};if(e.inSeparator){if(r.match(c))return'link';if(r.match(m))return'atom';r.skipToEnd();return'atom'};if(e.inHeader){var l=f(e.header);if(e.emailPermitted){if(r.match(s))return l+' link';if(r.match(u))return l};r.skipToEnd();return l};r.skipToEnd();return null};e.defineMode('mbox',function(){return{startState:function(){return{inSeparator:!1,inHeader:!1,emailPermitted:!1,header:null,inHeaders:!1}},token:l,blankLine:function(e){e.inHeaders=e.inSeparator=e.inHeader=!1}}});e.defineMIME('application/mbox','mbox')}); -/* Include script: dtd */ +/* Include script: dtd.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('dtd',function(t){var l=t.indentUnit,e;function n(t,n){e=n;return t};function r(e,r){var t=e.next();if(t=='<'&&e.eat('!')){if(e.eatWhile(/[\-]/)){r.tokenize=i;return i(e,r)} else if(e.eatWhile(/[\w]/))return n('keyword','doindent')} else if(t=='<'&&e.eat('?')){r.tokenize=s('meta','?>');return n('meta',t)} @@ -1483,7 +1481,7 @@ else if(e=='tag'&&n!=='>'){} else if(e=='tag'&&t.stack[t.stack.length-1]=='rule')r--;else if(e=='tag')r++;else if(n==='>'&&t.stack[t.stack.length-1]=='rule'&&e==='>')r--;else if(n==='>'&&t.stack[t.stack.length-1]=='rule'){} else if(n.substr(0,1)!=='<'&&n.substr(0,1)==='>')r=r-1;else if(n==='>'){} else r=r-1;if(e==null||e==']')r--};return t.baseIndent+r*l},electricChars:']>'}});e.defineMIME('application/xml-dtd','dtd')}); -/* Include script: erlang */ +/* Include script: erlang.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMIME('text/x-erlang','erlang');e.defineMode('erlang',function(r){'use strict';var h=['-type','-spec','-export_type','-opaque'],y=['after','begin','catch','case','cond','end','fun','if','let','of','query','receive','try','when'],v=/[\->,;]/,w=['->',';',','],x=['and','andalso','band','bnot','bor','bsl','bsr','bxor','div','not','or','orelse','rem','xor'],S=/[\+\-\*\/<>=\|:!]/,z=['=','+','-','*','/','>','>=','<','=<','=:=','==','=/=','/=','||','<-','!'],W=/[<\(\[\{]/,c=['<<','(','[','{'],U=/[>\)\]\}]/,f=['}',']',')','>>'],E=['is_atom','is_binary','is_bitstring','is_boolean','is_float','is_function','is_integer','is_list','is_number','is_pid','is_port','is_record','is_reference','is_tuple','atom','binary','bitstring','boolean','function','integer','list','number','pid','port','record','reference','tuple'],A=['abs','adler32','adler32_combine','alive','apply','atom_to_binary','atom_to_list','binary_to_atom','binary_to_existing_atom','binary_to_list','binary_to_term','bit_size','bitstring_to_list','byte_size','check_process_code','contact_binary','crc32','crc32_combine','date','decode_packet','delete_module','disconnect_node','element','erase','exit','float','float_to_list','garbage_collect','get','get_keys','group_leader','halt','hd','integer_to_list','internal_bif','iolist_size','iolist_to_binary','is_alive','is_atom','is_binary','is_bitstring','is_boolean','is_float','is_function','is_integer','is_list','is_number','is_pid','is_port','is_process_alive','is_record','is_reference','is_tuple','length','link','list_to_atom','list_to_binary','list_to_bitstring','list_to_existing_atom','list_to_float','list_to_integer','list_to_pid','list_to_tuple','load_module','make_ref','module_loaded','monitor_node','node','node_link','node_unlink','nodes','notalive','now','open_port','pid_to_list','port_close','port_command','port_connect','port_control','pre_loaded','process_flag','process_info','processes','purge_module','put','register','registered','round','self','setelement','size','spawn','spawn_link','spawn_monitor','spawn_opt','split_binary','statistics','term_to_binary','time','throw','tl','trunc','tuple_size','tuple_to_list','unlink','unregister','whereis'],u=/[\w@Ø-ÞÀ-Öß-öø-ÿ]/,Z=/[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/;function M(e,r){if(r.in_string){r.in_string=(!d(e));return t(r,e,'string')};if(r.in_atom){r.in_atom=(!b(e));return t(r,e,'atom')};if(e.eatSpace()){return t(r,e,'whitespace')};if(!a(r)&&e.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/)){if(n(e.current(),h)){return t(r,e,'type')} else{return t(r,e,'attribute')}};var i=e.next();if(i=='%'){e.skipToEnd();return t(r,e,'comment')};if(i==':'){return t(r,e,'colon')};if(i=='?'){e.eatSpace();e.eatWhile(u);return t(r,e,'macro')};if(i=='#'){e.eatSpace();e.eatWhile(u);return t(r,e,'record')};if(i=='$'){if(e.next()=='\\'&&!e.match(Z)){return t(r,e,'error')};return t(r,e,'number')};if(i=='.'){return t(r,e,'dot')};if(i=='\''){if(!(r.in_atom=(!b(e)))){if(e.match(/\s*\/\s*[0-9]/,!1)){e.match(/\s*\/\s*[0-9]/,!0);return t(r,e,'fun')};if(e.match(/\s*\(/,!1)||e.match(/\s*:/,!1)){return t(r,e,'function')}};return t(r,e,'atom')};if(i=='"'){r.in_string=(!d(e));return t(r,e,'string')};if(/[A-Z_Ø-ÞÀ-Ö]/.test(i)){e.eatWhile(u);return t(r,e,'variable')};if(/[a-z_ß-öø-ÿ]/.test(i)){e.eatWhile(u);if(e.match(/\s*\/\s*[0-9]/,!1)){e.match(/\s*\/\s*[0-9]/,!0);return t(r,e,'fun')};var o=e.current();if(n(o,y)){return t(r,e,'keyword')} else if(n(o,x)){return t(r,e,'operator')} @@ -1517,7 +1515,7 @@ else if(n(s.token,c)){return s.column+s.token.length} else{u=re(t);return o(u)?u.column+p:0}};function ee(e){var t=e.match(/,|[a-z]+|\}|\]|\)|>>|\|+|\(/);return o(t)&&(t.index===0)?t[0]:''};function te(e){var t=e.tokenStack.slice(0,-1),r=s(t,'type',['open_paren']);return o(t[r])?t[r]:!1};function re(e){var r=e.tokenStack,t=s(r,'type',['open_paren','separator','keyword']),n=s(r,'type',['operator']);if(o(t)&&o(n)&&t<n){return r[t+1]} else if(o(t)){return r[t]} else{return!1}};function l(e,t){var r=e.tokenStack,n=s(r,'token',t);return o(r[n])?r[n]:!1};function s(e,t,r){for(var i=e.length-1;-1<i;i--){if(n(e[i][t],r)){return i}};return!1};function o(e){return(e!==!1)&&(e!=null)};return{startState:function(){return{tokenStack:[],in_string:!1,in_atom:!1}},token:function(e,t){return M(e,t)},indent:function(e,t){return T(e,t)},lineComment:'%'}})}); -/* Include script: turtle */ +/* Include script: turtle.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('turtle',function(e){var f=e.indentUnit,t;function l(e){return new RegExp('^(?:'+e.join('|')+')$','i')};var u=l([]),i=l(['@prefix','@base','a']),o=/[*+\-<>=&|]/;function c(e,r){var n=e.next();t=null;if(n=='<'&&!e.match(/^[\s\u00a0=]/,!1)){e.match(/^[^\s\u00a0>]*>?/);return'atom'} else if(n=='"'||n=='\''){r.tokenize=a(n);return r.tokenize(e,r)} else if(/[{}\(\),\.;\[\]]/.test(n)){t=n;return null} @@ -1528,9 +1526,9 @@ else{e.eatWhile(/[_\w\d]/);if(e.peek()==':'){return'variable-3'} else{var l=e.current();if(i.test(l)){return'meta'};if(n>='A'&&n<='Z'){return'comment'} else{return'keyword'}};var l=e.current();if(u.test(l))return null;else if(i.test(l))return'meta';else return'variable'}};function a(e){return function(t,n){var r=!1,i;while((i=t.next())!=null){if(i==e&&!r){n.tokenize=c;break};r=!r&&i=='\\'};return'string'}};function n(e,t,n){e.context={prev:e.context,indent:e.indent,col:n,type:t}};function r(e){e.indent=e.context.indent;e.context=e.context.prev};return{startState:function(){return{tokenize:c,context:null,indent:0,col:0}},token:function(i,e){if(i.sol()){if(e.context&&e.context.align==null)e.context.align=!1;e.indent=i.indentation()};if(i.eatSpace())return null;var o=e.tokenize(i,e);if(o!='comment'&&e.context&&e.context.align==null&&e.context.type!='pattern'){e.context.align=!0};if(t=='(')n(e,')',i.column());else if(t=='[')n(e,']',i.column());else if(t=='{')n(e,'}',i.column());else if(/[\]\}\)]/.test(t)){while(e.context&&e.context.type=='pattern')r(e);if(e.context&&t==e.context.type)r(e)} else if(t=='.'&&e.context&&e.context.type=='pattern')r(e);else if(/atom|string|variable/.test(o)&&e.context){if(/[\}\]]/.test(e.context.type))n(e,'pattern',i.column());else if(e.context.type=='pattern'&&!e.context.align){e.context.align=!0;e.context.col=i.column()}};return o},indent:function(t,n){var i=n&&n.charAt(0),e=t.context;if(/[\]\}]/.test(i))while(e&&e.type=='pattern')e=e.prev;var r=e&&i==e.type;if(!e)return 0;else if(e.type=='pattern')return e.col;else if(e.align)return e.col+(r?0:1);else return e.indent+(r?0:f)},lineComment:'#'}});e.defineMIME('text/turtle','turtle')}); -/* Include script: troff */ +/* Include script: troff.min.js */ (function(t){if(typeof exports=='object'&&typeof module=='object')t(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],t);else t(CodeMirror)})(function(t){'use strict';t.defineMode('troff',function(){var t={};function e(e){if(e.eatSpace())return null;var i=e.sol(),r=e.next();if(r==='\\'){if(e.match('fB')||e.match('fR')||e.match('fI')||e.match('u')||e.match('d')||e.match('%')||e.match('&')){return'string'};if(e.match('m[')){e.skipTo(']');e.next();return'string'};if(e.match('s+')||e.match('s-')){e.eatWhile(/[\d-]/);return'string'};if(e.match('\(')||e.match('*\(')){e.eatWhile(/[\w-]/);return'string'};return'string'};if(i&&(r==='.'||r==='\'')){if(e.eat('\\')&&e.eat('"')){e.skipToEnd();return'comment'}};if(i&&r==='.'){if(e.match('B ')||e.match('I ')||e.match('R ')){return'attribute'};if(e.match('TH ')||e.match('SH ')||e.match('SS ')||e.match('HP ')){e.skipToEnd();return'quote'};if((e.match(/[A-Z]/)&&e.match(/[A-Z]/))||(e.match(/[a-z]/)&&e.match(/[a-z]/))){return'attribute'}};e.eatWhile(/[\w-]/);var n=e.current();return t.hasOwnProperty(n)?t[n]:null};function r(t,r){return(r.tokens[0]||e)(t,r)};return{startState:function(){return{tokens:[]}},token:function(t,e){return r(t,e)}}});t.defineMIME('text/troff','troff');t.defineMIME('text/x-troff','troff');t.defineMIME('application/x-troff','troff')}); -/* Include script: jinja2 */ +/* Include script: jinja2.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('jinja2',function(){var n=['and','as','block','endblock','by','cycle','debug','else','elif','extends','filter','endfilter','firstof','for','endfor','if','endif','ifchanged','endifchanged','ifequal','endifequal','ifnotequal','endifnotequal','in','include','load','not','now','or','parsed','regroup','reversed','spaceless','endspaceless','ssi','templatetag','openblock','closeblock','openvariable','closevariable','openbrace','closebrace','opencomment','closecomment','widthratio','url','with','endwith','get_current_language','trans','endtrans','noop','blocktrans','endblocktrans','get_available_languages','get_current_language_bidi','plural'],i=/^[+\-*&%=<>!?|~^]/,r=/^[:\[\(\{]/,e=['true','false'],t=/^(\d[+\-\*\/])?\d+(\.\d+)?/;n=new RegExp('(('+n.join(')|(')+'))\\b');e=new RegExp('(('+e.join(')|(')+'))\\b');function o(o,a){var f=o.peek();if(a.incomment){if(!o.skipTo('#}')){o.skipToEnd()} else{o.eatWhile(/\#|}/);a.incomment=!1};return'comment'} else if(a.intag){if(a.operator){a.operator=!1;if(o.match(e)){return'atom'};if(o.match(t)){return'number'}};if(a.sign){a.sign=!1;if(o.match(e)){return'atom'};if(o.match(t)){return'number'}};if(a.instring){if(f==a.instring){a.instring=!1};o.next();return'string'} @@ -1543,26 +1541,26 @@ else{o.next()}};return'variable'} else if(o.eat('{')){if(o.eat('#')){a.incomment=!0;if(!o.skipTo('#}')){o.skipToEnd()} else{o.eatWhile(/\#|}/);a.incomment=!1};return'comment'} else if(f=o.eat(/\{|%/)){a.intag=f;if(f=='{'){a.intag='}'};o.eat('-');return'tag'}};o.next()};return{startState:function(){return{tokenize:o}},token:function(e,n){return n.tokenize(e,n)}}})}); -/* Include script: diff */ +/* Include script: diff.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('diff',function(){var e={'+':'positive','-':'negative','@':'meta'};return{token:function(i){var r=i.string.search(/[\t ]+?$/);if(!i.sol()||r===0){i.skipToEnd();return('error '+(e[i.string.charAt(0)]||'')).replace(/ $/,'')};var o=e[i.peek()]||i.skipToEnd();if(r===-1){i.skipToEnd()} else{i.pos=r};return o}}});e.defineMIME('text/x-diff','diff')}); -/* Include script: dart */ +/* Include script: dart.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'),require('../clike/clike'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror','../clike/clike'],e);else e(CodeMirror)})(function(e){'use strict';var r=('this super static final const abstract class extends external factory implements get native set typedef with enum throw rethrow assert break case continue default in return new deferred async await covariant try catch finally do else for if switch while import library export part of show hide is as').split(' '),c='try catch finally do else for if switch while'.split(' '),o='true false null'.split(' '),a='void bool num int double dynamic var String'.split(' ');function t(e){var n={};for(var t=0;t<e.length;++t)n[e[t]]=!0;return n};function u(e){(e.interpolationStack||(e.interpolationStack=[])).push(e.tokenize)};function l(e){return(e.interpolationStack||(e.interpolationStack=[])).pop()};function f(e){return e.interpolationStack?e.interpolationStack.length:0};e.defineMIME('application/dart',{name:'clike',keywords:t(r),blockKeywords:t(c),builtin:t(a),atoms:t(o),hooks:{'@':function(e){e.eatWhile(/[\w\$_\.]/);return'meta'},'\'':function(e,t){return n('\'',e,t,!1)},'"':function(e,t){return n('"',e,t,!1)},'r':function(e,t){var i=e.peek();if(i=='\''||i=='"'){return n(e.next(),e,t,!0)};return!1},'}':function(e,t){if(f(t)>0){t.tokenize=l(t);return null};return!1},'/':function(e,t){if(!e.eat('*'))return!1;t.tokenize=i(1);return t.tokenize(e,t)}}});function n(e,t,n,i){var r=!1;if(t.eat(e)){if(t.eat(e))r=!0;else return'string'};function o(t,n){var o=!1;while(!t.eol()){if(!i&&!o&&t.peek()=='$'){u(n);n.tokenize=s;return'string'};var a=t.next();if(a==e&&!o&&(!r||t.match(e+e))){n.tokenize=null;break};o=!i&&!o&&a=='\\'};return'string'};n.tokenize=o;return o(t,n)};function s(e,t){e.eat('$');if(e.eat('{')){t.tokenize=null} else{t.tokenize=k};return null};function k(e,t){e.eatWhile(/[\w_]/);t.tokenize=l(t);return'variable'};function i(e){return function(t,n){var r;while(r=t.next()){if(r=='*'&&t.eat('/')){if(e==1){n.tokenize=null;break} else{n.tokenize=i(e-1);return n.tokenize(t,n)}} else if(r=='/'&&t.eat('*')){n.tokenize=i(e+1);return n.tokenize(t,n)}};return'comment'}};e.registerHelper('hintWords','application/dart',r.concat(o).concat(a));e.defineMode('dart',function(t){return e.getMode(t,'application/dart')},'clike')}); -/* Include script: shell */ +/* Include script: shell.min.js */ (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("shell",function(){var t={};function n(e,n){var i=n.split(" ");for(var r=0;r<i.length;r++){t[i[r]]=e}};n("atom","true false");n("keyword","if then do else elif while until for in esac fi fin fil done exit set unset export function");n("builtin","ab awk bash beep cat cc cd chown chmod chroot clear cp curl cut diff echo find gawk gcc get git grep hg kill killall ln ls make mkdir openssl mv nc node npm ping ps restart rm rmdir sed service sh shopt shred source sort sleep ssh start stop su sudo svn tee telnet top touch vi vim wall wc wget who write yes zsh");function o(n,s){if(n.eatSpace())return null;var u=n.sol(),o=n.next();if(o==="\\"){n.next();return null};if(o==="'"||o==="\""||o==="`"){s.tokens.unshift(r(o,o==="`"?"quote":"string"));return e(n,s)};if(o==="#"){if(u&&n.eat("!")){n.skipToEnd();return"meta"};n.skipToEnd();return"comment"};if(o==="$"){s.tokens.unshift(i);return e(n,s)};if(o==="+"||o==="="){return"operator"};if(o==="-"){n.eat("-");n.eatWhile(/\w/);return"attribute"};if(/\d/.test(o)){n.eatWhile(/\d/);if(n.eol()||!/\w/.test(n.peek())){return"number"}};n.eatWhile(/[\w-]/);var f=n.current();if(n.peek()==="="&&/\w+/.test(f))return"def";return t.hasOwnProperty(f)?t[f]:null};function r(t,n){var o=t=="("?")":t=="{"?"}":t;return function(s,f){var l,a=!1,u=!1;while((l=s.next())!=null){if(l===o&&!u){a=!0;break};if(l==="$"&&!u&&t!=="'"){u=!0;s.backUp(1);f.tokens.unshift(i);break};if(!u&&l===t&&t!==o){f.tokens.unshift(r(t,n));return e(s,f)};u=!u&&l==="\\"};if(a)f.tokens.shift();return n}};var i=function(t,n){if(n.tokens.length>1)t.eat("$");var i=t.next();if(/['"({]/.test(i)){n.tokens[0]=r(i,i=="("?"quote":i=="{"?"def":"string");return e(t,n)};if(!/\d/.test(i))t.eatWhile(/\w/);n.tokens.shift();return"def"};function e(e,t){return(t.tokens[0]||o)(e,t)};return{startState:function(){return{tokens:[]}},token:function(t,n){return e(t,n)},closeBrackets:"()[]{}''\"\"``",lineComment:"#",fold:"brace"}});e.defineMIME("text/x-sh","shell");e.defineMIME("application/x-sh","shell")}); -/* Include script: lua */ +/* Include script: lua.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('lua',function(e,t){var f=e.indentUnit;function d(e){return new RegExp('^(?:'+e.join('|')+')','i')};function n(e){return new RegExp('^(?:'+e.join('|')+')$','i')};var o=n(t.specials||[]),u=n(['_G','_VERSION','assert','collectgarbage','dofile','error','getfenv','getmetatable','ipairs','load','loadfile','loadstring','module','next','pairs','pcall','print','rawequal','rawget','rawset','require','select','setfenv','setmetatable','tonumber','tostring','type','unpack','xpcall','coroutine.create','coroutine.resume','coroutine.running','coroutine.status','coroutine.wrap','coroutine.yield','debug.debug','debug.getfenv','debug.gethook','debug.getinfo','debug.getlocal','debug.getmetatable','debug.getregistry','debug.getupvalue','debug.setfenv','debug.sethook','debug.setlocal','debug.setmetatable','debug.setupvalue','debug.traceback','close','flush','lines','read','seek','setvbuf','write','io.close','io.flush','io.input','io.lines','io.open','io.output','io.popen','io.read','io.stderr','io.stdin','io.stdout','io.tmpfile','io.type','io.write','math.abs','math.acos','math.asin','math.atan','math.atan2','math.ceil','math.cos','math.cosh','math.deg','math.exp','math.floor','math.fmod','math.frexp','math.huge','math.ldexp','math.log','math.log10','math.max','math.min','math.modf','math.pi','math.pow','math.rad','math.random','math.randomseed','math.sin','math.sinh','math.sqrt','math.tan','math.tanh','os.clock','os.date','os.difftime','os.execute','os.exit','os.getenv','os.remove','os.rename','os.setlocale','os.time','os.tmpname','package.cpath','package.loaded','package.loaders','package.loadlib','package.path','package.preload','package.seeall','string.byte','string.char','string.dump','string.find','string.format','string.gmatch','string.gsub','string.len','string.lower','string.match','string.rep','string.reverse','string.sub','string.upper','table.concat','table.insert','table.maxn','table.remove','table.sort']),l=n(['and','break','elseif','false','nil','not','or','return','true','function','end','if','then','else','do','while','repeat','until','for','in','local']),s=n(['function','if','repeat','do','\\(','{']),c=n(['end','until','\\)','}']),m=d(['end','until','\\)','}','else','elseif']);function i(e){var t=0;while(e.eat('='))++t;e.eat('[');return t};function r(e,t){var n=e.next();if(n=='-'&&e.eat('-')){if(e.eat('[')&&e.eat('['))return(t.cur=a(i(e),'comment'))(e,t);e.skipToEnd();return'comment'};if(n=='"'||n=='\'')return(t.cur=g(n))(e,t);if(n=='['&&/[\[=]/.test(e.peek()))return(t.cur=a(i(e),'string'))(e,t);if(/\d/.test(n)){e.eatWhile(/[\w.%]/);return'number'};if(/[\w_]/.test(n)){e.eatWhile(/[\w\\\-_.]/);return'variable'};return null};function a(e,t){return function(n,i){var a=null,o;while((o=n.next())!=null){if(a==null){if(o==']')a=0} else if(o=='=')++a;else if(o==']'&&a==e){i.cur=r;break} else a=null};return t}};function g(e){return function(t,n){var i=!1,a;while((a=t.next())!=null){if(a==e&&!i)break;i=!i&&a=='\\'};if(!i)n.cur=r;return'string'}};return{startState:function(e){return{basecol:e||0,indentDepth:0,cur:r}},token:function(e,t){if(e.eatSpace())return null;var n=t.cur(e,t),r=e.current();if(n=='variable'){if(l.test(r))n='keyword';else if(u.test(r))n='builtin';else if(o.test(r))n='variable-2'};if((n!='comment')&&(n!='string')){if(s.test(r))++t.indentDepth;else if(c.test(r))--t.indentDepth};return n},indent:function(e,t){var n=m.test(t);return e.basecol+f*(e.indentDepth-(n?1:0))},lineComment:'--',blockCommentStart:'--[[',blockCommentEnd:']]'}});e.defineMIME('text/x-lua','lua')}); -/* Include script: groovy */ +/* Include script: groovy.min.js */ (function(e){if(typeof exports=='object'&&typeof module=='object')e(require('../../lib/codemirror'));else if(typeof define=='function'&&define.amd)define(['../../lib/codemirror'],e);else e(CodeMirror)})(function(e){'use strict';e.defineMode('groovy',function(t){function i(e){var n={},r=e.split(' ');for(var t=0;t<r.length;++t)n[r[t]]=!0;return n};var c=i('abstract as assert boolean break byte case catch char class const continue def default do double else enum extends final finally float for goto if implements import in instanceof int interface long native new package private protected public return short static strictfp super switch synchronized threadsafe throw throws trait transient try void volatile while'),p=i('catch class def do else enum finally for if interface switch trait try while'),d=i('return break continue'),m=i('null true false this'),n;function a(e,t){var r=e.next();if(r=='"'||r=='\''){return s(r,e,t)};if(/[\[\]{}\(\),;\:\.]/.test(r)){n=r;return null};if(/\d/.test(r)){e.eatWhile(/[\w\.]/);if(e.eat(/eE/)){e.eat(/\+\-/);e.eatWhile(/\d/)};return'number'};if(r=='/'){if(e.eat('*')){t.tokenize.push(f);return f(e,t)};if(e.eat('/')){e.skipToEnd();return'comment'};if(l(t.lastToken,!1)){return s(r,e,t)}};if(r=='-'&&e.eat('>')){n='->';return null};if(/[+\-*&%=<>!?|\/~]/.test(r)){e.eatWhile(/[+\-*&%=<>|~]/);return'operator'};e.eatWhile(/[\w\$_]/);if(r=='@'){e.eatWhile(/[\w\$_\.]/);return'meta'};if(t.lastToken=='.')return'property';if(e.eat(':')){n='proplabel';return'property'};var i=e.current();if(m.propertyIsEnumerable(i)){return'atom'};if(c.propertyIsEnumerable(i)){if(p.propertyIsEnumerable(i))n='newstatement';else if(d.propertyIsEnumerable(i))n='standalone';return'keyword'};return'variable'};a.isBase=!0;function s(e,t,n){var r=!1;if(e!='/'&&t.eat(e)){if(t.eat(e))r=!0;else return'string'};function i(t,n){var i=!1,o,a=!r;while((o=t.next())!=null){if(o==e&&!i){if(!r){break};if(t.match(e+e)){a=!0;break}};if(e=='"'&&o=='$'&&!i&&t.eat('{')){n.tokenize.push(h());return'string'};i=!i&&o=='\\'};if(a)n.tokenize.pop();return'string'};n.tokenize.push(i);return i(t,n)};function h(){var e=1;function t(t,n){if(t.peek()=='}'){e--;if(e==0){n.tokenize.pop();return n.tokenize[n.tokenize.length-1](t,n)}} else if(t.peek()=='{'){e++};return a(t,n)};t.isBase=!0;return t};function f(e,t){var r=!1,n;while(n=e.next()){if(n=='/'&&r){t.tokenize.pop();break};r=(n=='*')};return'comment'};function l(e,t){return!e||e=='operator'||e=='->'||/[\.\[\{\(,;:]/.test(e)||e=='newstatement'||e=='keyword'||e=='proplabel'||(e=='standalone'&&!t)};function u(e,t,n,r,i){this.indented=e;this.column=t;this.type=n;this.align=r;this.prev=i};function o(e,t,n){return e.context=new u(e.indented,t,n,null,e.context)};function r(e){var t=e.context.type;if(t==')'||t==']'||t=='}')e.indented=e.context.indented;return e.context=e.context.prev};return{startState:function(e){return{tokenize:[a],context:new u((e||0)-t.indentUnit,0,'top',!1),indented:0,startOfLine:!0,lastToken:null}},token:function(t,e){var i=e.context;if(t.sol()){if(i.align==null)i.align=!1;e.indented=t.indentation();e.startOfLine=!0;if(i.type=='statement'&&!l(e.lastToken,!0)){r(e);i=e.context}};if(t.eatSpace())return null;n=null;var a=e.tokenize[e.tokenize.length-1](t,e);if(a=='comment')return a;if(i.align==null)i.align=!0;if((n==';'||n==':')&&i.type=='statement')r(e);else if(n=='->'&&i.type=='statement'&&i.prev.type=='}'){r(e);e.context.align=!1} else if(n=='{')o(e,t.column(),'}');else if(n=='[')o(e,t.column(),']');else if(n=='(')o(e,t.column(),')');else if(n=='}'){while(i.type=='statement')i=r(e);if(i.type=='}')i=r(e);while(i.type=='statement')i=r(e)} else if(n==i.type)r(e);else if(i.type=='}'||i.type=='top'||(i.type=='statement'&&n=='newstatement'))o(e,t.column(),'statement');e.startOfLine=!1;e.lastToken=n||a;return a},indent:function(n,r){if(!n.tokenize[n.tokenize.length-1].isBase)return e.Pass;var a=r&&r.charAt(0),i=n.context;if(i.type=='statement'&&!l(n.lastToken,!0))i=i.prev;var o=a==i.type;if(i.type=='statement')return i.indented+(a=='{'?0:t.indentUnit);else if(i.align)return i.column+(o?0:1);else return i.indented+(o?0:t.indentUnit)},electricChars:'{}',closeBrackets:{triples:'\'"'},fold:'brace'}});e.defineMIME('text/x-groovy','groovy')}); -/* Include script: simplemde */ +/* Include script: simplemde.min.js */ /** * simplemde v1.11.2 * Copyright Next Step Webs, Inc. @@ -1578,10 +1576,10 @@ if(a)return a}}},da=e.isModifierKey=function(e){var t="string"==typeof e?e:ol[e. h(r);var l=t.sol(),s=t.next();if(r.linkTitle){r.linkTitle=!1;var u=s;"("===s&&(u=")"),u=(u+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1");var f="^\\s*(?:[^"+u+"\\\\]+|\\\\\\\\|\\\\.)"+u;if(t.match(new RegExp(f),!0))return S.linkHref}if("`"===s){var d=r.formatting;n.highlightFormatting&&(r.formatting="code"),t.eatWhile("`");var p=t.current().length;if(0==r.code)return r.code=p,h(r);if(p==r.code){var v=h(r);return r.code=0,v}return r.formatting=d,h(r)}if(r.code)return h(r);if("\\"===s&&(t.next(),n.highlightFormatting)){var y=h(r),x=S.formatting+"-escape";return y?y+" "+x:x}if("!"===s&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return t.match(/\[[^\]]*\]/),r.inline=r.f=g,S.image;if("["===s&&t.match(/[^\]]*\](\(.*\)| ?\[.*?\])/,!1))return r.linkText=!0,n.highlightFormatting&&(r.formatting="link"),h(r);if("]"===s&&r.linkText&&t.match(/\(.*?\)| ?\[.*?\]/,!1)){n.highlightFormatting&&(r.formatting="link");var y=h(r);return r.linkText=!1,r.inline=r.f=g,y}if("<"===s&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=m,n.highlightFormatting&&(r.formatting="link");var y=h(r);return y?y+=" ":y="",y+S.linkInline}if("<"===s&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){r.f=r.inline=m,n.highlightFormatting&&(r.formatting="link");var y=h(r);return y?y+=" ":y="",y+S.linkEmail}if("<"===s&&t.match(/^(!--|\w)/,!1)){var b=t.string.indexOf(">",t.pos);if(-1!=b){var k=t.string.substring(t.start,b);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(k)&&(r.md_inside=!0)}return t.backUp(1),r.htmlState=e.startState(w),o(t,r,c)}if("<"===s&&t.match(/^\/\w*?>/))return r.md_inside=!1,"tag";var C=!1;if(!n.underscoresBreakWords&&"_"===s&&"_"!==t.peek()&&t.match(/(\w)/,!1)){var L=t.pos-2;if(L>=0){var T=t.string.charAt(L);"_"!==T&&T.match(/(\w)/,!1)&&(C=!0)}}if("*"===s||"_"===s&&!C)if(l&&" "===t.peek());else{if(r.strong===s&&t.eat(s)){n.highlightFormatting&&(r.formatting="strong");var v=h(r);return r.strong=!1,v}if(!r.strong&&t.eat(s))return r.strong=s,n.highlightFormatting&&(r.formatting="strong"),h(r);if(r.em===s){n.highlightFormatting&&(r.formatting="em");var v=h(r);return r.em=!1,v}if(!r.em)return r.em=s,n.highlightFormatting&&(r.formatting="em"),h(r)}else if(" "===s&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return h(r);t.backUp(1)}if(n.strikethrough)if("~"===s&&t.eatWhile(s)){if(r.strikethrough){n.highlightFormatting&&(r.formatting="strikethrough");var v=h(r);return r.strikethrough=!1,v}if(t.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),h(r)}else if(" "===s&&t.match(/^~~/,!0)){if(" "===t.peek())return h(r);t.backUp(2)}return" "===s&&(t.match(/ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),h(r)}function m(e,t){var r=e.next();if(">"===r){t.f=t.inline=p,n.highlightFormatting&&(t.formatting="link");var i=h(t);return i?i+=" ":i="",i+S.linkInline}return e.match(/^[^>]+/,!0),S.linkInline}function g(e,t){if(e.eatSpace())return null;var r=e.next();return"("===r||"["===r?(t.f=t.inline=v("("===r?")":"]",0),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,h(t)):"error"}function v(e){return function(t,r){var i=t.next();if(i===e){r.f=r.inline=p,n.highlightFormatting&&(r.formatting="link-string");var o=h(r);return r.linkHref=!1,o}return t.match(P[e]),r.linkHref=!0,h(r)}}function y(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=x,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,h(t)):i(e,t,p)}function x(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=b,n.highlightFormatting&&(t.formatting="link");var r=h(t);return t.linkText=!1,r}return e.match(/^([^\]\\]|\\.)+/,!0),S.linkText}function b(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=p,S.linkHref+" url")}var w=e.getMode(t,"text/html"),k="null"==w.name;void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.underscoresBreakWords&&(n.underscoresBreakWords=!0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var S={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"tag",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough"};for(var C in S)S.hasOwnProperty(C)&&n.tokenTypeOverrides[C]&&(S[C]=n.tokenTypeOverrides[C]);var L=/^([*\-_])(?:\s*\1){2,}\s*$/,T=/^[*\-+]\s+/,M=/^[0-9]+([.)])\s+/,N=/^\[(x| )\](?=\s)/,A=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,E=/^ *(?:\={1,}|-{1,})\s*$/,O=/^[^#!\[\]*_\\<>` "'(~]+/,I=new RegExp("^("+(n.fencedCodeBlocks===!0?"~~~+|```+":n.fencedCodeBlocks)+")[ \\t]*([\\w+#-]*)"),P={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\\]]|\\.)*\])*?(?=\])/},R={startState:function(){return{f:s,prevLine:null,thisLine:null,block:s,htmlState:null,indentation:0,inline:p,text:d,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,fencedChars:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(w,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkTitle:t.linkTitle,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,header:t.header,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedChars:t.fencedChars}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine){var n=t.header||t.hr;if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0)||n){if(l(t),!n)return null;t.prevLine=null}t.prevLine=t.thisLine,t.thisLine=e,t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.f=t.block;var r=e.match(/^\s*/,!0)[0].replace(/\t/g," ").length;if(t.indentationDiff=Math.min(r-t.indentation,4),t.indentation=t.indentation+t.indentationDiff,r>0)return null}return t.f(e,t)},innerMode:function(e){return e.block==c?{state:e.htmlState,mode:w}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:R}},blankLine:l,getType:h,fold:"markdown"};return R},"xml"),e.defineMIME("text/x-markdown","markdown")})},{"../../lib/codemirror":10,"../meta":13,"../xml/xml":14}],13:[function(t,n,r){!function(i){"object"==typeof r&&"object"==typeof n?i(t("../lib/codemirror")):"function"==typeof e&&e.amd?e(["../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["pgp"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists.txt$/},{name:"CoffeeScript",mime:"text/x-coffeescript",mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history).md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"]},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Jade",mime:"text/x-jade",mode:"jade",ext:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"null",mode:"jinja2"},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mime:"text/n-triples",mode:"ntriples",ext:["nt"]},{name:"Objective C",mime:"text/x-objectivec",mode:"clike",ext:["m","mm"],alias:["objective-c","objc"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mime:"application/x-httpd-php",mode:"php",ext:["php","php3","php4","php5","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mime:"text/x-sh",mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki ",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mime:"text/x-yaml",mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.mime==t)return r;if(r.mimes)for(var i=0;i<r.mimes.length;i++)if(r.mimes[i]==t)return r}},e.findModeByExtension=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.ext)for(var i=0;i<r.ext.length;i++)if(r.ext[i]==t)return r}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.file&&r.file.test(t))return r}var i=t.lastIndexOf("."),o=i>-1&&t.substring(i+1,t.length);return o?e.findModeByExtension(o):void 0},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var r=e.modeInfo[n];if(r.name.toLowerCase()==t)return r;if(r.alias)for(var i=0;i<r.alias.length;i++)if(r.alias[i].toLowerCase()==t)return r}}})},{"../lib/codemirror":10}],14:[function(t,n,r){!function(i){"object"==typeof r&&"object"==typeof n?i(t("../../lib/codemirror")):"function"==typeof e&&e.amd?e(["../../lib/codemirror"],i):i(CodeMirror)}(function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};e.defineMode("xml",function(r,i){function o(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();if("<"==r)return e.eat("!")?e.eat("[")?e.match("CDATA[")?n(s("atom","]]>")):null:e.match("--")?n(s("comment","-->")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(c(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=s("meta","?>"),"meta"):(T=e.eat("/")?"closeTag":"openTag",t.tokenize=a,"tag bracket");if("&"==r){var i;return i=e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"),i?"atom":"error"}return e.eatWhile(/[^&<]/),null}function a(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=o,T=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return T="equals",null;if("<"==n){t.tokenize=o,t.state=d,t.tagName=t.tagStart=null;var r=t.tokenize(e,t);return r?r+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=l(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function l(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=a;break}return"string"};return t.isInAttribute=!0,t}function s(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=o;break}n.next()}return e}}function c(e){return function(t,n){for(var r;null!=(r=t.next());){if("<"==r)return n.tokenize=c(e+1),n.tokenize(t,n);if(">"==r){if(1==e){n.tokenize=o;break}return n.tokenize=c(e-1),n.tokenize(t,n)}}return"meta"}}function u(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(S.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function f(e){e.context&&(e.context=e.context.prev)}function h(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!S.contextGrabbers.hasOwnProperty(n)||!S.contextGrabbers[n].hasOwnProperty(t))return;f(e)}}function d(e,t,n){return"openTag"==e?(n.tagStart=t.column(),p):"closeTag"==e?m:d}function p(e,t,n){return"word"==e?(n.tagName=t.current(),M="tag",y):(M="error",p)}function m(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&S.implicitlyClosed.hasOwnProperty(n.context.tagName)&&f(n),n.context&&n.context.tagName==r||S.matchClosing===!1?(M="tag",g):(M="tag error",v)}return M="error",v}function g(e,t,n){return"endTag"!=e?(M="error",g):(f(n),d)}function v(e,t,n){return M="error",g(e,t,n)}function y(e,t,n){if("word"==e)return M="attribute",x;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||S.autoSelfClosers.hasOwnProperty(r)?h(n,r):(h(n,r),n.context=new u(n,r,i==n.indented)),d}return M="error",y}function x(e,t,n){return"equals"==e?b:(S.allowMissing||(M="error"),y(e,t,n))}function b(e,t,n){return"string"==e?w:"word"==e&&S.allowUnquoted?(M="string",y):(M="error",y(e,t,n))}function w(e,t,n){return"string"==e?w:y(e,t,n)}var k=r.indentUnit,S={},C=i.htmlMode?t:n;for(var L in C)S[L]=C[L];for(var L in i)S[L]=i[L];var T,M;return o.isInText=!0,{startState:function(e){var t={tokenize:o,state:d,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;T=null;var n=t.tokenize(e,t);return(n||T)&&"comment"!=n&&(M=null,t.state=t.state(T||n,e,t),M&&(n="error"==M?n+" error":M)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+k;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=a&&t.tokenize!=o)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return S.multilineTagIndentPastTag!==!1?t.tagStart+t.tagName.length+2:t.tagStart+k*(S.multilineTagIndentFactor||1);if(S.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var l=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(l&&l[1])for(;i;){if(i.tagName==l[2]){i=i.prev;break}if(!S.implicitlyClosed.hasOwnProperty(i.tagName))break;i=i.prev}else if(l)for(;i;){var s=S.contextGrabbers[i.tagName];if(!s||!s.hasOwnProperty(l[2]))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+k:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:S.htmlMode?"html":"xml",helperType:S.htmlMode?"html":"xml",skipAttribute:function(e){e.state==b&&(e.state=y)}}}),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})})},{"../../lib/codemirror":10}],15:[function(e,t,n){n.read=function(e,t,n,r,i){var o,a,l=8*i-r-1,s=(1<<l)-1,c=s>>1,u=-7,f=n?i-1:0,h=n?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-u)-1,d>>=-u,u+=l;u>0;o=256*o+e[t+f],f+=h,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+f],f+=h,u-=8);if(0===o)o=1-c;else{if(o===s)return a?NaN:(d?-1:1)*(1/0);a+=Math.pow(2,r),o-=c}return(d?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,l,s,c=8*o-i-1,u=(1<<c)-1,f=u>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:o-1,p=r?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(l=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-a))<1&&(a--,s*=2),t+=a+f>=1?h/s:h*Math.pow(2,1-f),t*s>=2&&(a++,s/=2),a+f>=u?(l=0,a=u):a+f>=1?(l=(t*s-1)*Math.pow(2,i),a+=f):(l=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+d]=255&l,d+=p,l/=256,i-=8);for(a=a<<i|l,c+=i;c>0;e[n+d]=255&a,d+=p,a/=256,c-=8);e[n+d-p]|=128*m}},{}],16:[function(e,t,n){var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],17:[function(t,n,r){(function(t){(function(){function t(e){this.tokens=[],this.tokens.links={},this.options=e||h.defaults,this.rules=d.normal,this.options.gfm&&(this.options.tables?this.rules=d.tables:this.rules=d.gfm)}function i(e,t){if(this.options=t||h.defaults,this.links=e,this.rules=p.normal,this.renderer=this.options.renderer||new o,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.options.breaks?this.rules=p.breaks:this.rules=p.gfm:this.options.pedantic&&(this.rules=p.pedantic)}function o(e){this.options=e||{}}function a(e){this.tokens=[],this.token=null,this.options=e||h.defaults,this.options.renderer=this.options.renderer||new o,this.renderer=this.options.renderer,this.renderer.options=this.options}function l(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function s(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""})}function c(e,t){return e=e.source,t=t||"",function n(r,i){return r?(i=i.source||i,i=i.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,i),n):new RegExp(e,t)}}function u(){}function f(e){for(var t,n,r=1;r<arguments.length;r++){t=arguments[r];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function h(e,n,r){if(r||"function"==typeof n){r||(r=n,n=null),n=f({},h.defaults,n||{});var i,o,s=n.highlight,c=0;try{i=t.lex(e,n)}catch(u){return r(u)}o=i.length;var d=function(e){if(e)return n.highlight=s,r(e);var t;try{t=a.parse(i,n)}catch(o){e=o}return n.highlight=s,e?r(e):r(null,t)};if(!s||s.length<3)return d();if(delete n.highlight,!o)return d();for(;c<i.length;c++)!function(e){return"code"!==e.type?--o||d():s(e.text,e.lang,function(t,n){return t?d(t):null==n||n===e.text?--o||d():(e.text=n,e.escaped=!0,void(--o||d()))})}(i[c])}else try{return n&&(n=f({},h.defaults,n)),a.parse(t.lex(e,n),n)}catch(u){if(u.message+="\nPlease report this to https://github.com/chjj/marked.",(n||h.defaults).silent)return"<p>An error occured:</p><pre>"+l(u.message+"",!0)+"</pre>";throw u}}var d={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:u,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:u,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:u,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};d.bullet=/(?:[*+-]|\d+\.)/,d.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,d.item=c(d.item,"gm")(/bull/g,d.bullet)(),d.list=c(d.list)(/bull/g,d.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+d.def.source+")")(),d.blockquote=c(d.blockquote)("def",d.def)(),d._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",d.html=c(d.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,d._tag)(),d.paragraph=c(d.paragraph)("hr",d.hr)("heading",d.heading)("lheading",d.lheading)("blockquote",d.blockquote)("tag","<"+d._tag)("def",d.def)(),d.normal=f({},d),d.gfm=f({},d.normal,{fences:/^ *(`{3,}|~{3,})[ \.]*(\S+)? *\n([\s\S]*?)\s*\1 *(?:\n+|$)/,paragraph:/^/,heading:/^ *(#{1,6}) +([^\n]+?) *#* *(?:\n+|$)/}),d.gfm.paragraph=c(d.paragraph)("(?!","(?!"+d.gfm.fences.source.replace("\\1","\\2")+"|"+d.list.source.replace("\\1","\\3")+"|")(),d.tables=f({},d.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),t.rules=d,t.lex=function(e,n){var r=new t(n);return r.lex(e)},t.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},t.prototype.token=function(e,t,n){for(var r,i,o,a,l,s,c,u,f,e=e.replace(/^ +$/gm,"");e;)if((o=this.rules.newline.exec(e))&&(e=e.substring(o[0].length),o[0].length>1&&this.tokens.push({type:"space"})),o=this.rules.code.exec(e))e=e.substring(o[0].length),o=o[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?o:o.replace(/\n+$/,"")});else if(o=this.rules.fences.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"code",lang:o[2],text:o[3]||""});else if(o=this.rules.heading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:o[1].length,text:o[2]});else if(t&&(o=this.rules.nptable.exec(e))){for(e=e.substring(o[0].length),s={type:"table",header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/\n$/,"").split("\n")},u=0;u<s.align.length;u++)/^ *-+: *$/.test(s.align[u])?s.align[u]="right":/^ *:-+: *$/.test(s.align[u])?s.align[u]="center":/^ *:-+ *$/.test(s.align[u])?s.align[u]="left":s.align[u]=null;for(u=0;u<s.cells.length;u++)s.cells[u]=s.cells[u].split(/ *\| */);this.tokens.push(s)}else if(o=this.rules.lheading.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"heading",depth:"="===o[2]?1:2,text:o[1]});else if(o=this.rules.hr.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"hr"});else if(o=this.rules.blockquote.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"blockquote_start"}),o=o[0].replace(/^ *> ?/gm,""),this.token(o,t,!0),this.tokens.push({type:"blockquote_end"});else if(o=this.rules.list.exec(e)){for(e=e.substring(o[0].length),a=o[2],this.tokens.push({type:"list_start",ordered:a.length>1}),o=o[0].match(this.rules.item),r=!1,f=o.length,u=0;f>u;u++)s=o[u],c=s.length,s=s.replace(/^ *([*+-]|\d+\.) +/,""),~s.indexOf("\n ")&&(c-=s.length,s=this.options.pedantic?s.replace(/^ {1,4}/gm,""):s.replace(new RegExp("^ {1,"+c+"}","gm"),"")),this.options.smartLists&&u!==f-1&&(l=d.bullet.exec(o[u+1])[0],a===l||a.length>1&&l.length>1||(e=o.slice(u+1).join("\n")+e,u=f-1)),i=r||/\n\n(?!\s*$)/.test(s),u!==f-1&&(r="\n"===s.charAt(s.length-1),i||(i=r)),this.tokens.push({type:i?"loose_item_start":"list_item_start"}),this.token(s,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(o=this.rules.html.exec(e))e=e.substring(o[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:!this.options.sanitizer&&("pre"===o[1]||"script"===o[1]||"style"===o[1]),text:o[0]});else if(!n&&t&&(o=this.rules.def.exec(e)))e=e.substring(o[0].length),this.tokens.links[o[1].toLowerCase()]={href:o[2],title:o[3]};else if(t&&(o=this.rules.table.exec(e))){for(e=e.substring(o[0].length),s={type:"table", header:o[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:o[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:o[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u<s.align.length;u++)/^ *-+: *$/.test(s.align[u])?s.align[u]="right":/^ *:-+: *$/.test(s.align[u])?s.align[u]="center":/^ *:-+ *$/.test(s.align[u])?s.align[u]="left":s.align[u]=null;for(u=0;u<s.cells.length;u++)s.cells[u]=s.cells[u].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(s)}else if(t&&(o=this.rules.paragraph.exec(e)))e=e.substring(o[0].length),this.tokens.push({type:"paragraph",text:"\n"===o[1].charAt(o[1].length-1)?o[1].slice(0,-1):o[1]});else if(o=this.rules.text.exec(e))e=e.substring(o[0].length),this.tokens.push({type:"text",text:o[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var p={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:u,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:[^_]|__)+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:u,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};p._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,p._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,p.link=c(p.link)("inside",p._inside)("href",p._href)(),p.reflink=c(p.reflink)("inside",p._inside)(),p.normal=f({},p),p.pedantic=f({},p.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),p.gfm=f({},p.normal,{escape:c(p.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:c(p.text)("]|","~]|")("|","|https?://|")()}),p.breaks=f({},p.gfm,{br:c(p.br)("{2,}","*")(),text:c(p.gfm.text)("{2,}","*")()}),i.rules=p,i.output=function(e,t,n){var r=new i(t,n);return r.output(e)},i.prototype.output=function(e){for(var t,n,r,i,o="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),o+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=":"===i[1].charAt(6)?this.mangle(i[1].substring(7)):this.mangle(i[1]),r=this.mangle("mailto:")+n):(n=l(i[1]),r=n),o+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(i[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),o+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):l(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,o+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){o+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,o+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),o+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),o+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),o+=this.renderer.codespan(l(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),o+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),o+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),o+=this.renderer.text(l(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=l(i[1]),r=n,o+=this.renderer.link(r,null,n);return o},i.prototype.outputLink=function(e,t){var n=l(t.href),r=t.title?l(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,l(e[1]))},i.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014\/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014\/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},i.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",r=e.length,i=0;r>i;i++)t=e.charCodeAt(i),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},o.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'<pre><code class="'+this.options.langPrefix+l(t,!0)+'">'+(n?e:l(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:l(e,!0))+"\n</code></pre>"},o.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},o.prototype.html=function(e){return e},o.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},o.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},o.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"</"+n+">\n"},o.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},o.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},o.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},o.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},o.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"</"+n+">\n"},o.prototype.strong=function(e){return"<strong>"+e+"</strong>"},o.prototype.em=function(e){return"<em>"+e+"</em>"},o.prototype.codespan=function(e){return"<code>"+e+"</code>"},o.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},o.prototype.del=function(e){return"<del>"+e+"</del>"},o.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(s(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(i){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var o='<a href="'+e+'"';return t&&(o+=' title="'+t+'"'),o+=">"+n+"</a>"},o.prototype.image=function(e,t,n){var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},o.prototype.text=function(e){return e},a.parse=function(e,t,n){var r=new a(t,n);return r.parse(e)},a.prototype.parse=function(e){this.inline=new i(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},a.prototype.next=function(){return this.token=this.tokens.pop()},a.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},a.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},a.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,i,o="",a="";for(n="",e=0;e<this.token.header.length;e++)r={header:!0,align:this.token.align[e]},n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(o+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",i=0;i<t.length;i++)n+=this.renderer.tablecell(this.inline.output(t[i]),{header:!1,align:this.token.align[i]});a+=this.renderer.tablerow(n)}return this.renderer.table(o,a);case"blockquote_start":for(var a="";"blockquote_end"!==this.next().type;)a+=this.tok();return this.renderer.blockquote(a);case"list_start":for(var a="",l=this.token.ordered;"list_end"!==this.next().type;)a+=this.tok();return this.renderer.list(a,l);case"list_item_start":for(var a="";"list_item_end"!==this.next().type;)a+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(a);case"loose_item_start":for(var a="";"list_item_end"!==this.next().type;)a+=this.tok();return this.renderer.listitem(a);case"html":var s=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(s);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},u.exec=u,h.options=h.setOptions=function(e){return f(h.defaults,e),h},h.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,sanitizer:null,mangle:!0,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new o,xhtml:!1},h.Parser=a,h.parser=a.parse,h.Renderer=o,h.Lexer=t,h.lexer=t.lex,h.InlineLexer=i,h.inlineLexer=i.output,h.parse=h,"undefined"!=typeof n&&"object"==typeof r?n.exports=h:"function"==typeof e&&e.amd?e(function(){return h}):this.marked=h}).call(function(){return this||("undefined"!=typeof window?window:t)}())}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],18:[function(e,t,n){(function(n,r){"use strict";var i=function(e,t,n,i){if(i=i||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=i.flags||{},e){if(this.dictionary=e,"undefined"!=typeof window&&"chrome"in window&&"extension"in window.chrome&&"getURL"in window.chrome.extension)t||(t=this._readFile(chrome.extension.getURL("lib/typo/dictionaries/"+e+"/"+e+".aff"))),n||(n=this._readFile(chrome.extension.getURL("lib/typo/dictionaries/"+e+"/"+e+".dic")));else{if(i.dictionaryPath)var o=i.dictionaryPath;else if("undefined"!=typeof r)var o=r+"/dictionaries";else var o="./dictionaries";t||(t=this._readFile(o+"/"+e+"/"+e+".aff")),n||(n=this._readFile(o+"/"+e+"/"+e+".dic"))}this.rules=this._parseAFF(t),this.compoundRuleCodes={};for(var a=0,l=this.compoundRules.length;l>a;a++)for(var s=this.compoundRules[a],c=0,u=s.length;u>c;c++)this.compoundRuleCodes[s[c]]=[];"ONLYINCOMPOUND"in this.flags&&(this.compoundRuleCodes[this.flags.ONLYINCOMPOUND]=[]),this.dictionaryTable=this._parseDIC(n);for(var a in this.compoundRuleCodes)0==this.compoundRuleCodes[a].length&&delete this.compoundRuleCodes[a];for(var a=0,l=this.compoundRules.length;l>a;a++){for(var f=this.compoundRules[a],h="",c=0,u=f.length;u>c;c++){var d=f[c];h+=d in this.compoundRuleCodes?"("+this.compoundRuleCodes[d].join("|")+")":d}this.compoundRules[a]=new RegExp(h,"i")}}return this};i.prototype={load:function(e){for(var t in e)this[t]=e[t];return this},_readFile:function(t,r){if(r||(r="utf8"),"undefined"!=typeof XMLHttpRequest){var i=new XMLHttpRequest;return i.open("GET",t,!1),i.overrideMimeType&&i.overrideMimeType("text/plain; charset="+r),i.send(null),i.responseText}if("undefined"!=typeof e){var o=e("fs");try{if(o.existsSync(t)){var a=o.statSync(t),l=o.openSync(t,"r"),s=new n(a.size);return o.readSync(l,s,0,s.length,null),s.toString(r,0,s.length)}console.log("Path "+t+" does not exist.")}catch(c){return console.log(c),""}}},_parseAFF:function(e){var t={};e=this._removeAffixComments(e);for(var n=e.split("\n"),r=0,i=n.length;i>r;r++){var o=n[r],a=o.split(/\s+/),l=a[0];if("PFX"==l||"SFX"==l){for(var s=a[1],c=a[2],u=parseInt(a[3],10),f=[],h=r+1,d=r+1+u;d>h;h++){var o=n[h],p=o.split(/\s+/),m=p[2],g=p[3].split("/"),v=g[0];"0"===v&&(v="");var y=this.parseRuleCodes(g[1]),x=p[4],b={};b.add=v,y.length>0&&(b.continuationClasses=y),"."!==x&&("SFX"===l?b.match=new RegExp(x+"$"):b.match=new RegExp("^"+x)),"0"!=m&&("SFX"===l?b.remove=new RegExp(m+"$"):b.remove=m),f.push(b)}t[s]={type:l,combineable:"Y"==c,entries:f},r+=u}else if("COMPOUNDRULE"===l){for(var u=parseInt(a[1],10),h=r+1,d=r+1+u;d>h;h++){var o=n[h],p=o.split(/\s+/);this.compoundRules.push(p[1])}r+=u}else if("REP"===l){var p=o.split(/\s+/);3===p.length&&this.replacementTable.push([p[1],p[2]])}else this.flags[l]=a[1]}return t},_removeAffixComments:function(e){return e=e.replace(/#.*$/gm,""),e=e.replace(/^\s\s*/m,"").replace(/\s\s*$/m,""),e=e.replace(/\n{2,}/g,"\n"),e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},_parseDIC:function(e){function t(e,t){e in r&&"object"==typeof r[e]||(r[e]=[]),r[e].push(t)}e=this._removeDicComments(e);for(var n=e.split("\n"),r={},i=1,o=n.length;o>i;i++){var a=n[i],l=a.split("/",2),s=l[0];if(l.length>1){var c=this.parseRuleCodes(l[1]);"NEEDAFFIX"in this.flags&&-1!=c.indexOf(this.flags.NEEDAFFIX)||t(s,c);for(var u=0,f=c.length;f>u;u++){var h=c[u],d=this.rules[h];if(d)for(var p=this._applyRule(s,d),m=0,g=p.length;g>m;m++){var v=p[m];if(t(v,[]),d.combineable)for(var y=u+1;f>y;y++){var x=c[y],b=this.rules[x];if(b&&b.combineable&&d.type!=b.type)for(var w=this._applyRule(v,b),k=0,S=w.length;S>k;k++){var C=w[k];t(C,[])}}}h in this.compoundRuleCodes&&this.compoundRuleCodes[h].push(s)}}else t(s.trim(),[])}return r},_removeDicComments:function(e){return e=e.replace(/^\t.*$/gm,"")},parseRuleCodes:function(e){if(!e)return[];if(!("FLAG"in this.flags))return e.split("");if("long"===this.flags.FLAG){for(var t=[],n=0,r=e.length;r>n;n+=2)t.push(e.substr(n,2));return t}return"num"===this.flags.FLAG?textCode.split(","):void 0},_applyRule:function(e,t){for(var n=t.entries,r=[],i=0,o=n.length;o>i;i++){var a=n[i];if(!a.match||e.match(a.match)){var l=e;if(a.remove&&(l=l.replace(a.remove,"")),"SFX"===t.type?l+=a.add:l=a.add+l,r.push(l),"continuationClasses"in a)for(var s=0,c=a.continuationClasses.length;c>s;s++){var u=this.rules[a.continuationClasses[s]];u&&(r=r.concat(this._applyRule(l,u)))}}}return r},check:function(e){var t=e.replace(/^\s\s*/,"").replace(/\s\s*$/,"");if(this.checkExact(t))return!0;if(t.toUpperCase()===t){var n=t[0]+t.substring(1).toLowerCase();if(this.hasFlag(n,"KEEPCASE"))return!1;if(this.checkExact(n))return!0}var r=t.toLowerCase();if(r!==t){if(this.hasFlag(r,"KEEPCASE"))return!1;if(this.checkExact(r))return!0}return!1},checkExact:function(e){var t=this.dictionaryTable[e];if("undefined"==typeof t){if("COMPOUNDMIN"in this.flags&&e.length>=this.flags.COMPOUNDMIN)for(var n=0,r=this.compoundRules.length;r>n;n++)if(e.match(this.compoundRules[n]))return!0;return!1}if("object"==typeof t){for(var n=0,r=t.length;r>n;n++)if(!this.hasFlag(e,"ONLYINCOMPOUND",t[n]))return!0;return!1}},hasFlag:function(e,t,n){if(t in this.flags){if("undefined"==typeof n)var n=Array.prototype.concat.apply([],this.dictionaryTable[e]);if(n&&-1!==n.indexOf(this.flags[t]))return!0}return!1},alphabet:"",suggest:function(e,t){function n(e){for(var t=[],n=0,r=e.length;r>n;n++){for(var i=e[n],o=[],a=0,l=i.length+1;l>a;a++)o.push([i.substring(0,a),i.substring(a,i.length)]);for(var s=[],a=0,l=o.length;l>a;a++){var u=o[a];u[1]&&s.push(u[0]+u[1].substring(1))}for(var f=[],a=0,l=o.length;l>a;a++){var u=o[a];u[1].length>1&&f.push(u[0]+u[1][1]+u[1][0]+u[1].substring(2))}for(var h=[],a=0,l=o.length;l>a;a++){var u=o[a];if(u[1])for(var d=0,p=c.alphabet.length;p>d;d++)h.push(u[0]+c.alphabet[d]+u[1].substring(1))}for(var m=[],a=0,l=o.length;l>a;a++){var u=o[a];if(u[1])for(var d=0,p=c.alphabet.length;p>d;d++)h.push(u[0]+c.alphabet[d]+u[1])}t=t.concat(s),t=t.concat(f),t=t.concat(h),t=t.concat(m)}return t}function r(e){for(var t=[],n=0;n<e.length;n++)c.check(e[n])&&t.push(e[n]);return t}function i(e){function i(e,t){return e[1]<t[1]?-1:1}for(var o=n([e]),a=n(o),l=r(o).concat(r(a)),s={},u=0,f=l.length;f>u;u++)l[u]in s?s[l[u]]+=1:s[l[u]]=1;var h=[];for(var u in s)h.push([u,s[u]]);h.sort(i).reverse();for(var d=[],u=0,f=Math.min(t,h.length);f>u;u++)c.hasFlag(h[u][0],"NOSUGGEST")||d.push(h[u][0]);return d}if(t||(t=5),this.check(e))return[];for(var o=0,a=this.replacementTable.length;a>o;o++){var l=this.replacementTable[o];if(-1!==e.indexOf(l[0])){var s=e.replace(l[0],l[1]);if(this.check(s))return[s]}}var c=this;return c.alphabet="abcdefghijklmnopqrstuvwxyz",i(e)}},"undefined"!=typeof t&&(t.exports=i)}).call(this,e("buffer").Buffer,"/node_modules/typo-js")},{buffer:3,fs:2}],19:[function(e,t,n){var r=e("codemirror");r.commands.tabAndIndentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head,r=e.getStateAfter(n.line),i=r.list!==!1;if(i)return void e.execCommand("indentMore");if(e.options.indentWithTabs)e.execCommand("insertTab");else{var o=Array(e.options.tabSize+1).join(" ");e.replaceSelection(o)}},r.commands.shiftTabAndUnindentMarkdownList=function(e){var t=e.listSelections(),n=t[0].head,r=e.getStateAfter(n.line),i=r.list!==!1;if(i)return void e.execCommand("indentLess");if(e.options.indentWithTabs)e.execCommand("insertTab");else{var o=Array(e.options.tabSize+1).join(" ");e.replaceSelection(o)}}},{codemirror:10}],20:[function(e,t,n){"use strict";function r(e){return e=U?e.replace("Ctrl","Cmd"):e.replace("Cmd","Ctrl")}function i(e,t,n){e=e||{};var r=document.createElement("a");return t=void 0==t?!0:t,e.title&&t&&(r.title=a(e.title,e.action,n),U&&(r.title=r.title.replace("Ctrl","⌘"),r.title=r.title.replace("Alt","⌥"))),r.tabIndex=-1,r.className=e.className,r}function o(){var e=document.createElement("i");return e.className="separator",e.innerHTML="|",e}function a(e,t,n){var i,o=e;return t&&(i=Y(t),n[i]&&(o+=" ("+r(n[i])+")")),o}function l(e,t){t=t||e.getCursor("start");var n=e.getTokenAt(t);if(!n.type)return{};for(var r,i,o=n.type.split(" "),a={},l=0;l<o.length;l++)r=o[l],"strong"===r?a.bold=!0:"variable-2"===r?(i=e.getLine(t.line),/^\s*\d+\.\s/.test(i)?a["ordered-list"]=!0:a["unordered-list"]=!0):"atom"===r?a.quote=!0:"em"===r?a.italic=!0:"quote"===r?a.quote=!0:"strikethrough"===r?a.strikethrough=!0:"comment"===r?a.code=!0:"link"===r?a.link=!0:"tag"===r?a.image=!0:r.match(/^header(\-[1-6])?$/)&&(a[r.replace("header","heading")]=!0);return a}function s(e){var t=e.codemirror;t.setOption("fullScreen",!t.getOption("fullScreen")),t.getOption("fullScreen")?(V=document.body.style.overflow,document.body.style.overflow="hidden"):document.body.style.overflow=V;var n=t.getWrapperElement();/fullscreen/.test(n.previousSibling.className)?n.previousSibling.className=n.previousSibling.className.replace(/\s*fullscreen\b/,""):n.previousSibling.className+=" fullscreen";var r=e.toolbarElements.fullscreen;/active/.test(r.className)?r.className=r.className.replace(/\s*active\s*/g,""):r.className+=" active";var i=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(i.className)&&N(e)}function c(e){P(e,"bold",e.options.blockStyles.bold)}function u(e){P(e,"italic",e.options.blockStyles.italic)}function f(e){P(e,"strikethrough","~~")}function h(e){function t(e){if("object"!=typeof e)throw"fencing_line() takes a 'line' object (not a line number, or line text). Got: "+typeof e+": "+e;return e.styles&&e.styles[2]&&-1!==e.styles[2].indexOf("formatting-code-block")}function n(e){return e.state.base.base||e.state.base}function r(e,r,i,o,a){i=i||e.getLineHandle(r),o=o||e.getTokenAt({line:r,ch:1}),a=a||!!i.text&&e.getTokenAt({line:r,ch:i.text.length-1});var l=o.type?o.type.split(" "):[];return a&&n(a).indentedCode?"indented":-1===l.indexOf("comment")?!1:n(o).fencedChars||n(a).fencedChars||t(i)?"fenced":"single"}function i(e,t,n,r){var i=t.line+1,o=n.line+1,a=t.line!==n.line,l=r+"\n",s="\n"+r;a&&o++,a&&0===n.ch&&(s=r+"\n",o--),E(e,!1,[l,s]),e.setSelection({line:i,ch:0},{line:o,ch:0})}var o,a,l,s=e.options.blockStyles.code,c=e.codemirror,u=c.getCursor("start"),f=c.getCursor("end"),h=c.getTokenAt({line:u.line,ch:u.ch||1}),d=c.getLineHandle(u.line),p=r(c,u.line,d,h);if("single"===p){var m=d.text.slice(0,u.ch).replace("`",""),g=d.text.slice(u.ch).replace("`","");c.replaceRange(m+g,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),u.ch--,u!==f&&f.ch--,c.setSelection(u,f),c.focus()}else if("fenced"===p)if(u.line!==f.line||u.ch!==f.ch){for(o=u.line;o>=0&&(d=c.getLineHandle(o),!t(d));o--);var v,y,x,b,w=c.getTokenAt({line:o,ch:1}),k=n(w).fencedChars;t(c.getLineHandle(u.line))?(v="",y=u.line):t(c.getLineHandle(u.line-1))?(v="",y=u.line-1):(v=k+"\n",y=u.line),t(c.getLineHandle(f.line))?(x="",b=f.line,0===f.ch&&(b+=1)):0!==f.ch&&t(c.getLineHandle(f.line+1))?(x="",b=f.line+1):(x=k+"\n",b=f.line+1),0===f.ch&&(b-=1),c.operation(function(){c.replaceRange(x,{line:b,ch:0},{line:b+(x?0:1),ch:0}),c.replaceRange(v,{line:y,ch:0},{line:y+(v?0:1),ch:0})}),c.setSelection({line:y+(v?1:0),ch:0},{line:b+(v?1:-1),ch:0}),c.focus()}else{var S=u.line;if(t(c.getLineHandle(u.line))&&("fenced"===r(c,u.line+1)?(o=u.line,S=u.line+1):(a=u.line,S=u.line-1)),void 0===o)for(o=S;o>=0&&(d=c.getLineHandle(o),!t(d));o--);if(void 0===a)for(l=c.lineCount(),a=S;l>a&&(d=c.getLineHandle(a),!t(d));a++);c.operation(function(){c.replaceRange("",{line:o,ch:0},{line:o+1,ch:0}),c.replaceRange("",{line:a-1,ch:0},{line:a,ch:0})}),c.focus()}else if("indented"===p){if(u.line!==f.line||u.ch!==f.ch)o=u.line,a=f.line,0===f.ch&&a--;else{for(o=u.line;o>=0;o--)if(d=c.getLineHandle(o),!d.text.match(/^\s*$/)&&"indented"!==r(c,o,d)){o+=1;break}for(l=c.lineCount(),a=u.line;l>a;a++)if(d=c.getLineHandle(a),!d.text.match(/^\s*$/)&&"indented"!==r(c,a,d)){a-=1;break}}var C=c.getLineHandle(a+1),L=C&&c.getTokenAt({line:a+1,ch:C.text.length-1}),T=L&&n(L).indentedCode;T&&c.replaceRange("\n",{line:a+1,ch:0});for(var M=o;a>=M;M++)c.indentLine(M,"subtract");c.focus()}else{var N=u.line===f.line&&u.ch===f.ch&&0===u.ch,A=u.line!==f.line;N||A?i(c,u,f,s):E(c,!1,["`","`"])}}function d(e){var t=e.codemirror;I(t,"quote")}function p(e){var t=e.codemirror;O(t,"smaller")}function m(e){var t=e.codemirror;O(t,"bigger")}function g(e){var t=e.codemirror;O(t,void 0,1)}function v(e){var t=e.codemirror;O(t,void 0,2)}function y(e){var t=e.codemirror;O(t,void 0,3)}function x(e){var t=e.codemirror;I(t,"unordered-list")}function b(e){var t=e.codemirror;I(t,"ordered-list")}function w(e){var t=e.codemirror;R(t)}function k(e){var t=e.codemirror,n=l(t),r=e.options,i="http://";return r.promptURLs&&(i=prompt(r.promptTexts.link),!i)?!1:void E(t,n.link,r.insertTexts.link,i)}function S(e){var t=e.codemirror,n=l(t),r=e.options,i="http://";return r.promptURLs&&(i=prompt(r.promptTexts.image),!i)?!1:void E(t,n.image,r.insertTexts.image,i)}function C(e){var t=e.codemirror,n=l(t),r=e.options;E(t,n.table,r.insertTexts.table)}function L(e){var t=e.codemirror,n=l(t),r=e.options;E(t,n.image,r.insertTexts.horizontalRule)}function T(e){var t=e.codemirror;t.undo(),t.focus()}function M(e){var t=e.codemirror;t.redo(),t.focus()}function N(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.nextSibling,i=e.toolbarElements["side-by-side"],o=!1;/editor-preview-active-side/.test(r.className)?(r.className=r.className.replace(/\s*editor-preview-active-side\s*/g,""),i.className=i.className.replace(/\s*active\s*/g,""),n.className=n.className.replace(/\s*CodeMirror-sided\s*/g," ")):(setTimeout(function(){t.getOption("fullScreen")||s(e),r.className+=" editor-preview-active-side"},1),i.className+=" active",n.className+=" CodeMirror-sided",o=!0);var a=n.lastChild;if(/editor-preview-active/.test(a.className)){a.className=a.className.replace(/\s*editor-preview-active\s*/g,"");var l=e.toolbarElements.preview,c=n.previousSibling;l.className=l.className.replace(/\s*active\s*/g,""),c.className=c.className.replace(/\s*disabled-for-preview*/g,"")}var u=function(){r.innerHTML=e.options.previewRender(e.value(),r)};t.sideBySideRenderingFunction||(t.sideBySideRenderingFunction=u),o?(r.innerHTML=e.options.previewRender(e.value(),r),t.on("update",t.sideBySideRenderingFunction)):t.off("update",t.sideBySideRenderingFunction),t.refresh()}function A(e){var t=e.codemirror,n=t.getWrapperElement(),r=n.previousSibling,i=e.options.toolbar?e.toolbarElements.preview:!1,o=n.lastChild;o&&/editor-preview/.test(o.className)||(o=document.createElement("div"),o.className="editor-preview",n.appendChild(o)),/editor-preview-active/.test(o.className)?(o.className=o.className.replace(/\s*editor-preview-active\s*/g,""),i&&(i.className=i.className.replace(/\s*active\s*/g,""),r.className=r.className.replace(/\s*disabled-for-preview*/g,""))):(setTimeout(function(){o.className+=" editor-preview-active"},1),i&&(i.className+=" active",r.className+=" disabled-for-preview")),o.innerHTML=e.options.previewRender(e.value(),o);var a=t.getWrapperElement().nextSibling;/editor-preview-active-side/.test(a.className)&&N(e)}function E(e,t,n,r){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){var i,o=n[0],a=n[1],l=e.getCursor("start"),s=e.getCursor("end");r&&(a=a.replace("#url#",r)),t?(i=e.getLine(l.line),o=i.slice(0,l.ch),a=i.slice(l.ch),e.replaceRange(o+a,{line:l.line,ch:0})):(i=e.getSelection(),e.replaceSelection(o+i+a),l.ch+=o.length,l!==s&&(s.ch+=o.length)),e.setSelection(l,s),e.focus()}}function O(e,t,n){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var r=e.getCursor("start"),i=e.getCursor("end"),o=r.line;o<=i.line;o++)!function(r){var i=e.getLine(r),o=i.search(/[^#]/);i=void 0!==t?0>=o?"bigger"==t?"###### "+i:"# "+i:6==o&&"smaller"==t?i.substr(7):1==o&&"bigger"==t?i.substr(2):"bigger"==t?i.substr(1):"#"+i:1==n?0>=o?"# "+i:o==n?i.substr(o+1):"# "+i.substr(o+1):2==n?0>=o?"## "+i:o==n?i.substr(o+1):"## "+i.substr(o+1):0>=o?"### "+i:o==n?i.substr(o+1):"### "+i.substr(o+1),e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})}(o);e.focus()}}function I(e,t){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className)){for(var n=l(e),r=e.getCursor("start"),i=e.getCursor("end"),o={quote:/^(\s*)\>\s+/,"unordered-list":/^(\s*)(\*|\-|\+)\s+/,"ordered-list":/^(\s*)\d+\.\s+/},a={quote:"> ","unordered-list":"* ","ordered-list":"1. "},s=r.line;s<=i.line;s++)!function(r){var i=e.getLine(r);i=n[t]?i.replace(o[t],"$1"):a[t]+i,e.replaceRange(i,{line:r,ch:0},{line:r,ch:99999999999999})}(s);e.focus()}}function P(e,t,n,r){if(!/editor-preview-active/.test(e.codemirror.getWrapperElement().lastChild.className)){r="undefined"==typeof r?n:r;var i,o=e.codemirror,a=l(o),s=n,c=r,u=o.getCursor("start"),f=o.getCursor("end");a[t]?(i=o.getLine(u.line),s=i.slice(0,u.ch),c=i.slice(u.ch),"bold"==t?(s=s.replace(/(\*\*|__)(?![\s\S]*(\*\*|__))/,""),c=c.replace(/(\*\*|__)/,"")):"italic"==t?(s=s.replace(/(\*|_)(?![\s\S]*(\*|_))/,""),c=c.replace(/(\*|_)/,"")):"strikethrough"==t&&(s=s.replace(/(\*\*|~~)(?![\s\S]*(\*\*|~~))/,""),c=c.replace(/(\*\*|~~)/,"")),o.replaceRange(s+c,{line:u.line,ch:0},{line:u.line,ch:99999999999999}),"bold"==t||"strikethrough"==t?(u.ch-=2,u!==f&&(f.ch-=2)):"italic"==t&&(u.ch-=1,u!==f&&(f.ch-=1))):(i=o.getSelection(),"bold"==t?(i=i.split("**").join(""),i=i.split("__").join("")):"italic"==t?(i=i.split("*").join(""),i=i.split("_").join("")):"strikethrough"==t&&(i=i.split("~~").join("")),o.replaceSelection(s+i+c),u.ch+=n.length,f.ch=u.ch+i.length),o.setSelection(u,f),o.focus()}}function R(e){if(!/editor-preview-active/.test(e.getWrapperElement().lastChild.className))for(var t,n=e.getCursor("start"),r=e.getCursor("end"),i=n.line;i<=r.line;i++)t=e.getLine(i),t=t.replace(/^[ ]*([# ]+|\*|\-|[> ]+|[0-9]+(.|\)))[ ]*/,""),e.replaceRange(t,{line:i,ch:0},{line:i,ch:99999999999999})}function D(e,t){for(var n in t)t.hasOwnProperty(n)&&(t[n]instanceof Array?e[n]=t[n].concat(e[n]instanceof Array?e[n]:[]):null!==t[n]&&"object"==typeof t[n]&&t[n].constructor===Object?e[n]=D(e[n]||{},t[n]):e[n]=t[n]);return e}function H(e){for(var t=1;t<arguments.length;t++)e=D(e,arguments[t]);return e}function W(e){var t=/[a-zA-Z0-9_\u0392-\u03c9\u0410-\u04F9]+|[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af]+/g,n=e.match(t),r=0;if(null===n)return r;for(var i=0;i<n.length;i++)r+=n[i].charCodeAt(0)>=19968?n[i].length:1;return r}function B(e){e=e||{},e.parent=this;var t=!0;if(e.autoDownloadFontAwesome===!1&&(t=!1),e.autoDownloadFontAwesome!==!0)for(var n=document.styleSheets,r=0;r<n.length;r++)n[r].href&&n[r].href.indexOf("//maxcdn.bootstrapcdn.com/font-awesome/")>-1&&(t=!1);if(t){var i=document.createElement("link");i.rel="stylesheet",i.href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css",document.getElementsByTagName("head")[0].appendChild(i)}if(e.element)this.element=e.element;else if(null===e.element)return void console.log("SimpleMDE: Error. No element was found.");if(void 0===e.toolbar){e.toolbar=[];for(var o in K)K.hasOwnProperty(o)&&(-1!=o.indexOf("separator-")&&e.toolbar.push("|"),(K[o]["default"]===!0||e.showIcons&&e.showIcons.constructor===Array&&-1!=e.showIcons.indexOf(o))&&e.toolbar.push(o))}e.hasOwnProperty("status")||(e.status=["autosave","lines","words","cursor"]),e.previewRender||(e.previewRender=function(e){return this.parent.markdown(e)}),e.parsingConfig=H({highlightFormatting:!0},e.parsingConfig||{}),e.insertTexts=H({},X,e.insertTexts||{}),e.promptTexts=Z,e.blockStyles=H({},J,e.blockStyles||{}),e.shortcuts=H({},G,e.shortcuts||{}),void 0!=e.autosave&&void 0!=e.autosave.unique_id&&""!=e.autosave.unique_id&&(e.autosave.uniqueId=e.autosave.unique_id),this.options=e,this.render(),!e.initialValue||this.options.autosave&&this.options.autosave.foundSavedValue===!0||this.value(e.initialValue)}function _(){if("object"!=typeof localStorage)return!1;try{localStorage.setItem("smde_localStorage",1),localStorage.removeItem("smde_localStorage")}catch(e){return!1}return!0}var F=e("codemirror");e("codemirror/addon/edit/continuelist.js"),e("./codemirror/tablist"),e("codemirror/addon/display/fullscreen.js"),e("codemirror/mode/markdown/markdown.js"),e("codemirror/addon/mode/overlay.js"),e("codemirror/addon/display/placeholder.js"),e("codemirror/addon/selection/mark-selection.js"),e("codemirror/mode/gfm/gfm.js"),e("codemirror/mode/xml/xml.js");var z=e("codemirror-spell-checker"),j=e("marked"),U=/Mac/.test(navigator.platform),q={toggleBold:c,toggleItalic:u,drawLink:k,toggleHeadingSmaller:p,toggleHeadingBigger:m,drawImage:S,toggleBlockquote:d,toggleOrderedList:b,toggleUnorderedList:x,toggleCodeBlock:h,togglePreview:A,toggleStrikethrough:f,toggleHeading1:g,toggleHeading2:v,toggleHeading3:y,cleanBlock:w,drawTable:C,drawHorizontalRule:L,undo:T,redo:M,toggleSideBySide:N,toggleFullScreen:s},G={toggleBold:"Cmd-B",toggleItalic:"Cmd-I",drawLink:"Cmd-K",toggleHeadingSmaller:"Cmd-H",toggleHeadingBigger:"Shift-Cmd-H",cleanBlock:"Cmd-E",drawImage:"Cmd-Alt-I",toggleBlockquote:"Cmd-'",toggleOrderedList:"Cmd-Alt-L",toggleUnorderedList:"Cmd-L",toggleCodeBlock:"Cmd-Alt-C",togglePreview:"Cmd-P",toggleSideBySide:"F9",toggleFullScreen:"F11"},Y=function(e){for(var t in q)if(q[t]===e)return t;return null},$=function(){var e=!1;return function(t){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(t)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(t.substr(0,4)))&&(e=!0); }(navigator.userAgent||navigator.vendor||window.opera),e},V="",K={bold:{name:"bold",action:c,className:"fa fa-bold",title:"Bold","default":!0},italic:{name:"italic",action:u,className:"fa fa-italic",title:"Italic","default":!0},strikethrough:{name:"strikethrough",action:f,className:"fa fa-strikethrough",title:"Strikethrough"},heading:{name:"heading",action:p,className:"fa fa-header",title:"Heading","default":!0},"heading-smaller":{name:"heading-smaller",action:p,className:"fa fa-header fa-header-x fa-header-smaller",title:"Smaller Heading"},"heading-bigger":{name:"heading-bigger",action:m,className:"fa fa-header fa-header-x fa-header-bigger",title:"Bigger Heading"},"heading-1":{name:"heading-1",action:g,className:"fa fa-header fa-header-x fa-header-1",title:"Big Heading"},"heading-2":{name:"heading-2",action:v,className:"fa fa-header fa-header-x fa-header-2",title:"Medium Heading"},"heading-3":{name:"heading-3",action:y,className:"fa fa-header fa-header-x fa-header-3",title:"Small Heading"},"separator-1":{name:"separator-1"},code:{name:"code",action:h,className:"fa fa-code",title:"Code"},quote:{name:"quote",action:d,className:"fa fa-quote-left",title:"Quote","default":!0},"unordered-list":{name:"unordered-list",action:x,className:"fa fa-list-ul",title:"Generic List","default":!0},"ordered-list":{name:"ordered-list",action:b,className:"fa fa-list-ol",title:"Numbered List","default":!0},"clean-block":{name:"clean-block",action:w,className:"fa fa-eraser fa-clean-block",title:"Clean block"},"separator-2":{name:"separator-2"},link:{name:"link",action:k,className:"fa fa-link",title:"Create Link","default":!0},image:{name:"image",action:S,className:"fa fa-picture-o",title:"Insert Image","default":!0},table:{name:"table",action:C,className:"fa fa-table",title:"Insert Table"},"horizontal-rule":{name:"horizontal-rule",action:L,className:"fa fa-minus",title:"Insert Horizontal Line"},"separator-3":{name:"separator-3"},preview:{name:"preview",action:A,className:"fa fa-eye no-disable",title:"Toggle Preview","default":!0},"side-by-side":{name:"side-by-side",action:N,className:"fa fa-columns no-disable no-mobile",title:"Toggle Side by Side","default":!0},fullscreen:{name:"fullscreen",action:s,className:"fa fa-arrows-alt no-disable no-mobile",title:"Toggle Fullscreen","default":!0},"separator-4":{name:"separator-4"},guide:{name:"guide",action:"https://simplemde.com/markdown-guide",className:"fa fa-question-circle",title:"Markdown Guide","default":!0},"separator-5":{name:"separator-5"},undo:{name:"undo",action:T,className:"fa fa-undo no-disable",title:"Undo"},redo:{name:"redo",action:M,className:"fa fa-repeat no-disable",title:"Redo"}},X={link:["[","](#url#)"],image:["![](","#url#)"],table:["","\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],horizontalRule:["","\n\n-----\n\n"]},Z={link:"URL for the link:",image:"URL of the image:"},J={bold:"**",code:"```",italic:"*"};B.prototype.markdown=function(e){if(j){var t={};return this.options&&this.options.renderingConfig&&this.options.renderingConfig.singleLineBreaks===!1?t.breaks=!1:t.breaks=!0,this.options&&this.options.renderingConfig&&this.options.renderingConfig.codeSyntaxHighlighting===!0&&window.hljs&&(t.highlight=function(e){return window.hljs.highlightAuto(e).value}),j.setOptions(t),j(e)}},B.prototype.render=function(e){if(e||(e=this.element||document.getElementsByTagName("textarea")[0]),!this._rendered||this._rendered!==e){this.element=e;var t=this.options,n=this,i={};for(var o in t.shortcuts)null!==t.shortcuts[o]&&null!==q[o]&&!function(e){i[r(t.shortcuts[e])]=function(){q[e](n)}}(o);i.Enter="newlineAndIndentContinueMarkdownList",i.Tab="tabAndIndentMarkdownList",i["Shift-Tab"]="shiftTabAndUnindentMarkdownList",i.Esc=function(e){e.getOption("fullScreen")&&s(n)},document.addEventListener("keydown",function(e){e=e||window.event,27==e.keyCode&&n.codemirror.getOption("fullScreen")&&s(n)},!1);var a,l;if(t.spellChecker!==!1?(a="spell-checker",l=t.parsingConfig,l.name="gfm",l.gitHubSpice=!1,z({codeMirrorInstance:F})):(a=t.parsingConfig,a.name="gfm",a.gitHubSpice=!1),this.codemirror=F.fromTextArea(e,{mode:a,backdrop:l,theme:"paper",tabSize:void 0!=t.tabSize?t.tabSize:2,indentUnit:void 0!=t.tabSize?t.tabSize:2,indentWithTabs:t.indentWithTabs!==!1,lineNumbers:!1,autofocus:t.autofocus===!0,extraKeys:i,lineWrapping:t.lineWrapping!==!1,allowDropFileTypes:["text/plain"],placeholder:t.placeholder||e.getAttribute("placeholder")||"",styleSelectedText:void 0!=t.styleSelectedText?t.styleSelectedText:!0}),t.forceSync===!0){var c=this.codemirror;c.on("change",function(){c.save()})}this.gui={},t.toolbar!==!1&&(this.gui.toolbar=this.createToolbar()),t.status!==!1&&(this.gui.statusbar=this.createStatusbar()),void 0!=t.autosave&&t.autosave.enabled===!0&&this.autosave(),this.gui.sideBySide=this.createSideBySide(),this._rendered=this.element;var u=this.codemirror;setTimeout(function(){u.refresh()}.bind(u),0)}},B.prototype.autosave=function(){if(_()){var e=this;if(void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to use the autosave feature");null!=e.element.form&&void 0!=e.element.form&&e.element.form.addEventListener("submit",function(){localStorage.removeItem("smde_"+e.options.autosave.uniqueId)}),this.options.autosave.loaded!==!0&&("string"==typeof localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&""!=localStorage.getItem("smde_"+this.options.autosave.uniqueId)&&(this.codemirror.setValue(localStorage.getItem("smde_"+this.options.autosave.uniqueId)),this.options.autosave.foundSavedValue=!0),this.options.autosave.loaded=!0),localStorage.setItem("smde_"+this.options.autosave.uniqueId,e.value());var t=document.getElementById("autosaved");if(null!=t&&void 0!=t&&""!=t){var n=new Date,r=n.getHours(),i=n.getMinutes(),o="am",a=r;a>=12&&(a=r-12,o="pm"),0==a&&(a=12),i=10>i?"0"+i:i,t.innerHTML="Autosaved: "+a+":"+i+" "+o}this.autosaveTimeoutId=setTimeout(function(){e.autosave()},this.options.autosave.delay||1e4)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},B.prototype.clearAutosavedValue=function(){if(_()){if(void 0==this.options.autosave||void 0==this.options.autosave.uniqueId||""==this.options.autosave.uniqueId)return void console.log("SimpleMDE: You must set a uniqueId to clear the autosave value");localStorage.removeItem("smde_"+this.options.autosave.uniqueId)}else console.log("SimpleMDE: localStorage not available, cannot autosave")},B.prototype.createSideBySide=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;n&&/editor-preview-side/.test(n.className)||(n=document.createElement("div"),n.className="editor-preview-side",t.parentNode.insertBefore(n,t.nextSibling));var r=!1,i=!1;return e.on("scroll",function(e){if(r)return void(r=!1);i=!0;var t=e.getScrollInfo().height-e.getScrollInfo().clientHeight,o=parseFloat(e.getScrollInfo().top)/t,a=(n.scrollHeight-n.clientHeight)*o;n.scrollTop=a}),n.onscroll=function(){if(i)return void(i=!1);r=!0;var t=n.scrollHeight-n.clientHeight,o=parseFloat(n.scrollTop)/t,a=(e.getScrollInfo().height-e.getScrollInfo().clientHeight)*o;e.scrollTo(0,a)},n},B.prototype.createToolbar=function(e){if(e=e||this.options.toolbar,e&&0!==e.length){var t;for(t=0;t<e.length;t++)void 0!=K[e[t]]&&(e[t]=K[e[t]]);var n=document.createElement("div");n.className="editor-toolbar";var r=this,a={};for(r.toolbar=e,t=0;t<e.length;t++)if(("guide"!=e[t].name||r.options.toolbarGuideIcon!==!1)&&!(r.options.hideIcons&&-1!=r.options.hideIcons.indexOf(e[t].name)||("fullscreen"==e[t].name||"side-by-side"==e[t].name)&&$())){if("|"===e[t]){for(var s=!1,c=t+1;c<e.length;c++)"|"===e[c]||r.options.hideIcons&&-1!=r.options.hideIcons.indexOf(e[c].name)||(s=!0);if(!s)continue}!function(e){var t;t="|"===e?o():i(e,r.options.toolbarTips,r.options.shortcuts),e.action&&("function"==typeof e.action?t.onclick=function(t){t.preventDefault(),e.action(r)}:"string"==typeof e.action&&(t.href=e.action,t.target="_blank")),a[e.name||e]=t,n.appendChild(t)}(e[t])}r.toolbarElements=a;var u=this.codemirror;u.on("cursorActivity",function(){var e=l(u);for(var t in a)!function(t){var n=a[t];e[t]?n.className+=" active":"fullscreen"!=t&&"side-by-side"!=t&&(n.className=n.className.replace(/\s*active\s*/g,""))}(t)});var f=u.getWrapperElement();return f.parentNode.insertBefore(n,f),n}},B.prototype.createStatusbar=function(e){e=e||this.options.status;var t=this.options,n=this.codemirror;if(e&&0!==e.length){var r,i,o,a=[];for(r=0;r<e.length;r++)if(i=void 0,o=void 0,"object"==typeof e[r])a.push({className:e[r].className,defaultValue:e[r].defaultValue,onUpdate:e[r].onUpdate});else{var l=e[r];"words"===l?(o=function(e){e.innerHTML=W(n.getValue())},i=function(e){e.innerHTML=W(n.getValue())}):"lines"===l?(o=function(e){e.innerHTML=n.lineCount()},i=function(e){e.innerHTML=n.lineCount()}):"cursor"===l?(o=function(e){e.innerHTML="0:0"},i=function(e){var t=n.getCursor();e.innerHTML=t.line+":"+t.ch}):"autosave"===l&&(o=function(e){void 0!=t.autosave&&t.autosave.enabled===!0&&e.setAttribute("id","autosaved")}),a.push({className:l,defaultValue:o,onUpdate:i})}var s=document.createElement("div");for(s.className="editor-statusbar",r=0;r<a.length;r++){var c=a[r],u=document.createElement("span");u.className=c.className,"function"==typeof c.defaultValue&&c.defaultValue(u),"function"==typeof c.onUpdate&&this.codemirror.on("update",function(e,t){return function(){t.onUpdate(e)}}(u,c)),s.appendChild(u)}var f=this.codemirror.getWrapperElement();return f.parentNode.insertBefore(s,f.nextSibling),s}},B.prototype.value=function(e){return void 0===e?this.codemirror.getValue():(this.codemirror.getDoc().setValue(e),this)},B.toggleBold=c,B.toggleItalic=u,B.toggleStrikethrough=f,B.toggleBlockquote=d,B.toggleHeadingSmaller=p,B.toggleHeadingBigger=m,B.toggleHeading1=g,B.toggleHeading2=v,B.toggleHeading3=y,B.toggleCodeBlock=h,B.toggleUnorderedList=x,B.toggleOrderedList=b,B.cleanBlock=w,B.drawLink=k,B.drawImage=S,B.drawTable=C,B.drawHorizontalRule=L,B.undo=T,B.redo=M,B.togglePreview=A,B.toggleSideBySide=N,B.toggleFullScreen=s,B.prototype.toggleBold=function(){c(this)},B.prototype.toggleItalic=function(){u(this)},B.prototype.toggleStrikethrough=function(){f(this)},B.prototype.toggleBlockquote=function(){d(this)},B.prototype.toggleHeadingSmaller=function(){p(this)},B.prototype.toggleHeadingBigger=function(){m(this)},B.prototype.toggleHeading1=function(){g(this)},B.prototype.toggleHeading2=function(){v(this)},B.prototype.toggleHeading3=function(){y(this)},B.prototype.toggleCodeBlock=function(){h(this)},B.prototype.toggleUnorderedList=function(){x(this)},B.prototype.toggleOrderedList=function(){b(this)},B.prototype.cleanBlock=function(){w(this)},B.prototype.drawLink=function(){k(this)},B.prototype.drawImage=function(){S(this)},B.prototype.drawTable=function(){C(this)},B.prototype.drawHorizontalRule=function(){L(this)},B.prototype.undo=function(){T(this)},B.prototype.redo=function(){M(this)},B.prototype.togglePreview=function(){A(this)},B.prototype.toggleSideBySide=function(){N(this)},B.prototype.toggleFullScreen=function(){s(this)},B.prototype.isPreviewActive=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.lastChild;return/editor-preview-active/.test(n.className)},B.prototype.isSideBySideActive=function(){var e=this.codemirror,t=e.getWrapperElement(),n=t.nextSibling;return/editor-preview-active-side/.test(n.className)},B.prototype.isFullscreenActive=function(){var e=this.codemirror;return e.getOption("fullScreen")},B.prototype.getState=function(){var e=this.codemirror;return l(e)},B.prototype.toTextArea=function(){var e=this.codemirror,t=e.getWrapperElement();t.parentNode&&(this.gui.toolbar&&t.parentNode.removeChild(this.gui.toolbar),this.gui.statusbar&&t.parentNode.removeChild(this.gui.statusbar),this.gui.sideBySide&&t.parentNode.removeChild(this.gui.sideBySide)),e.toTextArea(),this.autosaveTimeoutId&&(clearTimeout(this.autosaveTimeoutId),this.autosaveTimeoutId=void 0,this.clearAutosavedValue())},t.exports=B},{"./codemirror/tablist":19,codemirror:10,"codemirror-spell-checker":4,"codemirror/addon/display/fullscreen.js":5,"codemirror/addon/display/placeholder.js":6,"codemirror/addon/edit/continuelist.js":7,"codemirror/addon/mode/overlay.js":8,"codemirror/addon/selection/mark-selection.js":9,"codemirror/mode/gfm/gfm.js":11,"codemirror/mode/markdown/markdown.js":12,"codemirror/mode/xml/xml.js":14,marked:17}]},{},[20])(20)}); -/* Include script: trumbowyg */ +/* Include script: trumbowyg.min.js */ /** Trumbowyg v2.10.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ jQuery.trumbowyg={langs:{en:{viewHTML:"View HTML",undo:"Undo",redo:"Redo",formatting:"Formatting",p:"Paragraph",blockquote:"Quote",code:"Code",header:"Header",bold:"Bold",italic:"Italic",strikethrough:"Stroke",underline:"Underline",strong:"Strong",em:"Emphasis",del:"Deleted",superscript:"Superscript",subscript:"Subscript",unorderedList:"Unordered list",orderedList:"Ordered list",insertImage:"Insert Image",link:"Link",createLink:"Insert link",unlink:"Remove link",justifyLeft:"Align Left",justifyCenter:"Align Center",justifyRight:"Align Right",justifyFull:"Align Justify",horizontalRule:"Insert horizontal rule",removeformat:"Remove format",fullscreen:"Fullscreen",close:"Close",submit:"Confirm",reset:"Cancel",required:"Required",description:"Description",title:"Title",text:"Text",target:"Target",width:"Width"}},plugins:{},svgPath:null,hideButtonTexts:null},Object.defineProperty(jQuery.trumbowyg,"defaultOptions",{value:{lang:"en",fixedBtnPane:!1,fixedFullWidth:!1,autogrow:!1,autogrowOnEnter:!1,imageWidthModalEdit:!1,prefix:"trumbowyg-",semantic:!0,resetCss:!1,removeformatPasted:!1,tagsToRemove:[],btns:[["viewHTML"],["undo","redo"],["formatting"],["strong","em","del"],["superscript","subscript"],["link"],["insertImage"],["justifyLeft","justifyCenter","justifyRight","justifyFull"],["unorderedList","orderedList"],["horizontalRule"],["removeformat"],["fullscreen"]],btnsDef:{},inlineElementsSelector:"a,abbr,acronym,b,caption,cite,code,col,dfn,dir,dt,dd,em,font,hr,i,kbd,li,q,span,strikeout,strong,sub,sup,u",pasteHandlers:[],plugins:{},urlProtocol:!1,minimalLinks:!1},writable:!1,enumerable:!0,configurable:!1}),function(e,t,n,a){"use strict";var o="tbwconfirm",r="tbwcancel";a.fn.trumbowyg=function(e,t){var n="trumbowyg";if(e===Object(e)||!e)return this.each(function(){a(this).data(n)||a(this).data(n,new i(this,e))});if(1===this.length)try{var o=a(this).data(n);switch(e){case"execCmd":return o.execCmd(t.cmd,t.param,t.forceCss);case"openModal":return o.openModal(t.title,t.content);case"closeModal":return o.closeModal();case"openModalInsert":return o.openModalInsert(t.title,t.fields,t.callback);case"saveRange":return o.saveRange();case"getRange":return o.range;case"getRangeText":return o.getRangeText();case"restoreRange":return o.restoreRange();case"enable":return o.setDisabled(!1);case"disable":return o.setDisabled(!0);case"toggle":return o.toggle();case"destroy":return o.destroy();case"empty":return o.empty();case"html":return o.html(t)}}catch(r){}return!1};var i=function(o,r){var i=this,s="trumbowyg-icons",l=a.trumbowyg;i.doc=o.ownerDocument||n,i.$ta=a(o),i.$c=a(o),r=r||{},null!=r.lang||null!=l.langs[r.lang]?i.lang=a.extend(!0,{},l.langs.en,l.langs[r.lang]):i.lang=l.langs.en,i.hideButtonTexts=null!=l.hideButtonTexts?l.hideButtonTexts:r.hideButtonTexts;var d=null!=l.svgPath?l.svgPath:r.svgPath;if(i.hasSvg=d!==!1,i.svgPath=i.doc.querySelector("base")?t.location.href.split("#")[0]:"",0===a("#"+s,i.doc).length&&d!==!1){if(null==d){for(var c=n.getElementsByTagName("script"),u=0;u<c.length;u+=1){var g=c[u].src,f=g.match("trumbowyg(.min)?.js");null!=f&&(d=g.substring(0,g.indexOf(f[0]))+"ui/icons.svg")}null==d&&console.warn("You must define svgPath: https://goo.gl/CfTY9U")}var h=i.doc.createElement("div");h.id=s,i.doc.body.insertBefore(h,i.doc.body.childNodes[0]),a.ajax({async:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",dataType:"xml",crossDomain:!0,url:d,data:null,beforeSend:null,complete:null,success:function(e){h.innerHTML=(new XMLSerializer).serializeToString(e.documentElement)}})}var p=i.lang.header,m=function(){return(t.chrome||t.Intl&&Intl.v8BreakIterator)&&"CSS"in t};i.btnsDef={viewHTML:{fn:"toggle"},undo:{isSupported:m,key:"Z"},redo:{isSupported:m,key:"Y"},p:{fn:"formatBlock"},blockquote:{fn:"formatBlock"},h1:{fn:"formatBlock",title:p+" 1"},h2:{fn:"formatBlock",title:p+" 2"},h3:{fn:"formatBlock",title:p+" 3"},h4:{fn:"formatBlock",title:p+" 4"},subscript:{tag:"sub"},superscript:{tag:"sup"},bold:{key:"B",tag:"b"},italic:{key:"I",tag:"i"},underline:{tag:"u"},strikethrough:{tag:"strike"},strong:{fn:"bold",key:"B"},em:{fn:"italic",key:"I"},del:{fn:"strikethrough"},createLink:{key:"K",tag:"a"},unlink:{},insertImage:{},justifyLeft:{tag:"left",forceCss:!0},justifyCenter:{tag:"center",forceCss:!0},justifyRight:{tag:"right",forceCss:!0},justifyFull:{tag:"justify",forceCss:!0},unorderedList:{fn:"insertUnorderedList",tag:"ul"},orderedList:{fn:"insertOrderedList",tag:"ol"},horizontalRule:{fn:"insertHorizontalRule"},removeformat:{},fullscreen:{"class":"trumbowyg-not-disable"},close:{fn:"destroy","class":"trumbowyg-not-disable"},formatting:{dropdown:["p","blockquote","h1","h2","h3","h4"],ico:"p"},link:{dropdown:["createLink","unlink"]}},i.o=a.extend(!0,{},l.defaultOptions,r),i.o.hasOwnProperty("imgDblClickHandler")||(i.o.imgDblClickHandler=i.getDefaultImgDblClickHandler()),i.urlPrefix=i.setupUrlPrefix(),i.disabled=i.o.disabled||"TEXTAREA"===o.nodeName&&o.disabled,r.btns?i.o.btns=r.btns:i.o.semantic||(i.o.btns[3]=["bold","italic","underline","strikethrough"]),a.each(i.o.btnsDef,function(e,t){i.addBtnDef(e,t)}),i.eventNamespace="trumbowyg-event",i.keys=[],i.tagToButton={},i.tagHandlers=[],i.pasteHandlers=[].concat(i.o.pasteHandlers),i.isIE=e.userAgent.indexOf("MSIE")!==-1||e.appVersion.indexOf("Trident/")!==-1,i.init()};i.prototype={DEFAULT_SEMANTIC_MAP:{b:"strong",i:"em",s:"del",strike:"del",div:"p"},init:function(){var e=this;e.height=e.$ta.height(),e.initPlugins();try{e.doc.execCommand("enableObjectResizing",!1,!1),e.doc.execCommand("defaultParagraphSeparator",!1,"p")}catch(t){}e.buildEditor(),e.buildBtnPane(),e.fixedBtnPaneEvents(),e.buildOverlay(),setTimeout(function(){e.disabled&&e.setDisabled(!0),e.$c.trigger("tbwinit")})},addBtnDef:function(e,t){this.btnsDef[e]=t},setupUrlPrefix:function(){var e=this.o.urlProtocol;if(e)return"string"!=typeof e?"https://":/:\/\/$/.test(e)?e:e+"://"},buildEditor:function(){var e=this,n=e.o.prefix,o="";e.$box=a("<div/>",{"class":n+"box "+n+"editor-visible "+n+e.o.lang+" trumbowyg"}),e.isTextarea=e.$ta.is("textarea"),e.isTextarea?(o=e.$ta.val(),e.$ed=a("<div/>"),e.$box.insertAfter(e.$ta).append(e.$ed,e.$ta)):(e.$ed=e.$ta,o=e.$ed.html(),e.$ta=a("<textarea/>",{name:e.$ta.attr("id"),height:e.height}).val(o),e.$box.insertAfter(e.$ed).append(e.$ta,e.$ed),e.syncCode()),e.$ta.addClass(n+"textarea").attr("tabindex",-1),e.$ed.addClass(n+"editor").attr({contenteditable:!0,dir:e.lang._dir||"ltr"}).html(o),e.o.tabindex&&e.$ed.attr("tabindex",e.o.tabindex),e.$c.is("[placeholder]")&&e.$ed.attr("placeholder",e.$c.attr("placeholder")),e.$c.is("[spellcheck]")&&e.$ed.attr("spellcheck",e.$c.attr("spellcheck")),e.o.resetCss&&e.$ed.addClass(n+"reset-css"),e.o.autogrow||e.$ta.add(e.$ed).css({height:e.height}),e.semanticCode(),e.o.autogrowOnEnter&&e.$ed.addClass(n+"autogrow-on-enter");var r,i=!1,s=!1,l="keyup";e.$ed.on("dblclick","img",e.o.imgDblClickHandler).on("keydown",function(t){if((t.ctrlKey||t.metaKey)&&!t.altKey){i=!0;var n=e.keys[String.fromCharCode(t.which).toUpperCase()];try{return e.execCmd(n.fn,n.param),!1}catch(a){}}}).on("compositionstart compositionupdate",function(){s=!0}).on(l+" compositionend",function(t){if("compositionend"===t.type)s=!1;else if(s)return;var n=t.which;if(!(n>=37&&n<=40)){if(!t.ctrlKey&&!t.metaKey||89!==n&&90!==n)if(i||17===n)"undefined"==typeof t.which&&e.semanticCode(!1,!1,!0);else{var a=!e.isIE||"compositionend"===t.type;e.semanticCode(!1,a&&13===n),e.$c.trigger("tbwchange")}else e.$c.trigger("tbwchange");setTimeout(function(){i=!1},50)}}).on("mouseup keydown keyup",function(t){(!t.ctrlKey&&!t.metaKey||t.altKey)&&setTimeout(function(){i=!1},50),clearTimeout(r),r=setTimeout(function(){e.updateButtonPaneStatus()},50)}).on("focus blur",function(t){if(e.$c.trigger("tbw"+t.type),"blur"===t.type&&a("."+n+"active-button",e.$btnPane).removeClass(n+"active-button "+n+"active"),e.o.autogrowOnEnter){if(e.autogrowOnEnterDontClose)return;"focus"===t.type?(e.autogrowOnEnterWasFocused=!0,e.autogrowEditorOnEnter()):e.o.autogrow||(e.$ed.css({height:e.$ed.css("min-height")}),e.$c.trigger("tbwresize"))}}).on("cut",function(){setTimeout(function(){e.semanticCode(!1,!0),e.$c.trigger("tbwchange")},0)}).on("paste",function(n){if(e.o.removeformatPasted){n.preventDefault(),t.getSelection&&t.getSelection().deleteFromDocument&&t.getSelection().deleteFromDocument();try{var o=t.clipboardData.getData("Text");try{e.doc.selection.createRange().pasteHTML(o)}catch(r){e.doc.getSelection().getRangeAt(0).insertNode(e.doc.createTextNode(o))}e.$c.trigger("tbwchange",n)}catch(i){e.execCmd("insertText",(n.originalEvent||n).clipboardData.getData("text/plain"))}}a.each(e.pasteHandlers,function(e,t){t(n)}),setTimeout(function(){e.semanticCode(!1,!0),e.$c.trigger("tbwpaste",n)},0)}),e.$ta.on("keyup",function(){e.$c.trigger("tbwchange")}).on("paste",function(){setTimeout(function(){e.$c.trigger("tbwchange")},0)}),e.$box.on("keydown",function(t){if(27===t.which&&1===a("."+n+"modal-box",e.$box).length)return e.closeModal(),!1})},autogrowEditorOnEnter:function(){var e=this;e.$ed.removeClass("autogrow-on-enter");var t=e.$ed[0].clientHeight;e.$ed.height("auto");var n=e.$ed[0].scrollHeight;e.$ed.addClass("autogrow-on-enter"),t!==n&&(e.$ed.height(t),setTimeout(function(){e.$ed.css({height:n}),e.$c.trigger("tbwresize")},0))},buildBtnPane:function(){var e=this,t=e.o.prefix,n=e.$btnPane=a("<div/>",{"class":t+"button-pane"});a.each(e.o.btns,function(o,r){a.isArray(r)||(r=[r]);var i=a("<div/>",{"class":t+"button-group "+(r.indexOf("fullscreen")>=0?t+"right":"")});a.each(r,function(t,n){try{e.isSupportedBtn(n)&&i.append(e.buildBtn(n))}catch(a){}}),i.html().trim().length>0&&n.append(i)}),e.$box.prepend(n)},buildBtn:function(e){var t=this,n=t.o.prefix,o=t.btnsDef[e],r=o.dropdown,i=null==o.hasIcon||o.hasIcon,s=t.lang[e]||e,l=a("<button/>",{type:"button","class":n+e+"-button "+(o["class"]||"")+(i?"":" "+n+"textual-button"),html:t.hasSvg&&i?'<svg><use xlink:href="'+t.svgPath+"#"+n+(o.ico||e).replace(/([A-Z]+)/g,"-$1").toLowerCase()+'"/></svg>':t.hideButtonTexts?"":o.text||o.title||t.lang[e]||e,title:(o.title||o.text||s)+(o.key?" (Ctrl + "+o.key+")":""),tabindex:-1,mousedown:function(){return r&&!a("."+e+"-"+n+"dropdown",t.$box).is(":hidden")||a("body",t.doc).trigger("mousedown"),!((t.$btnPane.hasClass(n+"disable")||t.$box.hasClass(n+"disabled"))&&!a(this).hasClass(n+"active")&&!a(this).hasClass(n+"not-disable"))&&(t.execCmd(!!r&&"dropdown"||o.fn||e,o.param||e,o.forceCss),!1)}});if(r){l.addClass(n+"open-dropdown");var d=n+"dropdown",c={"class":d+"-"+e+" "+d+" "+n+"fixed-top"};c["data-"+d]=e;var u=a("<div/>",c);a.each(r,function(e,n){t.btnsDef[n]&&t.isSupportedBtn(n)&&u.append(t.buildSubBtn(n))}),t.$box.append(u.hide())}else o.key&&(t.keys[o.key]={fn:o.fn||e,param:o.param||e});return r||(t.tagToButton[(o.tag||e).toLowerCase()]=e),l},buildSubBtn:function(e){var t=this,n=t.o.prefix,o=t.btnsDef[e],r=null==o.hasIcon||o.hasIcon;return o.key&&(t.keys[o.key]={fn:o.fn||e,param:o.param||e}),t.tagToButton[(o.tag||e).toLowerCase()]=e,a("<button/>",{type:"button","class":n+e+"-dropdown-button"+(o.ico?" "+n+o.ico+"-button":""),html:t.hasSvg&&r?'<svg><use xlink:href="'+t.svgPath+"#"+n+(o.ico||e).replace(/([A-Z]+)/g,"-$1").toLowerCase()+'"/></svg>'+(o.text||o.title||t.lang[e]||e):o.text||o.title||t.lang[e]||e,title:o.key?" (Ctrl + "+o.key+")":null,style:o.style||null,mousedown:function(){return a("body",t.doc).trigger("mousedown"),t.execCmd(o.fn||e,o.param||e,o.forceCss),!1}})},isSupportedBtn:function(e){try{return this.btnsDef[e].isSupported()}catch(t){}return!0},buildOverlay:function(){var e=this;return e.$overlay=a("<div/>",{"class":e.o.prefix+"overlay"}).appendTo(e.$box),e.$overlay},showOverlay:function(){var e=this;a(t).trigger("scroll"),e.$overlay.fadeIn(200),e.$box.addClass(e.o.prefix+"box-blur")},hideOverlay:function(){var e=this;e.$overlay.fadeOut(50),e.$box.removeClass(e.o.prefix+"box-blur")},fixedBtnPaneEvents:function(){var e=this,n=e.o.fixedFullWidth,o=e.$box;e.o.fixedBtnPane&&(e.isFixed=!1,a(t).on("scroll."+e.eventNamespace+" resize."+e.eventNamespace,function(){if(o){e.syncCode();var r=a(t).scrollTop(),i=o.offset().top+1,s=e.$btnPane,l=s.outerHeight()-2;r-i>0&&r-i-e.height<0?(e.isFixed||(e.isFixed=!0,s.css({position:"fixed",top:0,left:n?"0":"auto",zIndex:7}),a([e.$ta,e.$ed]).css({marginTop:s.height()})),s.css({width:n?"100%":o.width()-1+"px"}),a("."+e.o.prefix+"fixed-top",o).css({position:n?"fixed":"absolute",top:n?l:l+(r-i)+"px",zIndex:15})):e.isFixed&&(e.isFixed=!1,s.removeAttr("style"),a([e.$ta,e.$ed]).css({marginTop:0}),a("."+e.o.prefix+"fixed-top",o).css({position:"absolute",top:l}))}}))},setDisabled:function(e){var t=this,n=t.o.prefix;t.disabled=e,e?t.$ta.attr("disabled",!0):t.$ta.removeAttr("disabled"),t.$box.toggleClass(n+"disabled",e),t.$ed.attr("contenteditable",!e)},destroy:function(){var e=this,n=e.o.prefix;e.isTextarea?e.$box.after(e.$ta.css({height:""}).val(e.html()).removeClass(n+"textarea").show()):e.$box.after(e.$ed.css({height:""}).removeClass(n+"editor").removeAttr("contenteditable").removeAttr("dir").html(e.html()).show()),e.$ed.off("dblclick","img"),e.destroyPlugins(),e.$box.remove(),e.$c.removeData("trumbowyg"),a("body").removeClass(n+"body-fullscreen"),e.$c.trigger("tbwclose"),a(t).off("scroll."+e.eventNamespace+" resize."+e.eventNamespace)},empty:function(){this.$ta.val(""),this.syncCode(!0)},toggle:function(){var e=this,t=e.o.prefix;e.o.autogrowOnEnter&&(e.autogrowOnEnterDontClose=!e.$box.hasClass(t+"editor-hidden")),e.semanticCode(!1,!0),setTimeout(function(){e.doc.activeElement.blur(),e.$box.toggleClass(t+"editor-hidden "+t+"editor-visible"),e.$btnPane.toggleClass(t+"disable"),a("."+t+"viewHTML-button",e.$btnPane).toggleClass(t+"active"),e.$box.hasClass(t+"editor-visible")?e.$ta.attr("tabindex",-1):e.$ta.removeAttr("tabindex"),e.o.autogrowOnEnter&&!e.autogrowOnEnterDontClose&&e.autogrowEditorOnEnter()},0)},dropdown:function(e){var n=this,o=n.doc,r=n.o.prefix,i=a("[data-"+r+"dropdown="+e+"]",n.$box),s=a("."+r+e+"-button",n.$btnPane),l=i.is(":hidden");if(a("body",o).trigger("mousedown"),l){var d=s.offset().left;s.addClass(r+"active"),i.css({position:"absolute",top:s.offset().top-n.$btnPane.offset().top+s.outerHeight(),left:n.o.fixedFullWidth&&n.isFixed?d+"px":d-n.$btnPane.offset().left+"px"}).show(),a(t).trigger("scroll"),a("body",o).on("mousedown."+n.eventNamespace,function(e){i.is(e.target)||(a("."+r+"dropdown",n.$box).hide(),a("."+r+"active",n.$btnPane).removeClass(r+"active"),a("body",o).off("mousedown."+n.eventNamespace))})}},html:function(e){var t=this;return null!=e?(t.$ta.val(e),t.syncCode(!0),t.$c.trigger("tbwchange"),t):t.$ta.val()},syncTextarea:function(){var e=this;e.$ta.val(e.$ed.text().trim().length>0||e.$ed.find("hr,img,embed,iframe,input").length>0?e.$ed.html():"")},syncCode:function(e){var t=this;if(!e&&t.$ed.is(":visible"))t.syncTextarea();else{var n=a("<div>").html(t.$ta.val()),o=a("<div>").append(n);a(t.o.tagsToRemove.join(","),o).remove(),t.$ed.html(o.contents().html())}if(t.o.autogrow&&(t.height=t.$ed.height(),t.height!==t.$ta.css("height")&&(t.$ta.css({height:t.height}),t.$c.trigger("tbwresize"))),t.o.autogrowOnEnter){t.$ed.height("auto");var r=t.autogrowOnEnterWasFocused?t.$ed[0].scrollHeight:t.$ed.css("min-height");r!==t.$ta.css("height")&&(t.$ed.css({height:r}),t.$c.trigger("tbwresize"))}},semanticCode:function(e,t,n){var o=this;if(o.saveRange(),o.syncCode(e),o.o.semantic){if(o.semanticTag("b"),o.semanticTag("i"),o.semanticTag("s"),o.semanticTag("strike"),t){var r=o.o.inlineElementsSelector,i=":not("+r+")";o.$ed.contents().filter(function(){return 3===this.nodeType&&this.nodeValue.trim().length>0}).wrap("<span data-tbw/>");var s=function(e){if(0!==e.length){var t=e.nextUntil(i).addBack().wrapAll("<p/>").parent(),n=t.nextAll(r).first();t.next("br").remove(),s(n)}};s(o.$ed.children(r).first()),o.semanticTag("div",!0),o.$ed.find("p").filter(function(){return(!o.range||this!==o.range.startContainer)&&(0===a(this).text().trim().length&&0===a(this).children().not("br,span").length)}).contents().unwrap(),a("[data-tbw]",o.$ed).contents().unwrap(),o.$ed.find("p:empty").remove()}n||o.restoreRange(),o.syncTextarea()}},semanticTag:function(e,t){var n;if(null!=this.o.semantic&&"object"==typeof this.o.semantic&&this.o.semantic.hasOwnProperty(e))n=this.o.semantic[e];else{if(this.o.semantic!==!0||!this.DEFAULT_SEMANTIC_MAP.hasOwnProperty(e))return;n=this.DEFAULT_SEMANTIC_MAP[e]}a(e,this.$ed).each(function(){var e=a(this);e.wrap("<"+n+"/>"),t&&a.each(e.prop("attributes"),function(){e.parent().attr(this.name,this.value)}),e.contents().unwrap()})},createLink:function(){for(var e,t,n,o=this,r=o.doc.getSelection(),i=r.focusNode,s=(new XMLSerializer).serializeToString(r.getRangeAt(0).cloneContents());["A","DIV"].indexOf(i.nodeName)<0;)i=i.parentNode;if(i&&"A"===i.nodeName){var l=a(i);s=l.text(),e=l.attr("href"),o.o.minimalLinks||(t=l.attr("title"),n=l.attr("target"));var d=o.doc.createRange();d.selectNode(i),r.removeAllRanges(),r.addRange(d)}o.saveRange();var c={url:{label:"URL",required:!0,value:e},text:{label:o.lang.text,value:s}};o.o.minimalLinks||Object.assign(c,{title:{label:o.lang.title,value:t},target:{label:o.lang.target,value:n}}),o.openModalInsert(o.lang.createLink,c,function(e){var t=o.prependUrlPrefix(e.url);if(!t.length)return!1;var n=a(['<a href="',e.url,'">',e.text||e.url,"</a>"].join(""));return o.o.minimalLinks||(e.title.length>0&&n.attr("title",e.title),e.target.length>0&&n.attr("target",e.target)),o.range.deleteContents(),o.range.insertNode(n[0]),o.syncCode(),o.$c.trigger("tbwchange"),!0})},prependUrlPrefix:function(e){var t=this;if(!t.urlPrefix)return e;const n=/^([a-z][-+.a-z0-9]*:|\/|#)/i;if(n.test(e))return e;const a=/^[^\s@]+@[^\s@]+\.[^\s@]+$/;return a.test(e)?"mailto:"+e:t.urlPrefix+e},unlink:function(){var e=this,t=e.doc.getSelection(),n=t.focusNode;if(t.isCollapsed){for(;["A","DIV"].indexOf(n.nodeName)<0;)n=n.parentNode;if(n&&"A"===n.nodeName){var a=e.doc.createRange();a.selectNode(n),t.removeAllRanges(),t.addRange(a)}}e.execCmd("unlink",void 0,void 0,!0)},insertImage:function(){var e=this;e.saveRange();var t={url:{label:"URL",required:!0},alt:{label:e.lang.description,value:e.getRangeText()}};e.o.imageWidthModalEdit&&(t.width={}),e.openModalInsert(e.lang.insertImage,t,function(t){e.execCmd("insertImage",t.url);var n=a('img[src="'+t.url+'"]:not([alt])',e.$box);return n.attr("alt",t.alt),e.o.imageWidthModalEdit&&n.attr({width:t.width}),e.syncCode(),e.$c.trigger("tbwchange"),!0})},fullscreen:function(){var e,n=this,o=n.o.prefix,r=o+"fullscreen";n.$box.toggleClass(r),e=n.$box.hasClass(r),a("body").toggleClass(o+"body-fullscreen",e),a(t).trigger("scroll"),n.$c.trigger("tbw"+(e?"open":"close")+"fullscreen")},execCmd:function(e,t,n,a){var o=this;a=!!a||"","dropdown"!==e&&o.$ed.focus();try{o.doc.execCommand("styleWithCSS",!1,n||!1)}catch(r){}try{o[e+a](t)}catch(r){try{e(t)}catch(i){"insertHorizontalRule"===e?t=void 0:"formatBlock"===e&&o.isIE&&(t="<"+t+">"),o.doc.execCommand(e,!1,t),o.syncCode(),o.semanticCode(!1,!0)}"dropdown"!==e&&(o.updateButtonPaneStatus(),o.$c.trigger("tbwchange"))}},openModal:function(e,n){var i=this,s=i.o.prefix;if(a("."+s+"modal-box",i.$box).length>0)return!1;i.o.autogrowOnEnter&&(i.autogrowOnEnterDontClose=!0),i.saveRange(),i.showOverlay(),i.$btnPane.addClass(s+"disable");var l=a("<div/>",{"class":s+"modal "+s+"fixed-top"}).css({top:i.$btnPane.height()}).appendTo(i.$box);i.$overlay.one("click",function(){return l.trigger(r),!1});var d=a("<form/>",{action:"",html:n}).on("submit",function(){return l.trigger(o),!1}).on("reset",function(){return l.trigger(r),!1}).on("submit reset",function(){i.o.autogrowOnEnter&&(i.autogrowOnEnterDontClose=!1)}),c=a("<div/>",{"class":s+"modal-box",html:d}).css({top:"-"+i.$btnPane.outerHeight()+"px",opacity:0}).appendTo(l).animate({top:0,opacity:1},100);return a("<span/>",{text:e,"class":s+"modal-title"}).prependTo(c),l.height(c.outerHeight()+10),a("input:first",c).focus(),i.buildModalBtn("submit",c),i.buildModalBtn("reset",c),a(t).trigger("scroll"),l},buildModalBtn:function(e,t){var n=this,o=n.o.prefix;return a("<button/>",{"class":o+"modal-button "+o+"modal-"+e,type:e,text:n.lang[e]||e}).appendTo(a("form",t))},closeModal:function(){var e=this,t=e.o.prefix;e.$btnPane.removeClass(t+"disable"),e.$overlay.off();var n=a("."+t+"modal-box",e.$box);n.animate({top:"-"+n.height()},100,function(){n.parent().remove(),e.hideOverlay()}),e.restoreRange()},openModalInsert:function(e,t,n){var i=this,s=i.o.prefix,l=i.lang,d="";return a.each(t,function(e,t){var n=t.label||e,a=t.name||e,o=t.attributes||{},r=Object.keys(o).map(function(e){return e+'="'+o[e]+'"'}).join(" ");d+='<label><input type="'+(t.type||"text")+'" name="'+a+'"'+("checkbox"===t.type&&t.value?' checked="checked"':' value="'+(t.value||"").replace(/"/g,"&quot;"))+'"'+r+'><span class="'+s+'input-infos"><span>'+(l[n]?l[n]:n)+"</span></span></label>"}),i.openModal(e,d).on(o,function(){var e=a("form",a(this)),r=!0,s={};a.each(t,function(t,n){var o=n.name||t,l=a('input[name="'+o+'"]',e),d=l.attr("type");switch(d.toLowerCase()){case"checkbox":s[o]=l.is(":checked");break;case"radio":s[o]=l.filter(":checked").val();break;default:s[o]=a.trim(l.val())}n.required&&""===s[o]?(r=!1,i.addErrorOnModalField(l,i.lang.required)):n.pattern&&!n.pattern.test(s[o])&&(r=!1,i.addErrorOnModalField(l,n.patternError))}),r&&(i.restoreRange(),n(s,t)&&(i.syncCode(),i.$c.trigger("tbwchange"),i.closeModal(),a(this).off(o)))}).one(r,function(){a(this).off(o),i.closeModal()})},addErrorOnModalField:function(e,t){var n=this.o.prefix,o=e.parent();e.on("change keyup",function(){o.removeClass(n+"input-error")}),o.addClass(n+"input-error").find("input+span").append(a("<span/>",{"class":n+"msg-error",text:t}))},getDefaultImgDblClickHandler:function(){var e=this;return function(){var t=a(this),n=t.attr("src"),o="(Base64)";0===n.indexOf("data:image")&&(n=o);var r={url:{label:"URL",value:n,required:!0},alt:{label:e.lang.description,value:t.attr("alt")}};return e.o.imageWidthModalEdit&&(r.width={value:t.attr("width")?t.attr("width"):""}),e.openModalInsert(e.lang.insertImage,r,function(n){return n.src!==o&&t.attr({src:n.url}),t.attr({alt:n.alt}),e.o.imageWidthModalEdit&&(parseInt(n.width)>0?t.attr({width:n.width}):t.removeAttr("width")),!0}),!1}},saveRange:function(){var e=this,t=e.doc.getSelection();if(e.range=null,t.rangeCount){var n,a=e.range=t.getRangeAt(0),o=e.doc.createRange();o.selectNodeContents(e.$ed[0]),o.setEnd(a.startContainer,a.startOffset),n=(o+"").length,e.metaRange={start:n,end:n+(a+"").length}}},restoreRange:function(){var e,t=this,n=t.metaRange,a=t.range,o=t.doc.getSelection();if(a){if(n&&n.start!==n.end){var r,i=0,s=[t.$ed[0]],l=!1,d=!1;for(e=t.doc.createRange();!d&&(r=s.pop());)if(3===r.nodeType){var c=i+r.length;!l&&n.start>=i&&n.start<=c&&(e.setStart(r,n.start-i),l=!0),l&&n.end>=i&&n.end<=c&&(e.setEnd(r,n.end-i),d=!0),i=c}else for(var u=r.childNodes,g=u.length;g>0;)g-=1,s.push(u[g])}o.removeAllRanges(),o.addRange(e||a)}},getRangeText:function(){return this.range+""},updateButtonPaneStatus:function(){var e=this,t=e.o.prefix,n=e.getTagsRecursive(e.doc.getSelection().focusNode),o=t+"active-button "+t+"active";a("."+t+"active-button",e.$btnPane).removeClass(o),a.each(n,function(n,r){var i=e.tagToButton[r.toLowerCase()],s=a("."+t+i+"-button",e.$btnPane);if(s.length>0)s.addClass(o);else try{s=a("."+t+"dropdown ."+t+i+"-dropdown-button",e.$box);var l=s.parent().data("dropdown");a("."+t+l+"-button",e.$box).addClass(o)}catch(d){}})},getTagsRecursive:function(e,t){var n=this;if(t=t||(e&&e.tagName?[e.tagName]:[]),!e||!e.parentNode)return t;e=e.parentNode;var o=e.tagName;return"DIV"===o?t:("P"===o&&""!==e.style.textAlign&&t.push(e.style.textAlign),a.each(n.tagHandlers,function(a,o){t=t.concat(o(e,n))}),t.push(o),n.getTagsRecursive(e,t).filter(function(e){return null!=e}))},initPlugins:function(){var e=this;e.loadedPlugins=[],a.each(a.trumbowyg.plugins,function(t,n){n.shouldInit&&!n.shouldInit(e)||(n.init(e),n.tagHandler&&e.tagHandlers.push(n.tagHandler),e.loadedPlugins.push(n))})},destroyPlugins:function(){a.each(this.loadedPlugins,function(e,t){t.destroy&&t.destroy()})}}}(navigator,window,document,jQuery); -/* Include script: init */ +/* Include script: init.js */ // Create own namespace. @@ -1609,7 +1607,7 @@ jQuery.fn.hasClass = function (styleClass) { return originalHasClass.call(this,'or-'+styleClass); } -/* Include script: view */ +/* Include script: view.js */ /** * View. * A view is a part of the page. An Action is loaded into this view. @@ -1751,7 +1749,7 @@ Openrat.View = function( action,method,id,params ) { } -/* Include script: form */ +/* Include script: form.js */ /** * Form. @@ -2010,7 +2008,7 @@ Openrat.Form = function() { } -/* Include script: workbench */ +/* Include script: workbench.js */ Openrat.Workbench = new function() @@ -2032,6 +2030,8 @@ Openrat.Workbench = new function() this.initializeDirtyWarning(); this.initializeState(); this.openModalDialog(); + + Openrat.Workbench.registerOpenClose( $('.or-collapsible') ); } @@ -2169,7 +2169,7 @@ Openrat.Workbench = new function() // View in geschlossenen Sektionen löschen, damit diese nicht stehen bleiben. $('#workbench section.closed .or-act-view-loader').empty(); - Openrat.Workbench.loadViews( $('#workbench section.open .or-act-view-loader') ); + Openrat.Workbench.loadViews( $('.or-workbench .or-act-view-loader') ); } @@ -2566,7 +2566,7 @@ Openrat.Workbench = new function() } -/* Include script: navigator */ +/* Include script: navigator.js */ /** * Navigation. */ @@ -2609,7 +2609,7 @@ Openrat.Navigator = new function () { } -/* Include script: common */ +/* Include script: common.js */ // Execute after DOM ready: $( function() { @@ -3017,7 +3017,7 @@ Openrat.Workbench.afterViewLoadedHandler.add( function(viewEl ) { } ); -/* Include script: column */ +/* Include script: column.js */ // View loaded... Openrat.Workbench.afterViewLoadedHandler.add( function(element ) { @@ -3026,7 +3026,7 @@ Openrat.Workbench.afterViewLoadedHandler.add( function(element ) { // done by orLinkify-Plugin in link.js }); -/* Include script: editor */ +/* Include script: editor.js */ Openrat.Workbench.afterViewLoadedHandler.add( function(element ) { $(element).find('textarea').orAutoheight(); @@ -3278,7 +3278,7 @@ Openrat.Workbench.afterViewLoadedHandler.add( function(element ) { }); -/* Include script: group */ +/* Include script: group.js */ /** * open/close handler for groups. */ @@ -3287,13 +3287,13 @@ Openrat.Workbench.afterViewLoadedHandler.add( function(element ) { Openrat.Workbench.registerOpenClose( $(element).find('.or-collapsible.or-group') ); }); -/* Include script: image */ +/* Include script: image.js */ /* $(document).on('orViewLoaded',function(event, data) { }); */ -/* Include script: link */ +/* Include script: link.js */ Openrat.Workbench.afterViewLoadedHandler.add( function(element ) { // Links aktivieren... @@ -3303,7 +3303,7 @@ Openrat.Workbench.afterViewLoadedHandler.add( function(element ) { -/* Include script: qrcode */ +/* Include script: qrcode.js */ Openrat.Workbench.afterViewLoadedHandler.add( function(element ) { @@ -3332,7 +3332,7 @@ Openrat.Workbench.afterViewLoadedHandler.add( function(element ) { } ); } ); -/* Include script: table */ +/* Include script: table.js */ Openrat.Workbench.afterViewLoadedHandler.add( function(element ) { @@ -3420,7 +3420,7 @@ Openrat.Workbench.afterViewLoadedHandler.add( function(element ) { } }); -/* Include script: upload */ +/* Include script: upload.js */ Openrat.Workbench.afterViewLoadedHandler.add( function(element ) { diff --git a/modules/cms/ui/themes/default/script/openrat.min.js b/modules/cms/ui/themes/default/script/openrat.min.js @@ -127,7 +127,6 @@ else{};$.get(loadBranchUrl).done(function(o){let $ul=$('<ul class="or-navtree-li (function(t){t.hotkeys={version:"0.2.0",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":"\"",",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],textInputTypes:/textarea|input|select/i,options:{filterInputAcceptingElements:!0,filterTextInputs:!0,filterContentEditable:!0}};function e(e){if(typeof e.data==="string"){e.data={keys:e.data}};if(!e.data||!e.data.keys||typeof e.data.keys!=="string"){return};var a=e.handler,s=e.data.keys.toLowerCase().split(" ");e.handler=function(e){if(this!==e.target&&(t.hotkeys.options.filterInputAcceptingElements&&t.hotkeys.textInputTypes.test(e.target.nodeName)||(t.hotkeys.options.filterContentEditable&&t(e.target).attr("contenteditable"))||(t.hotkeys.options.filterTextInputs&&t.inArray(e.target.type,t.hotkeys.textAcceptingInputTypes)>-1))){return};var n=e.type!=="keypress"&&t.hotkeys.specialKeys[e.which],f=String.fromCharCode(e.which).toLowerCase(),i="",r={};t.each(["alt","ctrl","shift"],function(t,s){if(e[s+"Key"]&&n!==s){i+=s+"+"}});if(e.metaKey&&!e.ctrlKey&&n!=="meta"){i+="meta+"};if(e.metaKey&&n!=="meta"&&i.indexOf("alt+ctrl+shift+")>-1){i=i.replace("alt+ctrl+shift+","hyper+")};if(n){r[i+n]=!0} else{r[i+f]=!0;r[i+t.hotkeys.shiftNums[f]]=!0;if(i==="shift+"){r[t.hotkeys.shiftNums[f]]=!0}};for(var o=0,p=s.length;o<p;o++){if(r[s[o]]){return a.apply(this,arguments)}}}};t.each(["keydown","keyup","keypress"],function(){t.event.special[this]={add:e}})})(jQuery||this.jQuery||window.jQuery); !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,s=l&&(n?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),u=a&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),h=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=h&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(h=!1,a=!0);var C=y&&(u||h&&(null==x||x<12.11)),S=r||l&&s>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,T=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return M(e).appendChild(t)}function O(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function A(e,t,r,n){var i=O(e,t,r,n);return i.setAttribute("role","presentation"),i}function W(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function D(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function H(e,t){var r=e.className;L(t).test(r)||(e.className+=(r?" ":"")+t)}function F(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!L(r[n]).test(t)&&(t+=" "+r[n]);return t}k=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var P=function(e){e.select()};function E(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function I(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null};function B(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}R.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var G=30,U={toString:function(){return"CodeMirror.Pass"}},V={scroll:!1},K={origin:"*mouse"},j={origin:"+move"};function X(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Y=[""];function _(e){for(;Y.length<=e;)Y.push(q(Y)+" ");return Y[e]}function q(e){return e[e.length-1]}function $(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Z(){}function Q(e,t){var r;return Object.create?r=Object.create(e):(Z.prototype=e,r=new Z),t&&z(t,r),r}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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]/;function ie(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,r){for(;(r<0?t>0:t<e.length)&&ie(e.charAt(t));)t+=r;return t}function le(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function se(e,t,n){var i=this;this.input=n,i.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=A("div",null,"CodeMirror-code"),i.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=O("div",null,"CodeMirror-cursors"),i.measure=O("div",null,"CodeMirror-measure"),i.lineMeasure=O("div",null,"CodeMirror-measure"),i.lineSpace=A("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=A("div",[i.lineSpace],"CodeMirror-lines");i.mover=O("div",[o],null,"position: relative"),i.sizer=O("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=O("div",null,null,"position: absolute; height: "+G+"px; width: 1px;"),i.gutters=O("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=O("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=O("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),l&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),a||r&&m||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function ae(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function ue(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function ce(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function he(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function fe(e){if(null==e.parent)return null;for(var t=e.parent,r=B(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function de(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var l=0;l<e.lines.length;++l){var s=e.lines[l].height;if(t<s)break;t-=s}return r+l}function pe(e,t){return t>=e.first&&t<e.first+e.size}function ge(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ve(e,t,r){if(void 0===r&&(r=null),!(this instanceof ve))return new ve(e,t,r);this.line=e,this.ch=t,this.sticky=r}function me(e,t){return e.line-t.line||e.ch-t.ch}function ye(e,t){return e.sticky==t.sticky&&0==me(e,t)}function be(e){return ve(e.line,e.ch)}function we(e,t){return me(e,t)<0?t:e}function xe(e,t){return me(e,t)<0?e:t}function Ce(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Se(e,t){if(t.line<e.first)return ve(e.first,0);var r=e.first+e.size-1;return t.line>r?ve(r,ae(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?ve(e.line,t):r<0?ve(e.line,0):e}(t,ae(e,t.line).text.length)}function Le(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Se(e,t[n]);return r}var ke=!1,Te=!1;function Me(e,t,r){this.marker=e,this.from=t,this.to=r}function Ne(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Oe(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ae(e,t){if(t.full)return null;var r=pe(e,t.from.line)&&ae(e,t.from.line).markedSpans,n=pe(e,t.to.line)&&ae(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,l=0==me(t.from,t.to),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==l.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Me(l,o.from,s?null:o.to))}}return n}(r,i,l),a=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.to||(l.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Me(l,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,l),u=1==t.text.length,c=q(t.text).length+(u?i:0);if(s)for(var h=0;h<s.length;++h){var f=s[h];if(null==f.to){var d=Ne(a,f.marker);d?u&&(f.to=null==d.to?null:d.to+c):f.to=i}}if(a)for(var p=0;p<a.length;++p){var g=a[p];if(null!=g.to&&(g.to+=c),null==g.from)Ne(s,g.marker)||(g.from=c,u&&(s||(s=[])).push(g));else g.from+=c,u&&(s||(s=[])).push(g)}s&&(s=We(s)),a&&a!=s&&(a=We(a));var v=[s];if(!u){var m,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(m||(m=[])).push(new Me(s[b].marker,null,null));for(var w=0;w<y;++w)v.push(m);v.push(a)}return v}function We(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function De(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function He(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Fe(e){return e.inclusiveLeft?-1:0}function Pe(e){return e.inclusiveRight?1:0}function Ee(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=me(n.from,i.from)||Fe(e)-Fe(t);if(o)return-o;var l=me(n.to,i.to)||Pe(e)-Pe(t);return l||t.id-e.id}function ze(e,t){var r,n=Te&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Ee(r,i.marker)<0)&&(r=i.marker);return r}function Ie(e){return ze(e,!0)}function Re(e){return ze(e,!1)}function Be(e,t,r,n,i){var o=ae(e,t),l=Te&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var u=a.marker.find(0),c=me(u.from,r)||Fe(a.marker)-Fe(i),h=me(u.to,n)||Pe(a.marker)-Pe(i);if(!(c>=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?me(u.to,r)>=0:me(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?me(u.from,n)<=0:me(u.from,n)<0)))return!0}}}function Ge(e){for(var t;t=Ie(e);)e=t.find(-1,!0).line;return e}function Ue(e,t){var r=ae(e,t),n=Ge(r);return r==n?t:fe(n)}function Ve(e,t){if(t>e.lastLine())return t;var r,n=ae(e,t);if(!Ke(e,n))return t;for(;r=Re(n);)n=r.find(1,!0).line;return fe(n)+1}function Ke(e,t){var r=Te&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&je(e,t,n))return!0}}function je(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return je(e,n.line,Ne(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&je(e,t,i))return!0}function Xe(e){for(var t=0,r=(e=Ge(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var l=0;l<o.children.length;++l){var s=o.children[l];if(s==r)break;t+=s.height}return t}function Ye(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Ie(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=Re(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function _e(e){var t=e.display,r=e.doc;t.maxLine=ae(r,r.first),t.maxLineLength=Ye(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=Ye(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var qe=null;function $e(e,t,r){var n;qe=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:qe=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:qe=i)}return null!=n?n:qe}var Ze=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(a,u){var c="ltr"==u?"L":"R";if(0==a.length||"ltr"==u&&!r.test(a))return!1;for(var h,f=a.length,d=[],p=0;p<f;++p)d.push((h=a.charCodeAt(p))<=247?e.charAt(h):1424<=h&&h<=1524?"R":1536<=h&&h<=1785?t.charAt(h-1536):1774<=h&&h<=2220?"r":8192<=h&&h<=8203?"w":8204==h?"b":"L");for(var g=0,v=c;g<f;++g){var m=d[g];"m"==m?d[g]=v:v=m}for(var y=0,b=c;y<f;++y){var w=d[y];"1"==w&&"r"==b?d[y]="n":i.test(w)&&(b=w,"r"==w&&(d[y]="R"))}for(var x=1,C=d[0];x<f-1;++x){var S=d[x];"+"==S&&"1"==C&&"1"==d[x+1]?d[x]="1":","!=S||C!=d[x+1]||"1"!=C&&"n"!=C||(d[x]=C),C=S}for(var L=0;L<f;++L){var k=d[L];if(","==k)d[L]="N";else if("%"==k){var T=void 0;for(T=L+1;T<f&&"%"==d[T];++T);for(var M=L&&"!"==d[L-1]||T<f&&"1"==d[T]?"1":"N",N=L;N<T;++N)d[N]=M;L=T-1}}for(var O=0,A=c;O<f;++O){var W=d[O];"L"==A&&"1"==W?d[O]="L":i.test(W)&&(A=W)}for(var D=0;D<f;++D)if(n.test(d[D])){var H=void 0;for(H=D+1;H<f&&n.test(d[H]);++H);for(var F="L"==(D?d[D-1]:c),P=F==("L"==(H<f?d[H]:c))?F?"L":"R":c,E=D;E<H;++E)d[E]=P;D=H-1}for(var z,I=[],R=0;R<f;)if(o.test(d[R])){var B=R;for(++R;R<f&&o.test(d[R]);++R);I.push(new s(0,B,R))}else{var G=R,U=I.length;for(++R;R<f&&"L"!=d[R];++R);for(var V=G;V<R;)if(l.test(d[V])){G<V&&I.splice(U,0,new s(1,G,V));var K=V;for(++V;V<R&&l.test(d[V]);++V);I.splice(U,0,new s(2,K,V)),G=V}else++V;G<R&&I.splice(U,0,new s(1,G,R))}return"ltr"==u&&(1==I[0].level&&(z=a.match(/^\s+/))&&(I[0].from=z[0].length,I.unshift(new s(0,0,z[0].length))),1==q(I).level&&(z=a.match(/\s+$/))&&(q(I).to-=z[0].length,I.push(new s(0,f-z[0].length,f)))),"rtl"==u?I.reverse():I}}();function Qe(e,t){var r=e.order;return null==r&&(r=e.order=Ze(e.text,t)),r}var Je=[],et=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Je).concat(r)}};function tt(e,t){return e._handlers&&e._handlers[t]||Je}function rt(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=B(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function nt(e,t){var r=tt(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function it(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),nt(e,r||t.type,e,t),ct(t)||t.codemirrorIgnore}function ot(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==B(r,t[n])&&r.push(t[n])}function lt(e,t){return tt(e,t).length>0}function st(e){e.prototype.on=function(e,t){et(this,e,t)},e.prototype.off=function(e,t){rt(this,e,t)}}function at(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ut(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ct(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ht(e){at(e),ut(e)}function ft(e){return e.target||e.srcElement}function dt(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var pt,gt,vt=function(){if(l&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function mt(e){if(null==pt){var t=O("span","​");N(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(pt=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var r=pt?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function yt(e){if(null!=gt)return gt;var t=N(e,document.createTextNode("AخA")),r=k(t,0,1).getBoundingClientRect(),n=k(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(gt=n.right-r.right<3)}var bt,wt=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},xt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ct="oncopy"in(bt=O("div"))||(bt.setAttribute("oncopy","return;"),"function"==typeof bt.oncopy),St=null;var Lt={},kt={};function Tt(e){if("string"==typeof e&&kt.hasOwnProperty(e))e=kt[e];else if(e&&"string"==typeof e.name&&kt.hasOwnProperty(e.name)){var t=kt[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Tt("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Tt("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Mt(e,t){t=Tt(t);var r=Lt[t.name];if(!r)return Mt(e,"text/plain");var n=r(e,t);if(Nt.hasOwnProperty(t.name)){var i=Nt[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Nt={};function Ot(e,t){z(t,Nt.hasOwnProperty(e)?Nt[e]:Nt[e]={})}function At(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Wt(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Dt(e,t,r){return!e.startState||e.startState(t,r)}var Ht=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Ht.prototype.eol=function(){return this.pos>=this.string.length},Ht.prototype.sol=function(){return this.pos==this.lineStart},Ht.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ht.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ht.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ht.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ht.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ht.prototype.skipToEnd=function(){this.pos=this.string.length},Ht.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ht.prototype.backUp=function(e){this.pos-=e},Ht.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=I(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},Ht.prototype.indentation=function(){return I(this.string,null,this.tabSize)-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},Ht.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ht.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ht.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ht.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ht.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Ft=function(e,t){this.state=e,this.lookAhead=t},Pt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function Et(e,t,r,n){var i=[e.state.modeGen],o={};jt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],a=1,u=0;r.state=!0,jt(e,t.text,s.mode,r,function(e,t){for(var r=a;u<e;){var n=i[a];n>e&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;r<a;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}},o),r.state=l,r.baseTokens=null,r.baseTokenPos=1},a=0;a<e.state.overlays.length;++a)s(a);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function zt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=It(e,fe(t)),i=t.text.length>e.options.maxHighlightLength&&At(e.doc.mode,n.state),o=Et(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function It(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Pt(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=ae(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof Ft?u.lookAhead:0)<=o.modeFrontier))return s;var c=I(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}(e,t,r),l=o>n.first&&ae(n,o-1).stateAfter,s=l?Pt.fromSaved(n,l,o):new Pt(n,Dt(n.mode),o);return n.iter(o,t,function(r){Rt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function Rt(e,t,r,n){var i=e.doc.mode,o=new Ht(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&Bt(i,r.state);!o.eol();)Gt(i,o,r.state),o.start=o.pos}function Bt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Wt(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Gt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Wt(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}Pt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Pt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Pt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Pt.fromSaved=function(e,t,r){return t instanceof Ft?new Pt(e,At(e.mode,t.state),r,t.lookAhead):new Pt(e,At(e.mode,t),r)},Pt.prototype.save=function(e){var t=!1!==e?At(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ft(t,this.maxLookAhead):t};var Ut=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Vt(e,t,r,n){var i,o,l=e.doc,s=l.mode,a=ae(l,(t=Se(l,t)).line),u=It(e,t.line,r),c=new Ht(a.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=Gt(s,c,u.state),n&&o.push(new Ut(c,i,At(l.mode,u.state)));return n?o:new Ut(c,i,u.state)}function Kt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function jt(e,t,r,n,i,o,l){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,u=0,c=null,h=new Ht(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&Kt(Bt(r,n.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(s=!1,l&&Rt(e,t,n,h.pos),h.pos=t.length,a=null):a=Kt(Gt(r,h,n.state,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u<h.start;)i(u=Math.min(h.start,u+5e3),c);c=a}h.start=h.pos}for(;u<h.pos;){var p=Math.min(h.pos,u+5e3);i(p,c),u=p}}var Xt=function(e,t,r){this.text=e,He(this,t),this.height=r?r(this):1};function Yt(e){e.parent=null,De(e)}Xt.prototype.lineNo=function(){return fe(this)},st(Xt);var _t={},qt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?qt:_t;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var r=A("span",null,null,a?"padding-right: .1px":null),n={pre:A("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(l||a)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,s=void 0;n.pos=0,n.addToken=Jt,yt(e.display.measure)&&(s=Qe(o,e.doc.direction))&&(n.addToken=er(n.addToken,s)),n.map=[],rr(o,n,zt(e,o,t!=e.display.externalMeasured&&fe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=F(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=F(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(mt(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return nt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=F(n.pre.className,n.textClass||"")),n}function Qt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,r,n,i,o,a){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,h=e.cm.state.specialChars,f=!1;if(h.test(t)){u=document.createDocumentFragment();for(var d=0;;){h.lastIndex=d;var p=h.exec(t),g=p?p.index-d:t.length-d;if(g){var v=document.createTextNode(c.slice(d,d+g));l&&s<9?u.appendChild(O("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;d+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=u.appendChild(O("span",_(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((m=u.appendChild(O("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),l&&s<9?u.appendChild(O("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||i||f||a){var w=r||"";n&&(w+=n),i&&(w+=i);var x=O("span",[u],w,a);return o&&(x.title=o),e.content.appendChild(x)}e.content.appendChild(u)}}function er(e,t){return function(r,n,i,o,l,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,c=u+n.length;;){for(var h=void 0,f=0;f<t.length&&!((h=t[f]).to>u&&h.from<=u);f++);if(h.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,h.to-u),i,o,null,s,a),o=null,n=n.slice(h.to-u),u=h.to}}}function tr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=h=s="",f=null,m=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],C=x.marker;"bookmark"==C.type&&x.from==p&&C.widgetNode?y.push(C):x.from<=p&&(null==x.to||x.to>p||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!h&&(h=C.title),C.collapsed&&(!f||Ee(f.marker,C)<0)&&(f=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==m&&(u+=" "+b[S]);if(!f||f.from==p)for(var L=0;L<y.length;++L)tr(t,0,y[L]);if(f&&(f.from||0)==p){if(tr(t,(null==f.to?d+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=d)break;for(var k=Math.min(d,m);;){if(v){var T=p+v.length;if(!f){var M=T>k?v.slice(0,k-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",h,s)}if(T>=k){v=v.slice(k-p),p=k;break}p=T,c=""}v=i.slice(o,o=r[g++]),l=$t(r[g++],t.cm.options)}}else for(var N=1;N<r.length;N+=2)t.addToken(t,i.slice(o,o=r[N]),$t(r[N+1],t.cm.options))}function nr(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=Re(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?fe(q(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ke(e,t)}function ir(e,t,r){for(var n,i=[],o=t;o<r;o=n){var l=new nr(e.doc,ae(e.doc,o),o);n=o+l.size,i.push(l)}return i}var or=null;var lr=null;function sr(e,t){var r=tt(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);or?n=or.delayedCallbacks:lr?n=lr:(n=lr=[],setTimeout(ar,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},l=0;l<r.length;++l)o(l)}}function ar(){var e=lr;lr=null;for(var t=0;t<e.length;++t)e[t]()}function ur(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?fr(e,t):"gutter"==o?pr(e,t,r,n):"class"==o?dr(e,t):"widget"==o&&gr(e,t,n)}t.changes=null}function cr(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),l&&s<8&&(e.node.style.zIndex=2)),e.node}function hr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Zt(e,t)}function fr(e,t){var r=t.text.className,n=hr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,dr(e,t)):r&&(t.text.className=r)}function dr(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=cr(t);t.background=n.insertBefore(O("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?cr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function pr(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=cr(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=cr(t),s=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(O("div",ge(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a<e.options.gutters.length;++a){var u=e.options.gutters[a],c=o.hasOwnProperty(u)&&o[u];c&&s.appendChild(O("div",[c],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function gr(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);mr(e,t,r)}function vr(e,t,r,n){var i=hr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),dr(e,t),pr(e,t,r,n),mr(e,t,n),t.node}function mr(e,t,r){if(yr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)yr(e,t.rest[n],t,r,!1)}function yr(e,t,r,n,i){if(t.widgets)for(var o=cr(r),l=0,s=t.widgets;l<s.length;++l){var a=s[l],u=O("div",[a.node],"CodeMirror-linewidget");a.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),br(a,u,r,n),e.display.input.setUneditable(u),i&&a.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),sr(a,"redraw")}}function br(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function wr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!W(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),N(t.display.measure,O("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function xr(e,t){for(var r=ft(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Cr(e){return e.lineSpace.offsetTop}function Sr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Lr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=N(e.measure,O("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function kr(e){return G-e.display.nativeBarWidth}function Tr(e){return e.display.scroller.clientWidth-kr(e)-e.display.barWidth}function Mr(e){return e.display.scroller.clientHeight-kr(e)-e.display.barHeight}function Nr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(fe(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Or(e,t,r,n){return Dr(e,Wr(e,t),r,n)}function Ar(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[an(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Wr(e,t){var r=fe(t),n=Ar(e,r);n&&!n.text?n=null:n&&n.changes&&(ur(e,n,r,rn(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=fe(t=Ge(t)),n=e.display.externalMeasured=new nr(e.doc,t,r);n.lineN=r;var i=n.built=Zt(e,n);return n.text=i.pre,N(e.display.lineMeasure,i.pre),n}(e,t));var i=Nr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Dr(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(!function(e,t,r){var n=e.options.lineWrapping,i=n&&Tr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],u=l[s+1];Math.abs(a.bottom-u.bottom)>2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Pr(t.map,r,n),a=o.node,u=o.start,c=o.end,h=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){for(;u&&ie(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+c));)++c;if((i=l&&s<9&&0==u&&c==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Er(k(a,u,c).getClientRects(),n)).left||i.right||0==u)break;c=u,u-=1,h="right"}l&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=St)return St;var t=N(e,O("span","x")),r=t.getBoundingClientRect(),n=k(t,0,1).getBoundingClientRect();return St=Math.abs(r.left-n.left)>1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var d;u>0&&(h=n="right"),i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+tn(e.display),top:p.top,bottom:p.bottom}:Fr}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(m<y[b]);b++);var w=b?y[b-1]:0,x=y[b],C={left:("right"==h?i.right:i.left)-t.rect.left,right:("left"==h?i.left:i.right)-t.rect.left,top:w,bottom:x};i.left||i.right||(C.bogus=!0);e.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=v);return C}(e,t,r,n)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Hr,Fr={left:0,right:0,top:0,bottom:0};function Pr(e,t,r){for(var n,i,o,l,s,a,u=0;u<e.length;u+=3)if(s=e[u],a=e[u+1],t<s?(i=0,o=1,l="left"):t<a?o=(i=t-s)+1:(u==e.length-3||t==a&&e[u+3]>t)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],l="right";break}return{node:n,start:i,end:o,collapse:l,coverStart:s,coverEnd:a}}function Er(e,t){var r=Fr;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function zr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Ir(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)zr(e.display.view[t])}function Rr(e){Ir(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Br(){return c&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Gr(){return c&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ur(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=wr(e.widgets[r]));return t}function Vr(e,t,r,n,i){if(!i){var o=Ur(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var l=Xe(t);if("local"==n?l+=Cr(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==n?0:Gr());var a=s.left+("window"==n?0:Br());r.left+=a,r.right+=a}return r.top+=l,r.bottom+=l,r}function Kr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=Br(),i-=Gr();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:i-l.top}}function jr(e,t,r,n,i){return n||(n=ae(e.doc,t.line)),Vr(e,n,Or(e,n,t.ch,i),r)}function Xr(e,t,r,n,i,o){function l(t,l){var s=Dr(e,i,t,l?"right":"left",o);return l?s.left=s.right:s.right=s.left,Vr(e,n,s,r)}n=n||ae(e.doc,t.line),i||(i=Wr(e,n));var s=Qe(n,e.doc.direction),a=t.ch,u=t.sticky;if(a>=n.text.length?(a=n.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return l("before"==u?a-1:a,"before"==u);function c(e,t,r){return l(r?e-1:e,1==s[t].level!=r)}var h=$e(s,a,u),f=qe,d=c(a,h,"before"==u);return null!=f&&(d.other=c(a,f,"before"!=u)),d}function Yr(e,t){var r=0;t=Se(e.doc,t),e.options.lineWrapping||(r=tn(e.display)*t.ch);var n=ae(e.doc,t.line),i=Xe(n)+Cr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function _r(e,t,r,n,i){var o=ve(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function qr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return _r(n.first,0,null,!0,-1);var i=de(n,r),o=n.first+n.size-1;if(i>o)return _r(n.first+n.size-1,ae(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=ae(n,i);;){var s=Jr(e,l,i,t,r),a=Re(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=fe(l=u.to.line)}}function $r(e,t,r,n){n-=Ur(t);var i=t.text.length,o=le(function(t){return Dr(e,r,t-1).bottom<=n},i,0);return{begin:o,end:i=le(function(t){return Dr(e,r,t).top>n},o,i)}}function Zr(e,t,r,n){return r||(r=Wr(e,t)),$r(e,t,r,Vr(e,t,Dr(e,r,n),"line").top)}function Qr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Jr(e,t,r,n,i){i-=Xe(t);var o=Wr(e,t),l=Ur(t),s=0,a=t.text.length,u=!0,c=Qe(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?function(e,t,r,n,i,o,l){var s=$r(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f<i.length;f++){var d=i[f];if(!(d.from>=u||d.to<=a)){var p=1!=d.level,g=Dr(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=g<o?o-g+1e9:g-o;(!c||h>v)&&(c=d,h=v)}}c||(c=i[i.length-1]);c.from<a&&(c={from:a,to:c.to,level:c.level});c.to>u&&(c={from:c.from,to:u,level:c.level});return c}:function(e,t,r,n,i,o,l){var s=le(function(s){var a=i[s],u=1!=a.level;return Qr(Xr(e,ve(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=Xr(e,ve(r,u?a.from:a.to,u?"after":"before"),"line",t,n);Qr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a})(e,t,r,o,c,n,i);s=(u=1!=h.level)?h.from:h.to-1,a=u?h.to:h.from-1}var f,d,p=null,g=null,v=le(function(t){var r=Dr(e,o,t);return r.top+=l,r.bottom+=l,!!Qr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var y=n-g.left<g.right-n,b=y==u;v=p+(b?0:1),d=b?"after":"before",f=y?g.left:g.right}else{u||v!=a&&v!=s||v++,d=0==v?"after":v==t.text.length?"before":Dr(e,o,v-(u?1:0)).bottom+l<=i==u?"after":"before";var w=Xr(e,ve(r,v,d),"line",t,o);f=w.left,m=i<w.top||i>=w.bottom}return _r(r,v=oe(t.text,v,1),d,m,n-f)}function en(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hr){Hr=O("pre");for(var t=0;t<49;++t)Hr.appendChild(document.createTextNode("x")),Hr.appendChild(O("br"));Hr.appendChild(document.createTextNode("x"))}N(e.measure,Hr);var r=Hr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function tn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),r=O("pre",[t]);N(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function rn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:nn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function nn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function on(e){var t=en(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/tn(e.display)-3);return function(i){if(Ke(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function ln(e){var t=e.doc,r=on(e);t.iter(function(e){var t=r(e);t!=e.height&&he(e,t)})}function sn(e,t,r,n){var i=e.display;if(!r&&"true"==ft(t).getAttribute("cm-not-content"))return null;var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(t){return null}var a,u=qr(e,o,l);if(n&&1==u.xRel&&(a=ae(e.doc,u.line).text).length==u.ch){var c=I(a,a.length,e.options.tabSize)-a.length;u=ve(u.line,Math.max(0,Math.round((o-Lr(e.display).left)/tn(e.display))-c))}return u}function an(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function un(e){e.display.input.showSelection(e.display.input.prepareSelection())}function cn(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var s=r.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var a=s.empty();(a||e.options.showCursorWhenSelecting)&&hn(e,s.head,i),a||dn(e,s,o)}}return n}function hn(e,t,r){var n=Xr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(O("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function fn(e,t){return e.top-t.top||e.left-t.left}function dn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=Lr(e.display),s=l.left,a=Math.max(n.sizerWidth,Tr(e)-n.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?a-e:r)+"px;\n height: "+(n-t)+"px"))}function h(t,r,n){var o,l,h=ae(i,t),f=h.text.length;function d(r,n){return jr(e,ve(t,r),"div",h,n)}function p(t,r,n){var i=Zr(e,h,null,t),o="ltr"==r==("after"==n)?"left":"right";return d("after"==n?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1),o)[o]}var g=Qe(h,i.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<r&&l.to>t||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(g,r||0,null==n?f:n,function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?w:b)&&C,L=(u?b:w)&&x?s:(v?m:y).left,k=S?a:(v?y:m).right;c(L,m.top,k-L,m.bottom)}else{var T,M,N,O;v?(T=u&&b&&x?s:m.left,M=u?a:p(e,i,"before"),N=u?s:p(t,i,"after"),O=u&&w&&C?a:y.right):(T=u?p(e,i,"before"):s,M=!u&&b&&x?a:m.right,N=!u&&w&&C?s:y.left,O=u?p(t,i,"after"):a),c(T,m.top,M-T,m.bottom),m.bottom<y.top&&c(s,m.bottom,null,y.top),c(N,y.top,O-N,y.bottom)}(!o||fn(m,o)<0)&&(o=m),fn(y,o)<0&&(o=y),(!l||fn(m,l)<0)&&(l=m),fn(y,l)<0&&(l=y)}),{start:o,end:l}}var f=t.from(),d=t.to();if(f.line==d.line)h(f.line,f.ch,d.ch);else{var p=ae(i,f.line),g=ae(i,d.line),v=Ge(p)==Ge(g),m=h(f.line,f.ch,v?p.text.length+1:null).end,y=h(d.line,v?0:null,d.ch).start;v&&(m.top<y.top-2?(c(m.right,m.top,null,m.bottom),c(s,y.top,y.left,y.bottom)):c(m.right,m.top,y.left-m.right,m.bottom)),m.bottom<y.top&&c(s,m.bottom,null,y.top)}r.appendChild(o)}function pn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function gn(e){e.state.focused||(e.display.input.focus(),mn(e))}function vn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yn(e))},100)}function mn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(nt(e,"focus",e,t),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),pn(e))}function yn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(nt(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function bn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(l&&s<8){var a=i.node.offsetTop+i.node.offsetHeight;o=a-r,r=a}else{var u=i.node.getBoundingClientRect();o=u.bottom-u.top}var c=i.line.height-o;if(o<2&&(o=en(t)),(c>.005||c<-.005)&&(he(i.line,o),wn(i.line),i.rest))for(var h=0;h<i.rest.length;h++)wn(i.rest[h])}}}function wn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function xn(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Cr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=de(t,n),l=de(t,i);if(r&&r.ensure){var s=r.ensure.from.line,a=r.ensure.to.line;s<o?(o=s,l=de(t,Xe(ae(t,s))+e.wrapper.clientHeight)):Math.min(a,t.lastLine())>=l&&(o=de(t,Xe(ae(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Cn(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=nn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l<r.length;l++)if(!r[l].hidden){e.options.fixedGutter&&(r[l].gutter&&(r[l].gutter.style.left=o),r[l].gutterBackground&&(r[l].gutterBackground.style.left=o));var s=r[l].alignable;if(s)for(var a=0;a<s.length;a++)s[a].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Sn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=ge(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(O("div",[O("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ai(e),!0}return!1}function Ln(e,t){var r=e.display,n=en(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Mr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Sr(r),a=t.top<n,u=t.bottom>s-n;if(t.top<i)l.scrollTop=a?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=Tr(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>f;return d&&(t.right=t.left+f),t.left<10?l.scrollLeft=0:t.left<h?l.scrollLeft=Math.max(0,t.left-(d?0:10)):t.right>f+h-3&&(l.scrollLeft=t.right+(d?0:10)-f),l}function kn(e,t){null!=t&&(Nn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Tn(e){Nn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Mn(e,t,r){null==t&&null==r||Nn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Nn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,On(e,Yr(e,t.from),Yr(e,t.to),t.margin))}function On(e,t,r,n){var i=Ln(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Mn(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||si(e,{top:t}),Wn(e,t,!0),r&&si(e),ri(e,100))}function Wn(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Dn(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Cn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Hn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Sr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Fn=function(e,t,r){this.cm=r;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(n),e(i),et(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),et(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Fn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fn.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},Fn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)})},Fn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Pn=function(){};function En(e,t){t||(t=Hn(e));var r=e.display.barWidth,n=e.display.barHeight;zn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&bn(e),zn(e,Hn(e)),r=e.display.barWidth,n=e.display.barHeight}function zn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}Pn.prototype.update=function(){return{bottom:0,right:0}},Pn.prototype.setScrollLeft=function(){},Pn.prototype.setScrollTop=function(){},Pn.prototype.clear=function(){};var In={native:Fn,null:Pn};function Rn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new In[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),et(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Dn(e,t):An(e,t)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var Bn=0;function Gn(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Bn},t=e.curOp,or?or.ops.push(t):t.ownsGroup=or={ops:[t],delayedCallbacks:[]}}function Un(e){!function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}(r)}finally{or=null,t(r)}}(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)Vn(t[r]);for(var n=0;n<t.length;n++)(i=t[n]).updatedDisplay=i.mustUpdate&&oi(i.cm,i.update);var i;for(var o=0;o<t.length;o++)Kn(t[o]);for(var l=0;l<t.length;l++)jn(t[l]);for(var s=0;s<t.length;s++)Xn(t[s])}(e)})}function Vn(e){var t=e.cm,r=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=kr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=kr(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&_e(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Kn(e){var t=e.cm,r=t.display;e.updatedDisplay&&bn(t),e.barMeasure=Hn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Or(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function jn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Dn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==D();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&En(t,e.barMeasure),e.updatedDisplay&&ui(t,e.barMeasure),e.selectionChanged&&pn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&gn(e.cm)}function Xn(e){var t=e.cm,r=t.display,n=t.doc;(e.updatedDisplay&&li(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Wn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Dn(t,e.scrollLeft,!0,!0),e.scrollToPos)&&function(e,t){if(!it(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=O("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Cr(e.display))+"px;\n height: "+(t.bottom-t.top+kr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?ve(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ve(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=Xr(e,t),a=r&&r!=t?Xr(e,r):s,u=Ln(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(An(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Dn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}(t,Se(n,e.scrollToPos.from),Se(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||nt(i[l],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&nt(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&nt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Yn(e,t){if(e.curOp)return t();Gn(e);try{return t()}finally{Un(e)}}function _n(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Gn(e);try{return t.apply(e,arguments)}finally{Un(e)}}}function qn(e){return function(){if(this.curOp)return e.apply(this,arguments);Gn(this);try{return e.apply(this,arguments)}finally{Un(this)}}}function $n(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Gn(t);try{return e.apply(this,arguments)}finally{Un(t)}}}function Zn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Te&&Ue(e.doc,t)<i.viewTo&&Jn(e);else if(r<=i.viewFrom)Te&&Ve(e.doc,r+n)>i.viewFrom?Jn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Jn(e);else if(t<=i.viewFrom){var o=ei(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Jn(e)}else if(r>=i.viewTo){var l=ei(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Jn(e)}else{var s=ei(e,t,t,-1),a=ei(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(ir(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):Jn(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function Qn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[an(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function Jn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ei(e,t,r,n){var i,o=an(e,t),l=e.display.view;if(!Te||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a<o;a++)s+=l[a].size;if(s!=t){if(n>0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;Ue(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function ti(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,E(ni,e))}function ni(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=It(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?At(t.mode,n.state):null,a=Et(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&f<l.length;++f)h=l[f]!=o.styles[f];h&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Rt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ri(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Yn(e,function(){for(var t=0;t<i.length;t++)Qn(e,i[t],"text")})}}var ii=function(e,t,r){var n=e.display;this.viewport=t,this.visible=xn(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Tr(e),this.force=r,this.dims=rn(e),this.events=[]};function oi(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Jn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==ti(e))return!1;Sn(e)&&(Jn(e),t.dims=rn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>l&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Te&&(o=Ue(e.doc,o),l=Ve(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=ir(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ir(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(an(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(ir(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,an(e,r)))),n.viewTo=r}(e,o,l),r.viewOffset=Xe(ae(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=ti(e);if(!s&&0==u&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=D();if(!t||!W(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&W(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return u>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function s(t){var r=t.nextSibling;return a&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,h=0;h<u.length;h++){var f=u[h];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;l!=f.node;)l=s(l);var d=i&&null!=t&&t<=c&&f.lineNumber;f.changes&&(B(f.changes,"gutter")>-1&&(d=!1),ur(e,f,c,r)),d&&(M(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ge(e.options,c)))),l=f.node.nextSibling}else{var p=vr(e,f,c,r);o.insertBefore(p,l)}c+=f.size}for(;l;)l=s(l)}(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=D()&&(e.activeElt.focus(),e.anchorNode&&W(document.body,e.anchorNode)&&W(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(c),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ri(e,400)),r.updateLineNumbers=null,!0}function li(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Tr(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Sr(e.display)-Mr(e),r.top)}),t.visible=xn(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&oi(e,t);n=!1){bn(e);var i=Hn(e);un(e),En(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function si(e,t){var r=new ii(e,t);if(oi(e,r)){bn(e),li(e,r);var n=Hn(e);un(e),En(e,n),ui(e,n),r.finish()}}function ai(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+kr(e)+"px"}function ci(e){var t=e.display.gutters,r=e.options.gutters;M(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(O("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",ai(e)}function hi(e){var t=B(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}ii.prototype.signal=function(e,t){lt(e,t)&&this.events.push(arguments)},ii.prototype.finish=function(){for(var e=0;e<this.events.length;e++)nt.apply(null,this.events[e])};var fi=0,di=null;function pi(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function gi(e){var t=pi(e);return t.x*=di,t.y*=di,t}function vi(e,t){var n=pi(t),i=n.x,o=n.y,l=e.display,s=l.scroller,u=s.scrollWidth>s.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&y&&a)e:for(var f=t.target,d=l.view;f!=s;f=f.parentNode)for(var p=0;p<d.length;p++)if(d[p].node==f){e.display.currentWheelTarget=f;break e}if(i&&!r&&!h&&null!=di)return o&&c&&An(e,Math.max(0,s.scrollTop+o*di)),Dn(e,Math.max(0,s.scrollLeft+i*di)),(!o||o&&c)&&at(t),void(l.wheelStartX=null);if(o&&null!=di){var g=o*di,v=e.doc.scrollTop,m=v+l.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):m=Math.min(e.doc.height,m+g+50),si(e,{top:v,bottom:m})}fi<20&&(null==l.wheelStartX?(l.wheelStartX=s.scrollLeft,l.wheelStartY=s.scrollTop,l.wheelDX=i,l.wheelDY=o,setTimeout(function(){if(null!=l.wheelStartX){var e=s.scrollLeft-l.wheelStartX,t=s.scrollTop-l.wheelStartY,r=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,r&&(di=(di*fi+r)/(fi+1),++fi)}},200)):(l.wheelDX+=i,l.wheelDY+=o))}}l?di=-.53:r?di=15:c?di=-.7:f&&(di=-1/3);var mi=function(e,t){this.ranges=e,this.primIndex=t};mi.prototype.primary=function(){return this.ranges[this.primIndex]},mi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!ye(r.anchor,n.anchor)||!ye(r.head,n.head))return!1}return!0},mi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new yi(be(this.ranges[t].anchor),be(this.ranges[t].head));return new mi(e,this.primIndex)},mi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},mi.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(me(t,n.from())>=0&&me(e,n.to())<=0)return r}return-1};var yi=function(e,t){this.anchor=e,this.head=t};function bi(e,t){var r=e[t];e.sort(function(e,t){return me(e.from(),t.from())}),t=B(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(me(o.to(),i.from())>=0){var l=xe(o.from(),i.from()),s=we(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new yi(a?s:l,a?l:s))}}return new mi(e,t)}function wi(e,t){return new mi([new yi(e,t||e)],0)}function xi(e){return e.text?ve(e.from.line+e.text.length-1,q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ci(e,t){if(me(e,t.from)<0)return e;if(me(e,t.to)<=0)return xi(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=xi(t).ch-t.to.ch),ve(r,n)}function Si(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new yi(Ci(i.anchor,t),Ci(i.head,t)))}return bi(r,e.sel.primIndex)}function Li(e,t,r){return e.line==t.line?ve(r.line,e.ch-t.ch+r.ch):ve(r.line+(e.line-t.line),e.ch)}function ki(e){e.doc.mode=Mt(e.options,e.doc.modeOption),Ti(e)}function Ti(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ri(e,100),e.state.modeGen++,e.curOp&&Zn(e)}function Mi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==q(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ni(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),De(e),He(e,r);var i=n?n(e):1;i!=e.height&&he(e,i)}(e,r,i,n),sr(e,"change",e,t)}function l(e,t){for(var r=[],o=e;o<t;++o)r.push(new Xt(u[o],i(o),n));return r}var s=t.from,a=t.to,u=t.text,c=ae(e,s.line),h=ae(e,a.line),f=q(u),d=i(u.length-1),p=a.line-s.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(Mi(e,t)){var g=l(0,u.length-1);o(h,h.text,d),p&&e.remove(s.line,p),g.length&&e.insert(s.line,g)}else if(c==h)if(1==u.length)o(c,c.text.slice(0,s.ch)+f+c.text.slice(a.ch),d);else{var v=l(1,u.length-1);v.push(new Xt(f+c.text.slice(a.ch),d,n)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,v)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+h.text.slice(a.ch),i(0)),e.remove(s.line+1,p);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(h,f+h.text.slice(a.ch),d);var m=l(1,u.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,m)}sr(e,"change",e,t)}function Oi(e,t,r){!function e(n,i,o){if(n.linked)for(var l=0;l<n.linked.length;++l){var s=n.linked[l];if(s.doc!=i){var a=o&&s.sharedHist;r&&!a||(t(s.doc,a),e(s.doc,n,a))}}}(e,null,!0)}function Ai(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ln(e),ki(e),Wi(e),e.options.lineWrapping||_e(e),e.options.mode=t.modeOption,Zn(e)}function Wi(e){("rtl"==e.doc.direction?H:T)(e.display.lineDiv,"CodeMirror-rtl")}function Di(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Hi(e,t){var r={from:be(t.from),to:xi(t),text:ue(e,t.from,t.to)};return Ii(e,r,t.from.line,t.to.line+1),Oi(e,function(e){return Ii(e,r,t.from.line,t.to.line+1)},!0),r}function Fi(e){for(;e.length;){if(!q(e).ranges)break;e.pop()}}function Pi(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Fi(e.done),q(e.done)):e.done.length&&!q(e.done).ranges?q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),q(e.done)):void 0}(i,i.lastOp==n)))l=q(o.changes),0==me(t.from,t.to)&&0==me(t.from,l.to)?l.to=xi(t):o.changes.push(Hi(e,t));else{var a=q(i.done);for(a&&a.ranges||zi(e.sel,i.done),o={changes:[Hi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||nt(e,"historyAdded")}function Ei(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,q(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Fi(i.undone)}function zi(e,t){var r=q(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ii(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function Ri(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Bi(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Ri(r[i]));return n}(e,t),n=Ae(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],l=n[i];if(o&&l)e:for(var s=0;s<l.length;++s){for(var a=l[s],u=0;u<o.length;++u)if(o[u].marker==a.marker)continue e;o.push(a)}else l&&(r[i]=l)}return r}function Gi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?mi.prototype.deepCopy.call(o):o);else{var l=o.changes,s=[];n.push({changes:s});for(var a=0;a<l.length;++a){var u=l[a],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var h in u)(c=h.match(/^spans_(\d+)$/))&&B(t,Number(c[1]))>-1&&(q(s)[h]=u[h],delete u[h])}}}return n}function Ui(e,t,r,n){if(n){var i=e.anchor;if(r){var o=me(t,i)<0;o!=me(r,i)<0?(i=t,t=r):o!=me(t,r)<0&&(t=r)}return new yi(i,t)}return new yi(r||t,t)}function Vi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),_i(e,new mi([Ui(e.sel.primary(),t,r,i)],0),n)}function Ki(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Ui(e.sel.ranges[o],t[o],null,i);_i(e,bi(n,e.sel.primIndex),r)}function ji(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,_i(e,bi(i,e.sel.primIndex),n)}function Xi(e,t,r,n){_i(e,wi(t,r),n)}function Yi(e,t,r){var n=e.history.done,i=q(n);i&&i.ranges?(n[n.length-1]=t,qi(e,t,r)):_i(e,t,r)}function _i(e,t,r){qi(e,t,r),Ei(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function qi(e,t,r){(lt(e,"beforeSelectionChange")||e.cm&&lt(e.cm,"beforeSelectionChange"))&&(t=function(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new yi(Se(e,t[r].anchor),Se(e,t[r].head))},origin:r&&r.origin};return nt(e,"beforeSelectionChange",e,n),e.cm&&nt(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?bi(n.ranges,n.ranges.length-1):t}(e,t,r));var n=r&&r.bias||(me(t.primary().head,e.sel.primary().head)<0?-1:1);$i(e,Qi(e,t,n,!0)),r&&!1===r.scroll||!e.cm||Tn(e.cm)}function $i(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,ot(e.cm)),sr(e,"cursorActivity",e))}function Zi(e){$i(e,Qi(e,e.sel,null,!1))}function Qi(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],a=eo(e,l.anchor,s&&s.anchor,r,n),u=eo(e,l.head,s&&s.head,r,n);(i||a!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new yi(a,u))}return i?bi(i,t.primIndex):t}function Ji(e,t,r,n,i){var o=ae(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var s=o.markedSpans[l],a=s.marker;if((null==s.from||(a.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(a.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(nt(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=to(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=me(u,r))&&(n<0?c<0:c>0))return Ji(e,u,t,n,i)}var h=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(h=to(e,h,n,h.line==t.line?o:null)),h?Ji(e,h,t,n,i):null}}return t}function eo(e,t,r,n,i){var o=n||1,l=Ji(e,t,r,o,i)||!i&&Ji(e,t,r,o,!0)||Ji(e,t,r,-o,i)||!i&&Ji(e,t,r,-o,!0);return l||(e.cantEdit=!0,ve(e.first,0))}function to(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?Se(e,ve(t.line-1)):null:r>0&&t.ch==(n||ae(e,t.line)).text.length?t.line<e.first+e.size-1?ve(t.line+1,0):null:new ve(t.line,t.ch+r)}function ro(e){e.setSelection(ve(e.firstLine(),0),ve(e.lastLine()),V)}function no(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=Se(e,t)),r&&(n.to=Se(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),nt(e,"beforeChange",e,n),e.cm&&nt(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function io(e,t,r){if(e.cm){if(!e.cm.curOp)return _n(e.cm,io)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(lt(e,"beforeChange")||e.cm&&lt(e.cm,"beforeChange"))||(t=no(e,t,!0))){var n=ke&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=B(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var l=n[o],s=l.find(0),a=0;a<i.length;++a){var u=i[a];if(!(me(u.to,s.from)<0||me(u.from,s.to)>0)){var c=[a,1],h=me(u.from,s.from),f=me(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)oo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else oo(e,t)}}function oo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=me(t.from,t.to)){var r=Si(e,t);Pi(e,t,r,e.cm?e.cm.curOp.id:NaN),ao(e,t,r,Ae(e,t));var n=[];Oi(e,function(e,r){r||-1!=B(n,e.history)||(fo(e.history,t),n.push(e.history)),ao(e,t,null,Ae(e,t))})}}function lo(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a<l.length&&(n=l[a],r?!n.ranges||n.equals(e.sel):n.ranges);a++);if(a!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;(n=l.pop()).ranges;){if(zi(n,s),r&&!n.equals(e.sel))return void _i(e,n,{clearRedo:!1});o=n}var u=[];zi(o,s),s.push({changes:u,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var c=lt(e,"beforeChange")||e.cm&&lt(e.cm,"beforeChange"),h=function(r){var i=n.changes[r];if(i.origin=t,c&&!no(e,i,!1))return l.length=0,{};u.push(Hi(e,i));var o=r?Si(e,i):q(l);ao(e,i,o,Bi(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:xi(i)});var s=[];Oi(e,function(e,t){t||-1!=B(s,e.history)||(fo(e.history,i),s.push(e.history)),ao(e,i,null,Bi(e,i))})},f=n.changes.length-1;f>=0;--f){var d=h(f);if(d)return d.v}}}}function so(e,t){if(0!=t&&(e.first+=t,e.sel=new mi($(e.sel.ranges,function(e){return new yi(ve(e.anchor.line+t,e.anchor.ch),ve(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Zn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Qn(e.cm,n,"gutter")}}function ao(e,t,r,n){if(e.cm&&!e.cm.curOp)return _n(e.cm,ao)(e,t,r,n);if(t.to.line<e.first)so(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);so(e,i),t={from:ve(e.first,0),to:ve(t.to.line+i,t.to.ch),text:[q(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ve(o,ae(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ue(e,t.from,t.to),r||(r=Si(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=fe(Ge(ae(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0}));n.sel.contains(t.from,t.to)>-1&&ot(e);Ni(n,t,r,on(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=Ye(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=ae(e,n).stateAfter;if(i&&(!(i instanceof Ft)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}})(n,o.line),ri(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?Zn(e):o.line!=l.line||1!=t.text.length||Mi(e.doc,t)?Zn(e,o.line,l.line+1,u):Qn(e,o.line,"text");var c=lt(e,"changes"),h=lt(e,"change");if(h||c){var f={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};h&&sr(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,n):Ni(e,t,n),qi(e,r,V)}}function uo(e,t,r,n,i){var o;(n||(n=r),me(n,r)<0)&&(r=(o=[n,r])[0],n=o[1]);"string"==typeof t&&(t=e.splitLines(t)),io(e,{from:r,to:n,text:t,origin:i})}function co(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ho(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)co(o.ranges[s].anchor,t,r,n),co(o.ranges[s].head,t,r,n)}else{for(var a=0;a<o.changes.length;++a){var u=o.changes[a];if(r<u.from.line)u.from=ve(u.from.line+n,u.from.ch),u.to=ve(u.to.line+n,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function fo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;ho(e.done,r,n,i),ho(e.undone,r,n,i)}function po(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=ae(e,Ce(e,t)):i=fe(t),null==i?null:(n(o,i)&&e.cm&&Qn(e.cm,i,r),o)}function go(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function vo(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}yi.prototype.from=function(){return xe(this.anchor,this.head)},yi.prototype.to=function(){return we(this.anchor,this.head)},yi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},go.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Yt(i),sr(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},vo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),l=n.height;if(n.removeInner(e,o),this.height-=l-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof go))){var s=[];this.collapse(s),this.children=[new go(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,s=l;s<i.lines.length;){var a=new go(i.lines.slice(s,s+=25));i.height-=a.height,this.children.splice(++n,0,a),a.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new vo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=B(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new vo(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=o}}};var mo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function yo(e,t,r){Xe(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&kn(e,r)}mo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=fe(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=wr(this);he(r,Math.max(0,r.height-o)),e&&(Yn(e,function(){yo(e,r,-o),Qn(e,n,"widget")}),sr(e,"lineWidgetCleared",e,this,n))}},mo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=wr(this)-t;i&&(he(n,n.height+i),r&&Yn(r,function(){r.curOp.forceUpdate=!0,yo(r,n,i),sr(r,"lineWidgetChanged",r,e,fe(n))}))},st(mo);var bo=0,wo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++bo};function xo(e,t,r,n,i){if(n&&n.shared)return function(e,t,r,n,i){(n=z(n)).shared=!1;var o=[xo(e,t,r,n,i)],l=o[0],s=n.widgetNode;return Oi(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(xo(e,Se(e,t),Se(e,r),n,i));for(var a=0;a<e.linked.length;++a)if(e.linked[a].isParent)return;l=q(o)}),new Co(o,l)}(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return _n(e.cm,xo)(e,t,r,n,i);var o=new wo(e,i),l=me(t,r);if(n&&z(n,o,!1),l>0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Be(e,t.line,t,r,o)||t.line!=r.line&&Be(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Te=!0}o.addToHistory&&Pi(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,r.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&Ge(e)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&he(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Me(o,a==t.line?t.ch:null,a==r.line?r.ch:null)),++a}),o.collapsed&&e.iter(t.line,r.line+1,function(t){Ke(e,t)&&he(t,0)}),o.clearOnEnter&&et(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(ke=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++bo,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Zn(u,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=r.line;c++)Qn(u,c,"text");o.atomic&&Zi(u.doc),sr(u,"markerAdded",u,o)}return o}wo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gn(e),lt(this,"clear")){var r=this.find();r&&sr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],s=Ne(l.markedSpans,this);e&&!this.collapsed?Qn(e,fe(l),"text"):e&&(null!=s.to&&(i=fe(l)),null!=s.from&&(n=fe(l))),l.markedSpans=Oe(l.markedSpans,s),null==s.from&&this.collapsed&&!Ke(this.doc,l)&&e&&he(l,en(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var a=0;a<this.lines.length;++a){var u=Ge(this.lines[a]),c=Ye(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Zn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Zi(e.doc)),e&&sr(e,"markerCleared",e,this,n,i),t&&Un(e),this.parent&&this.parent.clear()}},wo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],l=Ne(o.markedSpans,this);if(null!=l.from&&(r=ve(t?o:fe(o),l.from),-1==e))return r;if(null!=l.to&&(n=ve(t?o:fe(o),l.to),1==e))return n}return r&&{from:r,to:n}},wo.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&Yn(n,function(){var i=t.line,o=fe(t.line),l=Ar(n,o);if(l&&(zr(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ke(r.doc,i)&&null!=r.height){var s=r.height;r.height=null;var a=wr(r)-s;a&&he(i,i.height+a)}sr(n,"markerChanged",n,e)})},wo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=B(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},wo.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},st(wo);var Co=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function So(e){return e.findMarks(ve(e.first,0),e.clipPos(ve(e.lastLine())),function(e){return e.parent})}function Lo(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];Oi(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==B(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}Co.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();sr(this,"clear")}},Co.prototype.find=function(e,t){return this.primary.find(e,t)},st(Co);var ko=0,To=function(e,t,r,n,i){if(!(this instanceof To))return new To(e,t,r,n,i);null==r&&(r=0),vo.call(this,[new go([new Xt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=ve(r,0);this.sel=wi(o),this.history=new Di(null),this.id=++ko,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ni(this,{from:o,to:o,text:e}),_i(this,wi(o),V)};To.prototype=Q(vo.prototype,{constructor:To,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ce(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:$n(function(e){var t=ve(this.first,0),r=this.first+this.size-1;io(this,{from:t,to:ve(r,ae(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Mn(this.cm,0,0),_i(this,wi(t),V)}),replaceRange:function(e,t,r,n){uo(this,e,t=Se(this,t),r=r?Se(this,r):t,n)},getRange:function(e,t,r){var n=ue(this,Se(this,e),Se(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(pe(this,e))return ae(this,e)},getLineNumber:function(e){return fe(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=ae(this,e)),Ge(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Se(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:$n(function(e,t,r){Xi(this,Se(this,"number"==typeof e?ve(e,t||0):e),null,r)}),setSelection:$n(function(e,t,r){Xi(this,Se(this,e),Se(this,t||e),r)}),extendSelection:$n(function(e,t,r){Vi(this,Se(this,e),t&&Se(this,t),r)}),extendSelections:$n(function(e,t){Ki(this,Le(this,e),t)}),extendSelectionsBy:$n(function(e,t){Ki(this,Le(this,$(this.sel.ranges,e)),t)}),setSelections:$n(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new yi(Se(this,e[i].anchor),Se(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),_i(this,bi(n,t),r)}}),addSelection:$n(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new yi(Se(this,e),Se(this,t||e))),_i(this,bi(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=ue(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=ue(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:$n(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];n[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:r}}for(var s=t&&"end"!=t&&function(e,t,r){for(var n=[],i=ve(e.first,0),o=i,l=0;l<t.length;l++){var s=t[l],a=Li(s.from,i,o),u=Li(xi(s),i,o);if(i=s.to,o=u,"around"==r){var c=e.sel.ranges[l],h=me(c.head,c.anchor)<0;n[l]=new yi(h?u:a,h?a:u)}else n[l]=new yi(a,a)}return new mi(n,e.sel.primIndex)}(this,n,t),a=n.length-1;a>=0;a--)io(this,n[a]);s?Yi(this,s):this.cm&&Tn(this.cm)}),undo:$n(function(){lo(this,"undo")}),redo:$n(function(){lo(this,"redo")}),undoSelection:$n(function(){lo(this,"undo",!0)}),redoSelection:$n(function(){lo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Di(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Gi(this.history.done),undone:Gi(this.history.undone)}},setHistory:function(e){var t=this.history=new Di(this.history.maxGeneration);t.done=Gi(e.done.slice(0),null,!0),t.undone=Gi(e.undone.slice(0),null,!0)},setGutterMarker:$n(function(e,t,r){return po(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&re(n)&&(e.gutterMarkers=null),!0})}),clearGutter:$n(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&po(t,r,"gutter",function(){return r.gutterMarkers[e]=null,re(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!pe(this,e))return null;if(t=e,!(e=ae(this,e)))return null}else if(null==(t=fe(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:$n(function(e,t,r){return po(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(L(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})}),removeLineClass:$n(function(e,t,r){return po(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(L(r));if(!o)return!1;var l=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0})}),addLineWidget:$n(function(e,t,r){return function(e,t,r,n){var i=new mo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),po(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Ke(e,t)){var n=Xe(t)<e.scrollTop;he(t,t.height+wr(i)),n&&kn(o,i.height),o.curOp.forceUpdate=!0}return!0}),sr(o,"lineWidgetAdded",o,i,"number"==typeof t?t:fe(t)),i}(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return xo(this,Se(this,e),Se(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return xo(this,e=Se(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=ae(this,(e=Se(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=Se(this,e),t=Se(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s<l.length;s++){var a=l[s];null!=a.to&&i==e.line&&e.ch>=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),Se(this,ve(r,t))},indexFromPos:function(e){var t=(e=Se(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new To(ce(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new To(ce(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(me(o,l)){var s=xo(e,o,l,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}(n,So(this)),n},unlinkDoc:function(e){if(e instanceof Sl&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Lo(So(this));break}}if(e.history==this.history){var r=[e.id];Oi(e,function(e){return r.push(e.id)},!0),e.history=new Di(null),e.history.done=Gi(this.history.done,r),e.history.undone=Gi(this.history.undone,r)}},iterLinkedDocs:function(e){Oi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):wt(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:$n(function(e){var t;("rtl"!=e&&(e="ltr"),e!=this.direction)&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Yn(t=this.cm,function(){Wi(t),Zn(t)}))})}),To.prototype.eachLine=To.prototype.iter;var Mo=0;function No(e){var t=this;if(Oo(t),!it(t,e)&&!xr(t.display,e)){at(e),l&&(Mo=+new Date);var r=sn(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),s=0,a=function(e,n){if(!t.options.allowDropFileTypes||-1!=B(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=_n(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++s==i){var a={from:r=Se(t.doc,r),to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};io(t.doc,a),Yi(t.doc,wi(r,xi(a)))}}),l.readAsText(e)}},u=0;u<i;++u)a(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),qi(t.doc,wi(r,r)),h)for(var f=0;f<h.length;++f)uo(t.doc,"",h[f].anchor,h[f].head,"drag");t.replaceSelection(c,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Oo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ao(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}var Wo=!1;function Do(){var e;Wo||(et(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Ao(Ho)},100))}),et(window,"blur",function(){return Ao(yn)}),Wo=!0)}function Ho(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}for(var Fo={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Po=0;Po<10;Po++)Fo[Po+48]=Fo[Po+96]=String(Po);for(var Eo=65;Eo<=90;Eo++)Fo[Eo]=String.fromCharCode(Eo);for(var zo=1;zo<=12;zo++)Fo[zo+111]=Fo[zo+63235]="F"+zo;var Io={};function Ro(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var l=0;l<o.length-1;l++){var s=o[l];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Bo(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=$(r.split(" "),Ro),o=0;o<i.length;o++){var l=void 0,s=void 0;o==i.length-1?(s=i.join(" "),l=n):(s=i.slice(0,o+1).join(" "),l="...");var a=t[s];if(a){if(a!=l)throw new Error("Inconsistent bindings for "+s)}else t[s]=l}delete e[r]}for(var u in t)e[u]=t[u];return e}function Go(e,t,r,n){var i=(t=jo(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Go(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var l=Go(e,t.fallthrough[o],r,n);if(l)return l}}}function Uo(e){var t="string"==typeof e?e:Fo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Vo(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(C?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(C?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Ko(e,t){if(h&&34==e.keyCode&&e.char)return!1;var r=Fo[e.keyCode];return null!=r&&!e.altGraphKey&&Vo(r,e,t)}function jo(e){return"string"==typeof e?Io[e]:e}function Xo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&me(o.from,q(n).to)<=0;){var l=n.pop();if(me(l.from,o.from)<0){o.from=l.from;break}}n.push(o)}Yn(e,function(){for(var t=n.length-1;t>=0;t--)uo(e.doc,"",n[t].from,n[t].to,"+delete");Tn(e)})}function Yo(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function _o(e,t,r){var n=Yo(e,t.ch,r);return null==n?null:new ve(t.line,n,r<0?"after":"before")}function qo(e,t,r,n,i){if(e){var o=Qe(r,t.doc.direction);if(o){var l,s=i<0?q(o):o[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Wr(t,r);l=i<0?r.text.length-1:0;var c=Dr(t,u,l).top;l=le(function(e){return Dr(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=Yo(r,l,1))}else l=i<0?s.to:s.from;return new ve(n,l,a)}}return new ve(n,i<0?r.text.length:0,i<0?"before":"after")}Io.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Io.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Io.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Io.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Io.default=y?Io.macDefault:Io.pcDefault;var $o={selectAll:ro,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Xo(e,function(t){if(t.empty()){var r=ae(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:ve(t.head.line+1,0)}:{from:t.head,to:ve(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Xo(e,function(t){return{from:ve(t.from().line,0),to:Se(e.doc,ve(t.to().line+1,0))}})},delLineLeft:function(e){return Xo(e,function(e){return{from:ve(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Xo(e,function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}})},delWrappedLineRight:function(e){return Xo(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ve(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ve(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Zo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Qo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return function(e,t){var r=ae(e.doc,t),n=function(e){for(var t;t=Re(e);)e=t.find(1,!0).line;return e}(r);n!=r&&(t=fe(n));return qo(!0,e,r,t,-1)}(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},j)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},j)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Qo(e,t.head):n},j)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),l=I(e.getLine(o.line),o.ch,n);t.push(_(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Yn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=ae(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new ve(i.line,i.ch-1)),i.ch>0)i=new ve(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ve(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=ae(e.doc,i.line-1).text;l&&(i=new ve(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ve(i.line-1,l.length-1),i,"+transpose"))}r.push(new yi(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return Yn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Tn(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Zo(e,t){var r=ae(e.doc,t),n=Ge(r);return n!=r&&(t=fe(n)),qo(!0,e,n,t,1)}function Qo(e,t){var r=Zo(e,t.line),n=ae(e.doc,r.line),i=Qe(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return ve(r.line,l?0:o,r.sticky)}return r}function Jo(e,t,r){if("string"==typeof t&&!(t=$o[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=U}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}var el=new R;function tl(e,t,r,n){var i=e.state.keySeq;if(i){if(Uo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:el.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),rl(e,i+" "+t,r,n))return!0}return rl(e,t,r,n)}function rl(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Go(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Go(t,e.options.extraKeys,r,e)||Go(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&sr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(at(r),pn(e)),!!i}function nl(e,t){var r=Ko(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?tl(e,"Shift-"+r,t,function(t){return Jo(e,t,!0)})||tl(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return Jo(e,t)}):tl(e,r,t,function(t){return Jo(e,t)}))}var il=null;function ol(e){var t=this;if(t.curOp.focus=D(),!it(t,e)){l&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=nl(t,e);h&&(il=n?r:null,!n&&88==r&&!Ct&&(y?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(T(t,"CodeMirror-crosshair"),rt(document,"keyup",r),rt(document,"mouseover",r))}H(t,"CodeMirror-crosshair"),et(document,"keyup",r),et(document,"mouseover",r)}(t)}}function ll(e){16==e.keyCode&&(this.doc.sel.shift=!1),it(this,e)}function sl(e){var t=this;if(!(xr(t.display,e)||it(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(h&&r==il)return il=null,void at(e);if(!h||e.which&&!(e.which<10)||!nl(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(function(e,t,r){return tl(e,"'"+r+"'",t,function(t){return Jo(e,t,!0)})}(t,e,i)||t.display.input.onKeyPress(e))}}}var al,ul,cl=function(e,t,r){this.time=e,this.pos=t,this.button=r};function hl(e){var t=this,r=t.display;if(!(it(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,xr(r,e))a||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));else if(!pl(t,e)){var n=sn(t,e),i=dt(e),o=n?function(e,t){var r=+new Date;return ul&&ul.compare(r,e,t)?(al=ul=null,"triple"):al&&al.compare(r,e,t)?(ul=new cl(r,e,t),al=null,"double"):(al=new cl(r,e,t),ul=null,"single")}(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&function(e,t,r,n,i){var o="Click";"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o);return tl(e,Vo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,function(t){if("string"==typeof t&&(t=$o[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=U}finally{e.state.suppressEdits=!1}return n})}(t,i,n,o,e)||(1==i?n?function(e,t,r,n){l?setTimeout(E(gn,e),0):e.curOp.focus=D();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=b?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey);null==i.addNew&&(i.addNew=y?r.metaKey:r.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(y?r.altKey:r.ctrlKey));return i}(e,r,n),u=e.doc.sel;e.options.dragDrop&&vt&&!e.isReadOnly()&&"single"==r&&(i=u.contains(t))>-1&&(me((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(me(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,u=_n(e,function(t){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,rt(document,"mouseup",u),rt(document,"mousemove",c),rt(i.scroller,"dragstart",h),rt(i.scroller,"drop",u),o||(at(t),n.addNew||Vi(e.doc,r,null,null,n.extend),a||l&&9==s?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};a&&(i.scroller.draggable=!0);e.state.draggingText=u,u.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop();et(document,"mouseup",u),et(document,"mousemove",c),et(i.scroller,"dragstart",h),et(i.scroller,"drop",u),vn(e),setTimeout(function(){return i.input.focus()},20)}(e,n,t,o):function(e,t,r,n){var i=e.display,o=e.doc;at(t);var l,s,a=o.sel,u=a.ranges;n.addNew&&!n.extend?(s=o.sel.contains(r),l=s>-1?u[s]:new yi(r,r)):(l=o.sel.primary(),s=o.sel.primIndex);if("rectangle"==n.unit)n.addNew||(l=new yi(r,r)),r=sn(e,t,!0,!0),s=-1;else{var c=fl(e,r,n.unit);l=n.extend?Ui(l,c.anchor,c.head,n.extend):c}n.addNew?-1==s?(s=u.length,_i(o,bi(u.concat([l]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==n.unit&&!n.extend?(_i(o,bi(u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),a=o.sel):ji(o,s,l,K):(s=0,_i(o,new mi([l],0),K),a=o.sel);var h=r;function f(t){if(0!=me(h,t))if(h=t,"rectangle"==n.unit){for(var i=[],u=e.options.tabSize,c=I(ae(o,r.line).text,r.ch,u),f=I(ae(o,t.line).text,t.ch,u),d=Math.min(c,f),p=Math.max(c,f),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=ae(o,g).text,y=X(m,d,u);d==p?i.push(new yi(ve(g,y),ve(g,y))):m.length>y&&i.push(new yi(ve(g,y),ve(g,X(m,p,u))))}i.length||i.push(new yi(r,r)),_i(o,bi(a.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=l,x=fl(e,t,n.unit),C=w.anchor;me(x.anchor,C)>0?(b=x.head,C=xe(w.from(),x.anchor)):(b=x.anchor,C=we(w.to(),x.head));var S=a.ranges.slice(0);S[s]=function(e,t){var r=t.anchor,n=t.head,i=ae(e.doc,r.line);if(0==me(r,n)&&r.sticky==n.sticky)return t;var o=Qe(i);if(!o)return t;var l=$e(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a,u=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)a=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=$e(o,n.ch,n.sticky),h=c-l||(n.ch-r.ch)*(1==s.level?-1:1);a=c==u-1||c==u?h<0:h>0}var f=o[u+(a?-1:0)],d=a==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new yi(new ve(r.line,p,g),n)}(e,new yi(Se(o,C),b)),_i(o,bi(S,s),K)}}var d=i.wrapper.getBoundingClientRect(),p=0;function g(t){e.state.selectingText=!1,p=1/0,at(t),i.input.focus(),rt(document,"mousemove",v),rt(document,"mouseup",m),o.history.lastSelOrigin=null}var v=_n(e,function(t){dt(t)?function t(r){var l=++p;var s=sn(e,r,!0,"rectangle"==n.unit);if(!s)return;if(0!=me(s,h)){e.curOp.focus=D(),f(s);var a=xn(i,o);(s.line>=a.to||s.line<a.from)&&setTimeout(_n(e,function(){p==l&&t(r)}),150)}else{var u=r.clientY<d.top?-20:r.clientY>d.bottom?20:0;u&&setTimeout(_n(e,function(){p==l&&(i.scroller.scrollTop+=u,t(r))}),50)}}(t):g(t)}),m=_n(e,g);e.state.selectingText=m,et(document,"mousemove",v),et(document,"mouseup",m)}(e,n,t,o)}(t,n,o,e):ft(e)==r.scroller&&at(e):2==i?(n&&Vi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==i&&(S?gl(t,e):vn(t)))}}function fl(e,t,r){if("char"==r)return new yi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new yi(ve(t.line,0),Se(e.doc,ve(t.line+1,0)));var n=r(e,t);return new yi(n.from,n.to)}function dl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&at(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!lt(e,r))return ct(t);o-=s.top-l.viewOffset;for(var a=0;a<e.options.gutters.length;++a){var u=l.gutters.childNodes[a];if(u&&u.getBoundingClientRect().right>=i)return nt(e,r,e,de(e.doc,o),e.options.gutters[a],t),ct(t)}}function pl(e,t){return dl(e,t,"gutterClick",!0)}function gl(e,t){xr(e.display,t)||function(e,t){if(!lt(e,"gutterContextMenu"))return!1;return dl(e,t,"gutterContextMenu",!1)}(e,t)||it(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function vl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Rr(e)}cl.prototype.compare=function(e,t,r){return this.time+400>e&&0==me(t,this.pos)&&r==this.button};var ml={toString:function(){return"CodeMirror.Init"}},yl={},bl={};function wl(e){ci(e),Zn(e),Cn(e)}function xl(e,t,r){if(!t!=!(r&&r!=ml)){var n=e.display.dragFunctions,i=t?et:rt;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Cl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),_e(e)),ln(e),Zn(e),Rr(e),setTimeout(function(){return En(e)},100)}function Sl(e,t){var r=this;if(!(this instanceof Sl))return new Sl(e,t);this.options=t=t?z(t):{},z(yl,t,!1),hi(t);var n=t.value;"string"==typeof n&&(n=new To(n,t.mode,null,t.lineSeparator,t.direction)),this.doc=n;var i=new Sl.inputStyles[t.inputStyle](this),o=this.display=new se(e,n,i);for(var u in o.wrapper.CodeMirror=this,ci(this),vl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Rn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},t.autofocus&&!m&&o.input.focus(),l&&s<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(e){var t=e.display;et(t.scroller,"mousedown",_n(e,hl)),et(t.scroller,"dblclick",l&&s<11?_n(e,function(t){if(!it(e,t)){var r=sn(e,t);if(r&&!pl(e,t)&&!xr(e.display,t)){at(t);var n=e.findWordAt(r);Vi(e.doc,n.anchor,n.head)}}}):function(t){return it(e,t)||at(t)});S||et(t.scroller,"contextmenu",function(t){return gl(e,t)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}et(t.scroller,"touchstart",function(i){if(!it(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!pl(e,i)){t.input.ensurePolled(),clearTimeout(r);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),et(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),et(t.scroller,"touchend",function(r){var n=t.activeTouch;if(n&&!xr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var l,s=e.coordsChar(t.activeTouch,"page");l=!n.prev||o(n,n.prev)?new yi(s,s):!n.prev.prev||o(n,n.prev.prev)?e.findWordAt(s):new yi(ve(s.line,0),Se(e.doc,ve(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),at(r)}i()}),et(t.scroller,"touchcancel",i),et(t.scroller,"scroll",function(){t.scroller.clientHeight&&(An(e,t.scroller.scrollTop),Dn(e,t.scroller.scrollLeft,!0),nt(e,"scroll",e))}),et(t.scroller,"mousewheel",function(t){return vi(e,t)}),et(t.scroller,"DOMMouseScroll",function(t){return vi(e,t)}),et(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){it(e,t)||ht(t)},over:function(t){it(e,t)||(!function(e,t){var r=sn(e,t);if(r){var n=document.createDocumentFragment();hn(e,r,n),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,n)}}(e,t),ht(t))},start:function(t){return function(e,t){if(l&&(!e.state.draggingText||+new Date-Mo<100))ht(t);else if(!it(e,t)&&!xr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var r=O("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),h&&r.parentNode.removeChild(r)}}(e,t)},drop:_n(e,No),leave:function(t){it(e,t)||Oo(e)}};var a=t.input.getField();et(a,"keyup",function(t){return ll.call(e,t)}),et(a,"keydown",_n(e,ol)),et(a,"keypress",_n(e,sl)),et(a,"focus",function(t){return mn(e,t)}),et(a,"blur",function(t){return yn(e,t)})}(this),Do(),Gn(this),this.curOp.forceUpdate=!0,Ai(this,n),t.autofocus&&!m||this.hasFocus()?setTimeout(E(mn,this),20):yn(this),bl)bl.hasOwnProperty(u)&&bl[u](r,t[u],ml);Sn(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Ll.length;++c)Ll[c](r);Un(this),a&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Sl.defaults=yl,Sl.optionHandlers=bl;var Ll=[];function kl(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=It(e,t).state:r="prev");var l=e.options.tabSize,s=ae(o,t),a=I(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==U||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?I(ae(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(f<u&&(h+=_(u-f)),h!=c)return uo(o,h,ve(t,0),ve(t,c.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<c.length){var v=ve(t,c.length);ji(o,p,new yi(v,v));break}}}Sl.defineInitHook=function(e){return Ll.push(e)};var Tl=null;function Ml(e){Tl=e}function Nl(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var l,s=e.state.pasteIncoming||"paste"==i,a=wt(t),u=null;if(s&&n.ranges.length>1)if(Tl&&Tl.text.join("\n")==t){if(n.ranges.length%Tl.text.length==0){u=[];for(var c=0;c<Tl.text.length;c++)u.push(o.splitLines(Tl.text[c]))}}else a.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=$(a,function(e){return[e]}));for(var h=n.ranges.length-1;h>=0;h--){var f=n.ranges[h],d=f.from(),p=f.to();f.empty()&&(r&&r>0?d=ve(d.line,d.ch-r):e.state.overwrite&&!s?p=ve(p.line,Math.min(ae(o,p.line).text.length,p.ch+q(a).length)):Tl&&Tl.lineWise&&Tl.text.join("\n")==t&&(d=p=ve(d.line,0))),l=e.curOp.updateInput;var g={from:d,to:p,text:u?u[h%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};io(e.doc,g),sr(e,"inputRead",e,g)}t&&!s&&Al(e,t),Tn(e),e.curOp.updateInput=l,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ol(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Yn(t,function(){return Nl(t,r,0,null,"paste")}),!0}function Al(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){l=kl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ae(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=kl(e,i.head.line,"smart"));l&&sr(e,"electricInput",e,i.head.line)}}}function Wl(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:ve(i,0),head:ve(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Dl(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Hl(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return a?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),Dl(e),t}function Fl(e,t,r,n,i){var o=t,l=r,s=ae(e,t.line);function a(n){var o,l;if(null==(o=i?function(e,t,r,n){var i=Qe(t,e.doc.direction);if(!i)return _o(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=$e(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from<r.ch))return _o(t,r,n);var s,a=function(e,r){return Yo(t,e instanceof ve?e.ch:e,r)},u=function(r){return e.options.lineWrapping?(s=s||Wr(e,t),Zr(e,t,s,r)):{begin:0,end:t.text.length}},c=u("before"==r.sticky?a(r,-1):r.ch);if("rtl"==e.doc.direction||1==l.level){var h=1==l.level==n<0,f=a(r,h?1:-1);if(null!=f&&(h?f<=l.to&&f<=c.end:f>=l.from&&f>=c.begin)){var d=h?"before":"after";return new ve(r.line,f,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ve(r.line,a(e,1),"before"):new ve(r.line,e,"after")};e>=0&&e<i.length;e+=t){var l=i[e],s=t>0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u<l.to)return o(u,s);if(u=s?l.from:a(l.to,-1),n.begin<=u&&u<n.end)return o(u,s)}},g=p(o+n,n,c);if(g)return g;var v=n>0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}(e.cm,s,t,r):_o(s,t,r))){if(n||(l=t.line+r)<e.first||l>=e.first+e.size||(t=new ve(l,t.ch,t.sticky),!(s=ae(e,l))))return!1;t=qo(i,e.cm,s,t.line,r)}else t=o;return!0}if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var u=null,c="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||a(!f);f=!1){var d=s.text.charAt(t.ch)||"\n",p=te(d,h)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||f||p||(p="s"),u&&u!=p){r<0&&(r=1,a(),t.sticky="after");break}if(p&&(u=p),r>0&&!a(!f))break}var g=eo(e,t,o,l,!0);return ye(o,g)&&(g.hitSide=!0),g}function Pl(e,t,r,n){var i,o,l=e.doc,s=t.left;if("page"==n){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(a-.5*en(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=qr(e,s,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var El=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function zl(e,t){var r=Ar(e,t.line);if(!r||r.hidden)return null;var n=ae(e.doc,t.line),i=Nr(r,n,t.line),o=Qe(n,e.doc.direction),l="left";o&&(l=$e(o,t.ch)%2?"right":"left");var s=Pr(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function Il(e,t){return t&&(e.bad=!0),e}function Rl(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Il(e.clipPos(ve(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return Bl(o,t,r)}}function Bl(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!W(n,t))return Il(ve(fe(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?q(e.rest):e.line;return Il(ve(fe(o),o.text.length),i)}var l=3==t.nodeType?t:null,s=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,r&&(r=l.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var a=e.measure,u=a.maps;function c(t,r,n){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?a.map:u[i],l=0;l<o.length;l+=3){var s=o[l+2];if(s==t||s==r){var c=fe(i<0?e.line:e.rest[i]),h=o[l]+n;return(n<0||s!=t)&&(h=o[l+(n?1:0)]),ve(c,h)}}}var h=c(l,s,r);if(h)return Il(h,i);for(var f=s.nextSibling,d=l?l.nodeValue.length-r:0;f;f=f.nextSibling){if(h=c(f,f.firstChild,0))return Il(ve(h.line,h.ch-d),i);d+=f.textContent.length}for(var p=s.previousSibling,g=r;p;p=p.previousSibling){if(h=c(p,p.firstChild,-1))return Il(ve(h.line,h.ch+g),i);g+=p.textContent.length}}El.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;function o(e){if(!it(n,e)){if(n.somethingSelected())Ml({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Wl(n);Ml({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,V),n.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var o=Tl.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var l=Hl(),s=l.firstChild;n.display.lineSpace.insertBefore(l,n.display.lineSpace.firstChild),s.value=Tl.text.join("\n");var a=document.activeElement;P(s),setTimeout(function(){n.display.lineSpace.removeChild(l),a.focus(),a==i&&r.showPrimarySelection()},50)}}Dl(i,n.options.spellcheck),et(i,"paste",function(e){it(n,e)||Ol(e,n)||s<=11&&setTimeout(_n(n,function(){return t.updateFromDOM()}),20)}),et(i,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),et(i,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),et(i,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),et(i,"touchstart",function(){return r.forceCompositionEnd()}),et(i,"input",function(){t.composing||t.readFromDOMSoon()}),et(i,"copy",o),et(i,"cut",o)},El.prototype.prepareSelection=function(){var e=cn(this.cm,!1);return e.focus=this.cm.state.focused,e},El.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},El.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,n=t.doc.sel.primary(),i=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var l=Rl(t,e.anchorNode,e.anchorOffset),s=Rl(t,e.focusNode,e.focusOffset);if(!l||l.bad||!s||s.bad||0!=me(xe(l,s),i)||0!=me(we(l,s),o)){var a=t.display.view,u=i.line>=t.display.viewFrom&&zl(t,i)||{node:a[0].measure.map[2],offset:0},c=o.line<t.display.viewTo&&zl(t,o);if(!c){var h=a[a.length-1].measure,f=h.maps?h.maps[h.maps.length-1]:h.map;c={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(u&&c){var d,p=e.rangeCount&&e.getRangeAt(0);try{d=k(u.node,u.offset,c.offset,c.node)}catch(e){}d&&(!r&&t.state.focused?(e.collapse(u.node,u.offset),d.collapsed||(e.removeAllRanges(),e.addRange(d))):(e.removeAllRanges(),e.addRange(d)),p&&null==e.anchorNode?e.addRange(p):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},El.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},El.prototype.showMultipleSelections=function(e){N(this.cm.display.cursorDiv,e.cursors),N(this.cm.display.selectionDiv,e.selection)},El.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},El.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return W(this.div,t)},El.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},El.prototype.blur=function(){this.div.blur()},El.prototype.getField=function(){return this.div},El.prototype.supportsTouch=function(){return!0},El.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Yn(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))})},El.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},El.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(v&&c&&this.cm.options.gutters.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Rl(t,e.anchorNode,e.anchorOffset),n=Rl(t,e.focusNode,e.focusOffset);r&&n&&Yn(t,function(){_i(t.doc,wi(r,n),V),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},El.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),l=o.from(),s=o.to();if(0==l.ch&&l.line>n.firstLine()&&(l=ve(l.line-1,ae(n.doc,l.line-1).length)),s.ch==ae(n.doc,s.line).text.length&&s.line<n.lastLine()&&(s=ve(s.line+1,0)),l.line<i.viewFrom||s.line>i.viewTo-1)return!1;l.line==i.viewFrom||0==(e=an(n,l.line))?(t=fe(i.view[0].line),r=i.view[0].node):(t=fe(i.view[e].line),r=i.view[e-1].node.nextSibling);var a,u,c=an(n,s.line);if(c==i.view.length-1?(a=i.viewTo-1,u=i.lineDiv.lastChild):(a=fe(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var h=n.doc.splitLines(function(e,t,r,n,i){var o="",l=!1,s=e.doc.lineSeparator();function a(){l&&(o+=s,l=!1)}function u(e){e&&(a(),o+=e)}function c(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void u(r||t.textContent.replace(/\u200b/g,""));var o,h=t.getAttribute("cm-marker");if(h){var f=e.findMarks(ve(n,0),ve(i+1,0),(g=+h,function(e){return e.id==g}));return void(f.length&&(o=f[0].find(0))&&u(ue(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var d=/^(pre|div|p)$/i.test(t.nodeName);d&&a();for(var p=0;p<t.childNodes.length;p++)c(t.childNodes[p]);d&&(l=!0)}else 3==t.nodeType&&u(t.nodeValue);var g}for(;c(t),t!=r;)t=t.nextSibling;return o}(n,r,u,t,a)),f=ue(n.doc,ve(t,0),ve(a,ae(n.doc,a).text.length));h.length>1&&f.length>1;)if(q(h)==q(f))h.pop(),f.pop(),a--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}for(var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);d<m&&g.charCodeAt(d)==v.charCodeAt(d);)++d;for(var y=q(h),b=q(f),w=Math.min(y.length-(1==h.length?d:0),b.length-(1==f.length?d:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==h.length&&1==f.length&&t==l.line)for(;d&&d>l.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=ve(t,d),C=ve(a,f.length?q(f).length-p:0);return h.length>1||h[0]||me(x,C)?(uo(n.doc,h,x,C,"+input"),!0):void 0},El.prototype.ensurePolled=function(){this.forceCompositionEnd()},El.prototype.reset=function(){this.forceCompositionEnd()},El.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},El.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},El.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Yn(this.cm,function(){return Zn(e.cm)})},El.prototype.setUneditable=function(e){e.contentEditable="false"},El.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||_n(this.cm,Nl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},El.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},El.prototype.onContextMenu=function(){},El.prototype.resetPosition=function(){},El.prototype.needsContentAttribute=!0;var Gl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};Gl.prototype.init=function(e){var t=this,r=this,n=this.cm,i=this.wrapper=Hl(),o=this.textarea=i.firstChild;function a(e){if(!it(n,e)){if(n.somethingSelected())Ml({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Wl(n);Ml({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",o.value=t.text.join("\n"),P(o))}"cut"==e.type&&(n.state.cutIncoming=!0)}}e.wrapper.insertBefore(i,e.wrapper.firstChild),g&&(o.style.width="0px"),et(o,"input",function(){l&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),et(o,"paste",function(e){it(n,e)||Ol(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),et(o,"cut",a),et(o,"copy",a),et(e.scroller,"paste",function(t){xr(e,t)||it(n,t)||(n.state.pasteIncoming=!0,r.focus())}),et(e.lineSpace,"selectstart",function(t){xr(e,t)||at(t)}),et(o,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),et(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Gl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=cn(e);if(e.options.moveInputWithCursor){var i=Xr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},Gl.prototype.showSelection=function(e){var t=this.cm.display;N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Gl.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&P(this.textarea),l&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&s>=9&&(this.hasSelection=null))}},Gl.prototype.getField=function(){return this.textarea},Gl.prototype.supportsTouch=function(){return!1},Gl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},Gl.prototype.blur=function(){this.textarea.blur()},Gl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Gl.prototype.receivedFocus=function(){this.slowPoll()},Gl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Gl.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))})},Gl.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||xt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,u=Math.min(n.length,i.length);a<u&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return Yn(t,function(){Nl(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Gl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Gl.prototype.onKeyPress=function(){l&&s>=9&&(this.hasSelection=null),this.fastPoll()},Gl.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea,o=sn(r,e),u=n.scroller.scrollTop;if(o&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&_n(r,_i)(r.doc,wi(o),V);var c=i.style.cssText,f=t.wrapper.style.cssText;t.wrapper.style.cssText="position: absolute";var d,p=t.wrapper.getBoundingClientRect();if(i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a&&(d=window.scrollY),n.input.focus(),a&&window.scrollTo(null,d),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=!0,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&s>=9&&v(),S){ht(e);var g=function(){rt(window,"mouseup",g),setTimeout(m,20)};et(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=c,l&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart){(!l||l&&s<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?_n(r,ro)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},Gl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Gl.prototype.setUneditable=function(){},Gl.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=ml&&i(e,t,r)}:i)}e.defineOption=r,e.Init=ml,r("value","",function(e,t){return e.setValue(t)},!0),r("mode",null,function(e,t){e.doc.modeOption=t,ki(e)},!0),r("indentUnit",2,ki,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(e){Ti(e),Rr(e),Zn(e)},!0),r("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(ve(n,o))}n++});for(var i=r.length-1;i>=0;i--)uo(e.doc,t,r[i],ve(r[i].line,r[i].ch+t.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ml&&e.refresh()}),r("specialCharPlaceholder",Qt,function(e){return e.refresh()},!0),r("electricChars",!0),r("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",function(e){vl(e),wl(e)},!0),r("keyMap","default",function(e,t,r){var n=jo(t),i=r!=ml&&jo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Cl,!0),r("gutters",[],function(e){hi(e.options),wl(e)},!0),r("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?nn(e.display)+"px":"0",e.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(e){return En(e)},!0),r("scrollbarStyle","native",function(e){Rn(e),En(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),r("lineNumbers",!1,function(e){hi(e.options),wl(e)},!0),r("firstLineNumber",1,wl,!0),r("lineNumberFormatter",function(e){return e},wl,!0),r("showCursorWhenSelecting",!1,un,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("readOnly",!1,function(e,t){"nocursor"==t&&(yn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),r("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),r("dragDrop",!0,xl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,un,!0),r("singleCursorHeightPerLine",!0,un,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Ti,!0),r("addModeClass",!1,Ti,!0),r("pollInterval",100),r("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),r("historyEventDelay",1250),r("viewportMargin",10,function(e){return e.refresh()},!0),r("maxHighlightLength",1e4,Ti,!0),r("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),r("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),r("autofocus",null),r("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Sl),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&_n(this,t[e])(this,r,i),nt(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](jo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:qn(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,Zn(this)}),removeOverlay:qn(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Zn(this)}}),indentLine:qn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),pe(this.doc,e)&&kl(this,e,t,r)}),indentSelection:qn(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(kl(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Tn(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a<r;++a)kl(this,a,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[n].from().ch>0&&ji(this.doc,n,new yi(o,u[n].to()),V)}}}),getTokenAt:function(e,t){return Vt(this,e,t)},getLineTokens:function(e,t){return Vt(this,ve(e),t,!0)},getTokenTypeAt:function(e){e=Se(this.doc,e);var t,r=zt(this,ae(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]<o)){t=r[2*l+2];break}n=l+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var l=0;l<o[t].length;l++){var s=i[o[t][l]];s&&n.push(s)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var a=0;a<i._global.length;a++){var u=i._global[a];u.pred(o,this)&&-1==B(n,u.val)&&n.push(u.val)}return n},getStateAfter:function(e,t){var r=this.doc;return It(this,(e=Ce(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return Xr(this,null==e?r.head:"object"==typeof e?Se(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return jr(this,Se(this.doc,e),t||"page")},coordsChar:function(e,t){return qr(this,(e=Kr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Kr(this,{top:e,left:0},t||"page").top,de(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=ae(this.doc,e)}else n=e;return Vr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Xe(n):0)},defaultTextHeight:function(){return en(this.display)},defaultCharWidth:function(){return tn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,l,s,a=this.display,u=(e=Xr(this,Se(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==n)u=e.top;else if("above"==n||"near"==n){var h=Math.max(a.wrapper.clientHeight,this.doc.height),f=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),r&&(o=this,l={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=Ln(o,l)).scrollTop&&An(o,s.scrollTop),null!=s.scrollLeft&&Dn(o,s.scrollLeft))},triggerOnKeyDown:qn(ol),triggerOnKeyPress:qn(sl),triggerOnKeyUp:ll,triggerOnMouseDown:qn(hl),execCommand:function(e){if($o.hasOwnProperty(e))return $o[e].call(null,this)},triggerElectric:qn(function(e){Al(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=Se(this.doc,e),l=0;l<t&&!(o=Fl(this.doc,o,i,r,n)).hitSide;++l);return o},moveH:qn(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Fl(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},j)}),deleteH:qn(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Xo(this,function(r){var i=Fl(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var l=Se(this.doc,e),s=0;s<t;++s){var a=Xr(this,l,"div");if(null==o?o=a.left:a.left=o,(l=Pl(this,a,i,r)).hitSide)break}return l},moveV:qn(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(l){if(o)return e<0?l.from():l.to();var s=Xr(r,l.head,"div");null!=l.goalColumn&&(s.left=l.goalColumn),i.push(s.left);var a=Pl(r,s,e,t);return"page"==t&&l==n.sel.primary()&&kn(r,jr(r,a,"div").top-s.top),a},j),i.length)for(var l=0;l<n.sel.ranges.length;l++)n.sel.ranges[l].goalColumn=i[l]}),findWordAt:function(e){var t=ae(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),l=te(o,i)?function(e){return te(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};r>0&&l(t.charAt(r-1));)--r;for(;n<t.length&&l(t.charAt(n));)++n}return new yi(ve(e.line,r),ve(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?H(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),nt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==D()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:qn(function(e,t){Mn(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-kr(this)-this.display.barHeight,width:e.scrollWidth-kr(this)-this.display.barWidth,clientHeight:Mr(this),clientWidth:Tr(this)}},scrollIntoView:qn(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ve(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Nn(e),e.curOp.scrollToPos=t}(this,e):On(this,e.from,e.to,e.margin)}),setSize:qn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&Ir(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Qn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,nt(this,"refresh",this)}),operation:function(e){return Yn(this,e)},startOperation:function(){return Gn(this)},endOperation:function(){return Un(this)},refresh:qn(function(){var e=this.display.cachedTextHeight;Zn(this),this.curOp.forceUpdate=!0,Rr(this),Mn(this,this.doc.scrollLeft,this.doc.scrollTop),ai(this),(null==e||Math.abs(e-en(this.display))>.5)&&ln(this),nt(this,"refresh",this)}),swapDoc:qn(function(e){var t=this.doc;return t.cm=null,Ai(this,e),Rr(this),this.display.input.reset(),Mn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},st(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Sl);var Ul="iter insert remove copy getEditor constructor".split(" ");for(var Vl in To.prototype)To.prototype.hasOwnProperty(Vl)&&B(Ul,Vl)<0&&(Sl.prototype[Vl]=function(e){return function(){return e.apply(this.doc,arguments)}}(To.prototype[Vl]));return st(To),Sl.inputStyles={textarea:Gl,contenteditable:El},Sl.defineMode=function(e){Sl.defaults.mode||"null"==e||(Sl.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Lt[e]=t}.apply(this,arguments)},Sl.defineMIME=function(e,t){kt[e]=t},Sl.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Sl.defineMIME("text/plain","null"),Sl.defineExtension=function(e,t){Sl.prototype[e]=t},Sl.defineDocExtension=function(e,t){To.prototype[e]=t},Sl.fromTextArea=function(e,t){if((t=t?z(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=D();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(et(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(rt(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=Sl(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=rt,e.on=et,e.wheelEventPixels=gi,e.Doc=To,e.splitLines=wt,e.countColumn=I,e.findColumn=X,e.isWordChar=ee,e.Pass=U,e.signal=nt,e.Line=Xt,e.changeEnd=xi,e.scrollbarModel=In,e.Pos=ve,e.cmpPos=me,e.modes=Lt,e.mimeModes=kt,e.resolveMode=Tt,e.getMode=Mt,e.modeExtensions=Nt,e.extendMode=Ot,e.copyState=At,e.startState=Dt,e.innerMode=Wt,e.commands=$o,e.keyMap=Io,e.keyName=Ko,e.isModifierKey=Uo,e.lookupKey=Go,e.normalizeKeyMap=Bo,e.StringStream=Ht,e.SharedTextMarker=Co,e.TextMarker=wo,e.LineWidget=mo,e.e_preventDefault=at,e.e_stopPropagation=ut,e.e_stop=ht,e.addClass=H,e.contains=W,e.rmClass=T,e.keyNames=Fo}(Sl),Sl.version="5.32.0",Sl}); -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CodeMirror=t()}(this,function(){"use strict";var e=navigator.userAgent,t=navigator.platform,r=/gecko\/\d/i.test(e),n=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),l=n||i||o,s=l&&(n?document.documentMode||6:+(o||i)[1]),a=!o&&/WebKit\//.test(e),u=a&&/Qt\/\d+\.\d+/.test(e),c=!o&&/Chrome\//.test(e),h=/Opera\//.test(e),f=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),x=h&&e.match(/Version\/(\d*\.\d*)/);x&&(x=Number(x[1])),x&&x>=15&&(h=!1,a=!0);var C=y&&(u||h&&(null==x||x<12.11)),S=r||l&&s>=9;function L(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var k,T=function(e,t){var r=e.className,n=L(t).exec(r);if(n){var i=r.slice(n.index+n[0].length);e.className=r.slice(0,n.index)+(i?n[1]+i:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function N(e,t){return M(e).appendChild(t)}function O(e,t,r,n){var i=document.createElement(e);if(r&&(i.className=r),n&&(i.style.cssText=n),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function A(e,t,r,n){var i=O(e,t,r,n);return i.setAttribute("role","presentation"),i}function W(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function D(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function H(e,t){var r=e.className;L(t).test(r)||(e.className+=(r?" ":"")+t)}function F(e,t){for(var r=e.split(" "),n=0;n<r.length;n++)r[n]&&!L(r[n]).test(t)&&(t+=" "+r[n]);return t}k=document.createRange?function(e,t,r,n){var i=document.createRange();return i.setEnd(n||e,r),i.setStart(e,t),i}:function(e,t,r){var n=document.body.createTextRange();try{n.moveToElementText(e.parentNode)}catch(e){return n}return n.collapse(!0),n.moveEnd("character",r),n.moveStart("character",t),n};var P=function(e){e.select()};function E(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function z(e,t,r){for(var n in t||(t={}),e)!e.hasOwnProperty(n)||!1===r&&t.hasOwnProperty(n)||(t[n]=e[n]);return t}function I(e,t,r,n,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=n||0,l=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return l+(t-o);l+=s-o,l+=r-l%r,o=s+1}}g?P=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:l&&(P=function(e){try{e.select()}catch(e){}});var R=function(){this.id=null};function B(e,t){for(var r=0;r<e.length;++r)if(e[r]==t)return r;return-1}R.prototype.set=function(e,t){clearTimeout(this.id),this.id=setTimeout(t,e)};var G=30,U={toString:function(){return"CodeMirror.Pass"}},V={scroll:!1},K={origin:"*mouse"},j={origin:"+move"};function X(e,t,r){for(var n=0,i=0;;){var o=e.indexOf("\t",n);-1==o&&(o=e.length);var l=o-n;if(o==e.length||i+l>=t)return n+Math.min(l,t-i);if(i+=o-n,n=o+1,(i+=r-i%r)>=t)return n}}var Y=[""];function _(e){for(;Y.length<=e;)Y.push(q(Y)+" ");return Y[e]}function q(e){return e[e.length-1]}function $(e,t){for(var r=[],n=0;n<e.length;n++)r[n]=t(e[n],n);return r}function Z(){}function Q(e,t){var r;return Object.create?r=Object.create(e):(Z.prototype=e,r=new Z),t&&z(t,r),r}var J=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||J.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function re(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\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]/;function ie(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,r){for(;(r<0?t>0:t<e.length)&&ie(e.charAt(t));)t+=r;return t}function le(e,t,r){for(var n=t>r?-1:1;;){if(t==r)return t;var i=(t+r)/2,o=n<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:r;e(o)?r=o:t=o+n}}function se(e,t,n){var i=this;this.input=n,i.scrollbarFiller=O("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=O("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=A("div",null,"CodeMirror-code"),i.selectionDiv=O("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=O("div",null,"CodeMirror-cursors"),i.measure=O("div",null,"CodeMirror-measure"),i.lineMeasure=O("div",null,"CodeMirror-measure"),i.lineSpace=A("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var o=A("div",[i.lineSpace],"CodeMirror-lines");i.mover=O("div",[o],null,"position: relative"),i.sizer=O("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=O("div",null,null,"position: absolute; height: "+G+"px; width: 1px;"),i.gutters=O("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=O("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=O("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),l&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),a||r&&m||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function ae(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var r=e;!r.lines;)for(var n=0;;++n){var i=r.children[n],o=i.chunkSize();if(t<o){r=i;break}t-=o}return r.lines[t]}function ue(e,t,r){var n=[],i=t.line;return e.iter(t.line,r.line+1,function(e){var o=e.text;i==r.line&&(o=o.slice(0,r.ch)),i==t.line&&(o=o.slice(t.ch)),n.push(o),++i}),n}function ce(e,t,r){var n=[];return e.iter(t,r,function(e){n.push(e.text)}),n}function he(e,t){var r=t-e.height;if(r)for(var n=e;n;n=n.parent)n.height+=r}function fe(e){if(null==e.parent)return null;for(var t=e.parent,r=B(t.lines,e),n=t.parent;n;t=n,n=n.parent)for(var i=0;n.children[i]!=t;++i)r+=n.children[i].chunkSize();return r+t.first}function de(e,t){var r=e.first;e:do{for(var n=0;n<e.children.length;++n){var i=e.children[n],o=i.height;if(t<o){e=i;continue e}t-=o,r+=i.chunkSize()}return r}while(!e.lines);for(var l=0;l<e.lines.length;++l){var s=e.lines[l].height;if(t<s)break;t-=s}return r+l}function pe(e,t){return t>=e.first&&t<e.first+e.size}function ge(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ve(e,t,r){if(void 0===r&&(r=null),!(this instanceof ve))return new ve(e,t,r);this.line=e,this.ch=t,this.sticky=r}function me(e,t){return e.line-t.line||e.ch-t.ch}function ye(e,t){return e.sticky==t.sticky&&0==me(e,t)}function be(e){return ve(e.line,e.ch)}function we(e,t){return me(e,t)<0?t:e}function xe(e,t){return me(e,t)<0?e:t}function Ce(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function Se(e,t){if(t.line<e.first)return ve(e.first,0);var r=e.first+e.size-1;return t.line>r?ve(r,ae(e,r).text.length):function(e,t){var r=e.ch;return null==r||r>t?ve(e.line,t):r<0?ve(e.line,0):e}(t,ae(e,t.line).text.length)}function Le(e,t){for(var r=[],n=0;n<t.length;n++)r[n]=Se(e,t[n]);return r}var ke=!1,Te=!1;function Me(e,t,r){this.marker=e,this.from=t,this.to=r}function Ne(e,t){if(e)for(var r=0;r<e.length;++r){var n=e[r];if(n.marker==t)return n}}function Oe(e,t){for(var r,n=0;n<e.length;++n)e[n]!=t&&(r||(r=[])).push(e[n]);return r}function Ae(e,t){if(t.full)return null;var r=pe(e,t.from.line)&&ae(e,t.from.line).markedSpans,n=pe(e,t.to.line)&&ae(e,t.to.line).markedSpans;if(!r&&!n)return null;var i=t.from.ch,o=t.to.ch,l=0==me(t.from,t.to),s=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==l.type&&(!r||!o.marker.insertLeft)){var s=null==o.to||(l.inclusiveRight?o.to>=t:o.to>t);(n||(n=[])).push(new Me(l,o.from,s?null:o.to))}}return n}(r,i,l),a=function(e,t,r){var n;if(e)for(var i=0;i<e.length;++i){var o=e[i],l=o.marker;if(null==o.to||(l.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==l.type&&(!r||o.marker.insertLeft)){var s=null==o.from||(l.inclusiveLeft?o.from<=t:o.from<t);(n||(n=[])).push(new Me(l,s?null:o.from-t,null==o.to?null:o.to-t))}}return n}(n,o,l),u=1==t.text.length,c=q(t.text).length+(u?i:0);if(s)for(var h=0;h<s.length;++h){var f=s[h];if(null==f.to){var d=Ne(a,f.marker);d?u&&(f.to=null==d.to?null:d.to+c):f.to=i}}if(a)for(var p=0;p<a.length;++p){var g=a[p];if(null!=g.to&&(g.to+=c),null==g.from)Ne(s,g.marker)||(g.from=c,u&&(s||(s=[])).push(g));else g.from+=c,u&&(s||(s=[])).push(g)}s&&(s=We(s)),a&&a!=s&&(a=We(a));var v=[s];if(!u){var m,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(m||(m=[])).push(new Me(s[b].marker,null,null));for(var w=0;w<y;++w)v.push(m);v.push(a)}return v}function We(e){for(var t=0;t<e.length;++t){var r=e[t];null!=r.from&&r.from==r.to&&!1!==r.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function De(e){var t=e.markedSpans;if(t){for(var r=0;r<t.length;++r)t[r].marker.detachLine(e);e.markedSpans=null}}function He(e,t){if(t){for(var r=0;r<t.length;++r)t[r].marker.attachLine(e);e.markedSpans=t}}function Fe(e){return e.inclusiveLeft?-1:0}function Pe(e){return e.inclusiveRight?1:0}function Ee(e,t){var r=e.lines.length-t.lines.length;if(0!=r)return r;var n=e.find(),i=t.find(),o=me(n.from,i.from)||Fe(e)-Fe(t);if(o)return-o;var l=me(n.to,i.to)||Pe(e)-Pe(t);return l||t.id-e.id}function ze(e,t){var r,n=Te&&e.markedSpans;if(n)for(var i=void 0,o=0;o<n.length;++o)(i=n[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!r||Ee(r,i.marker)<0)&&(r=i.marker);return r}function Ie(e){return ze(e,!0)}function Re(e){return ze(e,!1)}function Be(e,t,r,n,i){var o=ae(e,t),l=Te&&o.markedSpans;if(l)for(var s=0;s<l.length;++s){var a=l[s];if(a.marker.collapsed){var u=a.marker.find(0),c=me(u.from,r)||Fe(a.marker)-Fe(i),h=me(u.to,n)||Pe(a.marker)-Pe(i);if(!(c>=0&&h<=0||c<=0&&h>=0)&&(c<=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?me(u.to,r)>=0:me(u.to,r)>0)||c>=0&&(a.marker.inclusiveRight&&i.inclusiveLeft?me(u.from,n)<=0:me(u.from,n)<0)))return!0}}}function Ge(e){for(var t;t=Ie(e);)e=t.find(-1,!0).line;return e}function Ue(e,t){var r=ae(e,t),n=Ge(r);return r==n?t:fe(n)}function Ve(e,t){if(t>e.lastLine())return t;var r,n=ae(e,t);if(!Ke(e,n))return t;for(;r=Re(n);)n=r.find(1,!0).line;return fe(n)+1}function Ke(e,t){var r=Te&&t.markedSpans;if(r)for(var n=void 0,i=0;i<r.length;++i)if((n=r[i]).marker.collapsed){if(null==n.from)return!0;if(!n.marker.widgetNode&&0==n.from&&n.marker.inclusiveLeft&&je(e,t,n))return!0}}function je(e,t,r){if(null==r.to){var n=r.marker.find(1,!0);return je(e,n.line,Ne(n.line.markedSpans,r.marker))}if(r.marker.inclusiveRight&&r.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==r.to&&(null==i.to||i.to!=r.from)&&(i.marker.inclusiveLeft||r.marker.inclusiveRight)&&je(e,t,i))return!0}function Xe(e){for(var t=0,r=(e=Ge(e)).parent,n=0;n<r.lines.length;++n){var i=r.lines[n];if(i==e)break;t+=i.height}for(var o=r.parent;o;o=(r=o).parent)for(var l=0;l<o.children.length;++l){var s=o.children[l];if(s==r)break;t+=s.height}return t}function Ye(e){if(0==e.height)return 0;for(var t,r=e.text.length,n=e;t=Ie(n);){var i=t.find(0,!0);n=i.from.line,r+=i.from.ch-i.to.ch}for(n=e;t=Re(n);){var o=t.find(0,!0);r-=n.text.length-o.from.ch,r+=(n=o.to.line).text.length-o.to.ch}return r}function _e(e){var t=e.display,r=e.doc;t.maxLine=ae(r,r.first),t.maxLineLength=Ye(t.maxLine),t.maxLineChanged=!0,r.iter(function(e){var r=Ye(e);r>t.maxLineLength&&(t.maxLineLength=r,t.maxLine=e)})}var qe=null;function $e(e,t,r){var n;qe=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==r?n=i:qe=i),o.from==t&&(o.from!=o.to&&"before"!=r?n=i:qe=i)}return null!=n?n:qe}var Ze=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";var r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,n=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,l=/[1n]/;function s(e,t,r){this.level=e,this.from=t,this.to=r}return function(a,u){var c="ltr"==u?"L":"R";if(0==a.length||"ltr"==u&&!r.test(a))return!1;for(var h,f=a.length,d=[],p=0;p<f;++p)d.push((h=a.charCodeAt(p))<=247?e.charAt(h):1424<=h&&h<=1524?"R":1536<=h&&h<=1785?t.charAt(h-1536):1774<=h&&h<=2220?"r":8192<=h&&h<=8203?"w":8204==h?"b":"L");for(var g=0,v=c;g<f;++g){var m=d[g];"m"==m?d[g]=v:v=m}for(var y=0,b=c;y<f;++y){var w=d[y];"1"==w&&"r"==b?d[y]="n":i.test(w)&&(b=w,"r"==w&&(d[y]="R"))}for(var x=1,C=d[0];x<f-1;++x){var S=d[x];"+"==S&&"1"==C&&"1"==d[x+1]?d[x]="1":","!=S||C!=d[x+1]||"1"!=C&&"n"!=C||(d[x]=C),C=S}for(var L=0;L<f;++L){var k=d[L];if(","==k)d[L]="N";else if("%"==k){var T=void 0;for(T=L+1;T<f&&"%"==d[T];++T);for(var M=L&&"!"==d[L-1]||T<f&&"1"==d[T]?"1":"N",N=L;N<T;++N)d[N]=M;L=T-1}}for(var O=0,A=c;O<f;++O){var W=d[O];"L"==A&&"1"==W?d[O]="L":i.test(W)&&(A=W)}for(var D=0;D<f;++D)if(n.test(d[D])){var H=void 0;for(H=D+1;H<f&&n.test(d[H]);++H);for(var F="L"==(D?d[D-1]:c),P=F==("L"==(H<f?d[H]:c))?F?"L":"R":c,E=D;E<H;++E)d[E]=P;D=H-1}for(var z,I=[],R=0;R<f;)if(o.test(d[R])){var B=R;for(++R;R<f&&o.test(d[R]);++R);I.push(new s(0,B,R))}else{var G=R,U=I.length;for(++R;R<f&&"L"!=d[R];++R);for(var V=G;V<R;)if(l.test(d[V])){G<V&&I.splice(U,0,new s(1,G,V));var K=V;for(++V;V<R&&l.test(d[V]);++V);I.splice(U,0,new s(2,K,V)),G=V}else++V;G<R&&I.splice(U,0,new s(1,G,R))}return"ltr"==u&&(1==I[0].level&&(z=a.match(/^\s+/))&&(I[0].from=z[0].length,I.unshift(new s(0,0,z[0].length))),1==q(I).level&&(z=a.match(/\s+$/))&&(q(I).to-=z[0].length,I.push(new s(0,f-z[0].length,f)))),"rtl"==u?I.reverse():I}}();function Qe(e,t){var r=e.order;return null==r&&(r=e.order=Ze(e.text,t)),r}var Je=[],et=function(e,t,r){if(e.addEventListener)e.addEventListener(t,r,!1);else if(e.attachEvent)e.attachEvent("on"+t,r);else{var n=e._handlers||(e._handlers={});n[t]=(n[t]||Je).concat(r)}};function tt(e,t){return e._handlers&&e._handlers[t]||Je}function rt(e,t,r){if(e.removeEventListener)e.removeEventListener(t,r,!1);else if(e.detachEvent)e.detachEvent("on"+t,r);else{var n=e._handlers,i=n&&n[t];if(i){var o=B(i,r);o>-1&&(n[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function nt(e,t){var r=tt(e,t);if(r.length)for(var n=Array.prototype.slice.call(arguments,2),i=0;i<r.length;++i)r[i].apply(null,n)}function it(e,t,r){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),nt(e,r||t.type,e,t),ct(t)||t.codemirrorIgnore}function ot(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var r=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),n=0;n<t.length;++n)-1==B(r,t[n])&&r.push(t[n])}function lt(e,t){return tt(e,t).length>0}function st(e){e.prototype.on=function(e,t){et(this,e,t)},e.prototype.off=function(e,t){rt(this,e,t)}}function at(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ut(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function ct(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ht(e){at(e),ut(e)}function ft(e){return e.target||e.srcElement}function dt(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var pt,gt,vt=function(){if(l&&s<9)return!1;var e=O("div");return"draggable"in e||"dragDrop"in e}();function mt(e){if(null==pt){var t=O("span","​");N(e,O("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(pt=t.offsetWidth<=1&&t.offsetHeight>2&&!(l&&s<8))}var r=pt?O("span","​"):O("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function yt(e){if(null!=gt)return gt;var t=N(e,document.createTextNode("AخA")),r=k(t,0,1).getBoundingClientRect(),n=k(t,1,2).getBoundingClientRect();return M(e),!(!r||r.left==r.right)&&(gt=n.right-r.right<3)}var bt,wt=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,r=[],n=e.length;t<=n;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),l=o.indexOf("\r");-1!=l?(r.push(o.slice(0,l)),t+=l+1):(r.push(o),t=i+1)}return r}:function(e){return e.split(/\r\n?|\n/)},xt=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ct="oncopy"in(bt=O("div"))||(bt.setAttribute("oncopy","return;"),"function"==typeof bt.oncopy),St=null;var Lt={},kt={};function Tt(e){if("string"==typeof e&&kt.hasOwnProperty(e))e=kt[e];else if(e&&"string"==typeof e.name&&kt.hasOwnProperty(e.name)){var t=kt[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Tt("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Tt("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Mt(e,t){t=Tt(t);var r=Lt[t.name];if(!r)return Mt(e,"text/plain");var n=r(e,t);if(Nt.hasOwnProperty(t.name)){var i=Nt[t.name];for(var o in i)i.hasOwnProperty(o)&&(n.hasOwnProperty(o)&&(n["_"+o]=n[o]),n[o]=i[o])}if(n.name=t.name,t.helperType&&(n.helperType=t.helperType),t.modeProps)for(var l in t.modeProps)n[l]=t.modeProps[l];return n}var Nt={};function Ot(e,t){z(t,Nt.hasOwnProperty(e)?Nt[e]:Nt[e]={})}function At(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var r={};for(var n in t){var i=t[n];i instanceof Array&&(i=i.concat([])),r[n]=i}return r}function Wt(e,t){for(var r;e.innerMode&&(r=e.innerMode(t))&&r.mode!=e;)t=r.state,e=r.mode;return r||{mode:e,state:t}}function Dt(e,t,r){return!e.startState||e.startState(t,r)}var Ht=function(e,t,r){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=r};Ht.prototype.eol=function(){return this.pos>=this.string.length},Ht.prototype.sol=function(){return this.pos==this.lineStart},Ht.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ht.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Ht.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Ht.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Ht.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ht.prototype.skipToEnd=function(){this.pos=this.string.length},Ht.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ht.prototype.backUp=function(e){this.pos-=e},Ht.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=I(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},Ht.prototype.indentation=function(){return I(this.string,null,this.tabSize)-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},Ht.prototype.match=function(e,t,r){if("string"!=typeof e){var n=this.string.slice(this.pos).match(e);return n&&n.index>0?null:(n&&!1!==t&&(this.pos+=n[0].length),n)}var i=function(e){return r?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},Ht.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ht.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ht.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ht.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var Ft=function(e,t){this.state=e,this.lookAhead=t},Pt=function(e,t,r,n){this.state=t,this.doc=e,this.line=r,this.maxLookAhead=n||0,this.baseTokens=null,this.baseTokenPos=1};function Et(e,t,r,n){var i=[e.state.modeGen],o={};jt(e,t.text,e.doc.mode,r,function(e,t){return i.push(e,t)},o,n);for(var l=r.state,s=function(n){r.baseTokens=i;var s=e.state.overlays[n],a=1,u=0;r.state=!0,jt(e,t.text,s.mode,r,function(e,t){for(var r=a;u<e;){var n=i[a];n>e&&i.splice(a,1,e,i[a+1],n),a+=2,u=Math.min(e,n)}if(t)if(s.opaque)i.splice(r,a-r,e,"overlay "+t),a=r+2;else for(;r<a;r+=2){var o=i[r+1];i[r+1]=(o?o+" ":"")+"overlay "+t}},o),r.state=l,r.baseTokens=null,r.baseTokenPos=1},a=0;a<e.state.overlays.length;++a)s(a);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function zt(e,t,r){if(!t.styles||t.styles[0]!=e.state.modeGen){var n=It(e,fe(t)),i=t.text.length>e.options.maxHighlightLength&&At(e.doc.mode,n.state),o=Et(e,t,n);i&&(n.state=i),t.stateAfter=n.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),r===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function It(e,t,r){var n=e.doc,i=e.display;if(!n.mode.startState)return new Pt(n,!0,t);var o=function(e,t,r){for(var n,i,o=e.doc,l=r?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>l;--s){if(s<=o.first)return o.first;var a=ae(o,s-1),u=a.stateAfter;if(u&&(!r||s+(u instanceof Ft?u.lookAhead:0)<=o.modeFrontier))return s;var c=I(a.text,null,e.options.tabSize);(null==i||n>c)&&(i=s-1,n=c)}return i}(e,t,r),l=o>n.first&&ae(n,o-1).stateAfter,s=l?Pt.fromSaved(n,l,o):new Pt(n,Dt(n.mode),o);return n.iter(o,t,function(r){Rt(e,r.text,s);var n=s.line;r.stateAfter=n==t-1||n%5==0||n>=i.viewFrom&&n<i.viewTo?s.save():null,s.nextLine()}),r&&(n.modeFrontier=s.line),s}function Rt(e,t,r,n){var i=e.doc.mode,o=new Ht(t,e.options.tabSize,r);for(o.start=o.pos=n||0,""==t&&Bt(i,r.state);!o.eol();)Gt(i,o,r.state),o.start=o.pos}function Bt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var r=Wt(e,t);return r.mode.blankLine?r.mode.blankLine(r.state):void 0}}function Gt(e,t,r,n){for(var i=0;i<10;i++){n&&(n[0]=Wt(e,r).mode);var o=e.token(t,r);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}Pt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},Pt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Pt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Pt.fromSaved=function(e,t,r){return t instanceof Ft?new Pt(e,At(e.mode,t.state),r,t.lookAhead):new Pt(e,At(e.mode,t),r)},Pt.prototype.save=function(e){var t=!1!==e?At(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Ft(t,this.maxLookAhead):t};var Ut=function(e,t,r){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=r};function Vt(e,t,r,n){var i,o,l=e.doc,s=l.mode,a=ae(l,(t=Se(l,t)).line),u=It(e,t.line,r),c=new Ht(a.text,e.options.tabSize,u);for(n&&(o=[]);(n||c.pos<t.ch)&&!c.eol();)c.start=c.pos,i=Gt(s,c,u.state),n&&o.push(new Ut(c,i,At(l.mode,u.state)));return n?o:new Ut(c,i,u.state)}function Kt(e,t){if(e)for(;;){var r=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!r)break;e=e.slice(0,r.index)+e.slice(r.index+r[0].length);var n=r[1]?"bgClass":"textClass";null==t[n]?t[n]=r[2]:new RegExp("(?:^|s)"+r[2]+"(?:$|s)").test(t[n])||(t[n]+=" "+r[2])}return e}function jt(e,t,r,n,i,o,l){var s=r.flattenSpans;null==s&&(s=e.options.flattenSpans);var a,u=0,c=null,h=new Ht(t,e.options.tabSize,n),f=e.options.addModeClass&&[null];for(""==t&&Kt(Bt(r,n.state),o);!h.eol();){if(h.pos>e.options.maxHighlightLength?(s=!1,l&&Rt(e,t,n,h.pos),h.pos=t.length,a=null):a=Kt(Gt(r,h,n.state,f),o),f){var d=f[0].name;d&&(a="m-"+(a?d+" "+a:d))}if(!s||c!=a){for(;u<h.start;)i(u=Math.min(h.start,u+5e3),c);c=a}h.start=h.pos}for(;u<h.pos;){var p=Math.min(h.pos,u+5e3);i(p,c),u=p}}var Xt=function(e,t,r){this.text=e,He(this,t),this.height=r?r(this):1};function Yt(e){e.parent=null,De(e)}Xt.prototype.lineNo=function(){return fe(this)},st(Xt);var _t={},qt={};function $t(e,t){if(!e||/^\s*$/.test(e))return null;var r=t.addModeClass?qt:_t;return r[e]||(r[e]=e.replace(/\S+/g,"cm-$&"))}function Zt(e,t){var r=A("span",null,null,a?"padding-right: .1px":null),n={pre:A("pre",[r],"CodeMirror-line"),content:r,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:(l||a)&&e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,s=void 0;n.pos=0,n.addToken=Jt,yt(e.display.measure)&&(s=Qe(o,e.doc.direction))&&(n.addToken=er(n.addToken,s)),n.map=[],rr(o,n,zt(e,o,t!=e.display.externalMeasured&&fe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(n.bgClass=F(o.styleClasses.bgClass,n.bgClass||"")),o.styleClasses.textClass&&(n.textClass=F(o.styleClasses.textClass,n.textClass||""))),0==n.map.length&&n.map.push(0,0,n.content.appendChild(mt(e.display.measure))),0==i?(t.measure.map=n.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(n.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(a){var u=n.content.lastChild;(/\bcm-tab\b/.test(u.className)||u.querySelector&&u.querySelector(".cm-tab"))&&(n.content.className="cm-tab-wrap-hack")}return nt(e,"renderLine",e,t.line,n.pre),n.pre.className&&(n.textClass=F(n.pre.className,n.textClass||"")),n}function Qt(e){var t=O("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,r,n,i,o,a){if(t){var u,c=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var r=t,n="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!r||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),n+=o,r=" "==o}return n}(t,e.trailingSpace):t,h=e.cm.state.specialChars,f=!1;if(h.test(t)){u=document.createDocumentFragment();for(var d=0;;){h.lastIndex=d;var p=h.exec(t),g=p?p.index-d:t.length-d;if(g){var v=document.createTextNode(c.slice(d,d+g));l&&s<9?u.appendChild(O("span",[v])):u.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;d+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=u.appendChild(O("span",_(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((m=u.appendChild(O("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),l&&s<9?u.appendChild(O("span",[m])):u.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,u=document.createTextNode(c),e.map.push(e.pos,e.pos+t.length,u),l&&s<9&&(f=!0),e.pos+=t.length;if(e.trailingSpace=32==c.charCodeAt(t.length-1),r||n||i||f||a){var w=r||"";n&&(w+=n),i&&(w+=i);var x=O("span",[u],w,a);return o&&(x.title=o),e.content.appendChild(x)}e.content.appendChild(u)}}function er(e,t){return function(r,n,i,o,l,s,a){i=i?i+" cm-force-border":"cm-force-border";for(var u=r.pos,c=u+n.length;;){for(var h=void 0,f=0;f<t.length&&!((h=t[f]).to>u&&h.from<=u);f++);if(h.to>=c)return e(r,n,i,o,l,s,a);e(r,n.slice(0,h.to-u),i,o,null,s,a),o=null,n=n.slice(h.to-u),u=h.to}}}function tr(e,t,r,n){var i=!n&&r.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!n&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",r.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rr(e,t,r){var n=e.markedSpans,i=e.text,o=0;if(n)for(var l,s,a,u,c,h,f,d=i.length,p=0,g=1,v="",m=0;;){if(m==p){a=u=c=h=s="",f=null,m=1/0;for(var y=[],b=void 0,w=0;w<n.length;++w){var x=n[w],C=x.marker;"bookmark"==C.type&&x.from==p&&C.widgetNode?y.push(C):x.from<=p&&(null==x.to||x.to>p||C.collapsed&&x.to==p&&x.from==p)?(null!=x.to&&x.to!=p&&m>x.to&&(m=x.to,u=""),C.className&&(a+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&x.from==p&&(c+=" "+C.startStyle),C.endStyle&&x.to==m&&(b||(b=[])).push(C.endStyle,x.to),C.title&&!h&&(h=C.title),C.collapsed&&(!f||Ee(f.marker,C)<0)&&(f=x)):x.from>p&&m>x.from&&(m=x.from)}if(b)for(var S=0;S<b.length;S+=2)b[S+1]==m&&(u+=" "+b[S]);if(!f||f.from==p)for(var L=0;L<y.length;++L)tr(t,0,y[L]);if(f&&(f.from||0)==p){if(tr(t,(null==f.to?d+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=d)break;for(var k=Math.min(d,m);;){if(v){var T=p+v.length;if(!f){var M=T>k?v.slice(0,k-p):v;t.addToken(t,M,l?l+a:a,c,p+M.length==m?u:"",h,s)}if(T>=k){v=v.slice(k-p),p=k;break}p=T,c=""}v=i.slice(o,o=r[g++]),l=$t(r[g++],t.cm.options)}}else for(var N=1;N<r.length;N+=2)t.addToken(t,i.slice(o,o=r[N]),$t(r[N+1],t.cm.options))}function nr(e,t,r){this.line=t,this.rest=function(e){for(var t,r;t=Re(e);)e=t.find(1,!0).line,(r||(r=[])).push(e);return r}(t),this.size=this.rest?fe(q(this.rest))-r+1:1,this.node=this.text=null,this.hidden=Ke(e,t)}function ir(e,t,r){for(var n,i=[],o=t;o<r;o=n){var l=new nr(e.doc,ae(e.doc,o),o);n=o+l.size,i.push(l)}return i}var or=null;var lr=null;function sr(e,t){var r=tt(e,t);if(r.length){var n,i=Array.prototype.slice.call(arguments,2);or?n=or.delayedCallbacks:lr?n=lr:(n=lr=[],setTimeout(ar,0));for(var o=function(e){n.push(function(){return r[e].apply(null,i)})},l=0;l<r.length;++l)o(l)}}function ar(){var e=lr;lr=null;for(var t=0;t<e.length;++t)e[t]()}function ur(e,t,r,n){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?fr(e,t):"gutter"==o?pr(e,t,r,n):"class"==o?dr(e,t):"widget"==o&&gr(e,t,n)}t.changes=null}function cr(e){return e.node==e.text&&(e.node=O("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),l&&s<8&&(e.node.style.zIndex=2)),e.node}function hr(e,t){var r=e.display.externalMeasured;return r&&r.line==t.line?(e.display.externalMeasured=null,t.measure=r.measure,r.built):Zt(e,t)}function fr(e,t){var r=t.text.className,n=hr(e,t);t.text==t.node&&(t.node=n.pre),t.text.parentNode.replaceChild(n.pre,t.text),t.text=n.pre,n.bgClass!=t.bgClass||n.textClass!=t.textClass?(t.bgClass=n.bgClass,t.textClass=n.textClass,dr(e,t)):r&&(t.text.className=r)}function dr(e,t){!function(e,t){var r=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(r&&(r+=" CodeMirror-linebackground"),t.background)r?t.background.className=r:(t.background.parentNode.removeChild(t.background),t.background=null);else if(r){var n=cr(t);t.background=n.insertBefore(O("div",null,r),n.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?cr(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var r=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=r||""}function pr(e,t,r,n){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=cr(t);t.gutterBackground=O("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px; width: "+n.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var l=cr(t),s=t.gutter=O("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?n.fixedPos:-n.gutterTotalWidth)+"px");if(e.display.input.setUneditable(s),l.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(O("div",ge(e.options,r),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+n.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var a=0;a<e.options.gutters.length;++a){var u=e.options.gutters[a],c=o.hasOwnProperty(u)&&o[u];c&&s.appendChild(O("div",[c],"CodeMirror-gutter-elt","left: "+n.gutterLeft[u]+"px; width: "+n.gutterWidth[u]+"px"))}}}function gr(e,t,r){t.alignable&&(t.alignable=null);for(var n=t.node.firstChild,i=void 0;n;n=i)i=n.nextSibling,"CodeMirror-linewidget"==n.className&&t.node.removeChild(n);mr(e,t,r)}function vr(e,t,r,n){var i=hr(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),dr(e,t),pr(e,t,r,n),mr(e,t,n),t.node}function mr(e,t,r){if(yr(e,t.line,t,r,!0),t.rest)for(var n=0;n<t.rest.length;n++)yr(e,t.rest[n],t,r,!1)}function yr(e,t,r,n,i){if(t.widgets)for(var o=cr(r),l=0,s=t.widgets;l<s.length;++l){var a=s[l],u=O("div",[a.node],"CodeMirror-linewidget");a.handleMouseEvents||u.setAttribute("cm-ignore-events","true"),br(a,u,r,n),e.display.input.setUneditable(u),i&&a.above?o.insertBefore(u,r.gutter||r.text):o.appendChild(u),sr(a,"redraw")}}function br(e,t,r,n){if(e.noHScroll){(r.alignable||(r.alignable=[])).push(t);var i=n.wrapperWidth;t.style.left=n.fixedPos+"px",e.coverGutter||(i-=n.gutterTotalWidth,t.style.paddingLeft=n.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-n.gutterTotalWidth+"px"))}function wr(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!W(document.body,e.node)){var r="position: relative;";e.coverGutter&&(r+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(r+="width: "+t.display.wrapper.clientWidth+"px;"),N(t.display.measure,O("div",[e.node],null,r))}return e.height=e.node.parentNode.offsetHeight}function xr(e,t){for(var r=ft(t);r!=e.wrapper;r=r.parentNode)if(!r||1==r.nodeType&&"true"==r.getAttribute("cm-ignore-events")||r.parentNode==e.sizer&&r!=e.mover)return!0}function Cr(e){return e.lineSpace.offsetTop}function Sr(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Lr(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=N(e.measure,O("pre","x")),r=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,n={left:parseInt(r.paddingLeft),right:parseInt(r.paddingRight)};return isNaN(n.left)||isNaN(n.right)||(e.cachedPaddingH=n),n}function kr(e){return G-e.display.nativeBarWidth}function Tr(e){return e.display.scroller.clientWidth-kr(e)-e.display.barWidth}function Mr(e){return e.display.scroller.clientHeight-kr(e)-e.display.barHeight}function Nr(e,t,r){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var n=0;n<e.rest.length;n++)if(e.rest[n]==t)return{map:e.measure.maps[n],cache:e.measure.caches[n]};for(var i=0;i<e.rest.length;i++)if(fe(e.rest[i])>r)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function Or(e,t,r,n){return Dr(e,Wr(e,t),r,n)}function Ar(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[an(e,t)];var r=e.display.externalMeasured;return r&&t>=r.lineN&&t<r.lineN+r.size?r:void 0}function Wr(e,t){var r=fe(t),n=Ar(e,r);n&&!n.text?n=null:n&&n.changes&&(ur(e,n,r,rn(e)),e.curOp.forceUpdate=!0),n||(n=function(e,t){var r=fe(t=Ge(t)),n=e.display.externalMeasured=new nr(e.doc,t,r);n.lineN=r;var i=n.built=Zt(e,n);return n.text=i.pre,N(e.display.lineMeasure,i.pre),n}(e,t));var i=Nr(n,t,r);return{line:t,view:n,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Dr(e,t,r,n,i){t.before&&(r=-1);var o,a=r+(n||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(!function(e,t,r){var n=e.options.lineWrapping,i=n&&Tr(e);if(!t.measure.heights||n&&t.measure.width!=i){var o=t.measure.heights=[];if(n){t.measure.width=i;for(var l=t.text.firstChild.getClientRects(),s=0;s<l.length-1;s++){var a=l[s],u=l[s+1];Math.abs(a.bottom-u.bottom)>2&&o.push((a.bottom+u.top)/2-r.top)}}o.push(r.bottom-r.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,r,n){var i,o=Pr(t.map,r,n),a=o.node,u=o.start,c=o.end,h=o.collapse;if(3==a.nodeType){for(var f=0;f<4;f++){for(;u&&ie(t.line.text.charAt(o.coverStart+u));)--u;for(;o.coverStart+c<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+c));)++c;if((i=l&&s<9&&0==u&&c==o.coverEnd-o.coverStart?a.parentNode.getBoundingClientRect():Er(k(a,u,c).getClientRects(),n)).left||i.right||0==u)break;c=u,u-=1,h="right"}l&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=St)return St;var t=N(e,O("span","x")),r=t.getBoundingClientRect(),n=k(t,0,1).getBoundingClientRect();return St=Math.abs(r.left-n.left)>1}(e))return t;var r=screen.logicalXDPI/screen.deviceXDPI,n=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*r,right:t.right*r,top:t.top*n,bottom:t.bottom*n}}(e.display.measure,i))}else{var d;u>0&&(h=n="right"),i=e.options.lineWrapping&&(d=a.getClientRects()).length>1?d["right"==n?d.length-1:0]:a.getBoundingClientRect()}if(l&&s<9&&!u&&(!i||!i.left&&!i.right)){var p=a.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+tn(e.display),top:p.top,bottom:p.bottom}:Fr}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(m<y[b]);b++);var w=b?y[b-1]:0,x=y[b],C={left:("right"==h?i.right:i.left)-t.rect.left,right:("left"==h?i.left:i.right)-t.rect.left,top:w,bottom:x};i.left||i.right||(C.bogus=!0);e.options.singleCursorHeightPerLine||(C.rtop=g,C.rbottom=v);return C}(e,t,r,n)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Hr,Fr={left:0,right:0,top:0,bottom:0};function Pr(e,t,r){for(var n,i,o,l,s,a,u=0;u<e.length;u+=3)if(s=e[u],a=e[u+1],t<s?(i=0,o=1,l="left"):t<a?o=(i=t-s)+1:(u==e.length-3||t==a&&e[u+3]>t)&&(i=(o=a-s)-1,t>=a&&(l="right")),null!=i){if(n=e[u+2],s==a&&r==(n.insertLeft?"left":"right")&&(l=r),"left"==r&&0==i)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)n=e[2+(u-=3)],l="left";if("right"==r&&i==a-s)for(;u<e.length-3&&e[u+3]==e[u+4]&&!e[u+5].insertLeft;)n=e[(u+=3)+2],l="right";break}return{node:n,start:i,end:o,collapse:l,coverStart:s,coverEnd:a}}function Er(e,t){var r=Fr;if("left"==t)for(var n=0;n<e.length&&(r=e[n]).left==r.right;n++);else for(var i=e.length-1;i>=0&&(r=e[i]).left==r.right;i--);return r}function zr(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Ir(e){e.display.externalMeasure=null,M(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)zr(e.display.view[t])}function Rr(e){Ir(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Br(){return c&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Gr(){return c&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ur(e){var t=0;if(e.widgets)for(var r=0;r<e.widgets.length;++r)e.widgets[r].above&&(t+=wr(e.widgets[r]));return t}function Vr(e,t,r,n,i){if(!i){var o=Ur(t);r.top+=o,r.bottom+=o}if("line"==n)return r;n||(n="local");var l=Xe(t);if("local"==n?l+=Cr(e.display):l-=e.display.viewOffset,"page"==n||"window"==n){var s=e.display.lineSpace.getBoundingClientRect();l+=s.top+("window"==n?0:Gr());var a=s.left+("window"==n?0:Br());r.left+=a,r.right+=a}return r.top+=l,r.bottom+=l,r}function Kr(e,t,r){if("div"==r)return t;var n=t.left,i=t.top;if("page"==r)n-=Br(),i-=Gr();else if("local"==r||!r){var o=e.display.sizer.getBoundingClientRect();n+=o.left,i+=o.top}var l=e.display.lineSpace.getBoundingClientRect();return{left:n-l.left,top:i-l.top}}function jr(e,t,r,n,i){return n||(n=ae(e.doc,t.line)),Vr(e,n,Or(e,n,t.ch,i),r)}function Xr(e,t,r,n,i,o){function l(t,l){var s=Dr(e,i,t,l?"right":"left",o);return l?s.left=s.right:s.right=s.left,Vr(e,n,s,r)}n=n||ae(e.doc,t.line),i||(i=Wr(e,n));var s=Qe(n,e.doc.direction),a=t.ch,u=t.sticky;if(a>=n.text.length?(a=n.text.length,u="before"):a<=0&&(a=0,u="after"),!s)return l("before"==u?a-1:a,"before"==u);function c(e,t,r){return l(r?e-1:e,1==s[t].level!=r)}var h=$e(s,a,u),f=qe,d=c(a,h,"before"==u);return null!=f&&(d.other=c(a,f,"before"!=u)),d}function Yr(e,t){var r=0;t=Se(e.doc,t),e.options.lineWrapping||(r=tn(e.display)*t.ch);var n=ae(e.doc,t.line),i=Xe(n)+Cr(e.display);return{left:r,right:r,top:i,bottom:i+n.height}}function _r(e,t,r,n,i){var o=ve(e,t,r);return o.xRel=i,n&&(o.outside=!0),o}function qr(e,t,r){var n=e.doc;if((r+=e.display.viewOffset)<0)return _r(n.first,0,null,!0,-1);var i=de(n,r),o=n.first+n.size-1;if(i>o)return _r(n.first+n.size-1,ae(n,o).text.length,null,!0,1);t<0&&(t=0);for(var l=ae(n,i);;){var s=Jr(e,l,i,t,r),a=Re(l),u=a&&a.find(0,!0);if(!a||!(s.ch>u.from.ch||s.ch==u.from.ch&&s.xRel>0))return s;i=fe(l=u.to.line)}}function $r(e,t,r,n){n-=Ur(t);var i=t.text.length,o=le(function(t){return Dr(e,r,t-1).bottom<=n},i,0);return{begin:o,end:i=le(function(t){return Dr(e,r,t).top>n},o,i)}}function Zr(e,t,r,n){return r||(r=Wr(e,t)),$r(e,t,r,Vr(e,t,Dr(e,r,n),"line").top)}function Qr(e,t,r,n){return!(e.bottom<=r)&&(e.top>r||(n?e.left:e.right)>t)}function Jr(e,t,r,n,i){i-=Xe(t);var o=Wr(e,t),l=Ur(t),s=0,a=t.text.length,u=!0,c=Qe(t,e.doc.direction);if(c){var h=(e.options.lineWrapping?function(e,t,r,n,i,o,l){var s=$r(e,t,n,l),a=s.begin,u=s.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var c=null,h=null,f=0;f<i.length;f++){var d=i[f];if(!(d.from>=u||d.to<=a)){var p=1!=d.level,g=Dr(e,n,p?Math.min(u,d.to)-1:Math.max(a,d.from)).right,v=g<o?o-g+1e9:g-o;(!c||h>v)&&(c=d,h=v)}}c||(c=i[i.length-1]);c.from<a&&(c={from:a,to:c.to,level:c.level});c.to>u&&(c={from:c.from,to:u,level:c.level});return c}:function(e,t,r,n,i,o,l){var s=le(function(s){var a=i[s],u=1!=a.level;return Qr(Xr(e,ve(r,u?a.to:a.from,u?"before":"after"),"line",t,n),o,l,!0)},0,i.length-1),a=i[s];if(s>0){var u=1!=a.level,c=Xr(e,ve(r,u?a.from:a.to,u?"after":"before"),"line",t,n);Qr(c,o,l,!0)&&c.top>l&&(a=i[s-1])}return a})(e,t,r,o,c,n,i);s=(u=1!=h.level)?h.from:h.to-1,a=u?h.to:h.from-1}var f,d,p=null,g=null,v=le(function(t){var r=Dr(e,o,t);return r.top+=l,r.bottom+=l,!!Qr(r,n,i,!1)&&(r.top<=i&&r.left<=n&&(p=t,g=r),!0)},s,a),m=!1;if(g){var y=n-g.left<g.right-n,b=y==u;v=p+(b?0:1),d=b?"after":"before",f=y?g.left:g.right}else{u||v!=a&&v!=s||v++,d=0==v?"after":v==t.text.length?"before":Dr(e,o,v-(u?1:0)).bottom+l<=i==u?"after":"before";var w=Xr(e,ve(r,v,d),"line",t,o);f=w.left,m=i<w.top||i>=w.bottom}return _r(r,v=oe(t.text,v,1),d,m,n-f)}function en(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hr){Hr=O("pre");for(var t=0;t<49;++t)Hr.appendChild(document.createTextNode("x")),Hr.appendChild(O("br"));Hr.appendChild(document.createTextNode("x"))}N(e.measure,Hr);var r=Hr.offsetHeight/50;return r>3&&(e.cachedTextHeight=r),M(e.measure),r||1}function tn(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=O("span","xxxxxxxxxx"),r=O("pre",[t]);N(e.measure,r);var n=t.getBoundingClientRect(),i=(n.right-n.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function rn(e){for(var t=e.display,r={},n={},i=t.gutters.clientLeft,o=t.gutters.firstChild,l=0;o;o=o.nextSibling,++l)r[e.options.gutters[l]]=o.offsetLeft+o.clientLeft+i,n[e.options.gutters[l]]=o.clientWidth;return{fixedPos:nn(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:r,gutterWidth:n,wrapperWidth:t.wrapper.clientWidth}}function nn(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function on(e){var t=en(e.display),r=e.options.lineWrapping,n=r&&Math.max(5,e.display.scroller.clientWidth/tn(e.display)-3);return function(i){if(Ke(e.doc,i))return 0;var o=0;if(i.widgets)for(var l=0;l<i.widgets.length;l++)i.widgets[l].height&&(o+=i.widgets[l].height);return r?o+(Math.ceil(i.text.length/n)||1)*t:o+t}}function ln(e){var t=e.doc,r=on(e);t.iter(function(e){var t=r(e);t!=e.height&&he(e,t)})}function sn(e,t,r,n){var i=e.display;if(!r&&"true"==ft(t).getAttribute("cm-not-content"))return null;var o,l,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,l=t.clientY-s.top}catch(t){return null}var a,u=qr(e,o,l);if(n&&1==u.xRel&&(a=ae(e.doc,u.line).text).length==u.ch){var c=I(a,a.length,e.options.tabSize)-a.length;u=ve(u.line,Math.max(0,Math.round((o-Lr(e.display).left)/tn(e.display))-c))}return u}function an(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var r=e.display.view,n=0;n<r.length;n++)if((t-=r[n].size)<0)return n}function un(e){e.display.input.showSelection(e.display.input.prepareSelection())}function cn(e,t){void 0===t&&(t=!0);for(var r=e.doc,n={},i=n.cursors=document.createDocumentFragment(),o=n.selection=document.createDocumentFragment(),l=0;l<r.sel.ranges.length;l++)if(t||l!=r.sel.primIndex){var s=r.sel.ranges[l];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var a=s.empty();(a||e.options.showCursorWhenSelecting)&&hn(e,s.head,i),a||dn(e,s,o)}}return n}function hn(e,t,r){var n=Xr(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=r.appendChild(O("div"," ","CodeMirror-cursor"));if(i.style.left=n.left+"px",i.style.top=n.top+"px",i.style.height=Math.max(0,n.bottom-n.top)*e.options.cursorHeight+"px",n.other){var o=r.appendChild(O("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=n.other.left+"px",o.style.top=n.other.top+"px",o.style.height=.85*(n.other.bottom-n.other.top)+"px"}}function fn(e,t){return e.top-t.top||e.left-t.left}function dn(e,t,r){var n=e.display,i=e.doc,o=document.createDocumentFragment(),l=Lr(e.display),s=l.left,a=Math.max(n.sizerWidth,Tr(e)-n.sizer.offsetLeft)-l.right,u="ltr"==i.direction;function c(e,t,r,n){t<0&&(t=0),t=Math.round(t),n=Math.round(n),o.appendChild(O("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==r?a-e:r)+"px;\n height: "+(n-t)+"px"))}function h(t,r,n){var o,l,h=ae(i,t),f=h.text.length;function d(r,n){return jr(e,ve(t,r),"div",h,n)}function p(t,r,n){var i=Zr(e,h,null,t),o="ltr"==r==("after"==n)?"left":"right";return d("after"==n?i.begin:i.end-(/\s/.test(h.text.charAt(i.end-1))?2:1),o)[o]}var g=Qe(h,i.direction);return function(e,t,r,n){if(!e)return n(t,r,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var l=e[o];(l.from<r&&l.to>t||t==r&&l.to==t)&&(n(Math.max(l.from,t),Math.min(l.to,r),1==l.level?"rtl":"ltr",o),i=!0)}i||n(t,r,"ltr")}(g,r||0,null==n?f:n,function(e,t,i,h){var v="ltr"==i,m=d(e,v?"left":"right"),y=d(t-1,v?"right":"left"),b=null==r&&0==e,w=null==n&&t==f,x=0==h,C=!g||h==g.length-1;if(y.top-m.top<=3){var S=(u?w:b)&&C,L=(u?b:w)&&x?s:(v?m:y).left,k=S?a:(v?y:m).right;c(L,m.top,k-L,m.bottom)}else{var T,M,N,O;v?(T=u&&b&&x?s:m.left,M=u?a:p(e,i,"before"),N=u?s:p(t,i,"after"),O=u&&w&&C?a:y.right):(T=u?p(e,i,"before"):s,M=!u&&b&&x?a:m.right,N=!u&&w&&C?s:y.left,O=u?p(t,i,"after"):a),c(T,m.top,M-T,m.bottom),m.bottom<y.top&&c(s,m.bottom,null,y.top),c(N,y.top,O-N,y.bottom)}(!o||fn(m,o)<0)&&(o=m),fn(y,o)<0&&(o=y),(!l||fn(m,l)<0)&&(l=m),fn(y,l)<0&&(l=y)}),{start:o,end:l}}var f=t.from(),d=t.to();if(f.line==d.line)h(f.line,f.ch,d.ch);else{var p=ae(i,f.line),g=ae(i,d.line),v=Ge(p)==Ge(g),m=h(f.line,f.ch,v?p.text.length+1:null).end,y=h(d.line,v?0:null,d.ch).start;v&&(m.top<y.top-2?(c(m.right,m.top,null,m.bottom),c(s,y.top,y.left,y.bottom)):c(m.right,m.top,y.left-m.right,m.bottom)),m.bottom<y.top&&c(s,m.bottom,null,y.top)}r.appendChild(o)}function pn(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var r=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval(function(){return t.cursorDiv.style.visibility=(r=!r)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function gn(e){e.state.focused||(e.display.input.focus(),mn(e))}function vn(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,yn(e))},100)}function mn(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(nt(e,"focus",e,t),e.state.focused=!0,H(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),a&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),pn(e))}function yn(e,t){e.state.delayingBlurEvent||(e.state.focused&&(nt(e,"blur",e,t),e.state.focused=!1,T(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function bn(e){for(var t=e.display,r=t.lineDiv.offsetTop,n=0;n<t.view.length;n++){var i=t.view[n],o=void 0;if(!i.hidden){if(l&&s<8){var a=i.node.offsetTop+i.node.offsetHeight;o=a-r,r=a}else{var u=i.node.getBoundingClientRect();o=u.bottom-u.top}var c=i.line.height-o;if(o<2&&(o=en(t)),(c>.005||c<-.005)&&(he(i.line,o),wn(i.line),i.rest))for(var h=0;h<i.rest.length;h++)wn(i.rest[h])}}}function wn(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var r=e.widgets[t],n=r.node.parentNode;n&&(r.height=n.offsetHeight)}}function xn(e,t,r){var n=r&&null!=r.top?Math.max(0,r.top):e.scroller.scrollTop;n=Math.floor(n-Cr(e));var i=r&&null!=r.bottom?r.bottom:n+e.wrapper.clientHeight,o=de(t,n),l=de(t,i);if(r&&r.ensure){var s=r.ensure.from.line,a=r.ensure.to.line;s<o?(o=s,l=de(t,Xe(ae(t,s))+e.wrapper.clientHeight)):Math.min(a,t.lastLine())>=l&&(o=de(t,Xe(ae(t,a))-e.wrapper.clientHeight),l=a)}return{from:o,to:Math.max(l,o+1)}}function Cn(e){var t=e.display,r=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var n=nn(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=n+"px",l=0;l<r.length;l++)if(!r[l].hidden){e.options.fixedGutter&&(r[l].gutter&&(r[l].gutter.style.left=o),r[l].gutterBackground&&(r[l].gutterBackground.style.left=o));var s=r[l].alignable;if(s)for(var a=0;a<s.length;a++)s[a].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=n+i+"px")}}function Sn(e){if(!e.options.lineNumbers)return!1;var t=e.doc,r=ge(e.options,t.first+t.size-1),n=e.display;if(r.length!=n.lineNumChars){var i=n.measure.appendChild(O("div",[O("div",r)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,l=i.offsetWidth-o;return n.lineGutter.style.width="",n.lineNumInnerWidth=Math.max(o,n.lineGutter.offsetWidth-l)+1,n.lineNumWidth=n.lineNumInnerWidth+l,n.lineNumChars=n.lineNumInnerWidth?r.length:-1,n.lineGutter.style.width=n.lineNumWidth+"px",ai(e),!0}return!1}function Ln(e,t){var r=e.display,n=en(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:r.scroller.scrollTop,o=Mr(e),l={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Sr(r),a=t.top<n,u=t.bottom>s-n;if(t.top<i)l.scrollTop=a?0:t.top;else if(t.bottom>i+o){var c=Math.min(t.top,(u?s:t.bottom)-o);c!=i&&(l.scrollTop=c)}var h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:r.scroller.scrollLeft,f=Tr(e)-(e.options.fixedGutter?r.gutters.offsetWidth:0),d=t.right-t.left>f;return d&&(t.right=t.left+f),t.left<10?l.scrollLeft=0:t.left<h?l.scrollLeft=Math.max(0,t.left-(d?0:10)):t.right>f+h-3&&(l.scrollLeft=t.right+(d?0:10)-f),l}function kn(e,t){null!=t&&(Nn(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Tn(e){Nn(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Mn(e,t,r){null==t&&null==r||Nn(e),null!=t&&(e.curOp.scrollLeft=t),null!=r&&(e.curOp.scrollTop=r)}function Nn(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,On(e,Yr(e,t.from),Yr(e,t.to),t.margin))}function On(e,t,r,n){var i=Ln(e,{left:Math.min(t.left,r.left),top:Math.min(t.top,r.top)-n,right:Math.max(t.right,r.right),bottom:Math.max(t.bottom,r.bottom)+n});Mn(e,i.scrollLeft,i.scrollTop)}function An(e,t){Math.abs(e.doc.scrollTop-t)<2||(r||si(e,{top:t}),Wn(e,t,!0),r&&si(e),ri(e,100))}function Wn(e,t,r){t=Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t),(e.display.scroller.scrollTop!=t||r)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Dn(e,t,r,n){t=Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth),(r?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!n||(e.doc.scrollLeft=t,Cn(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Hn(e){var t=e.display,r=t.gutters.offsetWidth,n=Math.round(e.doc.height+Sr(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?r:0,docHeight:n,scrollHeight:n+kr(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:r}}var Fn=function(e,t,r){this.cm=r;var n=this.vert=O("div",[O("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=O("div",[O("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");e(n),e(i),et(n,"scroll",function(){n.clientHeight&&t(n.scrollTop,"vertical")}),et(i,"scroll",function(){i.clientWidth&&t(i.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,l&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Fn.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,r=e.scrollHeight>e.clientHeight+1,n=e.nativeBarWidth;if(r){this.vert.style.display="block",this.vert.style.bottom=t?n+"px":"0";var i=e.viewHeight-(t?n:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=r?n+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(r?n:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==n&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:r?n:0,bottom:t?n:0}},Fn.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Fn.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Fn.prototype.zeroWidthHack=function(){var e=y&&!d?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new R,this.disableVert=new R},Fn.prototype.enableZeroWidthBar=function(e,t,r){e.style.pointerEvents="auto",t.set(1e3,function n(){var i=e.getBoundingClientRect();("vert"==r?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,n)})},Fn.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Pn=function(){};function En(e,t){t||(t=Hn(e));var r=e.display.barWidth,n=e.display.barHeight;zn(e,t);for(var i=0;i<4&&r!=e.display.barWidth||n!=e.display.barHeight;i++)r!=e.display.barWidth&&e.options.lineWrapping&&bn(e),zn(e,Hn(e)),r=e.display.barWidth,n=e.display.barHeight}function zn(e,t){var r=e.display,n=r.scrollbars.update(t);r.sizer.style.paddingRight=(r.barWidth=n.right)+"px",r.sizer.style.paddingBottom=(r.barHeight=n.bottom)+"px",r.heightForcer.style.borderBottom=n.bottom+"px solid transparent",n.right&&n.bottom?(r.scrollbarFiller.style.display="block",r.scrollbarFiller.style.height=n.bottom+"px",r.scrollbarFiller.style.width=n.right+"px"):r.scrollbarFiller.style.display="",n.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(r.gutterFiller.style.display="block",r.gutterFiller.style.height=n.bottom+"px",r.gutterFiller.style.width=t.gutterWidth+"px"):r.gutterFiller.style.display=""}Pn.prototype.update=function(){return{bottom:0,right:0}},Pn.prototype.setScrollLeft=function(){},Pn.prototype.setScrollTop=function(){},Pn.prototype.clear=function(){};var In={native:Fn,null:Pn};function Rn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new In[e.options.scrollbarStyle](function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),et(t,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),t.setAttribute("cm-not-content","true")},function(t,r){"horizontal"==r?Dn(e,t):An(e,t)},e),e.display.scrollbars.addClass&&H(e.display.wrapper,e.display.scrollbars.addClass)}var Bn=0;function Gn(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Bn},t=e.curOp,or?or.ops.push(t):t.ownsGroup=or={ops:[t],delayedCallbacks:[]}}function Un(e){!function(e,t){var r=e.ownsGroup;if(r)try{!function(e){var t=e.delayedCallbacks,r=0;do{for(;r<t.length;r++)t[r].call(null);for(var n=0;n<e.ops.length;n++){var i=e.ops[n];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(r<t.length)}(r)}finally{or=null,t(r)}}(e.curOp,function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,r=0;r<t.length;r++)Vn(t[r]);for(var n=0;n<t.length;n++)(i=t[n]).updatedDisplay=i.mustUpdate&&oi(i.cm,i.update);var i;for(var o=0;o<t.length;o++)Kn(t[o]);for(var l=0;l<t.length;l++)jn(t[l]);for(var s=0;s<t.length;s++)Xn(t[s])}(e)})}function Vn(e){var t=e.cm,r=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=kr(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=kr(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&_e(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<r.viewFrom||e.scrollToPos.to.line>=r.viewTo)||r.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ii(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Kn(e){var t=e.cm,r=t.display;e.updatedDisplay&&bn(t),e.barMeasure=Hn(t),r.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Or(t,r.maxLine,r.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+e.adjustWidthTo+kr(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+e.adjustWidthTo-Tr(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=r.input.prepareSelection())}function jn(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Dn(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var r=e.focus&&e.focus==D();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,r),(e.updatedDisplay||e.startHeight!=t.doc.height)&&En(t,e.barMeasure),e.updatedDisplay&&ui(t,e.barMeasure),e.selectionChanged&&pn(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),r&&gn(e.cm)}function Xn(e){var t=e.cm,r=t.display,n=t.doc;(e.updatedDisplay&&li(t,e.update),null==r.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(r.wheelStartX=r.wheelStartY=null),null!=e.scrollTop&&Wn(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Dn(t,e.scrollLeft,!0,!0),e.scrollToPos)&&function(e,t){if(!it(e,"scrollCursorIntoView")){var r=e.display,n=r.sizer.getBoundingClientRect(),i=null;if(t.top+n.top<0?i=!0:t.bottom+n.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=O("div","​",null,"position: absolute;\n top: "+(t.top-r.viewOffset-Cr(e.display))+"px;\n height: "+(t.bottom-t.top+kr(e)+r.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,r,n){var i;null==n&&(n=0),e.options.lineWrapping||t!=r||(r="before"==(t=t.ch?ve(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ve(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var l=!1,s=Xr(e,t),a=r&&r!=t?Xr(e,r):s,u=Ln(e,i={left:Math.min(s.left,a.left),top:Math.min(s.top,a.top)-n,right:Math.max(s.left,a.left),bottom:Math.max(s.bottom,a.bottom)+n}),c=e.doc.scrollTop,h=e.doc.scrollLeft;if(null!=u.scrollTop&&(An(e,u.scrollTop),Math.abs(e.doc.scrollTop-c)>1&&(l=!0)),null!=u.scrollLeft&&(Dn(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-h)>1&&(l=!0)),!l)break}return i}(t,Se(n,e.scrollToPos.from),Se(n,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var l=0;l<i.length;++l)i[l].lines.length||nt(i[l],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&nt(o[s],"unhide");r.wrapper.offsetHeight&&(n.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&nt(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Yn(e,t){if(e.curOp)return t();Gn(e);try{return t()}finally{Un(e)}}function _n(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Gn(e);try{return t.apply(e,arguments)}finally{Un(e)}}}function qn(e){return function(){if(this.curOp)return e.apply(this,arguments);Gn(this);try{return e.apply(this,arguments)}finally{Un(this)}}}function $n(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Gn(t);try{return e.apply(this,arguments)}finally{Un(t)}}}function Zn(e,t,r,n){null==t&&(t=e.doc.first),null==r&&(r=e.doc.first+e.doc.size),n||(n=0);var i=e.display;if(n&&r<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)Te&&Ue(e.doc,t)<i.viewTo&&Jn(e);else if(r<=i.viewFrom)Te&&Ve(e.doc,r+n)>i.viewFrom?Jn(e):(i.viewFrom+=n,i.viewTo+=n);else if(t<=i.viewFrom&&r>=i.viewTo)Jn(e);else if(t<=i.viewFrom){var o=ei(e,r,r+n,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=n):Jn(e)}else if(r>=i.viewTo){var l=ei(e,t,t,-1);l?(i.view=i.view.slice(0,l.index),i.viewTo=l.lineN):Jn(e)}else{var s=ei(e,t,t,-1),a=ei(e,r,r+n,1);s&&a?(i.view=i.view.slice(0,s.index).concat(ir(e,s.lineN,a.lineN)).concat(i.view.slice(a.index)),i.viewTo+=n):Jn(e)}var u=i.externalMeasured;u&&(r<u.lineN?u.lineN+=n:t<u.lineN+u.size&&(i.externalMeasured=null))}function Qn(e,t,r){e.curOp.viewChanged=!0;var n=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(n.externalMeasured=null),!(t<n.viewFrom||t>=n.viewTo)){var o=n.view[an(e,t)];if(null!=o.node){var l=o.changes||(o.changes=[]);-1==B(l,r)&&l.push(r)}}}function Jn(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function ei(e,t,r,n){var i,o=an(e,t),l=e.display.view;if(!Te||r==e.doc.first+e.doc.size)return{index:o,lineN:r};for(var s=e.display.viewFrom,a=0;a<o;a++)s+=l[a].size;if(s!=t){if(n>0){if(o==l.length-1)return null;i=s+l[o].size-t,o++}else i=s-t;t+=i,r+=i}for(;Ue(e.doc,r)!=r;){if(o==(n<0?0:l.length-1))return null;r+=n*l[o-(n<0?1:0)].size,o+=n}return{index:o,lineN:r}}function ti(e){for(var t=e.display.view,r=0,n=0;n<t.length;n++){var i=t[n];i.hidden||i.node&&!i.changes||++r}return r}function ri(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,E(ni,e))}function ni(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var r=+new Date+e.options.workTime,n=It(e,t.highlightFrontier),i=[];t.iter(n.line,Math.min(t.first+t.size,e.display.viewTo+500),function(o){if(n.line>=e.display.viewFrom){var l=o.styles,s=o.text.length>e.options.maxHighlightLength?At(t.mode,n.state):null,a=Et(e,o,n,!0);s&&(n.state=s),o.styles=a.styles;var u=o.styleClasses,c=a.classes;c?o.styleClasses=c:u&&(o.styleClasses=null);for(var h=!l||l.length!=o.styles.length||u!=c&&(!u||!c||u.bgClass!=c.bgClass||u.textClass!=c.textClass),f=0;!h&&f<l.length;++f)h=l[f]!=o.styles[f];h&&i.push(n.line),o.stateAfter=n.save(),n.nextLine()}else o.text.length<=e.options.maxHighlightLength&&Rt(e,o.text,n),o.stateAfter=n.line%5==0?n.save():null,n.nextLine();if(+new Date>r)return ri(e,e.options.workDelay),!0}),t.highlightFrontier=n.line,t.modeFrontier=Math.max(t.modeFrontier,n.line),i.length&&Yn(e,function(){for(var t=0;t<i.length;t++)Qn(e,i[t],"text")})}}var ii=function(e,t,r){var n=e.display;this.viewport=t,this.visible=xn(n,e.doc,t),this.editorIsHidden=!n.wrapper.offsetWidth,this.wrapperHeight=n.wrapper.clientHeight,this.wrapperWidth=n.wrapper.clientWidth,this.oldDisplayWidth=Tr(e),this.force=r,this.dims=rn(e),this.events=[]};function oi(e,t){var r=e.display,n=e.doc;if(t.editorIsHidden)return Jn(e),!1;if(!t.force&&t.visible.from>=r.viewFrom&&t.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==ti(e))return!1;Sn(e)&&(Jn(e),t.dims=rn(e));var i=n.first+n.size,o=Math.max(t.visible.from-e.options.viewportMargin,n.first),l=Math.min(i,t.visible.to+e.options.viewportMargin);r.viewFrom<o&&o-r.viewFrom<20&&(o=Math.max(n.first,r.viewFrom)),r.viewTo>l&&r.viewTo-l<20&&(l=Math.min(i,r.viewTo)),Te&&(o=Ue(e.doc,o),l=Ve(e.doc,l));var s=o!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=t.wrapperHeight||r.lastWrapWidth!=t.wrapperWidth;!function(e,t,r){var n=e.display;0==n.view.length||t>=n.viewTo||r<=n.viewFrom?(n.view=ir(e,t,r),n.viewFrom=t):(n.viewFrom>t?n.view=ir(e,t,n.viewFrom).concat(n.view):n.viewFrom<t&&(n.view=n.view.slice(an(e,t))),n.viewFrom=t,n.viewTo<r?n.view=n.view.concat(ir(e,n.viewTo,r)):n.viewTo>r&&(n.view=n.view.slice(0,an(e,r)))),n.viewTo=r}(e,o,l),r.viewOffset=Xe(ae(e.doc,r.viewFrom)),e.display.mover.style.top=r.viewOffset+"px";var u=ti(e);if(!s&&0==u&&!t.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var c=function(e){if(e.hasFocus())return null;var t=D();if(!t||!W(e.display.lineDiv,t))return null;var r={activeElt:t};if(window.getSelection){var n=window.getSelection();n.anchorNode&&n.extend&&W(e.display.lineDiv,n.anchorNode)&&(r.anchorNode=n.anchorNode,r.anchorOffset=n.anchorOffset,r.focusNode=n.focusNode,r.focusOffset=n.focusOffset)}return r}(e);return u>4&&(r.lineDiv.style.display="none"),function(e,t,r){var n=e.display,i=e.options.lineNumbers,o=n.lineDiv,l=o.firstChild;function s(t){var r=t.nextSibling;return a&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),r}for(var u=n.view,c=n.viewFrom,h=0;h<u.length;h++){var f=u[h];if(f.hidden);else if(f.node&&f.node.parentNode==o){for(;l!=f.node;)l=s(l);var d=i&&null!=t&&t<=c&&f.lineNumber;f.changes&&(B(f.changes,"gutter")>-1&&(d=!1),ur(e,f,c,r)),d&&(M(f.lineNumber),f.lineNumber.appendChild(document.createTextNode(ge(e.options,c)))),l=f.node.nextSibling}else{var p=vr(e,f,c,r);o.insertBefore(p,l)}c+=f.size}for(;l;)l=s(l)}(e,r.updateLineNumbers,t.dims),u>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,function(e){if(e&&e.activeElt&&e.activeElt!=D()&&(e.activeElt.focus(),e.anchorNode&&W(document.body,e.anchorNode)&&W(document.body,e.focusNode))){var t=window.getSelection(),r=document.createRange();r.setEnd(e.anchorNode,e.anchorOffset),r.collapse(!1),t.removeAllRanges(),t.addRange(r),t.extend(e.focusNode,e.focusOffset)}}(c),M(r.cursorDiv),M(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=t.wrapperHeight,r.lastWrapWidth=t.wrapperWidth,ri(e,400)),r.updateLineNumbers=null,!0}function li(e,t){for(var r=t.viewport,n=!0;(n&&e.options.lineWrapping&&t.oldDisplayWidth!=Tr(e)||(r&&null!=r.top&&(r={top:Math.min(e.doc.height+Sr(e.display)-Mr(e),r.top)}),t.visible=xn(e.display,e.doc,r),!(t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)))&&oi(e,t);n=!1){bn(e);var i=Hn(e);un(e),En(e,i),ui(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function si(e,t){var r=new ii(e,t);if(oi(e,r)){bn(e),li(e,r);var n=Hn(e);un(e),En(e,n),ui(e,n),r.finish()}}function ai(e){var t=e.display.gutters.offsetWidth;e.display.sizer.style.marginLeft=t+"px"}function ui(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+kr(e)+"px"}function ci(e){var t=e.display.gutters,r=e.options.gutters;M(t);for(var n=0;n<r.length;++n){var i=r[n],o=t.appendChild(O("div",null,"CodeMirror-gutter "+i));"CodeMirror-linenumbers"==i&&(e.display.lineGutter=o,o.style.width=(e.display.lineNumWidth||1)+"px")}t.style.display=n?"":"none",ai(e)}function hi(e){var t=B(e.gutters,"CodeMirror-linenumbers");-1==t&&e.lineNumbers?e.gutters=e.gutters.concat(["CodeMirror-linenumbers"]):t>-1&&!e.lineNumbers&&(e.gutters=e.gutters.slice(0),e.gutters.splice(t,1))}ii.prototype.signal=function(e,t){lt(e,t)&&this.events.push(arguments)},ii.prototype.finish=function(){for(var e=0;e<this.events.length;e++)nt.apply(null,this.events[e])};var fi=0,di=null;function pi(e){var t=e.wheelDeltaX,r=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==r&&e.detail&&e.axis==e.VERTICAL_AXIS?r=e.detail:null==r&&(r=e.wheelDelta),{x:t,y:r}}function gi(e){var t=pi(e);return t.x*=di,t.y*=di,t}function vi(e,t){var n=pi(t),i=n.x,o=n.y,l=e.display,s=l.scroller,u=s.scrollWidth>s.clientWidth,c=s.scrollHeight>s.clientHeight;if(i&&u||o&&c){if(o&&y&&a)e:for(var f=t.target,d=l.view;f!=s;f=f.parentNode)for(var p=0;p<d.length;p++)if(d[p].node==f){e.display.currentWheelTarget=f;break e}if(i&&!r&&!h&&null!=di)return o&&c&&An(e,Math.max(0,s.scrollTop+o*di)),Dn(e,Math.max(0,s.scrollLeft+i*di)),(!o||o&&c)&&at(t),void(l.wheelStartX=null);if(o&&null!=di){var g=o*di,v=e.doc.scrollTop,m=v+l.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):m=Math.min(e.doc.height,m+g+50),si(e,{top:v,bottom:m})}fi<20&&(null==l.wheelStartX?(l.wheelStartX=s.scrollLeft,l.wheelStartY=s.scrollTop,l.wheelDX=i,l.wheelDY=o,setTimeout(function(){if(null!=l.wheelStartX){var e=s.scrollLeft-l.wheelStartX,t=s.scrollTop-l.wheelStartY,r=t&&l.wheelDY&&t/l.wheelDY||e&&l.wheelDX&&e/l.wheelDX;l.wheelStartX=l.wheelStartY=null,r&&(di=(di*fi+r)/(fi+1),++fi)}},200)):(l.wheelDX+=i,l.wheelDY+=o))}}l?di=-.53:r?di=15:c?di=-.7:f&&(di=-1/3);var mi=function(e,t){this.ranges=e,this.primIndex=t};mi.prototype.primary=function(){return this.ranges[this.primIndex]},mi.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var r=this.ranges[t],n=e.ranges[t];if(!ye(r.anchor,n.anchor)||!ye(r.head,n.head))return!1}return!0},mi.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new yi(be(this.ranges[t].anchor),be(this.ranges[t].head));return new mi(e,this.primIndex)},mi.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},mi.prototype.contains=function(e,t){t||(t=e);for(var r=0;r<this.ranges.length;r++){var n=this.ranges[r];if(me(t,n.from())>=0&&me(e,n.to())<=0)return r}return-1};var yi=function(e,t){this.anchor=e,this.head=t};function bi(e,t){var r=e[t];e.sort(function(e,t){return me(e.from(),t.from())}),t=B(e,r);for(var n=1;n<e.length;n++){var i=e[n],o=e[n-1];if(me(o.to(),i.from())>=0){var l=xe(o.from(),i.from()),s=we(o.to(),i.to()),a=o.empty()?i.from()==i.head:o.from()==o.head;n<=t&&--t,e.splice(--n,2,new yi(a?s:l,a?l:s))}}return new mi(e,t)}function wi(e,t){return new mi([new yi(e,t||e)],0)}function xi(e){return e.text?ve(e.from.line+e.text.length-1,q(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Ci(e,t){if(me(e,t.from)<0)return e;if(me(e,t.to)<=0)return xi(t);var r=e.line+t.text.length-(t.to.line-t.from.line)-1,n=e.ch;return e.line==t.to.line&&(n+=xi(t).ch-t.to.ch),ve(r,n)}function Si(e,t){for(var r=[],n=0;n<e.sel.ranges.length;n++){var i=e.sel.ranges[n];r.push(new yi(Ci(i.anchor,t),Ci(i.head,t)))}return bi(r,e.sel.primIndex)}function Li(e,t,r){return e.line==t.line?ve(r.line,e.ch-t.ch+r.ch):ve(r.line+(e.line-t.line),e.ch)}function ki(e){e.doc.mode=Mt(e.options,e.doc.modeOption),Ti(e)}function Ti(e){e.doc.iter(function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ri(e,100),e.state.modeGen++,e.curOp&&Zn(e)}function Mi(e,t){return 0==t.from.ch&&0==t.to.ch&&""==q(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ni(e,t,r,n){function i(e){return r?r[e]:null}function o(e,r,i){!function(e,t,r,n){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),De(e),He(e,r);var i=n?n(e):1;i!=e.height&&he(e,i)}(e,r,i,n),sr(e,"change",e,t)}function l(e,t){for(var r=[],o=e;o<t;++o)r.push(new Xt(u[o],i(o),n));return r}var s=t.from,a=t.to,u=t.text,c=ae(e,s.line),h=ae(e,a.line),f=q(u),d=i(u.length-1),p=a.line-s.line;if(t.full)e.insert(0,l(0,u.length)),e.remove(u.length,e.size-u.length);else if(Mi(e,t)){var g=l(0,u.length-1);o(h,h.text,d),p&&e.remove(s.line,p),g.length&&e.insert(s.line,g)}else if(c==h)if(1==u.length)o(c,c.text.slice(0,s.ch)+f+c.text.slice(a.ch),d);else{var v=l(1,u.length-1);v.push(new Xt(f+c.text.slice(a.ch),d,n)),o(c,c.text.slice(0,s.ch)+u[0],i(0)),e.insert(s.line+1,v)}else if(1==u.length)o(c,c.text.slice(0,s.ch)+u[0]+h.text.slice(a.ch),i(0)),e.remove(s.line+1,p);else{o(c,c.text.slice(0,s.ch)+u[0],i(0)),o(h,f+h.text.slice(a.ch),d);var m=l(1,u.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,m)}sr(e,"change",e,t)}function Oi(e,t,r){!function e(n,i,o){if(n.linked)for(var l=0;l<n.linked.length;++l){var s=n.linked[l];if(s.doc!=i){var a=o&&s.sharedHist;r&&!a||(t(s.doc,a),e(s.doc,n,a))}}}(e,null,!0)}function Ai(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,ln(e),ki(e),Wi(e),e.options.lineWrapping||_e(e),e.options.mode=t.modeOption,Zn(e)}function Wi(e){("rtl"==e.doc.direction?H:T)(e.display.lineDiv,"CodeMirror-rtl")}function Di(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function Hi(e,t){var r={from:be(t.from),to:xi(t),text:ue(e,t.from,t.to)};return Ii(e,r,t.from.line,t.to.line+1),Oi(e,function(e){return Ii(e,r,t.from.line,t.to.line+1)},!0),r}function Fi(e){for(;e.length;){if(!q(e).ranges)break;e.pop()}}function Pi(e,t,r,n){var i=e.history;i.undone.length=0;var o,l,s=+new Date;if((i.lastOp==n||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&e.cm&&i.lastModTime>s-e.cm.options.historyEventDelay||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Fi(e.done),q(e.done)):e.done.length&&!q(e.done).ranges?q(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),q(e.done)):void 0}(i,i.lastOp==n)))l=q(o.changes),0==me(t.from,t.to)&&0==me(t.from,l.to)?l.to=xi(t):o.changes.push(Hi(e,t));else{var a=q(i.done);for(a&&a.ranges||zi(e.sel,i.done),o={changes:[Hi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(r),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=n,i.lastOrigin=i.lastSelOrigin=t.origin,l||nt(e,"historyAdded")}function Ei(e,t,r,n){var i=e.history,o=n&&n.origin;r==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,r,n){var i=t.charAt(0);return"*"==i||"+"==i&&r.ranges.length==n.ranges.length&&r.somethingSelected()==n.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,q(i.done),t))?i.done[i.done.length-1]=t:zi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=r,n&&!1!==n.clearRedo&&Fi(i.undone)}function zi(e,t){var r=q(t);r&&r.ranges&&r.equals(e)||t.push(e)}function Ii(e,t,r,n){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,r),Math.min(e.first+e.size,n),function(r){r.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=r.markedSpans),++o})}function Ri(e){if(!e)return null;for(var t,r=0;r<e.length;++r)e[r].marker.explicitlyCleared?t||(t=e.slice(0,r)):t&&t.push(e[r]);return t?t.length?t:null:e}function Bi(e,t){var r=function(e,t){var r=t["spans_"+e.id];if(!r)return null;for(var n=[],i=0;i<t.text.length;++i)n.push(Ri(r[i]));return n}(e,t),n=Ae(e,t);if(!r)return n;if(!n)return r;for(var i=0;i<r.length;++i){var o=r[i],l=n[i];if(o&&l)e:for(var s=0;s<l.length;++s){for(var a=l[s],u=0;u<o.length;++u)if(o[u].marker==a.marker)continue e;o.push(a)}else l&&(r[i]=l)}return r}function Gi(e,t,r){for(var n=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)n.push(r?mi.prototype.deepCopy.call(o):o);else{var l=o.changes,s=[];n.push({changes:s});for(var a=0;a<l.length;++a){var u=l[a],c=void 0;if(s.push({from:u.from,to:u.to,text:u.text}),t)for(var h in u)(c=h.match(/^spans_(\d+)$/))&&B(t,Number(c[1]))>-1&&(q(s)[h]=u[h],delete u[h])}}}return n}function Ui(e,t,r,n){if(n){var i=e.anchor;if(r){var o=me(t,i)<0;o!=me(r,i)<0?(i=t,t=r):o!=me(t,r)<0&&(t=r)}return new yi(i,t)}return new yi(r||t,t)}function Vi(e,t,r,n,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),_i(e,new mi([Ui(e.sel.primary(),t,r,i)],0),n)}function Ki(e,t,r){for(var n=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)n[o]=Ui(e.sel.ranges[o],t[o],null,i);_i(e,bi(n,e.sel.primIndex),r)}function ji(e,t,r,n){var i=e.sel.ranges.slice(0);i[t]=r,_i(e,bi(i,e.sel.primIndex),n)}function Xi(e,t,r,n){_i(e,wi(t,r),n)}function Yi(e,t,r){var n=e.history.done,i=q(n);i&&i.ranges?(n[n.length-1]=t,qi(e,t,r)):_i(e,t,r)}function _i(e,t,r){qi(e,t,r),Ei(e,e.sel,e.cm?e.cm.curOp.id:NaN,r)}function qi(e,t,r){(lt(e,"beforeSelectionChange")||e.cm&&lt(e.cm,"beforeSelectionChange"))&&(t=function(e,t,r){var n={ranges:t.ranges,update:function(t){this.ranges=[];for(var r=0;r<t.length;r++)this.ranges[r]=new yi(Se(e,t[r].anchor),Se(e,t[r].head))},origin:r&&r.origin};return nt(e,"beforeSelectionChange",e,n),e.cm&&nt(e.cm,"beforeSelectionChange",e.cm,n),n.ranges!=t.ranges?bi(n.ranges,n.ranges.length-1):t}(e,t,r));var n=r&&r.bias||(me(t.primary().head,e.sel.primary().head)<0?-1:1);$i(e,Qi(e,t,n,!0)),r&&!1===r.scroll||!e.cm||Tn(e.cm)}function $i(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=e.cm.curOp.selectionChanged=!0,ot(e.cm)),sr(e,"cursorActivity",e))}function Zi(e){$i(e,Qi(e,e.sel,null,!1))}function Qi(e,t,r,n){for(var i,o=0;o<t.ranges.length;o++){var l=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],a=eo(e,l.anchor,s&&s.anchor,r,n),u=eo(e,l.head,s&&s.head,r,n);(i||a!=l.anchor||u!=l.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new yi(a,u))}return i?bi(i,t.primIndex):t}function Ji(e,t,r,n,i){var o=ae(e,t.line);if(o.markedSpans)for(var l=0;l<o.markedSpans.length;++l){var s=o.markedSpans[l],a=s.marker;if((null==s.from||(a.inclusiveLeft?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(a.inclusiveRight?s.to>=t.ch:s.to>t.ch))){if(i&&(nt(a,"beforeCursorEnter"),a.explicitlyCleared)){if(o.markedSpans){--l;continue}break}if(!a.atomic)continue;if(r){var u=a.find(n<0?1:-1),c=void 0;if((n<0?a.inclusiveRight:a.inclusiveLeft)&&(u=to(e,u,-n,u&&u.line==t.line?o:null)),u&&u.line==t.line&&(c=me(u,r))&&(n<0?c<0:c>0))return Ji(e,u,t,n,i)}var h=a.find(n<0?-1:1);return(n<0?a.inclusiveLeft:a.inclusiveRight)&&(h=to(e,h,n,h.line==t.line?o:null)),h?Ji(e,h,t,n,i):null}}return t}function eo(e,t,r,n,i){var o=n||1,l=Ji(e,t,r,o,i)||!i&&Ji(e,t,r,o,!0)||Ji(e,t,r,-o,i)||!i&&Ji(e,t,r,-o,!0);return l||(e.cantEdit=!0,ve(e.first,0))}function to(e,t,r,n){return r<0&&0==t.ch?t.line>e.first?Se(e,ve(t.line-1)):null:r>0&&t.ch==(n||ae(e,t.line)).text.length?t.line<e.first+e.size-1?ve(t.line+1,0):null:new ve(t.line,t.ch+r)}function ro(e){e.setSelection(ve(e.firstLine(),0),ve(e.lastLine()),V)}function no(e,t,r){var n={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return n.canceled=!0}};return r&&(n.update=function(t,r,i,o){t&&(n.from=Se(e,t)),r&&(n.to=Se(e,r)),i&&(n.text=i),void 0!==o&&(n.origin=o)}),nt(e,"beforeChange",e,n),e.cm&&nt(e.cm,"beforeChange",e.cm,n),n.canceled?null:{from:n.from,to:n.to,text:n.text,origin:n.origin}}function io(e,t,r){if(e.cm){if(!e.cm.curOp)return _n(e.cm,io)(e,t,r);if(e.cm.state.suppressEdits)return}if(!(lt(e,"beforeChange")||e.cm&&lt(e.cm,"beforeChange"))||(t=no(e,t,!0))){var n=ke&&!r&&function(e,t,r){var n=null;if(e.iter(t.line,r.line+1,function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var r=e.markedSpans[t].marker;!r.readOnly||n&&-1!=B(n,r)||(n||(n=[])).push(r)}}),!n)return null;for(var i=[{from:t,to:r}],o=0;o<n.length;++o)for(var l=n[o],s=l.find(0),a=0;a<i.length;++a){var u=i[a];if(!(me(u.to,s.from)<0||me(u.from,s.to)>0)){var c=[a,1],h=me(u.from,s.from),f=me(u.to,s.to);(h<0||!l.inclusiveLeft&&!h)&&c.push({from:u.from,to:s.from}),(f>0||!l.inclusiveRight&&!f)&&c.push({from:s.to,to:u.to}),i.splice.apply(i,c),a+=c.length-3}}return i}(e,t.from,t.to);if(n)for(var i=n.length-1;i>=0;--i)oo(e,{from:n[i].from,to:n[i].to,text:i?[""]:t.text,origin:t.origin});else oo(e,t)}}function oo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=me(t.from,t.to)){var r=Si(e,t);Pi(e,t,r,e.cm?e.cm.curOp.id:NaN),ao(e,t,r,Ae(e,t));var n=[];Oi(e,function(e,r){r||-1!=B(n,e.history)||(fo(e.history,t),n.push(e.history)),ao(e,t,null,Ae(e,t))})}}function lo(e,t,r){if(!e.cm||!e.cm.state.suppressEdits||r){for(var n,i=e.history,o=e.sel,l="undo"==t?i.done:i.undone,s="undo"==t?i.undone:i.done,a=0;a<l.length&&(n=l[a],r?!n.ranges||n.equals(e.sel):n.ranges);a++);if(a!=l.length){for(i.lastOrigin=i.lastSelOrigin=null;(n=l.pop()).ranges;){if(zi(n,s),r&&!n.equals(e.sel))return void _i(e,n,{clearRedo:!1});o=n}var u=[];zi(o,s),s.push({changes:u,generation:i.generation}),i.generation=n.generation||++i.maxGeneration;for(var c=lt(e,"beforeChange")||e.cm&&lt(e.cm,"beforeChange"),h=function(r){var i=n.changes[r];if(i.origin=t,c&&!no(e,i,!1))return l.length=0,{};u.push(Hi(e,i));var o=r?Si(e,i):q(l);ao(e,i,o,Bi(e,i)),!r&&e.cm&&e.cm.scrollIntoView({from:i.from,to:xi(i)});var s=[];Oi(e,function(e,t){t||-1!=B(s,e.history)||(fo(e.history,i),s.push(e.history)),ao(e,i,null,Bi(e,i))})},f=n.changes.length-1;f>=0;--f){var d=h(f);if(d)return d.v}}}}function so(e,t){if(0!=t&&(e.first+=t,e.sel=new mi($(e.sel.ranges,function(e){return new yi(ve(e.anchor.line+t,e.anchor.ch),ve(e.head.line+t,e.head.ch))}),e.sel.primIndex),e.cm)){Zn(e.cm,e.first,e.first-t,t);for(var r=e.cm.display,n=r.viewFrom;n<r.viewTo;n++)Qn(e.cm,n,"gutter")}}function ao(e,t,r,n){if(e.cm&&!e.cm.curOp)return _n(e.cm,ao)(e,t,r,n);if(t.to.line<e.first)so(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);so(e,i),t={from:ve(e.first,0),to:ve(t.to.line+i,t.to.ch),text:[q(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ve(o,ae(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=ue(e,t.from,t.to),r||(r=Si(e,t)),e.cm?function(e,t,r){var n=e.doc,i=e.display,o=t.from,l=t.to,s=!1,a=o.line;e.options.lineWrapping||(a=fe(Ge(ae(n,o.line))),n.iter(a,l.line+1,function(e){if(e==i.maxLine)return s=!0,!0}));n.sel.contains(t.from,t.to)>-1&&ot(e);Ni(n,t,r,on(e)),e.options.lineWrapping||(n.iter(a,o.line+t.text.length,function(e){var t=Ye(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)}),s&&(e.curOp.updateMaxLine=!0));(function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var r=e.first,n=t-1;n>r;n--){var i=ae(e,n).stateAfter;if(i&&(!(i instanceof Ft)||n+i.lookAhead<t)){r=n+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,r)}})(n,o.line),ri(e,400);var u=t.text.length-(l.line-o.line)-1;t.full?Zn(e):o.line!=l.line||1!=t.text.length||Mi(e.doc,t)?Zn(e,o.line,l.line+1,u):Qn(e,o.line,"text");var c=lt(e,"changes"),h=lt(e,"change");if(h||c){var f={from:o,to:l,text:t.text,removed:t.removed,origin:t.origin};h&&sr(e,"change",e,f),c&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(f)}e.display.selForContextMenu=null}(e.cm,t,n):Ni(e,t,n),qi(e,r,V)}}function uo(e,t,r,n,i){var o;(n||(n=r),me(n,r)<0)&&(r=(o=[n,r])[0],n=o[1]);"string"==typeof t&&(t=e.splitLines(t)),io(e,{from:r,to:n,text:t,origin:i})}function co(e,t,r,n){r<e.line?e.line+=n:t<e.line&&(e.line=t,e.ch=0)}function ho(e,t,r,n){for(var i=0;i<e.length;++i){var o=e[i],l=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)co(o.ranges[s].anchor,t,r,n),co(o.ranges[s].head,t,r,n)}else{for(var a=0;a<o.changes.length;++a){var u=o.changes[a];if(r<u.from.line)u.from=ve(u.from.line+n,u.from.ch),u.to=ve(u.to.line+n,u.to.ch);else if(t<=u.to.line){l=!1;break}}l||(e.splice(0,i+1),i=0)}}}function fo(e,t){var r=t.from.line,n=t.to.line,i=t.text.length-(n-r)-1;ho(e.done,r,n,i),ho(e.undone,r,n,i)}function po(e,t,r,n){var i=t,o=t;return"number"==typeof t?o=ae(e,Ce(e,t)):i=fe(t),null==i?null:(n(o,i)&&e.cm&&Qn(e.cm,i,r),o)}function go(e){this.lines=e,this.parent=null;for(var t=0,r=0;r<e.length;++r)e[r].parent=this,t+=e[r].height;this.height=t}function vo(e){this.children=e;for(var t=0,r=0,n=0;n<e.length;++n){var i=e[n];t+=i.chunkSize(),r+=i.height,i.parent=this}this.size=t,this.height=r,this.parent=null}yi.prototype.from=function(){return xe(this.anchor,this.head)},yi.prototype.to=function(){return we(this.anchor,this.head)},yi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},go.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var r=e,n=e+t;r<n;++r){var i=this.lines[r];this.height-=i.height,Yt(i),sr(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,r){this.height+=r,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var n=0;n<t.length;++n)t[n].parent=this},iterN:function(e,t,r){for(var n=e+t;e<n;++e)if(r(this.lines[e]))return!0}},vo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var r=0;r<this.children.length;++r){var n=this.children[r],i=n.chunkSize();if(e<i){var o=Math.min(t,i-e),l=n.height;if(n.removeInner(e,o),this.height-=l-n.height,i==o&&(this.children.splice(r--,1),n.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof go))){var s=[];this.collapse(s),this.children=[new go(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,r){this.size+=t.length,this.height+=r;for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,r),i.lines&&i.lines.length>50){for(var l=i.lines.length%25+25,s=l;s<i.lines.length;){var a=new go(i.lines.slice(s,s+=25));i.height-=a.height,this.children.splice(++n,0,a),a.parent=this}i.lines=i.lines.slice(0,l),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new vo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var r=B(e.parent.children,e);e.parent.children.splice(r+1,0,t)}else{var n=new vo(e.children);n.parent=e,e.children=[n,t],e=n}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,r){for(var n=0;n<this.children.length;++n){var i=this.children[n],o=i.chunkSize();if(e<o){var l=Math.min(t,o-e);if(i.iterN(e,l,r))return!0;if(0==(t-=l))break;e=0}else e-=o}}};var mo=function(e,t,r){if(r)for(var n in r)r.hasOwnProperty(n)&&(this[n]=r[n]);this.doc=e,this.node=t};function yo(e,t,r){Xe(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&kn(e,r)}mo.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,r=this.line,n=fe(r);if(null!=n&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(r.widgets=null);var o=wr(this);he(r,Math.max(0,r.height-o)),e&&(Yn(e,function(){yo(e,r,-o),Qn(e,n,"widget")}),sr(e,"lineWidgetCleared",e,this,n))}},mo.prototype.changed=function(){var e=this,t=this.height,r=this.doc.cm,n=this.line;this.height=null;var i=wr(this)-t;i&&(he(n,n.height+i),r&&Yn(r,function(){r.curOp.forceUpdate=!0,yo(r,n,i),sr(r,"lineWidgetChanged",r,e,fe(n))}))},st(mo);var bo=0,wo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++bo};function xo(e,t,r,n,i){if(n&&n.shared)return function(e,t,r,n,i){(n=z(n)).shared=!1;var o=[xo(e,t,r,n,i)],l=o[0],s=n.widgetNode;return Oi(e,function(e){s&&(n.widgetNode=s.cloneNode(!0)),o.push(xo(e,Se(e,t),Se(e,r),n,i));for(var a=0;a<e.linked.length;++a)if(e.linked[a].isParent)return;l=q(o)}),new Co(o,l)}(e,t,r,n,i);if(e.cm&&!e.cm.curOp)return _n(e.cm,xo)(e,t,r,n,i);var o=new wo(e,i),l=me(t,r);if(n&&z(n,o,!1),l>0||0==l&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=A("span",[o.replacedWith],"CodeMirror-widget"),n.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),n.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Be(e,t.line,t,r,o)||t.line!=r.line&&Be(e,r.line,t,r,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Te=!0}o.addToHistory&&Pi(e,{from:t,to:r,origin:"markText"},e.sel,NaN);var s,a=t.line,u=e.cm;if(e.iter(a,r.line+1,function(e){u&&o.collapsed&&!u.options.lineWrapping&&Ge(e)==u.display.maxLine&&(s=!0),o.collapsed&&a!=t.line&&he(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new Me(o,a==t.line?t.ch:null,a==r.line?r.ch:null)),++a}),o.collapsed&&e.iter(t.line,r.line+1,function(t){Ke(e,t)&&he(t,0)}),o.clearOnEnter&&et(o,"beforeCursorEnter",function(){return o.clear()}),o.readOnly&&(ke=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++bo,o.atomic=!0),u){if(s&&(u.curOp.updateMaxLine=!0),o.collapsed)Zn(u,t.line,r.line+1);else if(o.className||o.title||o.startStyle||o.endStyle||o.css)for(var c=t.line;c<=r.line;c++)Qn(u,c,"text");o.atomic&&Zi(u.doc),sr(u,"markerAdded",u,o)}return o}wo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gn(e),lt(this,"clear")){var r=this.find();r&&sr(this,"clear",r.from,r.to)}for(var n=null,i=null,o=0;o<this.lines.length;++o){var l=this.lines[o],s=Ne(l.markedSpans,this);e&&!this.collapsed?Qn(e,fe(l),"text"):e&&(null!=s.to&&(i=fe(l)),null!=s.from&&(n=fe(l))),l.markedSpans=Oe(l.markedSpans,s),null==s.from&&this.collapsed&&!Ke(this.doc,l)&&e&&he(l,en(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var a=0;a<this.lines.length;++a){var u=Ge(this.lines[a]),c=Ye(u);c>e.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=c,e.display.maxLineChanged=!0)}null!=n&&e&&this.collapsed&&Zn(e,n,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Zi(e.doc)),e&&sr(e,"markerCleared",e,this,n,i),t&&Un(e),this.parent&&this.parent.clear()}},wo.prototype.find=function(e,t){var r,n;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],l=Ne(o.markedSpans,this);if(null!=l.from&&(r=ve(t?o:fe(o),l.from),-1==e))return r;if(null!=l.to&&(n=ve(t?o:fe(o),l.to),1==e))return n}return r&&{from:r,to:n}},wo.prototype.changed=function(){var e=this,t=this.find(-1,!0),r=this,n=this.doc.cm;t&&n&&Yn(n,function(){var i=t.line,o=fe(t.line),l=Ar(n,o);if(l&&(zr(l),n.curOp.selectionChanged=n.curOp.forceUpdate=!0),n.curOp.updateMaxLine=!0,!Ke(r.doc,i)&&null!=r.height){var s=r.height;r.height=null;var a=wr(r)-s;a&&he(i,i.height+a)}sr(n,"markerChanged",n,e)})},wo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=B(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},wo.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},st(wo);var Co=function(e,t){this.markers=e,this.primary=t;for(var r=0;r<e.length;++r)e[r].parent=this};function So(e){return e.findMarks(ve(e.first,0),e.clipPos(ve(e.lastLine())),function(e){return e.parent})}function Lo(e){for(var t=function(t){var r=e[t],n=[r.primary.doc];Oi(r.primary.doc,function(e){return n.push(e)});for(var i=0;i<r.markers.length;i++){var o=r.markers[i];-1==B(n,o.doc)&&(o.parent=null,r.markers.splice(i--,1))}},r=0;r<e.length;r++)t(r)}Co.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();sr(this,"clear")}},Co.prototype.find=function(e,t){return this.primary.find(e,t)},st(Co);var ko=0,To=function(e,t,r,n,i){if(!(this instanceof To))return new To(e,t,r,n,i);null==r&&(r=0),vo.call(this,[new go([new Xt("",null)])]),this.first=r,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=r;var o=ve(r,0);this.sel=wi(o),this.history=new Di(null),this.id=++ko,this.modeOption=t,this.lineSep=n,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Ni(this,{from:o,to:o,text:e}),_i(this,wi(o),V)};To.prototype=Q(vo.prototype,{constructor:To,iter:function(e,t,r){r?this.iterN(e-this.first,t-e,r):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var r=0,n=0;n<t.length;++n)r+=t[n].height;this.insertInner(e-this.first,t,r)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=ce(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:$n(function(e){var t=ve(this.first,0),r=this.first+this.size-1;io(this,{from:t,to:ve(r,ae(this,r).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Mn(this.cm,0,0),_i(this,wi(t),V)}),replaceRange:function(e,t,r,n){uo(this,e,t=Se(this,t),r=r?Se(this,r):t,n)},getRange:function(e,t,r){var n=ue(this,Se(this,e),Se(this,t));return!1===r?n:n.join(r||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(pe(this,e))return ae(this,e)},getLineNumber:function(e){return fe(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=ae(this,e)),Ge(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return Se(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:$n(function(e,t,r){Xi(this,Se(this,"number"==typeof e?ve(e,t||0):e),null,r)}),setSelection:$n(function(e,t,r){Xi(this,Se(this,e),Se(this,t||e),r)}),extendSelection:$n(function(e,t,r){Vi(this,Se(this,e),t&&Se(this,t),r)}),extendSelections:$n(function(e,t){Ki(this,Le(this,e),t)}),extendSelectionsBy:$n(function(e,t){Ki(this,Le(this,$(this.sel.ranges,e)),t)}),setSelections:$n(function(e,t,r){if(e.length){for(var n=[],i=0;i<e.length;i++)n[i]=new yi(Se(this,e[i].anchor),Se(this,e[i].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),_i(this,bi(n,t),r)}}),addSelection:$n(function(e,t,r){var n=this.sel.ranges.slice(0);n.push(new yi(Se(this,e),Se(this,t||e))),_i(this,bi(n,n.length-1),r)}),getSelection:function(e){for(var t,r=this.sel.ranges,n=0;n<r.length;n++){var i=ue(this,r[n].from(),r[n].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],r=this.sel.ranges,n=0;n<r.length;n++){var i=ue(this,r[n].from(),r[n].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[n]=i}return t},replaceSelection:function(e,t,r){for(var n=[],i=0;i<this.sel.ranges.length;i++)n[i]=e;this.replaceSelections(n,t,r||"+input")},replaceSelections:$n(function(e,t,r){for(var n=[],i=this.sel,o=0;o<i.ranges.length;o++){var l=i.ranges[o];n[o]={from:l.from(),to:l.to(),text:this.splitLines(e[o]),origin:r}}for(var s=t&&"end"!=t&&function(e,t,r){for(var n=[],i=ve(e.first,0),o=i,l=0;l<t.length;l++){var s=t[l],a=Li(s.from,i,o),u=Li(xi(s),i,o);if(i=s.to,o=u,"around"==r){var c=e.sel.ranges[l],h=me(c.head,c.anchor)<0;n[l]=new yi(h?u:a,h?a:u)}else n[l]=new yi(a,a)}return new mi(n,e.sel.primIndex)}(this,n,t),a=n.length-1;a>=0;a--)io(this,n[a]);s?Yi(this,s):this.cm&&Tn(this.cm)}),undo:$n(function(){lo(this,"undo")}),redo:$n(function(){lo(this,"redo")}),undoSelection:$n(function(){lo(this,"undo",!0)}),redoSelection:$n(function(){lo(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,r=0,n=0;n<e.done.length;n++)e.done[n].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++r;return{undo:t,redo:r}},clearHistory:function(){this.history=new Di(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Gi(this.history.done),undone:Gi(this.history.undone)}},setHistory:function(e){var t=this.history=new Di(this.history.maxGeneration);t.done=Gi(e.done.slice(0),null,!0),t.undone=Gi(e.undone.slice(0),null,!0)},setGutterMarker:$n(function(e,t,r){return po(this,e,"gutter",function(e){var n=e.gutterMarkers||(e.gutterMarkers={});return n[t]=r,!r&&re(n)&&(e.gutterMarkers=null),!0})}),clearGutter:$n(function(e){var t=this;this.iter(function(r){r.gutterMarkers&&r.gutterMarkers[e]&&po(t,r,"gutter",function(){return r.gutterMarkers[e]=null,re(r.gutterMarkers)&&(r.gutterMarkers=null),!0})})}),lineInfo:function(e){var t;if("number"==typeof e){if(!pe(this,e))return null;if(t=e,!(e=ae(this,e)))return null}else if(null==(t=fe(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:$n(function(e,t,r){return po(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[n]){if(L(r).test(e[n]))return!1;e[n]+=" "+r}else e[n]=r;return!0})}),removeLineClass:$n(function(e,t,r){return po(this,e,"gutter"==t?"gutter":"class",function(e){var n="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[n];if(!i)return!1;if(null==r)e[n]=null;else{var o=i.match(L(r));if(!o)return!1;var l=o.index+o[0].length;e[n]=i.slice(0,o.index)+(o.index&&l!=i.length?" ":"")+i.slice(l)||null}return!0})}),addLineWidget:$n(function(e,t,r){return function(e,t,r,n){var i=new mo(e,r,n),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),po(e,t,"widget",function(t){var r=t.widgets||(t.widgets=[]);if(null==i.insertAt?r.push(i):r.splice(Math.min(r.length-1,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Ke(e,t)){var n=Xe(t)<e.scrollTop;he(t,t.height+wr(i)),n&&kn(o,i.height),o.curOp.forceUpdate=!0}return!0}),sr(o,"lineWidgetAdded",o,i,"number"==typeof t?t:fe(t)),i}(this,e,t,r)}),removeLineWidget:function(e){e.clear()},markText:function(e,t,r){return xo(this,Se(this,e),Se(this,t),r,r&&r.type||"range")},setBookmark:function(e,t){var r={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return xo(this,e=Se(this,e),e,r,"bookmark")},findMarksAt:function(e){var t=[],r=ae(this,(e=Se(this,e)).line).markedSpans;if(r)for(var n=0;n<r.length;++n){var i=r[n];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,r){e=Se(this,e),t=Se(this,t);var n=[],i=e.line;return this.iter(e.line,t.line+1,function(o){var l=o.markedSpans;if(l)for(var s=0;s<l.length;s++){var a=l[s];null!=a.to&&i==e.line&&e.ch>=a.to||null==a.from&&i!=e.line||null!=a.from&&i==t.line&&a.from>=t.ch||r&&!r(a.marker)||n.push(a.marker.parent||a.marker)}++i}),n},getAllMarks:function(){var e=[];return this.iter(function(t){var r=t.markedSpans;if(r)for(var n=0;n<r.length;++n)null!=r[n].from&&e.push(r[n].marker)}),e},posFromIndex:function(e){var t,r=this.first,n=this.lineSeparator().length;return this.iter(function(i){var o=i.text.length+n;if(o>e)return t=e,!0;e-=o,++r}),Se(this,ve(r,t))},indexFromPos:function(e){var t=(e=Se(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var r=this.lineSeparator().length;return this.iter(this.first,e.line,function(e){t+=e.text.length+r}),t},copy:function(e){var t=new To(ce(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,r=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<r&&(r=e.to);var n=new To(ce(this,t,r),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(n.history=this.history),(this.linked||(this.linked=[])).push({doc:n,sharedHist:e.sharedHist}),n.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r],i=n.find(),o=e.clipPos(i.from),l=e.clipPos(i.to);if(me(o,l)){var s=xo(e,o,l,n.primary,n.primary.type);n.markers.push(s),s.parent=n}}}(n,So(this)),n},unlinkDoc:function(e){if(e instanceof Sl&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t){if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Lo(So(this));break}}if(e.history==this.history){var r=[e.id];Oi(e,function(e){return r.push(e.id)},!0),e.history=new Di(null),e.history.done=Gi(this.history.done,r),e.history.undone=Gi(this.history.undone,r)}},iterLinkedDocs:function(e){Oi(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):wt(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:$n(function(e){var t;("rtl"!=e&&(e="ltr"),e!=this.direction)&&(this.direction=e,this.iter(function(e){return e.order=null}),this.cm&&Yn(t=this.cm,function(){Wi(t),Zn(t)}))})}),To.prototype.eachLine=To.prototype.iter;var Mo=0;function No(e){var t=this;if(Oo(t),!it(t,e)&&!xr(t.display,e)){at(e),l&&(Mo=+new Date);var r=sn(t,e,!0),n=e.dataTransfer.files;if(r&&!t.isReadOnly())if(n&&n.length&&window.FileReader&&window.File)for(var i=n.length,o=Array(i),s=0,a=function(e,n){if(!t.options.allowDropFileTypes||-1!=B(t.options.allowDropFileTypes,e.type)){var l=new FileReader;l.onload=_n(t,function(){var e=l.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(e)&&(e=""),o[n]=e,++s==i){var a={from:r=Se(t.doc,r),to:r,text:t.doc.splitLines(o.join(t.doc.lineSeparator())),origin:"paste"};io(t.doc,a),Yi(t.doc,wi(r,xi(a)))}}),l.readAsText(e)}},u=0;u<i;++u)a(n[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(r)>-1)return t.state.draggingText(e),void setTimeout(function(){return t.display.input.focus()},20);try{var c=e.dataTransfer.getData("Text");if(c){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),qi(t.doc,wi(r,r)),h)for(var f=0;f<h.length;++f)uo(t.doc,"",h[f].anchor,h[f].head,"drag");t.replaceSelection(c,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Oo(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ao(e){if(document.getElementsByClassName)for(var t=document.getElementsByClassName("CodeMirror"),r=0;r<t.length;r++){var n=t[r].CodeMirror;n&&e(n)}}var Wo=!1;function Do(){var e;Wo||(et(window,"resize",function(){null==e&&(e=setTimeout(function(){e=null,Ao(Ho)},100))}),et(window,"blur",function(){return Ao(yn)}),Wo=!0)}function Ho(e){var t=e.display;t.lastWrapHeight==t.wrapper.clientHeight&&t.lastWrapWidth==t.wrapper.clientWidth||(t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize())}for(var Fo={3:"Enter",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",127:"Delete",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Po=0;Po<10;Po++)Fo[Po+48]=Fo[Po+96]=String(Po);for(var Eo=65;Eo<=90;Eo++)Fo[Eo]=String.fromCharCode(Eo);for(var zo=1;zo<=12;zo++)Fo[zo+111]=Fo[zo+63235]="F"+zo;var Io={};function Ro(e){var t,r,n,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var l=0;l<o.length-1;l++){var s=o[l];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);n=!0}}return t&&(e="Alt-"+e),r&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),n&&(e="Shift-"+e),e}function Bo(e){var t={};for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];if(/^(name|fallthrough|(de|at)tach)$/.test(r))continue;if("..."==n){delete e[r];continue}for(var i=$(r.split(" "),Ro),o=0;o<i.length;o++){var l=void 0,s=void 0;o==i.length-1?(s=i.join(" "),l=n):(s=i.slice(0,o+1).join(" "),l="...");var a=t[s];if(a){if(a!=l)throw new Error("Inconsistent bindings for "+s)}else t[s]=l}delete e[r]}for(var u in t)e[u]=t[u];return e}function Go(e,t,r,n){var i=(t=jo(t)).call?t.call(e,n):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&r(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Go(e,t.fallthrough,r,n);for(var o=0;o<t.fallthrough.length;o++){var l=Go(e,t.fallthrough[o],r,n);if(l)return l}}}function Uo(e){var t="string"==typeof e?e:Fo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Vo(e,t,r){var n=e;return t.altKey&&"Alt"!=n&&(e="Alt-"+e),(C?t.metaKey:t.ctrlKey)&&"Ctrl"!=n&&(e="Ctrl-"+e),(C?t.ctrlKey:t.metaKey)&&"Cmd"!=n&&(e="Cmd-"+e),!r&&t.shiftKey&&"Shift"!=n&&(e="Shift-"+e),e}function Ko(e,t){if(h&&34==e.keyCode&&e.char)return!1;var r=Fo[e.keyCode];return null!=r&&!e.altGraphKey&&Vo(r,e,t)}function jo(e){return"string"==typeof e?Io[e]:e}function Xo(e,t){for(var r=e.doc.sel.ranges,n=[],i=0;i<r.length;i++){for(var o=t(r[i]);n.length&&me(o.from,q(n).to)<=0;){var l=n.pop();if(me(l.from,o.from)<0){o.from=l.from;break}}n.push(o)}Yn(e,function(){for(var t=n.length-1;t>=0;t--)uo(e.doc,"",n[t].from,n[t].to,"+delete");Tn(e)})}function Yo(e,t,r){var n=oe(e.text,t+r,r);return n<0||n>e.text.length?null:n}function _o(e,t,r){var n=Yo(e,t.ch,r);return null==n?null:new ve(t.line,n,r<0?"after":"before")}function qo(e,t,r,n,i){if(e){var o=Qe(r,t.doc.direction);if(o){var l,s=i<0?q(o):o[0],a=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var u=Wr(t,r);l=i<0?r.text.length-1:0;var c=Dr(t,u,l).top;l=le(function(e){return Dr(t,u,e).top==c},i<0==(1==s.level)?s.from:s.to-1,l),"before"==a&&(l=Yo(r,l,1))}else l=i<0?s.to:s.from;return new ve(n,l,a)}}return new ve(n,i<0?r.text.length:0,i<0?"before":"after")}Io.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Io.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Io.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Io.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Io.default=y?Io.macDefault:Io.pcDefault;var $o={selectAll:ro,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),V)},killLine:function(e){return Xo(e,function(t){if(t.empty()){var r=ae(e.doc,t.head.line).text.length;return t.head.ch==r&&t.head.line<e.lastLine()?{from:t.head,to:ve(t.head.line+1,0)}:{from:t.head,to:ve(t.head.line,r)}}return{from:t.from(),to:t.to()}})},deleteLine:function(e){return Xo(e,function(t){return{from:ve(t.from().line,0),to:Se(e.doc,ve(t.to().line+1,0))}})},delLineLeft:function(e){return Xo(e,function(e){return{from:ve(e.from().line,0),to:e.from()}})},delWrappedLineLeft:function(e){return Xo(e,function(t){var r=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:r},"div"),to:t.from()}})},delWrappedLineRight:function(e){return Xo(e,function(t){var r=e.charCoords(t.head,"div").top+5,n=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div");return{from:t.from(),to:n}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ve(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ve(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(t){return Zo(e,t.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(t){return Qo(e,t.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(t){return function(e,t){var r=ae(e.doc,t),n=function(e){for(var t;t=Re(e);)e=t.find(1,!0).line;return e}(r);n!=r&&(t=fe(n));return qo(!0,e,r,t,-1)}(e,t.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:r},"div")},j)},goLineLeft:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:r},"div")},j)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(t){var r=e.cursorCoords(t.head,"div").top+5,n=e.coordsChar({left:0,top:r},"div");return n.ch<e.getLine(n.line).search(/\S/)?Qo(e,t.head):n},j)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"char")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],r=e.listSelections(),n=e.options.tabSize,i=0;i<r.length;i++){var o=r[i].from(),l=I(e.getLine(o.line),o.ch,n);t.push(_(n-l%n))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Yn(e,function(){for(var t=e.listSelections(),r=[],n=0;n<t.length;n++)if(t[n].empty()){var i=t[n].head,o=ae(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new ve(i.line,i.ch-1)),i.ch>0)i=new ve(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),ve(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var l=ae(e.doc,i.line-1).text;l&&(i=new ve(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+l.charAt(l.length-1),ve(i.line-1,l.length-1),i,"+transpose"))}r.push(new yi(i,i))}e.setSelections(r)})},newlineAndIndent:function(e){return Yn(e,function(){for(var t=e.listSelections(),r=t.length-1;r>=0;r--)e.replaceRange(e.doc.lineSeparator(),t[r].anchor,t[r].head,"+input");t=e.listSelections();for(var n=0;n<t.length;n++)e.indentLine(t[n].from().line,null,!0);Tn(e)})},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Zo(e,t){var r=ae(e.doc,t),n=Ge(r);return n!=r&&(t=fe(n)),qo(!0,e,n,t,1)}function Qo(e,t){var r=Zo(e,t.line),n=ae(e.doc,r.line),i=Qe(n,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(0,n.text.search(/\S/)),l=t.line==r.line&&t.ch<=o&&t.ch;return ve(r.line,l?0:o,r.sticky)}return r}function Jo(e,t,r){if("string"==typeof t&&!(t=$o[t]))return!1;e.display.input.ensurePolled();var n=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r&&(e.display.shift=!1),i=t(e)!=U}finally{e.display.shift=n,e.state.suppressEdits=!1}return i}var el=new R;function tl(e,t,r,n){var i=e.state.keySeq;if(i){if(Uo(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:el.set(50,function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())}),rl(e,i+" "+t,r,n))return!0}return rl(e,t,r,n)}function rl(e,t,r,n){var i=function(e,t,r){for(var n=0;n<e.state.keyMaps.length;n++){var i=Go(t,e.state.keyMaps[n],r,e);if(i)return i}return e.options.extraKeys&&Go(t,e.options.extraKeys,r,e)||Go(t,e.options.keyMap,r,e)}(e,t,n);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&sr(e,"keyHandled",e,t,r),"handled"!=i&&"multi"!=i||(at(r),pn(e)),!!i}function nl(e,t){var r=Ko(t,!0);return!!r&&(t.shiftKey&&!e.state.keySeq?tl(e,"Shift-"+r,t,function(t){return Jo(e,t,!0)})||tl(e,r,t,function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return Jo(e,t)}):tl(e,r,t,function(t){return Jo(e,t)}))}var il=null;function ol(e){var t=this;if(t.curOp.focus=D(),!it(t,e)){l&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var n=nl(t,e);h&&(il=n?r:null,!n&&88==r&&!Ct&&(y?e.metaKey:e.ctrlKey)&&t.replaceSelection("",null,"cut")),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function r(e){18!=e.keyCode&&e.altKey||(T(t,"CodeMirror-crosshair"),rt(document,"keyup",r),rt(document,"mouseover",r))}H(t,"CodeMirror-crosshair"),et(document,"keyup",r),et(document,"mouseover",r)}(t)}}function ll(e){16==e.keyCode&&(this.doc.sel.shift=!1),it(this,e)}function sl(e){var t=this;if(!(xr(t.display,e)||it(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var r=e.keyCode,n=e.charCode;if(h&&r==il)return il=null,void at(e);if(!h||e.which&&!(e.which<10)||!nl(t,e)){var i=String.fromCharCode(null==n?r:n);"\b"!=i&&(function(e,t,r){return tl(e,"'"+r+"'",t,function(t){return Jo(e,t,!0)})}(t,e,i)||t.display.input.onKeyPress(e))}}}var al,ul,cl=function(e,t,r){this.time=e,this.pos=t,this.button=r};function hl(e){var t=this,r=t.display;if(!(it(t,e)||r.activeTouch&&r.input.supportsTouch()))if(r.input.ensurePolled(),r.shift=e.shiftKey,xr(r,e))a||(r.scroller.draggable=!1,setTimeout(function(){return r.scroller.draggable=!0},100));else if(!pl(t,e)){var n=sn(t,e),i=dt(e),o=n?function(e,t){var r=+new Date;return ul&&ul.compare(r,e,t)?(al=ul=null,"triple"):al&&al.compare(r,e,t)?(ul=new cl(r,e,t),al=null,"double"):(al=new cl(r,e,t),ul=null,"single")}(n,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),n&&function(e,t,r,n,i){var o="Click";"double"==n?o="Double"+o:"triple"==n&&(o="Triple"+o);return tl(e,Vo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,function(t){if("string"==typeof t&&(t=$o[t]),!t)return!1;var n=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n=t(e,r)!=U}finally{e.state.suppressEdits=!1}return n})}(t,i,n,o,e)||(1==i?n?function(e,t,r,n){l?setTimeout(E(gn,e),0):e.curOp.focus=D();var i,o=function(e,t,r){var n=e.getOption("configureMouse"),i=n?n(e,t,r):{};if(null==i.unit){var o=b?r.shiftKey&&r.metaKey:r.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||r.shiftKey);null==i.addNew&&(i.addNew=y?r.metaKey:r.ctrlKey);null==i.moveOnDrag&&(i.moveOnDrag=!(y?r.altKey:r.ctrlKey));return i}(e,r,n),u=e.doc.sel;e.options.dragDrop&&vt&&!e.isReadOnly()&&"single"==r&&(i=u.contains(t))>-1&&(me((i=u.ranges[i]).from(),t)<0||t.xRel>0)&&(me(i.to(),t)>0||t.xRel<0)?function(e,t,r,n){var i=e.display,o=!1,u=_n(e,function(t){a&&(i.scroller.draggable=!1),e.state.draggingText=!1,rt(document,"mouseup",u),rt(document,"mousemove",c),rt(i.scroller,"dragstart",h),rt(i.scroller,"drop",u),o||(at(t),n.addNew||Vi(e.doc,r,null,null,n.extend),a||l&&9==s?setTimeout(function(){document.body.focus(),i.input.focus()},20):i.input.focus())}),c=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},h=function(){return o=!0};a&&(i.scroller.draggable=!0);e.state.draggingText=u,u.copy=!n.moveOnDrag,i.scroller.dragDrop&&i.scroller.dragDrop();et(document,"mouseup",u),et(document,"mousemove",c),et(i.scroller,"dragstart",h),et(i.scroller,"drop",u),vn(e),setTimeout(function(){return i.input.focus()},20)}(e,n,t,o):function(e,t,r,n){var i=e.display,o=e.doc;at(t);var l,s,a=o.sel,u=a.ranges;n.addNew&&!n.extend?(s=o.sel.contains(r),l=s>-1?u[s]:new yi(r,r)):(l=o.sel.primary(),s=o.sel.primIndex);if("rectangle"==n.unit)n.addNew||(l=new yi(r,r)),r=sn(e,t,!0,!0),s=-1;else{var c=fl(e,r,n.unit);l=n.extend?Ui(l,c.anchor,c.head,n.extend):c}n.addNew?-1==s?(s=u.length,_i(o,bi(u.concat([l]),s),{scroll:!1,origin:"*mouse"})):u.length>1&&u[s].empty()&&"char"==n.unit&&!n.extend?(_i(o,bi(u.slice(0,s).concat(u.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),a=o.sel):ji(o,s,l,K):(s=0,_i(o,new mi([l],0),K),a=o.sel);var h=r;function f(t){if(0!=me(h,t))if(h=t,"rectangle"==n.unit){for(var i=[],u=e.options.tabSize,c=I(ae(o,r.line).text,r.ch,u),f=I(ae(o,t.line).text,t.ch,u),d=Math.min(c,f),p=Math.max(c,f),g=Math.min(r.line,t.line),v=Math.min(e.lastLine(),Math.max(r.line,t.line));g<=v;g++){var m=ae(o,g).text,y=X(m,d,u);d==p?i.push(new yi(ve(g,y),ve(g,y))):m.length>y&&i.push(new yi(ve(g,y),ve(g,X(m,p,u))))}i.length||i.push(new yi(r,r)),_i(o,bi(a.ranges.slice(0,s).concat(i),s),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=l,x=fl(e,t,n.unit),C=w.anchor;me(x.anchor,C)>0?(b=x.head,C=xe(w.from(),x.anchor)):(b=x.anchor,C=we(w.to(),x.head));var S=a.ranges.slice(0);S[s]=function(e,t){var r=t.anchor,n=t.head,i=ae(e.doc,r.line);if(0==me(r,n)&&r.sticky==n.sticky)return t;var o=Qe(i);if(!o)return t;var l=$e(o,r.ch,r.sticky),s=o[l];if(s.from!=r.ch&&s.to!=r.ch)return t;var a,u=l+(s.from==r.ch==(1!=s.level)?0:1);if(0==u||u==o.length)return t;if(n.line!=r.line)a=(n.line-r.line)*("ltr"==e.doc.direction?1:-1)>0;else{var c=$e(o,n.ch,n.sticky),h=c-l||(n.ch-r.ch)*(1==s.level?-1:1);a=c==u-1||c==u?h<0:h>0}var f=o[u+(a?-1:0)],d=a==(1==f.level),p=d?f.from:f.to,g=d?"after":"before";return r.ch==p&&r.sticky==g?t:new yi(new ve(r.line,p,g),n)}(e,new yi(Se(o,C),b)),_i(o,bi(S,s),K)}}var d=i.wrapper.getBoundingClientRect(),p=0;function g(t){e.state.selectingText=!1,p=1/0,at(t),i.input.focus(),rt(document,"mousemove",v),rt(document,"mouseup",m),o.history.lastSelOrigin=null}var v=_n(e,function(t){dt(t)?function t(r){var l=++p;var s=sn(e,r,!0,"rectangle"==n.unit);if(!s)return;if(0!=me(s,h)){e.curOp.focus=D(),f(s);var a=xn(i,o);(s.line>=a.to||s.line<a.from)&&setTimeout(_n(e,function(){p==l&&t(r)}),150)}else{var u=r.clientY<d.top?-20:r.clientY>d.bottom?20:0;u&&setTimeout(_n(e,function(){p==l&&(i.scroller.scrollTop+=u,t(r))}),50)}}(t):g(t)}),m=_n(e,g);e.state.selectingText=m,et(document,"mousemove",v),et(document,"mouseup",m)}(e,n,t,o)}(t,n,o,e):ft(e)==r.scroller&&at(e):2==i?(n&&Vi(t.doc,n),setTimeout(function(){return r.input.focus()},20)):3==i&&(S?gl(t,e):vn(t)))}}function fl(e,t,r){if("char"==r)return new yi(t,t);if("word"==r)return e.findWordAt(t);if("line"==r)return new yi(ve(t.line,0),Se(e.doc,ve(t.line+1,0)));var n=r(e,t);return new yi(n.from,n.to)}function dl(e,t,r,n){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(t){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;n&&at(t);var l=e.display,s=l.lineDiv.getBoundingClientRect();if(o>s.bottom||!lt(e,r))return ct(t);o-=s.top-l.viewOffset;for(var a=0;a<e.options.gutters.length;++a){var u=l.gutters.childNodes[a];if(u&&u.getBoundingClientRect().right>=i)return nt(e,r,e,de(e.doc,o),e.options.gutters[a],t),ct(t)}}function pl(e,t){return dl(e,t,"gutterClick",!0)}function gl(e,t){xr(e.display,t)||function(e,t){if(!lt(e,"gutterContextMenu"))return!1;return dl(e,t,"gutterContextMenu",!1)}(e,t)||it(e,t,"contextmenu")||e.display.input.onContextMenu(t)}function vl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Rr(e)}cl.prototype.compare=function(e,t,r){return this.time+400>e&&0==me(t,this.pos)&&r==this.button};var ml={toString:function(){return"CodeMirror.Init"}},yl={},bl={};function wl(e){ci(e),Zn(e),Cn(e)}function xl(e,t,r){if(!t!=!(r&&r!=ml)){var n=e.display.dragFunctions,i=t?et:rt;i(e.display.scroller,"dragstart",n.start),i(e.display.scroller,"dragenter",n.enter),i(e.display.scroller,"dragover",n.over),i(e.display.scroller,"dragleave",n.leave),i(e.display.scroller,"drop",n.drop)}}function Cl(e){e.options.lineWrapping?(H(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(T(e.display.wrapper,"CodeMirror-wrap"),_e(e)),ln(e),Zn(e),Rr(e),setTimeout(function(){return En(e)},100)}function Sl(e,t){var r=this;if(!(this instanceof Sl))return new Sl(e,t);this.options=t=t?z(t):{},z(yl,t,!1),hi(t);var n=t.value;"string"==typeof n&&(n=new To(n,t.mode,null,t.lineSeparator,t.direction)),this.doc=n;var i=new Sl.inputStyles[t.inputStyle](this),o=this.display=new se(e,n,i);for(var u in o.wrapper.CodeMirror=this,ci(this),vl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Rn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new R,keySeq:null,specialChars:null},t.autofocus&&!m&&o.input.focus(),l&&s<11&&setTimeout(function(){return r.display.input.reset(!0)},20),function(e){var t=e.display;et(t.scroller,"mousedown",_n(e,hl)),et(t.scroller,"dblclick",l&&s<11?_n(e,function(t){if(!it(e,t)){var r=sn(e,t);if(r&&!pl(e,t)&&!xr(e.display,t)){at(t);var n=e.findWordAt(r);Vi(e.doc,n.anchor,n.head)}}}):function(t){return it(e,t)||at(t)});S||et(t.scroller,"contextmenu",function(t){return gl(e,t)});var r,n={end:0};function i(){t.activeTouch&&(r=setTimeout(function(){return t.activeTouch=null},1e3),(n=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var r=t.left-e.left,n=t.top-e.top;return r*r+n*n>400}et(t.scroller,"touchstart",function(i){if(!it(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!pl(e,i)){t.input.ensurePolled(),clearTimeout(r);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-n.end<=300?n:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}}),et(t.scroller,"touchmove",function(){t.activeTouch&&(t.activeTouch.moved=!0)}),et(t.scroller,"touchend",function(r){var n=t.activeTouch;if(n&&!xr(t,r)&&null!=n.left&&!n.moved&&new Date-n.start<300){var l,s=e.coordsChar(t.activeTouch,"page");l=!n.prev||o(n,n.prev)?new yi(s,s):!n.prev.prev||o(n,n.prev.prev)?e.findWordAt(s):new yi(ve(s.line,0),Se(e.doc,ve(s.line+1,0))),e.setSelection(l.anchor,l.head),e.focus(),at(r)}i()}),et(t.scroller,"touchcancel",i),et(t.scroller,"scroll",function(){t.scroller.clientHeight&&(An(e,t.scroller.scrollTop),Dn(e,t.scroller.scrollLeft,!0),nt(e,"scroll",e))}),et(t.scroller,"mousewheel",function(t){return vi(e,t)}),et(t.scroller,"DOMMouseScroll",function(t){return vi(e,t)}),et(t.wrapper,"scroll",function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0}),t.dragFunctions={enter:function(t){it(e,t)||ht(t)},over:function(t){it(e,t)||(!function(e,t){var r=sn(e,t);if(r){var n=document.createDocumentFragment();hn(e,r,n),e.display.dragCursor||(e.display.dragCursor=O("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),N(e.display.dragCursor,n)}}(e,t),ht(t))},start:function(t){return function(e,t){if(l&&(!e.state.draggingText||+new Date-Mo<100))ht(t);else if(!it(e,t)&&!xr(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!f)){var r=O("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h&&(r.width=r.height=1,e.display.wrapper.appendChild(r),r._top=r.offsetTop),t.dataTransfer.setDragImage(r,0,0),h&&r.parentNode.removeChild(r)}}(e,t)},drop:_n(e,No),leave:function(t){it(e,t)||Oo(e)}};var a=t.input.getField();et(a,"keyup",function(t){return ll.call(e,t)}),et(a,"keydown",_n(e,ol)),et(a,"keypress",_n(e,sl)),et(a,"focus",function(t){return mn(e,t)}),et(a,"blur",function(t){return yn(e,t)})}(this),Do(),Gn(this),this.curOp.forceUpdate=!0,Ai(this,n),t.autofocus&&!m||this.hasFocus()?setTimeout(E(mn,this),20):yn(this),bl)bl.hasOwnProperty(u)&&bl[u](r,t[u],ml);Sn(this),t.finishInit&&t.finishInit(this);for(var c=0;c<Ll.length;++c)Ll[c](r);Un(this),a&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}Sl.defaults=yl,Sl.optionHandlers=bl;var Ll=[];function kl(e,t,r,n){var i,o=e.doc;null==r&&(r="add"),"smart"==r&&(o.mode.indent?i=It(e,t).state:r="prev");var l=e.options.tabSize,s=ae(o,t),a=I(s.text,null,l);s.stateAfter&&(s.stateAfter=null);var u,c=s.text.match(/^\s*/)[0];if(n||/\S/.test(s.text)){if("smart"==r&&((u=o.mode.indent(i,s.text.slice(c.length),s.text))==U||u>150)){if(!n)return;r="prev"}}else u=0,r="not";"prev"==r?u=t>o.first?I(ae(o,t-1).text,null,l):0:"add"==r?u=a+e.options.indentUnit:"subtract"==r?u=a-e.options.indentUnit:"number"==typeof r&&(u=a+r),u=Math.max(0,u);var h="",f=0;if(e.options.indentWithTabs)for(var d=Math.floor(u/l);d;--d)f+=l,h+="\t";if(f<u&&(h+=_(u-f)),h!=c)return uo(o,h,ve(t,0),ve(t,c.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<c.length){var v=ve(t,c.length);ji(o,p,new yi(v,v));break}}}Sl.defineInitHook=function(e){return Ll.push(e)};var Tl=null;function Ml(e){Tl=e}function Nl(e,t,r,n,i){var o=e.doc;e.display.shift=!1,n||(n=o.sel);var l,s=e.state.pasteIncoming||"paste"==i,a=wt(t),u=null;if(s&&n.ranges.length>1)if(Tl&&Tl.text.join("\n")==t){if(n.ranges.length%Tl.text.length==0){u=[];for(var c=0;c<Tl.text.length;c++)u.push(o.splitLines(Tl.text[c]))}}else a.length==n.ranges.length&&e.options.pasteLinesPerSelection&&(u=$(a,function(e){return[e]}));for(var h=n.ranges.length-1;h>=0;h--){var f=n.ranges[h],d=f.from(),p=f.to();f.empty()&&(r&&r>0?d=ve(d.line,d.ch-r):e.state.overwrite&&!s?p=ve(p.line,Math.min(ae(o,p.line).text.length,p.ch+q(a).length)):Tl&&Tl.lineWise&&Tl.text.join("\n")==t&&(d=p=ve(d.line,0))),l=e.curOp.updateInput;var g={from:d,to:p,text:u?u[h%u.length]:a,origin:i||(s?"paste":e.state.cutIncoming?"cut":"+input")};io(e.doc,g),sr(e,"inputRead",e,g)}t&&!s&&Al(e,t),Tn(e),e.curOp.updateInput=l,e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=!1}function Ol(e,t){var r=e.clipboardData&&e.clipboardData.getData("Text");if(r)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Yn(t,function(){return Nl(t,r,0,null,"paste")}),!0}function Al(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var r=e.doc.sel,n=r.ranges.length-1;n>=0;n--){var i=r.ranges[n];if(!(i.head.ch>100||n&&r.ranges[n-1].head.line==i.head.line)){var o=e.getModeAt(i.head),l=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){l=kl(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(ae(e.doc,i.head.line).text.slice(0,i.head.ch))&&(l=kl(e,i.head.line,"smart"));l&&sr(e,"electricInput",e,i.head.line)}}}function Wl(e){for(var t=[],r=[],n=0;n<e.doc.sel.ranges.length;n++){var i=e.doc.sel.ranges[n].head.line,o={anchor:ve(i,0),head:ve(i+1,0)};r.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:r}}function Dl(e,t){e.setAttribute("autocorrect","off"),e.setAttribute("autocapitalize","off"),e.setAttribute("spellcheck",!!t)}function Hl(){var e=O("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=O("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return a?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),Dl(e),t}function Fl(e,t,r,n,i){var o=t,l=r,s=ae(e,t.line);function a(n){var o,l;if(null==(o=i?function(e,t,r,n){var i=Qe(t,e.doc.direction);if(!i)return _o(t,r,n);r.ch>=t.text.length?(r.ch=t.text.length,r.sticky="before"):r.ch<=0&&(r.ch=0,r.sticky="after");var o=$e(i,r.ch,r.sticky),l=i[o];if("ltr"==e.doc.direction&&l.level%2==0&&(n>0?l.to>r.ch:l.from<r.ch))return _o(t,r,n);var s,a=function(e,r){return Yo(t,e instanceof ve?e.ch:e,r)},u=function(r){return e.options.lineWrapping?(s=s||Wr(e,t),Zr(e,t,s,r)):{begin:0,end:t.text.length}},c=u("before"==r.sticky?a(r,-1):r.ch);if("rtl"==e.doc.direction||1==l.level){var h=1==l.level==n<0,f=a(r,h?1:-1);if(null!=f&&(h?f<=l.to&&f<=c.end:f>=l.from&&f>=c.begin)){var d=h?"before":"after";return new ve(r.line,f,d)}}var p=function(e,t,n){for(var o=function(e,t){return t?new ve(r.line,a(e,1),"before"):new ve(r.line,e,"after")};e>=0&&e<i.length;e+=t){var l=i[e],s=t>0==(1!=l.level),u=s?n.begin:a(n.end,-1);if(l.from<=u&&u<l.to)return o(u,s);if(u=s?l.from:a(l.to,-1),n.begin<=u&&u<n.end)return o(u,s)}},g=p(o+n,n,c);if(g)return g;var v=n>0?c.end:a(c.begin,-1);return null==v||n>0&&v==t.text.length||!(g=p(n>0?0:i.length-1,n,u(v)))?null:g}(e.cm,s,t,r):_o(s,t,r))){if(n||(l=t.line+r)<e.first||l>=e.first+e.size||(t=new ve(l,t.ch,t.sticky),!(s=ae(e,l))))return!1;t=qo(i,e.cm,s,t.line,r)}else t=o;return!0}if("char"==n)a();else if("column"==n)a(!0);else if("word"==n||"group"==n)for(var u=null,c="group"==n,h=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(r<0)||a(!f);f=!1){var d=s.text.charAt(t.ch)||"\n",p=te(d,h)?"w":c&&"\n"==d?"n":!c||/\s/.test(d)?null:"p";if(!c||f||p||(p="s"),u&&u!=p){r<0&&(r=1,a(),t.sticky="after");break}if(p&&(u=p),r>0&&!a(!f))break}var g=eo(e,t,o,l,!0);return ye(o,g)&&(g.hitSide=!0),g}function Pl(e,t,r,n){var i,o,l=e.doc,s=t.left;if("page"==n){var a=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(a-.5*en(e.display),3);i=(r>0?t.bottom:t.top)+r*u}else"line"==n&&(i=r>0?t.bottom+3:t.top-3);for(;(o=qr(e,s,i)).outside;){if(r<0?i<=0:i>=l.height){o.hitSide=!0;break}i+=5*r}return o}var El=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new R,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function zl(e,t){var r=Ar(e,t.line);if(!r||r.hidden)return null;var n=ae(e.doc,t.line),i=Nr(r,n,t.line),o=Qe(n,e.doc.direction),l="left";o&&(l=$e(o,t.ch)%2?"right":"left");var s=Pr(i.map,t.ch,l);return s.offset="right"==s.collapse?s.end:s.start,s}function Il(e,t){return t&&(e.bad=!0),e}function Rl(e,t,r){var n;if(t==e.display.lineDiv){if(!(n=e.display.lineDiv.childNodes[r]))return Il(e.clipPos(ve(e.display.viewTo-1)),!0);t=null,r=0}else for(n=t;;n=n.parentNode){if(!n||n==e.display.lineDiv)return null;if(n.parentNode&&n.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==n)return Bl(o,t,r)}}function Bl(e,t,r){var n=e.text.firstChild,i=!1;if(!t||!W(n,t))return Il(ve(fe(e.line),0),!0);if(t==n&&(i=!0,t=n.childNodes[r],r=0,!t)){var o=e.rest?q(e.rest):e.line;return Il(ve(fe(o),o.text.length),i)}var l=3==t.nodeType?t:null,s=t;for(l||1!=t.childNodes.length||3!=t.firstChild.nodeType||(l=t.firstChild,r&&(r=l.nodeValue.length));s.parentNode!=n;)s=s.parentNode;var a=e.measure,u=a.maps;function c(t,r,n){for(var i=-1;i<(u?u.length:0);i++)for(var o=i<0?a.map:u[i],l=0;l<o.length;l+=3){var s=o[l+2];if(s==t||s==r){var c=fe(i<0?e.line:e.rest[i]),h=o[l]+n;return(n<0||s!=t)&&(h=o[l+(n?1:0)]),ve(c,h)}}}var h=c(l,s,r);if(h)return Il(h,i);for(var f=s.nextSibling,d=l?l.nodeValue.length-r:0;f;f=f.nextSibling){if(h=c(f,f.firstChild,0))return Il(ve(h.line,h.ch-d),i);d+=f.textContent.length}for(var p=s.previousSibling,g=r;p;p=p.previousSibling){if(h=c(p,p.firstChild,-1))return Il(ve(h.line,h.ch+g),i);g+=p.textContent.length}}El.prototype.init=function(e){var t=this,r=this,n=r.cm,i=r.div=e.lineDiv;function o(e){if(!it(n,e)){if(n.somethingSelected())Ml({lineWise:!1,text:n.getSelections()}),"cut"==e.type&&n.replaceSelection("",null,"cut");else{if(!n.options.lineWiseCopyCut)return;var t=Wl(n);Ml({lineWise:!0,text:t.text}),"cut"==e.type&&n.operation(function(){n.setSelections(t.ranges,0,V),n.replaceSelection("",null,"cut")})}if(e.clipboardData){e.clipboardData.clearData();var o=Tl.text.join("\n");if(e.clipboardData.setData("Text",o),e.clipboardData.getData("Text")==o)return void e.preventDefault()}var l=Hl(),s=l.firstChild;n.display.lineSpace.insertBefore(l,n.display.lineSpace.firstChild),s.value=Tl.text.join("\n");var a=document.activeElement;P(s),setTimeout(function(){n.display.lineSpace.removeChild(l),a.focus(),a==i&&r.showPrimarySelection()},50)}}Dl(i,n.options.spellcheck),et(i,"paste",function(e){it(n,e)||Ol(e,n)||s<=11&&setTimeout(_n(n,function(){return t.updateFromDOM()}),20)}),et(i,"compositionstart",function(e){t.composing={data:e.data,done:!1}}),et(i,"compositionupdate",function(e){t.composing||(t.composing={data:e.data,done:!1})}),et(i,"compositionend",function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)}),et(i,"touchstart",function(){return r.forceCompositionEnd()}),et(i,"input",function(){t.composing||t.readFromDOMSoon()}),et(i,"copy",o),et(i,"cut",o)},El.prototype.prepareSelection=function(){var e=cn(this.cm,!1);return e.focus=this.cm.state.focused,e},El.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},El.prototype.showPrimarySelection=function(){var e=window.getSelection(),t=this.cm,n=t.doc.sel.primary(),i=n.from(),o=n.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var l=Rl(t,e.anchorNode,e.anchorOffset),s=Rl(t,e.focusNode,e.focusOffset);if(!l||l.bad||!s||s.bad||0!=me(xe(l,s),i)||0!=me(we(l,s),o)){var a=t.display.view,u=i.line>=t.display.viewFrom&&zl(t,i)||{node:a[0].measure.map[2],offset:0},c=o.line<t.display.viewTo&&zl(t,o);if(!c){var h=a[a.length-1].measure,f=h.maps?h.maps[h.maps.length-1]:h.map;c={node:f[f.length-1],offset:f[f.length-2]-f[f.length-3]}}if(u&&c){var d,p=e.rangeCount&&e.getRangeAt(0);try{d=k(u.node,u.offset,c.offset,c.node)}catch(e){}d&&(!r&&t.state.focused?(e.collapse(u.node,u.offset),d.collapsed||(e.removeAllRanges(),e.addRange(d))):(e.removeAllRanges(),e.addRange(d)),p&&null==e.anchorNode?e.addRange(p):r&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},El.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},El.prototype.showMultipleSelections=function(e){N(this.cm.display.cursorDiv,e.cursors),N(this.cm.display.selectionDiv,e.selection)},El.prototype.rememberSelection=function(){var e=window.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},El.prototype.selectionInEditor=function(){var e=window.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return W(this.div,t)},El.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()||this.showSelection(this.prepareSelection(),!0),this.div.focus())},El.prototype.blur=function(){this.div.blur()},El.prototype.getField=function(){return this.div},El.prototype.supportsTouch=function(){return!0},El.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Yn(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))})},El.prototype.selectionChanged=function(){var e=window.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},El.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=window.getSelection(),t=this.cm;if(v&&c&&this.cm.options.gutters.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var r=Rl(t,e.anchorNode,e.anchorOffset),n=Rl(t,e.focusNode,e.focusOffset);r&&n&&Yn(t,function(){_i(t.doc,wi(r,n),V),(r.bad||n.bad)&&(t.curOp.selectionChanged=!0)})}}},El.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,r,n=this.cm,i=n.display,o=n.doc.sel.primary(),l=o.from(),s=o.to();if(0==l.ch&&l.line>n.firstLine()&&(l=ve(l.line-1,ae(n.doc,l.line-1).length)),s.ch==ae(n.doc,s.line).text.length&&s.line<n.lastLine()&&(s=ve(s.line+1,0)),l.line<i.viewFrom||s.line>i.viewTo-1)return!1;l.line==i.viewFrom||0==(e=an(n,l.line))?(t=fe(i.view[0].line),r=i.view[0].node):(t=fe(i.view[e].line),r=i.view[e-1].node.nextSibling);var a,u,c=an(n,s.line);if(c==i.view.length-1?(a=i.viewTo-1,u=i.lineDiv.lastChild):(a=fe(i.view[c+1].line)-1,u=i.view[c+1].node.previousSibling),!r)return!1;for(var h=n.doc.splitLines(function(e,t,r,n,i){var o="",l=!1,s=e.doc.lineSeparator();function a(){l&&(o+=s,l=!1)}function u(e){e&&(a(),o+=e)}function c(t){if(1==t.nodeType){var r=t.getAttribute("cm-text");if(null!=r)return void u(r||t.textContent.replace(/\u200b/g,""));var o,h=t.getAttribute("cm-marker");if(h){var f=e.findMarks(ve(n,0),ve(i+1,0),(g=+h,function(e){return e.id==g}));return void(f.length&&(o=f[0].find(0))&&u(ue(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var d=/^(pre|div|p)$/i.test(t.nodeName);d&&a();for(var p=0;p<t.childNodes.length;p++)c(t.childNodes[p]);d&&(l=!0)}else 3==t.nodeType&&u(t.nodeValue);var g}for(;c(t),t!=r;)t=t.nextSibling;return o}(n,r,u,t,a)),f=ue(n.doc,ve(t,0),ve(a,ae(n.doc,a).text.length));h.length>1&&f.length>1;)if(q(h)==q(f))h.pop(),f.pop(),a--;else{if(h[0]!=f[0])break;h.shift(),f.shift(),t++}for(var d=0,p=0,g=h[0],v=f[0],m=Math.min(g.length,v.length);d<m&&g.charCodeAt(d)==v.charCodeAt(d);)++d;for(var y=q(h),b=q(f),w=Math.min(y.length-(1==h.length?d:0),b.length-(1==f.length?d:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==h.length&&1==f.length&&t==l.line)for(;d&&d>l.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)d--,p++;h[h.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),h[0]=h[0].slice(d).replace(/\u200b+$/,"");var x=ve(t,d),C=ve(a,f.length?q(f).length-p:0);return h.length>1||h[0]||me(x,C)?(uo(n.doc,h,x,C,"+input"),!0):void 0},El.prototype.ensurePolled=function(){this.forceCompositionEnd()},El.prototype.reset=function(){this.forceCompositionEnd()},El.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},El.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()},80))},El.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Yn(this.cm,function(){return Zn(e.cm)})},El.prototype.setUneditable=function(e){e.contentEditable="false"},El.prototype.onKeyPress=function(e){0!=e.charCode&&(e.preventDefault(),this.cm.isReadOnly()||_n(this.cm,Nl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},El.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},El.prototype.onContextMenu=function(){},El.prototype.resetPosition=function(){},El.prototype.needsContentAttribute=!0;var Gl=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new R,this.hasSelection=!1,this.composing=null};Gl.prototype.init=function(e){var t=this,r=this,n=this.cm,i=this.wrapper=Hl(),o=this.textarea=i.firstChild;function a(e){if(!it(n,e)){if(n.somethingSelected())Ml({lineWise:!1,text:n.getSelections()});else{if(!n.options.lineWiseCopyCut)return;var t=Wl(n);Ml({lineWise:!0,text:t.text}),"cut"==e.type?n.setSelections(t.ranges,null,V):(r.prevInput="",o.value=t.text.join("\n"),P(o))}"cut"==e.type&&(n.state.cutIncoming=!0)}}e.wrapper.insertBefore(i,e.wrapper.firstChild),g&&(o.style.width="0px"),et(o,"input",function(){l&&s>=9&&t.hasSelection&&(t.hasSelection=null),r.poll()}),et(o,"paste",function(e){it(n,e)||Ol(e,n)||(n.state.pasteIncoming=!0,r.fastPoll())}),et(o,"cut",a),et(o,"copy",a),et(e.scroller,"paste",function(t){xr(e,t)||it(n,t)||(n.state.pasteIncoming=!0,r.focus())}),et(e.lineSpace,"selectstart",function(t){xr(e,t)||at(t)}),et(o,"compositionstart",function(){var e=n.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:e,range:n.markText(e,n.getCursor("to"),{className:"CodeMirror-composing"})}}),et(o,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},Gl.prototype.prepareSelection=function(){var e=this.cm,t=e.display,r=e.doc,n=cn(e);if(e.options.moveInputWithCursor){var i=Xr(e,r.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),l=t.lineDiv.getBoundingClientRect();n.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+l.top-o.top)),n.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+l.left-o.left))}return n},Gl.prototype.showSelection=function(e){var t=this.cm.display;N(t.cursorDiv,e.cursors),N(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Gl.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var r=t.getSelection();this.textarea.value=r,t.state.focused&&P(this.textarea),l&&s>=9&&(this.hasSelection=r)}else e||(this.prevInput=this.textarea.value="",l&&s>=9&&(this.hasSelection=null))}},Gl.prototype.getField=function(){return this.textarea},Gl.prototype.supportsTouch=function(){return!1},Gl.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},Gl.prototype.blur=function(){this.textarea.blur()},Gl.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Gl.prototype.receivedFocus=function(){this.slowPoll()},Gl.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Gl.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,function r(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,r))})},Gl.prototype.poll=function(){var e=this,t=this.cm,r=this.textarea,n=this.prevInput;if(this.contextMenuPending||!t.state.focused||xt(r)&&!n&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=r.value;if(i==n&&!t.somethingSelected())return!1;if(l&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||n||(n="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var a=0,u=Math.min(n.length,i.length);a<u&&n.charCodeAt(a)==i.charCodeAt(a);)++a;return Yn(t,function(){Nl(t,i.slice(a),n.length-a,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?r.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Gl.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Gl.prototype.onKeyPress=function(){l&&s>=9&&(this.hasSelection=null),this.fastPoll()},Gl.prototype.onContextMenu=function(e){var t=this,r=t.cm,n=r.display,i=t.textarea,o=sn(r,e),u=n.scroller.scrollTop;if(o&&!h){r.options.resetSelectionOnContextMenu&&-1==r.doc.sel.contains(o)&&_n(r,_i)(r.doc,wi(o),V);var c=i.style.cssText,f=t.wrapper.style.cssText;t.wrapper.style.cssText="position: absolute";var d,p=t.wrapper.getBoundingClientRect();if(i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n z-index: 1000; background: "+(l?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",a&&(d=window.scrollY),n.input.focus(),a&&window.scrollTo(null,d),n.input.reset(),r.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=!0,n.selForContextMenu=r.doc.sel,clearTimeout(n.detectingSelectAll),l&&s>=9&&v(),S){ht(e);var g=function(){rt(window,"mouseup",g),setTimeout(m,20)};et(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=r.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,n.selForContextMenu=r.doc.sel}}function m(){if(t.contextMenuPending=!1,t.wrapper.style.cssText=f,i.style.cssText=c,l&&s<9&&n.scrollbars.setScrollTop(n.scroller.scrollTop=u),null!=i.selectionStart){(!l||l&&s<9)&&v();var e=0,o=function(){n.selForContextMenu==r.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?_n(r,ro)(r):e++<10?n.detectingSelectAll=setTimeout(o,500):(n.selForContextMenu=null,n.input.reset())};n.detectingSelectAll=setTimeout(o,200)}}},Gl.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Gl.prototype.setUneditable=function(){},Gl.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function r(r,n,i,o){e.defaults[r]=n,i&&(t[r]=o?function(e,t,r){r!=ml&&i(e,t,r)}:i)}e.defineOption=r,e.Init=ml,r("value","",function(e,t){return e.setValue(t)},!0),r("mode",null,function(e,t){e.doc.modeOption=t,ki(e)},!0),r("indentUnit",2,ki,!0),r("indentWithTabs",!1),r("smartIndent",!0),r("tabSize",4,function(e){Ti(e),Rr(e),Zn(e)},!0),r("lineSeparator",null,function(e,t){if(e.doc.lineSep=t,t){var r=[],n=e.doc.first;e.doc.iter(function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,r.push(ve(n,o))}n++});for(var i=r.length-1;i>=0;i--)uo(e.doc,t,r[i],ve(r[i].line,r[i].ch+t.length))}}),r("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff]/g,function(e,t,r){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),r!=ml&&e.refresh()}),r("specialCharPlaceholder",Qt,function(e){return e.refresh()},!0),r("electricChars",!0),r("inputStyle",m?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),r("spellcheck",!1,function(e,t){return e.getInputField().spellcheck=t},!0),r("rtlMoveVisually",!w),r("wholeLineUpdateBefore",!0),r("theme","default",function(e){vl(e),wl(e)},!0),r("keyMap","default",function(e,t,r){var n=jo(t),i=r!=ml&&jo(r);i&&i.detach&&i.detach(e,n),n.attach&&n.attach(e,i||null)}),r("extraKeys",null),r("configureMouse",null),r("lineWrapping",!1,Cl,!0),r("gutters",[],function(e){hi(e.options),wl(e)},!0),r("fixedGutter",!0,function(e,t){e.display.gutters.style.left=t?nn(e.display)+"px":"0",e.refresh()},!0),r("coverGutterNextToScrollbar",!1,function(e){return En(e)},!0),r("scrollbarStyle","native",function(e){Rn(e),En(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)},!0),r("lineNumbers",!1,function(e){hi(e.options),wl(e)},!0),r("firstLineNumber",1,wl,!0),r("lineNumberFormatter",function(e){return e},wl,!0),r("showCursorWhenSelecting",!1,un,!0),r("resetSelectionOnContextMenu",!0),r("lineWiseCopyCut",!0),r("pasteLinesPerSelection",!0),r("readOnly",!1,function(e,t){"nocursor"==t&&(yn(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)}),r("disableInput",!1,function(e,t){t||e.display.input.reset()},!0),r("dragDrop",!0,xl),r("allowDropFileTypes",null),r("cursorBlinkRate",530),r("cursorScrollMargin",0),r("cursorHeight",1,un,!0),r("singleCursorHeightPerLine",!0,un,!0),r("workTime",100),r("workDelay",100),r("flattenSpans",!0,Ti,!0),r("addModeClass",!1,Ti,!0),r("pollInterval",100),r("undoDepth",200,function(e,t){return e.doc.history.undoDepth=t}),r("historyEventDelay",1250),r("viewportMargin",10,function(e){return e.refresh()},!0),r("maxHighlightLength",1e4,Ti,!0),r("moveInputWithCursor",!0,function(e,t){t||e.display.input.resetPosition()}),r("tabindex",null,function(e,t){return e.display.input.getField().tabIndex=t||""}),r("autofocus",null),r("direction","ltr",function(e,t){return e.doc.setDirection(t)},!0)}(Sl),function(e){var t=e.optionHandlers,r=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,r){var n=this.options,i=n[e];n[e]==r&&"mode"!=e||(n[e]=r,t.hasOwnProperty(e)&&_n(this,t[e])(this,r,i),nt(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](jo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,r=0;r<t.length;++r)if(t[r]==e||t[r].name==e)return t.splice(r,1),!0},addOverlay:qn(function(t,r){var n=t.token?t:e.getMode(this.options,t);if(n.startState)throw new Error("Overlays may not be stateful.");!function(e,t,r){for(var n=0,i=r(t);n<e.length&&r(e[n])<=i;)n++;e.splice(n,0,t)}(this.state.overlays,{mode:n,modeSpec:t,opaque:r&&r.opaque,priority:r&&r.priority||0},function(e){return e.priority}),this.state.modeGen++,Zn(this)}),removeOverlay:qn(function(e){for(var t=this.state.overlays,r=0;r<t.length;++r){var n=t[r].modeSpec;if(n==e||"string"==typeof e&&n.name==e)return t.splice(r,1),this.state.modeGen++,void Zn(this)}}),indentLine:qn(function(e,t,r){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),pe(this.doc,e)&&kl(this,e,t,r)}),indentSelection:qn(function(e){for(var t=this.doc.sel.ranges,r=-1,n=0;n<t.length;n++){var i=t[n];if(i.empty())i.head.line>r&&(kl(this,i.head.line,e,!0),r=i.head.line,n==this.doc.sel.primIndex&&Tn(this));else{var o=i.from(),l=i.to(),s=Math.max(r,o.line);r=Math.min(this.lastLine(),l.line-(l.ch?0:1))+1;for(var a=s;a<r;++a)kl(this,a,e);var u=this.doc.sel.ranges;0==o.ch&&t.length==u.length&&u[n].from().ch>0&&ji(this.doc,n,new yi(o,u[n].to()),V)}}}),getTokenAt:function(e,t){return Vt(this,e,t)},getLineTokens:function(e,t){return Vt(this,ve(e),t,!0)},getTokenTypeAt:function(e){e=Se(this.doc,e);var t,r=zt(this,ae(this.doc,e.line)),n=0,i=(r.length-1)/2,o=e.ch;if(0==o)t=r[2];else for(;;){var l=n+i>>1;if((l?r[2*l-1]:0)>=o)i=l;else{if(!(r[2*l+1]<o)){t=r[2*l+2];break}n=l+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var r=this.doc.mode;return r.innerMode?e.innerMode(r,this.getTokenAt(t).state).mode:r},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var n=[];if(!r.hasOwnProperty(t))return n;var i=r[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&n.push(i[o[t]]);else if(o[t])for(var l=0;l<o[t].length;l++){var s=i[o[t][l]];s&&n.push(s)}else o.helperType&&i[o.helperType]?n.push(i[o.helperType]):i[o.name]&&n.push(i[o.name]);for(var a=0;a<i._global.length;a++){var u=i._global[a];u.pred(o,this)&&-1==B(n,u.val)&&n.push(u.val)}return n},getStateAfter:function(e,t){var r=this.doc;return It(this,(e=Ce(r,null==e?r.first+r.size-1:e))+1,t).state},cursorCoords:function(e,t){var r=this.doc.sel.primary();return Xr(this,null==e?r.head:"object"==typeof e?Se(this.doc,e):e?r.from():r.to(),t||"page")},charCoords:function(e,t){return jr(this,Se(this.doc,e),t||"page")},coordsChar:function(e,t){return qr(this,(e=Kr(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=Kr(this,{top:e,left:0},t||"page").top,de(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,r){var n,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),n=ae(this.doc,e)}else n=e;return Vr(this,n,{top:0,left:0},t||"page",r||i).top+(i?this.doc.height-Xe(n):0)},defaultTextHeight:function(){return en(this.display)},defaultCharWidth:function(){return tn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,r,n,i){var o,l,s,a=this.display,u=(e=Xr(this,Se(this.doc,e))).bottom,c=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),a.sizer.appendChild(t),"over"==n)u=e.top;else if("above"==n||"near"==n){var h=Math.max(a.wrapper.clientHeight,this.doc.height),f=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==n||e.bottom+t.offsetHeight>h)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=h&&(u=e.bottom),c+t.offsetWidth>f&&(c=f-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==i?(c=a.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?c=0:"middle"==i&&(c=(a.sizer.clientWidth-t.offsetWidth)/2),t.style.left=c+"px"),r&&(o=this,l={left:c,top:u,right:c+t.offsetWidth,bottom:u+t.offsetHeight},null!=(s=Ln(o,l)).scrollTop&&An(o,s.scrollTop),null!=s.scrollLeft&&Dn(o,s.scrollLeft))},triggerOnKeyDown:qn(ol),triggerOnKeyPress:qn(sl),triggerOnKeyUp:ll,triggerOnMouseDown:qn(hl),execCommand:function(e){if($o.hasOwnProperty(e))return $o[e].call(null,this)},triggerElectric:qn(function(e){Al(this,e)}),findPosH:function(e,t,r,n){var i=1;t<0&&(i=-1,t=-t);for(var o=Se(this.doc,e),l=0;l<t&&!(o=Fl(this.doc,o,i,r,n)).hitSide;++l);return o},moveH:qn(function(e,t){var r=this;this.extendSelectionsBy(function(n){return r.display.shift||r.doc.extend||n.empty()?Fl(r.doc,n.head,e,t,r.options.rtlMoveVisually):e<0?n.from():n.to()},j)}),deleteH:qn(function(e,t){var r=this.doc.sel,n=this.doc;r.somethingSelected()?n.replaceSelection("",null,"+delete"):Xo(this,function(r){var i=Fl(n,r.head,e,t,!1);return e<0?{from:i,to:r.head}:{from:r.head,to:i}})}),findPosV:function(e,t,r,n){var i=1,o=n;t<0&&(i=-1,t=-t);for(var l=Se(this.doc,e),s=0;s<t;++s){var a=Xr(this,l,"div");if(null==o?o=a.left:a.left=o,(l=Pl(this,a,i,r)).hitSide)break}return l},moveV:qn(function(e,t){var r=this,n=this.doc,i=[],o=!this.display.shift&&!n.extend&&n.sel.somethingSelected();if(n.extendSelectionsBy(function(l){if(o)return e<0?l.from():l.to();var s=Xr(r,l.head,"div");null!=l.goalColumn&&(s.left=l.goalColumn),i.push(s.left);var a=Pl(r,s,e,t);return"page"==t&&l==n.sel.primary()&&kn(r,jr(r,a,"div").top-s.top),a},j),i.length)for(var l=0;l<n.sel.ranges.length;l++)n.sel.ranges[l].goalColumn=i[l]}),findWordAt:function(e){var t=ae(this.doc,e.line).text,r=e.ch,n=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&n!=t.length||!r?++n:--r;for(var o=t.charAt(r),l=te(o,i)?function(e){return te(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};r>0&&l(t.charAt(r-1));)--r;for(;n<t.length&&l(t.charAt(n));)++n}return new yi(ve(e.line,r),ve(e.line,n))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?H(this.display.cursorDiv,"CodeMirror-overwrite"):T(this.display.cursorDiv,"CodeMirror-overwrite"),nt(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==D()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:qn(function(e,t){Mn(this,e,t)}),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-kr(this)-this.display.barHeight,width:e.scrollWidth-kr(this)-this.display.barWidth,clientHeight:Mr(this),clientWidth:Tr(this)}},scrollIntoView:qn(function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ve(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Nn(e),e.curOp.scrollToPos=t}(this,e):On(this,e.from,e.to,e.margin)}),setSize:qn(function(e,t){var r=this,n=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=n(e)),null!=t&&(this.display.wrapper.style.height=n(t)),this.options.lineWrapping&&Ir(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Qn(r,i,"widget");break}++i}),this.curOp.forceUpdate=!0,nt(this,"refresh",this)}),operation:function(e){return Yn(this,e)},startOperation:function(){return Gn(this)},endOperation:function(){return Un(this)},refresh:qn(function(){var e=this.display.cachedTextHeight;Zn(this),this.curOp.forceUpdate=!0,Rr(this),Mn(this,this.doc.scrollLeft,this.doc.scrollTop),ai(this),(null==e||Math.abs(e-en(this.display))>.5)&&ln(this),nt(this,"refresh",this)}),swapDoc:qn(function(e){var t=this.doc;return t.cm=null,Ai(this,e),Rr(this),this.display.input.reset(),Mn(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,sr(this,"swapDoc",this,t),t}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},st(e),e.registerHelper=function(t,n,i){r.hasOwnProperty(t)||(r[t]=e[t]={_global:[]}),r[t][n]=i},e.registerGlobalHelper=function(t,n,i,o){e.registerHelper(t,n,o),r[t]._global.push({pred:i,val:o})}}(Sl);var Ul="iter insert remove copy getEditor constructor".split(" ");for(var Vl in To.prototype)To.prototype.hasOwnProperty(Vl)&&B(Ul,Vl)<0&&(Sl.prototype[Vl]=function(e){return function(){return e.apply(this.doc,arguments)}}(To.prototype[Vl]));return st(To),Sl.inputStyles={textarea:Gl,contenteditable:El},Sl.defineMode=function(e){Sl.defaults.mode||"null"==e||(Sl.defaults.mode=e),function(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Lt[e]=t}.apply(this,arguments)},Sl.defineMIME=function(e,t){kt[e]=t},Sl.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),Sl.defineMIME("text/plain","null"),Sl.defineExtension=function(e,t){Sl.prototype[e]=t},Sl.defineDocExtension=function(e,t){To.prototype[e]=t},Sl.fromTextArea=function(e,t){if((t=t?z(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var r=D();t.autofocus=r==e||null!=e.getAttribute("autofocus")&&r==document.body}function n(){e.value=s.getValue()}var i;if(e.form&&(et(e.form,"submit",n),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var l=o.submit=function(){n(),o.submit=i,o.submit(),o.submit=l}}catch(e){}}t.finishInit=function(t){t.save=n,t.getTextArea=function(){return e},t.toTextArea=function(){t.toTextArea=isNaN,n(),e.parentNode.removeChild(t.getWrapperElement()),e.style.display="",e.form&&(rt(e.form,"submit",n),"function"==typeof e.form.submit&&(e.form.submit=i))}},e.style.display="none";var s=Sl(function(t){return e.parentNode.insertBefore(t,e.nextSibling)},t);return s},function(e){e.off=rt,e.on=et,e.wheelEventPixels=gi,e.Doc=To,e.splitLines=wt,e.countColumn=I,e.findColumn=X,e.isWordChar=ee,e.Pass=U,e.signal=nt,e.Line=Xt,e.changeEnd=xi,e.scrollbarModel=In,e.Pos=ve,e.cmpPos=me,e.modes=Lt,e.mimeModes=kt,e.resolveMode=Tt,e.getMode=Mt,e.modeExtensions=Nt,e.extendMode=Ot,e.copyState=At,e.startState=Dt,e.innerMode=Wt,e.commands=$o,e.keyMap=Io,e.keyName=Ko,e.isModifierKey=Uo,e.lookupKey=Go,e.normalizeKeyMap=Bo,e.StringStream=Ht,e.SharedTextMarker=Co,e.TextMarker=wo,e.LineWidget=mo,e.e_preventDefault=at,e.e_stopPropagation=ut,e.e_stop=ht,e.addClass=H,e.contains=W,e.rmClass=T,e.keyNames=Fo}(Sl),Sl.version="5.32.0",Sl}); (function(e){if(typeof exports=="object"&&typeof module=="object")e(require("../../lib/codemirror"));else if(typeof define=="function"&&define.amd)define(["../../lib/codemirror"],e);else e(CodeMirror)})(function(e){"use strict";e.defineMode("smalltalk",function(e){var s=/[+\-\/\\*~<>=@%|&?!.,:;^]/,u=/true|false|nil|self|super|thisContext/,t=function(e,t){this.next=e;this.parent=t},n=function(e,t,n){this.name=e;this.context=t;this.eos=n},l=function(){this.context=new t(i,null);this.expectVariable=!0;this.indentation=0;this.userIndentationDelta=0};l.prototype.userIndent=function(t){this.userIndentationDelta=t>0?(t/e.indentUnit-this.indentation):0};var i=function(e,l,d){var i=new n(null,l,!1),c=e.next();if(c==="\""){i=a(e,new t(a,l))} else if(c==="'"){i=r(e,new t(r,l))} @@ -1178,9 +1177,9 @@ else{};return url}}; else{let url='./api/';this.setLoadStatus(!0);url+='';data.output='json';if(e==modes.closeAfterSubmit)this.close();let form=this;$.ajax({'type':'POST',url:url,data:data,success:function(t,s,o){form.setLoadStatus(!1);$(status).remove();form.doResponse(t,s,form.element,function(){if(e==modes.closeAfterSuccess){form.close();$(form.element).closest('div.panel').find('div.header ul.views li.action.active').removeClass('dirty')};let afterSuccess=$(form.element).data('afterSuccess');let async=$(form.element).data('async');if(afterSuccess){if(afterSuccess=='reloadAll'){Openrat.Workbench.reloadAll()}} else{if(async);else Openrat.Workbench.reloadViews()}})},error:function(e,t,s){form.setLoadStatus(!1);$(status).remove();try{let error=jQuery.parseJSON(e.responseText);Openrat.Workbench.notify('',0,'','error',error.error,[error.description])}catch(o){let msg=e.responseText;Openrat.Workbench.notify('',0,'','error','Server Error',[msg])}}});$(form.element).fadeIn()}};this.doResponse=function(e,t,s,onSuccess=$.noop){if(t!='success'){alert('Server error: '+t);return};let form=this;$.each(e['notices'],function(t,e){let notifyBrowser=$(s).data('async');Openrat.Workbench.notify(e.type,e.id,e.name,e.status,e.text,e.log,notifyBrowser);if(e.status=='ok'){onSuccess();Openrat.Workbench.dataChangedHandler.fire()} else{}});$.each(e['errors'],function(e,t){$('.or-input[name='+t+']').addClass('error').parent().addClass('error').parents('fieldset').removeClass('closed').addClass('show').addClass('open')})}}; -;Openrat.Workbench=new function(){'use strict';this.state={};this.popupWindow=null;this.initialize=function(){this.initializePingTimer();this.initializeDirtyWarning();this.initializeState();this.openModalDialog()};this.initializeDirtyWarning=function(){window.addEventListener('beforeunload',function(t){if($('.or-view--is-dirty').length>0){t.preventDefault();return'Unsaved content will be lost.'} +;Openrat.Workbench=new function(){'use strict';this.state={};this.popupWindow=null;this.initialize=function(){this.initializePingTimer();this.initializeDirtyWarning();this.initializeState();this.openModalDialog();Openrat.Workbench.registerOpenClose($('.or-collapsible'))};this.initializeDirtyWarning=function(){window.addEventListener('beforeunload',function(t){if($('.or-view--is-dirty').length>0){t.preventDefault();return'Unsaved content will be lost.'} else{return undefined}})};this.openModalDialog=function(){if($('#dialog').data('action')){this.startDialog('',$('#dialog').data('action'),$('#dialog').data('action'),0,{})}};this.initializeState=function(){let parts=window.location.hash.split('/');let state={action:'index',id:0};if(parts.length>=2)state.action=parts[1].toLowerCase();if(parts.length>=3)state.id=parts[2].replace(/[^0-9_]/gim,'');Openrat.Workbench.state=state;$('#editor').attr('data-action',state.action);$('#editor').attr('data-id',state.id);$('#editor').attr('data-extra','{}');Openrat.Navigator.toActualHistory(state)};this.initializePingTimer=function(){let ping=function(){let pingPromise=$.getJSON(Openrat.View.createUrl('profile','ping',0,{},!0));pingPromise.fail(function(){console.warn('The server ping has failed.');if($('.view.dirty').length>0){window.alert('The server session is lost, please save your data.')} -else{}})};let timeoutMinutes=5;window.setInterval(ping,timeoutMinutes*60*1000)};this.loadNewActionState=function(t){Openrat.Workbench.state=t;Openrat.Workbench.loadNewAction(t.action,t.id,t.data);this.afterNewActionHandler.fire()};this.afterNewActionHandler=$.Callbacks();this.loadNewAction=function(t,e,i){$('#editor').attr('data-action',t);$('#editor').attr('data-id',e);$('#editor').attr('data-extra',JSON.stringify(i));this.reloadViews()};this.reloadViews=function(){$('#workbench section.closed .or-act-view-loader').empty();Openrat.Workbench.loadViews($('#workbench section.open .or-act-view-loader'))};this.reloadAll=function(){Openrat.Workbench.loadViews($('.or-act-view-loader,.or-act-view-static').empty());this.loadUserStyle();this.loadLanguage();this.loadUISettings()};this.loadUserStyle=function(){let url=Openrat.View.createUrl('profile','userinfo',0,{},!0);$.getJSON(url,function(t){let style=t.output['style'];Openrat.Workbench.setUserStyle(style);let color=t.output['theme-color'];Openrat.Workbench.setThemeColor(color)})};this.settings={};this.language={};this.loadLanguage=function(){let url=Openrat.View.createUrl('profile','language',0,{},!0);$.getJSON(url,function(t){Openrat.Workbench.language=t.output.language})};this.loadUISettings=function(){let url=Openrat.View.createUrl('profile','uisettings',0,{},!0);$.getJSON(url,function(t){Openrat.Workbench.settings=t.output.settings.settings})};this.loadViews=function(t){t.each(function(t){let $targetDOMElement=$(this);Openrat.Workbench.loadNewActionIntoElement($targetDOMElement)})};this.loadNewActionIntoElement=function(t){let action;if(t.is('.or-act-view-static'))action=t.attr('data-action');else action=$('#editor').attr('data-action');let id=$('#editor').attr('data-id');let params=$('#editor').attr('data-extra');let method=t.data('method');let view=new Openrat.View(action,method,id,params);view.start(t)};this.setUserStyle=function(t){var e=$('html'),i=e.attr('class').split(/\s+/);$.each(i,function(t,i){if(i.startsWith('or-theme-')){e.removeClass(i.substring(3))}});e.addClass('theme-'+t.toLowerCase())};this.setThemeColor=function(t){$('#theme-color').attr('content',t)};let notifyBrowser=function(t){if(!('Notification' in window)){return} +else{}})};let timeoutMinutes=5;window.setInterval(ping,timeoutMinutes*60*1000)};this.loadNewActionState=function(t){Openrat.Workbench.state=t;Openrat.Workbench.loadNewAction(t.action,t.id,t.data);this.afterNewActionHandler.fire()};this.afterNewActionHandler=$.Callbacks();this.loadNewAction=function(t,e,i){$('#editor').attr('data-action',t);$('#editor').attr('data-id',e);$('#editor').attr('data-extra',JSON.stringify(i));this.reloadViews()};this.reloadViews=function(){$('#workbench section.closed .or-act-view-loader').empty();Openrat.Workbench.loadViews($('.or-workbench .or-act-view-loader'))};this.reloadAll=function(){Openrat.Workbench.loadViews($('.or-act-view-loader,.or-act-view-static').empty());this.loadUserStyle();this.loadLanguage();this.loadUISettings()};this.loadUserStyle=function(){let url=Openrat.View.createUrl('profile','userinfo',0,{},!0);$.getJSON(url,function(t){let style=t.output['style'];Openrat.Workbench.setUserStyle(style);let color=t.output['theme-color'];Openrat.Workbench.setThemeColor(color)})};this.settings={};this.language={};this.loadLanguage=function(){let url=Openrat.View.createUrl('profile','language',0,{},!0);$.getJSON(url,function(t){Openrat.Workbench.language=t.output.language})};this.loadUISettings=function(){let url=Openrat.View.createUrl('profile','uisettings',0,{},!0);$.getJSON(url,function(t){Openrat.Workbench.settings=t.output.settings.settings})};this.loadViews=function(t){t.each(function(t){let $targetDOMElement=$(this);Openrat.Workbench.loadNewActionIntoElement($targetDOMElement)})};this.loadNewActionIntoElement=function(t){let action;if(t.is('.or-act-view-static'))action=t.attr('data-action');else action=$('#editor').attr('data-action');let id=$('#editor').attr('data-id');let params=$('#editor').attr('data-extra');let method=t.data('method');let view=new Openrat.View(action,method,id,params);view.start(t)};this.setUserStyle=function(t){var e=$('html'),i=e.attr('class').split(/\s+/);$.each(i,function(t,i){if(i.startsWith('or-theme-')){e.removeClass(i.substring(3))}});e.addClass('theme-'+t.toLowerCase())};this.setThemeColor=function(t){$('#theme-color').attr('content',t)};let notifyBrowser=function(t){if(!('Notification' in window)){return} else if(Notification.permission==='granted'){let notification=new Notification(t)} else if(Notification.permission!=='denied'){Notification.requestPermission(function(e){if(e==='granted'){let notification=new Notification(t)}})}};this.notify=function(e,i,a,o,n,log=[],notifyTheBrowser=!1){if(notifyTheBrowser)notifyBrowser(n);let notice=$('<div class="or-notice or-notice--'+o+'"></div>');let toolbar=$('<div class="or-notice-toolbar"></div>');if(log.length)$(toolbar).append('<i class="or-notice-action--full or-image-icon or-image-icon--menu-fullscreen"></i>');$(toolbar).append('<i class="or-image-icon or-image-icon--menu-close or-notice-act-close"></i>');$(notice).append(toolbar);if(a)$(notice).append('<div class="or-notice-name or-clickable"><a href="'+Openrat.Navigator.createShortUrl(e,i)+'" data-type="open" data-action="'+e+'" data-id="'+i+'"><i class="or-notice-action-full or-image-icon or-image-icon--action-'+e+'"></i> '+a+'</a></div>');$(notice).append('<div class="or-notice-text">'+t(n)+'</div>');if(log.length){let logLi=log.reduce((result,item)=>{result+='<li><pre>'+t(item)+'</pre></li>';return result},'');$(notice).append('<div class="or-notice-log"><ul>'+logLi+'</ul></div>')};$('#noticebar').prepend(notice);$(notice).orLinkify();$(notice).find('.or-notice-action-full').click(function(){$(notice).toggleClass('or-notice--is-full')});$(notice).find('.or-notice-act-close').click(function(){$(notice).fadeOut('fast',function(){$(notice).remove()})});let timeout=1;if(o=='ok')timeout=20;if(o=='info')timeout=60;if(o=='warning')timeout=120;if(o=='error')timeout=120;if(timeout>0)setTimeout(function(){$(notice).fadeOut('slow',function(){$(this).remove()})},timeout*1000)};this.dataChangedHandler=$.Callbacks();this.dataChangedHandler.add(function(){if(Openrat.Workbench.popupWindow)Openrat.Workbench.popupWindow.location.reload()});this.afterViewLoadedHandler=$.Callbacks();this.setApplicationTitle=function(t){if(t)$('head > title').text(t+' - '+$('head > title').data('default'));else $('head > title').text($('head > title').data('default'))};var t=function(t){return String(t).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;')};this.registerOpenClose=function(t){$(t).children('.or-collapsible-act-switch').click(function(){$(this).closest('.or-collapsible').toggleClass('collapsible--is-open').toggleClass('collapsible--is-closed')})};this.openNewAction=function(t,e,i){$('nav').removeClass('nav--is-open');Openrat.Workbench.setApplicationTitle(t);Openrat.Navigator.navigateToNew({'action':e,'id':i})};this.startDialog=function(t,e,i,o,a){if(!e)e=$('#editor').attr('data-action');if(!o)o=$('#editor').attr('data-id');let view=new Openrat.View(e,i,o,a);view.before=function(){$('#dialog > .view').html('<div class="header"><img class="or-icon" title="" src="./themes/default/images/icon/'+i+'.png" />'+t+'</div>');$('#dialog > .view').data('id',o);$('#dialog').removeClass('dialog--is-closed').addClass('dialog--is-open');let view=this;this.escapeKeyClosingHandler=function(t){if(t.keyCode==27){view.close();$(document).off('keyup')}};$(document).keyup(this.escapeKeyClosingHandler);$('.or-dialog-filler').click(function(){view.close()})};view.close=function(){if($('.or-dialog').hasClass('or-dialog--modal'))return;$('.or-view.or-view--is-dirty').removeClass('or-view--is-dirty');$('#dialog .or-view').html('');$('#dialog').removeClass('dialog--is-open').addClass('dialog--is-closed');$(document).unbind('keyup',this.escapeKeyClosingHandler)};view.start($('.or-dialog > .or-view'))};this.registerDraggable=function(t){$(t).find('.or-draggable').draggable({helper:'clone',opacity:0.7,zIndex:2,distance:10,cursor:'move',revert:'false'})};this.registerDroppable=function(t){$(t).find('.or-droppable').droppable({accept:'.or-draggable',hoverClass:'or-droppable--hover',activeClass:'or-droppable--active',drop:function(t,e){let dropped=e.draggable;let id=dropped.data('id');let name=dropped.data('name');if(!name)name=id;$(this).find('.or-selector-link-value').val(id);$(this).find('.or-selector-link-name').val(name).attr('placeholder',name)}})}}; ;Openrat.Navigator=new function(){'use strict';this.navigateTo=function(t){Openrat.Workbench.loadNewActionState(t)};this.navigateToNew=function(t){this.navigateTo(t);window.history.pushState(t,t.name,this.createShortUrl(t.action,t.id))};this.toActualHistory=function(t){window.history.replaceState(t,t.name,this.createShortUrl(t.action,t.id))};this.createShortUrl=function(t,i){return'./#/'+t+(i?'/'+i:'')}}; diff --git a/modules/cms/ui/themes/default/script/openrat/workbench.js b/modules/cms/ui/themes/default/script/openrat/workbench.js @@ -19,6 +19,8 @@ Openrat.Workbench = new function() this.initializeDirtyWarning(); this.initializeState(); this.openModalDialog(); + + Openrat.Workbench.registerOpenClose( $('.or-collapsible') ); } @@ -156,7 +158,7 @@ Openrat.Workbench = new function() // View in geschlossenen Sektionen löschen, damit diese nicht stehen bleiben. $('#workbench section.closed .or-act-view-loader').empty(); - Openrat.Workbench.loadViews( $('#workbench section.open .or-act-view-loader') ); + Openrat.Workbench.loadViews( $('.or-workbench .or-act-view-loader') ); } diff --git a/modules/cms/ui/themes/default/style/openrat-ui.less b/modules/cms/ui/themes/default/style/openrat-ui.less @@ -99,6 +99,9 @@ &--method-mail:after { content: "mail"; } &--method-search:after { content: "search"; } &--method-add:after { content: "add_box"; } + &--method-preview:after { content: "desktop_windows"; } + &--method-edit:after { content: "spellcheck"; } + &--method-info:after { content: "info"; } &--menu-close:after { content: "close"; } &--menu-fullscreen:after { content: "fullscreen"; } &--menu-edit:after { content: "description"; } diff --git a/modules/cms/ui/themes/default/style/openrat.css b/modules/cms/ui/themes/default/style/openrat.css @@ -395,6 +395,15 @@ legend { .or-image-icon--method-add:after { content: "add_box"; } +.or-image-icon--method-preview:after { + content: "desktop_windows"; +} +.or-image-icon--method-edit:after { + content: "spellcheck"; +} +.or-image-icon--method-info:after { + content: "info"; +} .or-image-icon--menu-close:after { content: "close"; } @@ -870,7 +879,7 @@ img.or-image-icon { right: 1em; position: absolute; } -/*# sourceMappingURL=data:application/json,%7B%22version%22%3A3%2C%22sources%22%3A%5B%22mnt%5C%2Fdata%5C%2Fdankert%5C%2FEntwicklung%5C%2FProjekte%5C%2Fopenrat-cms%5C%2Fmodules%5C%2Fcms%5C%2Fui%5C%2Fthemes%5C%2Fdefault%5C%2Fstyle%5C%2Fopenrat-ui.less%22%5D%2C%22names%22%3A%5B%5D%2C%22mappings%22%3A%22%3B%3BAAIA%3BCACE%3BCACA%3BCACA%3BCACA%2CKAAK%2CMAAM%2CmBAAmB%2CMAAM%2CuBAChC%2CwCAAwC%2COAAO%2CuDAC%5C%2FC%2CwCAAwC%2COAAO%2COAFnD%3B%3B%3B%3B%3BAAMF%3BCACE%2CaAAa%2CiBAAb%3BCACA%3BCACA%3BCACA%2CKAAK%2CMAAM%2CoBAAoB%2CMAAM%2C8BACjC%2CkDAAkD%2COAAO%2CuDACzD%2CiDAAiD%2COAAO%2COAF5D%3B%3B%3B%3BAAKF%3BCACE%2CaAAa%2CgBAAb%3BCACA%3BCACA%3BCACA%2CKAAK%2CMAAM%2CmBACX%2CMAAM%2C8BACF%2CuCAAuC%2COAAO%2CcAC9C%2CsCAAsC%2COAAO%2COAHjD%3B%3BAAMF%3BCACE%2CaAAa%2CgBAAb%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3B%3BCAGA%3B%3BAAGA%2CcAAC%2CgBAAgB%3BCAAS%3B%3BAAC1B%2CcAAC%2CoBAAoB%3BCAAS%2CSAAS%2CeAAT%3B%3BAAC9B%2CcAAC%2CkBAAkB%3BCAAS%3B%3BAAC5B%2CcAAC%2CkBAAkB%3BCAAS%2CSAAS%2CWAAT%3B%3BAAC5B%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CWAAT%3B%3BAAC1B%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CYAAT%3B%3BAAC1B%2CcAAC%2CkBAAkB%3BCAAS%2CSAAS%2CiBAAT%3B%3BAAC5B%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CcAAT%3B%3BAAC1B%2CcAAC%2CoBAAoB%3BCAAS%3B%3BAAC9B%2CcAAC%2CoBAAoB%3BCAAS%3B%3BAAC9B%2CcAAC%2CgBAAgB%3BCAAS%3B%3BAAC1B%2CcAAC%2CmBAAmB%3BCAAS%2CSAAS%2CqBAAT%3B%3BAAC7B%2CcAAC%2CgBAAgB%3BCAAS%3B%3BAAC1B%2CcAAC%2CoBAAoB%3BCAAS%3B%3BAAC9B%2CcAAC%2CoBAAoB%3BCAAS%2CSAAS%2CWAAT%3B%3BAAE9B%2CcAAC%2CcAAc%3BCAAS%3B%3BAACxB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CWAAT%3B%3BAACvB%2CcAAC%2CYAAY%3BCAAS%3B%3BAACtB%2CcAAC%2CcAAc%3BCAAS%2CSAAS%2CiBAAT%3B%3BAACxB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CaAAT%3B%3BAACvB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CmBAAT%3B%3BAACvB%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CkBAAkB%3BCAAS%2CSAAS%2CYAAT%3B%3BAAC5B%2CcAAC%2CcAAc%3BCAAS%2CSAAS%2CYAAT%3B%3BAACxB%2CcAAC%2CeAAe%3BCAAS%2CSAAS%2CaAAT%3B%3BAACzB%2CcAAC%2CqBAAqB%3BCAAS%3B%3BAAC%5C%2FB%2CcAAC%2CiBAAiB%3BCAAS%3B%3BAAC3B%2CcAAC%2CiBAAiB%3BCAAS%3B%3BAAC3B%2CcAAC%2CqBAAqB%3BCAAS%3B%3BAAC%5C%2FB%2CcAAC%2CmBAAmB%3BCAAS%3B%3BAAC7B%2CcAAC%2CcAAc%3BCAAS%3B%3BAACxB%2CcAAC%2CiBAAiB%3BCAAS%3B%3BAAC3B%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CYAAT%3B%3BAAC1B%2CcAAC%2CiBAAiB%3BCAAS%3B%3BAAC3B%2CcAAC%2CsBAAsB%3BCAAS%3B%3BAAChC%2CcAAC%2CoBAAoB%3BCAAS%3B%3BAAC9B%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CiBAAT%3B%3BAAE1B%2CcAAC%2CcAAc%3BCAAS%2CSAAS%2CYAAT%3B%3BAAExB%2CcAAC%3BCAAsB%2CSAAS%2CiBAAT%3B%3BAACvB%2CcAAC%2CiBAAiB%3BCAAS%3B%3BAAC3B%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CcAAT%3B%3BAAC1B%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CYAAY%3BCAAS%3B%3BAACtB%2CcAAC%2CYAAY%3BCAAS%3B%3BAACtB%2CcAAC%2CeAAe%3BCAAS%3B%3BAACzB%2CcAAC%2CgBAAgB%3BCAAS%3B%3BAAC1B%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CeAAe%3BCAAS%3B%3BAACzB%2CcAAC%2CYAAY%3BCAAS%2CSAAS%2CSAAT%3B%3BAACtB%2CcAAC%2CYAAY%3BCAAS%3B%3BAACtB%2CcAAC%2CiBAAiB%3BCAAS%3B%3BAAC3B%2CcAAC%2CWAAW%3BCAAS%3B%3BAACrB%2CcAAC%2CYAAY%3BCAAS%3B%3BAAEtB%2CcAAC%2CWAAW%3BCAAS%3B%3BAACrB%2CcAAC%2CeAAe%3BCAAS%2CSAAS%2CgBAAT%3B%3BAACzB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CeAAT%3B%3BAAEvB%2CcAAC%2CWAAW%3BCAAS%2CSAAS%2CaAAT%3B%3BAACrB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CeAAT%3B%3BAACvB%2CcAAC%2CUAAU%3BCAAS%2CSAAS%2CiBAAT%3B%3BAACpB%2CcAAC%2CUAAU%3BCAAS%3B%3BAAEpB%2CcAAC%2CYAAY%3BCAAS%2CSAAS%2CcAAT%3B%3BAACtB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CeAAT%3B%3BAAEvB%2CcAAC%2CSAAS%3BCAAS%3B%3BAACnB%2CcAAC%2CYAAY%3BCAAS%3B%3BAACtB%2CcAAC%2CaAAa%3BCAAS%3B%3BAAEvB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CaAAT%3B%3BAACvB%2CcAAC%2CeAAe%3BCAAS%2CSAAS%2CeAAT%3B%3BAACzB%2CcAAC%2CiBAAiB%3BCAAS%2CSAAS%2CaAAT%3B%3BAAC3B%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CcAAT%3B%3BAACvB%2CcAAC%2CmBAAmB%3BCAAS%3B%3BAAC7B%2CcAAC%2CcAAc%3BCAAS%2CSAAS%2CcAAT%3B%3BAACxB%2CcAAC%2CuBAAuB%3BCAAS%2CSAAS%2CsBAAT%3B%3BAACjC%2CcAAC%2CqBAAqB%3BCAAS%2CSAAS%2CsBAAT%3B%3BAAC%5C%2FB%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CiBAAT%3B%3BAAC1B%2CcAAC%2CmBAAmB%3BCAAS%3B%3BAAC7B%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CcAAc%3BCAAS%3B%3BAACxB%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CuBAAuB%3BCAAS%3B%3BAACjC%2CcAAC%2CcAAc%3BCAAS%2CSAAS%2CYAAT%3B%3BAAG1B%3BCACE%3B%3BAAgBF%3BCACE%3BCACA%3BCACA%3B%3BAAME%2CIAAC%3BCAEG%3BCACA%3BCACA%3B%3BCAEA%3BCACA%3BCACA%3B%3BAAGF%2CIAAC%3BCACC%2CyBAAA%3BCACA%3BCACA%3BCACA%3BCApCN%2CkBAAA%3BCACA%2CuBAAA%3BCACA%2C0BAAA%3BCACA%2CyBAAA%3BCAGA%2CuCAAA%3BCACA%2CoCAAA%3BCACA%2C%2BBAAA%3B%3BAAiCM%2CIATD%2CMASE%3BCACC%3BCACA%2CeAAA%3BCACA%3BCACA%3BCACA%3B%3BAAGF%2CIAjBD%2CMAiBE%2CMACC%3BCACE%3B%3BAAIJ%2CIAvBD%2CMAuBE%3BCACC%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3B%3BAAIF%2CIAnCD%2CMAmCE%2CMAEC%2CIAAG%3BCACD%3B%3BAAIJ%2CIA1CD%2CMA0CE%3BCACC%3B%3BAAGF%2CIA9CD%2CMA8CE%3BCACC%2CSAAS%2CEAAT%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%2C6BAAA%3BCACA%3BCACA%3BCACA%3B%3BAAGF%2CIA3DD%2CMA2DE%3BCACC%3BCACA%3BCACA%3BCACA%3BCACA%2CaAAa%2CiDAAb%3B%3BAAIA%2CIApEH%2CMAmEE%2CKACE%3BCACC%3B%3BAAoBZ%2CGAAG%3BCACD%3BCACA%3B%3B%3B%3BAAQF%2CCAAC%3BAACD%2CCAAC%3BCACC%3BCACA%3B%3BAAGF%2CCAAC%3BAACD%2CCAAC%3BCACC%3BCACA%3B%3B%3BAAIF%2CGAAG%3BAACH%2CGAAG%3BCACD%3BCACA%3B%3B%3B%3BAAaF%2CGAAG%2CQAAS%3BCACV%3BCACA%3B%3BAAGF%2CGAAG%2CQAAS%3BCACV%3B%3BAAGF%3BAACA%3BCACE%3B%3B%3BAAQA%2CaAAC%3BCAEC%3BCACA%3B%3BAAGF%2CaAAC%3BCACC%3BCACA%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3BAAiKA%2CIAAC%3BCACC%3B%3BAAIN%3BCACE%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3BAA2CF%2CIAAK%2CSAAS%3BCACZ%3B%3BAAIF%2CUAAa%3BCACX%3BCA7YA%2CiCAAA%3BCACA%2C8BAAA%3BCACA%2CyBAAA%3BCA6YE%3B%3BAAIJ%3BCACE%3BCACA%3B%3B%3BAAMF%3BCACE%3B%3B%3BAAIF%3BCACE%2CaAAa%2CiDAAb%3B%3BAAGF%2CEAAE%3BCACA%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3BAAoBF%3BCACE%3B%3BAAGF%3BCACE%3BCACA%3BCACA%2CgBAAA%3B%3BAAHF%2CYAKI%3BCACA%2CiBAAA%3BCACA%3BCACA%3BCA3cF%2CoBAAA%3BCACA%2CyBAAA%3BCACA%2C4BAAA%3BCACA%2C2BAAA%3B%3BAA8cF%3BCAEE%3B%3BAAEA%2CQAAC%2CMACC%3BCACE%3B%3BAANN%2CQAUE%3BCACE%3BCACA%3BCACA%3BCACA%3BCACA%3BCAEA%3BCACA%3BCAneF%2CoBAAA%3BCACA%2CyBAAA%3BCACA%2C4BAAA%3BCACA%2C2BAAA%3BCAkeE%3BCAEA%3B%3BAAtBJ%2CQAUE%2CeAcI%3BCACA%3B%3BAAMN%3BCACI%3BCACA%3BCACA%3BCACA%22%7D */ +/*# sourceMappingURL=data:application/json,%7B%22version%22%3A3%2C%22sources%22%3A%5B%22mnt%5C%2Fdata%5C%2Fdankert%5C%2FEntwicklung%5C%2FProjekte%5C%2Fopenrat-cms%5C%2Fmodules%5C%2Fcms%5C%2Fui%5C%2Fthemes%5C%2Fdefault%5C%2Fstyle%5C%2Fopenrat-ui.less%22%5D%2C%22names%22%3A%5B%5D%2C%22mappings%22%3A%22%3B%3BAAIA%3BCACE%3BCACA%3BCACA%3BCACA%2CKAAK%2CMAAM%2CmBAAmB%2CMAAM%2CuBAChC%2CwCAAwC%2COAAO%2CuDAC%5C%2FC%2CwCAAwC%2COAAO%2COAFnD%3B%3B%3B%3B%3BAAMF%3BCACE%2CaAAa%2CiBAAb%3BCACA%3BCACA%3BCACA%2CKAAK%2CMAAM%2CoBAAoB%2CMAAM%2C8BACjC%2CkDAAkD%2COAAO%2CuDACzD%2CiDAAiD%2COAAO%2COAF5D%3B%3B%3B%3BAAKF%3BCACE%2CaAAa%2CgBAAb%3BCACA%3BCACA%3BCACA%2CKAAK%2CMAAM%2CmBACX%2CMAAM%2C8BACF%2CuCAAuC%2COAAO%2CcAC9C%2CsCAAsC%2COAAO%2COAHjD%3B%3BAAMF%3BCACE%2CaAAa%2CgBAAb%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3B%3BCAGA%3B%3BAAGA%2CcAAC%2CgBAAgB%3BCAAS%3B%3BAAC1B%2CcAAC%2CoBAAoB%3BCAAS%2CSAAS%2CeAAT%3B%3BAAC9B%2CcAAC%2CkBAAkB%3BCAAS%3B%3BAAC5B%2CcAAC%2CkBAAkB%3BCAAS%2CSAAS%2CWAAT%3B%3BAAC5B%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CWAAT%3B%3BAAC1B%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CYAAT%3B%3BAAC1B%2CcAAC%2CkBAAkB%3BCAAS%2CSAAS%2CiBAAT%3B%3BAAC5B%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CcAAT%3B%3BAAC1B%2CcAAC%2CoBAAoB%3BCAAS%3B%3BAAC9B%2CcAAC%2CoBAAoB%3BCAAS%3B%3BAAC9B%2CcAAC%2CgBAAgB%3BCAAS%3B%3BAAC1B%2CcAAC%2CmBAAmB%3BCAAS%2CSAAS%2CqBAAT%3B%3BAAC7B%2CcAAC%2CgBAAgB%3BCAAS%3B%3BAAC1B%2CcAAC%2CoBAAoB%3BCAAS%3B%3BAAC9B%2CcAAC%2CoBAAoB%3BCAAS%2CSAAS%2CWAAT%3B%3BAAE9B%2CcAAC%2CcAAc%3BCAAS%3B%3BAACxB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CWAAT%3B%3BAACvB%2CcAAC%2CYAAY%3BCAAS%3B%3BAACtB%2CcAAC%2CcAAc%3BCAAS%2CSAAS%2CiBAAT%3B%3BAACxB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CaAAT%3B%3BAACvB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CmBAAT%3B%3BAACvB%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CkBAAkB%3BCAAS%2CSAAS%2CYAAT%3B%3BAAC5B%2CcAAC%2CcAAc%3BCAAS%2CSAAS%2CYAAT%3B%3BAACxB%2CcAAC%2CeAAe%3BCAAS%2CSAAS%2CaAAT%3B%3BAACzB%2CcAAC%2CqBAAqB%3BCAAS%3B%3BAAC%5C%2FB%2CcAAC%2CiBAAiB%3BCAAS%3B%3BAAC3B%2CcAAC%2CiBAAiB%3BCAAS%3B%3BAAC3B%2CcAAC%2CqBAAqB%3BCAAS%3B%3BAAC%5C%2FB%2CcAAC%2CmBAAmB%3BCAAS%3B%3BAAC7B%2CcAAC%2CcAAc%3BCAAS%3B%3BAACxB%2CcAAC%2CiBAAiB%3BCAAS%3B%3BAAC3B%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CYAAT%3B%3BAAC1B%2CcAAC%2CiBAAiB%3BCAAS%3B%3BAAC3B%2CcAAC%2CsBAAsB%3BCAAS%3B%3BAAChC%2CcAAC%2CoBAAoB%3BCAAS%3B%3BAAC9B%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CiBAAT%3B%3BAAE1B%2CcAAC%2CcAAc%3BCAAS%2CSAAS%2CYAAT%3B%3BAAExB%2CcAAC%3BCAAsB%2CSAAS%2CiBAAT%3B%3BAACvB%2CcAAC%2CiBAAiB%3BCAAS%3B%3BAAC3B%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CcAAT%3B%3BAAC1B%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CYAAY%3BCAAS%3B%3BAACtB%2CcAAC%2CYAAY%3BCAAS%3B%3BAACtB%2CcAAC%2CeAAe%3BCAAS%3B%3BAACzB%2CcAAC%2CgBAAgB%3BCAAS%3B%3BAAC1B%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CeAAe%3BCAAS%3B%3BAACzB%2CcAAC%2CYAAY%3BCAAS%2CSAAS%2CSAAT%3B%3BAACtB%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CiBAAT%3B%3BAAC1B%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CYAAY%3BCAAS%3B%3BAACtB%2CcAAC%2CiBAAiB%3BCAAS%3B%3BAAC3B%2CcAAC%2CWAAW%3BCAAS%3B%3BAACrB%2CcAAC%2CYAAY%3BCAAS%3B%3BAAEtB%2CcAAC%2CWAAW%3BCAAS%3B%3BAACrB%2CcAAC%2CeAAe%3BCAAS%2CSAAS%2CgBAAT%3B%3BAACzB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CeAAT%3B%3BAAEvB%2CcAAC%2CWAAW%3BCAAS%2CSAAS%2CaAAT%3B%3BAACrB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CeAAT%3B%3BAACvB%2CcAAC%2CUAAU%3BCAAS%2CSAAS%2CiBAAT%3B%3BAACpB%2CcAAC%2CUAAU%3BCAAS%3B%3BAAEpB%2CcAAC%2CYAAY%3BCAAS%2CSAAS%2CcAAT%3B%3BAACtB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CeAAT%3B%3BAAEvB%2CcAAC%2CSAAS%3BCAAS%3B%3BAACnB%2CcAAC%2CYAAY%3BCAAS%3B%3BAACtB%2CcAAC%2CaAAa%3BCAAS%3B%3BAAEvB%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CaAAT%3B%3BAACvB%2CcAAC%2CeAAe%3BCAAS%2CSAAS%2CeAAT%3B%3BAACzB%2CcAAC%2CiBAAiB%3BCAAS%2CSAAS%2CaAAT%3B%3BAAC3B%2CcAAC%2CaAAa%3BCAAS%2CSAAS%2CcAAT%3B%3BAACvB%2CcAAC%2CmBAAmB%3BCAAS%3B%3BAAC7B%2CcAAC%2CcAAc%3BCAAS%2CSAAS%2CcAAT%3B%3BAACxB%2CcAAC%2CuBAAuB%3BCAAS%2CSAAS%2CsBAAT%3B%3BAACjC%2CcAAC%2CqBAAqB%3BCAAS%2CSAAS%2CsBAAT%3B%3BAAC%5C%2FB%2CcAAC%2CgBAAgB%3BCAAS%2CSAAS%2CiBAAT%3B%3BAAC1B%2CcAAC%2CmBAAmB%3BCAAS%3B%3BAAC7B%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CcAAc%3BCAAS%3B%3BAACxB%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CaAAa%3BCAAS%3B%3BAACvB%2CcAAC%2CuBAAuB%3BCAAS%3B%3BAACjC%2CcAAC%2CcAAc%3BCAAS%2CSAAS%2CYAAT%3B%3BAAG1B%3BCACE%3B%3BAAgBF%3BCACE%3BCACA%3BCACA%3B%3BAAME%2CIAAC%3BCAEG%3BCACA%3BCACA%3B%3BCAEA%3BCACA%3BCACA%3B%3BAAGF%2CIAAC%3BCACC%2CyBAAA%3BCACA%3BCACA%3BCACA%3BCApCN%2CkBAAA%3BCACA%2CuBAAA%3BCACA%2C0BAAA%3BCACA%2CyBAAA%3BCAGA%2CuCAAA%3BCACA%2CoCAAA%3BCACA%2C%2BBAAA%3B%3BAAiCM%2CIATD%2CMASE%3BCACC%3BCACA%2CeAAA%3BCACA%3BCACA%3BCACA%3B%3BAAGF%2CIAjBD%2CMAiBE%2CMACC%3BCACE%3B%3BAAIJ%2CIAvBD%2CMAuBE%3BCACC%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3B%3BAAIF%2CIAnCD%2CMAmCE%2CMAEC%2CIAAG%3BCACD%3B%3BAAIJ%2CIA1CD%2CMA0CE%3BCACC%3B%3BAAGF%2CIA9CD%2CMA8CE%3BCACC%2CSAAS%2CEAAT%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%3BCACA%2C6BAAA%3BCACA%3BCACA%3BCACA%3B%3BAAGF%2CIA3DD%2CMA2DE%3BCACC%3BCACA%3BCACA%3BCACA%3BCACA%2CaAAa%2CiDAAb%3B%3BAAIA%2CIApEH%2CMAmEE%2CKACE%3BCACC%3B%3BAAoBZ%2CGAAG%3BCACD%3BCACA%3B%3B%3B%3BAAQF%2CCAAC%3BAACD%2CCAAC%3BCACC%3BCACA%3B%3BAAGF%2CCAAC%3BAACD%2CCAAC%3BCACC%3BCACA%3B%3B%3BAAIF%2CGAAG%3BAACH%2CGAAG%3BCACD%3BCACA%3B%3B%3B%3BAAaF%2CGAAG%2CQAAS%3BCACV%3BCACA%3B%3BAAGF%2CGAAG%2CQAAS%3BCACV%3B%3BAAGF%3BAACA%3BCACE%3B%3B%3BAAQA%2CaAAC%3BCAEC%3BCACA%3B%3BAAGF%2CaAAC%3BCACC%3BCACA%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3BAAiKA%2CIAAC%3BCACC%3B%3BAAIN%3BCACE%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3BAA2CF%2CIAAK%2CSAAS%3BCACZ%3B%3BAAIF%2CUAAa%3BCACX%3BCA7YA%2CiCAAA%3BCACA%2C8BAAA%3BCACA%2CyBAAA%3BCA6YE%3B%3BAAIJ%3BCACE%3BCACA%3B%3B%3BAAMF%3BCACE%3B%3B%3BAAIF%3BCACE%2CaAAa%2CiDAAb%3B%3BAAGF%2CEAAE%3BCACA%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3B%3BAAoBF%3BCACE%3B%3BAAGF%3BCACE%3BCACA%3BCACA%2CgBAAA%3B%3BAAHF%2CYAKI%3BCACA%2CiBAAA%3BCACA%3BCACA%3BCA3cF%2CoBAAA%3BCACA%2CyBAAA%3BCACA%2C4BAAA%3BCACA%2C2BAAA%3B%3BAA8cF%3BCAEE%3B%3BAAEA%2CQAAC%2CMACC%3BCACE%3B%3BAANN%2CQAUE%3BCACE%3BCACA%3BCACA%3BCACA%3BCACA%3BCAEA%3BCACA%3BCAneF%2CoBAAA%3BCACA%2CyBAAA%3BCACA%2C4BAAA%3BCACA%2C2BAAA%3BCAkeE%3BCAEA%3B%3BAAtBJ%2CQAUE%2CeAcI%3BCACA%3B%3BAAMN%3BCACI%3BCACA%3BCACA%3BCACA%22%7D */ /* Include style: /mnt/data/dankert/Entwicklung/Projekte/openrat-cms/modules/cms/ui/themes/default/style/openrat-header */ /* H e a d e r */ #title { @@ -1757,3 +1766,4 @@ div.or-dropzone-upload > div.input { /* Include style: /mnt/data/dankert/Entwicklung/Projekte/openrat-cms/modules/cms/ui/themes/../../../editor/trumbowyg/ui/trumbowyg */ /** Trumbowyg v2.10.0 - A lightweight WYSIWYG editor - alex-d.github.io/Trumbowyg - License MIT - Author : Alexandre Demode (Alex-D) / alex-d.fr */ #trumbowyg-icons,#trumbowyg-icons svg{height:0;width:0}#trumbowyg-icons{overflow:hidden;visibility:hidden}.trumbowyg-box *,.trumbowyg-box ::after,.trumbowyg-box ::before{box-sizing:border-box}.trumbowyg-box svg{width:17px;height:100%;fill:#222}.trumbowyg-box,.trumbowyg-editor{display:block;position:relative;border:1px solid #DDD;width:100%;min-height:300px;margin:17px auto}.trumbowyg-box .trumbowyg-editor{margin:0 auto}.trumbowyg-box.trumbowyg-fullscreen{background:#FEFEFE;border:none!important}.trumbowyg-editor,.trumbowyg-textarea{position:relative;box-sizing:border-box;padding:20px;min-height:300px;width:100%;border-style:none;resize:none;outline:0;overflow:auto}.trumbowyg-editor.trumbowyg-autogrow-on-enter,.trumbowyg-textarea.trumbowyg-autogrow-on-enter{transition:height .3s ease-out}.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-box-blur .trumbowyg-editor::before{color:transparent!important;text-shadow:0 0 7px #333}@media screen and (min-width:0 \0){.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-box-blur .trumbowyg-editor::before{color:rgba(200,200,200,.6)!important}}@supports (-ms-accelerator:true){.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-box-blur .trumbowyg-editor::before{color:rgba(200,200,200,.6)!important}}.trumbowyg-box-blur .trumbowyg-editor hr,.trumbowyg-box-blur .trumbowyg-editor img{opacity:.2}.trumbowyg-textarea{position:relative;display:block;overflow:auto;border:none;font-size:14px;font-family:Inconsolata,Consolas,Courier,"Courier New",sans-serif;line-height:18px}.trumbowyg-box.trumbowyg-editor-visible .trumbowyg-textarea{height:1px!important;width:25%;min-height:0!important;padding:0!important;background:0 0;opacity:0!important}.trumbowyg-box.trumbowyg-editor-hidden .trumbowyg-textarea{display:block}.trumbowyg-box.trumbowyg-editor-hidden .trumbowyg-editor{display:none}.trumbowyg-box.trumbowyg-disabled .trumbowyg-textarea{opacity:.8;background:0 0}.trumbowyg-editor[contenteditable=true]:empty:not(:focus)::before{content:attr(placeholder);color:#999;pointer-events:none}.trumbowyg-button-pane{width:100%;min-height:36px;background:#ecf0f1;border-bottom:1px solid #d7e0e2;margin:0;padding:0 5px;position:relative;list-style-type:none;line-height:10px;backface-visibility:hidden;z-index:11}.trumbowyg-button-pane::after{content:" ";display:block;position:absolute;top:36px;left:0;right:0;width:100%;height:1px;background:#d7e0e2}.trumbowyg-button-pane .trumbowyg-button-group{display:inline-block}.trumbowyg-button-pane .trumbowyg-button-group .trumbowyg-fullscreen-button svg{color:transparent}.trumbowyg-button-pane .trumbowyg-button-group::after{content:" ";display:inline-block;width:1px;background:#d7e0e2;margin:0 5px;height:35px;vertical-align:top}.trumbowyg-button-pane .trumbowyg-button-group:last-child::after{content:none}.trumbowyg-button-pane button{display:inline-block;position:relative;width:35px;height:35px;padding:1px 6px!important;margin-bottom:1px;overflow:hidden;border:none;cursor:pointer;background:0 0;vertical-align:middle;transition:background-color 150ms,opacity 150ms}.trumbowyg-button-pane button.trumbowyg-textual-button{width:auto;line-height:35px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.trumbowyg-button-pane button.trumbowyg-disable,.trumbowyg-button-pane.trumbowyg-disable button:not(.trumbowyg-not-disable):not(.trumbowyg-active),.trumbowyg-disabled .trumbowyg-button-pane button:not(.trumbowyg-not-disable):not(.trumbowyg-viewHTML-button){opacity:.2;cursor:default}.trumbowyg-button-pane.trumbowyg-disable .trumbowyg-button-group::before,.trumbowyg-disabled .trumbowyg-button-pane .trumbowyg-button-group::before{background:#e3e9eb}.trumbowyg-button-pane button.trumbowyg-active,.trumbowyg-button-pane button:not(.trumbowyg-disable):focus,.trumbowyg-button-pane button:not(.trumbowyg-disable):hover{background-color:#FFF;outline:0}.trumbowyg-button-pane .trumbowyg-open-dropdown::after{display:block;content:" ";position:absolute;top:25px;right:3px;height:0;width:0;border:3px solid transparent;border-top-color:#555}.trumbowyg-button-pane .trumbowyg-open-dropdown.trumbowyg-textual-button{padding-left:10px!important;padding-right:18px!important}.trumbowyg-button-pane .trumbowyg-open-dropdown.trumbowyg-textual-button::after{top:17px;right:7px}.trumbowyg-modal,.trumbowyg-modal-box{top:0;left:50%;transform:translateX(-50%);backface-visibility:hidden;position:absolute}.trumbowyg-button-pane .trumbowyg-right{float:right}.trumbowyg-dropdown{width:200px;border:1px solid #ecf0f1;padding:5px 0;border-top:none;background:#FFF;margin-left:-1px;box-shadow:rgba(0,0,0,.1) 0 2px 3px;z-index:12}.trumbowyg-dropdown button{display:block;width:100%;height:35px;line-height:35px;text-decoration:none;background:#FFF;padding:0 10px;color:#333!important;border:none;cursor:pointer;text-align:left;font-size:15px;transition:all 150ms}.trumbowyg-dropdown button:focus,.trumbowyg-dropdown button:hover{background:#ecf0f1}.trumbowyg-dropdown button svg{float:left;margin-right:14px}.trumbowyg-modal{max-width:520px;width:100%;height:350px;z-index:12;overflow:hidden}.trumbowyg-modal-box{max-width:500px;width:calc(100% - 20px);padding-bottom:45px;z-index:1;background-color:#FFF;text-align:center;font-size:14px;box-shadow:rgba(0,0,0,.2) 0 2px 3px}.trumbowyg-modal-box .trumbowyg-modal-title{font-size:24px;font-weight:700;margin:0 0 20px;padding:15px 0 13px;display:block;border-bottom:1px solid #EEE;color:#333;background:#fbfcfc}.trumbowyg-modal-box .trumbowyg-progress{width:100%;height:3px;position:absolute;top:58px}.trumbowyg-modal-box .trumbowyg-progress .trumbowyg-progress-bar{background:#2BC06A;width:0;height:100%;transition:width 150ms linear}.trumbowyg-modal-box label{display:block;position:relative;margin:15px 12px;height:29px;line-height:29px;overflow:hidden}.trumbowyg-modal-box label .trumbowyg-input-infos{display:block;text-align:left;height:25px;line-height:25px;transition:all 150ms}.trumbowyg-modal-box label .trumbowyg-input-infos span{display:block;color:#69878f;background-color:#fbfcfc;border:1px solid #DEDEDE;padding:0 7px;width:150px}.trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error{color:#e74c3c}.trumbowyg-modal-box label.trumbowyg-input-error input,.trumbowyg-modal-box label.trumbowyg-input-error textarea{border:1px solid #e74c3c}.trumbowyg-modal-box label.trumbowyg-input-error .trumbowyg-input-infos{margin-top:-27px}.trumbowyg-modal-box label input{position:absolute;top:0;right:0;height:27px;line-height:27px;border:1px solid #DEDEDE;background:#fff;font-size:14px;max-width:330px;width:70%;padding:0 7px;transition:all 150ms}.trumbowyg-modal-box label input:focus,.trumbowyg-modal-box label input:hover{outline:0;border:1px solid #95a5a6}.trumbowyg-modal-box label input:focus{background:#fbfcfc}.trumbowyg-modal-box label input[type=checkbox]{left:5px;top:5px;right:auto}.trumbowyg-modal-box label input[type=checkbox]+.trumbowyg-input-infos span{width:auto;padding-left:25px}.trumbowyg-modal-box .error{margin-top:25px;display:block;color:red}.trumbowyg-modal-box .trumbowyg-modal-button{position:absolute;bottom:10px;right:0;text-decoration:none;color:#FFF;display:block;width:100px;height:35px;line-height:33px;margin:0 10px;background-color:#333;border:none;cursor:pointer;font-family:"Trebuchet MS",Helvetica,Verdana,sans-serif;font-size:16px;transition:all 150ms}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit{right:110px;background:#2bc06a}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:focus,.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover{background:#40d47e;outline:0}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:active{background:#25a25a}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset{color:#555;background:#e6e6e6}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:focus,.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover{background:#fbfbfb;outline:0}.trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active{background:#d5d5d5}.trumbowyg-overlay{position:absolute;background-color:rgba(255,255,255,.5);height:100%;width:100%;left:0;display:none;top:0;z-index:10}body.trumbowyg-body-fullscreen{overflow:hidden}.trumbowyg-fullscreen{position:fixed;top:0;left:0;width:100%;height:100%;margin:0;padding:0;z-index:99999}.trumbowyg-fullscreen .trumbowyg-editor,.trumbowyg-fullscreen.trumbowyg-box{border:none}.trumbowyg-fullscreen .trumbowyg-editor,.trumbowyg-fullscreen .trumbowyg-textarea{height:calc(100% - 37px)!important;overflow:auto}.trumbowyg-fullscreen .trumbowyg-overlay{height:100%!important}.trumbowyg-fullscreen .trumbowyg-button-group .trumbowyg-fullscreen-button svg{color:#222;fill:transparent}.trumbowyg-editor embed,.trumbowyg-editor img,.trumbowyg-editor object,.trumbowyg-editor video{max-width:100%}.trumbowyg-editor img,.trumbowyg-editor video{height:auto}.trumbowyg-editor img{cursor:move}.trumbowyg-editor.trumbowyg-reset-css{background:#FEFEFE!important;font-family:"Trebuchet MS",Helvetica,Verdana,sans-serif!important;font-size:14px!important;line-height:1.45em!important;color:#333}.trumbowyg-editor.trumbowyg-reset-css a{color:#15c!important;text-decoration:underline!important}.trumbowyg-editor.trumbowyg-reset-css blockquote,.trumbowyg-editor.trumbowyg-reset-css div,.trumbowyg-editor.trumbowyg-reset-css ol,.trumbowyg-editor.trumbowyg-reset-css p,.trumbowyg-editor.trumbowyg-reset-css ul{box-shadow:none!important;background:0 0!important;margin:0 0 15px!important;line-height:1.4em!important;font-family:"Trebuchet MS",Helvetica,Verdana,sans-serif!important;font-size:14px!important;border:none}.trumbowyg-editor.trumbowyg-reset-css hr,.trumbowyg-editor.trumbowyg-reset-css iframe,.trumbowyg-editor.trumbowyg-reset-css object{margin-bottom:15px!important}.trumbowyg-editor.trumbowyg-reset-css blockquote{margin-left:32px!important;font-style:italic!important;color:#555}.trumbowyg-editor.trumbowyg-reset-css ul{list-style:disc}.trumbowyg-editor.trumbowyg-reset-css ol,.trumbowyg-editor.trumbowyg-reset-css ul{padding-left:20px!important}.trumbowyg-editor.trumbowyg-reset-css ol ol,.trumbowyg-editor.trumbowyg-reset-css ol ul,.trumbowyg-editor.trumbowyg-reset-css ul ol,.trumbowyg-editor.trumbowyg-reset-css ul ul{border:none;margin:2px!important;padding:0 0 0 24px!important}.trumbowyg-editor.trumbowyg-reset-css hr{display:block;height:1px;border:none;border-top:1px solid #CCC}.trumbowyg-editor.trumbowyg-reset-css h1,.trumbowyg-editor.trumbowyg-reset-css h2,.trumbowyg-editor.trumbowyg-reset-css h3,.trumbowyg-editor.trumbowyg-reset-css h4{color:#111;background:0 0;margin:0!important;padding:0!important;font-weight:700}.trumbowyg-editor.trumbowyg-reset-css h1{font-size:32px!important;line-height:38px!important;margin-bottom:20px!important}.trumbowyg-editor.trumbowyg-reset-css h2{font-size:26px!important;line-height:34px!important;margin-bottom:15px!important}.trumbowyg-editor.trumbowyg-reset-css h3{font-size:22px!important;line-height:28px!important;margin-bottom:7px!important}.trumbowyg-editor.trumbowyg-reset-css h4{font-size:16px!important;line-height:22px!important;margin-bottom:7px!important}.trumbowyg-dark .trumbowyg-textarea{background:#111;color:#ddd}.trumbowyg-dark .trumbowyg-box{border:1px solid #343434}.trumbowyg-dark .trumbowyg-box.trumbowyg-fullscreen{background:#111}.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before{text-shadow:0 0 7px #ccc}@media screen and (min-width:0 \0){.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before{color:rgba(20,20,20,.6)!important}}@supports (-ms-accelerator:true){.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor *,.trumbowyg-dark .trumbowyg-box.trumbowyg-box-blur .trumbowyg-editor::before{color:rgba(20,20,20,.6)!important}}.trumbowyg-dark .trumbowyg-box svg{fill:#ecf0f1;color:#ecf0f1}.trumbowyg-dark .trumbowyg-button-pane{background-color:#222;border-bottom-color:#343434}.trumbowyg-dark .trumbowyg-button-pane::after{background:#343434}.trumbowyg-dark .trumbowyg-button-pane .trumbowyg-button-group:not(:empty)::after{background-color:#343434}.trumbowyg-dark .trumbowyg-button-pane .trumbowyg-button-group:not(:empty) .trumbowyg-fullscreen-button svg{color:transparent}.trumbowyg-dark .trumbowyg-button-pane.trumbowyg-disable .trumbowyg-button-group::after{background-color:#2a2a2a}.trumbowyg-dark .trumbowyg-button-pane button.trumbowyg-active,.trumbowyg-dark .trumbowyg-button-pane button:not(.trumbowyg-disable):focus,.trumbowyg-dark .trumbowyg-button-pane button:not(.trumbowyg-disable):hover{background-color:#333}.trumbowyg-dark .trumbowyg-button-pane .trumbowyg-open-dropdown::after{border-top-color:#fff}.trumbowyg-dark .trumbowyg-fullscreen .trumbowyg-button-group .trumbowyg-fullscreen-button svg{color:#ecf0f1;fill:transparent}.trumbowyg-dark .trumbowyg-dropdown{border-color:#222;background:#333;box-shadow:rgba(0,0,0,.3) 0 2px 3px}.trumbowyg-dark .trumbowyg-dropdown button{background:#333;color:#fff!important}.trumbowyg-dark .trumbowyg-dropdown button:focus,.trumbowyg-dark .trumbowyg-dropdown button:hover{background:#222}.trumbowyg-dark .trumbowyg-modal-box{background-color:#222}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-title{border-bottom:1px solid #555;color:#fff;background:#3c3c3c}.trumbowyg-dark .trumbowyg-modal-box label{display:block;position:relative;margin:15px 12px;height:27px;line-height:27px;overflow:hidden}.trumbowyg-dark .trumbowyg-modal-box label .trumbowyg-input-infos span{color:#eee;background-color:#2f2f2f;border-color:#222}.trumbowyg-dark .trumbowyg-modal-box label .trumbowyg-input-infos span.trumbowyg-msg-error{color:#e74c3c}.trumbowyg-dark .trumbowyg-modal-box label.trumbowyg-input-error input,.trumbowyg-dark .trumbowyg-modal-box label.trumbowyg-input-error textarea{border-color:#e74c3c}.trumbowyg-dark .trumbowyg-modal-box label input{border-color:#222;color:#eee;background:#333}.trumbowyg-dark .trumbowyg-modal-box label input:focus,.trumbowyg-dark .trumbowyg-modal-box label input:hover{border-color:#626262}.trumbowyg-dark .trumbowyg-modal-box label input:focus{background-color:#2f2f2f}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit{background:#1b7943}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:focus,.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:hover{background:#25a25a}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-submit:active{background:#176437}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset{background:#333;color:#ccc}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:focus,.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:hover{background:#444}.trumbowyg-dark .trumbowyg-modal-box .trumbowyg-modal-button.trumbowyg-modal-reset:active{background:#111}.trumbowyg-dark .trumbowyg-overlay{background-color:rgba(15,15,15,.6)} +/* Include style: /mnt/data/dankert/Entwicklung/Projekte/openrat-cms/modules/cms/ui/themes/../../../editor/codemirror/lib/codemirror */ diff --git a/modules/cms/ui/themes/default/style/openrat.min.css b/modules/cms/ui/themes/default/style/openrat.min.css @@ -1,5 +1,5 @@ /*! normalize.css v3.0.1 | MIT License | git.io/normalize */html{font-family: 'Oxygen', 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;font-size: 0.9em;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%}body{margin: 0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display: block}audio,canvas,progress,video{display: inline-block;vertical-align: baseline}audio:not([controls]){display: none;height: 0}[hidden],template{display: none}a{background: transparent}a:active,a:hover{outline: 0}abbr[title]{border-bottom: 1px dotted}b,strong{font-weight: bold}dfn{font-style: italic}h1{font-size: 1.2em;margin: .67em 0}mark{background: #ff0;color: #000}small{font-size: 80%}sub,sup{font-size: 75%;line-height: 0;position: relative;vertical-align: baseline}sup{top: -0.5em}sub{bottom: -0.25em}img{border: 0}svg:not(:root){overflow: hidden}figure{margin: 1em 40px}hr{-moz-box-sizing: content-box;box-sizing: content-box;height: 0}pre{overflow: auto}code,kbd,pre,samp{font-family: 'Source Code Pro', monospace, monospace;font-size: 1em}button,input,optgroup,select,textarea{color: inherit;background-color: inherit;font: inherit;margin: 0}button{overflow: visible}button,select{text-transform: none}button,html input[type="button"]{-webkit-appearance: button;cursor: pointer}button[disabled],html input[disabled]{cursor: default}button input::-moz-focus-inner{border: 0;padding: 0}input{line-height: normal}input[type="reset"],input[type="submit"]{-webkit-appearance: button;cursor: pointer}input[type="checkbox"],input[type="radio"]{box-sizing: border-box;padding: 0}input[type="number"]::-webkit-inner-spin-button,input[type="number"]::-webkit-outer-spin-button{height: auto}input[type="search"]{-webkit-appearance: textfield;-moz-box-sizing: content-box;-webkit-box-sizing: content-box;box-sizing: content-box}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance: none}fieldset{border: 1px solid #c0c0c0;margin: 0 2px;padding: .35em .625em .75em}legend{border: 0;padding: 0}textarea{overflow: auto}optgroup{font-weight: bold}table{border-collapse: collapse;border-spacing: 0}td,th{padding: 0;text-align: left}*,::before,::after{box-sizing: border-box}.or-initial-hidden{display: none}.or-table-sort-value{display: none}legend{font-size: 1.1em;font-weight: bold;padding: 0 .5em} -@font-face{font-family: 'Oxygen';font-style: normal;font-weight: 400;src: local('Oxygen Regular'), local('Oxygen-Regular'), url('../font/oxygen-v7-latin-regular.woff') format('woff2'), url('../font/oxygen-v7-latin-regular.woff') format('woff')}@font-face{font-family: 'Source Code Pro';font-style: normal;font-weight: 400;src: local('Source Code Pro'), local('SourceCodePro-Regular'), url('../font/source-code-pro-v8-latin-regular.woff2') format('woff2'), url('../font/source-code-pro-v8-latin-regular.woff') format('woff')}@font-face{font-family: 'Material Icons';font-style: normal;font-weight: 400;src: local('Material Icons'), local('MaterialIcons-Regular'), url('../font/MaterialIcons-Regular.woff2') format('woff2'), url('../font/MaterialIcons-Regular.woff') format('woff')}.or-image-icon{font-family: 'Material Icons';font-weight: normal;font-style: normal;display: inline-block;text-transform: none;letter-spacing: normal;word-wrap: normal;white-space: nowrap;direction: ltr;font-feature-settings: 'liga'}.or-image-icon--action-el_text:after{content: "spellcheck"}.or-image-icon--action-el_longtext:after{content: "view_headline"}.or-image-icon--action-el_select:after{content: "list"}.or-image-icon--action-el_number:after{content: "looks_one"}.or-image-icon--action-el_link:after{content: "call_made"}.or-image-icon--action-el_date:after{content: "date_range"}.or-image-icon--action-el_insert:after{content: "keyboard_return"}.or-image-icon--action-el_copy:after{content: "flip_to_back"}.or-image-icon--action-el_linkinfo:after{content: "info"}.or-image-icon--action-el_linkdate:after{content: "info"}.or-image-icon--action-el_code:after{content: "code"}.or-image-icon--action-el_dynamic:after{content: "play_circle_outline"}.or-image-icon--action-el_info:after{content: "info"}.or-image-icon--action-el_infodate:after{content: "info"}.or-image-icon--action-el_checkbox:after{content: "check_box"}.or-image-icon--action-image:after{content: "image"}.or-image-icon--action-link:after{content: "call_made"}.or-image-icon--action-url:after{content: "link"}.or-image-icon--action-alias:after{content: "bookmark_border"}.or-image-icon--action-text:after{content: "text_format"}.or-image-icon--action-page:after{content: "insert_drive_file"}.or-image-icon--action-file:after{content: "save"}.or-image-icon--action-modellist:after{content: "device_hub"}.or-image-icon--action-model:after{content: "device_hub"}.or-image-icon--action-folder:after{content: "folder_open"}.or-image-icon--action-languagelist:after{content: "language"}.or-image-icon--action-language:after{content: "language"}.or-image-icon--action-template:after{content: "receipt"}.or-image-icon--action-templatelist:after{content: "receipt"}.or-image-icon--action-groupllist:after{content: "group"}.or-image-icon--action-group:after{content: "group"}.or-image-icon--action-userlist:after{content: "person"}.or-image-icon--action-user:after{content: "person"}.or-image-icon--action-profile:after{content: "person_pin"}.or-image-icon--method-settings:after{content: "settings"}.or-image-icon--action-configuration:after{content: "settings"}.or-image-icon--action-projectlist:after{content: "list"}.or-image-icon--action-project:after{content: "account_balance"}.or-image-icon--action-macro:after{content: "data_usage"}.or-image-icon--action-membership{content: "card_membership"}.or-image-icon--method-password:after{content: "lock"}.or-image-icon--method-publish:after{content: "cloud_upload"}.or-image-icon--method-show:after{content: "slideshow"}.or-image-icon--method-src:after{content: "code"}.or-image-icon--method-acl:after{content: "https"}.or-image-icon--method-rights:after{content: "https"}.or-image-icon--method-archive:after{content: "schedule"}.or-image-icon--method-mail:after{content: "mail"}.or-image-icon--method-search:after{content: "search"}.or-image-icon--method-add:after{content: "add_box"}.or-image-icon--menu-close:after{content: "close"}.or-image-icon--menu-fullscreen:after{content: "fullscreen"}.or-image-icon--menu-edit:after{content: "description"}.or-image-icon--menu-extra:after{content: "build"}.or-image-icon--menu-menu:after{content: "menu"}.or-image-icon--menu-minimize:after{content: "compare_arrows"}.or-image-icon--menu-qrcode:after{content: "phone_android"}.or-image-icon--node-open:after{content: "expand_more"}.or-image-icon--node-closed:after{content: "chevron_right"}.or-image-icon--dropdown:after{content: "arrow_drop_down"}.or-image-icon--database:after{content: "storage"}.or-image-icon--arrow-left:after{content: "chevron_left"}.or-image-icon--arrow-right:after{content: "chevron_right"}.or-image-icon--form-ok:after{content: "done"}.or-image-icon--form-apply:after{content: "done"}.or-image-icon--form-cancel:after{content: "clear"}.or-image-icon--editor-bold:after{content: "format_bold"}.or-image-icon--editor-italic:after{content: "format_italic"}.or-image-icon--editor-headline:after{content: "format_size"}.or-image-icon--editor-help:after{content: "help_outline"}.or-image-icon--editor-fullscreen:after{content: "fullscreen"}.or-image-icon--editor-quote:after{content: "format_quote"}.or-image-icon--editor-unnumberedlist:after{content: "format_list_bulleted"}.or-image-icon--editor-numberedlist:after{content: "format_list_numbered"}.or-image-icon--editor-preview:after{content: "desktop_windows"}.or-image-icon--editor-sidebyside:after{content: "flip"}.or-image-icon--editor-link:after{content: "link"}.or-image-icon--editor-image:after{content: "image"}.or-image-icon--editor-undo:after{content: "undo"}.or-image-icon--editor-redo:after{content: "redo"}.or-image-icon--editor-code:after{content: "code"}.or-image-icon--editor-horizontalrule:after{content: "remove"}.or-image-icon--editor-table:after{content: "view_comfy"}.or-editor-toolbar{font-size: 1.5em}iframe{width: 100%;height: 500px;display: block}.or-notices{display: block;position: fixed;bottom: 40px;right: 40px;width: 25em;z-index: 113}.or-notice{border: 2px solid #000;padding: 1.1em;margin: 5px;position: relative;border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;-khtml-border-radius: 5px;-webkit-box-shadow: 3px 2px 5px #000;-moz-box-shadow: 3px 2px 5px #000;box-shadow: 3px 2px 5px #000}.or-notice-toolbar{float: right;margin: 0 .2em;font-size: 2em;color: gray;cursor: pointer}.or-notice:hover .or-notice-toolbar{color: black}.or-notice-full{display: block;position: fixed;bottom: 10%;top: 10%;right: 10%;left: 10%;width: 80%;z-index: 114}.or-notice-error div.text{font-weight: bold}.or-notice-text{font-size: 1.1em}.or-notice:after{content: '';position: absolute;right: 0;top: 50%;width: 0;height: 0;border: 1em solid transparent;border-right: 0;margin-top: -1em;margin-right: -1em}.or-notice-log{display: none;position: relative;max-height: 90%;overflow: auto;font-family: 'Source Code Pro', Monospace, Monospaced, Courier}.or-notice-full-log{display: block}div.or-onrowvisible{visibility: hidden;display: inline}a:link,a:visited{font-weight: normal;text-decoration: none}a:active,a:hover{font-weight: normal;text-decoration: none}img[align=left],img[align=right]{padding-right: 1px;padding-left: 1px}div.or-logo h2{font-weight: normal;font-size: 24px}div.or-logo p{font-size: 13px}label,.or-clickable{cursor: pointer}.or-droppable--active{background-color: #2E8B57 !important;cursor: move}.or-droppable--hover{background-color: #00d95a !important;cursor: move}.or--invisible{visibility: hidden}.or--visible{visibility: visible}main .or-form .or-form-actionbar{display: none}.or-search > .or-input{padding-top: 1px;-webkit-box-shadow: 0 0 0 #000 !important;-moz-box-shadow: 0 0 0 #000 !important;box-shadow: 0 0 0 #000 !important;background-color: transparent !important}.or-input{padding: 2px;margin: 0px}.or-input--name{font-weight: bold}.or-input--filename{font-family: 'Source Code Pro', Monospace, Monospaced, Courier}dl.or-notice{padding: 15px}.CodeMirror{height: auto}.or-linklist{display: flex;flex-direction: column;padding: 10% 20%}.or-linklist > .or-linklist-line{border: 1px solid;margin-top: 1em;padding: 1em;border-radius: .5em;-moz-border-radius: .5em;-webkit-border-radius: .5em;-khtml-border-radius: .5em}.or-info{position: relative}.or-info:hover .or-info-popup{display: block}.or-info .or-info-popup{display: none;position: absolute;top: 0px;left: 0px;overflow: visible;border: 0.5em;font-size: 2em;border-radius: .3em;-moz-border-radius: .3em;-webkit-border-radius: .3em;-khtml-border-radius: .3em;padding: 1.0em;z-index: 105}.or-info .or-info-popup > div{display: inline-block}.or-view-flying-button{display: block;bottom: 1em;right: 1em;position: absolute} +@font-face{font-family: 'Oxygen';font-style: normal;font-weight: 400;src: local('Oxygen Regular'), local('Oxygen-Regular'), url('../font/oxygen-v7-latin-regular.woff') format('woff2'), url('../font/oxygen-v7-latin-regular.woff') format('woff')}@font-face{font-family: 'Source Code Pro';font-style: normal;font-weight: 400;src: local('Source Code Pro'), local('SourceCodePro-Regular'), url('../font/source-code-pro-v8-latin-regular.woff2') format('woff2'), url('../font/source-code-pro-v8-latin-regular.woff') format('woff')}@font-face{font-family: 'Material Icons';font-style: normal;font-weight: 400;src: local('Material Icons'), local('MaterialIcons-Regular'), url('../font/MaterialIcons-Regular.woff2') format('woff2'), url('../font/MaterialIcons-Regular.woff') format('woff')}.or-image-icon{font-family: 'Material Icons';font-weight: normal;font-style: normal;display: inline-block;text-transform: none;letter-spacing: normal;word-wrap: normal;white-space: nowrap;direction: ltr;font-feature-settings: 'liga'}.or-image-icon--action-el_text:after{content: "spellcheck"}.or-image-icon--action-el_longtext:after{content: "view_headline"}.or-image-icon--action-el_select:after{content: "list"}.or-image-icon--action-el_number:after{content: "looks_one"}.or-image-icon--action-el_link:after{content: "call_made"}.or-image-icon--action-el_date:after{content: "date_range"}.or-image-icon--action-el_insert:after{content: "keyboard_return"}.or-image-icon--action-el_copy:after{content: "flip_to_back"}.or-image-icon--action-el_linkinfo:after{content: "info"}.or-image-icon--action-el_linkdate:after{content: "info"}.or-image-icon--action-el_code:after{content: "code"}.or-image-icon--action-el_dynamic:after{content: "play_circle_outline"}.or-image-icon--action-el_info:after{content: "info"}.or-image-icon--action-el_infodate:after{content: "info"}.or-image-icon--action-el_checkbox:after{content: "check_box"}.or-image-icon--action-image:after{content: "image"}.or-image-icon--action-link:after{content: "call_made"}.or-image-icon--action-url:after{content: "link"}.or-image-icon--action-alias:after{content: "bookmark_border"}.or-image-icon--action-text:after{content: "text_format"}.or-image-icon--action-page:after{content: "insert_drive_file"}.or-image-icon--action-file:after{content: "save"}.or-image-icon--action-modellist:after{content: "device_hub"}.or-image-icon--action-model:after{content: "device_hub"}.or-image-icon--action-folder:after{content: "folder_open"}.or-image-icon--action-languagelist:after{content: "language"}.or-image-icon--action-language:after{content: "language"}.or-image-icon--action-template:after{content: "receipt"}.or-image-icon--action-templatelist:after{content: "receipt"}.or-image-icon--action-groupllist:after{content: "group"}.or-image-icon--action-group:after{content: "group"}.or-image-icon--action-userlist:after{content: "person"}.or-image-icon--action-user:after{content: "person"}.or-image-icon--action-profile:after{content: "person_pin"}.or-image-icon--method-settings:after{content: "settings"}.or-image-icon--action-configuration:after{content: "settings"}.or-image-icon--action-projectlist:after{content: "list"}.or-image-icon--action-project:after{content: "account_balance"}.or-image-icon--action-macro:after{content: "data_usage"}.or-image-icon--action-membership{content: "card_membership"}.or-image-icon--method-password:after{content: "lock"}.or-image-icon--method-publish:after{content: "cloud_upload"}.or-image-icon--method-show:after{content: "slideshow"}.or-image-icon--method-src:after{content: "code"}.or-image-icon--method-acl:after{content: "https"}.or-image-icon--method-rights:after{content: "https"}.or-image-icon--method-archive:after{content: "schedule"}.or-image-icon--method-mail:after{content: "mail"}.or-image-icon--method-search:after{content: "search"}.or-image-icon--method-add:after{content: "add_box"}.or-image-icon--method-preview:after{content: "desktop_windows"}.or-image-icon--method-edit:after{content: "spellcheck"}.or-image-icon--method-info:after{content: "info"}.or-image-icon--menu-close:after{content: "close"}.or-image-icon--menu-fullscreen:after{content: "fullscreen"}.or-image-icon--menu-edit:after{content: "description"}.or-image-icon--menu-extra:after{content: "build"}.or-image-icon--menu-menu:after{content: "menu"}.or-image-icon--menu-minimize:after{content: "compare_arrows"}.or-image-icon--menu-qrcode:after{content: "phone_android"}.or-image-icon--node-open:after{content: "expand_more"}.or-image-icon--node-closed:after{content: "chevron_right"}.or-image-icon--dropdown:after{content: "arrow_drop_down"}.or-image-icon--database:after{content: "storage"}.or-image-icon--arrow-left:after{content: "chevron_left"}.or-image-icon--arrow-right:after{content: "chevron_right"}.or-image-icon--form-ok:after{content: "done"}.or-image-icon--form-apply:after{content: "done"}.or-image-icon--form-cancel:after{content: "clear"}.or-image-icon--editor-bold:after{content: "format_bold"}.or-image-icon--editor-italic:after{content: "format_italic"}.or-image-icon--editor-headline:after{content: "format_size"}.or-image-icon--editor-help:after{content: "help_outline"}.or-image-icon--editor-fullscreen:after{content: "fullscreen"}.or-image-icon--editor-quote:after{content: "format_quote"}.or-image-icon--editor-unnumberedlist:after{content: "format_list_bulleted"}.or-image-icon--editor-numberedlist:after{content: "format_list_numbered"}.or-image-icon--editor-preview:after{content: "desktop_windows"}.or-image-icon--editor-sidebyside:after{content: "flip"}.or-image-icon--editor-link:after{content: "link"}.or-image-icon--editor-image:after{content: "image"}.or-image-icon--editor-undo:after{content: "undo"}.or-image-icon--editor-redo:after{content: "redo"}.or-image-icon--editor-code:after{content: "code"}.or-image-icon--editor-horizontalrule:after{content: "remove"}.or-image-icon--editor-table:after{content: "view_comfy"}.or-editor-toolbar{font-size: 1.5em}iframe{width: 100%;height: 500px;display: block}.or-notices{display: block;position: fixed;bottom: 40px;right: 40px;width: 25em;z-index: 113}.or-notice{border: 2px solid #000;padding: 1.1em;margin: 5px;position: relative;border-radius: 5px;-moz-border-radius: 5px;-webkit-border-radius: 5px;-khtml-border-radius: 5px;-webkit-box-shadow: 3px 2px 5px #000;-moz-box-shadow: 3px 2px 5px #000;box-shadow: 3px 2px 5px #000}.or-notice-toolbar{float: right;margin: 0 .2em;font-size: 2em;color: gray;cursor: pointer}.or-notice:hover .or-notice-toolbar{color: black}.or-notice-full{display: block;position: fixed;bottom: 10%;top: 10%;right: 10%;left: 10%;width: 80%;z-index: 114}.or-notice-error div.text{font-weight: bold}.or-notice-text{font-size: 1.1em}.or-notice:after{content: '';position: absolute;right: 0;top: 50%;width: 0;height: 0;border: 1em solid transparent;border-right: 0;margin-top: -1em;margin-right: -1em}.or-notice-log{display: none;position: relative;max-height: 90%;overflow: auto;font-family: 'Source Code Pro', Monospace, Monospaced, Courier}.or-notice-full-log{display: block}div.or-onrowvisible{visibility: hidden;display: inline}a:link,a:visited{font-weight: normal;text-decoration: none}a:active,a:hover{font-weight: normal;text-decoration: none}img[align=left],img[align=right]{padding-right: 1px;padding-left: 1px}div.or-logo h2{font-weight: normal;font-size: 24px}div.or-logo p{font-size: 13px}label,.or-clickable{cursor: pointer}.or-droppable--active{background-color: #2E8B57 !important;cursor: move}.or-droppable--hover{background-color: #00d95a !important;cursor: move}.or--invisible{visibility: hidden}.or--visible{visibility: visible}main .or-form .or-form-actionbar{display: none}.or-search > .or-input{padding-top: 1px;-webkit-box-shadow: 0 0 0 #000 !important;-moz-box-shadow: 0 0 0 #000 !important;box-shadow: 0 0 0 #000 !important;background-color: transparent !important}.or-input{padding: 2px;margin: 0px}.or-input--name{font-weight: bold}.or-input--filename{font-family: 'Source Code Pro', Monospace, Monospaced, Courier}dl.or-notice{padding: 15px}.CodeMirror{height: auto}.or-linklist{display: flex;flex-direction: column;padding: 10% 20%}.or-linklist > .or-linklist-line{border: 1px solid;margin-top: 1em;padding: 1em;border-radius: .5em;-moz-border-radius: .5em;-webkit-border-radius: .5em;-khtml-border-radius: .5em}.or-info{position: relative}.or-info:hover .or-info-popup{display: block}.or-info .or-info-popup{display: none;position: absolute;top: 0px;left: 0px;overflow: visible;border: 0.5em;font-size: 2em;border-radius: .3em;-moz-border-radius: .3em;-webkit-border-radius: .3em;-khtml-border-radius: .3em;padding: 1.0em;z-index: 105}.or-info .or-info-popup > div{display: inline-block}.or-view-flying-button{display: block;bottom: 1em;right: 1em;position: absolute} #title{overflow: hidden;padding: 5px}.or-dropdown{z-index: 120;min-width: 250px;position: absolute;padding: 5px 0px;font-style: normal;font-weight: normal;text-decoration: none}.or-dropdown .or-entry{padding: 0}.or-dropdown .or-entry > a{display: flex;align-items: center;padding: 0 .5em}.or-dropdown .or-entry > a *{margin: 0.25em}.or-dropdown .or-entry > a span:first-of-type{flex: 1}.or-dropdown .or-entry > .or-text{display: block;margin: 10px}.or-dropdown .or-divide{height: 1px;width: 100%;margin-top: 5px;margin-bottom: 5px}.or-menu{display: flex;justify-content: space-between}.or-menu .or-menu-group{display: flex}.or-menu .or-menu-group:nth-last-child(1) div.dropdown{right: 10px}.or-menu .or-menu-group .or-image-icon{width: 1.1em}.or-menu .or-menu-group .or-toolbar-icon{padding: 2px;margin-left: 10px;float: left}.or-menu .or-menu-group .or-toolbar-icon.or-user,.or-menu .or-menu-group .or-toolbar-icon.or-search,.or-menu .or-menu-group .or-toolbar-icon.or-history{float: right;margin-right: 10px;margin-left: 10px}.or-menu .or-menu-group .or-toolbar-icon.or-menu-category{cursor: default}.or-menu .or-menu-group .or-toolbar-icon.or-search input{border: 0;margin: 0;padding: 0;width: 3em;display: inline;transition: width .3s ease-in-out}.or-menu .or-menu-group .or-toolbar-icon.or-search input:focus{width: 8em}.or-menu--is-open .or-menu-category--is-open > .or-dropdown{display: block}.or-dropdown{display: none}.or-dropdown--is-open{display: block} .or-collapsible{display: flex;flex-direction: column}.or-collapsible .or-collapsible-act-switch{cursor: pointer}.or-collapsible > .or-collapsible-value{transition: opacity .3s ease-out;flex: 1;display: block}.or-collapsible > .or-collapsible-title{padding-bottom: 0.1em}.or-collapsible--is-closed > * > .or-collapsible--on-closed{display: inline}.or-collapsible--is-closed > * > .or-collapsible--on-open{display: none}.or-collapsible--is-closed > .or-collapsible-value{opacity: 0;max-height: 0;overflow: hidden}.or-collapsible--is-open > .or-collapsible-title{border-bottom: 1px solid}.or-collapsible--is-open > .or-collapsible-value{height: auto}.or-collapsible--is-open > * > .or-collapsible--on-closed{display: none}.or-collapsible--is-open > * > .or-collapsible--on-open{display: inline} .or-form{display: flex;height: 100%;flex-direction: column;padding: 1em}.or-form .or-form-headline{height: 2em}.or-form .or-form-content{flex-grow: 1;overflow-y: auto}.or-form input[type=checkbox] + label,.or-form input[type=radio] + label{width: 80%}.or-form .or-headline{font-size: 1.8em}.or-form div.or-inputholder > div.or-dropdown{width: 70%}.or-form input.or-submit{padding: 7px;border: 0px;-moz-border-radius: 7px;-webkit-border-radius: 7px;-khtml-border-radius: 7px;border-radius: 7px;margin-left: 20px;cursor: pointer}.or-form .or-input{width: 100%;border: 1px solid #ccc;border-radius: 4px;box-sizing: border-box;resize: vertical}.or-form .or-label{float: left;width: 25%;margin-top: 6px}.or-form .or-value{float: left;width: 75%;margin-top: 6px}.or-form .or-line:after{content: "";display: table;clear: both}.or-form .or-form-row{display: flex;align-items: center}.or-form .or-form-row .or-form-label{width: 25%}.or-form .or-form-row .or-form-input{width: 75%}.or-form .or-form-actionbar{height: 3em;position: sticky;bottom: 0;left: 0;right: 0;display: flex;justify-content: end;padding: 1em;height: auto}.or-form .or-form-actionbar .or-btn{padding: 1em 2em;margin-left: 1.5em;min-width: 14em}@media only screen and (max-width: 65rem){.or-form div.or-label,.or-form div.or-value{width: 100%;margin-top: 0}.or-form .or-form-row{flex-direction: column}.or-form .or-form-row .or-form-label,.or-form .or-form-row .or-form-input{width: 100%}.or-form .or-form-actionbar .or-btn{padding: 1em 1em;min-width: 5em}.or-form .or-form-actionbar .or-act-form-apply{display: none}.or-form .or-form-actionbar .or-btn--secondary{min-width: 0}}.or-btn{padding: .5em .5em;border: 1px solid #000;border-radius: .5em;-moz-border-radius: .5em;-webkit-border-radius: .5em;-khtml-border-radius: .5em;cursor: pointer}.or-btn--primary{font-weight: bold}