glebtv-ckeditor 4.5.10.3 → 4.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/ckeditor/config.js.erb +1 -1
- data/lib/ckeditor.rb +1 -0
- data/lib/ckeditor/version.rb +2 -2
- data/lib/generators/ckeditor/templates/active_record/carrierwave/migration.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/dragonfly/migration.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/paperclip/migration.rb +1 -1
- data/lib/generators/ckeditor/templates/active_record/refile/migration.rb +1 -1
- data/vendor/assets/javascripts/ckeditor/LICENSE.md +2 -2
- data/vendor/assets/javascripts/ckeditor/adapters/jquery.js +1 -1
- data/vendor/assets/javascripts/ckeditor/build-config.js +26 -26
- data/vendor/assets/javascripts/ckeditor/ckeditor.js +605 -576
- data/vendor/assets/javascripts/ckeditor/lang/en.js +2 -2
- data/vendor/assets/javascripts/ckeditor/lang/ru.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/css/styles.css +9 -0
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/dialogs/ckcss.js +2 -1
- data/vendor/assets/javascripts/ckeditor/plugins/CKCss/plugin.js +3 -1
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +6 -6
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +3 -4
- data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +4 -4
- data/vendor/assets/javascripts/ckeditor/plugins/about/dialogs/about.js +4 -3
- data/vendor/assets/javascripts/ckeditor/plugins/clipboard/dialogs/paste.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/LICENSE.md +21 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.ckeditor.css +183 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.css +341 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/css/codemirror.min.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/comment.js +206 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/comment/continuecomment.js +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.css +32 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/dialog/dialog.js +157 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closebrackets.js +202 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/closetag.js +169 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/continuelist.js +51 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchbrackets.js +122 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/matchtags.js +66 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/edit/trailingspace.js +27 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/brace-fold.js +105 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/comment-fold.js +59 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldcode.js +150 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.css +20 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/foldgutter.js +146 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/indent-fold.js +44 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/markdown-fold.js +49 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/fold/xml-fold.js +182 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/autoFormatAll.js +43 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/format/formatting.js +226 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/anyword-hint.js +41 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/css-hint.js +60 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/html-hint.js +348 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/javascript-hint.js +155 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/show-hint.css +36 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/show-hint.js +438 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/sql-hint.js +271 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/hint/xml-hint.js +110 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/loadmode.js +64 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex.js +123 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/multiplex_test.js +33 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/overlay.js +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/mode/simple.js +213 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/jump-to-line.js +49 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/match-highlighter.js +165 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.css +8 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/matchesonscrollbar.js +97 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/search.js +252 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/search/searchcursor.js +189 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/active-line.js +74 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/mark-selection.js +118 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/addon/selection/selection-pointer.js +98 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify-html.js +952 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/beautify.js +2087 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.addons.search.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.js +9109 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.php.min.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/bbcode.js +137 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcode/index.html +73 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/bbcodemixed.js +161 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/bbcodemixed/index.html +128 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/clike.js +785 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/index.html +360 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/scala.html +767 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/clike/test.js +55 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/css.js +825 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss.html +103 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/gss_test.js +17 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/index.html +75 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less.html +152 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/less_test.js +54 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss.html +157 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/scss_test.js +110 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/css/test.js +200 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/htmlembedded.js +28 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlembedded/index.html +60 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/htmlmixed.js +152 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/htmlmixed/index.html +89 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/index.html +114 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/javascript.js +784 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/json-ld.html +72 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/test.js +247 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/javascript/typescript.html +61 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/index.html +64 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/php.js +234 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/php/test.js +154 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/index.html +61 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/test.js +51 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/mode/xml/xml.js +394 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/plugin.js +30 -24
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/dracula.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-dark.css +35 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/duotone-light.css +36 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/panda-syntax.css +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/pastel-on-dark.css +0 -1
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/theme/solarized.css +21 -15
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/colordialog/dialogs/colordialog.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/dialog/dialogDefinition.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/find/dialogs/find.js +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/flash/dialogs/flash.js +12 -12
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/button.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/checkbox.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/form.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/hiddenfield.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/radio.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/select.js +11 -11
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textarea.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/forms/dialogs/textfield.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/iframe/dialogs/iframe.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/iframedialog/plugin.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/image/dialogs/image.js +28 -28
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/LICENSE +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/README.md +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/LANG.js +3 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/en.js +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/lang/ru.js +3 -3
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/plugin.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/lineheight/readme.txt +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/anchor.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/link/dialogs/link.js +25 -23
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/liststyle/dialogs/liststyle.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/notification/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/notification/plugin.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/pastefromword/filter/default.js +40 -29
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +19 -19
- data/vendor/assets/javascripts/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +20 -0
- data/vendor/assets/javascripts/ckeditor/plugins/smiley/dialogs/smiley.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/en.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/specialchar.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/plugin.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/assets/sample.css +70 -0
- data/vendor/assets/javascripts/ckeditor/plugins/stylesheetparser/samples/stylesheetparser.html +85 -0
- data/vendor/assets/javascripts/ckeditor/plugins/table/dialogs/table.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/tabletools/dialogs/tableCell.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.css +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/dialogs/templates.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +2 -2
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template1.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template2.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/images/template3.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/css/wordcount.css +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/en.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/lang/ru.js +1 -1
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/plugin.js +60 -13
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/samples/wordcount.html +61 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wordcount/samples/wordcountWithMaxCount.html +110 -0
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +9 -9
- data/vendor/assets/javascripts/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/LICENSE.md +15 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/images/icon.png +0 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/en.js +3 -1
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/lang/ru.js +1 -0
- data/vendor/assets/javascripts/ckeditor/plugins/youtube/plugin.js +448 -388
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/icons16.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/icons16.svg +175 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/icons32.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/icons32.svg +167 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dev/locations.json +145 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/readme.md +46 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono-lisa/skin.js +7 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie7.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_ie8.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/dialog_iequirks.css +1 -1
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_gecko.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie7.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_ie8.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/editor_iequirks.css +2 -2
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/icons_hidpi.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/anchor.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/close.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/hidpi/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock-open.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/lock.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/images/refresh.png +0 -0
- data/vendor/assets/javascripts/ckeditor/skins/moono/readme.md +3 -3
- data/vendor/assets/javascripts/ckeditor/styles.js +42 -16
- metadata +161 -105
- data/app/assets/javascripts/ckeditor/config_orig.js +0 -58
- data/vendor/assets/javascripts/ckeditor/README.md +0 -39
- data/vendor/assets/javascripts/ckeditor/config.js +0 -10
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/af.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ar.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bg.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bn.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/bs.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ca.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/cs.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/cy.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/da.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/de.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/el.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-au.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-ca.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/en-gb.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/eo.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/es.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/et.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/eu.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fa.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fi.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fo.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fr-ca.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/fr.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/gl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/gu.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/he.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hi.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hr.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/hu.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/is.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/it.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ja.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ka.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/km.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ko.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ku.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/lt.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/lv.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/mk.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/mn.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ms.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/nb.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/nl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/no.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pt-br.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/pt.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ro.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sk.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sl.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sr-latn.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sr.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/sv.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/th.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/tr.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/ug.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/uk.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/vi.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/zh-cn.js +0 -12
- data/vendor/assets/javascripts/ckeditor/plugins/codemirror/lang/zh.js +0 -12
@@ -1 +1 @@
|
|
1
|
-
(function(a){if(typeof exports=="object"&&typeof module=="object"){module.exports=a()}else{if(typeof define=="function"&&define.amd){return define([],a)}else{(this||window).CodeMirror=a()}}})(function(){var d1=navigator.userAgent;var ec=navigator.platform;var cn=/gecko\/\d/i.test(d1);var eO=/MSIE \d/.test(d1);var bI=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(d1);var dK=eO||bI;var k=dK&&(eO?document.documentMode||6:bI[1]);var cZ=/WebKit\//.test(d1);var dN=cZ&&/Qt\/\d+\.\d+/.test(d1);var dc=/Chrome\//.test(d1);var d4=/Opera\//.test(d1);var aB=/Apple Computer/.test(navigator.vendor);var c6=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(d1);var fz=/PhantomJS/.test(d1);var e5=/AppleWebKit/.test(d1)&&/Mobile\/\w+/.test(d1);var ei=e5||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(d1);var b6=e5||/Mac/.test(ec);var fO=/\bCrOS\b/.test(d1);var aO=/win/i.test(ec);var aY=d4&&d1.match(/Version\/(\d*\.\d*)/);if(aY){aY=Number(aY[1])}if(aY&&aY>=15){d4=false;cZ=true}var bP=b6&&(dN||d4&&(aY==null||aY<12.11));var gg=cn||(dK&&k>=9);var gj=false,a6=false;function H(gr,gt){if(!(this instanceof H)){return new H(gr,gt)}this.options=gt=gt?aM(gt):{};aM(e7,gt,false);cd(gt);var gx=gt.value;if(typeof gx=="string"){gx=new ar(gx,gt.mode,null,gt.lineSeparator)}this.doc=gx;var gs=new H.inputStyles[gt.inputStyle](this);var gw=this.display=new eL(gr,gx,gs);gw.wrapper.CodeMirror=this;ee(this);cN(this);if(gt.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}if(gt.autofocus&&!ei){gw.input.focus()}aC(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,delayingBlurEvent:false,focused:false,suppressEdits:false,pasteIncoming:false,cutIncoming:false,selectingText:false,draggingText:false,highlight:new gp(),keySeq:null,specialChars:null};var gq=this;if(dK&&k<11){setTimeout(function(){gq.display.input.reset(true)},20)}fW(this);bi();cH(this);this.curOp.forceUpdate=true;ed(this,gx);if((gt.autofocus&&!ei)||gq.hasFocus()){setTimeout(cu(cA,this),20)}else{aU(this)}for(var gv in be){if(be.hasOwnProperty(gv)){be[gv](this,gt[gv],cb)}}d6(this);if(gt.finishInit){gt.finishInit(this)}for(var gu=0;gu<a7.length;++gu){a7[gu](this)}al(this);if(cZ&>.lineWrapping&&getComputedStyle(gw.lineDiv).textRendering=="optimizelegibility"){gw.lineDiv.style.textRendering="auto"}}function eL(gq,gs,gr){var gt=this;this.input=gr;gt.scrollbarFiller=f9("div",null,"CodeMirror-scrollbar-filler");gt.scrollbarFiller.setAttribute("cm-not-content","true");gt.gutterFiller=f9("div",null,"CodeMirror-gutter-filler");gt.gutterFiller.setAttribute("cm-not-content","true");gt.lineDiv=f9("div",null,"CodeMirror-code");gt.selectionDiv=f9("div",null,null,"position: relative; z-index: 1");gt.cursorDiv=f9("div",null,"CodeMirror-cursors");gt.measure=f9("div",null,"CodeMirror-measure");gt.lineMeasure=f9("div",null,"CodeMirror-measure");gt.lineSpace=f9("div",[gt.measure,gt.lineMeasure,gt.selectionDiv,gt.cursorDiv,gt.lineDiv],null,"position: relative; outline: none");gt.mover=f9("div",[f9("div",[gt.lineSpace],"CodeMirror-lines")],null,"position: relative");gt.sizer=f9("div",[gt.mover],"CodeMirror-sizer");gt.sizerWidth=null;gt.heightForcer=f9("div",null,null,"position: absolute; height: "+dJ+"px; width: 1px;");gt.gutters=f9("div",null,"CodeMirror-gutters");gt.lineGutter=null;gt.scroller=f9("div",[gt.sizer,gt.heightForcer,gt.gutters],"CodeMirror-scroll");gt.scroller.setAttribute("tabIndex","-1");gt.wrapper=f9("div",[gt.scrollbarFiller,gt.gutterFiller,gt.scroller],"CodeMirror");if(dK&&k<8){gt.gutters.style.zIndex=-1;gt.scroller.style.paddingRight=0}if(!cZ&&!(cn&&ei)){gt.scroller.draggable=true}if(gq){if(gq.appendChild){gq.appendChild(gt.wrapper)}else{gq(gt.wrapper)}}gt.viewFrom=gt.viewTo=gs.first;gt.reportedViewFrom=gt.reportedViewTo=gs.first;gt.view=[];gt.renderedView=null;gt.externalMeasured=null;gt.viewOffset=0;gt.lastWrapHeight=gt.lastWrapWidth=0;gt.updateLineNumbers=null;gt.nativeBarWidth=gt.barHeight=gt.barWidth=0;gt.scrollbarsClipped=false;gt.lineNumWidth=gt.lineNumInnerWidth=gt.lineNumChars=null;gt.alignWidgets=false;gt.cachedCharWidth=gt.cachedTextHeight=gt.cachedPaddingH=null;gt.maxLine=null;gt.maxLineLength=0;gt.maxLineChanged=false;gt.wheelDX=gt.wheelDY=gt.wheelStartX=gt.wheelStartY=null;gt.shift=false;gt.selForContextMenu=null;gt.activeTouch=null;gr.init(gt)}function bq(gq){gq.doc.mode=H.getMode(gq.options,gq.doc.modeOption);eo(gq)}function eo(gq){gq.doc.iter(function(gr){if(gr.stateAfter){gr.stateAfter=null}if(gr.styles){gr.styles=null}});gq.doc.frontier=gq.doc.first;eh(gq,100);gq.state.modeGen++;if(gq.curOp){ah(gq)}}function eJ(gq){if(gq.options.lineWrapping){fF(gq.display.wrapper,"CodeMirror-wrap");gq.display.sizer.style.minWidth="";gq.display.sizerWidth=null}else{f(gq.display.wrapper,"CodeMirror-wrap");h(gq)}X(gq);ah(gq);aj(gq);setTimeout(function(){e2(gq)},100)}function bd(gq){var gs=aX(gq.display),gr=gq.options.lineWrapping;var gt=gr&&Math.max(5,gq.display.scroller.clientWidth/dD(gq.display)-3);return function(gv){if(fB(gq.doc,gv)){return 0}var gu=0;if(gv.widgets){for(var gw=0;gw<gv.widgets.length;gw++){if(gv.widgets[gw].height){gu+=gv.widgets[gw].height}}}if(gr){return gu+(Math.ceil(gv.text.length/gt)||1)*gs}else{return gu+gs}}}function X(gq){var gs=gq.doc,gr=bd(gq);gs.iter(function(gt){var gu=gr(gt);if(gu!=gt.height){gc(gt,gu)}})}function cN(gq){gq.display.wrapper.className=gq.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+gq.options.theme.replace(/(^|\s)\s*/g," cm-s-");aj(gq)}function dw(gq){ee(gq);ah(gq);setTimeout(function(){eH(gq)},20)}function ee(gq){var gr=gq.display.gutters,gv=gq.options.gutters;d2(gr);for(var gs=0;gs<gv.length;++gs){var gt=gv[gs];var gu=gr.appendChild(f9("div",null,"CodeMirror-gutter "+gt));if(gt=="CodeMirror-linenumbers"){gq.display.lineGutter=gu;gu.style.width=(gq.display.lineNumWidth||1)+"px"}}gr.style.display=gs?"":"none";c3(gq)}function c3(gq){var gr=gq.display.gutters.offsetWidth;gq.display.sizer.style.marginLeft=gr+"px"}function eq(gs){if(gs.height==0){return 0}var gr=gs.text.length,gq,gu=gs;while(gq=eS(gu)){var gt=gq.find(0,true);gu=gt.from.line;gr+=gt.from.ch-gt.to.ch}gu=gs;while(gq=ex(gu)){var gt=gq.find(0,true);gr-=gu.text.length-gt.from.ch;gu=gt.to.line;gr+=gu.text.length-gt.to.ch}return gr}function h(gq){var gs=gq.display,gr=gq.doc;gs.maxLine=fk(gr,gr.first);gs.maxLineLength=eq(gs.maxLine);gs.maxLineChanged=true;gr.iter(function(gu){var gt=eq(gu);if(gt>gs.maxLineLength){gs.maxLineLength=gt;gs.maxLine=gu}})}function cd(gq){var gr=dh(gq.gutters,"CodeMirror-linenumbers");if(gr==-1&&gq.lineNumbers){gq.gutters=gq.gutters.concat(["CodeMirror-linenumbers"])}else{if(gr>-1&&!gq.lineNumbers){gq.gutters=gq.gutters.slice(0);gq.gutters.splice(gr,1)}}}function dA(gq){var gt=gq.display,gs=gt.gutters.offsetWidth;var gr=Math.round(gq.doc.height+bH(gq.display));return{clientHeight:gt.scroller.clientHeight,viewHeight:gt.wrapper.clientHeight,scrollWidth:gt.scroller.scrollWidth,clientWidth:gt.scroller.clientWidth,viewWidth:gt.wrapper.clientWidth,barLeft:gq.options.fixedGutter?gs:0,docHeight:gr,scrollHeight:gr+cS(gq)+gt.barHeight,nativeBarWidth:gt.nativeBarWidth,gutterWidth:gs}}function dk(gs,gr,gq){this.cm=gq;var gt=this.vert=f9("div",[f9("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");var gu=this.horiz=f9("div",[f9("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");gs(gt);gs(gu);bW(gt,"scroll",function(){if(gt.clientHeight){gr(gt.scrollTop,"vertical")}});bW(gu,"scroll",function(){if(gu.clientWidth){gr(gu.scrollLeft,"horizontal")}});this.checkedZeroWidth=false;if(dK&&k<8){this.horiz.style.minHeight=this.vert.style.minWidth="18px"}}dk.prototype=aM({update:function(gt){var gu=gt.scrollWidth>gt.clientWidth+1;var gs=gt.scrollHeight>gt.clientHeight+1;var gv=gt.nativeBarWidth;if(gs){this.vert.style.display="block";this.vert.style.bottom=gu?gv+"px":"0";var gr=gt.viewHeight-(gu?gv:0);this.vert.firstChild.style.height=Math.max(0,gt.scrollHeight-gt.clientHeight+gr)+"px"}else{this.vert.style.display="";this.vert.firstChild.style.height="0"}if(gu){this.horiz.style.display="block";this.horiz.style.right=gs?gv+"px":"0";this.horiz.style.left=gt.barLeft+"px";var gq=gt.viewWidth-gt.barLeft-(gs?gv:0);this.horiz.firstChild.style.width=(gt.scrollWidth-gt.clientWidth+gq)+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}if(!this.checkedZeroWidth&>.clientHeight>0){if(gv==0){this.zeroWidthHack()}this.checkedZeroWidth=true}return{right:gs?gv:0,bottom:gu?gv:0}},setScrollLeft:function(gq){if(this.horiz.scrollLeft!=gq){this.horiz.scrollLeft=gq}if(this.disableHoriz){this.enableZeroWidthBar(this.horiz,this.disableHoriz)}},setScrollTop:function(gq){if(this.vert.scrollTop!=gq){this.vert.scrollTop=gq}if(this.disableVert){this.enableZeroWidthBar(this.vert,this.disableVert)}},zeroWidthHack:function(){var gq=b6&&!c6?"12px":"18px";this.horiz.style.height=this.vert.style.width=gq;this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none";this.disableHoriz=new gp;this.disableVert=new gp},enableZeroWidthBar:function(gr,gq){gr.style.pointerEvents="auto";function gs(){var gu=gr.getBoundingClientRect();var gt=document.elementFromPoint(gu.left+1,gu.bottom-1);if(gt!=gr){gr.style.pointerEvents="none"}else{gq.set(1000,gs)}}gq.set(1000,gs)},clear:function(){var gq=this.horiz.parentNode;gq.removeChild(this.horiz);gq.removeChild(this.vert)}},dk.prototype);function e8(){}e8.prototype=aM({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},e8.prototype);H.scrollbarModel={"native":dk,"null":e8};function aC(gq){if(gq.display.scrollbars){gq.display.scrollbars.clear();if(gq.display.scrollbars.addClass){f(gq.display.wrapper,gq.display.scrollbars.addClass)}}gq.display.scrollbars=new H.scrollbarModel[gq.options.scrollbarStyle](function(gr){gq.display.wrapper.insertBefore(gr,gq.display.scrollbarFiller);bW(gr,"mousedown",function(){if(gq.state.focused){setTimeout(function(){gq.display.input.focus()},0)}});gr.setAttribute("cm-not-content","true")},function(gs,gr){if(gr=="horizontal"){bD(gq,gs)}else{N(gq,gs)}},gq);if(gq.display.scrollbars.addClass){fF(gq.display.wrapper,gq.display.scrollbars.addClass)}}function e2(gs,gu){if(!gu){gu=dA(gs)}var gr=gs.display.barWidth,gq=gs.display.barHeight;aT(gs,gu);for(var gt=0;gt<4&&gr!=gs.display.barWidth||gq!=gs.display.barHeight;gt++){if(gr!=gs.display.barWidth&&gs.options.lineWrapping){a8(gs)}aT(gs,dA(gs));gr=gs.display.barWidth;gq=gs.display.barHeight}}function aT(gq,gr){var gt=gq.display;var gs=gt.scrollbars.update(gr);gt.sizer.style.paddingRight=(gt.barWidth=gs.right)+"px";gt.sizer.style.paddingBottom=(gt.barHeight=gs.bottom)+"px";gt.heightForcer.style.borderBottom=gs.bottom+"px solid transparent";if(gs.right&&gs.bottom){gt.scrollbarFiller.style.display="block";gt.scrollbarFiller.style.height=gs.bottom+"px";gt.scrollbarFiller.style.width=gs.right+"px"}else{gt.scrollbarFiller.style.display=""}if(gs.bottom&&gq.options.coverGutterNextToScrollbar&&gq.options.fixedGutter){gt.gutterFiller.style.display="block";gt.gutterFiller.style.height=gs.bottom+"px";gt.gutterFiller.style.width=gr.gutterWidth+"px"}else{gt.gutterFiller.style.display=""}}function b5(gt,gx,gs){var gu=gs&&gs.top!=null?Math.max(0,gs.top):gt.scroller.scrollTop;gu=Math.floor(gu-fd(gt));var gq=gs&&gs.bottom!=null?gs.bottom:gu+gt.wrapper.clientHeight;var gv=bF(gx,gu),gw=bF(gx,gq);if(gs&&gs.ensure){var gr=gs.ensure.from.line,gy=gs.ensure.to.line;if(gr<gv){gv=gr;gw=bF(gx,bL(fk(gx,gr))+gt.wrapper.clientHeight)}else{if(Math.min(gy,gx.lastLine())>=gw){gv=bF(gx,bL(fk(gx,gy))-gt.wrapper.clientHeight);gw=gy}}}return{from:gv,to:Math.max(gw,gv+1)}}function eH(gy){var gw=gy.display,gx=gw.view;if(!gw.alignWidgets&&(!gw.gutters.firstChild||!gy.options.fixedGutter)){return}var gu=dX(gw)-gw.scroller.scrollLeft+gy.doc.scrollLeft;var gq=gw.gutters.offsetWidth,gr=gu+"px";for(var gt=0;gt<gx.length;gt++){if(!gx[gt].hidden){if(gy.options.fixedGutter&&gx[gt].gutter){gx[gt].gutter.style.left=gr}var gv=gx[gt].alignable;if(gv){for(var gs=0;gs<gv.length;gs++){gv[gs].style.left=gr}}}}if(gy.options.fixedGutter){gw.gutters.style.left=(gu+gq)+"px"}}function d6(gq){if(!gq.options.lineNumbers){return false}var gv=gq.doc,gr=ev(gq.options,gv.first+gv.size-1),gu=gq.display;if(gr.length!=gu.lineNumChars){var gw=gu.measure.appendChild(f9("div",[f9("div",gr)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var gs=gw.firstChild.offsetWidth,gt=gw.offsetWidth-gs;gu.lineGutter.style.width="";gu.lineNumInnerWidth=Math.max(gs,gu.lineGutter.offsetWidth-gt)+1;gu.lineNumWidth=gu.lineNumInnerWidth+gt;gu.lineNumChars=gu.lineNumInnerWidth?gr.length:-1;gu.lineGutter.style.width=gu.lineNumWidth+"px";c3(gq);return true}return false}function ev(gq,gr){return String(gq.lineNumberFormatter(gr+gq.firstLineNumber))}function dX(gq){return gq.scroller.getBoundingClientRect().left-gq.sizer.getBoundingClientRect().left}function aH(gr,gq,gs){var gt=gr.display;this.viewport=gq;this.visible=b5(gt,gr.doc,gq);this.editorIsHidden=!gt.wrapper.offsetWidth;this.wrapperHeight=gt.wrapper.clientHeight;this.wrapperWidth=gt.wrapper.clientWidth;this.oldDisplayWidth=dl(gr);this.force=gs;this.dims=fi(gr);this.events=[]}aH.prototype.signal=function(gr,gq){if(fn(gr,gq)){this.events.push(arguments)}};aH.prototype.finish=function(){for(var gq=0;gq<this.events.length;gq++){aD.apply(null,this.events[gq])}};function J(gq){var gr=gq.display;if(!gr.scrollbarsClipped&&gr.scroller.offsetWidth){gr.nativeBarWidth=gr.scroller.offsetWidth-gr.scroller.clientWidth;gr.heightForcer.style.height=cS(gq)+"px";gr.sizer.style.marginBottom=-gr.nativeBarWidth+"px";gr.sizer.style.borderRightWidth=cS(gq)+"px";gr.scrollbarsClipped=true}}function B(gz,gt){var gu=gz.display,gy=gz.doc;if(gt.editorIsHidden){eA(gz);return false}if(!gt.force&>.visible.from>=gu.viewFrom&>.visible.to<=gu.viewTo&&(gu.updateLineNumbers==null||gu.updateLineNumbers>=gu.viewTo)&&gu.renderedView==gu.view&&db(gz)==0){return false}if(d6(gz)){eA(gz);gt.dims=fi(gz)}var gs=gy.first+gy.size;var gw=Math.max(gt.visible.from-gz.options.viewportMargin,gy.first);var gx=Math.min(gs,gt.visible.to+gz.options.viewportMargin);if(gu.viewFrom<gw&&gw-gu.viewFrom<20){gw=Math.max(gy.first,gu.viewFrom)}if(gu.viewTo>gx&&gu.viewTo-gx<20){gx=Math.min(gs,gu.viewTo)}if(a6){gw=aV(gz.doc,gw);gx=d3(gz.doc,gx)}var gr=gw!=gu.viewFrom||gx!=gu.viewTo||gu.lastWrapHeight!=gt.wrapperHeight||gu.lastWrapWidth!=gt.wrapperWidth;cQ(gz,gw,gx);gu.viewOffset=bL(fk(gz.doc,gu.viewFrom));gz.display.mover.style.top=gu.viewOffset+"px";var gq=db(gz);if(!gr&&gq==0&&!gt.force&&gu.renderedView==gu.view&&(gu.updateLineNumbers==null||gu.updateLineNumbers>=gu.viewTo)){return false}var gv=dO();if(gq>4){gu.lineDiv.style.display="none"}cl(gz,gu.updateLineNumbers,gt.dims);if(gq>4){gu.lineDiv.style.display=""}gu.renderedView=gu.view;if(gv&&dO()!=gv&&gv.offsetHeight){gv.focus()}d2(gu.cursorDiv);d2(gu.selectionDiv);gu.gutters.style.height=gu.sizer.style.minHeight=0;if(gr){gu.lastWrapHeight=gt.wrapperHeight;gu.lastWrapWidth=gt.wrapperWidth;eh(gz,400)}gu.updateLineNumbers=null;return true}function ci(gr,gu){var gq=gu.viewport;for(var gt=true;;gt=false){if(!gt||!gr.options.lineWrapping||gu.oldDisplayWidth==dl(gr)){if(gq&&gq.top!=null){gq={top:Math.min(gr.doc.height+bH(gr.display)-cU(gr),gq.top)}}gu.visible=b5(gr.display,gr.doc,gq);if(gu.visible.from>=gr.display.viewFrom&&gu.visible.to<=gr.display.viewTo){break}}if(!B(gr,gu)){break}a8(gr);var gs=dA(gr);bB(gr);e2(gr,gs);dz(gr,gs)}gu.signal(gr,"update",gr);if(gr.display.viewFrom!=gr.display.reportedViewFrom||gr.display.viewTo!=gr.display.reportedViewTo){gu.signal(gr,"viewportChange",gr,gr.display.viewFrom,gr.display.viewTo);gr.display.reportedViewFrom=gr.display.viewFrom;gr.display.reportedViewTo=gr.display.viewTo}}function dT(gr,gq){var gt=new aH(gr,gq);if(B(gr,gt)){a8(gr);ci(gr,gt);var gs=dA(gr);bB(gr);e2(gr,gs);dz(gr,gs);gt.finish()}}function dz(gq,gr){gq.display.sizer.style.minHeight=gr.docHeight+"px";gq.display.heightForcer.style.top=gr.docHeight+"px";gq.display.gutters.style.height=(gr.docHeight+gq.display.barHeight+cS(gq))+"px"}function a8(gx){var gv=gx.display;var gr=gv.lineDiv.offsetTop;for(var gs=0;gs<gv.view.length;gs++){var gy=gv.view[gs],gz;if(gy.hidden){continue}if(dK&&k<8){var gu=gy.node.offsetTop+gy.node.offsetHeight;gz=gu-gr;gr=gu}else{var gt=gy.node.getBoundingClientRect();gz=gt.bottom-gt.top}var gw=gy.line.height-gz;if(gz<2){gz=aX(gv)}if(gw>0.001||gw<-0.001){gc(gy.line,gz);ca(gy.line);if(gy.rest){for(var gq=0;gq<gy.rest.length;gq++){ca(gy.rest[gq])}}}}}function ca(gq){if(gq.widgets){for(var gr=0;gr<gq.widgets.length;++gr){gq.widgets[gr].height=gq.widgets[gr].node.parentNode.offsetHeight}}}function fi(gq){var gv=gq.display,gt={},gs={};var gu=gv.gutters.clientLeft;for(var gw=gv.gutters.firstChild,gr=0;gw;gw=gw.nextSibling,++gr){gt[gq.options.gutters[gr]]=gw.offsetLeft+gw.clientLeft+gu;gs[gq.options.gutters[gr]]=gw.clientWidth}return{fixedPos:dX(gv),gutterTotalWidth:gv.gutters.offsetWidth,gutterLeft:gt,gutterWidth:gs,wrapperWidth:gv.wrapper.clientWidth}}function cl(gB,gs,gA){var gx=gB.display,gD=gB.options.lineNumbers;var gq=gx.lineDiv,gC=gq.firstChild;function gw(gF){var gE=gF.nextSibling;if(cZ&&b6&&gB.display.currentWheelTarget==gF){gF.style.display="none"}else{gF.parentNode.removeChild(gF)}return gE}var gy=gx.view,gv=gx.viewFrom;for(var gt=0;gt<gy.length;gt++){var gu=gy[gt];if(gu.hidden){}else{if(!gu.node||gu.node.parentNode!=gq){var gr=aE(gB,gu,gv,gA);gq.insertBefore(gr,gC)}else{while(gC!=gu.node){gC=gw(gC)}var gz=gD&&gs!=null&&gs<=gv&&gu.lineNumber;if(gu.changes){if(dh(gu.changes,"gutter")>-1){gz=false}ab(gB,gu,gv,gA)}if(gz){d2(gu.lineNumber);gu.lineNumber.appendChild(document.createTextNode(ev(gB.options,gv)))}gC=gu.node.nextSibling}}gv+=gu.size}while(gC){gC=gw(gC)}}function ab(gq,gs,gu,gv){for(var gr=0;gr<gs.changes.length;gr++){var gt=gs.changes[gr];if(gt=="text"){fq(gq,gs)}else{if(gt=="gutter"){df(gq,gs,gu,gv)}else{if(gt=="class"){dG(gs)}else{if(gt=="widget"){an(gq,gs,gv)}}}}}gs.changes=null}function fM(gq){if(gq.node==gq.text){gq.node=f9("div",null,null,"position: relative");if(gq.text.parentNode){gq.text.parentNode.replaceChild(gq.node,gq.text)}gq.node.appendChild(gq.text);if(dK&&k<8){gq.node.style.zIndex=2}}return gq.node}function ez(gr){var gq=gr.bgClass?gr.bgClass+" "+(gr.line.bgClass||""):gr.line.bgClass;if(gq){gq+=" CodeMirror-linebackground"}if(gr.background){if(gq){gr.background.className=gq}else{gr.background.parentNode.removeChild(gr.background);gr.background=null}}else{if(gq){var gs=fM(gr);gr.background=gs.insertBefore(f9("div",null,gq),gs.firstChild)}}}function dV(gq,gr){var gs=gq.display.externalMeasured;if(gs&&gs.line==gr.line){gq.display.externalMeasured=null;gr.measure=gs.measure;return gs.built}return eV(gq,gr)}function fq(gq,gt){var gr=gt.text.className;var gs=dV(gq,gt);if(gt.text==gt.node){gt.node=gs.pre}gt.text.parentNode.replaceChild(gs.pre,gt.text);gt.text=gs.pre;if(gs.bgClass!=gt.bgClass||gs.textClass!=gt.textClass){gt.bgClass=gs.bgClass;gt.textClass=gs.textClass;dG(gt)}else{if(gr){gt.text.className=gr}}}function dG(gr){ez(gr);if(gr.line.wrapClass){fM(gr).className=gr.line.wrapClass}else{if(gr.node!=gr.text){gr.node.className=""}}var gq=gr.textClass?gr.textClass+" "+(gr.line.textClass||""):gr.line.textClass;gr.text.className=gq||""}function df(gy,gw,gv,gx){if(gw.gutter){gw.node.removeChild(gw.gutter);gw.gutter=null}if(gw.gutterBackground){gw.node.removeChild(gw.gutterBackground);gw.gutterBackground=null}if(gw.line.gutterClass){var gr=fM(gw);gw.gutterBackground=f9("div",null,"CodeMirror-gutter-background "+gw.line.gutterClass,"left: "+(gy.options.fixedGutter?gx.fixedPos:-gx.gutterTotalWidth)+"px; width: "+gx.gutterTotalWidth+"px");gr.insertBefore(gw.gutterBackground,gw.text)}var gt=gw.line.gutterMarkers;if(gy.options.lineNumbers||gt){var gr=fM(gw);var gu=gw.gutter=f9("div",null,"CodeMirror-gutter-wrapper","left: "+(gy.options.fixedGutter?gx.fixedPos:-gx.gutterTotalWidth)+"px");gy.display.input.setUneditable(gu);gr.insertBefore(gu,gw.text);if(gw.line.gutterClass){gu.className+=" "+gw.line.gutterClass}if(gy.options.lineNumbers&&(!gt||!gt["CodeMirror-linenumbers"])){gw.lineNumber=gu.appendChild(f9("div",ev(gy.options,gv),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+gx.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+gy.display.lineNumInnerWidth+"px"))}if(gt){for(var gs=0;gs<gy.options.gutters.length;++gs){var gq=gy.options.gutters[gs],gz=gt.hasOwnProperty(gq)&>[gq];if(gz){gu.appendChild(f9("div",[gz],"CodeMirror-gutter-elt","left: "+gx.gutterLeft[gq]+"px; width: "+gx.gutterWidth[gq]+"px"))}}}}}function an(gq,gr,gu){if(gr.alignable){gr.alignable=null}for(var gt=gr.node.firstChild,gs;gt;gt=gs){var gs=gt.nextSibling;if(gt.className=="CodeMirror-linewidget"){gr.node.removeChild(gt)}}fy(gq,gr,gu)}function aE(gq,gs,gt,gu){var gr=dV(gq,gs);gs.text=gs.node=gr.pre;if(gr.bgClass){gs.bgClass=gr.bgClass}if(gr.textClass){gs.textClass=gr.textClass}dG(gs);df(gq,gs,gt,gu);fy(gq,gs,gu);return gs.node}function fy(gq,gs,gt){ge(gq,gs.line,gs,gt,true);if(gs.rest){for(var gr=0;gr<gs.rest.length;gr++){ge(gq,gs.rest[gr],gs,gt,false)}}}function ge(gy,gz,gv,gx,gt){if(!gz.widgets){return}var gq=fM(gv);for(var gs=0,gw=gz.widgets;gs<gw.length;++gs){var gu=gw[gs],gr=f9("div",[gu.node],"CodeMirror-linewidget");if(!gu.handleMouseEvents){gr.setAttribute("cm-ignore-events","true")}bE(gu,gr,gv,gx);gy.display.input.setUneditable(gr);if(gt&&gu.above){gq.insertBefore(gr,gv.gutter||gv.text)}else{gq.appendChild(gr)}ae(gu,"redraw")}}function bE(gt,gs,gq,gu){if(gt.noHScroll){(gq.alignable||(gq.alignable=[])).push(gs);var gr=gu.wrapperWidth;gs.style.left=gu.fixedPos+"px";if(!gt.coverGutter){gr-=gu.gutterTotalWidth;gs.style.paddingLeft=gu.gutterTotalWidth+"px"}gs.style.width=gr+"px"}if(gt.coverGutter){gs.style.zIndex=5;gs.style.position="relative";if(!gt.noHScroll){gs.style.marginLeft=-gu.gutterTotalWidth+"px"}}}var W=H.Pos=function(gq,gr){if(!(this instanceof W)){return new W(gq,gr)}this.line=gq;this.ch=gr};var ce=H.cmpPos=function(gr,gq){return gr.line-gq.line||gr.ch-gq.ch};function ch(gq){return W(gq.line,gq.ch)}function bw(gr,gq){return ce(gr,gq)<0?gq:gr}function aq(gr,gq){return ce(gr,gq)<0?gr:gq}function r(gq){if(!gq.state.focused){gq.display.input.focus();cA(gq)}}var bl=null;function f5(gE,gu,gs,gr,gD){var gC=gE.doc;gE.display.shift=false;if(!gr){gr=gC.sel}var gt=gE.state.pasteIncoming||gD=="paste";var gx=gC.splitLines(gu),gq=null;if(gt&&gr.ranges.length>1){if(bl&&bl.join("\n")==gu){if(gr.ranges.length%bl.length==0){gq=[];for(var gv=0;gv<bl.length;gv++){gq.push(gC.splitLines(bl[gv]))}}}else{if(gx.length==gr.ranges.length){gq=bR(gx,function(gF){return[gF]})}}}for(var gv=gr.ranges.length-1;gv>=0;gv--){var gw=gr.ranges[gv];var gB=gw.from(),gA=gw.to();if(gw.empty()){if(gs&&gs>0){gB=W(gB.line,gB.ch-gs)}else{if(gE.state.overwrite&&!gt){gA=W(gA.line,Math.min(fk(gC,gA.line).text.length,gA.ch+fL(gx).length))}}}var gy=gE.curOp.updateInput;var gz={from:gB,to:gA,text:gq?gq[gv%gq.length]:gx,origin:gD||(gt?"paste":gE.state.cutIncoming?"cut":"+input")};bf(gE.doc,gz);ae(gE,"inputRead",gE,gz)}if(gu&&!gt){f2(gE,gu)}fK(gE);gE.curOp.updateInput=gy;gE.curOp.typing=true;gE.state.pasteIncoming=gE.state.cutIncoming=false}function a9(gs,gq){var gr=gs.clipboardData&&gs.clipboardData.getData("text/plain");if(gr){gs.preventDefault();if(!gq.isReadOnly()&&!gq.options.disableInput){cL(gq,function(){f5(gq,gr,0,null,"paste")})}return true}}function f2(gq,gu){if(!gq.options.electricChars||!gq.options.smartIndent){return}var gv=gq.doc.sel;for(var gt=gv.ranges.length-1;gt>=0;gt--){var gr=gv.ranges[gt];if(gr.head.ch>100||(gt&&gv.ranges[gt-1].head.line==gr.head.line)){continue}var gw=gq.getModeAt(gr.head);var gx=false;if(gw.electricChars){for(var gs=0;gs<gw.electricChars.length;gs++){if(gu.indexOf(gw.electricChars.charAt(gs))>-1){gx=ad(gq,gr.head.line,"smart");break}}}else{if(gw.electricInput){if(gw.electricInput.test(fk(gq.doc,gr.head.line).text.slice(0,gr.head.ch))){gx=ad(gq,gr.head.line,"smart")}}}if(gx){ae(gq,"electricInput",gq,gr.head.line)}}}function dj(gq){var gv=[],gs=[];for(var gt=0;gt<gq.doc.sel.ranges.length;gt++){var gr=gq.doc.sel.ranges[gt].head.line;var gu={anchor:W(gr,0),head:W(gr+1,0)};gs.push(gu);gv.push(gq.getRange(gu.anchor,gu.head))}return{text:gv,ranges:gs}}function fV(gq){gq.setAttribute("autocorrect","off");gq.setAttribute("autocapitalize","off");gq.setAttribute("spellcheck","false")}function Y(gq){this.cm=gq;this.prevInput="";this.pollingFast=false;this.polling=new gp();this.inaccurateSelection=false;this.hasSelection=false;this.composing=null}function aW(){var gq=f9("textarea",null,null,"position: absolute; padding: 0; width: 1px; height: 1em; outline: none");var gr=f9("div",[gq],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");if(cZ){gq.style.width="1000px"}else{gq.setAttribute("wrap","off")}if(e5){gq.style.border="1px solid black"}fV(gq);return gr}Y.prototype=aM({init:function(gs){var gr=this,gq=this.cm;var gv=this.wrapper=aW();var gt=this.textarea=gv.firstChild;gs.wrapper.insertBefore(gv,gs.wrapper.firstChild);if(e5){gt.style.width="0px"}bW(gt,"input",function(){if(dK&&k>=9&&gr.hasSelection){gr.hasSelection=null}gr.poll()});bW(gt,"paste",function(gw){if(aQ(gq,gw)||a9(gw,gq)){return}gq.state.pasteIncoming=true;gr.fastPoll()});function gu(gx){if(aQ(gq,gx)){return}if(gq.somethingSelected()){bl=gq.getSelections();if(gr.inaccurateSelection){gr.prevInput="";gr.inaccurateSelection=false;gt.value=bl.join("\n");dL(gt)}}else{if(!gq.options.lineWiseCopyCut){return}else{var gw=dj(gq);bl=gw.text;if(gx.type=="cut"){gq.setSelections(gw.ranges,null,Z)}else{gr.prevInput="";gt.value=gw.text.join("\n");dL(gt)}}}if(gx.type=="cut"){gq.state.cutIncoming=true}}bW(gt,"cut",gu);bW(gt,"copy",gu);bW(gs.scroller,"paste",function(gw){if(ba(gs,gw)||aQ(gq,gw)){return}gq.state.pasteIncoming=true;gr.focus()});bW(gs.lineSpace,"selectstart",function(gw){if(!ba(gs,gw)){cF(gw)}});bW(gt,"compositionstart",function(){var gw=gq.getCursor("from");if(gr.composing){gr.composing.range.clear()}gr.composing={start:gw,range:gq.markText(gw,gq.getCursor("to"),{className:"CodeMirror-composing"})}});bW(gt,"compositionend",function(){if(gr.composing){gr.poll();gr.composing.range.clear();gr.composing=null}})},prepareSelection:function(){var gr=this.cm,gv=gr.display,gu=gr.doc;var gq=fN(gr);if(gr.options.moveInputWithCursor){var gw=dU(gr,gu.sel.primary().head,"div");var gs=gv.wrapper.getBoundingClientRect(),gt=gv.lineDiv.getBoundingClientRect();gq.teTop=Math.max(0,Math.min(gv.wrapper.clientHeight-10,gw.top+gt.top-gs.top));gq.teLeft=Math.max(0,Math.min(gv.wrapper.clientWidth-10,gw.left+gt.left-gs.left))}return gq},showSelection:function(gs){var gq=this.cm,gr=gq.display;bQ(gr.cursorDiv,gs.cursors);bQ(gr.selectionDiv,gs.selection);if(gs.teTop!=null){this.wrapper.style.top=gs.teTop+"px";this.wrapper.style.left=gs.teLeft+"px"}},reset:function(gu){if(this.contextMenuPending){return}var gr,gt,gq=this.cm,gw=gq.doc;if(gq.somethingSelected()){this.prevInput="";var gs=gw.sel.primary();gr=c9&&(gs.to().line-gs.from().line>100||(gt=gq.getSelection()).length>1000);var gv=gr?"-":gt||gq.getSelection();this.textarea.value=gv;if(gq.state.focused){dL(this.textarea)}if(dK&&k>=9){this.hasSelection=gv}}else{if(!gu){this.prevInput=this.textarea.value="";if(dK&&k>=9){this.hasSelection=null}}}this.inaccurateSelection=gr},getField:function(){return this.textarea},supportsTouch:function(){return false},focus:function(){if(this.cm.options.readOnly!="nocursor"&&(!ei||dO()!=this.textarea)){try{this.textarea.focus()}catch(gq){}}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var gq=this;if(gq.pollingFast){return}gq.polling.set(this.cm.options.pollInterval,function(){gq.poll();if(gq.cm.state.focused){gq.slowPoll()}})},fastPoll:function(){var gr=false,gq=this;gq.pollingFast=true;function gs(){var gt=gq.poll();if(!gt&&!gr){gr=true;gq.polling.set(60,gs)}else{gq.pollingFast=false;gq.slowPoll()}}gq.polling.set(20,gs)},poll:function(){var gq=this.cm,gt=this.textarea,gu=this.prevInput;if(this.contextMenuPending||!gq.state.focused||(br(gt)&&!gu&&!this.composing)||gq.isReadOnly()||gq.options.disableInput||gq.state.keySeq){return false}var gw=gt.value;if(gw==gu&&!gq.somethingSelected()){return false}if(dK&&k>=9&&this.hasSelection===gw||b6&&/[\uf700-\uf7ff]/.test(gw)){gq.display.input.reset();return false}if(gq.doc.sel==gq.display.selForContextMenu){var gv=gw.charCodeAt(0);if(gv==8203&&!gu){gu="\u200b"}if(gv==8666){this.reset();return this.cm.execCommand("undo")}}var gx=0,gr=Math.min(gu.length,gw.length);while(gx<gr&&gu.charCodeAt(gx)==gw.charCodeAt(gx)){++gx}var gs=this;cL(gq,function(){f5(gq,gw.slice(gx),gu.length-gx,null,gs.composing?"*compose":null);if(gw.length>1000||gw.indexOf("\n")>-1){gt.value=gs.prevInput=""}else{gs.prevInput=gw}if(gs.composing){gs.composing.range.clear();gs.composing.range=gq.markText(gs.composing.start,gq.getCursor("to"),{className:"CodeMirror-composing"})}});return true},ensurePolled:function(){if(this.pollingFast&&this.poll()){this.pollingFast=false}},onKeyPress:function(){if(dK&&k>=9){this.hasSelection=null}this.fastPoll()},onContextMenu:function(gv){var gA=this,gB=gA.cm,gx=gB.display,gr=gA.textarea;var gz=cm(gB,gv),gq=gx.scroller.scrollTop;if(!gz||d4){return}var gu=gB.options.resetSelectionOnContextMenu;if(gu&&gB.doc.sel.contains(gz)==-1){c1(gB,bT)(gB.doc,eW(gz),Z)}var gw=gr.style.cssText,gE=gA.wrapper.style.cssText;gA.wrapper.style.cssText="position: absolute";var gD=gA.wrapper.getBoundingClientRect();gr.style.cssText="position: absolute; width: 30px; height: 30px; top: "+(gv.clientY-gD.top-5)+"px; left: "+(gv.clientX-gD.left-5)+"px; z-index: 1000; background: "+(dK?"rgba(255, 255, 255, .05)":"transparent")+"; outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";if(cZ){var gC=window.scrollY}gx.input.focus();if(cZ){window.scrollTo(null,gC)}gx.input.reset();if(!gB.somethingSelected()){gr.value=gA.prevInput=" "}gA.contextMenuPending=true;gx.selForContextMenu=gB.doc.sel;clearTimeout(gx.detectingSelectAll);function gt(){if(gr.selectionStart!=null){var gF=gB.somethingSelected();var gG="\u200b"+(gF?gr.value:"");gr.value="\u21da";gr.value=gG;gA.prevInput=gF?"":"\u200b";gr.selectionStart=1;gr.selectionEnd=gG.length;gx.selForContextMenu=gB.doc.sel}}function gy(){gA.contextMenuPending=false;gA.wrapper.style.cssText=gE;gr.style.cssText=gw;if(dK&&k<9){gx.scrollbars.setScrollTop(gx.scroller.scrollTop=gq)}if(gr.selectionStart!=null){if(!dK||(dK&&k<9)){gt()}var gF=0,gG=function(){if(gx.selForContextMenu==gB.doc.sel&&gr.selectionStart==0&&gr.selectionEnd>0&&gA.prevInput=="\u200b"){c1(gB,eG.selectAll)(gB)}else{if(gF++<10){gx.detectingSelectAll=setTimeout(gG,500)}else{gx.input.reset()}}};gx.detectingSelectAll=setTimeout(gG,200)}}if(dK&&k>=9){gt()}if(gg){eu(gv);var gs=function(){ef(window,"mouseup",gs);setTimeout(gy,20)};bW(window,"mouseup",gs)}else{setTimeout(gy,50)}},readOnlyChanged:function(gq){if(!gq){this.reset()}},setUneditable:f1,needsContentAttribute:false},Y.prototype);function dv(gq){this.cm=gq;this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null;this.polling=new gp();this.gracePeriod=false}dv.prototype=aM({init:function(gt){var gs=this,gq=gs.cm;var gu=gs.div=gt.lineDiv;fV(gu);bW(gu,"paste",function(gv){if(!aQ(gq,gv)){a9(gv,gq)}});bW(gu,"compositionstart",function(gz){var gy=gz.data;gs.composing={sel:gq.doc.sel,data:gy,startData:gy};if(!gy){return}var gw=gq.doc.sel.primary();var gv=gq.getLine(gw.head.line);var gx=gv.indexOf(gy,Math.max(0,gw.head.ch-gy.length));if(gx>-1&&gx<=gw.head.ch){gs.composing.sel=eW(W(gw.head.line,gx),W(gw.head.line,gx+gy.length))}});bW(gu,"compositionupdate",function(gv){gs.composing.data=gv.data});bW(gu,"compositionend",function(gw){var gv=gs.composing;if(!gv){return}if(gw.data!=gv.startData&&!/\u200b/.test(gw.data)){gv.data=gw.data}setTimeout(function(){if(!gv.handled){gs.applyComposition(gv)}if(gs.composing==gv){gs.composing=null}},50)});bW(gu,"touchstart",function(){gs.forceCompositionEnd()});bW(gu,"input",function(){if(gs.composing){return}if(gq.isReadOnly()||!gs.pollContent()){cL(gs.cm,function(){ah(gq)})}});function gr(gy){if(aQ(gq,gy)){return}if(gq.somethingSelected()){bl=gq.getSelections();if(gy.type=="cut"){gq.replaceSelection("",null,"cut")}}else{if(!gq.options.lineWiseCopyCut){return}else{var gw=dj(gq);bl=gw.text;if(gy.type=="cut"){gq.operation(function(){gq.setSelections(gw.ranges,0,Z);gq.replaceSelection("",null,"cut")})}}}if(gy.clipboardData&&!e5){gy.preventDefault();gy.clipboardData.clearData();gy.clipboardData.setData("text/plain",bl.join("\n"))}else{var gx=aW(),gz=gx.firstChild;gq.display.lineSpace.insertBefore(gx,gq.display.lineSpace.firstChild);gz.value=bl.join("\n");var gv=document.activeElement;dL(gz);setTimeout(function(){gq.display.lineSpace.removeChild(gx);gv.focus()},50)}}bW(gu,"copy",gr);bW(gu,"cut",gr)},prepareSelection:function(){var gq=fN(this.cm,false);gq.focus=this.cm.state.focused;return gq},showSelection:function(gq){if(!gq||!this.cm.display.view.length){return}if(gq.focus){this.showPrimarySelection()}this.showMultipleSelections(gq)},showPrimarySelection:function(){var gu=window.getSelection(),gx=this.cm.doc.sel.primary();var gv=ay(this.cm,gu.anchorNode,gu.anchorOffset);var gz=ay(this.cm,gu.focusNode,gu.focusOffset);if(gv&&!gv.bad&&gz&&!gz.bad&&ce(aq(gv,gz),gx.from())==0&&ce(bw(gv,gz),gx.to())==0){return}var gt=cy(this.cm,gx.from());var gy=cy(this.cm,gx.to());if(!gt&&!gy){return}var gB=this.cm.display.view;var gw=gu.rangeCount&&gu.getRangeAt(0);if(!gt){gt={node:gB[0].measure.map[2],offset:0}}else{if(!gy){var gs=gB[gB.length-1].measure;var gr=gs.maps?gs.maps[gs.maps.length-1]:gs.map;gy={node:gr[gr.length-1],offset:gr[gr.length-2]-gr[gr.length-3]}}}try{var gq=ck(gt.node,gt.offset,gy.offset,gy.node)}catch(gA){}if(gq){if(!cn&&this.cm.state.focused){gu.collapse(gt.node,gt.offset);if(!gq.collapsed){gu.addRange(gq)}}else{gu.removeAllRanges();gu.addRange(gq)}if(gw&&gu.anchorNode==null){gu.addRange(gw)}else{if(cn){this.startGracePeriod()}}}this.rememberSelection()},startGracePeriod:function(){var gq=this;clearTimeout(this.gracePeriod);this.gracePeriod=setTimeout(function(){gq.gracePeriod=false;if(gq.selectionChanged()){gq.cm.operation(function(){gq.cm.curOp.selectionChanged=true})}},20)},showMultipleSelections:function(gq){bQ(this.cm.display.cursorDiv,gq.cursors);bQ(this.cm.display.selectionDiv,gq.selection)},rememberSelection:function(){var gq=window.getSelection();this.lastAnchorNode=gq.anchorNode;this.lastAnchorOffset=gq.anchorOffset;this.lastFocusNode=gq.focusNode;this.lastFocusOffset=gq.focusOffset},selectionInEditor:function(){var gr=window.getSelection();if(!gr.rangeCount){return false}var gq=gr.getRangeAt(0).commonAncestorContainer;return gh(this.div,gq)},focus:function(){if(this.cm.options.readOnly!="nocursor"){this.div.focus()}},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return true},receivedFocus:function(){var gq=this;if(this.selectionInEditor()){this.pollSelection()}else{cL(this.cm,function(){gq.cm.curOp.selectionChanged=true})}function gr(){if(gq.cm.state.focused){gq.pollSelection();gq.polling.set(gq.cm.options.pollInterval,gr)}}this.polling.set(this.cm.options.pollInterval,gr)},selectionChanged:function(){var gq=window.getSelection();return gq.anchorNode!=this.lastAnchorNode||gq.anchorOffset!=this.lastAnchorOffset||gq.focusNode!=this.lastFocusNode||gq.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&!this.gracePeriod&&this.selectionChanged()){var gt=window.getSelection(),gq=this.cm;this.rememberSelection();var gr=ay(gq,gt.anchorNode,gt.anchorOffset);var gs=ay(gq,gt.focusNode,gt.focusOffset);if(gr&&gs){cL(gq,function(){bT(gq.doc,eW(gr,gs),Z);if(gr.bad||gs.bad){gq.curOp.selectionChanged=true}})}}},pollContent:function(){var gA=this.cm,gK=gA.display,gI=gA.doc.sel.primary();var gJ=gI.from(),gu=gI.to();if(gJ.line<gK.viewFrom||gu.line>gK.viewTo-1){return false}var gx;if(gJ.line==gK.viewFrom||(gx=dr(gA,gJ.line))==0){var gv=bM(gK.view[0].line);var gz=gK.view[0].node}else{var gv=bM(gK.view[gx].line);var gz=gK.view[gx-1].node.nextSibling}var gH=dr(gA,gu.line);if(gH==gK.view.length-1){var gC=gK.viewTo-1;var gF=gK.lineDiv.lastChild}else{var gC=bM(gK.view[gH+1].line)-1;var gF=gK.view[gH+1].node.previousSibling}var gL=gA.doc.splitLines(f6(gA,gz,gF,gv,gC));var gE=gb(gA.doc,W(gv,0),W(gC,fk(gA.doc,gC).text.length));while(gL.length>1&&gE.length>1){if(fL(gL)==fL(gE)){gL.pop();gE.pop();gC--}else{if(gL[0]==gE[0]){gL.shift();gE.shift();gv++}else{break}}}var gG=0,gs=0;var gB=gL[0],gr=gE[0],gq=Math.min(gB.length,gr.length);while(gG<gq&&gB.charCodeAt(gG)==gr.charCodeAt(gG)){++gG}var gy=fL(gL),gM=fL(gE);var gt=Math.min(gy.length-(gL.length==1?gG:0),gM.length-(gE.length==1?gG:0));while(gs<gt&&gy.charCodeAt(gy.length-gs-1)==gM.charCodeAt(gM.length-gs-1)){++gs}gL[gL.length-1]=gy.slice(0,gy.length-gs);gL[0]=gL[0].slice(gG);var gw=W(gv,gG);var gD=W(gC,gE.length?fL(gE).length-gs:0);if(gL.length>1||gL[0]||ce(gw,gD)){a0(gA.doc,gL,gw,gD,"+input");return true}},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){if(!this.composing||this.composing.handled){return}this.applyComposition(this.composing);this.composing.handled=true;this.div.blur();this.div.focus()},applyComposition:function(gq){if(this.cm.isReadOnly()){c1(this.cm,ah)(this.cm)}else{if(gq.data&&gq.data!=gq.startData){c1(this.cm,f5)(this.cm,gq.data,0,gq.sel)}}},setUneditable:function(gq){gq.contentEditable="false"},onKeyPress:function(gq){gq.preventDefault();if(!this.cm.isReadOnly()){c1(this.cm,f5)(this.cm,String.fromCharCode(gq.charCode==null?gq.keyCode:gq.charCode),0)}},readOnlyChanged:function(gq){this.div.contentEditable=String(gq!="nocursor")},onContextMenu:f1,resetPosition:f1,needsContentAttribute:true},dv.prototype);function cy(gw,gu){var gv=fg(gw,gu.line);if(!gv||gv.hidden){return null}var gy=fk(gw.doc,gu.line);var gr=cs(gv,gy,gu.line);var gs=a(gy),gt="left";if(gs){var gq=aF(gs,gu.ch);gt=gq%2?"right":"left"}var gx=aK(gr.map,gu.ch,gt);gx.offset=gx.collapse=="right"?gx.end:gx.start;return gx}function ew(gr,gq){if(gq){gr.bad=true}return gr}function ay(gq,gt,gv){var gu;if(gt==gq.display.lineDiv){gu=gq.display.lineDiv.childNodes[gv];if(!gu){return ew(gq.clipPos(W(gq.display.viewTo-1)),true)}gt=null;gv=0}else{for(gu=gt;;gu=gu.parentNode){if(!gu||gu==gq.display.lineDiv){return null}if(gu.parentNode&&gu.parentNode==gq.display.lineDiv){break}}}for(var gs=0;gs<gq.display.view.length;gs++){var gr=gq.display.view[gs];if(gr.node==gu){return aa(gr,gt,gv)}}}function aa(gy,gu,gw){var gs=gy.text.firstChild,gt=false;if(!gu||!gh(gs,gu)){return ew(W(bM(gy.line),0),true)}if(gu==gs){gt=true;gu=gs.childNodes[gw];gw=0;if(!gu){var gE=gy.rest?fL(gy.rest):gy.line;return ew(W(bM(gE),gE.text.length),gt)}}var gv=gu.nodeType==3?gu:null,gC=gu;if(!gv&&gu.childNodes.length==1&&gu.firstChild.nodeType==3){gv=gu.firstChild;if(gw){gw=gv.nodeValue.length}}while(gC.parentNode!=gs){gC=gC.parentNode}var gr=gy.measure,gA=gr.maps;function gx(gH,gM,gJ){for(var gL=-1;gL<(gA?gA.length:0);gL++){var gG=gL<0?gr.map:gA[gL];for(var gK=0;gK<gG.length;gK+=3){var gI=gG[gK+2];if(gI==gH||gI==gM){var gN=bM(gL<0?gy.line:gy.rest[gL]);var gF=gG[gK]+gJ;if(gJ<0||gI!=gH){gF=gG[gK+(gJ?1:0)]}return W(gN,gF)}}}}var gD=gx(gv,gC,gw);if(gD){return ew(gD,gt)}for(var gq=gC.nextSibling,gz=gv?gv.nodeValue.length-gw:0;gq;gq=gq.nextSibling){gD=gx(gq,gq.firstChild,0);if(gD){return ew(W(gD.line,gD.ch-gz),gt)}else{gz+=gq.textContent.length}}for(var gB=gC.previousSibling,gz=gw;gB;gB=gB.previousSibling){gD=gx(gB,gB.firstChild,-1);if(gD){return ew(W(gD.line,gD.ch+gz),gt)}else{gz+=gq.textContent.length}}}function f6(gy,gw,gx,gt,gr){var gz="",gs=false,gq=gy.doc.lineSeparator();function gu(gA){return function(gB){return gB.id==gA}}function gv(gE){if(gE.nodeType==1){var gB=gE.getAttribute("cm-text");if(gB!=null){if(gB==""){gB=gE.textContent.replace(/\u200b/g,"")}gz+=gB;return}var gD=gE.getAttribute("cm-marker"),gA;if(gD){var gF=gy.findMarks(W(gt,0),W(gr+1,0),gu(+gD));if(gF.length&&(gA=gF[0].find())){gz+=gb(gy.doc,gA.from,gA.to).join(gq)}return}if(gE.getAttribute("contenteditable")=="false"){return}for(var gC=0;gC<gE.childNodes.length;gC++){gv(gE.childNodes[gC])}if(/^(pre|div|p)$/i.test(gE.nodeName)){gs=true}}else{if(gE.nodeType==3){var gG=gE.nodeValue;if(!gG){return}if(gs){gz+=gq;gs=false}gz+=gG}}}for(;;){gv(gw);if(gw==gx){break}gw=gw.nextSibling}return gz}H.inputStyles={textarea:Y,contenteditable:dv};function ga(gq,gr){this.ranges=gq;this.primIndex=gr}ga.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(gq){if(gq==this){return true}if(gq.primIndex!=this.primIndex||gq.ranges.length!=this.ranges.length){return false}for(var gs=0;gs<this.ranges.length;gs++){var gr=this.ranges[gs],gt=gq.ranges[gs];if(ce(gr.anchor,gt.anchor)!=0||ce(gr.head,gt.head)!=0){return false}}return true},deepCopy:function(){for(var gq=[],gr=0;gr<this.ranges.length;gr++){gq[gr]=new dY(ch(this.ranges[gr].anchor),ch(this.ranges[gr].head))}return new ga(gq,this.primIndex)},somethingSelected:function(){for(var gq=0;gq<this.ranges.length;gq++){if(!this.ranges[gq].empty()){return true}}return false},contains:function(gt,gq){if(!gq){gq=gt}for(var gs=0;gs<this.ranges.length;gs++){var gr=this.ranges[gs];if(ce(gq,gr.from())>=0&&ce(gt,gr.to())<=0){return gs}}return -1}};function dY(gq,gr){this.anchor=gq;this.head=gr}dY.prototype={from:function(){return aq(this.anchor,this.head)},to:function(){return bw(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};function cv(gq,gx){var gs=gq[gx];gq.sort(function(gA,gz){return ce(gA.from(),gz.from())});gx=dh(gq,gs);for(var gu=1;gu<gq.length;gu++){var gy=gq[gu],gr=gq[gu-1];if(ce(gr.to(),gy.from())>=0){var gv=aq(gr.from(),gy.from()),gw=bw(gr.to(),gy.to());var gt=gr.empty()?gy.from()==gy.head:gr.from()==gr.head;if(gu<=gx){--gx}gq.splice(--gu,2,new dY(gt?gw:gv,gt?gv:gw))}}return new ga(gq,gx)}function eW(gq,gr){return new ga([new dY(gq,gr||gq)],0)}function c4(gq,gr){return Math.max(gq.first,Math.min(gr,gq.first+gq.size-1))}function fP(gr,gs){if(gs.line<gr.first){return W(gr.first,0)}var gq=gr.first+gr.size-1;if(gs.line>gq){return W(gq,fk(gr,gq).text.length)}return fx(gs,fk(gr,gs.line).text.length)}function fx(gs,gr){var gq=gs.ch;if(gq==null||gq>gr){return W(gs.line,gr)}else{if(gq<0){return W(gs.line,0)}else{return gs}}}function b8(gr,gq){return gq>=gr.first&&gq<gr.first+gr.size}function d0(gs,gt){for(var gq=[],gr=0;gr<gt.length;gr++){gq[gr]=fP(gs,gt[gr])}return gq}function fA(gv,gr,gu,gq){if(gv.cm&&gv.cm.display.shift||gv.extend){var gt=gr.anchor;if(gq){var gs=ce(gu,gt)<0;if(gs!=(ce(gq,gt)<0)){gt=gu;gu=gq}else{if(gs!=(ce(gu,gq)<0)){gu=gq}}}return new dY(gt,gu)}else{return new dY(gq||gu,gu)}}function f3(gt,gs,gq,gr){bT(gt,new ga([fA(gt,gt.sel.primary(),gs,gq)],0),gr)}function av(gv,gu,gs){for(var gr=[],gt=0;gt<gv.sel.ranges.length;gt++){gr[gt]=fA(gv,gv.sel.ranges[gt],gu[gt],null)}var gq=cv(gr,gv.sel.primIndex);bT(gv,gq,gs)}function e(gu,gt,gr,gs){var gq=gu.sel.ranges.slice(0);gq[gt]=gr;bT(gu,cv(gq,gu.sel.primIndex),gs)}function F(gt,gr,gs,gq){bT(gt,eW(gr,gs),gq)}function c(gt,gr,gq){var gs={ranges:gr.ranges,update:function(gu){this.ranges=[];for(var gv=0;gv<gu.length;gv++){this.ranges[gv]=new dY(fP(gt,gu[gv].anchor),fP(gt,gu[gv].head))}},origin:gq&&gq.origin};aD(gt,"beforeSelectionChange",gt,gs);if(gt.cm){aD(gt.cm,"beforeSelectionChange",gt.cm,gs)}if(gs.ranges!=gr.ranges){return cv(gs.ranges,gs.ranges.length-1)}else{return gr}}function fc(gu,gt,gr){var gq=gu.history.done,gs=fL(gq);if(gs&&gs.ranges){gq[gq.length-1]=gt;es(gu,gt,gr)}else{bT(gu,gt,gr)}}function bT(gs,gr,gq){es(gs,gr,gq);gi(gs,gs.sel,gs.cm?gs.cm.curOp.id:NaN,gq)}function es(gt,gs,gr){if(fn(gt,"beforeSelectionChange")||gt.cm&&fn(gt.cm,"beforeSelectionChange")){gs=c(gt,gs,gr)}var gq=gr&&gr.bias||(ce(gs.primary().head,gt.sel.primary().head)<0?-1:1);c8(gt,n(gt,gs,gq,true));if(!(gr&&gr.scroll===false)&>.cm){fK(gt.cm)}}function c8(gr,gq){if(gq.equals(gr.sel)){return}gr.sel=gq;if(gr.cm){gr.cm.curOp.updateInput=gr.cm.curOp.selectionChanged=true;V(gr.cm)}ae(gr,"cursorActivity",gr)}function eB(gq){c8(gq,n(gq,gq.sel,null,false),Z)}function n(gz,gq,gw,gx){var gt;for(var gu=0;gu<gq.ranges.length;gu++){var gv=gq.ranges[gu];var gr=gq.ranges.length==gz.sel.ranges.length&&gz.sel.ranges[gu];var gy=bU(gz,gv.anchor,gr&&gr.anchor,gw,gx);var gs=bU(gz,gv.head,gr&&gr.head,gw,gx);if(gt||gy!=gv.anchor||gs!=gv.head){if(!gt){gt=gq.ranges.slice(0,gu)}gt[gu]=new dY(gy,gs)}}return gt?cv(gt,gq.primIndex):gq}function eM(gA,gy,gt,gs,gw){var gB=fk(gA,gy.line);if(gB.markedSpans){for(var gu=0;gu<gB.markedSpans.length;++gu){var gq=gB.markedSpans[gu],gr=gq.marker;if((gq.from==null||(gr.inclusiveLeft?gq.from<=gy.ch:gq.from<gy.ch))&&(gq.to==null||(gr.inclusiveRight?gq.to>=gy.ch:gq.to>gy.ch))){if(gw){aD(gr,"beforeCursorEnter");if(gr.explicitlyCleared){if(!gB.markedSpans){break}else{--gu;continue}}}if(!gr.atomic){continue}if(gt){var gx=gr.find(gs<0?1:-1),gz;if(gs<0?gr.inclusiveRight:gr.inclusiveLeft){gx=gm(gA,gx,-gs,gx&&gx.line==gy.line?gB:null)}if(gx&&gx.line==gy.line&&(gz=ce(gx,gt))&&(gs<0?gz<0:gz>0)){return eM(gA,gx,gy,gs,gw)}}var gv=gr.find(gs<0?-1:1);if(gs<0?gr.inclusiveLeft:gr.inclusiveRight){gv=gm(gA,gv,gs,gv.line==gy.line?gB:null)}return gv?eM(gA,gv,gy,gs,gw):null}}}return gy}function bU(gv,gw,gt,gr,gq){var gs=gr||1;var gu=eM(gv,gw,gt,gs,gq)||(!gq&&eM(gv,gw,gt,gs,true))||eM(gv,gw,gt,-gs,gq)||(!gq&&eM(gv,gw,gt,-gs,true));if(!gu){gv.cantEdit=true;return W(gv.first,0)}return gu}function gm(gs,gt,gr,gq){if(gr<0&>.ch==0){if(gt.line>gs.first){return fP(gs,W(gt.line-1))}else{return null}}else{if(gr>0&>.ch==(gq||fk(gs,gt.line)).text.length){if(gt.line<gs.first+gs.size-1){return W(gt.line+1,0)}else{return null}}else{return new W(gt.line,gt.ch+gr)}}}function bB(gq){gq.display.input.showSelection(gq.display.input.prepareSelection())}function fN(gx,gq){var gw=gx.doc,gy={};var gv=gy.cursors=document.createDocumentFragment();var gr=gy.selection=document.createDocumentFragment();for(var gt=0;gt<gw.sel.ranges.length;gt++){if(gq===false&>==gw.sel.primIndex){continue}var gu=gw.sel.ranges[gt];if(gu.from().line>=gx.display.viewTo||gu.to().line<gx.display.viewFrom){continue}var gs=gu.empty();if(gs||gx.options.showCursorWhenSelecting){A(gx,gu.head,gv)}if(!gs){bC(gx,gu,gr)}}return gy}function A(gq,gt,gs){var gv=dU(gq,gt,"div",null,null,!gq.options.singleCursorHeightPerLine);var gu=gs.appendChild(f9("div","\u00a0","CodeMirror-cursor"));gu.style.left=gv.left+"px";gu.style.top=gv.top+"px";gu.style.height=Math.max(0,gv.bottom-gv.top)*gq.options.cursorHeight+"px";if(gv.other){var gr=gs.appendChild(f9("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor"));gr.style.display="";gr.style.left=gv.other.left+"px";gr.style.top=gv.other.top+"px";gr.style.height=(gv.other.bottom-gv.other.top)*0.85+"px"}}function bC(gu,gA,gv){var gD=gu.display,gH=gu.doc;var gq=document.createDocumentFragment();var gz=e9(gu.display),gt=gz.left;var gE=Math.max(gD.sizerWidth,dl(gu)-gD.sizer.offsetLeft)-gz.right;function gB(gL,gK,gJ,gI){if(gK<0){gK=0}gK=Math.round(gK);gI=Math.round(gI);gq.appendChild(f9("div",null,"CodeMirror-selected","position: absolute; left: "+gL+"px; top: "+gK+"px; width: "+(gJ==null?gE-gL:gJ)+"px; height: "+(gI-gK)+"px"))}function gr(gJ,gL,gO){var gK=fk(gH,gJ);var gM=gK.text.length;var gP,gI;function gN(gR,gQ){return cI(gu,W(gJ,gR),"div",gK,gQ)}d5(a(gK),gL||0,gO==null?gM:gO,function(gX,gW,gQ){var gT=gN(gX,"left"),gU,gV,gS;if(gX==gW){gU=gT;gV=gS=gT.left}else{gU=gN(gW-1,"right");if(gQ=="rtl"){var gR=gT;gT=gU;gU=gR}gV=gT.left;gS=gU.right}if(gL==null&&gX==0){gV=gt}if(gU.top-gT.top>3){gB(gV,gT.top,null,gT.bottom);gV=gt;if(gT.bottom<gU.top){gB(gV,gT.bottom,null,gU.top)}}if(gO==null&&gW==gM){gS=gE}if(!gP||gT.top<gP.top||gT.top==gP.top&&gT.left<gP.left){gP=gT}if(!gI||gU.bottom>gI.bottom||gU.bottom==gI.bottom&&gU.right>gI.right){gI=gU}if(gV<gt+1){gV=gt}gB(gV,gU.top,gS-gV,gU.bottom)});return{start:gP,end:gI}}var gG=gA.from(),gF=gA.to();if(gG.line==gF.line){gr(gG.line,gG.ch,gF.ch)}else{var gs=fk(gH,gG.line),gx=fk(gH,gF.line);var gw=x(gs)==x(gx);var gy=gr(gG.line,gG.ch,gw?gs.text.length+1:null).end;var gC=gr(gF.line,gw?0:null,gF.ch).start;if(gw){if(gy.top<gC.top-2){gB(gy.right,gy.top,null,gy.bottom);gB(gt,gC.top,gC.left,gC.bottom)}else{gB(gy.right,gy.top,gC.left-gy.right,gy.bottom)}}if(gy.bottom<gC.top){gB(gt,gy.bottom,null,gC.top)}}gv.appendChild(gq)}function o(gq){if(!gq.state.focused){return}var gs=gq.display;clearInterval(gs.blinker);var gr=true;gs.cursorDiv.style.visibility="";if(gq.options.cursorBlinkRate>0){gs.blinker=setInterval(function(){gs.cursorDiv.style.visibility=(gr=!gr)?"":"hidden"},gq.options.cursorBlinkRate)}else{if(gq.options.cursorBlinkRate<0){gs.cursorDiv.style.visibility="hidden"}}}function eh(gq,gr){if(gq.doc.mode.startState&&gq.doc.frontier<gq.display.viewTo){gq.state.highlight.set(gr,cu(cO,gq))}}function cO(gq){var gu=gq.doc;if(gu.frontier<gu.first){gu.frontier=gu.first}if(gu.frontier>=gq.display.viewTo){return}var gs=+new Date+gq.options.workTime;var gt=b2(gu.mode,dC(gq,gu.frontier));var gr=[];gu.iter(gu.frontier,Math.min(gu.first+gu.size,gq.display.viewTo+500),function(gv){if(gu.frontier>=gq.display.viewFrom){var gy=gv.styles,gC=gv.text.length>gq.options.maxHighlightLength;var gA=fE(gq,gv,gC?b2(gu.mode,gt):gt,true);gv.styles=gA.styles;var gx=gv.styleClasses,gz=gA.classes;if(gz){gv.styleClasses=gz}else{if(gx){gv.styleClasses=null}}var gB=!gy||gy.length!=gv.styles.length||gx!=gz&&(!gx||!gz||gx.bgClass!=gz.bgClass||gx.textClass!=gz.textClass);for(var gw=0;!gB&&gw<gy.length;++gw){gB=gy[gw]!=gv.styles[gw]}if(gB){gr.push(gu.frontier)}gv.stateAfter=gC?gt:b2(gu.mode,gt)}else{if(gv.text.length<=gq.options.maxHighlightLength){dx(gq,gv.text,gt)}gv.stateAfter=gu.frontier%5==0?b2(gu.mode,gt):null}++gu.frontier;if(+new Date>gs){eh(gq,gq.options.workDelay);return true}});if(gr.length){cL(gq,function(){for(var gv=0;gv<gr.length;gv++){R(gq,gr[gv],"text")}})}}function cx(gw,gq,gt){var gr,gu,gv=gw.doc;var gs=gt?-1:gq-(gw.doc.mode.innerMode?1000:100);for(var gz=gq;gz>gs;--gz){if(gz<=gv.first){return gv.first}var gy=fk(gv,gz-1);if(gy.stateAfter&&(!gt||gz<=gv.frontier)){return gz}var gx=bS(gy.text,null,gw.options.tabSize);if(gu==null||gr>gx){gu=gz-1;gr=gx}}return gu}function dC(gq,gw,gr){var gu=gq.doc,gt=gq.display;if(!gu.mode.startState){return true}var gv=cx(gq,gw,gr),gs=gv>gu.first&&fk(gu,gv-1).stateAfter;if(!gs){gs=bZ(gu.mode)}else{gs=b2(gu.mode,gs)}gu.iter(gv,gw,function(gx){dx(gq,gx.text,gs);var gy=gv==gw-1||gv%5==0||gv>=gt.viewFrom&&gv<gt.viewTo;gx.stateAfter=gy?b2(gu.mode,gs):null;++gv});if(gr){gu.frontier=gv}return gs}function fd(gq){return gq.lineSpace.offsetTop}function bH(gq){return gq.mover.offsetHeight-gq.lineSpace.offsetHeight}function e9(gt){if(gt.cachedPaddingH){return gt.cachedPaddingH}var gs=bQ(gt.measure,f9("pre","x"));var gq=window.getComputedStyle?window.getComputedStyle(gs):gs.currentStyle;var gr={left:parseInt(gq.paddingLeft),right:parseInt(gq.paddingRight)};if(!isNaN(gr.left)&&!isNaN(gr.right)){gt.cachedPaddingH=gr}return gr}function cS(gq){return dJ-gq.display.nativeBarWidth}function dl(gq){return gq.display.scroller.clientWidth-cS(gq)-gq.display.barWidth}function cU(gq){return gq.display.scroller.clientHeight-cS(gq)-gq.display.barHeight}function cg(gx,gt,gw){var gs=gx.options.lineWrapping;var gu=gs&&dl(gx);if(!gt.measure.heights||gs&>.measure.width!=gu){var gv=gt.measure.heights=[];if(gs){gt.measure.width=gu;var gz=gt.text.firstChild.getClientRects();for(var gq=0;gq<gz.length-1;gq++){var gy=gz[gq],gr=gz[gq+1];if(Math.abs(gy.bottom-gr.bottom)>2){gv.push((gy.bottom+gr.top)/2-gw.top)}}}gv.push(gw.bottom-gw.top)}}function cs(gs,gq,gt){if(gs.line==gq){return{map:gs.measure.map,cache:gs.measure.cache}}for(var gr=0;gr<gs.rest.length;gr++){if(gs.rest[gr]==gq){return{map:gs.measure.maps[gr],cache:gs.measure.caches[gr]}}}for(var gr=0;gr<gs.rest.length;gr++){if(bM(gs.rest[gr])>gt){return{map:gs.measure.maps[gr],cache:gs.measure.caches[gr],before:true}}}}function c0(gq,gs){gs=x(gs);var gu=bM(gs);var gr=gq.display.externalMeasured=new bu(gq.doc,gs,gu);gr.lineN=gu;var gt=gr.built=eV(gq,gr);gr.text=gt.pre;bQ(gq.display.lineMeasure,gt.pre);return gr}function ej(gq,gr,gt,gs){return C(gq,a3(gq,gr),gt,gs)}function fg(gq,gs){if(gs>=gq.display.viewFrom&&gs<gq.display.viewTo){return gq.display.view[dr(gq,gs)]}var gr=gq.display.externalMeasured;if(gr&&gs>=gr.lineN&&gs<gr.lineN+gr.size){return gr}}function a3(gq,gs){var gt=bM(gs);var gr=fg(gq,gt);if(gr&&!gr.text){gr=null}else{if(gr&&gr.changes){ab(gq,gr,gt,fi(gq));gq.curOp.forceUpdate=true}}if(!gr){gr=c0(gq,gs)}var gu=cs(gr,gs,gt);return{line:gs,view:gr,rect:null,map:gu.map,cache:gu.cache,before:gu.before,hasHeights:false}}function C(gq,gw,gu,gr,gt){if(gw.before){gu=-1}var gs=gu+(gr||""),gv;if(gw.cache.hasOwnProperty(gs)){gv=gw.cache[gs]}else{if(!gw.rect){gw.rect=gw.view.text.getBoundingClientRect()}if(!gw.hasHeights){cg(gq,gw.view,gw.rect);gw.hasHeights=true}gv=j(gq,gw,gu,gr);if(!gv.bogus){gw.cache[gs]=gv}}return{left:gv.left,right:gv.right,top:gt?gv.rtop:gv.top,bottom:gt?gv.rbottom:gv.bottom}}var eE={left:0,right:0,top:0,bottom:0};function aK(gr,gq,gx){var gt,gs,gv,gy;for(var gw=0;gw<gr.length;gw+=3){var gu=gr[gw],gz=gr[gw+1];if(gq<gu){gs=0;gv=1;gy="left"}else{if(gq<gz){gs=gq-gu;gv=gs+1}else{if(gw==gr.length-3||gq==gz&&gr[gw+3]>gq){gv=gz-gu;gs=gv-1;if(gq>=gz){gy="right"}}}}if(gs!=null){gt=gr[gw+2];if(gu==gz&&gx==(gt.insertLeft?"left":"right")){gy=gx}if(gx=="left"&&gs==0){while(gw&&gr[gw-2]==gr[gw-3]&&gr[gw-1].insertLeft){gt=gr[(gw-=3)+2];gy="left"}}if(gx=="right"&&gs==gz-gu){while(gw<gr.length-3&&gr[gw+3]==gr[gw+4]&&!gr[gw+5].insertLeft){gt=gr[(gw+=3)+2];gy="right"}}break}}return{node:gt,start:gs,end:gv,collapse:gy,coverStart:gu,coverEnd:gz}}function j(gx,gH,gA,gv){var gy=aK(gH.map,gA,gv);var gF=gy.node,gu=gy.start,gt=gy.end,gq=gy.collapse;var gr;if(gF.nodeType==3){for(var gG=0;gG<4;gG++){while(gu&&fu(gH.line.text.charAt(gy.coverStart+gu))){--gu}while(gy.coverStart+gt<gy.coverEnd&&fu(gH.line.text.charAt(gy.coverStart+gt))){++gt}if(dK&&k<9&&gu==0&>==gy.coverEnd-gy.coverStart){gr=gF.parentNode.getBoundingClientRect()}else{if(dK&&gx.options.lineWrapping){var gs=ck(gF,gu,gt).getClientRects();if(gs.length){gr=gs[gv=="right"?gs.length-1:0]}else{gr=eE}}else{gr=ck(gF,gu,gt).getBoundingClientRect()||eE}}if(gr.left||gr.right||gu==0){break}gt=gu;gu=gu-1;gq="right"}if(dK&&k<11){gr=eR(gx.display.measure,gr)}}else{if(gu>0){gq=gv="right"}var gs;if(gx.options.lineWrapping&&(gs=gF.getClientRects()).length>1){gr=gs[gv=="right"?gs.length-1:0]}else{gr=gF.getBoundingClientRect()}}if(dK&&k<9&&!gu&&(!gr||!gr.left&&!gr.right)){var gw=gF.parentNode.getClientRects()[0];if(gw){gr={left:gw.left,right:gw.left+dD(gx.display),top:gw.top,bottom:gw.bottom}}else{gr=eE}}var gD=gr.top-gH.rect.top,gB=gr.bottom-gH.rect.top;var gJ=(gD+gB)/2;var gI=gH.view.measure.heights;for(var gG=0;gG<gI.length-1;gG++){if(gJ<gI[gG]){break}}var gE=gG?gI[gG-1]:0,gC=gI[gG];var gz={left:(gq=="right"?gr.right:gr.left)-gH.rect.left,right:(gq=="left"?gr.left:gr.right)-gH.rect.left,top:gE,bottom:gC};if(!gr.left&&!gr.right){gz.bogus=true}if(!gx.options.singleCursorHeightPerLine){gz.rtop=gD;gz.rbottom=gB}return gz}function eR(gs,gt){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!aJ(gs)){return gt}var gr=screen.logicalXDPI/screen.deviceXDPI;var gq=screen.logicalYDPI/screen.deviceYDPI;return{left:gt.left*gr,right:gt.right*gr,top:gt.top*gq,bottom:gt.bottom*gq}}function at(gr){if(gr.measure){gr.measure.cache={};gr.measure.heights=null;if(gr.rest){for(var gq=0;gq<gr.rest.length;gq++){gr.measure.caches[gq]={}}}}}function aN(gq){gq.display.externalMeasure=null;d2(gq.display.lineMeasure);for(var gr=0;gr<gq.display.view.length;gr++){at(gq.display.view[gr])}}function aj(gq){aN(gq);gq.display.cachedCharWidth=gq.display.cachedTextHeight=gq.display.cachedPaddingH=null;if(!gq.options.lineWrapping){gq.display.maxLineChanged=true}gq.display.lineNumChars=null}function ct(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function cr(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function eU(gw,gt,gv,gr){if(gt.widgets){for(var gs=0;gs<gt.widgets.length;++gs){if(gt.widgets[gs].above){var gy=cX(gt.widgets[gs]);gv.top+=gy;gv.bottom+=gy}}}if(gr=="line"){return gv}if(!gr){gr="local"}var gu=bL(gt);if(gr=="local"){gu+=fd(gw.display)}else{gu-=gw.display.viewOffset}if(gr=="page"||gr=="window"){var gq=gw.display.lineSpace.getBoundingClientRect();gu+=gq.top+(gr=="window"?0:cr());var gx=gq.left+(gr=="window"?0:ct());gv.left+=gx;gv.right+=gx}gv.top+=gu;gv.bottom+=gu;return gv}function gl(gr,gu,gs){if(gs=="div"){return gu}var gw=gu.left,gv=gu.top;if(gs=="page"){gw-=ct();gv-=cr()}else{if(gs=="local"||!gs){var gt=gr.display.sizer.getBoundingClientRect();gw+=gt.left;gv+=gt.top}}var gq=gr.display.lineSpace.getBoundingClientRect();return{left:gw-gq.left,top:gv-gq.top}}function cI(gq,gu,gt,gs,gr){if(!gs){gs=fk(gq.doc,gu.line)}return eU(gq,gs,ej(gq,gs,gu.ch,gr),gt)}function dU(gz,gy,gs,gw,gB,gx){gw=gw||fk(gz.doc,gy.line);if(!gB){gB=a3(gz,gw)}function gu(gE,gD){var gC=C(gz,gB,gE,gD?"right":"left",gx);if(gD){gC.left=gC.right}else{gC.right=gC.left}return eU(gz,gw,gC,gs)}function gA(gF,gC){var gD=gv[gC],gE=gD.level%2;if(gF==dy(gD)&&gC&&gD.level<gv[gC-1].level){gD=gv[--gC];gF=gk(gD)-(gD.level%2?0:1);gE=true}else{if(gF==gk(gD)&&gC<gv.length-1&&gD.level<gv[gC+1].level){gD=gv[++gC];gF=dy(gD)-gD.level%2;gE=false}}if(gE&&gF==gD.to&&gF>gD.from){return gu(gF-1)}return gu(gF,gE)}var gv=a(gw),gq=gy.ch;if(!gv){return gu(gq)}var gr=aF(gv,gq);var gt=gA(gq,gr);if(e6!=null){gt.other=gA(gq,e6)}return gt}function dH(gq,gu){var gt=0,gu=fP(gq.doc,gu);if(!gq.options.lineWrapping){gt=dD(gq.display)*gu.ch}var gr=fk(gq.doc,gu.line);var gs=bL(gr)+fd(gq.display);return{left:gt,right:gt,top:gs,bottom:gs+gr.height}}function f8(gq,gr,gs,gu){var gt=W(gq,gr);gt.xRel=gu;if(gs){gt.outside=true}return gt}function fU(gx,gu,gt){var gw=gx.doc;gt+=gx.display.viewOffset;if(gt<0){return f8(gw.first,0,true,-1)}var gs=bF(gw,gt),gy=gw.first+gw.size-1;if(gs>gy){return f8(gw.first+gw.size-1,fk(gw,gy).text.length,true,1)}if(gu<0){gu=0}var gr=fk(gw,gs);for(;;){var gz=cY(gx,gr,gs,gu,gt);var gv=ex(gr);var gq=gv&&gv.find(0,true);if(gv&&(gz.ch>gq.from.ch||gz.ch==gq.from.ch&&gz.xRel>0)){gs=bM(gr=gq.to.line)}else{return gz}}}function cY(gA,gs,gD,gC,gB){var gz=gB-bL(gs);var gw=false,gJ=2*gA.display.wrapper.clientWidth;var gG=a3(gA,gs);function gN(gP){var gQ=dU(gA,W(gD,gP),"line",gs,gG);gw=true;if(gz>gQ.bottom){return gQ.left-gJ}else{if(gz<gQ.top){return gQ.left+gJ}else{gw=false}}return gQ.left}var gF=a(gs),gI=gs.text.length;var gK=cD(gs),gt=cR(gs);var gH=gN(gK),gq=gw,gr=gN(gt),gv=gw;if(gC>gr){return f8(gD,gt,gv,1)}for(;;){if(gF?gt==gK||gt==u(gs,gK,1):gt-gK<=1){var gE=gC<gH||gC-gH<=gr-gC?gK:gt;var gM=gC-(gE==gK?gH:gr);while(fu(gs.text.charAt(gE))){++gE}var gy=f8(gD,gE,gE==gK?gq:gv,gM<-1?-1:gM>1?1:0);return gy}var gx=Math.ceil(gI/2),gO=gK+gx;if(gF){gO=gK;for(var gL=0;gL<gx;++gL){gO=u(gs,gO,1)}}var gu=gN(gO);if(gu>gC){gt=gO;gr=gu;if(gv=gw){gr+=1000}gI=gx}else{gK=gO;gH=gu;gq=gw;gI-=gx}}}var aG;function aX(gs){if(gs.cachedTextHeight!=null){return gs.cachedTextHeight}if(aG==null){aG=f9("pre");for(var gr=0;gr<49;++gr){aG.appendChild(document.createTextNode("x"));aG.appendChild(f9("br"))}aG.appendChild(document.createTextNode("x"))}bQ(gs.measure,aG);var gq=aG.offsetHeight/50;if(gq>3){gs.cachedTextHeight=gq}d2(gs.measure);return gq||1}function dD(gu){if(gu.cachedCharWidth!=null){return gu.cachedCharWidth}var gq=f9("span","xxxxxxxxxx");var gt=f9("pre",[gq]);bQ(gu.measure,gt);var gs=gq.getBoundingClientRect(),gr=(gs.right-gs.left)/10;if(gr>2){gu.cachedCharWidth=gr}return gr||10}var bo=null;var d9=0;function cH(gq){gq.curOp={cm:gq,viewChanged:false,startHeight:gq.doc.height,forceUpdate:false,updateInput:null,typing:false,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:false,id:++d9};if(bo){bo.ops.push(gq.curOp)}else{gq.curOp.ownsGroup=bo={ops:[gq.curOp],delayedCallbacks:[]}}}function cT(gt){var gs=gt.delayedCallbacks,gr=0;do{for(;gr<gs.length;gr++){gs[gr].call(null)}for(var gq=0;gq<gt.ops.length;gq++){var gu=gt.ops[gq];if(gu.cursorActivityHandlers){while(gu.cursorActivityCalled<gu.cursorActivityHandlers.length){gu.cursorActivityHandlers[gu.cursorActivityCalled++].call(null,gu.cm)}}}}while(gr<gs.length)}function al(gq){var gt=gq.curOp,gs=gt.ownsGroup;if(!gs){return}try{cT(gs)}finally{bo=null;for(var gr=0;gr<gs.ops.length;gr++){gs.ops[gr].cm.curOp=null}cJ(gs)}}function cJ(gs){var gr=gs.ops;for(var gq=0;gq<gr.length;gq++){b4(gr[gq])}for(var gq=0;gq<gr.length;gq++){ap(gr[gq])}for(var gq=0;gq<gr.length;gq++){b1(gr[gq])}for(var gq=0;gq<gr.length;gq++){ao(gr[gq])}for(var gq=0;gq<gr.length;gq++){e4(gr[gq])}}function b4(gs){var gq=gs.cm,gr=gq.display;J(gq);if(gs.updateMaxLine){h(gq)}gs.mustUpdate=gs.viewChanged||gs.forceUpdate||gs.scrollTop!=null||gs.scrollToPos&&(gs.scrollToPos.from.line<gr.viewFrom||gs.scrollToPos.to.line>=gr.viewTo)||gr.maxLineChanged&&gq.options.lineWrapping;gs.update=gs.mustUpdate&&new aH(gq,gs.mustUpdate&&{top:gs.scrollTop,ensure:gs.scrollToPos},gs.forceUpdate)}function ap(gq){gq.updatedDisplay=gq.mustUpdate&&B(gq.cm,gq.update)}function b1(gs){var gq=gs.cm,gr=gq.display;if(gs.updatedDisplay){a8(gq)}gs.barMeasure=dA(gq);if(gr.maxLineChanged&&!gq.options.lineWrapping){gs.adjustWidthTo=ej(gq,gr.maxLine,gr.maxLine.text.length).left+3;gq.display.sizerWidth=gs.adjustWidthTo;gs.barMeasure.scrollWidth=Math.max(gr.scroller.clientWidth,gr.sizer.offsetLeft+gs.adjustWidthTo+cS(gq)+gq.display.barWidth);gs.maxScrollLeft=Math.max(0,gr.sizer.offsetLeft+gs.adjustWidthTo-dl(gq))}if(gs.updatedDisplay||gs.selectionChanged){gs.preparedSelection=gr.input.prepareSelection()}}function ao(gr){var gq=gr.cm;if(gr.adjustWidthTo!=null){gq.display.sizer.style.minWidth=gr.adjustWidthTo+"px";if(gr.maxScrollLeft<gq.doc.scrollLeft){bD(gq,Math.min(gq.display.scroller.scrollLeft,gr.maxScrollLeft),true)}gq.display.maxLineChanged=false}if(gr.preparedSelection){gq.display.input.showSelection(gr.preparedSelection)}if(gr.updatedDisplay||gr.startHeight!=gq.doc.height){e2(gq,gr.barMeasure)}if(gr.updatedDisplay){dz(gq,gr.barMeasure)}if(gr.selectionChanged){o(gq)}if(gq.state.focused&&gr.updateInput){gq.display.input.reset(gr.typing)}if(gr.focus&&gr.focus==dO()&&(!document.hasFocus||document.hasFocus())){r(gr.cm)}}function e4(gx){var gq=gx.cm,gv=gq.display,gu=gq.doc;if(gx.updatedDisplay){ci(gq,gx.update)}if(gv.wheelStartX!=null&&(gx.scrollTop!=null||gx.scrollLeft!=null||gx.scrollToPos)){gv.wheelStartX=gv.wheelStartY=null}if(gx.scrollTop!=null&&(gv.scroller.scrollTop!=gx.scrollTop||gx.forceScroll)){gu.scrollTop=Math.max(0,Math.min(gv.scroller.scrollHeight-gv.scroller.clientHeight,gx.scrollTop));gv.scrollbars.setScrollTop(gu.scrollTop);gv.scroller.scrollTop=gu.scrollTop}if(gx.scrollLeft!=null&&(gv.scroller.scrollLeft!=gx.scrollLeft||gx.forceScroll)){gu.scrollLeft=Math.max(0,Math.min(gv.scroller.scrollWidth-gv.scroller.clientWidth,gx.scrollLeft));gv.scrollbars.setScrollLeft(gu.scrollLeft);gv.scroller.scrollLeft=gu.scrollLeft;eH(gq)}if(gx.scrollToPos){var gt=D(gq,fP(gu,gx.scrollToPos.from),fP(gu,gx.scrollToPos.to),gx.scrollToPos.margin);if(gx.scrollToPos.isCursor&&gq.state.focused){d7(gq,gt)}}var gs=gx.maybeHiddenMarkers,gw=gx.maybeUnhiddenMarkers;if(gs){for(var gr=0;gr<gs.length;++gr){if(!gs[gr].lines.length){aD(gs[gr],"hide")}}}if(gw){for(var gr=0;gr<gw.length;++gr){if(gw[gr].lines.length){aD(gw[gr],"unhide")}}}if(gv.wrapper.offsetHeight){gu.scrollTop=gq.display.scroller.scrollTop}if(gx.changeObjs){aD(gq,"changes",gq,gx.changeObjs)}if(gx.update){gx.update.finish()}}function cL(gq,gr){if(gq.curOp){return gr()}cH(gq);try{return gr()}finally{al(gq)}}function c1(gq,gr){return function(){if(gq.curOp){return gr.apply(gq,arguments)}cH(gq);try{return gr.apply(gq,arguments)}finally{al(gq)}}}function c7(gq){return function(){if(this.curOp){return gq.apply(this,arguments)}cH(this);try{return gq.apply(this,arguments)}finally{al(this)}}}function cC(gq){return function(){var gr=this.cm;if(!gr||gr.curOp){return gq.apply(this,arguments)}cH(gr);try{return gq.apply(this,arguments)}finally{al(gr)}}}function bu(gs,gq,gr){this.line=gq;this.rest=g(gq);this.size=this.rest?bM(fL(this.rest))-gr+1:1;this.node=this.text=null;this.hidden=fB(gs,gq)}function eZ(gq,gw,gv){var gu=[],gs;for(var gt=gw;gt<gv;gt=gs){var gr=new bu(gq.doc,fk(gq.doc,gt),gt);gs=gt+gr.size;gu.push(gr)}return gu}function ah(gx,gv,gw,gy){if(gv==null){gv=gx.doc.first}if(gw==null){gw=gx.doc.first+gx.doc.size}if(!gy){gy=0}var gs=gx.display;if(gy&&gw<gs.viewTo&&(gs.updateLineNumbers==null||gs.updateLineNumbers>gv)){gs.updateLineNumbers=gv}gx.curOp.viewChanged=true;if(gv>=gs.viewTo){if(a6&&aV(gx.doc,gv)<gs.viewTo){eA(gx)}}else{if(gw<=gs.viewFrom){if(a6&&d3(gx.doc,gw+gy)>gs.viewFrom){eA(gx)}else{gs.viewFrom+=gy;gs.viewTo+=gy}}else{if(gv<=gs.viewFrom&&gw>=gs.viewTo){eA(gx)}else{if(gv<=gs.viewFrom){var gu=de(gx,gw,gw+gy,1);if(gu){gs.view=gs.view.slice(gu.index);gs.viewFrom=gu.lineN;gs.viewTo+=gy}else{eA(gx)}}else{if(gw>=gs.viewTo){var gu=de(gx,gv,gv,-1);if(gu){gs.view=gs.view.slice(0,gu.index);gs.viewTo=gu.lineN}else{eA(gx)}}else{var gt=de(gx,gv,gv,-1);var gr=de(gx,gw,gw+gy,1);if(gt&&gr){gs.view=gs.view.slice(0,gt.index).concat(eZ(gx,gt.lineN,gr.lineN)).concat(gs.view.slice(gr.index));gs.viewTo+=gy}else{eA(gx)}}}}}}var gq=gs.externalMeasured;if(gq){if(gw<gq.lineN){gq.lineN+=gy}else{if(gv<gq.lineN+gq.size){gs.externalMeasured=null}}}}function R(gr,gs,gv){gr.curOp.viewChanged=true;var gw=gr.display,gu=gr.display.externalMeasured;if(gu&&gs>=gu.lineN&&gs<gu.lineN+gu.size){gw.externalMeasured=null}if(gs<gw.viewFrom||gs>=gw.viewTo){return}var gt=gw.view[dr(gr,gs)];if(gt.node==null){return}var gq=gt.changes||(gt.changes=[]);if(dh(gq,gv)==-1){gq.push(gv)}}function eA(gq){gq.display.viewFrom=gq.display.viewTo=gq.doc.first;gq.display.view=[];gq.display.viewOffset=0}function dr(gq,gt){if(gt>=gq.display.viewTo){return null}gt-=gq.display.viewFrom;if(gt<0){return null}var gr=gq.display.view;for(var gs=0;gs<gr.length;gs++){gt-=gr[gs].size;if(gt<0){return gs}}}function de(gy,gs,gu,gr){var gv=dr(gy,gs),gx,gw=gy.display.view;if(!a6||gu==gy.doc.first+gy.doc.size){return{index:gv,lineN:gu}}for(var gt=0,gq=gy.display.viewFrom;gt<gv;gt++){gq+=gw[gt].size}if(gq!=gs){if(gr>0){if(gv==gw.length-1){return null}gx=(gq+gw[gv].size)-gs;gv++}else{gx=gq-gs}gs+=gx;gu+=gx}while(aV(gy.doc,gu)!=gu){if(gv==(gr<0?0:gw.length-1)){return null}gu+=gr*gw[gv-(gr<0?1:0)].size;gv+=gr}return{index:gv,lineN:gu}}function cQ(gq,gu,gt){var gs=gq.display,gr=gs.view;if(gr.length==0||gu>=gs.viewTo||gt<=gs.viewFrom){gs.view=eZ(gq,gu,gt);gs.viewFrom=gu}else{if(gs.viewFrom>gu){gs.view=eZ(gq,gu,gs.viewFrom).concat(gs.view)}else{if(gs.viewFrom<gu){gs.view=gs.view.slice(dr(gq,gu))}}gs.viewFrom=gu;if(gs.viewTo<gt){gs.view=gs.view.concat(eZ(gq,gs.viewTo,gt))}else{if(gs.viewTo>gt){gs.view=gs.view.slice(0,dr(gq,gt))}}}gs.viewTo=gt}function db(gq){var gr=gq.display.view,gu=0;for(var gt=0;gt<gr.length;gt++){var gs=gr[gt];if(!gs.hidden&&(!gs.node||gs.changes)){++gu}}return gu}function fW(gr){var gv=gr.display;bW(gv.scroller,"mousedown",c1(gr,ey));if(dK&&k<11){bW(gv.scroller,"dblclick",c1(gr,function(gz){if(aQ(gr,gz)){return}var gA=cm(gr,gz);if(!gA||l(gr,gz)||ba(gr.display,gz)){return}cF(gz);var gy=gr.findWordAt(gA);f3(gr.doc,gy.anchor,gy.head)}))}else{bW(gv.scroller,"dblclick",function(gy){aQ(gr,gy)||cF(gy)})}if(!gg){bW(gv.scroller,"contextmenu",function(gy){ax(gr,gy)})}var gx,gq={end:0};function gw(){if(gv.activeTouch){gx=setTimeout(function(){gv.activeTouch=null},1000);gq=gv.activeTouch;gq.end=+new Date}}function gt(gy){if(gy.touches.length!=1){return false}var gz=gy.touches[0];return gz.radiusX<=1&&gz.radiusY<=1}function gs(gB,gy){if(gy.left==null){return true}var gA=gy.left-gB.left,gz=gy.top-gB.top;return gA*gA+gz*gz>20*20}bW(gv.scroller,"touchstart",function(gz){if(!aQ(gr,gz)&&!gt(gz)){clearTimeout(gx);var gy=+new Date;gv.activeTouch={start:gy,moved:false,prev:gy-gq.end<=300?gq:null};if(gz.touches.length==1){gv.activeTouch.left=gz.touches[0].pageX;gv.activeTouch.top=gz.touches[0].pageY}}});bW(gv.scroller,"touchmove",function(){if(gv.activeTouch){gv.activeTouch.moved=true}});bW(gv.scroller,"touchend",function(gz){var gB=gv.activeTouch;if(gB&&!ba(gv,gz)&&gB.left!=null&&!gB.moved&&new Date-gB.start<300){var gA=gr.coordsChar(gv.activeTouch,"page"),gy;if(!gB.prev||gs(gB,gB.prev)){gy=new dY(gA,gA)}else{if(!gB.prev.prev||gs(gB,gB.prev.prev)){gy=gr.findWordAt(gA)}else{gy=new dY(W(gA.line,0),fP(gr.doc,W(gA.line+1,0)))}}gr.setSelection(gy.anchor,gy.head);gr.focus();cF(gz)}gw()});bW(gv.scroller,"touchcancel",gw);bW(gv.scroller,"scroll",function(){if(gv.scroller.clientHeight){N(gr,gv.scroller.scrollTop);bD(gr,gv.scroller.scrollLeft,true);aD(gr,"scroll",gr)}});bW(gv.scroller,"mousewheel",function(gy){b(gr,gy)});bW(gv.scroller,"DOMMouseScroll",function(gy){b(gr,gy)});bW(gv.wrapper,"scroll",function(){gv.wrapper.scrollTop=gv.wrapper.scrollLeft=0});gv.dragFunctions={enter:function(gy){if(!aQ(gr,gy)){eu(gy)}},over:function(gy){if(!aQ(gr,gy)){gn(gr,gy);eu(gy)}},start:function(gy){Q(gr,gy)},drop:c1(gr,bj),leave:function(gy){if(!aQ(gr,gy)){da(gr)}}};var gu=gv.input.getField();bW(gu,"keyup",function(gy){bh.call(gr,gy)});bW(gu,"keydown",c1(gr,p));bW(gu,"keypress",c1(gr,cw));bW(gu,"focus",cu(cA,gr));bW(gu,"blur",cu(aU,gr))}function f7(gr,gu,gs){var gv=gs&&gs!=H.Init;if(!gu!=!gv){var gt=gr.display.dragFunctions;var gq=gu?bW:ef;gq(gr.display.scroller,"dragstart",gt.start);gq(gr.display.scroller,"dragenter",gt.enter);gq(gr.display.scroller,"dragover",gt.over);gq(gr.display.scroller,"dragleave",gt.leave);gq(gr.display.scroller,"drop",gt.drop)}}function aS(gq){var gr=gq.display;if(gr.lastWrapHeight==gr.wrapper.clientHeight&&gr.lastWrapWidth==gr.wrapper.clientWidth){return}gr.cachedCharWidth=gr.cachedTextHeight=gr.cachedPaddingH=null;gr.scrollbarsClipped=false;gq.setSize()}function ba(gr,gq){for(var gs=L(gq);gs!=gr.wrapper;gs=gs.parentNode){if(!gs||(gs.nodeType==1&&gs.getAttribute("cm-ignore-events")=="true")||(gs.parentNode==gr.sizer&&gs!=gr.mover)){return true}}}function cm(gz,gu,gr,gs){var gv=gz.display;if(!gr&&L(gu).getAttribute("cm-not-content")=="true"){return null}var gy,gw,gq=gv.lineSpace.getBoundingClientRect();try{gy=gu.clientX-gq.left;gw=gu.clientY-gq.top}catch(gu){return null}var gx=fU(gz,gy,gw),gA;if(gs&&gx.xRel==1&&(gA=fk(gz.doc,gx.line).text).length==gx.ch){var gt=bS(gA,gA.length,gz.options.tabSize)-gA.length;gx=W(gx.line,Math.max(0,Math.round((gy-e9(gz.display).left)/dD(gz.display))-gt))}return gx}function ey(gs){var gq=this,gr=gq.display;if(aQ(gq,gs)||gr.activeTouch&&gr.input.supportsTouch()){return}gr.shift=gs.shiftKey;if(ba(gr,gs)){if(!cZ){gr.scroller.draggable=false;setTimeout(function(){gr.scroller.draggable=true},100)}return}if(l(gq,gs)){return}var gt=cm(gq,gs);window.focus();switch(fT(gs)){case 1:if(gq.state.selectingText){gq.state.selectingText(gs)}else{if(gt){aw(gq,gs,gt)}else{if(L(gs)==gr.scroller){cF(gs)}}}break;case 2:if(cZ){gq.state.lastMiddleDown=+new Date}if(gt){f3(gq.doc,gt)}setTimeout(function(){gr.input.focus()},20);cF(gs);break;case 3:if(gg){ax(gq,gs)}else{ak(gq)}break}}var dn,dd;function aw(gr,gw,gx){if(dK){setTimeout(cu(r,gr),0)}else{gr.curOp.focus=dO()}var gs=+new Date,gu;if(dd&&dd.time>gs-400&&ce(dd.pos,gx)==0){gu="triple"}else{if(dn&&dn.time>gs-400&&ce(dn.pos,gx)==0){gu="double";dd={time:gs,pos:gx}}else{gu="single";dn={time:gs,pos:gx}}}var gv=gr.doc.sel,gq=b6?gw.metaKey:gw.ctrlKey,gt;if(gr.options.dragDrop&&eP&&!gr.isReadOnly()&&gu=="single"&&(gt=gv.contains(gx))>-1&&(ce((gt=gv.ranges[gt]).from(),gx)<0||gx.xRel>0)&&(ce(gt.to(),gx)>0||gx.xRel<0)){a2(gr,gw,gx,gq)}else{m(gr,gw,gx,gu,gq)}}function a2(gs,gv,gw,gr){var gu=gs.display,gt=+new Date;var gq=c1(gs,function(gx){if(cZ){gu.scroller.draggable=false}gs.state.draggingText=false;ef(document,"mouseup",gq);ef(gu.scroller,"drop",gq);if(Math.abs(gv.clientX-gx.clientX)+Math.abs(gv.clientY-gx.clientY)<10){cF(gx);if(!gr&&+new Date-200<gt){f3(gs.doc,gw)}if(cZ||dK&&k==9){setTimeout(function(){document.body.focus();gu.input.focus()},20)}else{gu.input.focus()}}});if(cZ){gu.scroller.draggable=true}gs.state.draggingText=gq;if(gu.scroller.dragDrop){gu.scroller.dragDrop()}bW(document,"mouseup",gq);bW(gu.scroller,"drop",gq)}function m(gu,gI,gt,gr,gw){var gF=gu.display,gK=gu.doc;cF(gI);var gs,gJ,gv=gK.sel,gq=gv.ranges;if(gw&&!gI.shiftKey){gJ=gK.sel.contains(gt);if(gJ>-1){gs=gq[gJ]}else{gs=new dY(gt,gt)}}else{gs=gK.sel.primary();gJ=gK.sel.primIndex}if(fO?gI.shiftKey&&gI.metaKey:gI.altKey){gr="rect";if(!gw){gs=new dY(gt,gt)}gt=cm(gu,gI,true,true);gJ=-1}else{if(gr=="double"){var gG=gu.findWordAt(gt);if(gu.display.shift||gK.extend){gs=fA(gK,gs,gG.anchor,gG.head)}else{gs=gG}}else{if(gr=="triple"){var gz=new dY(W(gt.line,0),fP(gK,W(gt.line+1,0)));if(gu.display.shift||gK.extend){gs=fA(gK,gs,gz.anchor,gz.head)}else{gs=gz}}else{gs=fA(gK,gs,gt)}}}if(!gw){gJ=0;bT(gK,new ga([gs],0),M);gv=gK.sel}else{if(gJ==-1){gJ=gq.length;bT(gK,cv(gq.concat([gs]),gJ),{scroll:false,origin:"*mouse"})}else{if(gq.length>1&&gq[gJ].empty()&&gr=="single"&&!gI.shiftKey){bT(gK,cv(gq.slice(0,gJ).concat(gq.slice(gJ+1)),0),{scroll:false,origin:"*mouse"});gv=gK.sel}else{e(gK,gJ,gs,M)}}}var gE=gt;function gD(gV){if(ce(gE,gV)==0){return}gE=gV;if(gr=="rect"){var gM=[],gS=gu.options.tabSize;var gL=bS(fk(gK,gt.line).text,gt.ch,gS);var gY=bS(fk(gK,gV.line).text,gV.ch,gS);var gN=Math.min(gL,gY),gW=Math.max(gL,gY);for(var gZ=Math.min(gt.line,gV.line),gP=Math.min(gu.lastLine(),Math.max(gt.line,gV.line));gZ<=gP;gZ++){var gX=fk(gK,gZ).text,gO=et(gX,gN,gS);if(gN==gW){gM.push(new dY(W(gZ,gO),W(gZ,gO)))}else{if(gX.length>gO){gM.push(new dY(W(gZ,gO),W(gZ,et(gX,gW,gS))))}}}if(!gM.length){gM.push(new dY(gt,gt))}bT(gK,cv(gv.ranges.slice(0,gJ).concat(gM),gJ),{origin:"*mouse",scroll:false});gu.scrollIntoView(gV)}else{var gT=gs;var gQ=gT.anchor,gU=gV;if(gr!="single"){if(gr=="double"){var gR=gu.findWordAt(gV)}else{var gR=new dY(W(gV.line,0),fP(gK,W(gV.line+1,0)))}if(ce(gR.anchor,gQ)>0){gU=gR.head;gQ=aq(gT.from(),gR.anchor)}else{gU=gR.anchor;gQ=bw(gT.to(),gR.head)}}var gM=gv.ranges.slice(0);gM[gJ]=new dY(fP(gK,gQ),gU);bT(gK,cv(gM,gJ),M)}}var gB=gF.wrapper.getBoundingClientRect();var gx=0;function gH(gN){var gL=++gx;var gP=cm(gu,gN,true,gr=="rect");if(!gP){return}if(ce(gP,gE)!=0){gu.curOp.focus=dO();gD(gP);var gO=b5(gF,gK);if(gP.line>=gO.to||gP.line<gO.from){setTimeout(c1(gu,function(){if(gx==gL){gH(gN)}}),150)}}else{var gM=gN.clientY<gB.top?-20:gN.clientY>gB.bottom?20:0;if(gM){setTimeout(c1(gu,function(){if(gx!=gL){return}gF.scroller.scrollTop+=gM;gH(gN)}),50)}}}function gA(gL){gu.state.selectingText=false;gx=Infinity;cF(gL);gF.input.focus();ef(document,"mousemove",gC);ef(document,"mouseup",gy);gK.history.lastSelOrigin=null}var gC=c1(gu,function(gL){if(!fT(gL)){gA(gL)}else{gH(gL)}});var gy=c1(gu,gA);gu.state.selectingText=gy;bW(document,"mousemove",gC);bW(document,"mouseup",gy)}function go(gA,gw,gy,gz){try{var gr=gw.clientX,gq=gw.clientY}catch(gw){return false}if(gr>=Math.floor(gA.display.gutters.getBoundingClientRect().right)){return false}if(gz){cF(gw)}var gx=gA.display;var gv=gx.lineDiv.getBoundingClientRect();if(gq>gv.bottom||!fn(gA,gy)){return bK(gw)}gq-=gv.top-gx.viewOffset;for(var gt=0;gt<gA.options.gutters.length;++gt){var gu=gx.gutters.childNodes[gt];if(gu&&gu.getBoundingClientRect().right>=gr){var gB=bF(gA.doc,gq);var gs=gA.options.gutters[gt];aD(gA,gy,gA,gB,gs,gw);return bK(gw)}}}function l(gq,gr){return go(gq,gr,"gutterClick",true)}var ag=0;function bj(gw){var gy=this;da(gy);if(aQ(gy,gw)||ba(gy.display,gw)){return}cF(gw);if(dK){ag=+new Date}var gx=cm(gy,gw,true),gq=gw.dataTransfer.files;if(!gx||gy.isReadOnly()){return}if(gq&&gq.length&&window.FileReader&&window.File){var gs=gq.length,gz=Array(gs),gr=0;var gu=function(gC,gB){if(gy.options.allowDropFileTypes&&dh(gy.options.allowDropFileTypes,gC.type)==-1){return}var gA=new FileReader;gA.onload=c1(gy,function(){var gD=gA.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(gD)){gD=""}gz[gB]=gD;if(++gr==gs){gx=fP(gy.doc,gx);var gE={from:gx,to:gx,text:gy.doc.splitLines(gz.join(gy.doc.lineSeparator())),origin:"paste"};bf(gy.doc,gE);fc(gy.doc,eW(gx,cW(gE)))}});gA.readAsText(gC)};for(var gv=0;gv<gs;++gv){gu(gq[gv],gv)}}else{if(gy.state.draggingText&&gy.doc.sel.contains(gx)>-1){gy.state.draggingText(gw);setTimeout(function(){gy.display.input.focus()},20);return}try{var gz=gw.dataTransfer.getData("Text");if(gz){if(gy.state.draggingText&&!(b6?gw.altKey:gw.ctrlKey)){var gt=gy.listSelections()}es(gy.doc,eW(gx,gx));if(gt){for(var gv=0;gv<gt.length;++gv){a0(gy.doc,"",gt[gv].anchor,gt[gv].head,"drag")}}gy.replaceSelection(gz,"around","paste");gy.display.input.focus()}}catch(gw){}}}function Q(gq,gs){if(dK&&(!gq.state.draggingText||+new Date-ag<100)){eu(gs);return}if(aQ(gq,gs)||ba(gq.display,gs)){return}gs.dataTransfer.setData("Text",gq.getSelection());if(gs.dataTransfer.setDragImage&&!aB){var gr=f9("img",null,null,"position: fixed; left: 0; top: 0;");gr.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(d4){gr.width=gr.height=1;gq.display.wrapper.appendChild(gr);gr._top=gr.offsetTop}gs.dataTransfer.setDragImage(gr,0,0);if(d4){gr.parentNode.removeChild(gr)}}}function gn(gq,gr){var gt=cm(gq,gr);if(!gt){return}var gs=document.createDocumentFragment();A(gq,gt,gs);if(!gq.display.dragCursor){gq.display.dragCursor=f9("div",null,"CodeMirror-cursors CodeMirror-dragcursors");gq.display.lineSpace.insertBefore(gq.display.dragCursor,gq.display.cursorDiv)}bQ(gq.display.dragCursor,gs)}function da(gq){if(gq.display.dragCursor){gq.display.lineSpace.removeChild(gq.display.dragCursor);gq.display.dragCursor=null}}function N(gq,gr){if(Math.abs(gq.doc.scrollTop-gr)<2){return}gq.doc.scrollTop=gr;if(!cn){dT(gq,{top:gr})}if(gq.display.scroller.scrollTop!=gr){gq.display.scroller.scrollTop=gr}gq.display.scrollbars.setScrollTop(gr);if(cn){dT(gq)}eh(gq,100)}function bD(gq,gs,gr){if(gr?gs==gq.doc.scrollLeft:Math.abs(gq.doc.scrollLeft-gs)<2){return}gs=Math.min(gs,gq.display.scroller.scrollWidth-gq.display.scroller.clientWidth);gq.doc.scrollLeft=gs;eH(gq);if(gq.display.scroller.scrollLeft!=gs){gq.display.scroller.scrollLeft=gs}gq.display.scrollbars.setScrollLeft(gs)}var fr=0,cf=null;if(dK){cf=-0.53}else{if(cn){cf=15}else{if(dc){cf=-0.7}else{if(aB){cf=-1/3}}}}var cP=function(gs){var gr=gs.wheelDeltaX,gq=gs.wheelDeltaY;if(gr==null&&gs.detail&&gs.axis==gs.HORIZONTAL_AXIS){gr=gs.detail}if(gq==null&&gs.detail&&gs.axis==gs.VERTICAL_AXIS){gq=gs.detail}else{if(gq==null){gq=gs.wheelDelta}}return{x:gr,y:gq}};H.wheelEventPixels=function(gq){var gr=cP(gq);gr.x*=cf;gr.y*=cf;return gr};function b(gA,gu){var gC=cP(gu),gE=gC.x,gD=gC.y;var gw=gA.display,gz=gw.scroller;var gt=gz.scrollWidth>gz.clientWidth;var gs=gz.scrollHeight>gz.clientHeight;if(!(gE&>||gD&&gs)){return}if(gD&&b6&&cZ){outer:for(var gB=gu.target,gy=gw.view;gB!=gz;gB=gB.parentNode){for(var gr=0;gr<gy.length;gr++){if(gy[gr].node==gB){gA.display.currentWheelTarget=gB;break outer}}}}if(gE&&!cn&&!d4&&cf!=null){if(gD&&gs){N(gA,Math.max(0,Math.min(gz.scrollTop+gD*cf,gz.scrollHeight-gz.clientHeight)))}bD(gA,Math.max(0,Math.min(gz.scrollLeft+gE*cf,gz.scrollWidth-gz.clientWidth)));if(!gD||(gD&&gs)){cF(gu)}gw.wheelStartX=null;return}if(gD&&cf!=null){var gq=gD*cf;var gx=gA.doc.scrollTop,gv=gx+gw.wrapper.clientHeight;if(gq<0){gx=Math.max(0,gx+gq-50)}else{gv=Math.min(gA.doc.height,gv+gq+50)}dT(gA,{top:gx,bottom:gv})}if(fr<20){if(gw.wheelStartX==null){gw.wheelStartX=gz.scrollLeft;gw.wheelStartY=gz.scrollTop;gw.wheelDX=gE;gw.wheelDY=gD;setTimeout(function(){if(gw.wheelStartX==null){return}var gF=gz.scrollLeft-gw.wheelStartX;var gH=gz.scrollTop-gw.wheelStartY;var gG=(gH&&gw.wheelDY&&gH/gw.wheelDY)||(gF&&gw.wheelDX&&gF/gw.wheelDX);gw.wheelStartX=gw.wheelStartY=null;if(!gG){return}cf=(cf*fr+gG)/(fr+1);++fr},200)}else{gw.wheelDX+=gE;gw.wheelDY+=gD}}}function fX(gr,gu,gq){if(typeof gu=="string"){gu=eG[gu];if(!gu){return false}}gr.display.input.ensurePolled();var gt=gr.display.shift,gs=false;try{if(gr.isReadOnly()){gr.state.suppressEdits=true}if(gq){gr.display.shift=false}gs=gu(gr)!=b9}finally{gr.display.shift=gt;gr.state.suppressEdits=false}return gs}function eb(gr,gs,gu){for(var gt=0;gt<gr.state.keyMaps.length;gt++){var gq=i(gs,gr.state.keyMaps[gt],gu,gr);if(gq){return gq}}return(gr.options.extraKeys&&i(gs,gr.options.extraKeys,gu,gr))||i(gs,gr.options.keyMap,gu,gr)}var dM=new gp;function bc(gr,gt,gv,gu){var gs=gr.state.keySeq;if(gs){if(eF(gt)){return"handled"}dM.set(50,function(){if(gr.state.keySeq==gs){gr.state.keySeq=null;gr.display.input.reset()}});gt=gs+" "+gt}var gq=eb(gr,gt,gu);if(gq=="multi"){gr.state.keySeq=gt}if(gq=="handled"){ae(gr,"keyHandled",gr,gt,gv)}if(gq=="handled"||gq=="multi"){cF(gv);o(gr)}if(gs&&!gq&&/\'$/.test(gt)){cF(gv);return true}return !!gq}function fo(gq,gs){var gr=fw(gs,true);if(!gr){return false}if(gs.shiftKey&&!gq.state.keySeq){return bc(gq,"Shift-"+gr,gs,function(gt){return fX(gq,gt,true)})||bc(gq,gr,gs,function(gt){if(typeof gt=="string"?/^go[A-Z]/.test(gt):gt.motion){return fX(gq,gt)}})}else{return bc(gq,gr,gs,function(gt){return fX(gq,gt)})}}function el(gq,gs,gr){return bc(gq,"'"+gr+"'",gs,function(gt){return fX(gq,gt,true)})}var dm=null;function p(gt){var gq=this;gq.curOp.focus=dO();if(aQ(gq,gt)){return}if(dK&&k<11&>.keyCode==27){gt.returnValue=false}var gr=gt.keyCode;gq.display.shift=gr==16||gt.shiftKey;var gs=fo(gq,gt);if(d4){dm=gs?gr:null;if(!gs&&gr==88&&!c9&&(b6?gt.metaKey:gt.ctrlKey)){gq.replaceSelection("",null,"cut")}}if(gr==18&&!/\bCodeMirror-crosshair\b/.test(gq.display.lineDiv.className)){au(gq)}}function au(gr){var gs=gr.display.lineDiv;fF(gs,"CodeMirror-crosshair");function gq(gt){if(gt.keyCode==18||!gt.altKey){f(gs,"CodeMirror-crosshair");ef(document,"keyup",gq);ef(document,"mouseover",gq)}}bW(document,"keyup",gq);bW(document,"mouseover",gq)}function bh(gq){if(gq.keyCode==16){this.doc.sel.shift=false}aQ(this,gq)}function cw(gu){var gq=this;if(ba(gq.display,gu)||aQ(gq,gu)||gu.ctrlKey&&!gu.altKey||b6&&gu.metaKey){return}var gt=gu.keyCode,gr=gu.charCode;if(d4&>==dm){dm=null;cF(gu);return}if((d4&&(!gu.which||gu.which<10))&&fo(gq,gu)){return}var gs=String.fromCharCode(gr==null?gt:gr);if(el(gq,gu,gs)){return}gq.display.input.onKeyPress(gu)}function ak(gq){gq.state.delayingBlurEvent=true;setTimeout(function(){if(gq.state.delayingBlurEvent){gq.state.delayingBlurEvent=false;aU(gq)}},100)}function cA(gq){if(gq.state.delayingBlurEvent){gq.state.delayingBlurEvent=false}if(gq.options.readOnly=="nocursor"){return}if(!gq.state.focused){aD(gq,"focus",gq);gq.state.focused=true;fF(gq.display.wrapper,"CodeMirror-focused");if(!gq.curOp&&gq.display.selForContextMenu!=gq.doc.sel){gq.display.input.reset();if(cZ){setTimeout(function(){gq.display.input.reset(true)},20)}}gq.display.input.receivedFocus()}o(gq)}function aU(gq){if(gq.state.delayingBlurEvent){return}if(gq.state.focused){aD(gq,"blur",gq);gq.state.focused=false;f(gq.display.wrapper,"CodeMirror-focused")}clearInterval(gq.display.blinker);setTimeout(function(){if(!gq.state.focused){gq.display.shift=false}},150)}function ax(gq,gr){if(ba(gq.display,gr)||dg(gq,gr)){return}if(aQ(gq,gr,"contextmenu")){return}gq.display.input.onContextMenu(gr)}function dg(gq,gr){if(!fn(gq,"gutterContextMenu")){return false}return go(gq,gr,"gutterContextMenu",false)}var cW=H.changeEnd=function(gq){if(!gq.text){return gq.to}return W(gq.from.line+gq.text.length-1,fL(gq.text).length+(gq.text.length==1?gq.from.ch:0))};function bY(gt,gs){if(ce(gt,gs.from)<0){return gt}if(ce(gt,gs.to)<=0){return cW(gs)}var gq=gt.line+gs.text.length-(gs.to.line-gs.from.line)-1,gr=gt.ch;if(gt.line==gs.to.line){gr+=cW(gs).ch-gs.to.ch}return W(gq,gr)}function fp(gt,gu){var gr=[];for(var gs=0;gs<gt.sel.ranges.length;gs++){var gq=gt.sel.ranges[gs];gr.push(new dY(bY(gq.anchor,gu),bY(gq.head,gu)))}return cv(gr,gt.sel.primIndex)}function bt(gs,gr,gq){if(gs.line==gr.line){return W(gq.line,gs.ch-gr.ch+gq.ch)}else{return W(gq.line+(gs.line-gr.line),gs.ch)}}function af(gA,gx,gr){var gs=[];var gq=W(gA.first,0),gB=gq;for(var gu=0;gu<gx.length;gu++){var gw=gx[gu];var gz=bt(gw.from,gq,gB);var gy=bt(cW(gw),gq,gB);gq=gw.to;gB=gy;if(gr=="around"){var gv=gA.sel.ranges[gu],gt=ce(gv.head,gv.anchor)<0;gs[gu]=new dY(gt?gy:gz,gt?gz:gy)}else{gs[gu]=new dY(gz,gz)}}return new ga(gs,gA.sel.primIndex)}function dR(gr,gt,gs){var gq={canceled:false,from:gt.from,to:gt.to,text:gt.text,origin:gt.origin,cancel:function(){this.canceled=true}};if(gs){gq.update=function(gx,gw,gv,gu){if(gx){this.from=fP(gr,gx)}if(gw){this.to=fP(gr,gw)}if(gv){this.text=gv}if(gu!==undefined){this.origin=gu}}}aD(gr,"beforeChange",gr,gq);if(gr.cm){aD(gr.cm,"beforeChange",gr.cm,gq)}if(gq.canceled){return null}return{from:gq.from,to:gq.to,text:gq.text,origin:gq.origin}}function bf(gt,gu,gs){if(gt.cm){if(!gt.cm.curOp){return c1(gt.cm,bf)(gt,gu,gs)}if(gt.cm.state.suppressEdits){return}}if(fn(gt,"beforeChange")||gt.cm&&fn(gt.cm,"beforeChange")){gu=dR(gt,gu,true);if(!gu){return}}var gr=gj&&!gs&&cG(gt,gu.from,gu.to);if(gr){for(var gq=gr.length-1;gq>=0;--gq){K(gt,{from:gr[gq].from,to:gr[gq].to,text:gq?[""]:gu.text})}}else{K(gt,gu)}}function K(gs,gt){if(gt.text.length==1&>.text[0]==""&&ce(gt.from,gt.to)==0){return}var gr=fp(gs,gt);fS(gs,gt,gr,gs.cm?gs.cm.curOp.id:NaN);eg(gs,gt,gr,em(gs,gt));var gq=[];d8(gs,function(gv,gu){if(!gu&&dh(gq,gv.history)==-1){dE(gv.history,gt);gq.push(gv.history)}eg(gv,gt,null,em(gv,gt))})}function b7(gB,gz,gD){if(gB.cm&&gB.cm.state.suppressEdits){return}var gy=gB.history,gs,gu=gB.sel;var gq=gz=="undo"?gy.done:gy.undone,gC=gz=="undo"?gy.undone:gy.done;for(var gv=0;gv<gq.length;gv++){gs=gq[gv];if(gD?gs.ranges&&!gs.equals(gB.sel):!gs.ranges){break}}if(gv==gq.length){return}gy.lastOrigin=gy.lastSelOrigin=null;for(;;){gs=gq.pop();if(gs.ranges){cM(gs,gC);if(gD&&!gs.equals(gB.sel)){bT(gB,gs,{clearRedo:false});return}gu=gs}else{break}}var gx=[];cM(gu,gC);gC.push({changes:gx,generation:gy.generation});gy.generation=gs.generation||++gy.maxGeneration;var gt=fn(gB,"beforeChange")||gB.cm&&fn(gB.cm,"beforeChange");for(var gv=gs.changes.length-1;gv>=0;--gv){var gA=gs.changes[gv];gA.origin=gz;if(gt&&!dR(gB,gA,false)){gq.length=0;return}gx.push(du(gB,gA));var gr=gv?fp(gB,gA):fL(gq);eg(gB,gA,gr,ea(gB,gA));if(!gv&&gB.cm){gB.cm.scrollIntoView({from:gA.from,to:cW(gA)})}var gw=[];d8(gB,function(gF,gE){if(!gE&&dh(gw,gF.history)==-1){dE(gF.history,gA);gw.push(gF.history)}eg(gF,gA,null,ea(gF,gA))})}}function fs(gr,gt){if(gt==0){return}gr.first+=gt;gr.sel=new ga(bR(gr.sel.ranges,function(gu){return new dY(W(gu.anchor.line+gt,gu.anchor.ch),W(gu.head.line+gt,gu.head.ch))}),gr.sel.primIndex);if(gr.cm){ah(gr.cm,gr.first,gr.first-gt,gt);for(var gs=gr.cm.display,gq=gs.viewFrom;gq<gs.viewTo;gq++){R(gr.cm,gq,"gutter")}}}function eg(gu,gv,gt,gr){if(gu.cm&&!gu.cm.curOp){return c1(gu.cm,eg)(gu,gv,gt,gr)}if(gv.to.line<gu.first){fs(gu,gv.text.length-1-(gv.to.line-gv.from.line));return}if(gv.from.line>gu.lastLine()){return}if(gv.from.line<gu.first){var gq=gv.text.length-1-(gu.first-gv.from.line);fs(gu,gq);gv={from:W(gu.first,0),to:W(gv.to.line+gq,gv.to.ch),text:[fL(gv.text)],origin:gv.origin}}var gs=gu.lastLine();if(gv.to.line>gs){gv={from:gv.from,to:W(gs,fk(gu,gs).text.length),text:[gv.text[0]],origin:gv.origin}}gv.removed=gb(gu,gv.from,gv.to);if(!gt){gt=fp(gu,gv)}if(gu.cm){aI(gu.cm,gv,gr)}else{fD(gu,gv,gr)}es(gu,gt,Z)}function aI(gB,gx,gv){var gA=gB.doc,gw=gB.display,gy=gx.from,gz=gx.to;var gq=false,gu=gy.line;if(!gB.options.lineWrapping){gu=bM(x(fk(gA,gy.line)));gA.iter(gu,gz.line+1,function(gD){if(gD==gw.maxLine){gq=true;return true}})}if(gA.sel.contains(gx.from,gx.to)>-1){V(gB)}fD(gA,gx,gv,bd(gB));if(!gB.options.lineWrapping){gA.iter(gu,gy.line+gx.text.length,function(gE){var gD=eq(gE);if(gD>gw.maxLineLength){gw.maxLine=gE;gw.maxLineLength=gD;gw.maxLineChanged=true;gq=false}});if(gq){gB.curOp.updateMaxLine=true}}gA.frontier=Math.min(gA.frontier,gy.line);eh(gB,400);var gC=gx.text.length-(gz.line-gy.line)-1;if(gx.full){ah(gB)}else{if(gy.line==gz.line&&gx.text.length==1&&!dS(gB.doc,gx)){R(gB,gy.line,"text")}else{ah(gB,gy.line,gz.line+1,gC)}}var gs=fn(gB,"changes"),gt=fn(gB,"change");if(gt||gs){var gr={from:gy,to:gz,text:gx.text,removed:gx.removed,origin:gx.origin};if(gt){ae(gB,"change",gB,gr)}if(gs){(gB.curOp.changeObjs||(gB.curOp.changeObjs=[])).push(gr)}}gB.display.selForContextMenu=null}function a0(gt,gs,gv,gu,gq){if(!gu){gu=gv}if(ce(gu,gv)<0){var gr=gu;gu=gv;gv=gr}if(typeof gs=="string"){gs=gt.splitLines(gs)}bf(gt,{from:gv,to:gu,text:gs,origin:gq})}function d7(gr,gu){if(aQ(gr,"scrollCursorIntoView")){return}var gv=gr.display,gs=gv.sizer.getBoundingClientRect(),gq=null;if(gu.top+gs.top<0){gq=true}else{if(gu.bottom+gs.top>(window.innerHeight||document.documentElement.clientHeight)){gq=false}}if(gq!=null&&!fz){var gt=f9("div","\u200b",null,"position: absolute; top: "+(gu.top-gv.viewOffset-fd(gr.display))+"px; height: "+(gu.bottom-gu.top+cS(gr)+gv.barHeight)+"px; left: "+gu.left+"px; width: 2px;");gr.display.lineSpace.appendChild(gt);gt.scrollIntoView(gq);gr.display.lineSpace.removeChild(gt)}}function D(gA,gy,gu,gt){if(gt==null){gt=0}for(var gv=0;gv<5;gv++){var gw=false,gz=dU(gA,gy);var gq=!gu||gu==gy?gz:dU(gA,gu);var gs=G(gA,Math.min(gz.left,gq.left),Math.min(gz.top,gq.top)-gt,Math.max(gz.left,gq.left),Math.max(gz.bottom,gq.bottom)+gt);var gx=gA.doc.scrollTop,gr=gA.doc.scrollLeft;if(gs.scrollTop!=null){N(gA,gs.scrollTop);if(Math.abs(gA.doc.scrollTop-gx)>1){gw=true}}if(gs.scrollLeft!=null){bD(gA,gs.scrollLeft);if(Math.abs(gA.doc.scrollLeft-gr)>1){gw=true}}if(!gw){break}}return gz}function E(gq,gs,gu,gr,gt){var gv=G(gq,gs,gu,gr,gt);if(gv.scrollTop!=null){N(gq,gv.scrollTop)}if(gv.scrollLeft!=null){bD(gq,gv.scrollLeft)}}function G(gC,gt,gB,gr,gA){var gy=gC.display,gw=aX(gC.display);if(gB<0){gB=0}var gu=gC.curOp&&gC.curOp.scrollTop!=null?gC.curOp.scrollTop:gy.scroller.scrollTop;var gE=cU(gC),gG={};if(gA-gB>gE){gA=gB+gE}var gs=gC.doc.height+bH(gy);var gq=gB<gw,gx=gA>gs-gw;if(gB<gu){gG.scrollTop=gq?0:gB}else{if(gA>gu+gE){var gz=Math.min(gB,(gx?gs:gA)-gE);if(gz!=gu){gG.scrollTop=gz}}}var gF=gC.curOp&&gC.curOp.scrollLeft!=null?gC.curOp.scrollLeft:gy.scroller.scrollLeft;var gD=dl(gC)-(gC.options.fixedGutter?gy.gutters.offsetWidth:0);var gv=gr-gt>gD;if(gv){gr=gt+gD}if(gt<10){gG.scrollLeft=0}else{if(gt<gF){gG.scrollLeft=Math.max(0,gt-(gv?0:10))}else{if(gr>gD+gF-3){gG.scrollLeft=gr+(gv?0:10)-gD}}}return gG}function cK(gq,gs,gr){if(gs!=null||gr!=null){fH(gq)}if(gs!=null){gq.curOp.scrollLeft=(gq.curOp.scrollLeft==null?gq.doc.scrollLeft:gq.curOp.scrollLeft)+gs}if(gr!=null){gq.curOp.scrollTop=(gq.curOp.scrollTop==null?gq.doc.scrollTop:gq.curOp.scrollTop)+gr}}function fK(gq){fH(gq);var gr=gq.getCursor(),gt=gr,gs=gr;if(!gq.options.lineWrapping){gt=gr.ch?W(gr.line,gr.ch-1):gr;gs=W(gr.line,gr.ch+1)}gq.curOp.scrollToPos={from:gt,to:gs,margin:gq.options.cursorScrollMargin,isCursor:true}}function fH(gq){var gs=gq.curOp.scrollToPos;if(gs){gq.curOp.scrollToPos=null;var gu=dH(gq,gs.from),gt=dH(gq,gs.to);var gr=G(gq,Math.min(gu.left,gt.left),Math.min(gu.top,gt.top)-gs.margin,Math.max(gu.right,gt.right),Math.max(gu.bottom,gt.bottom)+gs.margin);gq.scrollTo(gr.scrollLeft,gr.scrollTop)}}function ad(gD,gt,gC,gs){var gB=gD.doc,gr;if(gC==null){gC="add"}if(gC=="smart"){if(!gB.mode.indent){gC="prev"}else{gr=dC(gD,gt)}}var gx=gD.options.tabSize;var gE=fk(gB,gt),gw=bS(gE.text,null,gx);if(gE.stateAfter){gE.stateAfter=null}var gq=gE.text.match(/^\s*/)[0],gz;if(!gs&&!/\S/.test(gE.text)){gz=0;gC="not"}else{if(gC=="smart"){gz=gB.mode.indent(gr,gE.text.slice(gq.length),gE.text);if(gz==b9||gz>150){if(!gs){return}gC="prev"}}}if(gC=="prev"){if(gt>gB.first){gz=bS(fk(gB,gt-1).text,null,gx)}else{gz=0}}else{if(gC=="add"){gz=gw+gD.options.indentUnit}else{if(gC=="subtract"){gz=gw-gD.options.indentUnit}else{if(typeof gC=="number"){gz=gw+gC}}}}gz=Math.max(0,gz);var gA="",gy=0;if(gD.options.indentWithTabs){for(var gu=Math.floor(gz/gx);gu;--gu){gy+=gx;gA+="\t"}}if(gy<gz){gA+=co(gz-gy)}if(gA!=gq){a0(gB,gA,W(gt,0),W(gt,gq.length),"+input");gE.stateAfter=null;return true}else{for(var gu=0;gu<gB.sel.ranges.length;gu++){var gv=gB.sel.ranges[gu];if(gv.head.line==gt&&gv.head.ch<gq.length){var gy=W(gt,gq.length);e(gB,gu,new dY(gy,gy));break}}}}function eC(gt,gs,gq,gv){var gu=gs,gr=gs;if(typeof gs=="number"){gr=fk(gt,c4(gt,gs))}else{gu=bM(gs)}if(gu==null){return null}if(gv(gr,gu)&>.cm){R(gt.cm,gu,gq)}return gr}function e1(gq,gw){var gr=gq.doc.sel.ranges,gu=[];for(var gt=0;gt<gr.length;gt++){var gs=gw(gr[gt]);while(gu.length&&ce(gs.from,fL(gu).to)<=0){var gv=gu.pop();if(ce(gv.from,gs.from)<0){gs.from=gv.from;break}}gu.push(gs)}cL(gq,function(){for(var gx=gu.length-1;gx>=0;gx--){a0(gq.doc,"",gu[gx].from,gu[gx].to,"+delete")}fK(gq)})}function bv(gH,gu,gC,gB,gw){var gz=gu.line,gA=gu.ch,gG=gC;var gr=fk(gH,gz);function gF(){var gI=gz+gC;if(gI<gH.first||gI>=gH.first+gH.size){return false}gz=gI;return gr=fk(gH,gI)}function gE(gJ){var gI=(gw?u:ai)(gr,gA,gC,true);if(gI==null){if(!gJ&&gF()){if(gw){gA=(gC<0?cR:cD)(gr)}else{gA=gC<0?gr.text.length:0}}else{return false}}else{gA=gI}return true}if(gB=="char"){gE()}else{if(gB=="column"){gE(true)}else{if(gB=="word"||gB=="group"){var gD=null,gx=gB=="group";var gq=gH.cm&&gH.cm.getHelper(gu,"wordChars");for(var gv=true;;gv=false){if(gC<0&&!gE(!gv)){break}var gs=gr.text.charAt(gA)||"\n";var gt=cz(gs,gq)?"w":gx&&gs=="\n"?"n":!gx||/\s/.test(gs)?null:"p";if(gx&&!gv&&!gt){gt="s"}if(gD&&gD!=gt){if(gC<0){gC=1;gE()}break}if(gt){gD=gt}if(gC>0&&!gE(!gv)){break}}}}}var gy=bU(gH,W(gz,gA),gu,gG,true);if(!ce(gu,gy)){gy.hitSide=true}return gy}function bp(gy,gt,gq,gx){var gw=gy.doc,gv=gt.left,gu;if(gx=="page"){var gs=Math.min(gy.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);gu=gt.top+gq*(gs-(gq<0?1.5:0.5)*aX(gy.display))}else{if(gx=="line"){gu=gq>0?gt.bottom+3:gt.top-3}}for(;;){var gr=fU(gy,gv,gu);if(!gr.outside){break}if(gq<0?gu<=0:gu>=gw.height){gr.hitSide=true;break}gu+=gq*5}return gr}H.prototype={constructor:H,focus:function(){window.focus();this.display.input.focus()},setOption:function(gs,gt){var gr=this.options,gq=gr[gs];if(gr[gs]==gt&&gs!="mode"){return}gr[gs]=gt;if(be.hasOwnProperty(gs)){c1(this,be[gs])(this,gt,gq)}},getOption:function(gq){return this.options[gq]},getDoc:function(){return this.doc},addKeyMap:function(gr,gq){this.state.keyMaps[gq?"push":"unshift"](f4(gr))},removeKeyMap:function(gr){var gs=this.state.keyMaps;for(var gq=0;gq<gs.length;++gq){if(gs[gq]==gr||gs[gq].name==gr){gs.splice(gq,1);return true}}},addOverlay:c7(function(gq,gr){var gs=gq.token?gq:H.getMode(this.options,gq);if(gs.startState){throw new Error("Overlays may not be stateful.")}this.state.overlays.push({mode:gs,modeSpec:gq,opaque:gr&&gr.opaque});this.state.modeGen++;ah(this)}),removeOverlay:c7(function(gq){var gs=this.state.overlays;for(var gr=0;gr<gs.length;++gr){var gt=gs[gr].modeSpec;if(gt==gq||typeof gq=="string"&>.name==gq){gs.splice(gr,1);this.state.modeGen++;ah(this);return}}}),indentLine:c7(function(gs,gq,gr){if(typeof gq!="string"&&typeof gq!="number"){if(gq==null){gq=this.options.smartIndent?"smart":"prev"}else{gq=gq?"add":"subtract"}}if(b8(this.doc,gs)){ad(this,gs,gq,gr)}}),indentSelection:c7(function(gz){var gq=this.doc.sel.ranges,gt=-1;for(var gv=0;gv<gq.length;gv++){var gw=gq[gv];if(!gw.empty()){var gx=gw.from(),gy=gw.to();var gr=Math.max(gt,gx.line);gt=Math.min(this.lastLine(),gy.line-(gy.ch?0:1))+1;for(var gu=gr;gu<gt;++gu){ad(this,gu,gz)}var gs=this.doc.sel.ranges;if(gx.ch==0&&gq.length==gs.length&&gs[gv].from().ch>0){e(this.doc,gv,new dY(gx,gs[gv].to()),Z)}}else{if(gw.head.line>gt){ad(this,gw.head.line,gz,true);gt=gw.head.line;if(gv==this.doc.sel.primIndex){fK(this)}}}}}),getTokenAt:function(gr,gq){return cp(this,gr,gq)},getLineTokens:function(gr,gq){return cp(this,W(gr),gq,true)},getTokenTypeAt:function(gx){gx=fP(this.doc,gx);var gt=c5(this,fk(this.doc,gx.line));var gv=0,gw=(gt.length-1)/2,gs=gx.ch;var gr;if(gs==0){gr=gt[2]}else{for(;;){var gq=(gv+gw)>>1;if((gq?gt[gq*2-1]:0)>=gs){gw=gq}else{if(gt[gq*2+1]<gs){gv=gq+1}else{gr=gt[gq*2+2];break}}}}var gu=gr?gr.indexOf("cm-overlay "):-1;return gu<0?gr:gu==0?null:gr.slice(0,gu-1)},getModeAt:function(gr){var gq=this.doc.mode;if(!gq.innerMode){return gq}return H.innerMode(gq,this.getTokenAt(gr).state).mode},getHelper:function(gr,gq){return this.getHelpers(gr,gq)[0]},getHelpers:function(gx,gs){var gt=[];if(!ft.hasOwnProperty(gs)){return gt}var gq=ft[gs],gw=this.getModeAt(gx);if(typeof gw[gs]=="string"){if(gq[gw[gs]]){gt.push(gq[gw[gs]])}}else{if(gw[gs]){for(var gr=0;gr<gw[gs].length;gr++){var gv=gq[gw[gs][gr]];if(gv){gt.push(gv)}}}else{if(gw.helperType&&gq[gw.helperType]){gt.push(gq[gw.helperType])}else{if(gq[gw.name]){gt.push(gq[gw.name])}}}}for(var gr=0;gr<gq._global.length;gr++){var gu=gq._global[gr];if(gu.pred(gw,this)&&dh(gt,gu.val)==-1){gt.push(gu.val)}}return gt},getStateAfter:function(gr,gq){var gs=this.doc;gr=c4(gs,gr==null?gs.first+gs.size-1:gr);return dC(this,gr+1,gq)},cursorCoords:function(gt,gr){var gs,gq=this.doc.sel.primary();if(gt==null){gs=gq.head}else{if(typeof gt=="object"){gs=fP(this.doc,gt)}else{gs=gt?gq.from():gq.to()}}return dU(this,gs,gr||"page")},charCoords:function(gr,gq){return cI(this,fP(this.doc,gr),gq||"page")},coordsChar:function(gq,gr){gq=gl(this,gq,gr||"page");return fU(this,gq.left,gq.top)},lineAtHeight:function(gq,gr){gq=gl(this,{top:gq,left:0},gr||"page").top;return bF(this.doc,gq+this.display.viewOffset)},heightAtLine:function(gr,gu){var gq=false,gs;if(typeof gr=="number"){var gt=this.doc.first+this.doc.size-1;if(gr<this.doc.first){gr=this.doc.first}else{if(gr>gt){gr=gt;gq=true}}gs=fk(this.doc,gr)}else{gs=gr}return eU(this,gs,{top:0,left:0},gu||"page").top+(gq?this.doc.height-bL(gs):0)},defaultTextHeight:function(){return aX(this.display)},defaultCharWidth:function(){return dD(this.display)},setGutterMarker:c7(function(gq,gr,gs){return eC(this.doc,gq,"gutter",function(gt){var gu=gt.gutterMarkers||(gt.gutterMarkers={});gu[gr]=gs;if(!gs&&eY(gu)){gt.gutterMarkers=null}return true})}),clearGutter:c7(function(gs){var gq=this,gt=gq.doc,gr=gt.first;gt.iter(function(gu){if(gu.gutterMarkers&&gu.gutterMarkers[gs]){gu.gutterMarkers[gs]=null;R(gq,gr,"gutter");if(eY(gu.gutterMarkers)){gu.gutterMarkers=null}}++gr})}),lineInfo:function(gq){if(typeof gq=="number"){if(!b8(this.doc,gq)){return null}var gr=gq;gq=fk(this.doc,gq);if(!gq){return null}}else{var gr=bM(gq);if(gr==null){return null}}return{line:gr,handle:gq,text:gq.text,gutterMarkers:gq.gutterMarkers,textClass:gq.textClass,bgClass:gq.bgClass,wrapClass:gq.wrapClass,widgets:gq.widgets}},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(gv,gs,gx,gt,gz){var gu=this.display;gv=dU(this,fP(this.doc,gv));var gw=gv.bottom,gr=gv.left;gs.style.position="absolute";gs.setAttribute("cm-ignore-events","true");this.display.input.setUneditable(gs);gu.sizer.appendChild(gs);if(gt=="over"){gw=gv.top}else{if(gt=="above"||gt=="near"){var gq=Math.max(gu.wrapper.clientHeight,this.doc.height),gy=Math.max(gu.sizer.clientWidth,gu.lineSpace.clientWidth);if((gt=="above"||gv.bottom+gs.offsetHeight>gq)&&gv.top>gs.offsetHeight){gw=gv.top-gs.offsetHeight}else{if(gv.bottom+gs.offsetHeight<=gq){gw=gv.bottom}}if(gr+gs.offsetWidth>gy){gr=gy-gs.offsetWidth}}}gs.style.top=gw+"px";gs.style.left=gs.style.right="";if(gz=="right"){gr=gu.sizer.clientWidth-gs.offsetWidth;gs.style.right="0px"}else{if(gz=="left"){gr=0}else{if(gz=="middle"){gr=(gu.sizer.clientWidth-gs.offsetWidth)/2}}gs.style.left=gr+"px"}if(gx){E(this,gr,gw,gr+gs.offsetWidth,gw+gs.offsetHeight)}},triggerOnKeyDown:c7(p),triggerOnKeyPress:c7(cw),triggerOnKeyUp:bh,execCommand:function(gq){if(eG.hasOwnProperty(gq)){return eG[gq].call(null,this)}},triggerElectric:c7(function(gq){f2(this,gq)}),findPosH:function(gw,gt,gu,gr){var gq=1;if(gt<0){gq=-1;gt=-gt}for(var gs=0,gv=fP(this.doc,gw);gs<gt;++gs){gv=bv(this.doc,gv,gq,gu,gr);if(gv.hitSide){break}}return gv},moveH:c7(function(gr,gs){var gq=this;gq.extendSelectionsBy(function(gt){if(gq.display.shift||gq.doc.extend||gt.empty()){return bv(gq.doc,gt.head,gr,gs,gq.options.rtlMoveVisually)}else{return gr<0?gt.from():gt.to()}},cV)}),deleteH:c7(function(gq,gr){var gs=this.doc.sel,gt=this.doc;if(gs.somethingSelected()){gt.replaceSelection("",null,"+delete")}else{e1(this,function(gv){var gu=bv(gt,gv.head,gq,gr,false);return gq<0?{from:gu,to:gv.head}:{from:gv.head,to:gu}})}}),findPosV:function(gv,gs,gw,gy){var gq=1,gu=gy;if(gs<0){gq=-1;gs=-gs}for(var gr=0,gx=fP(this.doc,gv);gr<gs;++gr){var gt=dU(this,gx,"div");if(gu==null){gu=gt.left}else{gt.left=gu}gx=bp(this,gt,gq,gw);if(gx.hitSide){break}}return gx},moveV:c7(function(gr,gt){var gq=this,gv=this.doc,gu=[];var gw=!gq.display.shift&&!gv.extend&&gv.sel.somethingSelected();gv.extendSelectionsBy(function(gx){if(gw){return gr<0?gx.from():gx.to()}var gz=dU(gq,gx.head,"div");if(gx.goalColumn!=null){gz.left=gx.goalColumn}gu.push(gz.left);var gy=bp(gq,gz,gr,gt);if(gt=="page"&&gx==gv.sel.primary()){cK(gq,null,cI(gq,gy,"div").top-gz.top)}return gy},cV);if(gu.length){for(var gs=0;gs<gv.sel.ranges.length;gs++){gv.sel.ranges[gs].goalColumn=gu[gs]}}}),findWordAt:function(gx){var gv=this.doc,gt=fk(gv,gx.line).text;var gw=gx.ch,gs=gx.ch;if(gt){var gu=this.getHelper(gx,"wordChars");if((gx.xRel<0||gs==gt.length)&&gw){--gw}else{++gs}var gr=gt.charAt(gw);var gq=cz(gr,gu)?function(gy){return cz(gy,gu)}:/\s/.test(gr)?function(gy){return/\s/.test(gy)}:function(gy){return !/\s/.test(gy)&&!cz(gy)};while(gw>0&&gq(gt.charAt(gw-1))){--gw}while(gs<gt.length&&gq(gt.charAt(gs))){++gs}}return new dY(W(gx.line,gw),W(gx.line,gs))},toggleOverwrite:function(gq){if(gq!=null&&gq==this.state.overwrite){return}if(this.state.overwrite=!this.state.overwrite){fF(this.display.cursorDiv,"CodeMirror-overwrite")}else{f(this.display.cursorDiv,"CodeMirror-overwrite")}aD(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==dO()},isReadOnly:function(){return !!(this.options.readOnly||this.doc.cantEdit)},scrollTo:c7(function(gq,gr){if(gq!=null||gr!=null){fH(this)}if(gq!=null){this.curOp.scrollLeft=gq}if(gr!=null){this.curOp.scrollTop=gr}}),getScrollInfo:function(){var gq=this.display.scroller;return{left:gq.scrollLeft,top:gq.scrollTop,height:gq.scrollHeight-cS(this)-this.display.barHeight,width:gq.scrollWidth-cS(this)-this.display.barWidth,clientHeight:cU(this),clientWidth:dl(this)}},scrollIntoView:c7(function(gr,gs){if(gr==null){gr={from:this.doc.sel.primary().head,to:null};if(gs==null){gs=this.options.cursorScrollMargin}}else{if(typeof gr=="number"){gr={from:W(gr,0),to:null}}else{if(gr.from==null){gr={from:gr,to:null}}}}if(!gr.to){gr.to=gr.from}gr.margin=gs||0;if(gr.from.line!=null){fH(this);this.curOp.scrollToPos=gr}else{var gq=G(this,Math.min(gr.from.left,gr.to.left),Math.min(gr.from.top,gr.to.top)-gr.margin,Math.max(gr.from.right,gr.to.right),Math.max(gr.from.bottom,gr.to.bottom)+gr.margin);this.scrollTo(gq.scrollLeft,gq.scrollTop)}}),setSize:c7(function(gt,gr){var gq=this;function gs(gv){return typeof gv=="number"||/^\d+$/.test(String(gv))?gv+"px":gv}if(gt!=null){gq.display.wrapper.style.width=gs(gt)}if(gr!=null){gq.display.wrapper.style.height=gs(gr)}if(gq.options.lineWrapping){aN(this)}var gu=gq.display.viewFrom;gq.doc.iter(gu,gq.display.viewTo,function(gv){if(gv.widgets){for(var gw=0;gw<gv.widgets.length;gw++){if(gv.widgets[gw].noHScroll){R(gq,gu,"widget");break}}}++gu});gq.curOp.forceUpdate=true;aD(gq,"refresh",this)}),operation:function(gq){return cL(this,gq)},refresh:c7(function(){var gq=this.display.cachedTextHeight;ah(this);this.curOp.forceUpdate=true;aj(this);this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop);c3(this);if(gq==null||Math.abs(gq-aX(this.display))>0.5){X(this)}aD(this,"refresh",this)}),swapDoc:c7(function(gr){var gq=this.doc;gq.cm=null;ed(this,gr);aj(this);this.display.input.reset();this.scrollTo(gr.scrollLeft,gr.scrollTop);this.curOp.forceScroll=true;ae(this,"swapDoc",this,gq);return gq}),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}};bx(H);var e7=H.defaults={};var be=H.optionHandlers={};function s(gq,gt,gs,gr){H.defaults[gq]=gt;if(gs){be[gq]=gr?function(gu,gw,gv){if(gv!=cb){gs(gu,gw,gv)}}:gs}}var cb=H.Init={toString:function(){return"CodeMirror.Init"}};s("value","",function(gq,gr){gq.setValue(gr)},true);s("mode",null,function(gq,gr){gq.doc.modeOption=gr;bq(gq)},true);s("indentUnit",2,bq,true);s("indentWithTabs",false);s("smartIndent",true);s("tabSize",4,function(gq){eo(gq);aj(gq);ah(gq)},true);s("lineSeparator",null,function(gq,gt){gq.doc.lineSep=gt;if(!gt){return}var gs=[],gu=gq.doc.first;gq.doc.iter(function(gv){for(var gx=0;;){var gw=gv.text.indexOf(gt,gx);if(gw==-1){break}gx=gw+gt.length;gs.push(W(gu,gw))}gu++});for(var gr=gs.length-1;gr>=0;gr--){a0(gq.doc,gt,gs[gr],W(gs[gr].line,gs[gr].ch+gt.length))}});s("specialChars",/[\t\u0000-\u0019\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(gq,gs,gr){gq.state.specialChars=new RegExp(gs.source+(gs.test("\t")?"":"|\t"),"g");if(gr!=H.Init){gq.refresh()}});s("specialCharPlaceholder",fh,function(gq){gq.refresh()},true);s("electricChars",true);s("inputStyle",ei?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},true);s("rtlMoveVisually",!aO);s("wholeLineUpdateBefore",true);s("theme","default",function(gq){cN(gq);dw(gq)},true);s("keyMap","default",function(gq,gu,gr){var gs=f4(gu);var gt=gr!=H.Init&&f4(gr);if(gt&>.detach){gt.detach(gq,gs)}if(gs.attach){gs.attach(gq,gt||null)}});s("extraKeys",null);s("lineWrapping",false,eJ,true);s("gutters",[],function(gq){cd(gq.options);dw(gq)},true);s("fixedGutter",true,function(gq,gr){gq.display.gutters.style.left=gr?dX(gq.display)+"px":"0";gq.refresh()},true);s("coverGutterNextToScrollbar",false,function(gq){e2(gq)},true);s("scrollbarStyle","native",function(gq){aC(gq);e2(gq);gq.display.scrollbars.setScrollTop(gq.doc.scrollTop);gq.display.scrollbars.setScrollLeft(gq.doc.scrollLeft)},true);s("lineNumbers",false,function(gq){cd(gq.options);dw(gq)},true);s("firstLineNumber",1,dw,true);s("lineNumberFormatter",function(gq){return gq},dw,true);s("showCursorWhenSelecting",false,bB,true);s("resetSelectionOnContextMenu",true);s("lineWiseCopyCut",true);s("readOnly",false,function(gq,gr){if(gr=="nocursor"){aU(gq);gq.display.input.blur();gq.display.disabled=true}else{gq.display.disabled=false}gq.display.input.readOnlyChanged(gr)});s("disableInput",false,function(gq,gr){if(!gr){gq.display.input.reset()}},true);s("dragDrop",true,f7);s("allowDropFileTypes",null);s("cursorBlinkRate",530);s("cursorScrollMargin",0);s("cursorHeight",1,bB,true);s("singleCursorHeightPerLine",true,bB,true);s("workTime",100);s("workDelay",100);s("flattenSpans",true,eo,true);s("addModeClass",false,eo,true);s("pollInterval",100);s("undoDepth",200,function(gq,gr){gq.doc.history.undoDepth=gr});s("historyEventDelay",1250);s("viewportMargin",10,function(gq){gq.refresh()},true);s("maxHighlightLength",10000,eo,true);s("moveInputWithCursor",true,function(gq,gr){if(!gr){gq.display.input.resetPosition()}});s("tabindex",null,function(gq,gr){gq.display.input.getField().tabIndex=gr||""});s("autofocus",null);var ds=H.modes={},aR=H.mimeModes={};H.defineMode=function(gq,gr){if(!H.defaults.mode&&gq!="null"){H.defaults.mode=gq}if(arguments.length>2){gr.dependencies=Array.prototype.slice.call(arguments,2)}ds[gq]=gr};H.defineMIME=function(gr,gq){aR[gr]=gq};H.resolveMode=function(gq){if(typeof gq=="string"&&aR.hasOwnProperty(gq)){gq=aR[gq]}else{if(gq&&typeof gq.name=="string"&&aR.hasOwnProperty(gq.name)){var gr=aR[gq.name];if(typeof gr=="string"){gr={name:gr}}gq=cj(gr,gq);gq.name=gr.name}else{if(typeof gq=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(gq)){return H.resolveMode("application/xml")}}}if(typeof gq=="string"){return{name:gq}}else{return gq||{name:"null"}}};H.getMode=function(gr,gq){var gq=H.resolveMode(gq);var gt=ds[gq.name];if(!gt){return H.getMode(gr,"text/plain")}var gu=gt(gr,gq);if(dp.hasOwnProperty(gq.name)){var gs=dp[gq.name];for(var gv in gs){if(!gs.hasOwnProperty(gv)){continue}if(gu.hasOwnProperty(gv)){gu["_"+gv]=gu[gv]}gu[gv]=gs[gv]}}gu.name=gq.name;if(gq.helperType){gu.helperType=gq.helperType}if(gq.modeProps){for(var gv in gq.modeProps){gu[gv]=gq.modeProps[gv]}}return gu};H.defineMode("null",function(){return{token:function(gq){gq.skipToEnd()}}});H.defineMIME("text/plain","null");var dp=H.modeExtensions={};H.extendMode=function(gs,gr){var gq=dp.hasOwnProperty(gs)?dp[gs]:(dp[gs]={});aM(gr,gq)};H.defineExtension=function(gq,gr){H.prototype[gq]=gr};H.defineDocExtension=function(gq,gr){ar.prototype[gq]=gr};H.defineOption=s;var a7=[];H.defineInitHook=function(gq){a7.push(gq)};var ft=H.helpers={};H.registerHelper=function(gr,gq,gs){if(!ft.hasOwnProperty(gr)){ft[gr]=H[gr]={_global:[]}}ft[gr][gq]=gs};H.registerGlobalHelper=function(gs,gr,gq,gt){H.registerHelper(gs,gr,gt);ft[gs]._global.push({pred:gq,val:gt})};var b2=H.copyState=function(gt,gq){if(gq===true){return gq}if(gt.copyState){return gt.copyState(gq)}var gs={};for(var gu in gq){var gr=gq[gu];if(gr instanceof Array){gr=gr.concat([])}gs[gu]=gr}return gs};var bZ=H.startState=function(gs,gr,gq){return gs.startState?gs.startState(gr,gq):true};H.innerMode=function(gs,gq){while(gs.innerMode){var gr=gs.innerMode(gq);if(!gr||gr.mode==gs){break}gq=gr.state;gs=gr.mode}return gr||{mode:gs,state:gq}};var eG=H.commands={selectAll:function(gq){gq.setSelection(W(gq.firstLine(),0),W(gq.lastLine()),Z)},singleSelection:function(gq){gq.setSelection(gq.getCursor("anchor"),gq.getCursor("head"),Z)},killLine:function(gq){e1(gq,function(gs){if(gs.empty()){var gr=fk(gq.doc,gs.head.line).text.length;if(gs.head.ch==gr&&gs.head.line<gq.lastLine()){return{from:gs.head,to:W(gs.head.line+1,0)}}else{return{from:gs.head,to:W(gs.head.line,gr)}}}else{return{from:gs.from(),to:gs.to()}}})},deleteLine:function(gq){e1(gq,function(gr){return{from:W(gr.from().line,0),to:fP(gq.doc,W(gr.to().line+1,0))}})},delLineLeft:function(gq){e1(gq,function(gr){return{from:W(gr.from().line,0),to:gr.from()}})},delWrappedLineLeft:function(gq){e1(gq,function(gr){var gt=gq.charCoords(gr.head,"div").top+5;var gs=gq.coordsChar({left:0,top:gt},"div");return{from:gs,to:gr.from()}})},delWrappedLineRight:function(gq){e1(gq,function(gr){var gt=gq.charCoords(gr.head,"div").top+5;var gs=gq.coordsChar({left:gq.display.lineDiv.offsetWidth+100,top:gt},"div");return{from:gr.from(),to:gs}})},undo:function(gq){gq.undo()},redo:function(gq){gq.redo()},undoSelection:function(gq){gq.undoSelection()},redoSelection:function(gq){gq.redoSelection()},goDocStart:function(gq){gq.extendSelection(W(gq.firstLine(),0))},goDocEnd:function(gq){gq.extendSelection(W(gq.lastLine()))},goLineStart:function(gq){gq.extendSelectionsBy(function(gr){return bs(gq,gr.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(gq){gq.extendSelectionsBy(function(gr){return dI(gq,gr.head)},{origin:"+move",bias:1})},goLineEnd:function(gq){gq.extendSelectionsBy(function(gr){return dP(gq,gr.head.line)},{origin:"+move",bias:-1})},goLineRight:function(gq){gq.extendSelectionsBy(function(gr){var gs=gq.charCoords(gr.head,"div").top+5;return gq.coordsChar({left:gq.display.lineDiv.offsetWidth+100,top:gs},"div")},cV)},goLineLeft:function(gq){gq.extendSelectionsBy(function(gr){var gs=gq.charCoords(gr.head,"div").top+5;return gq.coordsChar({left:0,top:gs},"div")},cV)},goLineLeftSmart:function(gq){gq.extendSelectionsBy(function(gr){var gs=gq.charCoords(gr.head,"div").top+5;var gt=gq.coordsChar({left:0,top:gs},"div");if(gt.ch<gq.getLine(gt.line).search(/\S/)){return dI(gq,gr.head)}return gt},cV)},goLineUp:function(gq){gq.moveV(-1,"line")},goLineDown:function(gq){gq.moveV(1,"line")},goPageUp:function(gq){gq.moveV(-1,"page")},goPageDown:function(gq){gq.moveV(1,"page")},goCharLeft:function(gq){gq.moveH(-1,"char")},goCharRight:function(gq){gq.moveH(1,"char")},goColumnLeft:function(gq){gq.moveH(-1,"column")},goColumnRight:function(gq){gq.moveH(1,"column")},goWordLeft:function(gq){gq.moveH(-1,"word")},goGroupRight:function(gq){gq.moveH(1,"group")},goGroupLeft:function(gq){gq.moveH(-1,"group")},goWordRight:function(gq){gq.moveH(1,"word")},delCharBefore:function(gq){gq.deleteH(-1,"char")},delCharAfter:function(gq){gq.deleteH(1,"char")},delWordBefore:function(gq){gq.deleteH(-1,"word")},delWordAfter:function(gq){gq.deleteH(1,"word")},delGroupBefore:function(gq){gq.deleteH(-1,"group")},delGroupAfter:function(gq){gq.deleteH(1,"group")},indentAuto:function(gq){gq.indentSelection("smart")},indentMore:function(gq){gq.indentSelection("add")},indentLess:function(gq){gq.indentSelection("subtract")},insertTab:function(gq){gq.replaceSelection("\t")},insertSoftTab:function(gq){var gs=[],gr=gq.listSelections(),gv=gq.options.tabSize;for(var gu=0;gu<gr.length;gu++){var gw=gr[gu].from();var gt=bS(gq.getLine(gw.line),gw.ch,gv);gs.push(new Array(gv-gt%gv+1).join(" "))}gq.replaceSelections(gs)},defaultTab:function(gq){if(gq.somethingSelected()){gq.indentSelection("add")}else{gq.execCommand("insertTab")}},transposeChars:function(gq){cL(gq,function(){var gt=gq.listSelections(),gs=[];for(var gu=0;gu<gt.length;gu++){var gw=gt[gu].head,gr=fk(gq.doc,gw.line).text;if(gr){if(gw.ch==gr.length){gw=new W(gw.line,gw.ch-1)}if(gw.ch>0){gw=new W(gw.line,gw.ch+1);gq.replaceRange(gr.charAt(gw.ch-1)+gr.charAt(gw.ch-2),W(gw.line,gw.ch-2),gw,"+transpose")}else{if(gw.line>gq.doc.first){var gv=fk(gq.doc,gw.line-1).text;if(gv){gq.replaceRange(gr.charAt(0)+gq.doc.lineSeparator()+gv.charAt(gv.length-1),W(gw.line-1,gv.length-1),W(gw.line,1),"+transpose")}}}}gs.push(new dY(gw,gw))}gq.setSelections(gs)})},newlineAndIndent:function(gq){cL(gq,function(){var gr=gq.listSelections().length;for(var gt=0;gt<gr;gt++){var gs=gq.listSelections()[gt];gq.replaceRange(gq.doc.lineSeparator(),gs.anchor,gs.head,"+input");gq.indentLine(gs.from().line+1,null,true)}fK(gq)})},toggleOverwrite:function(gq){gq.toggleOverwrite()}};var ff=H.keyMap={};ff.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"};ff.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"};ff.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"};ff.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"]};ff["default"]=b6?ff.macDefault:ff.pcDefault;function dt(gr){var gx=gr.split(/-(?!$)/),gr=gx[gx.length-1];var gw,gv,gq,gu;for(var gt=0;gt<gx.length-1;gt++){var gs=gx[gt];if(/^(cmd|meta|m)$/i.test(gs)){gu=true}else{if(/^a(lt)?$/i.test(gs)){gw=true}else{if(/^(c|ctrl|control)$/i.test(gs)){gv=true}else{if(/^s(hift)$/i.test(gs)){gq=true}else{throw new Error("Unrecognized modifier name: "+gs)}}}}}if(gw){gr="Alt-"+gr}if(gv){gr="Ctrl-"+gr}if(gu){gr="Cmd-"+gr}if(gq){gr="Shift-"+gr}return gr}H.normalizeKeyMap=function(gx){var gr={};for(var gw in gx){if(gx.hasOwnProperty(gw)){var gy=gx[gw];if(/^(name|fallthrough|(de|at)tach)$/.test(gw)){continue}if(gy=="..."){delete gx[gw];continue}var gz=bR(gw.split(" "),dt);for(var gv=0;gv<gz.length;gv++){var gt,gs;if(gv==gz.length-1){gs=gz.join(" ");gt=gy}else{gs=gz.slice(0,gv+1).join(" ");gt="..."}var gu=gr[gs];if(!gu){gr[gs]=gt}else{if(gu!=gt){throw new Error("Inconsistent bindings for "+gs)}}}delete gx[gw]}}for(var gq in gr){gx[gq]=gr[gq]}return gx};var i=H.lookupKey=function(gt,gw,gv,gs){gw=f4(gw);var gu=gw.call?gw.call(gt,gs):gw[gt];if(gu===false){return"nothing"}if(gu==="..."){return"multi"}if(gu!=null&&gv(gu)){return"handled"}if(gw.fallthrough){if(Object.prototype.toString.call(gw.fallthrough)!="[object Array]"){return i(gt,gw.fallthrough,gv,gs)}for(var gr=0;gr<gw.fallthrough.length;gr++){var gq=i(gt,gw.fallthrough[gr],gv,gs);if(gq){return gq}}}};var eF=H.isModifierKey=function(gr){var gq=typeof gr=="string"?gr:fl[gr.keyCode];return gq=="Ctrl"||gq=="Alt"||gq=="Shift"||gq=="Mod"};var fw=H.keyName=function(gr,gt){if(d4&&gr.keyCode==34&&gr["char"]){return false}var gs=fl[gr.keyCode],gq=gs;if(gq==null||gr.altGraphKey){return false}if(gr.altKey&&gs!="Alt"){gq="Alt-"+gq}if((bP?gr.metaKey:gr.ctrlKey)&&gs!="Ctrl"){gq="Ctrl-"+gq}if((bP?gr.ctrlKey:gr.metaKey)&&gs!="Cmd"){gq="Cmd-"+gq}if(!gt&&gr.shiftKey&&gs!="Shift"){gq="Shift-"+gq}return gq};function f4(gq){return typeof gq=="string"?ff[gq]:gq}H.fromTextArea=function(gx,gy){gy=gy?aM(gy):{};gy.value=gx.value;if(!gy.tabindex&&gx.tabIndex){gy.tabindex=gx.tabIndex}if(!gy.placeholder&&gx.placeholder){gy.placeholder=gx.placeholder}if(gy.autofocus==null){var gq=dO();gy.autofocus=gq==gx||gx.getAttribute("autofocus")!=null&&gq==document.body}function gu(){gx.value=gw.getValue()}if(gx.form){bW(gx.form,"submit",gu);if(!gy.leaveSubmitMethodAlone){var gr=gx.form,gv=gr.submit;try{var gt=gr.submit=function(){gu();gr.submit=gv;gr.submit();gr.submit=gt}}catch(gs){}}}gy.finishInit=function(gz){gz.save=gu;gz.getTextArea=function(){return gx};gz.toTextArea=function(){gz.toTextArea=isNaN;gu();gx.parentNode.removeChild(gz.getWrapperElement());gx.style.display="";if(gx.form){ef(gx.form,"submit",gu);if(typeof gx.form.submit=="function"){gx.form.submit=gv}}}};gx.style.display="none";var gw=H(function(gz){gx.parentNode.insertBefore(gz,gx.nextSibling)},gy);return gw};var eX=H.StringStream=function(gq,gr){this.pos=this.start=0;this.string=gq;this.tabSize=gr||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0};eX.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.pos<this.string.length){return this.string.charAt(this.pos++)}},eat:function(gq){var gs=this.string.charAt(this.pos);if(typeof gq=="string"){var gr=gs==gq}else{var gr=gs&&(gq.test?gq.test(gs):gq(gs))}if(gr){++this.pos;return gs}},eatWhile:function(gq){var gr=this.pos;while(this.eat(gq)){}return this.pos>gr},eatSpace:function(){var gq=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++this.pos}return this.pos>gq},skipToEnd:function(){this.pos=this.string.length},skipTo:function(gq){var gr=this.string.indexOf(gq,this.pos);if(gr>-1){this.pos=gr;return true}},backUp:function(gq){this.pos-=gq},column:function(){if(this.lastColumnPos<this.start){this.lastColumnValue=bS(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?bS(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return bS(this.string,null,this.tabSize)-(this.lineStart?bS(this.string,this.lineStart,this.tabSize):0)},match:function(gu,gr,gq){if(typeof gu=="string"){var gv=function(gw){return gq?gw.toLowerCase():gw};var gt=this.string.substr(this.pos,gu.length);if(gv(gt)==gv(gu)){if(gr!==false){this.pos+=gu.length}return true}}else{var gs=this.string.slice(this.pos).match(gu);if(gs&&gs.index>0){return null}if(gs&&gr!==false){this.pos+=gs[0].length}return gs}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(gr,gq){this.lineStart+=gr;try{return gq()}finally{this.lineStart-=gr}}};var a4=0;var P=H.TextMarker=function(gr,gq){this.lines=[];this.type=gq;this.doc=gr;this.id=++a4};bx(P);P.prototype.clear=function(){if(this.explicitlyCleared){return}var gx=this.doc.cm,gr=gx&&!gx.curOp;if(gr){cH(gx)}if(fn(this,"clear")){var gy=this.find();if(gy){ae(this,"clear",gy.from,gy.to)}}var gs=null,gv=null;for(var gt=0;gt<this.lines.length;++gt){var gz=this.lines[gt];var gw=fe(gz.markedSpans,this);if(gx&&!this.collapsed){R(gx,bM(gz),"text")}else{if(gx){if(gw.to!=null){gv=bM(gz)}if(gw.from!=null){gs=bM(gz)}}}gz.markedSpans=eK(gz.markedSpans,gw);if(gw.from==null&&this.collapsed&&!fB(this.doc,gz)&&gx){gc(gz,aX(gx.display))}}if(gx&&this.collapsed&&!gx.options.lineWrapping){for(var gt=0;gt<this.lines.length;++gt){var gq=x(this.lines[gt]),gu=eq(gq);if(gu>gx.display.maxLineLength){gx.display.maxLine=gq;gx.display.maxLineLength=gu;gx.display.maxLineChanged=true}}}if(gs!=null&&gx&&this.collapsed){ah(gx,gs,gv+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(gx){eB(gx.doc)}}if(gx){ae(gx,"markerCleared",gx,this)}if(gr){al(gx)}if(this.parent){this.parent.clear()}};P.prototype.find=function(gt,gr){if(gt==null&&this.type=="bookmark"){gt=1}var gw,gv;for(var gs=0;gs<this.lines.length;++gs){var gq=this.lines[gs];var gu=fe(gq.markedSpans,this);if(gu.from!=null){gw=W(gr?gq:bM(gq),gu.from);if(gt==-1){return gw}}if(gu.to!=null){gv=W(gr?gq:bM(gq),gu.to);if(gt==1){return gv}}}return gw&&{from:gw,to:gv}};P.prototype.changed=function(){var gs=this.find(-1,true),gr=this,gq=this.doc.cm;if(!gs||!gq){return}cL(gq,function(){var gu=gs.line,gv=bM(gs.line);var gt=fg(gq,gv);if(gt){at(gt);gq.curOp.selectionChanged=gq.curOp.forceUpdate=true}gq.curOp.updateMaxLine=true;if(!fB(gr.doc,gu)&&gr.height!=null){var gx=gr.height;gr.height=null;var gw=cX(gr)-gx;if(gw){gc(gu,gu.height+gw)}}})};P.prototype.attachLine=function(gq){if(!this.lines.length&&this.doc.cm){var gr=this.doc.cm.curOp;if(!gr.maybeHiddenMarkers||dh(gr.maybeHiddenMarkers,this)==-1){(gr.maybeUnhiddenMarkers||(gr.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(gq)};P.prototype.detachLine=function(gq){this.lines.splice(dh(this.lines,gq),1);if(!this.lines.length&&this.doc.cm){var gr=this.doc.cm.curOp;(gr.maybeHiddenMarkers||(gr.maybeHiddenMarkers=[])).push(this)}};var a4=0;function eI(gy,gw,gx,gA,gu){if(gA&&gA.shared){return O(gy,gw,gx,gA,gu)}if(gy.cm&&!gy.cm.curOp){return c1(gy.cm,eI)(gy,gw,gx,gA,gu)}var gt=new P(gy,gu),gz=ce(gw,gx);if(gA){aM(gA,gt,false)}if(gz>0||gz==0&>.clearWhenEmpty!==false){return gt}if(gt.replacedWith){gt.collapsed=true;gt.widgetNode=f9("span",[gt.replacedWith],"CodeMirror-widget");if(!gA.handleMouseEvents){gt.widgetNode.setAttribute("cm-ignore-events","true")}if(gA.insertLeft){gt.widgetNode.insertLeft=true}}if(gt.collapsed){if(z(gy,gw.line,gw,gx,gt)||gw.line!=gx.line&&z(gy,gx.line,gw,gx,gt)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}a6=true}if(gt.addToHistory){fS(gy,{from:gw,to:gx,origin:"markText"},gy.sel,NaN)}var gr=gw.line,gv=gy.cm,gq;gy.iter(gr,gx.line+1,function(gB){if(gv&>.collapsed&&!gv.options.lineWrapping&&x(gB)==gv.display.maxLine){gq=true}if(gt.collapsed&&gr!=gw.line){gc(gB,0)}cc(gB,new ek(gt,gr==gw.line?gw.ch:null,gr==gx.line?gx.ch:null));++gr});if(gt.collapsed){gy.iter(gw.line,gx.line+1,function(gB){if(fB(gy,gB)){gc(gB,0)}})}if(gt.clearOnEnter){bW(gt,"beforeCursorEnter",function(){gt.clear()})}if(gt.readOnly){gj=true;if(gy.history.done.length||gy.history.undone.length){gy.clearHistory()}}if(gt.collapsed){gt.id=++a4;gt.atomic=true}if(gv){if(gq){gv.curOp.updateMaxLine=true}if(gt.collapsed){ah(gv,gw.line,gx.line+1)}else{if(gt.className||gt.title||gt.startStyle||gt.endStyle||gt.css){for(var gs=gw.line;gs<=gx.line;gs++){R(gv,gs,"text")}}}if(gt.atomic){eB(gv.doc)}ae(gv,"markerAdded",gv,gt)}return gt}var y=H.SharedTextMarker=function(gs,gr){this.markers=gs;this.primary=gr;for(var gq=0;gq<gs.length;++gq){gs[gq].parent=this}};bx(y);y.prototype.clear=function(){if(this.explicitlyCleared){return}this.explicitlyCleared=true;for(var gq=0;gq<this.markers.length;++gq){this.markers[gq].clear()}ae(this,"clear")};y.prototype.find=function(gr,gq){return this.primary.find(gr,gq)};function O(gu,gx,gw,gq,gs){gq=aM(gq);gq.shared=false;var gv=[eI(gu,gx,gw,gq,gs)],gr=gv[0];var gt=gq.widgetNode;d8(gu,function(gz){if(gt){gq.widgetNode=gt.cloneNode(true)}gv.push(eI(gz,fP(gz,gx),fP(gz,gw),gq,gs));for(var gy=0;gy<gz.linked.length;++gy){if(gz.linked[gy].isParent){return}}gr=fL(gv)});return new y(gv,gr)}function eT(gq){return gq.findMarks(W(gq.first,0),gq.clipPos(W(gq.lastLine())),function(gr){return gr.parent})}function dF(gv,gw){for(var gt=0;gt<gw.length;gt++){var gr=gw[gt],gx=gr.find();var gq=gv.clipPos(gx.from),gu=gv.clipPos(gx.to);if(ce(gq,gu)){var gs=eI(gv,gq,gu,gr.primary,gr.primary.type);gr.markers.push(gs);gs.parent=gr}}}function er(gt){for(var gs=0;gs<gt.length;gs++){var gq=gt[gs],gv=[gq.primary.doc];d8(gq.primary.doc,function(gw){gv.push(gw)});for(var gr=0;gr<gq.markers.length;gr++){var gu=gq.markers[gr];if(dh(gv,gu.doc)==-1){gu.parent=null;gq.markers.splice(gr--,1)}}}}function ek(gq,gs,gr){this.marker=gq;this.from=gs;this.to=gr}function fe(gs,gq){if(gs){for(var gr=0;gr<gs.length;++gr){var gt=gs[gr];if(gt.marker==gq){return gt}}}}function eK(gr,gs){for(var gt,gq=0;gq<gr.length;++gq){if(gr[gq]!=gs){(gt||(gt=[])).push(gr[gq])}}return gt}function cc(gq,gr){gq.markedSpans=gq.markedSpans?gq.markedSpans.concat([gr]):[gr];gr.marker.attachLine(gq)}function aP(gr,gs,gw){if(gr){for(var gu=0,gx;gu<gr.length;++gu){var gy=gr[gu],gv=gy.marker;var gq=gy.from==null||(gv.inclusiveLeft?gy.from<=gs:gy.from<gs);if(gq||gy.from==gs&&gv.type=="bookmark"&&(!gw||!gy.marker.insertLeft)){var gt=gy.to==null||(gv.inclusiveRight?gy.to>=gs:gy.to>gs);(gx||(gx=[])).push(new ek(gv,gy.from,gt?null:gy.to))}}}return gx}function aA(gr,gt,gw){if(gr){for(var gu=0,gx;gu<gr.length;++gu){var gy=gr[gu],gv=gy.marker;var gs=gy.to==null||(gv.inclusiveRight?gy.to>=gt:gy.to>gt);if(gs||gy.from==gt&&gv.type=="bookmark"&&(!gw||gy.marker.insertLeft)){var gq=gy.from==null||(gv.inclusiveLeft?gy.from<=gt:gy.from<gt);(gx||(gx=[])).push(new ek(gv,gq?null:gy.from-gt,gy.to==null?null:gy.to-gt))}}}return gx}function em(gC,gz){if(gz.full){return null}var gy=b8(gC,gz.from.line)&&fk(gC,gz.from.line).markedSpans;var gF=b8(gC,gz.to.line)&&fk(gC,gz.to.line).markedSpans;if(!gy&&!gF){return null}var gr=gz.from.ch,gu=gz.to.ch,gx=ce(gz.from,gz.to)==0;var gw=aP(gy,gr,gx);var gE=aA(gF,gu,gx);var gD=gz.text.length==1,gs=fL(gz.text).length+(gD?gr:0);if(gw){for(var gt=0;gt<gw.length;++gt){var gB=gw[gt];if(gB.to==null){var gG=fe(gE,gB.marker);if(!gG){gB.to=gr}else{if(gD){gB.to=gG.to==null?null:gG.to+gs}}}}}if(gE){for(var gt=0;gt<gE.length;++gt){var gB=gE[gt];if(gB.to!=null){gB.to+=gs}if(gB.from==null){var gG=fe(gw,gB.marker);if(!gG){gB.from=gs;if(gD){(gw||(gw=[])).push(gB)}}}else{gB.from+=gs;if(gD){(gw||(gw=[])).push(gB)}}}}if(gw){gw=q(gw)}if(gE&&gE!=gw){gE=q(gE)}var gv=[gw];if(!gD){var gA=gz.text.length-2,gq;if(gA>0&&gw){for(var gt=0;gt<gw.length;++gt){if(gw[gt].to==null){(gq||(gq=[])).push(new ek(gw[gt].marker,null,null))}}}for(var gt=0;gt<gA;++gt){gv.push(gq)}gv.push(gE)}return gv}function q(gr){for(var gq=0;gq<gr.length;++gq){var gs=gr[gq];if(gs.from!=null&&gs.from==gs.to&&gs.marker.clearWhenEmpty!==false){gr.splice(gq--,1)}}if(!gr.length){return null}return gr}function ea(gy,gw){var gq=b3(gy,gw);var gz=em(gy,gw);if(!gq){return gz}if(!gz){return gq}for(var gt=0;gt<gq.length;++gt){var gu=gq[gt],gv=gz[gt];if(gu&&gv){spans:for(var gs=0;gs<gv.length;++gs){var gx=gv[gs];for(var gr=0;gr<gu.length;++gr){if(gu[gr].marker==gx.marker){continue spans}}gu.push(gx)}}else{if(gv){gq[gt]=gv}}}return gq}function cG(gC,gA,gB){var gu=null;gC.iter(gA.line,gB.line+1,function(gD){if(gD.markedSpans){for(var gE=0;gE<gD.markedSpans.length;++gE){var gF=gD.markedSpans[gE].marker;if(gF.readOnly&&(!gu||dh(gu,gF)==-1)){(gu||(gu=[])).push(gF)}}}});if(!gu){return null}var gv=[{from:gA,to:gB}];for(var gw=0;gw<gu.length;++gw){var gx=gu[gw],gs=gx.find(0);for(var gt=0;gt<gv.length;++gt){var gr=gv[gt];if(ce(gr.to,gs.from)<0||ce(gr.from,gs.to)>0){continue}var gz=[gt,1],gq=ce(gr.from,gs.from),gy=ce(gr.to,gs.to);if(gq<0||!gx.inclusiveLeft&&!gq){gz.push({from:gr.from,to:gs.from})}if(gy>0||!gx.inclusiveRight&&!gy){gz.push({from:gs.to,to:gr.to})}gv.splice.apply(gv,gz);gt+=gz.length-1}}return gv}function gf(gq){var gs=gq.markedSpans;if(!gs){return}for(var gr=0;gr<gs.length;++gr){gs[gr].marker.detachLine(gq)}gq.markedSpans=null}function c2(gq,gs){if(!gs){return}for(var gr=0;gr<gs.length;++gr){gs[gr].marker.attachLine(gq)}gq.markedSpans=gs}function v(gq){return gq.inclusiveLeft?-1:0}function bV(gq){return gq.inclusiveRight?1:0}function dQ(gt,gr){var gv=gt.lines.length-gr.lines.length;if(gv!=0){return gv}var gs=gt.find(),gw=gr.find();var gq=ce(gs.from,gw.from)||v(gt)-v(gr);if(gq){return -gq}var gu=ce(gs.to,gw.to)||bV(gt)-bV(gr);if(gu){return gu}return gr.id-gt.id}function a5(gr,gv){var gq=a6&&gr.markedSpans,gu;if(gq){for(var gt,gs=0;gs<gq.length;++gs){gt=gq[gs];if(gt.marker.collapsed&&(gv?gt.from:gt.to)==null&&(!gu||dQ(gu,gt.marker)<0)){gu=gt.marker}}}return gu}function eS(gq){return a5(gq,true)}function ex(gq){return a5(gq,false)}function z(gy,gs,gw,gx,gu){var gB=fk(gy,gs);var gq=a6&&gB.markedSpans;if(gq){for(var gt=0;gt<gq.length;++gt){var gr=gq[gt];if(!gr.marker.collapsed){continue}var gA=gr.marker.find(0);var gz=ce(gA.from,gw)||v(gr.marker)-v(gu);var gv=ce(gA.to,gx)||bV(gr.marker)-bV(gu);if(gz>=0&&gv<=0||gz<=0&&gv>=0){continue}if(gz<=0&&(ce(gA.to,gw)>0||(gr.marker.inclusiveRight&&gu.inclusiveLeft))||gz>=0&&(ce(gA.from,gx)<0||(gr.marker.inclusiveLeft&&gu.inclusiveRight))){return true}}}}function x(gr){var gq;while(gq=eS(gr)){gr=gq.find(-1,true).line}return gr}function g(gs){var gq,gr;while(gq=ex(gs)){gs=gq.find(1,true).line;(gr||(gr=[])).push(gs)}return gr}function aV(gt,gr){var gq=fk(gt,gr),gs=x(gq);if(gq==gs){return gr}return bM(gs)}function d3(gt,gs){if(gs>gt.lastLine()){return gs}var gr=fk(gt,gs),gq;if(!fB(gt,gr)){return gs}while(gq=ex(gr)){gr=gq.find(1,true).line}return bM(gr)+1}function fB(gu,gr){var gq=a6&&gr.markedSpans;if(gq){for(var gt,gs=0;gs<gq.length;++gs){gt=gq[gs];if(!gt.marker.collapsed){continue}if(gt.from==null){return true}if(gt.marker.widgetNode){continue}if(gt.from==0&>.marker.inclusiveLeft&&T(gu,gr,gt)){return true}}}}function T(gv,gr,gt){if(gt.to==null){var gq=gt.marker.find(1,true);return T(gv,gq.line,fe(gq.line.markedSpans,gt.marker))}if(gt.marker.inclusiveRight&>.to==gr.text.length){return true}for(var gu,gs=0;gs<gr.markedSpans.length;++gs){gu=gr.markedSpans[gs];if(gu.marker.collapsed&&!gu.marker.widgetNode&&gu.from==gt.to&&(gu.to==null||gu.to!=gt.from)&&(gu.marker.inclusiveLeft||gt.marker.inclusiveRight)&&T(gv,gr,gu)){return true}}}var dB=H.LineWidget=function(gt,gs,gq){if(gq){for(var gr in gq){if(gq.hasOwnProperty(gr)){this[gr]=gq[gr]}}}this.doc=gt;this.node=gs};bx(dB);function dZ(gq,gr,gs){if(bL(gr)<((gq.curOp&&gq.curOp.scrollTop)||gq.doc.scrollTop)){cK(gq,null,gs)}}dB.prototype.clear=function(){var gr=this.doc.cm,gt=this.line.widgets,gs=this.line,gv=bM(gs);if(gv==null||!gt){return}for(var gu=0;gu<gt.length;++gu){if(gt[gu]==this){gt.splice(gu--,1)}}if(!gt.length){gs.widgets=null}var gq=cX(this);gc(gs,Math.max(0,gs.height-gq));if(gr){cL(gr,function(){dZ(gr,gs,-gq);R(gr,gv,"widget")})}};dB.prototype.changed=function(){var gr=this.height,gq=this.doc.cm,gs=this.line;this.height=null;var gt=cX(this)-gr;if(!gt){return}gc(gs,gs.height+gt);if(gq){cL(gq,function(){gq.curOp.forceUpdate=true;dZ(gq,gs,gt)})}};function cX(gs){if(gs.height!=null){return gs.height}var gq=gs.doc.cm;if(!gq){return 0}if(!gh(document.body,gs.node)){var gr="position: relative;";if(gs.coverGutter){gr+="margin-left: -"+gq.display.gutters.offsetWidth+"px;"}if(gs.noHScroll){gr+="width: "+gq.display.wrapper.clientWidth+"px;"}bQ(gq.display.measure,f9("div",[gs.node],null,gr))}return gs.height=gs.node.parentNode.offsetHeight}function bG(gv,gu,gs,gr){var gt=new dB(gv,gs,gr);var gq=gv.cm;if(gq&>.noHScroll){gq.display.alignWidgets=true}eC(gv,gu,"widget",function(gx){var gy=gx.widgets||(gx.widgets=[]);if(gt.insertAt==null){gy.push(gt)}else{gy.splice(Math.min(gy.length-1,Math.max(0,gt.insertAt)),0,gt)}gt.line=gx;if(gq&&!fB(gv,gx)){var gw=bL(gx)<gv.scrollTop;gc(gx,gx.height+cX(gt));if(gw){cK(gq,null,gt.height)}gq.curOp.forceUpdate=true}return true});return gt}var gd=H.Line=function(gs,gr,gq){this.text=gs;c2(this,gr);this.height=gq?gq(this):1};bx(gd);gd.prototype.lineNo=function(){return bM(this)};function ep(gr,gu,gs,gq){gr.text=gu;if(gr.stateAfter){gr.stateAfter=null}if(gr.styles){gr.styles=null}if(gr.order!=null){gr.order=null}gf(gr);c2(gr,gs);var gt=gq?gq(gr):1;if(gt!=gr.height){gc(gr,gt)}}function bA(gq){gq.parent=null;gf(gq)}function di(gs,gr){if(gs){for(;;){var gq=gs.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!gq){break}gs=gs.slice(0,gq.index)+gs.slice(gq.index+gq[0].length);var gt=gq[1]?"bgClass":"textClass";if(gr[gt]==null){gr[gt]=gq[2]}else{if(!(new RegExp("(?:^|s)"+gq[2]+"(?:$|s)")).test(gr[gt])){gr[gt]+=" "+gq[2]}}}}return gs}function fv(gs,gr){if(gs.blankLine){return gs.blankLine(gr)}if(!gs.innerMode){return}var gq=H.innerMode(gs,gr);if(gq.mode.blankLine){return gq.mode.blankLine(gq.state)}}function eD(gv,gu,gt,gq){for(var gr=0;gr<10;gr++){if(gq){gq[0]=H.innerMode(gv,gt).mode}var gs=gv.token(gu,gt);if(gu.pos>gu.start){return gs}}throw new Error("Mode "+gv.name+" failed to advance stream.")}function cp(gz,gx,gu,gt){function gq(gC){return{start:gA.start,end:gA.pos,string:gA.current(),type:gs||null,state:gC?b2(gy.mode,gr):gr}}var gy=gz.doc,gv=gy.mode,gs;gx=fP(gy,gx);var gB=fk(gy,gx.line),gr=dC(gz,gx.line,gu);var gA=new eX(gB.text,gz.options.tabSize),gw;if(gt){gw=[]}while((gt||gA.pos<gx.ch)&&!gA.eol()){gA.start=gA.pos;gs=eD(gv,gA,gr);if(gt){gw.push(gq(true))}}return gt?gw:gq()}function w(gA,gC,gv,gr,gw,gt,gu){var gs=gv.flattenSpans;if(gs==null){gs=gA.options.flattenSpans}var gy=0,gx=null;var gB=new eX(gC,gA.options.tabSize),gq;var gE=gA.options.addModeClass&&[null];if(gC==""){di(fv(gv,gr),gt)}while(!gB.eol()){if(gB.pos>gA.options.maxHighlightLength){gs=false;if(gu){dx(gA,gC,gr,gB.pos)}gB.pos=gC.length;gq=null}else{gq=di(eD(gv,gB,gr,gE),gt)}if(gE){var gD=gE[0].name;if(gD){gq="m-"+(gq?gD+" "+gq:gD)}}if(!gs||gx!=gq){while(gy<gB.start){gy=Math.min(gB.start,gy+50000);gw(gy,gx)}gx=gq}gB.start=gB.pos}while(gy<gB.pos){var gz=Math.min(gB.pos,gy+50000);gw(gz,gx);gy=gz}}function fE(gx,gz,gq,gu){var gy=[gx.state.modeGen],gt={};w(gx,gz.text,gx.doc.mode,gq,function(gA,gB){gy.push(gA,gB)},gt,gu);for(var gr=0;gr<gx.state.overlays.length;++gr){var gv=gx.state.overlays[gr],gw=1,gs=0;w(gx,gz.text,gv.mode,true,function(gA,gC){var gE=gw;while(gs<gA){var gB=gy[gw];if(gB>gA){gy.splice(gw,1,gA,gy[gw+1],gB)}gw+=2;gs=Math.min(gA,gB)}if(!gC){return}if(gv.opaque){gy.splice(gE,gw-gE,gA,"cm-overlay "+gC);gw=gE+2}else{for(;gE<gw;gE+=2){var gD=gy[gE+1];gy[gE+1]=(gD?gD+" ":"")+"cm-overlay "+gC}}},gt)}return{styles:gy,classes:gt.bgClass||gt.textClass?gt:null}}function c5(gr,gs,gu){if(!gs.styles||gs.styles[0]!=gr.state.modeGen){var gt=dC(gr,bM(gs));var gq=fE(gr,gs,gs.text.length>gr.options.maxHighlightLength?b2(gr.doc.mode,gt):gt);gs.stateAfter=gt;gs.styles=gq.styles;if(gq.classes){gs.styleClasses=gq.classes}else{if(gs.styleClasses){gs.styleClasses=null}}if(gu===gr.doc.frontier){gr.doc.frontier++}}return gs.styles}function dx(gq,gv,gs,gr){var gu=gq.doc.mode;var gt=new eX(gv,gq.options.tabSize);gt.start=gt.pos=gr||0;if(gv==""){fv(gu,gs)}while(!gt.eol()){eD(gu,gt,gs);gt.start=gt.pos}}var dW={},b0={};function e0(gs,gr){if(!gs||/^\s*$/.test(gs)){return null}var gq=gr.addModeClass?b0:dW;return gq[gs]||(gq[gs]=gs.replace(/\S+/g,"cm-$&"))}function eV(gr,gv){var gw=f9("span",null,null,cZ?"padding-right: .1px":null);var gt={pre:f9("pre",[gw],"CodeMirror-line"),content:gw,col:0,pos:0,cm:gr,splitSpaces:(dK||cZ)&&gr.getOption("lineWrapping")};gv.measure={};for(var gu=0;gu<=(gv.rest?gv.rest.length:0);gu++){var gs=gu?gv.rest[gu-1]:gv.line,gq;gt.pos=0;gt.addToken=t;if(bN(gr.display.measure)&&(gq=a(gs))){gt.addToken=U(gt.addToken,gq)}gt.map=[];var gx=gv!=gr.display.externalMeasured&&bM(gs);bn(gs,gt,c5(gr,gs,gx));if(gs.styleClasses){if(gs.styleClasses.bgClass){gt.bgClass=fZ(gs.styleClasses.bgClass,gt.bgClass||"")}if(gs.styleClasses.textClass){gt.textClass=fZ(gs.styleClasses.textClass,gt.textClass||"")}}if(gt.map.length==0){gt.map.push(0,0,gt.content.appendChild(bm(gr.display.measure)))}if(gu==0){gv.measure.map=gt.map;gv.measure.cache={}}else{(gv.measure.maps||(gv.measure.maps=[])).push(gt.map);(gv.measure.caches||(gv.measure.caches=[])).push({})}}if(cZ&&/\bcm-tab\b/.test(gt.content.lastChild.className)){gt.content.className="cm-tab-wrap-hack"}aD(gr,"renderLine",gr,gv.line,gt.pre);if(gt.pre.className){gt.textClass=fZ(gt.pre.className,gt.textClass||"")}return gt}function fh(gr){var gq=f9("span","\u2022","cm-invalidchar");gq.title="\\u"+gr.charCodeAt(0).toString(16);gq.setAttribute("aria-label",gq.title);return gq}function t(gB,gw,gG,gD,gz,gI,gv){if(!gw){return}var gF=gB.splitSpaces?gw.replace(/ {3,}/g,cE):gw;var gq=gB.cm.state.specialChars,gr=false;if(!gq.test(gw)){gB.col+=gw.length;var gE=document.createTextNode(gF);gB.map.push(gB.pos,gB.pos+gw.length,gE);if(dK&&k<9){gr=true}gB.pos+=gw.length}else{var gE=document.createDocumentFragment(),gt=0;while(true){gq.lastIndex=gt;var gC=gq.exec(gw);var gH=gC?gC.index-gt:gw.length-gt;if(gH){var gy=document.createTextNode(gF.slice(gt,gt+gH));if(dK&&k<9){gE.appendChild(f9("span",[gy]))}else{gE.appendChild(gy)}gB.map.push(gB.pos,gB.pos+gH,gy);gB.col+=gH;gB.pos+=gH}if(!gC){break}gt+=gH+1;if(gC[0]=="\t"){var gA=gB.cm.options.tabSize,gx=gA-gB.col%gA;var gy=gE.appendChild(f9("span",co(gx),"cm-tab"));gy.setAttribute("role","presentation");gy.setAttribute("cm-text","\t");gB.col+=gx}else{if(gC[0]=="\r"||gC[0]=="\n"){var gy=gE.appendChild(f9("span",gC[0]=="\r"?"\u240d":"\u2424","cm-invalidchar"));gy.setAttribute("cm-text",gC[0]);gB.col+=1}else{var gy=gB.cm.options.specialCharPlaceholder(gC[0]);gy.setAttribute("cm-text",gC[0]);if(dK&&k<9){gE.appendChild(f9("span",[gy]))}else{gE.appendChild(gy)}gB.col+=1}}gB.map.push(gB.pos,gB.pos+1,gy);gB.pos++}}if(gG||gD||gz||gr||gv){var gs=gG||"";if(gD){gs+=gD}if(gz){gs+=gz}var gu=f9("span",[gE],gs,gv);if(gI){gu.title=gI}return gB.content.appendChild(gu)}gB.content.appendChild(gE)}function cE(gq){var gr=" ";for(var gs=0;gs<gq.length-2;++gs){gr+=gs%2?" ":"\u00a0"}gr+=" ";return gr}function U(gr,gq){return function(gz,gB,gs,gw,gC,gA,gy){gs=gs?gs+" cm-force-border":"cm-force-border";var gt=gz.pos,gv=gt+gB.length;for(;;){for(var gx=0;gx<gq.length;gx++){var gu=gq[gx];if(gu.to>gt&&gu.from<=gt){break}}if(gu.to>=gv){return gr(gz,gB,gs,gw,gC,gA,gy)}gr(gz,gB.slice(0,gu.to-gt),gs,gw,null,gA,gy);gw=null;gB=gB.slice(gu.to-gt);gt=gu.to}}}function ac(gr,gt,gq,gs){var gu=!gs&&gq.widgetNode;if(gu){gr.map.push(gr.pos,gr.pos+gt,gu)}if(!gs&&gr.cm.display.input.needsContentAttribute){if(!gu){gu=gr.content.appendChild(document.createElement("span"))}gu.setAttribute("cm-marker",gq.id)}if(gu){gr.cm.display.input.setUneditable(gu);gr.content.appendChild(gu)}gr.pos+=gt}function bn(gA,gH,gz){var gv=gA.markedSpans,gx=gA.text,gF=0;if(!gv){for(var gK=1;gK<gz.length;gK+=2){gH.addToken(gH,gx.slice(gF,gF=gz[gK]),e0(gz[gK+1],gH.cm.options))}return}var gL=gx.length,gu=0,gK=1,gD="",gM,gB;var gO=0,gq,gN,gE,gP,gs;for(;;){if(gO==gu){gq=gN=gE=gP=gB="";gs=null;gO=Infinity;var gw=[],gy;for(var gI=0;gI<gv.length;++gI){var gJ=gv[gI],gG=gJ.marker;if(gG.type=="bookmark"&&gJ.from==gu&&gG.widgetNode){gw.push(gG)}else{if(gJ.from<=gu&&(gJ.to==null||gJ.to>gu||gG.collapsed&&gJ.to==gu&&gJ.from==gu)){if(gJ.to!=null&&gJ.to!=gu&&gO>gJ.to){gO=gJ.to;gN=""}if(gG.className){gq+=" "+gG.className}if(gG.css){gB=(gB?gB+";":"")+gG.css}if(gG.startStyle&&gJ.from==gu){gE+=" "+gG.startStyle}if(gG.endStyle&&gJ.to==gO){(gy||(gy=[])).push(gG.endStyle,gJ.to)}if(gG.title&&!gP){gP=gG.title}if(gG.collapsed&&(!gs||dQ(gs.marker,gG)<0)){gs=gJ}}else{if(gJ.from>gu&&gO>gJ.from){gO=gJ.from}}}}if(gy){for(var gI=0;gI<gy.length;gI+=2){if(gy[gI+1]==gO){gN+=" "+gy[gI]}}}if(!gs||gs.from==gu){for(var gI=0;gI<gw.length;++gI){ac(gH,0,gw[gI])}}if(gs&&(gs.from||0)==gu){ac(gH,(gs.to==null?gL+1:gs.to)-gu,gs.marker,gs.from==null);if(gs.to==null){return}if(gs.to==gu){gs=false}}}if(gu>=gL){break}var gC=Math.min(gL,gO);while(true){if(gD){var gr=gu+gD.length;if(!gs){var gt=gr>gC?gD.slice(0,gC-gu):gD;gH.addToken(gH,gt,gM?gM+gq:gq,gE,gu+gt.length==gO?gN:"",gP,gB)}if(gr>=gC){gD=gD.slice(gC-gu);gu=gC;break}gu=gr;gE=""}gD=gx.slice(gF,gF=gz[gK++]);gM=e0(gz[gK++],gH.cm.options)}}}function dS(gq,gr){return gr.from.ch==0&&gr.to.ch==0&&fL(gr.text)==""&&(!gq.cm||gq.cm.options.wholeLineUpdateBefore)}function fD(gD,gy,gr,gu){function gE(gG){return gr?gr[gG]:null}function gs(gG,gI,gH){ep(gG,gI,gH,gu);ae(gG,"change",gG,gy)}function gq(gJ,gH){for(var gI=gJ,gG=[];gI<gH;++gI){gG.push(new gd(gF[gI],gE(gI),gu))}return gG}var gC=gy.from,gB=gy.to,gF=gy.text;var gz=fk(gD,gC.line),gA=fk(gD,gB.line);var gx=fL(gF),gt=gE(gF.length-1),gw=gB.line-gC.line;if(gy.full){gD.insert(0,gq(0,gF.length));gD.remove(gF.length,gD.size-gF.length)}else{if(dS(gD,gy)){var gv=gq(0,gF.length-1);gs(gA,gA.text,gt);if(gw){gD.remove(gC.line,gw)}if(gv.length){gD.insert(gC.line,gv)}}else{if(gz==gA){if(gF.length==1){gs(gz,gz.text.slice(0,gC.ch)+gx+gz.text.slice(gB.ch),gt)}else{var gv=gq(1,gF.length-1);gv.push(new gd(gx+gz.text.slice(gB.ch),gt,gu));gs(gz,gz.text.slice(0,gC.ch)+gF[0],gE(0));gD.insert(gC.line+1,gv)}}else{if(gF.length==1){gs(gz,gz.text.slice(0,gC.ch)+gF[0]+gA.text.slice(gB.ch),gE(0));gD.remove(gC.line+1,gw)}else{gs(gz,gz.text.slice(0,gC.ch)+gF[0],gE(0));gs(gA,gx+gA.text.slice(gB.ch),gt);var gv=gq(1,gF.length-1);if(gw>1){gD.remove(gC.line+1,gw-1)}gD.insert(gC.line+1,gv)}}}}ae(gD,"change",gD,gy)}function e3(gr){this.lines=gr;this.parent=null;for(var gs=0,gq=0;gs<gr.length;++gs){gr[gs].parent=this;gq+=gr[gs].height}this.height=gq}e3.prototype={chunkSize:function(){return this.lines.length},removeInner:function(gq,gu){for(var gs=gq,gt=gq+gu;gs<gt;++gs){var gr=this.lines[gs];this.height-=gr.height;bA(gr);ae(gr,"delete")}this.lines.splice(gq,gu)},collapse:function(gq){gq.push.apply(gq,this.lines)},insertInner:function(gr,gs,gq){this.height+=gq;this.lines=this.lines.slice(0,gr).concat(gs).concat(this.lines.slice(gr));for(var gt=0;gt<gs.length;++gt){gs[gt].parent=this}},iterN:function(gq,gt,gs){for(var gr=gq+gt;gq<gr;++gq){if(gs(this.lines[gq])){return true}}}};function fC(gt){this.children=gt;var gs=0,gq=0;for(var gr=0;gr<gt.length;++gr){var gu=gt[gr];gs+=gu.chunkSize();gq+=gu.height;gu.parent=this}this.size=gs;this.height=gq;this.parent=null}fC.prototype={chunkSize:function(){return this.size},removeInner:function(gq,gx){this.size-=gx;for(var gs=0;gs<this.children.length;++gs){var gw=this.children[gs],gu=gw.chunkSize();if(gq<gu){var gt=Math.min(gx,gu-gq),gv=gw.height;gw.removeInner(gq,gt);this.height-=gv-gw.height;if(gu==gt){this.children.splice(gs--,1);gw.parent=null}if((gx-=gt)==0){break}gq=0}else{gq-=gu}}if(this.size-gx<25&&(this.children.length>1||!(this.children[0] instanceof e3))){var gr=[];this.collapse(gr);this.children=[new e3(gr)];this.children[0].parent=this}},collapse:function(gq){for(var gr=0;gr<this.children.length;++gr){this.children[gr].collapse(gq)}},insertInner:function(gr,gs,gq){this.size+=gs.length;this.height+=gq;for(var gv=0;gv<this.children.length;++gv){var gx=this.children[gv],gw=gx.chunkSize();if(gr<=gw){gx.insertInner(gr,gs,gq);if(gx.lines&&gx.lines.length>50){while(gx.lines.length>50){var gu=gx.lines.splice(gx.lines.length-25,25);var gt=new e3(gu);gx.height-=gt.height;this.children.splice(gv+1,0,gt);gt.parent=this}this.maybeSpill()}break}gr-=gw}},maybeSpill:function(){if(this.children.length<=10){return}var gt=this;do{var gr=gt.children.splice(gt.children.length-5,5);var gs=new fC(gr);if(!gt.parent){var gu=new fC(gt.children);gu.parent=gt;gt.children=[gu,gs];gt=gu}else{gt.size-=gs.size;gt.height-=gs.height;var gq=dh(gt.parent.children,gt);gt.parent.children.splice(gq+1,0,gs)}gs.parent=gt.parent}while(gt.children.length>10);gt.parent.maybeSpill()},iterN:function(gq,gw,gv){for(var gr=0;gr<this.children.length;++gr){var gu=this.children[gr],gt=gu.chunkSize();if(gq<gt){var gs=Math.min(gw,gt-gq);if(gu.iterN(gq,gs,gv)){return true}if((gw-=gs)==0){break}gq=0}else{gq-=gt}}}};var cq=0;var ar=H.Doc=function(gt,gs,gq,gr){if(!(this instanceof ar)){return new ar(gt,gs,gq,gr)}if(gq==null){gq=0}fC.call(this,[new e3([new gd("",null)])]);this.first=gq;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.cleanGeneration=1;this.frontier=gq;var gu=W(gq,0);this.sel=eW(gu);this.history=new f0(null);this.id=++cq;this.modeOption=gs;this.lineSep=gr;this.extend=false;if(typeof gt=="string"){gt=this.splitLines(gt)}fD(this,{from:gu,to:gu,text:gt});bT(this,eW(gu),Z)};ar.prototype=cj(fC.prototype,{constructor:ar,iter:function(gs,gr,gq){if(gq){this.iterN(gs-this.first,gr-gs,gq)}else{this.iterN(this.first,this.first+this.size,gs)}},insert:function(gr,gs){var gq=0;for(var gt=0;gt<gs.length;++gt){gq+=gs[gt].height}this.insertInner(gr-this.first,gs,gq)},remove:function(gq,gr){this.removeInner(gq-this.first,gr)},getValue:function(gr){var gq=a1(this,this.first,this.first+this.size);if(gr===false){return gq}return gq.join(gr||this.lineSeparator())},setValue:cC(function(gr){var gs=W(this.first,0),gq=this.first+this.size-1;bf(this,{from:gs,to:W(gq,fk(this,gq).text.length),text:this.splitLines(gr),origin:"setValue",full:true},true);bT(this,eW(gs))}),replaceRange:function(gr,gt,gs,gq){gt=fP(this,gt);gs=gs?fP(this,gs):gt;a0(this,gr,gt,gs,gq)},getRange:function(gt,gs,gr){var gq=gb(this,fP(this,gt),fP(this,gs));if(gr===false){return gq}return gq.join(gr||this.lineSeparator())},getLine:function(gr){var gq=this.getLineHandle(gr);return gq&&gq.text},getLineHandle:function(gq){if(b8(this,gq)){return fk(this,gq)}},getLineNumber:function(gq){return bM(gq)},getLineHandleVisualStart:function(gq){if(typeof gq=="number"){gq=fk(this,gq)}return x(gq)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(gq){return fP(this,gq)},getCursor:function(gs){var gq=this.sel.primary(),gr;if(gs==null||gs=="head"){gr=gq.head}else{if(gs=="anchor"){gr=gq.anchor}else{if(gs=="end"||gs=="to"||gs===false){gr=gq.to()}else{gr=gq.from()}}}return gr},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:cC(function(gq,gs,gr){F(this,fP(this,typeof gq=="number"?W(gq,gs||0):gq),null,gr)}),setSelection:cC(function(gr,gs,gq){F(this,fP(this,gr),fP(this,gs||gr),gq)}),extendSelection:cC(function(gs,gq,gr){f3(this,fP(this,gs),gq&&fP(this,gq),gr)}),extendSelections:cC(function(gr,gq){av(this,d0(this,gr),gq)}),extendSelectionsBy:cC(function(gs,gq){var gr=bR(this.sel.ranges,gs);av(this,d0(this,gr),gq)}),setSelections:cC(function(gq,gu,gs){if(!gq.length){return}for(var gt=0,gr=[];gt<gq.length;gt++){gr[gt]=new dY(fP(this,gq[gt].anchor),fP(this,gq[gt].head))}if(gu==null){gu=Math.min(gq.length-1,this.sel.primIndex)}bT(this,cv(gr,gu),gs)}),addSelection:cC(function(gs,gt,gr){var gq=this.sel.ranges.slice(0);gq.push(new dY(fP(this,gs),fP(this,gt||gs)));bT(this,cv(gq,gq.length-1),gr)}),getSelection:function(gu){var gr=this.sel.ranges,gq;for(var gs=0;gs<gr.length;gs++){var gt=gb(this,gr[gs].from(),gr[gs].to());gq=gq?gq.concat(gt):gt}if(gu===false){return gq}else{return gq.join(gu||this.lineSeparator())}},getSelections:function(gu){var gt=[],gq=this.sel.ranges;for(var gr=0;gr<gq.length;gr++){var gs=gb(this,gq[gr].from(),gq[gr].to());if(gu!==false){gs=gs.join(gu||this.lineSeparator())}gt[gr]=gs}return gt},replaceSelection:function(gs,gu,gq){var gt=[];for(var gr=0;gr<this.sel.ranges.length;gr++){gt[gr]=gs}this.replaceSelections(gt,gu,gq||"+input")},replaceSelections:cC(function(gv,gx,gs){var gu=[],gw=this.sel;for(var gt=0;gt<gw.ranges.length;gt++){var gr=gw.ranges[gt];gu[gt]={from:gr.from(),to:gr.to(),text:this.splitLines(gv[gt]),origin:gs}}var gq=gx&&gx!="end"&&af(this,gu,gx);for(var gt=gu.length-1;gt>=0;gt--){bf(this,gu[gt])}if(gq){fc(this,gq)}else{if(this.cm){fK(this.cm)}}}),undo:cC(function(){b7(this,"undo")}),redo:cC(function(){b7(this,"redo")}),undoSelection:cC(function(){b7(this,"undo",true)}),redoSelection:cC(function(){b7(this,"redo",true)}),setExtending:function(gq){this.extend=gq},getExtending:function(){return this.extend},historySize:function(){var gt=this.history,gq=0,gs=0;for(var gr=0;gr<gt.done.length;gr++){if(!gt.done[gr].ranges){++gq}}for(var gr=0;gr<gt.undone.length;gr++){if(!gt.undone[gr].ranges){++gs}}return{undo:gq,redo:gs}},clearHistory:function(){this.history=new f0(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(true)},changeGeneration:function(gq){if(gq){this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null}return this.history.generation},isClean:function(gq){return this.history.generation==(gq||this.cleanGeneration)},getHistory:function(){return{done:bO(this.history.done),undone:bO(this.history.undone)}},setHistory:function(gr){var gq=this.history=new f0(this.history.maxGeneration);gq.done=bO(gr.done.slice(0),null,true);gq.undone=bO(gr.undone.slice(0),null,true)},addLineClass:cC(function(gs,gr,gq){return eC(this,gs,gr=="gutter"?"gutter":"class",function(gt){var gu=gr=="text"?"textClass":gr=="background"?"bgClass":gr=="gutter"?"gutterClass":"wrapClass";if(!gt[gu]){gt[gu]=gq}else{if(S(gq).test(gt[gu])){return false}else{gt[gu]+=" "+gq}}return true})}),removeLineClass:cC(function(gs,gr,gq){return eC(this,gs,gr=="gutter"?"gutter":"class",function(gu){var gx=gr=="text"?"textClass":gr=="background"?"bgClass":gr=="gutter"?"gutterClass":"wrapClass";var gw=gu[gx];if(!gw){return false}else{if(gq==null){gu[gx]=null}else{var gv=gw.match(S(gq));if(!gv){return false}var gt=gv.index+gv[0].length;gu[gx]=gw.slice(0,gv.index)+(!gv.index||gt==gw.length?"":" ")+gw.slice(gt)||null}}return true})}),addLineWidget:cC(function(gs,gr,gq){return bG(this,gs,gr,gq)}),removeLineWidget:function(gq){gq.clear()},markText:function(gs,gr,gq){return eI(this,fP(this,gs),fP(this,gr),gq,gq&&gq.type||"range")},setBookmark:function(gs,gq){var gr={replacedWith:gq&&(gq.nodeType==null?gq.widget:gq),insertLeft:gq&&gq.insertLeft,clearWhenEmpty:false,shared:gq&&gq.shared,handleMouseEvents:gq&&gq.handleMouseEvents};gs=fP(this,gs);return eI(this,gs,gs,gr,"bookmark")},findMarksAt:function(gu){gu=fP(this,gu);var gt=[],gr=fk(this,gu.line).markedSpans;if(gr){for(var gq=0;gq<gr.length;++gq){var gs=gr[gq];if((gs.from==null||gs.from<=gu.ch)&&(gs.to==null||gs.to>=gu.ch)){gt.push(gs.marker.parent||gs.marker)}}}return gt},findMarks:function(gu,gt,gq){gu=fP(this,gu);gt=fP(this,gt);var gr=[],gs=gu.line;this.iter(gu.line,gt.line+1,function(gv){var gx=gv.markedSpans;if(gx){for(var gw=0;gw<gx.length;gw++){var gy=gx[gw];if(!(gy.to!=null&&gs==gu.line&&gu.ch>=gy.to||gy.from==null&&gs!=gu.line||gy.from!=null&&gs==gt.line&&gy.from>=gt.ch)&&(!gq||gq(gy.marker))){gr.push(gy.marker.parent||gy.marker)}}}++gs});return gr},getAllMarks:function(){var gq=[];this.iter(function(gs){var gr=gs.markedSpans;if(gr){for(var gt=0;gt<gr.length;++gt){if(gr[gt].from!=null){gq.push(gr[gt].marker)}}}});return gq},posFromIndex:function(gs){var gq,gt=this.first,gr=this.lineSeparator().length;this.iter(function(gu){var gv=gu.text.length+gr;if(gv>gs){gq=gs;return true}gs-=gv;++gt});return fP(this,W(gt,gq))},indexFromPos:function(gs){gs=fP(this,gs);var gq=gs.ch;if(gs.line<this.first||gs.ch<0){return 0}var gr=this.lineSeparator().length;this.iter(this.first,gs.line,function(gt){gq+=gt.text.length+gr});return gq},copy:function(gq){var gr=new ar(a1(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);gr.scrollTop=this.scrollTop;gr.scrollLeft=this.scrollLeft;gr.sel=this.sel;gr.extend=false;if(gq){gr.history.undoDepth=this.history.undoDepth;gr.setHistory(this.getHistory())}return gr},linkedDoc:function(gq){if(!gq){gq={}}var gt=this.first,gs=this.first+this.size;if(gq.from!=null&&gq.from>gt){gt=gq.from}if(gq.to!=null&&gq.to<gs){gs=gq.to}var gr=new ar(a1(this,gt,gs),gq.mode||this.modeOption,gt,this.lineSep);if(gq.sharedHist){gr.history=this.history}(this.linked||(this.linked=[])).push({doc:gr,sharedHist:gq.sharedHist});gr.linked=[{doc:this,isParent:true,sharedHist:gq.sharedHist}];dF(gr,eT(this));return gr},unlinkDoc:function(gr){if(gr instanceof H){gr=gr.doc}if(this.linked){for(var gs=0;gs<this.linked.length;++gs){var gt=this.linked[gs];if(gt.doc!=gr){continue}this.linked.splice(gs,1);gr.unlinkDoc(this);er(eT(this));break}}if(gr.history==this.history){var gq=[gr.id];d8(gr,function(gu){gq.push(gu.id)},true);gr.history=new f0(null);gr.history.done=bO(this.history.done,gq);gr.history.undone=bO(this.history.undone,gq)}},iterLinkedDocs:function(gq){d8(this,gq)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(gq){if(this.lineSep){return gq.split(this.lineSep)}return fY(gq)},lineSeparator:function(){return this.lineSep||"\n"}});ar.prototype.eachLine=ar.prototype.iter;var d="iter insert remove copy getEditor constructor".split(" ");for(var bJ in ar.prototype){if(ar.prototype.hasOwnProperty(bJ)&&dh(d,bJ)<0){H.prototype[bJ]=(function(gq){return function(){return gq.apply(this.doc,arguments)}})(ar.prototype[bJ])}}bx(ar);function d8(gt,gs,gr){function gq(gz,gx,gv){if(gz.linked){for(var gw=0;gw<gz.linked.length;++gw){var gu=gz.linked[gw];if(gu.doc==gx){continue}var gy=gv&&gu.sharedHist;if(gr&&!gy){continue}gs(gu.doc,gy);gq(gu.doc,gz,gy)}}}gq(gt,null,true)}function ed(gq,gr){if(gr.cm){throw new Error("This document is already in use.")}gq.doc=gr;gr.cm=gq;X(gq);bq(gq);if(!gq.options.lineWrapping){h(gq)}gq.options.mode=gr.modeOption;ah(gq)}function fk(gt,gv){gv-=gt.first;if(gv<0||gv>=gt.size){throw new Error("There is no line "+(gv+gt.first)+" in the document.")}for(var gq=gt;!gq.lines;){for(var gr=0;;++gr){var gu=gq.children[gr],gs=gu.chunkSize();if(gv<gs){gq=gu;break}gv-=gs}}return gq.lines[gv]}function gb(gs,gu,gq){var gr=[],gt=gu.line;gs.iter(gu.line,gq.line+1,function(gv){var gw=gv.text;if(gt==gq.line){gw=gw.slice(0,gq.ch)}if(gt==gu.line){gw=gw.slice(gu.ch)}gr.push(gw);++gt});return gr}function a1(gr,gt,gs){var gq=[];gr.iter(gt,gs,function(gu){gq.push(gu.text)});return gq}function gc(gr,gq){var gs=gq-gr.height;if(gs){for(var gt=gr;gt;gt=gt.parent){gt.height+=gs}}}function bM(gq){if(gq.parent==null){return null}var gu=gq.parent,gt=dh(gu.lines,gq);for(var gr=gu.parent;gr;gu=gr,gr=gr.parent){for(var gs=0;;++gs){if(gr.children[gs]==gu){break}gt+=gr.children[gs].chunkSize()}}return gt+gu.first}function bF(gs,gv){var gx=gs.first;outer:do{for(var gt=0;gt<gs.children.length;++gt){var gw=gs.children[gt],gu=gw.height;if(gv<gu){gs=gw;continue outer}gv-=gu;gx+=gw.chunkSize()}return gx}while(!gs.lines);for(var gt=0;gt<gs.lines.length;++gt){var gr=gs.lines[gt],gq=gr.height;if(gv<gq){break}gv-=gq}return gx+gt}function bL(gs){gs=x(gs);var gu=0,gr=gs.parent;for(var gt=0;gt<gr.lines.length;++gt){var gq=gr.lines[gt];if(gq==gs){break}else{gu+=gq.height}}for(var gv=gr.parent;gv;gr=gv,gv=gr.parent){for(var gt=0;gt<gv.children.length;++gt){var gw=gv.children[gt];if(gw==gr){break}else{gu+=gw.height}}}return gu}function a(gr){var gq=gr.order;if(gq==null){gq=gr.order=bg(gr.text)}return gq}function f0(gq){this.done=[];this.undone=[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOp=this.lastSelOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=gq||1}function du(gq,gs){var gr={from:ch(gs.from),to:cW(gs),text:gb(gq,gs.from,gs.to)};bX(gq,gr,gs.from.line,gs.to.line+1);d8(gq,function(gt){bX(gt,gr,gs.from.line,gs.to.line+1)},true);return gr}function fG(gr){while(gr.length){var gq=fL(gr);if(gq.ranges){gr.pop()}else{break}}}function eQ(gr,gq){if(gq){fG(gr.done);return fL(gr.done)}else{if(gr.done.length&&!fL(gr.done).ranges){return fL(gr.done)}else{if(gr.done.length>1&&!gr.done[gr.done.length-2].ranges){gr.done.pop();return fL(gr.done)}}}}function fS(gw,gu,gq,gt){var gs=gw.history;gs.undone.length=0;var gr=+new Date,gx;if((gs.lastOp==gt||gs.lastOrigin==gu.origin&&gu.origin&&((gu.origin.charAt(0)=="+"&&gw.cm&&gs.lastModTime>gr-gw.cm.options.historyEventDelay)||gu.origin.charAt(0)=="*"))&&(gx=eQ(gs,gs.lastOp==gt))){var gy=fL(gx.changes);if(ce(gu.from,gu.to)==0&&ce(gu.from,gy.to)==0){gy.to=cW(gu)}else{gx.changes.push(du(gw,gu))}}else{var gv=fL(gs.done);if(!gv||!gv.ranges){cM(gw.sel,gs.done)}gx={changes:[du(gw,gu)],generation:gs.generation};gs.done.push(gx);while(gs.done.length>gs.undoDepth){gs.done.shift();if(!gs.done[0].ranges){gs.done.shift()}}}gs.done.push(gq);gs.generation=++gs.maxGeneration;gs.lastModTime=gs.lastSelTime=gr;gs.lastOp=gs.lastSelOp=gt;gs.lastOrigin=gs.lastSelOrigin=gu.origin;if(!gy){aD(gw,"historyAdded")}}function bz(gu,gq,gs,gt){var gr=gq.charAt(0);return gr=="*"||gr=="+"&&gs.ranges.length==gt.ranges.length&&gs.somethingSelected()==gt.somethingSelected()&&new Date-gu.history.lastSelTime<=(gu.cm?gu.cm.options.historyEventDelay:500)}function gi(gv,gt,gq,gs){var gu=gv.history,gr=gs&&gs.origin;if(gq==gu.lastSelOp||(gr&&gu.lastSelOrigin==gr&&(gu.lastModTime==gu.lastSelTime&&gu.lastOrigin==gr||bz(gv,gr,fL(gu.done),gt)))){gu.done[gu.done.length-1]=gt}else{cM(gt,gu.done)}gu.lastSelTime=+new Date;gu.lastSelOrigin=gr;gu.lastSelOp=gq;if(gs&&gs.clearRedo!==false){fG(gu.undone)}}function cM(gr,gq){var gs=fL(gq);if(!(gs&&gs.ranges&&gs.equals(gr))){gq.push(gr)}}function bX(gr,gv,gu,gt){var gq=gv["spans_"+gr.id],gs=0;gr.iter(Math.max(gr.first,gu),Math.min(gr.first+gr.size,gt),function(gw){if(gw.markedSpans){(gq||(gq=gv["spans_"+gr.id]={}))[gs]=gw.markedSpans}++gs})}function bk(gs){if(!gs){return null}for(var gr=0,gq;gr<gs.length;++gr){if(gs[gr].marker.explicitlyCleared){if(!gq){gq=gs.slice(0,gr)}}else{if(gq){gq.push(gs[gr])}}}return !gq?gs:gq.length?gq:null}function b3(gt,gu){var gs=gu["spans_"+gt.id];if(!gs){return null}for(var gr=0,gq=[];gr<gu.text.length;++gr){gq.push(bk(gs[gr]))}return gq}function bO(gB,gt,gA){for(var gw=0,gr=[];gw<gB.length;++gw){var gs=gB[gw];if(gs.ranges){gr.push(gA?ga.prototype.deepCopy.call(gs):gs);continue}var gy=gs.changes,gz=[];gr.push({changes:gz});for(var gv=0;gv<gy.length;++gv){var gx=gy[gv],gu;gz.push({from:gx.from,to:gx.to,text:gx.text});if(gt){for(var gq in gx){if(gu=gq.match(/^spans_(\d+)$/)){if(dh(gt,Number(gu[1]))>-1){fL(gz)[gq]=gx[gq];delete gx[gq]}}}}}}return gr}function I(gt,gs,gr,gq){if(gr<gt.line){gt.line+=gq}else{if(gs<gt.line){gt.line=gs;gt.ch=0}}}function fm(gt,gv,gw,gx){for(var gs=0;gs<gt.length;++gs){var gq=gt[gs],gu=true;if(gq.ranges){if(!gq.copied){gq=gt[gs]=gq.deepCopy();gq.copied=true}for(var gr=0;gr<gq.ranges.length;gr++){I(gq.ranges[gr].anchor,gv,gw,gx);I(gq.ranges[gr].head,gv,gw,gx)}continue}for(var gr=0;gr<gq.changes.length;++gr){var gy=gq.changes[gr];if(gw<gy.from.line){gy.from=W(gy.from.line+gx,gy.from.ch);gy.to=W(gy.to.line+gx,gy.to.ch)}else{if(gv<=gy.to.line){gu=false;break}}}if(!gu){gt.splice(0,gs+1);gs=0}}}function dE(gr,gu){var gt=gu.from.line,gs=gu.to.line,gq=gu.text.length-(gs-gt)-1;fm(gr.done,gt,gs,gq);fm(gr.undone,gt,gs,gq)}var cF=H.e_preventDefault=function(gq){if(gq.preventDefault){gq.preventDefault()}else{gq.returnValue=false}};var dq=H.e_stopPropagation=function(gq){if(gq.stopPropagation){gq.stopPropagation()}else{gq.cancelBubble=true}};function bK(gq){return gq.defaultPrevented!=null?gq.defaultPrevented:gq.returnValue==false}var eu=H.e_stop=function(gq){cF(gq);dq(gq)};function L(gq){return gq.target||gq.srcElement}function fT(gr){var gq=gr.which;if(gq==null){if(gr.button&1){gq=1}else{if(gr.button&2){gq=3}else{if(gr.button&4){gq=2}}}}if(b6&&gr.ctrlKey&&gq==1){gq=3}return gq}var bW=H.on=function(gt,gr,gs){if(gt.addEventListener){gt.addEventListener(gr,gs,false)}else{if(gt.attachEvent){gt.attachEvent("on"+gr,gs)}else{var gu=gt._handlers||(gt._handlers={});var gq=gu[gr]||(gu[gr]=[]);gq.push(gs)}}};var fa=[];function en(gs,gr,gt){var gq=gs._handlers&&gs._handlers[gr];if(gt){return gq&&gq.length>0?gq.slice():fa}else{return gq||fa}}var ef=H.off=function(gu,gs,gt){if(gu.removeEventListener){gu.removeEventListener(gs,gt,false)}else{if(gu.detachEvent){gu.detachEvent("on"+gs,gt)}else{var gq=en(gu,gs,false);for(var gr=0;gr<gq.length;++gr){if(gq[gr]==gt){gq.splice(gr,1);break}}}}};var aD=H.signal=function(gu,gt){var gq=en(gu,gt,true);if(!gq.length){return}var gr=Array.prototype.slice.call(arguments,2);for(var gs=0;gs<gq.length;++gs){gq[gs].apply(null,gr)}};var by=null;function ae(gw,gu){var gq=en(gw,gu,false);if(!gq.length){return}var gs=Array.prototype.slice.call(arguments,2),gv;if(bo){gv=bo.delayedCallbacks}else{if(by){gv=by}else{gv=by=[];setTimeout(aL,0)}}function gr(gx){return function(){gx.apply(null,gs)}}for(var gt=0;gt<gq.length;++gt){gv.push(gr(gq[gt]))}}function aL(){var gq=by;by=null;for(var gr=0;gr<gq.length;++gr){gq[gr]()}}function aQ(gq,gs,gr){if(typeof gs=="string"){gs={type:gs,preventDefault:function(){this.defaultPrevented=true}}}aD(gq,gr||gs.type,gq,gs);return bK(gs)||gs.codemirrorIgnore}function V(gr){var gq=gr._handlers&&gr._handlers.cursorActivity;if(!gq){return}var gt=gr.curOp.cursorActivityHandlers||(gr.curOp.cursorActivityHandlers=[]);for(var gs=0;gs<gq.length;++gs){if(dh(gt,gq[gs])==-1){gt.push(gq[gs])}}}function fn(gr,gq){return en(gr,gq).length>0}function bx(gq){gq.prototype.on=function(gr,gs){bW(this,gr,gs)};gq.prototype.off=function(gr,gs){ef(this,gr,gs)}}var dJ=30;var b9=H.Pass={toString:function(){return"CodeMirror.Pass"}};var Z={scroll:false},M={origin:"*mouse"},cV={origin:"+move"};function gp(){this.id=null}gp.prototype.set=function(gq,gr){clearTimeout(this.id);this.id=setTimeout(gr,gq)};var bS=H.countColumn=function(gt,gr,gv,gw,gs){if(gr==null){gr=gt.search(/[^\s\u00a0]/);if(gr==-1){gr=gt.length}}for(var gu=gw||0,gx=gs||0;;){var gq=gt.indexOf("\t",gu);if(gq<0||gq>=gr){return gx+(gr-gu)}gx+=gq-gu;gx+=gv-(gx%gv);gu=gq+1}};var et=H.findColumn=function(gu,gt,gv){for(var gw=0,gs=0;;){var gr=gu.indexOf("\t",gw);if(gr==-1){gr=gu.length}var gq=gr-gw;if(gr==gu.length||gs+gq>=gt){return gw+Math.min(gq,gt-gs)}gs+=gr-gw;gs+=gv-(gs%gv);gw=gr+1;if(gs>=gt){return gw}}};var aZ=[""];function co(gq){while(aZ.length<=gq){aZ.push(fL(aZ)+" ")}return aZ[gq]}function fL(gq){return gq[gq.length-1]}var dL=function(gq){gq.select()};if(e5){dL=function(gq){gq.selectionStart=0;gq.selectionEnd=gq.value.length}}else{if(dK){dL=function(gr){try{gr.select()}catch(gq){}}}}function dh(gs,gq){for(var gr=0;gr<gs.length;++gr){if(gs[gr]==gq){return gr}}return -1}function bR(gt,gs){var gq=[];for(var gr=0;gr<gt.length;gr++){gq[gr]=gs(gt[gr],gr)}return gq}function f1(){}function cj(gs,gq){var gr;if(Object.create){gr=Object.create(gs)}else{f1.prototype=gs;gr=new f1()}if(gq){aM(gq,gr)}return gr}function aM(gs,gr,gq){if(!gr){gr={}}for(var gt in gs){if(gs.hasOwnProperty(gt)&&(gq!==false||!gr.hasOwnProperty(gt))){gr[gt]=gs[gt]}}return gr}function cu(gr){var gq=Array.prototype.slice.call(arguments,1);return function(){return gr.apply(null,gq)}}var bb=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;var fI=H.isWordChar=function(gq){return/\w/.test(gq)||gq>"\x80"&&(gq.toUpperCase()!=gq.toLowerCase()||bb.test(gq))};function cz(gq,gr){if(!gr){return fI(gq)}if(gr.source.indexOf("\\w")>-1&&fI(gq)){return true}return gr.test(gq)}function eY(gq){for(var gr in gq){if(gq.hasOwnProperty(gr)&&gq[gr]){return false}}return true}var eN=/[\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 fu(gq){return gq.charCodeAt(0)>=768&&eN.test(gq)}function f9(gq,gu,gt,gs){var gv=document.createElement(gq);if(gt){gv.className=gt}if(gs){gv.style.cssText=gs}if(typeof gu=="string"){gv.appendChild(document.createTextNode(gu))}else{if(gu){for(var gr=0;gr<gu.length;++gr){gv.appendChild(gu[gr])}}}return gv}var ck;if(document.createRange){ck=function(gt,gu,gr,gq){var gs=document.createRange();gs.setEnd(gq||gt,gr);gs.setStart(gt,gu);return gs}}else{ck=function(gs,gu,gq){var gr=document.body.createTextRange();try{gr.moveToElementText(gs.parentNode)}catch(gt){return gr}gr.collapse(true);gr.moveEnd("character",gq);gr.moveStart("character",gu);return gr}}function d2(gr){for(var gq=gr.childNodes.length;gq>0;--gq){gr.removeChild(gr.firstChild)}return gr}function bQ(gq,gr){return d2(gq).appendChild(gr)}var gh=H.contains=function(gq,gr){if(gr.nodeType==3){gr=gr.parentNode}if(gq.contains){return gq.contains(gr)}do{if(gr.nodeType==11){gr=gr.host}if(gr==gq){return true}}while(gr=gr.parentNode)};function dO(){var gq=document.activeElement;while(gq&&gq.root&&gq.root.activeElement){gq=gq.root.activeElement}return gq}if(dK&&k<11){dO=function(){try{return document.activeElement}catch(gq){return document.body}}}function S(gq){return new RegExp("(^|\\s)"+gq+"(?:$|\\s)\\s*")}var f=H.rmClass=function(gs,gq){var gt=gs.className;var gr=S(gq).exec(gt);if(gr){var gu=gt.slice(gr.index+gr[0].length);gs.className=gt.slice(0,gr.index)+(gu?gr[1]+gu:"")}};var fF=H.addClass=function(gr,gq){var gs=gr.className;if(!S(gq).test(gs)){gr.className+=(gs?" ":"")+gq}};function fZ(gs,gq){var gr=gs.split(" ");for(var gt=0;gt<gr.length;gt++){if(gr[gt]&&!S(gr[gt]).test(gq)){gq+=" "+gr[gt]}}return gq}function az(gt){if(!document.body.getElementsByClassName){return}var gs=document.body.getElementsByClassName("CodeMirror");for(var gr=0;gr<gs.length;gr++){var gq=gs[gr].CodeMirror;if(gq){gt(gq)}}}var cB=false;function bi(){if(cB){return}fJ();cB=true}function fJ(){var gq;bW(window,"resize",function(){if(gq==null){gq=setTimeout(function(){gq=null;az(aS)},100)}});bW(window,"blur",function(){az(aU)})}var eP=function(){if(dK&&k<9){return false}var gq=f9("div");return"draggable" in gq||"dragDrop" in gq}();var fR;function bm(gq){if(fR==null){var gs=f9("span","\u200b");bQ(gq,f9("span",[gs,document.createTextNode("x")]));if(gq.firstChild.offsetHeight!=0){fR=gs.offsetWidth<=1&&gs.offsetHeight>2&&!(dK&&k<8)}}var gr=fR?f9("span","\u200b"):f9("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px");gr.setAttribute("cm-text","");return gr}var fQ;function bN(gt){if(fQ!=null){return fQ}var gq=bQ(gt,document.createTextNode("A\u062eA"));var gs=ck(gq,0,1).getBoundingClientRect();if(!gs||gs.left==gs.right){return false}var gr=ck(gq,1,2).getBoundingClientRect();return fQ=(gr.right-gs.right<3)}var fY=H.splitLines="\n\nb".split(/\n/).length!=3?function(gv){var gw=0,gq=[],gu=gv.length;while(gw<=gu){var gt=gv.indexOf("\n",gw);if(gt==-1){gt=gv.length}var gs=gv.slice(gw,gv.charAt(gt-1)=="\r"?gt-1:gt);var gr=gs.indexOf("\r");if(gr!=-1){gq.push(gs.slice(0,gr));gw+=gr+1}else{gq.push(gs);gw=gt+1}}return gq}:function(gq){return gq.split(/\r\n?|\n/)};var br=window.getSelection?function(gr){try{return gr.selectionStart!=gr.selectionEnd}catch(gq){return false}}:function(gs){try{var gq=gs.ownerDocument.selection.createRange()}catch(gr){}if(!gq||gq.parentElement()!=gs){return false}return gq.compareEndPoints("StartToEnd",gq)!=0};var c9=(function(){var gq=f9("div");if("oncopy" in gq){return true}gq.setAttribute("oncopy","return;");return typeof gq.oncopy=="function"})();var fb=null;function aJ(gr){if(fb!=null){return fb}var gs=bQ(gr,f9("span","x"));var gt=gs.getBoundingClientRect();var gq=ck(gs,0,1).getBoundingClientRect();return fb=Math.abs(gt.left-gq.left)>1}var fl=H.keyNames={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"};(function(){for(var gq=0;gq<10;gq++){fl[gq+48]=fl[gq+96]=String(gq)}for(var gq=65;gq<=90;gq++){fl[gq]=String.fromCharCode(gq)}for(var gq=1;gq<=12;gq++){fl[gq+111]=fl[gq+63235]="F"+gq}})();function d5(gq,gw,gv,gu){if(!gq){return gu(gw,gv,"ltr")}var gt=false;for(var gs=0;gs<gq.length;++gs){var gr=gq[gs];if(gr.from<gv&&gr.to>gw||gw==gv&&gr.to==gw){gu(Math.max(gr.from,gw),Math.min(gr.to,gv),gr.level==1?"rtl":"ltr");gt=true}}if(!gt){gu(gw,gv,"ltr")}}function dy(gq){return gq.level%2?gq.to:gq.from}function gk(gq){return gq.level%2?gq.from:gq.to}function cD(gr){var gq=a(gr);return gq?dy(gq[0]):0}function cR(gr){var gq=a(gr);if(!gq){return gr.text.length}return gk(fL(gq))}function bs(gr,gu){var gs=fk(gr.doc,gu);var gv=x(gs);if(gv!=gs){gu=bM(gv)}var gq=a(gv);var gt=!gq?0:gq[0].level%2?cR(gv):cD(gv);return W(gu,gt)}function dP(gs,gv){var gr,gt=fk(gs.doc,gv);while(gr=ex(gt)){gt=gr.find(1,true).line;gv=null}var gq=a(gt);var gu=!gq?gt.text.length:gq[0].level%2?cD(gt):cR(gt);return W(gv==null?bM(gt):gv,gu)}function dI(gr,gw){var gv=bs(gr,gw.line);var gs=fk(gr.doc,gv.line);var gq=a(gs);if(!gq||gq[0].level==0){var gu=Math.max(0,gs.text.search(/\S/));var gt=gw.line==gv.line&&gw.ch<=gu&&gw.ch;return W(gv.line,gt?0:gu)}return gv}function am(gr,gs,gq){var gt=gr[0].level;if(gs==gt){return true}if(gq==gt){return false}return gs<gq}var e6;function aF(gq,gu){e6=null;for(var gr=0,gs;gr<gq.length;++gr){var gt=gq[gr];if(gt.from<gu&>.to>gu){return gr}if((gt.from==gu||gt.to==gu)){if(gs==null){gs=gr}else{if(am(gq,gt.level,gq[gs].level)){if(gt.from!=gt.to){e6=gs}return gr}else{if(gt.from!=gt.to){e6=gr}return gs}}}}return gs}function fj(gq,gt,gr,gs){if(!gs){return gt+gr}do{gt+=gr}while(gt>0&&fu(gq.text.charAt(gt)));return gt}function u(gq,gx,gs,gt){var gu=a(gq);if(!gu){return ai(gq,gx,gs,gt)}var gw=aF(gu,gx),gr=gu[gw];var gv=fj(gq,gx,gr.level%2?-gs:gs,gt);for(;;){if(gv>gr.from&&gv<gr.to){return gv}if(gv==gr.from||gv==gr.to){if(aF(gu,gv)==gw){return gv}gr=gu[gw+=gs];return(gs>0)==gr.level%2?gr.to:gr.from}else{gr=gu[gw+=gs];if(!gr){return null}if((gs>0)==gr.level%2){gv=fj(gq,gr.to,-1,gt)}else{gv=fj(gq,gr.from,1,gt)}}}}function ai(gq,gu,gr,gs){var gt=gu+gr;if(gs){while(gt>0&&fu(gq.text.charAt(gt))){gt+=gr}}return gt<0||gt>gq.text.length?null:gt}var bg=(function(){var gw="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var gu="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm";function gt(gA){if(gA<=247){return gw.charAt(gA)}else{if(1424<=gA&&gA<=1524){return"R"}else{if(1536<=gA&&gA<=1773){return gu.charAt(gA-1536)}else{if(1774<=gA&&gA<=2220){return"r"}else{if(8192<=gA&&gA<=8203){return"w"}else{if(gA==8204){return"b"}else{return"L"}}}}}}}var gq=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var gz=/[stwN]/,gs=/[LRr]/,gr=/[Lb1n]/,gv=/[1n]/;var gy="L";function gx(gC,gB,gA){this.level=gC;this.from=gB;this.to=gA}return function(gK){if(!gq.test(gK)){return false}var gQ=gK.length,gG=[];for(var gP=0,gC;gP<gQ;++gP){gG.push(gC=gt(gK.charCodeAt(gP)))}for(var gP=0,gJ=gy;gP<gQ;++gP){var gC=gG[gP];if(gC=="m"){gG[gP]=gJ}else{gJ=gC}}for(var gP=0,gA=gy;gP<gQ;++gP){var gC=gG[gP];if(gC=="1"&&gA=="r"){gG[gP]="n"}else{if(gs.test(gC)){gA=gC;if(gC=="r"){gG[gP]="R"}}}}for(var gP=1,gJ=gG[0];gP<gQ-1;++gP){var gC=gG[gP];if(gC=="+"&&gJ=="1"&&gG[gP+1]=="1"){gG[gP]="1"}else{if(gC==","&&gJ==gG[gP+1]&&(gJ=="1"||gJ=="n")){gG[gP]=gJ}}gJ=gC}for(var gP=0;gP<gQ;++gP){var gC=gG[gP];if(gC==","){gG[gP]="N"}else{if(gC=="%"){for(var gD=gP+1;gD<gQ&&gG[gD]=="%";++gD){}var gR=(gP&&gG[gP-1]=="!")||(gD<gQ&&gG[gD]=="1")?"1":"N";for(var gN=gP;gN<gD;++gN){gG[gN]=gR}gP=gD-1}}}for(var gP=0,gA=gy;gP<gQ;++gP){var gC=gG[gP];if(gA=="L"&&gC=="1"){gG[gP]="L"}else{if(gs.test(gC)){gA=gC}}}for(var gP=0;gP<gQ;++gP){if(gz.test(gG[gP])){for(var gD=gP+1;gD<gQ&&gz.test(gG[gD]);++gD){}var gH=(gP?gG[gP-1]:gy)=="L";var gB=(gD<gQ?gG[gD]:gy)=="L";var gR=gH||gB?"L":"R";for(var gN=gP;gN<gD;++gN){gG[gN]=gR}gP=gD-1}}var gO=[],gL;for(var gP=0;gP<gQ;){if(gr.test(gG[gP])){var gE=gP;for(++gP;gP<gQ&&gr.test(gG[gP]);++gP){}gO.push(new gx(0,gE,gP))}else{var gF=gP,gI=gO.length;for(++gP;gP<gQ&&gG[gP]!="L";++gP){}for(var gN=gF;gN<gP;){if(gv.test(gG[gN])){if(gF<gN){gO.splice(gI,0,new gx(1,gF,gN))}var gM=gN;for(++gN;gN<gP&&gv.test(gG[gN]);++gN){}gO.splice(gI,0,new gx(2,gM,gN));gF=gN}else{++gN}}if(gF<gP){gO.splice(gI,0,new gx(1,gF,gP))}}}if(gO[0].level==1&&(gL=gK.match(/^\s+/))){gO[0].from=gL[0].length;gO.unshift(new gx(0,0,gL[0].length))}if(fL(gO).level==1&&(gL=gK.match(/\s+$/))){fL(gO).to-=gL[0].length;gO.push(new gx(0,gQ-gL[0].length,gQ))}if(gO[0].level==2){gO.unshift(new gx(1,gO[0].to,gO[0].to))}if(gO[0].level!=fL(gO).level){gO.push(new gx(gO[0].level,gQ,gQ))}return gO}})();H.version="5.14.0";return H});
|
1
|
+
(function(b,a){typeof exports==="object"&&typeof module!=="undefined"?module.exports=a():typeof define==="function"&&define.amd?define(a):(b.CodeMirror=a())}(this,(function(){var ea=navigator.userAgent;var el=navigator.platform;var ct=/gecko\/\d/i.test(ea);var e1=/MSIE \d/.test(ea);var bM=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ea);var dS=e1||bM;var l=dS&&(e1?document.documentMode||6:bM[1]);var c6=/WebKit\//.test(ea);var dV=c6&&/Qt\/\d+\.\d+/.test(ea);var dk=/Chrome\//.test(ea);var ec=/Opera\//.test(ea);var aC=/Apple Computer/.test(navigator.vendor);var dd=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(ea);var fN=/PhantomJS/.test(ea);var fj=/AppleWebKit/.test(ea)&&/Mobile\/\w+/.test(ea);var er=fj||/Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(ea);var cb=fj||/Mac/.test(el);var f6=/\bCrOS\b/.test(ea);var aP=/win/i.test(el);var aZ=ec&&ea.match(/Version\/(\d*\.\d*)/);if(aZ){aZ=Number(aZ[1])}if(aZ&&aZ>=15){ec=false;c6=true}var bT=cb&&(dV||ec&&(aZ==null||aZ<12.11));var gC=ct||(dS&&l>=9);function R(i){return new RegExp("(^|\\s)"+i+"(?:$|\\s)\\s*")}var h=function(gO,i){var gP=gO.className;var gN=R(i).exec(gP);if(gN){var gQ=gP.slice(gN.index+gN[0].length);gO.className=gP.slice(0,gN.index)+(gQ?gN[1]+gQ:"")}};function eb(gN){for(var i=gN.childNodes.length;i>0;--i){gN.removeChild(gN.firstChild)}return gN}function bV(i,gN){return eb(i).appendChild(gN)}function gv(gN,gR,gQ,gP){var gS=document.createElement(gN);if(gQ){gS.className=gQ}if(gP){gS.style.cssText=gP}if(typeof gR=="string"){gS.appendChild(document.createTextNode(gR))}else{if(gR){for(var gO=0;gO<gR.length;++gO){gS.appendChild(gR[gO])}}}return gS}var cr;if(document.createRange){cr=function(gP,gQ,gN,i){var gO=document.createRange();gO.setEnd(i||gP,gN);gO.setStart(gP,gQ);return gO}}else{cr=function(gO,gQ,i){var gN=document.body.createTextRange();try{gN.moveToElementText(gO.parentNode)}catch(gP){return gN}gN.collapse(true);gN.moveEnd("character",i);gN.moveStart("character",gQ);return gN}}function gD(i,gN){if(gN.nodeType==3){gN=gN.parentNode}if(i.contains){return i.contains(gN)}do{if(gN.nodeType==11){gN=gN.host}if(gN==i){return true}}while(gN=gN.parentNode)}function dW(){var i;try{i=document.activeElement}catch(gN){i=document.body||null}while(i&&i.root&&i.root.activeElement){i=i.root.activeElement}return i}function fW(gN,i){var gO=gN.className;if(!R(i).test(gO)){gN.className+=(gO?" ":"")+i}}function gl(gP,gN){var gO=gP.split(" ");for(var gQ=0;gQ<gO.length;gQ++){if(gO[gQ]&&!R(gO[gQ]).test(gN)){gN+=" "+gO[gQ]}}return gN}var dT=function(i){i.select()};if(fj){dT=function(i){i.selectionStart=0;i.selectionEnd=i.value.length}}else{if(dS){dT=function(gN){try{gN.select()}catch(i){}}}}function cA(gN){var i=Array.prototype.slice.call(arguments,1);return function(){return gN.apply(null,i)}}function aN(gO,gN,i){if(!gN){gN={}}for(var gP in gO){if(gO.hasOwnProperty(gP)&&(i!==false||!gN.hasOwnProperty(gP))){gN[gP]=gO[gP]}}return gN}function bU(gQ,gO,gS,gT,gP){if(gO==null){gO=gQ.search(/[^\s\u00a0]/);if(gO==-1){gO=gQ.length}}for(var gR=gT||0,gU=gP||0;;){var gN=gQ.indexOf("\t",gR);if(gN<0||gN>=gO){return gU+(gO-gR)}gU+=gN-gR;gU+=gS-(gU%gS);gR=gN+1}}function gM(){this.id=null}gM.prototype.set=function(i,gN){clearTimeout(this.id);this.id=setTimeout(gN,i)};function dr(gP,gN){for(var gO=0;gO<gP.length;++gO){if(gP[gO]==gN){return gO}}return -1}var dR=30;var cg={toString:function(){return"CodeMirror.Pass"}};var Y={scroll:false};var L={origin:"*mouse"};var c2={origin:"+move"};function eC(gQ,gP,gR){for(var gS=0,gO=0;;){var gN=gQ.indexOf("\t",gS);if(gN==-1){gN=gQ.length}var i=gN-gS;if(gN==gQ.length||gO+i>=gP){return gS+Math.min(i,gP-gO)}gO+=gN-gS;gO+=gR-(gO%gR);gS=gN+1;if(gO>=gP){return gS}}}var a0=[""];function cu(i){while(a0.length<=i){a0.push(f2(a0)+" ")}return a0[i]}function f2(i){return i[i.length-1]}function bW(gQ,gP){var gN=[];for(var gO=0;gO<gQ.length;gO++){gN[gO]=gP(gQ[gO],gO)}return gN}function ce(gQ,gN,gO){var gP=0,i=gO(gN);while(gP<gQ.length&&gO(gQ[gP])<=i){gP++}gQ.splice(gP,0,gN)}function gm(){}function cp(gO,i){var gN;if(Object.create){gN=Object.create(gO)}else{gm.prototype=gO;gN=new gm()}if(i){aN(i,gN)}return gN}var bc=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function fZ(i){return/\w/.test(i)||i>"\x80"&&(i.toUpperCase()!=i.toLowerCase()||bc.test(i))}function cF(i,gN){if(!gN){return fZ(i)}if(gN.source.indexOf("\\w")>-1&&fZ(i)){return true}return gN.test(i)}function fc(i){for(var gN in i){if(i.hasOwnProperty(gN)&&i[gN]){return false}}return true}var e0=/[\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 fI(i){return i.charCodeAt(0)>=768&&e0.test(i)}function eY(i,gO,gN){var gP=this;this.input=gN;gP.scrollbarFiller=gv("div",null,"CodeMirror-scrollbar-filler");gP.scrollbarFiller.setAttribute("cm-not-content","true");gP.gutterFiller=gv("div",null,"CodeMirror-gutter-filler");gP.gutterFiller.setAttribute("cm-not-content","true");gP.lineDiv=gv("div",null,"CodeMirror-code");gP.selectionDiv=gv("div",null,null,"position: relative; z-index: 1");gP.cursorDiv=gv("div",null,"CodeMirror-cursors");gP.measure=gv("div",null,"CodeMirror-measure");gP.lineMeasure=gv("div",null,"CodeMirror-measure");gP.lineSpace=gv("div",[gP.measure,gP.lineMeasure,gP.selectionDiv,gP.cursorDiv,gP.lineDiv],null,"position: relative; outline: none");gP.mover=gv("div",[gv("div",[gP.lineSpace],"CodeMirror-lines")],null,"position: relative");gP.sizer=gv("div",[gP.mover],"CodeMirror-sizer");gP.sizerWidth=null;gP.heightForcer=gv("div",null,null,"position: absolute; height: "+dR+"px; width: 1px;");gP.gutters=gv("div",null,"CodeMirror-gutters");gP.lineGutter=null;gP.scroller=gv("div",[gP.sizer,gP.heightForcer,gP.gutters],"CodeMirror-scroll");gP.scroller.setAttribute("tabIndex","-1");gP.wrapper=gv("div",[gP.scrollbarFiller,gP.gutterFiller,gP.scroller],"CodeMirror");if(dS&&l<8){gP.gutters.style.zIndex=-1;gP.scroller.style.paddingRight=0}if(!c6&&!(ct&&er)){gP.scroller.draggable=true}if(i){if(i.appendChild){i.appendChild(gP.wrapper)}else{i(gP.wrapper)}}gP.viewFrom=gP.viewTo=gO.first;gP.reportedViewFrom=gP.reportedViewTo=gO.first;gP.view=[];gP.renderedView=null;gP.externalMeasured=null;gP.viewOffset=0;gP.lastWrapHeight=gP.lastWrapWidth=0;gP.updateLineNumbers=null;gP.nativeBarWidth=gP.barHeight=gP.barWidth=0;gP.scrollbarsClipped=false;gP.lineNumWidth=gP.lineNumInnerWidth=gP.lineNumChars=null;gP.alignWidgets=false;gP.cachedCharWidth=gP.cachedTextHeight=gP.cachedPaddingH=null;gP.maxLine=null;gP.maxLineLength=0;gP.maxLineChanged=false;gP.wheelDX=gP.wheelDY=gP.wheelStartX=gP.wheelStartY=null;gP.shift=false;gP.selForContextMenu=null;gP.activeTouch=null;gN.init(gP)}function fy(gQ,gS){gS-=gQ.first;if(gS<0||gS>=gQ.size){throw new Error("There is no line "+(gS+gQ.first)+" in the document.")}var gN=gQ;while(!gN.lines){for(var gO=0;;++gO){var gR=gN.children[gO],gP=gR.chunkSize();if(gS<gP){gN=gR;break}gS-=gP}}return gN.lines[gS]}function gw(gO,gQ,i){var gN=[],gP=gQ.line;gO.iter(gQ.line,i.line+1,function(gR){var gS=gR.text;if(gP==i.line){gS=gS.slice(0,i.ch)}if(gP==gQ.line){gS=gS.slice(gQ.ch)}gN.push(gS);++gP});return gN}function a2(gN,gP,gO){var i=[];gN.iter(gP,gO,function(gQ){i.push(gQ.text)});return i}function gz(gN,i){var gO=i-gN.height;if(gO){for(var gP=gN;gP;gP=gP.parent){gP.height+=gO}}}function bQ(gN){if(gN.parent==null){return null}var gR=gN.parent,gQ=dr(gR.lines,gN);for(var gO=gR.parent;gO;gR=gO,gO=gO.parent){for(var gP=0;;++gP){if(gO.children[gP]==gR){break}gQ+=gO.children[gP].chunkSize()}}return gQ+gR.first}function bK(gT,gS){var gQ=gT.first;outer:do{for(var gP=0;gP<gT.children.length;++gP){var gO=gT.children[gP],gN=gO.height;if(gS<gN){gT=gO;continue outer}gS-=gN;gQ+=gO.chunkSize()}return gQ}while(!gT.lines);var gR=0;for(;gR<gT.lines.length;++gR){var gV=gT.lines[gR],gU=gV.height;if(gS<gU){break}gS-=gU}return gQ+gR}function cd(gN,i){return i>=gN.first&&i<gN.first+gN.size}function eF(gN,gO){return String(gN.lineNumberFormatter(gO+gN.firstLineNumber))}function V(i,gN){if(!(this instanceof V)){return new V(i,gN)}this.line=i;this.ch=gN}function ck(gN,i){return gN.line-i.line||gN.ch-i.ch}function cn(i){return V(i.line,i.ch)}function bA(gN,i){return ck(gN,i)<0?i:gN}function aq(gN,i){return ck(gN,i)<0?gN:i}function db(i,gN){return Math.max(i.first,Math.min(gN,i.first+i.size-1))}function f7(gN,gO){if(gO.line<gN.first){return V(gN.first,0)}var i=gN.first+gN.size-1;if(gO.line>i){return V(i,fy(gN,i).text.length)}return fL(gO,fy(gN,gO.line).text.length)}function fL(gO,gN){var i=gO.ch;if(i==null||i>gN){return V(gO.line,gN)}else{if(i<0){return V(gO.line,0)}else{return gO}}}function d9(gP,gQ){var gN=[];for(var gO=0;gO<gQ.length;gO++){gN[gO]=f7(gP,gQ[gO])}return gN}var gG=false;var a7=false;function fU(){gG=true}function bz(){a7=true}function eu(i,gO,gN){this.marker=i;this.from=gO;this.to=gN}function ft(gP,gN){if(gP){for(var gO=0;gO<gP.length;++gO){var gQ=gP[gO];if(gQ.marker==gN){return gQ}}}}function eX(gO,gP){var gQ;for(var gN=0;gN<gO.length;++gN){if(gO[gN]!=gP){(gQ||(gQ=[])).push(gO[gN])}}return gQ}function ci(i,gN){i.markedSpans=i.markedSpans?i.markedSpans.concat([gN]):[gN];gN.marker.attachLine(i)}function aQ(gO,gP,gT){var gU;if(gO){for(var gR=0;gR<gO.length;++gR){var gV=gO[gR],gS=gV.marker;var gN=gV.from==null||(gS.inclusiveLeft?gV.from<=gP:gV.from<gP);if(gN||gV.from==gP&&gS.type=="bookmark"&&(!gT||!gV.marker.insertLeft)){var gQ=gV.to==null||(gS.inclusiveRight?gV.to>=gP:gV.to>gP);(gU||(gU=[])).push(new eu(gS,gV.from,gQ?null:gV.to))}}}return gU}function aB(gO,gQ,gT){var gU;if(gO){for(var gR=0;gR<gO.length;++gR){var gV=gO[gR],gS=gV.marker;var gP=gV.to==null||(gS.inclusiveRight?gV.to>=gQ:gV.to>gQ);if(gP||gV.from==gQ&&gS.type=="bookmark"&&(!gT||gV.marker.insertLeft)){var gN=gV.from==null||(gS.inclusiveLeft?gV.from<=gQ:gV.from<gQ);(gU||(gU=[])).push(new eu(gS,gN?null:gV.from-gQ,gV.to==null?null:gV.to-gQ))}}}return gU}function ev(g8,gY){if(gY.full){return null}var gP=cd(g8,gY.from.line)&&fy(g8,gY.from.line).markedSpans;var gW=cd(g8,gY.to.line)&&fy(g8,gY.to.line).markedSpans;if(!gP&&!gW){return null}var gV=gY.from.ch,g3=gY.to.ch,g0=ck(gY.from,gY.to)==0;var gU=aQ(gP,gV,g0);var gX=aB(gW,g3,g0);var g1=gY.text.length==1,gS=f2(gY.text).length+(g1?gV:0);if(gU){for(var g6=0;g6<gU.length;++g6){var g5=gU[g6];if(g5.to==null){var gZ=ft(gX,g5.marker);if(!gZ){g5.to=gV}else{if(g1){g5.to=gZ.to==null?null:gZ.to+gS}}}}}if(gX){for(var gT=0;gT<gX.length;++gT){var g4=gX[gT];if(g4.to!=null){g4.to+=gS}if(g4.from==null){var gO=ft(gU,g4.marker);if(!gO){g4.from=gS;if(g1){(gU||(gU=[])).push(g4)}}}else{g4.from+=gS;if(g1){(gU||(gU=[])).push(g4)}}}}if(gU){gU=r(gU)}if(gX&&gX!=gU){gX=r(gX)}var g7=[gU];if(!g1){var g2=gY.text.length-2,gN;if(g2>0&&gU){for(var gR=0;gR<gU.length;++gR){if(gU[gR].to==null){(gN||(gN=[])).push(new eu(gU[gR].marker,null,null))}}}for(var gQ=0;gQ<g2;++gQ){g7.push(gN)}g7.push(gX)}return g7}function r(gO){for(var gN=0;gN<gO.length;++gN){var gP=gO[gN];if(gP.from!=null&&gP.from==gP.to&&gP.marker.clearWhenEmpty!==false){gO.splice(gN--,1)}}if(!gO.length){return null}return gO}function cN(gZ,gX,gY){var gR=null;gZ.iter(gX.line,gY.line+1,function(g0){if(g0.markedSpans){for(var g1=0;g1<g0.markedSpans.length;++g1){var g2=g0.markedSpans[g1].marker;if(g2.readOnly&&(!gR||dr(gR,g2)==-1)){(gR||(gR=[])).push(g2)}}}});if(!gR){return null}var gS=[{from:gX,to:gY}];for(var gT=0;gT<gR.length;++gT){var gU=gR[gT],gP=gU.find(0);for(var gQ=0;gQ<gS.length;++gQ){var gO=gS[gQ];if(ck(gO.to,gP.from)<0||ck(gO.from,gP.to)>0){continue}var gW=[gQ,1],gN=ck(gO.from,gP.from),gV=ck(gO.to,gP.to);if(gN<0||!gU.inclusiveLeft&&!gN){gW.push({from:gO.from,to:gP.from})}if(gV>0||!gU.inclusiveRight&&!gV){gW.push({from:gP.to,to:gO.to})}gS.splice.apply(gS,gW);gQ+=gW.length-1}}return gS}function gB(gN){var gP=gN.markedSpans;if(!gP){return}for(var gO=0;gO<gP.length;++gO){gP[gO].marker.detachLine(gN)}gN.markedSpans=null}function c9(gN,gP){if(!gP){return}for(var gO=0;gO<gP.length;++gO){gP[gO].marker.attachLine(gN)}gN.markedSpans=gP}function v(i){return i.inclusiveLeft?-1:0}function bZ(i){return i.inclusiveRight?1:0}function d0(gP,gN){var gR=gP.lines.length-gN.lines.length;if(gR!=0){return gR}var gO=gP.find(),gS=gN.find();var i=ck(gO.from,gS.from)||v(gP)-v(gN);if(i){return -i}var gQ=ck(gO.to,gS.to)||bZ(gP)-bZ(gN);if(gQ){return gQ}return gN.id-gP.id}function a6(gO,gS){var gN=a7&&gO.markedSpans,gR;if(gN){for(var gQ=void 0,gP=0;gP<gN.length;++gP){gQ=gN[gP];if(gQ.marker.collapsed&&(gS?gQ.from:gQ.to)==null&&(!gR||d0(gR,gQ.marker)<0)){gR=gQ.marker}}}return gR}function e6(i){return a6(i,true)}function eJ(i){return a6(i,false)}function z(gV,gN,gT,gU,gR){var gY=fy(gV,gN);var gO=a7&&gY.markedSpans;if(gO){for(var gQ=0;gQ<gO.length;++gQ){var gP=gO[gQ];if(!gP.marker.collapsed){continue}var gX=gP.marker.find(0);var gW=ck(gX.from,gT)||v(gP.marker)-v(gR);var gS=ck(gX.to,gU)||bZ(gP.marker)-bZ(gR);if(gW>=0&&gS<=0||gW<=0&&gS>=0){continue}if(gW<=0&&(gP.marker.inclusiveRight&&gR.inclusiveLeft?ck(gX.to,gT)>=0:ck(gX.to,gT)>0)||gW>=0&&(gP.marker.inclusiveRight&&gR.inclusiveLeft?ck(gX.from,gU)<=0:ck(gX.from,gU)<0)){return true}}}}function y(gN){var i;while(i=e6(gN)){gN=i.find(-1,true).line}return gN}function g(gO){var i,gN;while(i=eJ(gO)){gO=i.find(1,true).line;(gN||(gN=[])).push(gO)}return gN}function aW(gP,gN){var i=fy(gP,gN),gO=y(i);if(i==gO){return gN}return bQ(gO)}function ed(gP,gO){if(gO>gP.lastLine()){return gO}var gN=fy(gP,gO),i;if(!fP(gP,gN)){return gO}while(i=eJ(gN)){gN=i.find(1,true).line}return bQ(gN)+1}function fP(gR,gO){var gN=a7&&gO.markedSpans;if(gN){for(var gQ=void 0,gP=0;gP<gN.length;++gP){gQ=gN[gP];if(!gQ.marker.collapsed){continue}if(gQ.from==null){return true}if(gQ.marker.widgetNode){continue}if(gQ.from==0&&gQ.marker.inclusiveLeft&&S(gR,gO,gQ)){return true}}}}function S(gS,gO,gQ){if(gQ.to==null){var gN=gQ.marker.find(1,true);return S(gS,gN.line,ft(gN.line.markedSpans,gQ.marker))}if(gQ.marker.inclusiveRight&&gQ.to==gO.text.length){return true}for(var gR=void 0,gP=0;gP<gO.markedSpans.length;++gP){gR=gO.markedSpans[gP];if(gR.marker.collapsed&&!gR.marker.widgetNode&&gR.from==gQ.to&&(gR.to==null||gR.to!=gQ.from)&&(gR.marker.inclusiveLeft||gQ.marker.inclusiveRight)&&S(gS,gO,gR)){return true}}}function bP(gP){gP=y(gP);var gR=0,gO=gP.parent;for(var gQ=0;gQ<gO.lines.length;++gQ){var gN=gO.lines[gQ];if(gN==gP){break}else{gR+=gN.height}}for(var gS=gO.parent;gS;gO=gS,gS=gO.parent){for(var gU=0;gU<gS.children.length;++gU){var gT=gS.children[gU];if(gT==gO){break}else{gR+=gT.height}}}return gR}function ey(gO){if(gO.height==0){return 0}var gN=gO.text.length,i,gR=gO;while(i=e6(gR)){var gP=i.find(0,true);gR=gP.from.line;gN+=gP.from.ch-gP.to.ch}gR=gO;while(i=eJ(gR)){var gQ=i.find(0,true);gN-=gR.text.length-gQ.from.ch;gR=gQ.to.line;gN+=gR.text.length-gQ.to.ch}return gN}function f(i){var gO=i.display,gN=i.doc;gO.maxLine=fy(gN,gN.first);gO.maxLineLength=ey(gO.maxLine);gO.maxLineChanged=true;gN.iter(function(gQ){var gP=ey(gQ);if(gP>gO.maxLineLength){gO.maxLineLength=gP;gO.maxLine=gQ}})}function ee(gN,gT,gS,gR){if(!gN){return gR(gT,gS,"ltr")}var gQ=false;for(var gP=0;gP<gN.length;++gP){var gO=gN[gP];if(gO.from<gS&&gO.to>gT||gT==gS&&gO.to==gT){gR(Math.max(gO.from,gT),Math.min(gO.to,gS),gO.level==1?"rtl":"ltr");gQ=true}}if(!gQ){gR(gT,gS,"ltr")}}function dH(i){return i.level%2?i.to:i.from}function gH(i){return i.level%2?i.from:i.to}function cJ(gN){var i=a(gN);return i?dH(i[0]):0}function cY(gN){var i=a(gN);if(!i){return gN.text.length}return gH(f2(i))}function am(gN,gO,i){var gP=gN[0].level;if(gO==gP){return true}if(i==gP){return false}return gO<i}var fl=null;function aH(gN,gR){var gP;fl=null;for(var gO=0;gO<gN.length;++gO){var gQ=gN[gO];if(gQ.from<gR&&gQ.to>gR){return gO}if((gQ.from==gR||gQ.to==gR)){if(gP==null){gP=gO}else{if(am(gN,gQ.level,gN[gP].level)){if(gQ.from!=gQ.to){fl=gP}return gO}else{if(gQ.from!=gQ.to){fl=gO}return gP}}}}return gP}function fz(i,gP,gN,gO){if(!gO){return gP+gN}do{gP+=gN}while(gP>0&&fI(i.text.charAt(gP)));return gP}function u(i,gT,gO,gP){var gQ=a(i);if(!gQ){return ah(i,gT,gO,gP)}var gS=aH(gQ,gT),gN=gQ[gS];var gR=fz(i,gT,gN.level%2?-gO:gO,gP);for(;;){if(gR>gN.from&&gR<gN.to){return gR}if(gR==gN.from||gR==gN.to){if(aH(gQ,gR)==gS){return gR}gN=gQ[gS+=gO];return(gO>0)==gN.level%2?gN.to:gN.from}else{gN=gQ[gS+=gO];if(!gN){return null}if((gO>0)==gN.level%2){gR=fz(i,gN.to,-1,gP)}else{gR=fz(i,gN.from,1,gP)}}}}function ah(i,gQ,gN,gO){var gP=gQ+gN;if(gO){while(gP>0&&fI(i.text.charAt(gP))){gP+=gN}}return gP<0||gP>i.text.length?null:gP}var bi=(function(){var gS="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN";var gQ="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm";function gP(gW){if(gW<=247){return gS.charAt(gW)}else{if(1424<=gW&&gW<=1524){return"R"}else{if(1536<=gW&&gW<=1773){return gQ.charAt(gW-1536)}else{if(1774<=gW&&gW<=2220){return"r"}else{if(8192<=gW&&gW<=8203){return"w"}else{if(gW==8204){return"b"}else{return"L"}}}}}}}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;var gV=/[stwN]/,gO=/[LRr]/,gN=/[Lb1n]/,gR=/[1n]/;var gU="L";function gT(gY,gX,gW){this.level=gY;this.from=gX;this.to=gW}return function(hk){if(!i.test(hk)){return false}var hr=hk.length,hb=[];for(var hp=0;hp<hr;++hp){hb.push(gP(hk.charCodeAt(hp)))}for(var g9=0,hf=gU;g9<hr;++g9){var g0=hb[g9];if(g0=="m"){hb[g9]=hf}else{hf=g0}}for(var g7=0,gY=gU;g7<hr;++g7){var hl=hb[g7];if(hl=="1"&&gY=="r"){hb[g7]="n"}else{if(gO.test(hl)){gY=hl;if(hl=="r"){hb[g7]="R"}}}}for(var g6=1,hg=hb[0];g6<hr-1;++g6){var hi=hb[g6];if(hi=="+"&&hg=="1"&&hb[g6+1]=="1"){hb[g6]="1"}else{if(hi==","&&hg==hb[g6+1]&&(hg=="1"||hg=="n")){hb[g6]=hg}}hg=hi}for(var g5=0;g5<hr;++g5){var hh=hb[g5];if(hh==","){hb[g5]="N"}else{if(hh=="%"){var g1=void 0;for(g1=g5+1;g1<hr&&hb[g1]=="%";++g1){}var hu=(g5&&hb[g5-1]=="!")||(g1<hr&&hb[g1]=="1")?"1":"N";for(var ho=g5;ho<g1;++ho){hb[ho]=hu}g5=g1-1}}}for(var g2=0,hq=gU;g2<hr;++g2){var he=hb[g2];if(hq=="L"&&he=="1"){hb[g2]="L"}else{if(gO.test(he)){hq=he}}}for(var gZ=0;gZ<hr;++gZ){if(gV.test(hb[gZ])){var g4=void 0;for(g4=gZ+1;g4<hr&&gV.test(hb[g4]);++g4){}var hc=(gZ?hb[gZ-1]:gU)=="L";var gX=(g4<hr?hb[g4]:gU)=="L";var ha=hc||gX?"L":"R";for(var ht=gZ;ht<g4;++ht){hb[ht]=ha}gZ=g4-1}}var hn=[],hj;for(var gW=0;gW<hr;){if(gN.test(hb[gW])){var g3=gW;for(++gW;gW<hr&&gN.test(hb[gW]);++gW){}hn.push(new gT(0,g3,gW))}else{var g8=gW,hd=hn.length;for(++gW;gW<hr&&hb[gW]!="L";++gW){}for(var hs=g8;hs<gW;){if(gR.test(hb[hs])){if(g8<hs){hn.splice(hd,0,new gT(1,g8,hs))}var hm=hs;for(++hs;hs<gW&&gR.test(hb[hs]);++hs){}hn.splice(hd,0,new gT(2,hm,hs));g8=hs}else{++hs}}if(g8<gW){hn.splice(hd,0,new gT(1,g8,gW))}}}if(hn[0].level==1&&(hj=hk.match(/^\s+/))){hn[0].from=hj[0].length;hn.unshift(new gT(0,0,hj[0].length))}if(f2(hn).level==1&&(hj=hk.match(/\s+$/))){f2(hn).to-=hj[0].length;hn.push(new gT(0,hr-hj[0].length,hr))}if(hn[0].level==2){hn.unshift(new gT(1,hn[0].to,hn[0].to))}if(hn[0].level!=f2(hn).level){hn.push(new gT(hn[0].level,hr,hr))}return hn}})();function a(gN){var i=gN.order;if(i==null){i=gN.order=bi(gN.text)}return i}var fp=[];var b0=function(gP,i,gO){if(gP.addEventListener){gP.addEventListener(i,gO,false)}else{if(gP.attachEvent){gP.attachEvent("on"+i,gO)}else{var gN=gP._handlers||(gP._handlers={});gN[i]=(gN[i]||fp).concat(gO)}}};function ew(gN,i){return gN._handlers&&gN._handlers[i]||fp}function eq(gR,gO,gQ){if(gR.removeEventListener){gR.removeEventListener(gO,gQ,false)}else{if(gR.detachEvent){gR.detachEvent("on"+gO,gQ)}else{var gP=gR._handlers,i=gP&&gP[gO];if(i){var gN=dr(i,gQ);if(gN>-1){gP[gO]=i.slice(0,gN).concat(i.slice(gN+1))}}}}}function aE(gR,gQ){var gN=ew(gR,gQ);if(!gN.length){return}var gO=Array.prototype.slice.call(arguments,2);for(var gP=0;gP<gN.length;++gP){gN[gP].apply(null,gO)}}function aR(i,gO,gN){if(typeof gO=="string"){gO={type:gO,preventDefault:function(){this.defaultPrevented=true}}}aE(i,gN||gO.type,i,gO);return bO(gO)||gO.codemirrorIgnore}function U(gO){var gN=gO._handlers&&gO._handlers.cursorActivity;if(!gN){return}var gQ=gO.curOp.cursorActivityHandlers||(gO.curOp.cursorActivityHandlers=[]);for(var gP=0;gP<gN.length;++gP){if(dr(gQ,gN[gP])==-1){gQ.push(gN[gP])}}}function fE(gN,i){return ew(gN,i).length>0}function bC(i){i.prototype.on=function(gN,gO){b0(this,gN,gO)};i.prototype.off=function(gN,gO){eq(this,gN,gO)}}function cL(i){if(i.preventDefault){i.preventDefault()}else{i.returnValue=false}}function dy(i){if(i.stopPropagation){i.stopPropagation()}else{i.cancelBubble=true}}function bO(i){return i.defaultPrevented!=null?i.defaultPrevented:i.returnValue==false}function eD(i){cL(i);dy(i)}function K(i){return i.target||i.srcElement}function gc(gN){var i=gN.which;if(i==null){if(gN.button&1){i=1}else{if(gN.button&2){i=3}else{if(gN.button&4){i=2}}}}if(cb&&gN.ctrlKey&&i==1){i=3}return i}var e2=function(){if(dS&&l<9){return false}var i=gv("div");return"draggable" in i||"dragDrop" in i}();var ga;function bp(i){if(ga==null){var gO=gv("span","\u200b");bV(i,gv("span",[gO,document.createTextNode("x")]));if(i.firstChild.offsetHeight!=0){ga=gO.offsetWidth<=1&&gO.offsetHeight>2&&!(dS&&l<8)}}var gN=ga?gv("span","\u200b"):gv("span","\u00a0",null,"display: inline-block; width: 1px; margin-right: -1px");gN.setAttribute("cm-text","");return gN}var gb;function bR(gP){if(gb!=null){return gb}var i=bV(gP,document.createTextNode("A\u062eA"));var gO=cr(i,0,1).getBoundingClientRect();var gN=cr(i,1,2).getBoundingClientRect();eb(gP);if(!gO||gO.left==gO.right){return false}return gb=(gN.right-gO.right<3)}var gh="\n\nb".split(/\n/).length!=3?function(gR){var gS=0,i=[],gQ=gR.length;while(gS<=gQ){var gP=gR.indexOf("\n",gS);if(gP==-1){gP=gR.length}var gO=gR.slice(gS,gR.charAt(gP-1)=="\r"?gP-1:gP);var gN=gO.indexOf("\r");if(gN!=-1){i.push(gO.slice(0,gN));gS+=gN+1}else{i.push(gO);gS=gP+1}}return i}:function(i){return i.split(/\r\n?|\n/)};var bu=window.getSelection?function(gN){try{return gN.selectionStart!=gN.selectionEnd}catch(i){return false}}:function(gO){var gN;try{gN=gO.ownerDocument.selection.createRange()}catch(i){}if(!gN||gN.parentElement()!=gO){return false}return gN.compareEndPoints("StartToEnd",gN)!=0};var dh=(function(){var i=gv("div");if("oncopy" in i){return true}i.setAttribute("oncopy","return;");return typeof i.oncopy=="function"})();var fq=null;function aL(gN){if(fq!=null){return fq}var gO=bV(gN,gv("span","x"));var gP=gO.getBoundingClientRect();var i=cr(gO,0,1).getBoundingClientRect();return fq=Math.abs(gP.left-i.left)>1}var dA={};var aS={};function eG(i,gN){if(arguments.length>2){gN.dependencies=Array.prototype.slice.call(arguments,2)}dA[i]=gN}function bo(gN,i){aS[gN]=i}function gE(i){if(typeof i=="string"&&aS.hasOwnProperty(i)){i=aS[i]}else{if(i&&typeof i.name=="string"&&aS.hasOwnProperty(i.name)){var gN=aS[i.name];if(typeof gN=="string"){gN={name:gN}}i=cp(gN,i);i.name=gN.name}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(i)){return gE("application/xml")}else{if(typeof i=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(i)){return gE("application/json")}}}}if(typeof i=="string"){return{name:i}}else{return i||{name:"null"}}}function fV(gO,gN){gN=gE(gN);var gQ=dA[gN.name];if(!gQ){return fV(gO,"text/plain")}var gR=gQ(gO,gN);if(dx.hasOwnProperty(gN.name)){var gP=dx[gN.name];for(var gS in gP){if(!gP.hasOwnProperty(gS)){continue}if(gR.hasOwnProperty(gS)){gR["_"+gS]=gR[gS]}gR[gS]=gP[gS]}}gR.name=gN.name;if(gN.helperType){gR.helperType=gN.helperType}if(gN.modeProps){for(var i in gN.modeProps){gR[i]=gN.modeProps[i]}}return gR}var dx={};function eS(gO,gN){var i=dx.hasOwnProperty(gO)?dx[gO]:(dx[gO]={});aN(gN,i)}function b7(gP,i){if(i===true){return i}if(gP.copyState){return gP.copyState(i)}var gO={};for(var gQ in i){var gN=i[gQ];if(gN instanceof Array){gN=gN.concat([])}gO[gQ]=gN}return gO}function gA(gO,i){var gN;while(gO.innerMode){gN=gO.innerMode(i);if(!gN||gN.mode==gO){break}i=gN.state;gO=gN.mode}return gN||{mode:gO,state:i}}function b4(gO,gN,i){return gO.startState?gO.startState(gN,i):true}var fb=function(i,gN){this.pos=this.start=0;this.string=i;this.tabSize=gN||8;this.lastColumnPos=this.lastColumnValue=0;this.lineStart=0};fb.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||undefined},next:function(){if(this.pos<this.string.length){return this.string.charAt(this.pos++)}},eat:function(i){var gO=this.string.charAt(this.pos);var gN;if(typeof i=="string"){gN=gO==i}else{gN=gO&&(i.test?i.test(gO):i(gO))}if(gN){++this.pos;return gO}},eatWhile:function(i){var gN=this.pos;while(this.eat(i)){}return this.pos>gN},eatSpace:function(){var gN=this;var i=this.pos;while(/[\s\u00a0]/.test(this.string.charAt(this.pos))){++gN.pos}return this.pos>i},skipToEnd:function(){this.pos=this.string.length},skipTo:function(i){var gN=this.string.indexOf(i,this.pos);if(gN>-1){this.pos=gN;return true}},backUp:function(i){this.pos-=i},column:function(){if(this.lastColumnPos<this.start){this.lastColumnValue=bU(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue);this.lastColumnPos=this.start}return this.lastColumnValue-(this.lineStart?bU(this.string,this.lineStart,this.tabSize):0)},indentation:function(){return bU(this.string,null,this.tabSize)-(this.lineStart?bU(this.string,this.lineStart,this.tabSize):0)},match:function(gQ,gN,i){if(typeof gQ=="string"){var gR=function(gS){return i?gS.toLowerCase():gS};var gP=this.string.substr(this.pos,gQ.length);if(gR(gP)==gR(gQ)){if(gN!==false){this.pos+=gQ.length}return true}}else{var gO=this.string.slice(this.pos).match(gQ);if(gO&&gO.index>0){return null}if(gO&&gN!==false){this.pos+=gO[0].length}return gO}},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(gN,i){this.lineStart+=gN;try{return i()}finally{this.lineStart-=gN}}};function fT(i,gO,gS,gR){var gQ=[i.state.modeGen],gP={};w(i,gO.text,i.doc.mode,gS,function(gU,gV){return gQ.push(gU,gV)},gP,gR);var gN=function(gX){var gV=i.state.overlays[gX],gW=1,gU=0;w(i,gO.text,gV.mode,true,function(gY,g0){var g2=gW;while(gU<gY){var gZ=gQ[gW];if(gZ>gY){gQ.splice(gW,1,gY,gQ[gW+1],gZ)}gW+=2;gU=Math.min(gY,gZ)}if(!g0){return}if(gV.opaque){gQ.splice(g2,gW-g2,gY,"overlay "+g0);gW=g2+2}else{for(;g2<gW;g2+=2){var g1=gQ[g2+1];gQ[g2+1]=(g1?g1+" ":"")+"overlay "+g0}}},gP)};for(var gT=0;gT<i.state.overlays.length;++gT){gN(gT)}return{styles:gQ,classes:gP.bgClass||gP.textClass?gP:null}}function de(gN,gO,gQ){if(!gO.styles||gO.styles[0]!=gN.state.modeGen){var gP=dK(gN,bQ(gO));var i=fT(gN,gO,gO.text.length>gN.options.maxHighlightLength?b7(gN.doc.mode,gP):gP);gO.stateAfter=gP;gO.styles=i.styles;if(i.classes){gO.styleClasses=i.classes}else{if(gO.styleClasses){gO.styleClasses=null}}if(gQ===gN.doc.frontier){gN.doc.frontier++}}return gO.styles}function dK(i,gS,gN){var gQ=i.doc,gP=i.display;if(!gQ.mode.startState){return true}var gR=cD(i,gS,gN),gO=gR>gQ.first&&fy(gQ,gR-1).stateAfter;if(!gO){gO=b4(gQ.mode)}else{gO=b7(gQ.mode,gO)}gQ.iter(gR,gS,function(gT){dF(i,gT.text,gO);var gU=gR==gS-1||gR%5==0||gR>=gP.viewFrom&&gR<gP.viewTo;gT.stateAfter=gU?b7(gQ.mode,gO):null;++gR});if(gN){gQ.frontier=gR}return gO}function dF(i,gR,gO,gN){var gQ=i.doc.mode;var gP=new fb(gR,i.options.tabSize);gP.start=gP.pos=gN||0;if(gR==""){fJ(gQ,gO)}while(!gP.eol()){eQ(gQ,gP,gO);gP.start=gP.pos}}function fJ(gO,gN){if(gO.blankLine){return gO.blankLine(gN)}if(!gO.innerMode){return}var i=gA(gO,gN);if(i.mode.blankLine){return i.mode.blankLine(i.state)}}function eQ(gS,gR,gQ,gN){for(var gO=0;gO<10;gO++){if(gN){gN[0]=gA(gS,gQ).mode}var gP=gS.token(gR,gQ);if(gR.pos>gR.start){return gP}}throw new Error("Mode "+gS.name+" failed to advance stream.")}function cv(gV,gT,gQ,gP){var i=function(gY){return({start:gW.start,end:gW.pos,string:gW.current(),type:gO||null,state:gY?b7(gU.mode,gN):gN})};var gU=gV.doc,gR=gU.mode,gO;gT=f7(gU,gT);var gX=fy(gU,gT.line),gN=dK(gV,gT.line,gQ);var gW=new fb(gX.text,gV.options.tabSize),gS;if(gP){gS=[]}while((gP||gW.pos<gT.ch)&&!gW.eol()){gW.start=gW.pos;gO=eQ(gR,gW,gN);if(gP){gS.push(i(true))}}return gP?gS:i()}function ds(gO,gN){if(gO){for(;;){var i=gO.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!i){break}gO=gO.slice(0,i.index)+gO.slice(i.index+i[0].length);var gP=i[1]?"bgClass":"textClass";if(gN[gP]==null){gN[gP]=i[2]}else{if(!(new RegExp("(?:^|s)"+i[2]+"(?:$|s)")).test(gN[gP])){gN[gP]+=" "+i[2]}}}}return gO}function w(gW,gY,gR,gN,gS,gP,gQ){var gO=gR.flattenSpans;if(gO==null){gO=gW.options.flattenSpans}var gU=0,gT=null;var gX=new fb(gY,gW.options.tabSize),i;var g0=gW.options.addModeClass&&[null];if(gY==""){ds(fJ(gR,gN),gP)}while(!gX.eol()){if(gX.pos>gW.options.maxHighlightLength){gO=false;if(gQ){dF(gW,gY,gN,gX.pos)}gX.pos=gY.length;i=null}else{i=ds(eQ(gR,gX,gN,g0),gP)}if(g0){var gZ=g0[0].name;if(gZ){i="m-"+(i?gZ+" "+i:gZ)}}if(!gO||gT!=i){while(gU<gX.start){gU=Math.min(gX.start,gU+5000);gS(gU,gT)}gT=i}gX.start=gX.pos}while(gU<gX.pos){var gV=Math.min(gX.pos,gU+5000);gS(gV,gT);gU=gV}}function cD(gS,i,gP){var gN,gQ,gR=gS.doc;var gO=gP?-1:i-(gS.doc.mode.innerMode?1000:100);for(var gV=i;gV>gO;--gV){if(gV<=gR.first){return gR.first}var gU=fy(gR,gV-1);if(gU.stateAfter&&(!gP||gV<=gR.frontier)){return gV}var gT=bU(gU.text,null,gS.options.tabSize);if(gQ==null||gN>gT){gQ=gV-1;gN=gT}}return gQ}function gy(gO,gN,i){this.text=gO;c9(this,gN);this.height=i?i(this):1}bC(gy);gy.prototype.lineNo=function(){return bQ(this)};function ez(gN,gQ,gO,i){gN.text=gQ;if(gN.stateAfter){gN.stateAfter=null}if(gN.styles){gN.styles=null}if(gN.order!=null){gN.order=null}gB(gN);c9(gN,gO);var gP=i?i(gN):1;if(gP!=gN.height){gz(gN,gP)}}function bE(i){i.parent=null;gB(i)}var d5={};var b6={};function fe(gO,gN){if(!gO||/^\s*$/.test(gO)){return null}var i=gN.addModeClass?b6:d5;return i[gO]||(i[gO]=gO.replace(/\S+/g,"cm-$&"))}function e9(gT,gS){var gR=gv("span",null,null,c6?"padding-right: .1px":null);var gQ={pre:gv("pre",[gR],"CodeMirror-line"),content:gR,col:0,pos:0,cm:gT,trailingSpace:false,splitSpaces:(dS||c6)&&gT.getOption("lineWrapping")};gS.measure={};for(var gP=0;gP<=(gS.rest?gS.rest.length:0);gP++){var gV=gP?gS.rest[gP-1]:gS.line,gO=void 0;gQ.pos=0;gQ.addToken=t;if(bR(gT.display.measure)&&(gO=a(gV))){gQ.addToken=T(gQ.addToken,gO)}gQ.map=[];var gN=gS!=gT.display.externalMeasured&&bQ(gV);bq(gV,gQ,de(gT,gV,gN));if(gV.styleClasses){if(gV.styleClasses.bgClass){gQ.bgClass=gl(gV.styleClasses.bgClass,gQ.bgClass||"")}if(gV.styleClasses.textClass){gQ.textClass=gl(gV.styleClasses.textClass,gQ.textClass||"")}}if(gQ.map.length==0){gQ.map.push(0,0,gQ.content.appendChild(bp(gT.display.measure)))}if(gP==0){gS.measure.map=gQ.map;gS.measure.cache={}}else{(gS.measure.maps||(gS.measure.maps=[])).push(gQ.map);(gS.measure.caches||(gS.measure.caches=[])).push({})}}if(c6){var gU=gQ.content.lastChild;if(/\bcm-tab\b/.test(gU.className)||(gU.querySelector&&gU.querySelector(".cm-tab"))){gQ.content.className="cm-tab-wrap-hack"}}aE(gT,"renderLine",gT,gS.line,gQ.pre);if(gQ.pre.className){gQ.textClass=gl(gQ.pre.className,gQ.textClass||"")}return gQ}function fx(gN){var i=gv("span","\u2022","cm-invalidchar");i.title="\\u"+gN.charCodeAt(0).toString(16);i.setAttribute("aria-label",i.title);return i}function t(gX,gS,g2,gZ,gV,g5,gR){if(!gS){return}var g1=gX.splitSpaces?cK(gS,gX.trailingSpace):gS;var i=gX.cm.state.specialChars,gN=false;var g0;if(!i.test(gS)){gX.col+=gS.length;g0=document.createTextNode(g1);gX.map.push(gX.pos,gX.pos+gS.length,g0);if(dS&&l<9){gN=true}gX.pos+=gS.length}else{g0=document.createDocumentFragment();var gP=0;while(true){i.lastIndex=gP;var gY=i.exec(gS);var g4=gY?gY.index-gP:gS.length-gP;if(g4){var gU=document.createTextNode(g1.slice(gP,gP+g4));if(dS&&l<9){g0.appendChild(gv("span",[gU]))}else{g0.appendChild(gU)}gX.map.push(gX.pos,gX.pos+g4,gU);gX.col+=g4;gX.pos+=g4}if(!gY){break}gP+=g4+1;var g3=void 0;if(gY[0]=="\t"){var gW=gX.cm.options.tabSize,gT=gW-gX.col%gW;g3=g0.appendChild(gv("span",cu(gT),"cm-tab"));g3.setAttribute("role","presentation");g3.setAttribute("cm-text","\t");gX.col+=gT}else{if(gY[0]=="\r"||gY[0]=="\n"){g3=g0.appendChild(gv("span",gY[0]=="\r"?"\u240d":"\u2424","cm-invalidchar"));g3.setAttribute("cm-text",gY[0]);gX.col+=1}else{g3=gX.cm.options.specialCharPlaceholder(gY[0]);g3.setAttribute("cm-text",gY[0]);if(dS&&l<9){g0.appendChild(gv("span",[g3]))}else{g0.appendChild(g3)}gX.col+=1}}gX.map.push(gX.pos,gX.pos+1,g3);gX.pos++}}gX.trailingSpace=g1.charCodeAt(gS.length-1)==32;if(g2||gZ||gV||gN||gR){var gO=g2||"";if(gZ){gO+=gZ}if(gV){gO+=gV}var gQ=gv("span",[g0],gO,gR);if(g5){gQ.title=g5}return gX.content.appendChild(gQ)}gX.content.appendChild(g0)}function cK(gS,gR){if(gS.length>1&&!/ /.test(gS)){return gS}var gO=gR,gN="";for(var gP=0;gP<gS.length;gP++){var gQ=gS.charAt(gP);if(gQ==" "&&gO&&(gP==gS.length-1||gS.charCodeAt(gP+1)==32)){gQ="\u00a0"}gN+=gQ;gO=gQ==" "}return gN}function T(gN,i){return function(gV,gX,gO,gS,gY,gW,gU){gO=gO?gO+" cm-force-border":"cm-force-border";var gP=gV.pos,gR=gP+gX.length;for(;;){var gQ=void 0;for(var gT=0;gT<i.length;gT++){gQ=i[gT];if(gQ.to>gP&&gQ.from<=gP){break}}if(gQ.to>=gR){return gN(gV,gX,gO,gS,gY,gW,gU)}gN(gV,gX.slice(0,gQ.to-gP),gO,gS,null,gW,gU);gS=null;gX=gX.slice(gQ.to-gP);gP=gQ.to}}}function ac(gN,gP,i,gO){var gQ=!gO&&i.widgetNode;if(gQ){gN.map.push(gN.pos,gN.pos+gP,gQ)}if(!gO&&gN.cm.display.input.needsContentAttribute){if(!gQ){gQ=gN.content.appendChild(document.createElement("span"))}gQ.setAttribute("cm-marker",i.id)}if(gQ){gN.cm.display.input.setUneditable(gQ);gN.content.appendChild(gQ)}gN.pos+=gP;gN.trailingSpace=false}function bq(gY,g5,gX){var gS=gY.markedSpans,gV=gY.text,g3=0;if(!gS){for(var gT=1;gT<gX.length;gT+=2){g5.addToken(g5,gV.slice(g3,g3=gX[gT]),fe(gX[gT+1],g5.cm.options))}return}var g9=gV.length,gR=0,g8=1,g1="",ha,gZ;var he=0,gN,hd,g2,hf,gP;for(;;){if(he==gR){gN=hd=g2=hf=gZ="";gP=null;he=Infinity;var gU=[],gW=void 0;for(var g6=0;g6<gS.length;++g6){var g7=gS[g6],g4=g7.marker;if(g4.type=="bookmark"&&g7.from==gR&&g4.widgetNode){gU.push(g4)}else{if(g7.from<=gR&&(g7.to==null||g7.to>gR||g4.collapsed&&g7.to==gR&&g7.from==gR)){if(g7.to!=null&&g7.to!=gR&&he>g7.to){he=g7.to;hd=""}if(g4.className){gN+=" "+g4.className}if(g4.css){gZ=(gZ?gZ+";":"")+g4.css}if(g4.startStyle&&g7.from==gR){g2+=" "+g4.startStyle}if(g4.endStyle&&g7.to==he){(gW||(gW=[])).push(g4.endStyle,g7.to)}if(g4.title&&!hf){hf=g4.title}if(g4.collapsed&&(!gP||d0(gP.marker,g4)<0)){gP=g7}}else{if(g7.from>gR&&he>g7.from){he=g7.from}}}}if(gW){for(var hc=0;hc<gW.length;hc+=2){if(gW[hc+1]==he){hd+=" "+gW[hc]}}}if(!gP||gP.from==gR){for(var hb=0;hb<gU.length;++hb){ac(g5,0,gU[hb])}}if(gP&&(gP.from||0)==gR){ac(g5,(gP.to==null?g9+1:gP.to)-gR,gP.marker,gP.from==null);if(gP.to==null){return}if(gP.to==gR){gP=false}}}if(gR>=g9){break}var g0=Math.min(g9,he);while(true){if(g1){var gO=gR+g1.length;if(!gP){var gQ=gO>g0?g1.slice(0,g0-gR):g1;g5.addToken(g5,gQ,ha?ha+gN:gN,g2,gR+gQ.length==he?hd:"",hf,gZ)}if(gO>=g0){g1=g1.slice(g0-gR);gR=g0;break}gR=gO;g2=""}g1=gV.slice(g3,g3=gX[g8++]);ha=fe(gX[g8++],g5.cm.options)}}}function bx(gO,i,gN){this.line=i;this.rest=g(i);this.size=this.rest?bQ(f2(this.rest))-gN+1:1;this.node=this.text=null;this.hidden=fP(gO,i)}function fd(i,gS,gR){var gQ=[],gO;for(var gP=gS;gP<gR;gP=gO){var gN=new bx(i.doc,fy(i.doc,gP),gP);gO=gP+gN.size;gQ.push(gN)}return gQ}var br=null;function eM(i){if(br){br.ops.push(i)}else{i.ownsGroup=br={ops:[i],delayedCallbacks:[]}}}function c0(gQ){var gP=gQ.delayedCallbacks,gO=0;do{for(;gO<gP.length;gO++){gP[gO].call(null)}for(var gN=0;gN<gQ.ops.length;gN++){var gR=gQ.ops[gN];if(gR.cursorActivityHandlers){while(gR.cursorActivityCalled<gR.cursorActivityHandlers.length){gR.cursorActivityHandlers[gR.cursorActivityCalled++].call(null,gR.cm)}}}}while(gO<gP.length)}function b1(gO,gN){var i=gO.ownsGroup;if(!i){return}try{c0(i)}finally{br=null;gN(i)}}var bB=null;function ad(gT,gR){var gN=ew(gT,gR);if(!gN.length){return}var gP=Array.prototype.slice.call(arguments,2),gS;if(br){gS=br.delayedCallbacks}else{if(bB){gS=bB}else{gS=bB=[];setTimeout(aM,0)}}var gO=function(gU){gS.push(function(){return gN[gU].apply(null,gP)})};for(var gQ=0;gQ<gN.length;++gQ){gO(gQ)}}function aM(){var gN=bB;bB=null;for(var gO=0;gO<gN.length;++gO){gN[gO]()}}function aa(i,gO,gQ,gR){for(var gN=0;gN<gO.changes.length;gN++){var gP=gO.changes[gN];if(gP=="text"){fF(i,gO)}else{if(gP=="gutter"){dn(i,gO,gQ,gR)}else{if(gP=="class"){dO(gO)}else{if(gP=="widget"){an(i,gO,gR)}}}}}gO.changes=null}function f4(i){if(i.node==i.text){i.node=gv("div",null,null,"position: relative");if(i.text.parentNode){i.text.parentNode.replaceChild(i.node,i.text)}i.node.appendChild(i.text);if(dS&&l<8){i.node.style.zIndex=2}}return i.node}function eI(gN){var i=gN.bgClass?gN.bgClass+" "+(gN.line.bgClass||""):gN.line.bgClass;if(i){i+=" CodeMirror-linebackground"}if(gN.background){if(i){gN.background.className=i}else{gN.background.parentNode.removeChild(gN.background);gN.background=null}}else{if(i){var gO=f4(gN);gN.background=gO.insertBefore(gv("div",null,i),gO.firstChild)}}}function d4(i,gN){var gO=i.display.externalMeasured;if(gO&&gO.line==gN.line){i.display.externalMeasured=null;gN.measure=gO.measure;return gO.built}return e9(i,gN)}function fF(i,gP){var gN=gP.text.className;var gO=d4(i,gP);if(gP.text==gP.node){gP.node=gO.pre}gP.text.parentNode.replaceChild(gO.pre,gP.text);gP.text=gO.pre;if(gO.bgClass!=gP.bgClass||gO.textClass!=gP.textClass){gP.bgClass=gO.bgClass;gP.textClass=gO.textClass;dO(gP)}else{if(gN){gP.text.className=gN}}}function dO(gN){eI(gN);if(gN.line.wrapClass){f4(gN).className=gN.line.wrapClass}else{if(gN.node!=gN.text){gN.node.className=""}}var i=gN.textClass?gN.textClass+" "+(gN.line.textClass||""):gN.line.textClass;gN.text.className=i||""}function dn(gU,gS,gR,gT){if(gS.gutter){gS.node.removeChild(gS.gutter);gS.gutter=null}if(gS.gutterBackground){gS.node.removeChild(gS.gutterBackground);gS.gutterBackground=null}if(gS.line.gutterClass){var gN=f4(gS);gS.gutterBackground=gv("div",null,"CodeMirror-gutter-background "+gS.line.gutterClass,("left: "+(gU.options.fixedGutter?gT.fixedPos:-gT.gutterTotalWidth)+"px; width: "+(gT.gutterTotalWidth)+"px"));gN.insertBefore(gS.gutterBackground,gS.text)}var gP=gS.line.gutterMarkers;if(gU.options.lineNumbers||gP){var gV=f4(gS);var gQ=gS.gutter=gv("div",null,"CodeMirror-gutter-wrapper",("left: "+(gU.options.fixedGutter?gT.fixedPos:-gT.gutterTotalWidth)+"px"));gU.display.input.setUneditable(gQ);gV.insertBefore(gQ,gS.text);if(gS.line.gutterClass){gQ.className+=" "+gS.line.gutterClass}if(gU.options.lineNumbers&&(!gP||!gP["CodeMirror-linenumbers"])){gS.lineNumber=gQ.appendChild(gv("div",eF(gU.options,gR),"CodeMirror-linenumber CodeMirror-gutter-elt",("left: "+(gT.gutterLeft["CodeMirror-linenumbers"])+"px; width: "+(gU.display.lineNumInnerWidth)+"px")))}if(gP){for(var gO=0;gO<gU.options.gutters.length;++gO){var i=gU.options.gutters[gO],gW=gP.hasOwnProperty(i)&&gP[i];if(gW){gQ.appendChild(gv("div",[gW],"CodeMirror-gutter-elt",("left: "+(gT.gutterLeft[i])+"px; width: "+(gT.gutterWidth[i])+"px")))}}}}}function an(i,gN,gQ){if(gN.alignable){gN.alignable=null}for(var gP=gN.node.firstChild,gO=void 0;gP;gP=gO){gO=gP.nextSibling;if(gP.className=="CodeMirror-linewidget"){gN.node.removeChild(gP)}}fM(i,gN,gQ)}function aF(i,gO,gP,gQ){var gN=d4(i,gO);gO.text=gO.node=gN.pre;if(gN.bgClass){gO.bgClass=gN.bgClass}if(gN.textClass){gO.textClass=gN.textClass}dO(gO);dn(i,gO,gP,gQ);fM(i,gO,gQ);return gO.node}function fM(gN,gP,gQ){gx(gN,gP.line,gP,gQ,true);if(gP.rest){for(var gO=0;gO<gP.rest.length;gO++){gx(gN,gP.rest[gO],gP,gQ,false)}}}function gx(gV,gW,gS,gU,gQ){if(!gW.widgets){return}var gN=f4(gS);for(var gP=0,gT=gW.widgets;gP<gT.length;++gP){var gR=gT[gP],gO=gv("div",[gR.node],"CodeMirror-linewidget");if(!gR.handleMouseEvents){gO.setAttribute("cm-ignore-events","true")}bI(gR,gO,gS,gU);gV.display.input.setUneditable(gO);if(gQ&&gR.above){gN.insertBefore(gO,gS.gutter||gS.text)}else{gN.appendChild(gO)}ad(gR,"redraw")}}function bI(gP,gO,i,gQ){if(gP.noHScroll){(i.alignable||(i.alignable=[])).push(gO);var gN=gQ.wrapperWidth;gO.style.left=gQ.fixedPos+"px";if(!gP.coverGutter){gN-=gQ.gutterTotalWidth;gO.style.paddingLeft=gQ.gutterTotalWidth+"px"}gO.style.width=gN+"px"}if(gP.coverGutter){gO.style.zIndex=5;gO.style.position="relative";if(!gP.noHScroll){gO.style.marginLeft=-gQ.gutterTotalWidth+"px"}}}function c4(gO){if(gO.height!=null){return gO.height}var i=gO.doc.cm;if(!i){return 0}if(!gD(document.body,gO.node)){var gN="position: relative;";if(gO.coverGutter){gN+="margin-left: -"+i.display.gutters.offsetWidth+"px;"}if(gO.noHScroll){gN+="width: "+i.display.wrapper.clientWidth+"px;"}bV(i.display.measure,gv("div",[gO.node],null,gN))}return gO.height=gO.node.parentNode.offsetHeight}function bb(gN,i){for(var gO=K(i);gO!=gN.wrapper;gO=gO.parentNode){if(!gO||(gO.nodeType==1&&gO.getAttribute("cm-ignore-events")=="true")||(gO.parentNode==gN.sizer&&gO!=gN.mover)){return true}}}function fs(i){return i.lineSpace.offsetTop}function bL(i){return i.mover.offsetHeight-i.lineSpace.offsetHeight}function fo(gP){if(gP.cachedPaddingH){return gP.cachedPaddingH}var gO=bV(gP.measure,gv("pre","x"));var i=window.getComputedStyle?window.getComputedStyle(gO):gO.currentStyle;var gN={left:parseInt(i.paddingLeft),right:parseInt(i.paddingRight)};if(!isNaN(gN.left)&&!isNaN(gN.right)){gP.cachedPaddingH=gN}return gN}function cZ(i){return dR-i.display.nativeBarWidth}function du(i){return i.display.scroller.clientWidth-cZ(i)-i.display.barWidth}function c1(i){return i.display.scroller.clientHeight-cZ(i)-i.display.barHeight}function cm(gU,gQ,gT){var gP=gU.options.lineWrapping;var gR=gP&&du(gU);if(!gQ.measure.heights||gP&&gQ.measure.width!=gR){var gS=gQ.measure.heights=[];if(gP){gQ.measure.width=gR;var gW=gQ.text.firstChild.getClientRects();for(var gN=0;gN<gW.length-1;gN++){var gV=gW[gN],gO=gW[gN+1];if(Math.abs(gV.bottom-gO.bottom)>2){gS.push((gV.bottom+gO.top)/2-gT.top)}}}gS.push(gT.bottom-gT.top)}}function cy(gP,gN,gQ){if(gP.line==gN){return{map:gP.measure.map,cache:gP.measure.cache}}for(var gO=0;gO<gP.rest.length;gO++){if(gP.rest[gO]==gN){return{map:gP.measure.maps[gO],cache:gP.measure.caches[gO]}}}for(var gR=0;gR<gP.rest.length;gR++){if(bQ(gP.rest[gR])>gQ){return{map:gP.measure.maps[gR],cache:gP.measure.caches[gR],before:true}}}}function c8(i,gO){gO=y(gO);var gQ=bQ(gO);var gN=i.display.externalMeasured=new bx(i.doc,gO,gQ);gN.lineN=gQ;var gP=gN.built=e9(i,gN);gN.text=gP.pre;bV(i.display.lineMeasure,gP.pre);return gN}function es(i,gN,gP,gO){return C(i,a5(i,gN),gP,gO)}function fv(i,gO){if(gO>=i.display.viewFrom&&gO<i.display.viewTo){return i.display.view[dz(i,gO)]}var gN=i.display.externalMeasured;if(gN&&gO>=gN.lineN&&gO<gN.lineN+gN.size){return gN}}function a5(i,gO){var gP=bQ(gO);var gN=fv(i,gP);if(gN&&!gN.text){gN=null}else{if(gN&&gN.changes){aa(i,gN,gP,fw(i));i.curOp.forceUpdate=true}}if(!gN){gN=c8(i,gO)}var gQ=cy(gN,gO,gP);return{line:gO,view:gN,rect:null,map:gQ.map,cache:gQ.cache,before:gQ.before,hasHeights:false}}function C(i,gS,gQ,gN,gP){if(gS.before){gQ=-1}var gO=gQ+(gN||""),gR;if(gS.cache.hasOwnProperty(gO)){gR=gS.cache[gO]}else{if(!gS.rect){gS.rect=gS.view.text.getBoundingClientRect()}if(!gS.hasHeights){cm(i,gS.view,gS.rect);gS.hasHeights=true}gR=k(i,gS,gQ,gN);if(!gR.bogus){gS.cache[gO]=gR}}return{left:gR.left,right:gR.right,top:gP?gR.rtop:gR.top,bottom:gP?gR.rbottom:gR.bottom}}var eP={left:0,right:0,top:0,bottom:0};function aK(gW,gN,gT){var gP,gO,gR,gU,gQ,gV;for(var gS=0;gS<gW.length;gS+=3){gQ=gW[gS];gV=gW[gS+1];if(gN<gQ){gO=0;gR=1;gU="left"}else{if(gN<gV){gO=gN-gQ;gR=gO+1}else{if(gS==gW.length-3||gN==gV&&gW[gS+3]>gN){gR=gV-gQ;gO=gR-1;if(gN>=gV){gU="right"}}}}if(gO!=null){gP=gW[gS+2];if(gQ==gV&&gT==(gP.insertLeft?"left":"right")){gU=gT}if(gT=="left"&&gO==0){while(gS&&gW[gS-2]==gW[gS-3]&&gW[gS-1].insertLeft){gP=gW[(gS-=3)+2];gU="left"}}if(gT=="right"&&gO==gV-gQ){while(gS<gW.length-3&&gW[gS+3]==gW[gS+4]&&!gW[gS+5].insertLeft){gP=gW[(gS+=3)+2];gU="right"}}break}}return{node:gP,start:gO,end:gR,collapse:gU,coverStart:gQ,coverEnd:gV}}function fa(gO,gN){var gQ=eP;if(gN=="left"){for(var gP=0;gP<gO.length;gP++){if((gQ=gO[gP]).left!=gQ.right){break}}}else{for(var gR=gO.length-1;gR>=0;gR--){if((gQ=gO[gR]).left!=gQ.right){break}}}return gQ}function k(gV,g5,gY,gS){var gW=aK(g5.map,gY,gS);var g3=gW.node,gR=gW.start,gQ=gW.end,gN=gW.collapse;var gO;if(g3.nodeType==3){for(var gT=0;gT<4;gT++){while(gR&&fI(g5.line.text.charAt(gW.coverStart+gR))){--gR}while(gW.coverStart+gQ<gW.coverEnd&&fI(g5.line.text.charAt(gW.coverStart+gQ))){++gQ}if(dS&&l<9&&gR==0&&gQ==gW.coverEnd-gW.coverStart){gO=g3.parentNode.getBoundingClientRect()}else{gO=fa(cr(g3,gR,gQ).getClientRects(),gS)}if(gO.left||gO.right||gR==0){break}gQ=gR;gR=gR-1;gN="right"}if(dS&&l<11){gO=e4(gV.display.measure,gO)}}else{if(gR>0){gN=gS="right"}var gP;if(gV.options.lineWrapping&&(gP=g3.getClientRects()).length>1){gO=gP[gS=="right"?gP.length-1:0]}else{gO=g3.getBoundingClientRect()}}if(dS&&l<9&&!gR&&(!gO||!gO.left&&!gO.right)){var gU=g3.parentNode.getClientRects()[0];if(gU){gO={left:gU.left,right:gU.left+dL(gV.display),top:gU.top,bottom:gU.bottom}}else{gO=eP}}var g1=gO.top-g5.rect.top,gZ=gO.bottom-g5.rect.top;var g7=(g1+gZ)/2;var g6=g5.view.measure.heights;var g4=0;for(;g4<g6.length-1;g4++){if(g7<g6[g4]){break}}var g2=g4?g6[g4-1]:0,g0=g6[g4];var gX={left:(gN=="right"?gO.right:gO.left)-g5.rect.left,right:(gN=="left"?gO.left:gO.right)-g5.rect.left,top:g2,bottom:g0};if(!gO.left&&!gO.right){gX.bogus=true}if(!gV.options.singleCursorHeightPerLine){gX.rtop=g1;gX.rbottom=gZ}return gX}function e4(gO,gP){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!aL(gO)){return gP}var gN=screen.logicalXDPI/screen.deviceXDPI;var i=screen.logicalYDPI/screen.deviceYDPI;return{left:gP.left*gN,right:gP.right*gN,top:gP.top*i,bottom:gP.bottom*i}}function au(gO){if(gO.measure){gO.measure.cache={};gO.measure.heights=null;if(gO.rest){for(var gN=0;gN<gO.rest.length;gN++){gO.measure.caches[gN]={}}}}}function aO(gN){gN.display.externalMeasure=null;eb(gN.display.lineMeasure);for(var gO=0;gO<gN.display.view.length;gO++){au(gN.display.view[gO])}}function ai(i){aO(i);i.display.cachedCharWidth=i.display.cachedTextHeight=i.display.cachedPaddingH=null;if(!i.options.lineWrapping){i.display.maxLineChanged=true}i.display.lineNumChars=null}function cz(){return window.pageXOffset||(document.documentElement||document.body).scrollLeft}function cx(){return window.pageYOffset||(document.documentElement||document.body).scrollTop}function e7(gU,gR,gT,gO,gQ){if(!gQ&&gR.widgets){for(var gP=0;gP<gR.widgets.length;++gP){if(gR.widgets[gP].above){var gW=c4(gR.widgets[gP]);gT.top+=gW;gT.bottom+=gW}}}if(gO=="line"){return gT}if(!gO){gO="local"}var gS=bP(gR);if(gO=="local"){gS+=fs(gU.display)}else{gS-=gU.display.viewOffset}if(gO=="page"||gO=="window"){var gN=gU.display.lineSpace.getBoundingClientRect();gS+=gN.top+(gO=="window"?0:cx());var gV=gN.left+(gO=="window"?0:cz());gT.left+=gV;gT.right+=gV}gT.top+=gS;gT.bottom+=gS;return gT}function gI(gN,gQ,gO){if(gO=="div"){return gQ}var gS=gQ.left,gR=gQ.top;if(gO=="page"){gS-=cz();gR-=cx()}else{if(gO=="local"||!gO){var gP=gN.display.sizer.getBoundingClientRect();gS+=gP.left;gR+=gP.top}}var i=gN.display.lineSpace.getBoundingClientRect();return{left:gS-i.left,top:gR-i.top}}function cP(i,gQ,gP,gO,gN){if(!gO){gO=fy(i.doc,gQ.line)}return e7(i,gO,es(i,gO,gQ.ch,gN),gP)}function d3(gV,gU,gO,gS,gX,gT){gS=gS||fy(gV.doc,gU.line);if(!gX){gX=a5(gV,gS)}function gQ(g0,gZ){var gY=C(gV,gX,g0,gZ?"right":"left",gT);if(gZ){gY.left=gY.right}else{gY.right=gY.left}return e7(gV,gS,gY,gO)}function gW(g1,gY){var gZ=gR[gY],g0=gZ.level%2;if(g1==dH(gZ)&&gY&&gZ.level<gR[gY-1].level){gZ=gR[--gY];g1=gH(gZ)-(gZ.level%2?0:1);g0=true}else{if(g1==gH(gZ)&&gY<gR.length-1&&gZ.level<gR[gY+1].level){gZ=gR[++gY];g1=dH(gZ)-gZ.level%2;g0=false}}if(g0&&g1==gZ.to&&g1>gZ.from){return gQ(g1-1)}return gQ(g1,g0)}var gR=a(gS),i=gU.ch;if(!gR){return gQ(i)}var gN=aH(gR,i);var gP=gW(i,gN);if(fl!=null){gP.other=gW(i,fl)}return gP}function dP(i,gQ){var gP=0;gQ=f7(i.doc,gQ);if(!i.options.lineWrapping){gP=dL(i.display)*gQ.ch}var gN=fy(i.doc,gQ.line);var gO=bP(gN)+fs(i.display);return{left:gP,right:gP,top:gO,bottom:gO+gN.height}}function gt(i,gN,gO,gQ){var gP=V(i,gN);gP.xRel=gQ;if(gO){gP.outside=true}return gP}function ge(gT,gQ,gP){var gS=gT.doc;gP+=gT.display.viewOffset;if(gP<0){return gt(gS.first,0,true,-1)}var gO=bK(gS,gP),gU=gS.first+gS.size-1;if(gO>gU){return gt(gS.first+gS.size-1,fy(gS,gU).text.length,true,1)}if(gQ<0){gQ=0}var gN=fy(gS,gO);for(;;){var gV=c5(gT,gN,gO,gQ,gP);var gR=eJ(gN);var i=gR&&gR.find(0,true);if(gR&&(gV.ch>i.from.ch||gV.ch==i.from.ch&&gV.xRel>0)){gO=bQ(gN=i.to.line)}else{return gV}}}function c5(gX,gP,hc,gZ,gY){var gW=gY-bP(gP);var gT=false,g5=2*gX.display.wrapper.clientWidth;var g2=a5(gX,gP);function ha(i){var he=d3(gX,V(hc,i),"line",gP,g2);gT=true;if(gW>he.bottom){return he.left-g5}else{if(gW<he.top){return he.left+g5}else{gT=false}}return he.left}var g1=a(gP),g4=gP.text.length;var g6=cJ(gP),gQ=cY(gP);var g3=ha(g6),gN=gT,gO=ha(gQ),gS=gT;if(gZ>gO){return gt(hc,gQ,gS,1)}for(;;){if(g1?gQ==g6||gQ==u(gP,g6,1):gQ-g6<=1){var g0=gZ<g3||gZ-g3<=gO-gZ?g6:gQ;var hb=g0==g6?gN:gS;var g9=gZ-(g0==g6?g3:gO);if(gS&&!g1&&!/\s/.test(gP.text.charAt(g0))&&g9>0&&g0<gP.text.length&&g2.view.measure.heights.length>1){var g7=C(gX,g2,g0,"right");if(gW<=g7.bottom&&gW>=g7.top&&Math.abs(gZ-g7.right)<g9){hb=false;g0++;g9=gZ-g7.right}}while(fI(gP.text.charAt(g0))){++g0}var gV=gt(hc,g0,hb,g9<-1?-1:g9>1?1:0);return gV}var gU=Math.ceil(g4/2),hd=g6+gU;if(g1){hd=g6;for(var g8=0;g8<gU;++g8){hd=u(gP,hd,1)}}var gR=ha(hd);if(gR>gZ){gQ=hd;gO=gR;if(gS=gT){gO+=1000}g4=gU}else{g6=hd;g3=gR;gN=gT;g4-=gU}}}var aG;function aY(gP){if(gP.cachedTextHeight!=null){return gP.cachedTextHeight}if(aG==null){aG=gv("pre");for(var gO=0;gO<49;++gO){aG.appendChild(document.createTextNode("x"));aG.appendChild(gv("br"))}aG.appendChild(document.createTextNode("x"))}bV(gP.measure,aG);var gN=aG.offsetHeight/50;if(gN>3){gP.cachedTextHeight=gN}eb(gP.measure);return gN||1}function dL(gQ){if(gQ.cachedCharWidth!=null){return gQ.cachedCharWidth}var i=gv("span","xxxxxxxxxx");var gP=gv("pre",[i]);bV(gQ.measure,gP);var gO=i.getBoundingClientRect(),gN=(gO.right-gO.left)/10;if(gN>2){gQ.cachedCharWidth=gN}return gN||10}function fw(gN){var gS=gN.display,gQ={},gP={};var gR=gS.gutters.clientLeft;for(var gT=gS.gutters.firstChild,gO=0;gT;gT=gT.nextSibling,++gO){gQ[gN.options.gutters[gO]]=gT.offsetLeft+gT.clientLeft+gR;gP[gN.options.gutters[gO]]=gT.clientWidth}return{fixedPos:d7(gS),gutterTotalWidth:gS.gutters.offsetWidth,gutterLeft:gQ,gutterWidth:gP,wrapperWidth:gS.wrapper.clientWidth}}function d7(i){return i.scroller.getBoundingClientRect().left-i.sizer.getBoundingClientRect().left}function be(i){var gO=aY(i.display),gN=i.options.lineWrapping;var gP=gN&&Math.max(5,i.display.scroller.clientWidth/dL(i.display)-3);return function(gR){if(fP(i.doc,gR)){return 0}var gQ=0;if(gR.widgets){for(var gS=0;gS<gR.widgets.length;gS++){if(gR.widgets[gS].height){gQ+=gR.widgets[gS].height}}}if(gN){return gQ+(Math.ceil(gR.text.length/gP)||1)*gO}else{return gQ+gO}}}function X(i){var gO=i.doc,gN=be(i);gO.iter(function(gP){var gQ=gN(gP);if(gQ!=gP.height){gz(gP,gQ)}})}function cs(gV,gQ,gN,gO){var gR=gV.display;if(!gN&&K(gQ).getAttribute("cm-not-content")=="true"){return null}var gU,gS,i=gR.lineSpace.getBoundingClientRect();try{gU=gQ.clientX-i.left;gS=gQ.clientY-i.top}catch(gQ){return null}var gT=ge(gV,gU,gS),gW;if(gO&&gT.xRel==1&&(gW=fy(gV.doc,gT.line).text).length==gT.ch){var gP=bU(gW,gW.length,gV.options.tabSize)-gW.length;gT=V(gT.line,Math.max(0,Math.round((gU-fo(gV.display).left)/dL(gV.display))-gP))}return gT}function dz(gN,gQ){if(gQ>=gN.display.viewTo){return null}gQ-=gN.display.viewFrom;if(gQ<0){return null}var gO=gN.display.view;for(var gP=0;gP<gO.length;gP++){gQ-=gO[gP].size;if(gQ<0){return gP}}}function bF(i){i.display.input.showSelection(i.display.input.prepareSelection())}function f5(gT,gN){var gS=gT.doc,gV={};var gR=gV.cursors=document.createDocumentFragment();var gO=gV.selection=document.createDocumentFragment();for(var gQ=0;gQ<gS.sel.ranges.length;gQ++){if(gN===false&&gQ==gS.sel.primIndex){continue}var gU=gS.sel.ranges[gQ];if(gU.from().line>=gT.display.viewTo||gU.to().line<gT.display.viewFrom){continue}var gP=gU.empty();if(gP||gT.options.showCursorWhenSelecting){A(gT,gU.head,gR)}if(!gP){bG(gT,gU,gO)}}return gV}function A(i,gP,gO){var gR=d3(i,gP,"div",null,null,!i.options.singleCursorHeightPerLine);var gQ=gO.appendChild(gv("div","\u00a0","CodeMirror-cursor"));gQ.style.left=gR.left+"px";gQ.style.top=gR.top+"px";gQ.style.height=Math.max(0,gR.bottom-gR.top)*i.options.cursorHeight+"px";if(gR.other){var gN=gO.appendChild(gv("div","\u00a0","CodeMirror-cursor CodeMirror-secondarycursor"));gN.style.display="";gN.style.left=gR.other.left+"px";gN.style.top=gR.other.top+"px";gN.style.height=(gR.other.bottom-gR.other.top)*0.85+"px"}}function bG(gR,gQ,gS){var gZ=gR.display,g3=gR.doc;var i=document.createDocumentFragment();var gW=fo(gR.display),gP=gW.left;var g0=Math.max(gZ.sizerWidth,du(gR)-gZ.sizer.offsetLeft)-gW.right;function gX(g7,g6,g5,g4){if(g6<0){g6=0}g6=Math.round(g6);g4=Math.round(g4);i.appendChild(gv("div",null,"CodeMirror-selected",("position: absolute; left: "+g7+"px;\n top: "+g6+"px; width: "+(g5==null?g0-g7:g5)+"px;\n height: "+(g4-g6)+"px")))}function gN(g5,g7,ha){var g6=fy(g3,g5);var g8=g6.text.length;var hb,g4;function g9(hd,hc){return cP(gR,V(g5,hd),"div",g6,hc)}ee(a(g6),g7||0,ha==null?g8:ha,function(hj,hi,hc){var hf=g9(hj,"left"),hg,hh,he;if(hj==hi){hg=hf;hh=he=hf.left}else{hg=g9(hi-1,"right");if(hc=="rtl"){var hd=hf;hf=hg;hg=hd}hh=hf.left;he=hg.right}if(g7==null&&hj==0){hh=gP}if(hg.top-hf.top>3){gX(hh,hf.top,null,hf.bottom);hh=gP;if(hf.bottom<hg.top){gX(hh,hf.bottom,null,hg.top)}}if(ha==null&&hi==g8){he=g0}if(!hb||hf.top<hb.top||hf.top==hb.top&&hf.left<hb.left){hb=hf}if(!g4||hg.bottom>g4.bottom||hg.bottom==g4.bottom&&hg.right>g4.right){g4=hg}if(hh<gP+1){hh=gP}gX(hh,hg.top,he-hh,hg.bottom)});return{start:hb,end:g4}}var g2=gQ.from(),g1=gQ.to();if(g2.line==g1.line){gN(g2.line,g2.ch,g1.ch)}else{var gO=fy(g3,g2.line),gU=fy(g3,g1.line);var gT=y(gO)==y(gU);var gV=gN(g2.line,g2.ch,gT?gO.text.length+1:null).end;var gY=gN(g1.line,gT?0:null,g1.ch).start;if(gT){if(gV.top<gY.top-2){gX(gV.right,gV.top,null,gV.bottom);gX(gP,gY.top,gY.left,gY.bottom)}else{gX(gV.right,gV.top,gY.left-gV.right,gV.bottom)}}if(gV.bottom<gY.top){gX(gP,gV.bottom,null,gY.top)}}gS.appendChild(i)}function p(i){if(!i.state.focused){return}var gO=i.display;clearInterval(gO.blinker);var gN=true;gO.cursorDiv.style.visibility="";if(i.options.cursorBlinkRate>0){gO.blinker=setInterval(function(){return gO.cursorDiv.style.visibility=(gN=!gN)?"":"hidden"},i.options.cursorBlinkRate)}else{if(i.options.cursorBlinkRate<0){gO.cursorDiv.style.visibility="hidden"}}}function s(i){if(!i.state.focused){i.display.input.focus();cG(i)}}function aj(i){i.state.delayingBlurEvent=true;setTimeout(function(){if(i.state.delayingBlurEvent){i.state.delayingBlurEvent=false;aV(i)}},100)}function cG(i,gN){if(i.state.delayingBlurEvent){i.state.delayingBlurEvent=false}if(i.options.readOnly=="nocursor"){return}if(!i.state.focused){aE(i,"focus",i,gN);i.state.focused=true;fW(i.display.wrapper,"CodeMirror-focused");if(!i.curOp&&i.display.selForContextMenu!=i.doc.sel){i.display.input.reset();if(c6){setTimeout(function(){return i.display.input.reset(true)},20)}}i.display.input.receivedFocus()}p(i)}function aV(i,gN){if(i.state.delayingBlurEvent){return}if(i.state.focused){aE(i,"blur",i,gN);i.state.focused=false;h(i.display.wrapper,"CodeMirror-focused")}clearInterval(i.display.blinker);setTimeout(function(){if(!i.state.focused){i.display.shift=false}},150)}function eT(gV){var gT=gV.display,gU=gT.view;if(!gT.alignWidgets&&(!gT.gutters.firstChild||!gV.options.fixedGutter)){return}var gR=d7(gT)-gT.scroller.scrollLeft+gV.doc.scrollLeft;var gN=gT.gutters.offsetWidth,gO=gR+"px";for(var gQ=0;gQ<gU.length;gQ++){if(!gU[gQ].hidden){if(gV.options.fixedGutter){if(gU[gQ].gutter){gU[gQ].gutter.style.left=gO}if(gU[gQ].gutterBackground){gU[gQ].gutterBackground.style.left=gO}}var gS=gU[gQ].alignable;if(gS){for(var gP=0;gP<gS.length;gP++){gS[gP].style.left=gO}}}}if(gV.options.fixedGutter){gT.gutters.style.left=(gR+gN)+"px"}}function ef(i){if(!i.options.lineNumbers){return false}var gR=i.doc,gN=eF(i.options,gR.first+gR.size-1),gQ=i.display;if(gN.length!=gQ.lineNumChars){var gS=gQ.measure.appendChild(gv("div",[gv("div",gN)],"CodeMirror-linenumber CodeMirror-gutter-elt"));var gO=gS.firstChild.offsetWidth,gP=gS.offsetWidth-gO;gQ.lineGutter.style.width="";gQ.lineNumInnerWidth=Math.max(gO,gQ.lineGutter.offsetWidth-gP)+1;gQ.lineNumWidth=gQ.lineNumInnerWidth+gP;gQ.lineNumChars=gQ.lineNumInnerWidth?gN.length:-1;gQ.lineGutter.style.width=gQ.lineNumWidth+"px";da(i);return true}return false}function a9(gU){var gS=gU.display;var gO=gS.lineDiv.offsetTop;for(var gP=0;gP<gS.view.length;gP++){var gV=gS.view[gP],gW=void 0;if(gV.hidden){continue}if(dS&&l<8){var gR=gV.node.offsetTop+gV.node.offsetHeight;gW=gR-gO;gO=gR}else{var gQ=gV.node.getBoundingClientRect();gW=gQ.bottom-gQ.top}var gT=gV.line.height-gW;if(gW<2){gW=aY(gS)}if(gT>0.001||gT<-0.001){gz(gV.line,gW);cf(gV.line);if(gV.rest){for(var gN=0;gN<gV.rest.length;gN++){cf(gV.rest[gN])}}}}}function cf(gN){if(gN.widgets){for(var gO=0;gO<gN.widgets.length;++gO){gN.widgets[gO].height=gN.widgets[gO].node.parentNode.offsetHeight}}}function ca(gP,gT,gO){var gQ=gO&&gO.top!=null?Math.max(0,gO.top):gP.scroller.scrollTop;gQ=Math.floor(gQ-fs(gP));var i=gO&&gO.bottom!=null?gO.bottom:gQ+gP.wrapper.clientHeight;var gR=bK(gT,gQ),gS=bK(gT,i);if(gO&&gO.ensure){var gN=gO.ensure.from.line,gU=gO.ensure.to.line;if(gN<gR){gR=gN;gS=bK(gT,bP(fy(gT,gN))+gP.wrapper.clientHeight)}else{if(Math.min(gU,gT.lastLine())>=gS){gR=bK(gT,bP(fy(gT,gU))-gP.wrapper.clientHeight);gS=gU}}}return{from:gR,to:Math.max(gS,gR+1)}}function N(i,gN){if(Math.abs(i.doc.scrollTop-gN)<2){return}i.doc.scrollTop=gN;if(!ct){d2(i,{top:gN})}if(i.display.scroller.scrollTop!=gN){i.display.scroller.scrollTop=gN}i.display.scrollbars.setScrollTop(gN);if(ct){d2(i)}ep(i,100)}function bH(i,gO,gN){if(gN?gO==i.doc.scrollLeft:Math.abs(i.doc.scrollLeft-gO)<2){return}gO=Math.min(gO,i.display.scroller.scrollWidth-i.display.scroller.clientWidth);i.doc.scrollLeft=gO;eT(i);if(i.display.scroller.scrollLeft!=gO){i.display.scroller.scrollLeft=gO}i.display.scrollbars.setScrollLeft(gO)}var fG=0;var cl=null;if(dS){cl=-0.53}else{if(ct){cl=15}else{if(dk){cl=-0.7}else{if(aC){cl=-1/3}}}}function cW(gO){var gN=gO.wheelDeltaX,i=gO.wheelDeltaY;if(gN==null&&gO.detail&&gO.axis==gO.HORIZONTAL_AXIS){gN=gO.detail}if(i==null&&gO.detail&&gO.axis==gO.VERTICAL_AXIS){i=gO.detail}else{if(i==null){i=gO.wheelDelta}}return{x:gN,y:i}}function az(i){var gN=cW(i);gN.x*=cl;gN.y*=cl;return gN}function c(gX,gR){var gZ=cW(gR),g1=gZ.x,g0=gZ.y;var gT=gX.display,gW=gT.scroller;var gQ=gW.scrollWidth>gW.clientWidth;var gP=gW.scrollHeight>gW.clientHeight;if(!(g1&&gQ||g0&&gP)){return}if(g0&&cb&&c6){outer:for(var gY=gR.target,gV=gT.view;gY!=gW;gY=gY.parentNode){for(var gO=0;gO<gV.length;gO++){if(gV[gO].node==gY){gX.display.currentWheelTarget=gY;break outer}}}}if(g1&&!ct&&!ec&&cl!=null){if(g0&&gP){N(gX,Math.max(0,Math.min(gW.scrollTop+g0*cl,gW.scrollHeight-gW.clientHeight)))}bH(gX,Math.max(0,Math.min(gW.scrollLeft+g1*cl,gW.scrollWidth-gW.clientWidth)));if(!g0||(g0&&gP)){cL(gR)}gT.wheelStartX=null;return}if(g0&&cl!=null){var gN=g0*cl;var gU=gX.doc.scrollTop,gS=gU+gT.wrapper.clientHeight;if(gN<0){gU=Math.max(0,gU+gN-50)}else{gS=Math.min(gX.doc.height,gS+gN+50)}d2(gX,{top:gU,bottom:gS})}if(fG<20){if(gT.wheelStartX==null){gT.wheelStartX=gW.scrollLeft;gT.wheelStartY=gW.scrollTop;gT.wheelDX=g1;gT.wheelDY=g0;setTimeout(function(){if(gT.wheelStartX==null){return}var i=gW.scrollLeft-gT.wheelStartX;var g3=gW.scrollTop-gT.wheelStartY;var g2=(g3&&gT.wheelDY&&g3/gT.wheelDY)||(i&&gT.wheelDX&&i/gT.wheelDX);gT.wheelStartX=gT.wheelStartY=null;if(!g2){return}cl=(cl*fG+g2)/(fG+1);++fG},200)}else{gT.wheelDX+=g1;gT.wheelDY+=g0}}}function dI(i){var gP=i.display,gO=gP.gutters.offsetWidth;var gN=Math.round(i.doc.height+bL(i.display));return{clientHeight:gP.scroller.clientHeight,viewHeight:gP.wrapper.clientHeight,scrollWidth:gP.scroller.scrollWidth,clientWidth:gP.scroller.clientWidth,viewWidth:gP.wrapper.clientWidth,barLeft:i.options.fixedGutter?gO:0,docHeight:gN,scrollHeight:gN+cZ(i)+gP.barHeight,nativeBarWidth:gP.nativeBarWidth,gutterWidth:gO}}function dt(gO,gN,i){this.cm=i;var gP=this.vert=gv("div",[gv("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar");var gQ=this.horiz=gv("div",[gv("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");gO(gP);gO(gQ);b0(gP,"scroll",function(){if(gP.clientHeight){gN(gP.scrollTop,"vertical")}});b0(gQ,"scroll",function(){if(gQ.clientWidth){gN(gQ.scrollLeft,"horizontal")}});this.checkedZeroWidth=false;if(dS&&l<8){this.horiz.style.minHeight=this.vert.style.minWidth="18px"}}dt.prototype=aN({update:function(gP){var gQ=gP.scrollWidth>gP.clientWidth+1;var gO=gP.scrollHeight>gP.clientHeight+1;var gR=gP.nativeBarWidth;if(gO){this.vert.style.display="block";this.vert.style.bottom=gQ?gR+"px":"0";var gN=gP.viewHeight-(gQ?gR:0);this.vert.firstChild.style.height=Math.max(0,gP.scrollHeight-gP.clientHeight+gN)+"px"}else{this.vert.style.display="";this.vert.firstChild.style.height="0"}if(gQ){this.horiz.style.display="block";this.horiz.style.right=gO?gR+"px":"0";this.horiz.style.left=gP.barLeft+"px";var i=gP.viewWidth-gP.barLeft-(gO?gR:0);this.horiz.firstChild.style.width=(gP.scrollWidth-gP.clientWidth+i)+"px"}else{this.horiz.style.display="";this.horiz.firstChild.style.width="0"}if(!this.checkedZeroWidth&&gP.clientHeight>0){if(gR==0){this.zeroWidthHack()}this.checkedZeroWidth=true}return{right:gO?gR:0,bottom:gQ?gR:0}},setScrollLeft:function(i){if(this.horiz.scrollLeft!=i){this.horiz.scrollLeft=i}if(this.disableHoriz){this.enableZeroWidthBar(this.horiz,this.disableHoriz)}},setScrollTop:function(i){if(this.vert.scrollTop!=i){this.vert.scrollTop=i}if(this.disableVert){this.enableZeroWidthBar(this.vert,this.disableVert)}},zeroWidthHack:function(){var i=cb&&!dd?"12px":"18px";this.horiz.style.height=this.vert.style.width=i;this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none";this.disableHoriz=new gM;this.disableVert=new gM},enableZeroWidthBar:function(gN,i){gN.style.pointerEvents="auto";function gO(){var gQ=gN.getBoundingClientRect();var gP=document.elementFromPoint(gQ.left+1,gQ.bottom-1);if(gP!=gN){gN.style.pointerEvents="none"}else{i.set(1000,gO)}}i.set(1000,gO)},clear:function(){var i=this.horiz.parentNode;i.removeChild(this.horiz);i.removeChild(this.vert)}},dt.prototype);function fm(){}fm.prototype=aN({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},fm.prototype);function fg(gP,gR){if(!gR){gR=dI(gP)}var gO=gP.display.barWidth,gN=gP.display.barHeight;aU(gP,gR);for(var gQ=0;gQ<4&&gO!=gP.display.barWidth||gN!=gP.display.barHeight;gQ++){if(gO!=gP.display.barWidth&&gP.options.lineWrapping){a9(gP)}aU(gP,dI(gP));gO=gP.display.barWidth;gN=gP.display.barHeight}}function aU(i,gN){var gP=i.display;var gO=gP.scrollbars.update(gN);gP.sizer.style.paddingRight=(gP.barWidth=gO.right)+"px";gP.sizer.style.paddingBottom=(gP.barHeight=gO.bottom)+"px";gP.heightForcer.style.borderBottom=gO.bottom+"px solid transparent";if(gO.right&&gO.bottom){gP.scrollbarFiller.style.display="block";gP.scrollbarFiller.style.height=gO.bottom+"px";gP.scrollbarFiller.style.width=gO.right+"px"}else{gP.scrollbarFiller.style.display=""}if(gO.bottom&&i.options.coverGutterNextToScrollbar&&i.options.fixedGutter){gP.gutterFiller.style.display="block";gP.gutterFiller.style.height=gO.bottom+"px";gP.gutterFiller.style.width=gN.gutterWidth+"px"}else{gP.gutterFiller.style.display=""}}var bn={"native":dt,"null":fm};function aD(i){if(i.display.scrollbars){i.display.scrollbars.clear();if(i.display.scrollbars.addClass){h(i.display.wrapper,i.display.scrollbars.addClass)}}i.display.scrollbars=new bn[i.options.scrollbarStyle](function(gN){i.display.wrapper.insertBefore(gN,i.display.scrollbarFiller);b0(gN,"mousedown",function(){if(i.state.focused){setTimeout(function(){return i.display.input.focus()},0)}});gN.setAttribute("cm-not-content","true")},function(gO,gN){if(gN=="horizontal"){bH(i,gO)}else{N(i,gO)}},i);if(i.display.scrollbars.addClass){fW(i.display.wrapper,i.display.scrollbars.addClass)}}function eg(gN,gQ){if(aR(gN,"scrollCursorIntoView")){return}var gR=gN.display,gO=gR.sizer.getBoundingClientRect(),i=null;if(gQ.top+gO.top<0){i=true}else{if(gQ.bottom+gO.top>(window.innerHeight||document.documentElement.clientHeight)){i=false}}if(i!=null&&!fN){var gP=gv("div","\u200b",null,("position: absolute;\n top: "+(gQ.top-gR.viewOffset-fs(gN.display))+"px;\n height: "+(gQ.bottom-gQ.top+cZ(gN)+gR.barHeight)+"px;\n left: "+(gQ.left)+"px; width: 2px;"));gN.display.lineSpace.appendChild(gP);gP.scrollIntoView(i);gN.display.lineSpace.removeChild(gP)}}function D(gW,gU,gQ,gP){if(gP==null){gP=0}var gV;for(var gR=0;gR<5;gR++){var gS=false;gV=d3(gW,gU);var i=!gQ||gQ==gU?gV:d3(gW,gQ);var gO=G(gW,Math.min(gV.left,i.left),Math.min(gV.top,i.top)-gP,Math.max(gV.left,i.left),Math.max(gV.bottom,i.bottom)+gP);var gT=gW.doc.scrollTop,gN=gW.doc.scrollLeft;if(gO.scrollTop!=null){N(gW,gO.scrollTop);if(Math.abs(gW.doc.scrollTop-gT)>1){gS=true}}if(gO.scrollLeft!=null){bH(gW,gO.scrollLeft);if(Math.abs(gW.doc.scrollLeft-gN)>1){gS=true}}if(!gS){break}}return gV}function E(i,gO,gQ,gN,gP){var gR=G(i,gO,gQ,gN,gP);if(gR.scrollTop!=null){N(i,gR.scrollTop)}if(gR.scrollLeft!=null){bH(i,gR.scrollLeft)}}function G(gY,gP,gX,gN,gW){var gU=gY.display,gS=aY(gY.display);if(gX<0){gX=0}var gQ=gY.curOp&&gY.curOp.scrollTop!=null?gY.curOp.scrollTop:gU.scroller.scrollTop;var g0=c1(gY),g2={};if(gW-gX>g0){gW=gX+g0}var gO=gY.doc.height+bL(gU);var i=gX<gS,gT=gW>gO-gS;if(gX<gQ){g2.scrollTop=i?0:gX}else{if(gW>gQ+g0){var gV=Math.min(gX,(gT?gO:gW)-g0);if(gV!=gQ){g2.scrollTop=gV}}}var g1=gY.curOp&&gY.curOp.scrollLeft!=null?gY.curOp.scrollLeft:gU.scroller.scrollLeft;var gZ=du(gY)-(gY.options.fixedGutter?gU.gutters.offsetWidth:0);var gR=gN-gP>gZ;if(gR){gN=gP+gZ}if(gP<10){g2.scrollLeft=0}else{if(gP<g1){g2.scrollLeft=Math.max(0,gP-(gR?0:10))}else{if(gN>gZ+g1-3){g2.scrollLeft=gN+(gR?0:10)-gZ}}}return g2}function cR(i,gO,gN){if(gO!=null||gN!=null){fY(i)}if(gO!=null){i.curOp.scrollLeft=(i.curOp.scrollLeft==null?i.doc.scrollLeft:i.curOp.scrollLeft)+gO}if(gN!=null){i.curOp.scrollTop=(i.curOp.scrollTop==null?i.doc.scrollTop:i.curOp.scrollTop)+gN}}function f1(i){fY(i);var gN=i.getCursor(),gP=gN,gO=gN;if(!i.options.lineWrapping){gP=gN.ch?V(gN.line,gN.ch-1):gN;gO=V(gN.line,gN.ch+1)}i.curOp.scrollToPos={from:gP,to:gO,margin:i.options.cursorScrollMargin,isCursor:true}}function fY(i){var gO=i.curOp.scrollToPos;if(gO){i.curOp.scrollToPos=null;var gQ=dP(i,gO.from),gP=dP(i,gO.to);var gN=G(i,Math.min(gQ.left,gP.left),Math.min(gQ.top,gP.top)-gO.margin,Math.max(gQ.right,gP.right),Math.max(gQ.bottom,gP.bottom)+gO.margin);i.scrollTo(gN.scrollLeft,gN.scrollTop)}}var ek=0;function cO(i){i.curOp={cm:i,viewChanged:false,startHeight:i.doc.height,forceUpdate:false,updateInput:null,typing:false,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:false,updateMaxLine:false,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:false,id:++ek};eM(i.curOp)}function al(i){var gN=i.curOp;b1(gN,function(gP){for(var gO=0;gO<gP.ops.length;gO++){gP.ops[gO].cm.curOp=null}cQ(gP)})}function cQ(gS){var gO=gS.ops;for(var gN=0;gN<gO.length;gN++){b9(gO[gN])}for(var gT=0;gT<gO.length;gT++){ap(gO[gT])}for(var gR=0;gR<gO.length;gR++){b5(gO[gR])}for(var gQ=0;gQ<gO.length;gQ++){ao(gO[gQ])}for(var gP=0;gP<gO.length;gP++){fi(gO[gP])}}function b9(gO){var i=gO.cm,gN=i.display;I(i);if(gO.updateMaxLine){f(i)}gO.mustUpdate=gO.viewChanged||gO.forceUpdate||gO.scrollTop!=null||gO.scrollToPos&&(gO.scrollToPos.from.line<gN.viewFrom||gO.scrollToPos.to.line>=gN.viewTo)||gN.maxLineChanged&&i.options.lineWrapping;gO.update=gO.mustUpdate&&new aJ(i,gO.mustUpdate&&{top:gO.scrollTop,ensure:gO.scrollToPos},gO.forceUpdate)}function ap(i){i.updatedDisplay=i.mustUpdate&&B(i.cm,i.update)}function b5(gO){var i=gO.cm,gN=i.display;if(gO.updatedDisplay){a9(i)}gO.barMeasure=dI(i);if(gN.maxLineChanged&&!i.options.lineWrapping){gO.adjustWidthTo=es(i,gN.maxLine,gN.maxLine.text.length).left+3;i.display.sizerWidth=gO.adjustWidthTo;gO.barMeasure.scrollWidth=Math.max(gN.scroller.clientWidth,gN.sizer.offsetLeft+gO.adjustWidthTo+cZ(i)+i.display.barWidth);gO.maxScrollLeft=Math.max(0,gN.sizer.offsetLeft+gO.adjustWidthTo-du(i))}if(gO.updatedDisplay||gO.selectionChanged){gO.preparedSelection=gN.input.prepareSelection(gO.focus)}}function ao(gO){var i=gO.cm;if(gO.adjustWidthTo!=null){i.display.sizer.style.minWidth=gO.adjustWidthTo+"px";if(gO.maxScrollLeft<i.doc.scrollLeft){bH(i,Math.min(i.display.scroller.scrollLeft,gO.maxScrollLeft),true)}i.display.maxLineChanged=false}var gN=gO.focus&&gO.focus==dW()&&(!document.hasFocus||document.hasFocus());if(gO.preparedSelection){i.display.input.showSelection(gO.preparedSelection,gN)}if(gO.updatedDisplay||gO.startHeight!=i.doc.height){fg(i,gO.barMeasure)}if(gO.updatedDisplay){dG(i,gO.barMeasure)}if(gO.selectionChanged){p(i)}if(i.state.focused&&gO.updateInput){i.display.input.reset(gO.typing)}if(gN){s(gO.cm)}}function fi(gQ){var gV=gQ.cm,gS=gV.display,gU=gV.doc;if(gQ.updatedDisplay){co(gV,gQ.update)}if(gS.wheelStartX!=null&&(gQ.scrollTop!=null||gQ.scrollLeft!=null||gQ.scrollToPos)){gS.wheelStartX=gS.wheelStartY=null}if(gQ.scrollTop!=null&&(gS.scroller.scrollTop!=gQ.scrollTop||gQ.forceScroll)){gU.scrollTop=Math.max(0,Math.min(gS.scroller.scrollHeight-gS.scroller.clientHeight,gQ.scrollTop));gS.scrollbars.setScrollTop(gU.scrollTop);gS.scroller.scrollTop=gU.scrollTop}if(gQ.scrollLeft!=null&&(gS.scroller.scrollLeft!=gQ.scrollLeft||gQ.forceScroll)){gU.scrollLeft=Math.max(0,Math.min(gS.scroller.scrollWidth-gS.scroller.clientWidth,gQ.scrollLeft));gS.scrollbars.setScrollLeft(gU.scrollLeft);gS.scroller.scrollLeft=gU.scrollLeft;eT(gV)}if(gQ.scrollToPos){var gT=D(gV,f7(gU,gQ.scrollToPos.from),f7(gU,gQ.scrollToPos.to),gQ.scrollToPos.margin);if(gQ.scrollToPos.isCursor&&gV.state.focused){eg(gV,gT)}}var gR=gQ.maybeHiddenMarkers,gN=gQ.maybeUnhiddenMarkers;if(gR){for(var gP=0;gP<gR.length;++gP){if(!gR[gP].lines.length){aE(gR[gP],"hide")}}}if(gN){for(var gO=0;gO<gN.length;++gO){if(gN[gO].lines.length){aE(gN[gO],"unhide")}}}if(gS.wrapper.offsetHeight){gU.scrollTop=gV.display.scroller.scrollTop}if(gQ.changeObjs){aE(gV,"changes",gV,gQ.changeObjs)}if(gQ.update){gQ.update.finish()}}function cS(i,gN){if(i.curOp){return gN()}cO(i);try{return gN()}finally{al(i)}}function c7(i,gN){return function(){if(i.curOp){return gN.apply(i,arguments)}cO(i);try{return gN.apply(i,arguments)}finally{al(i)}}}function dg(i){return function(){if(this.curOp){return i.apply(this,arguments)}cO(this);try{return i.apply(this,arguments)}finally{al(this)}}}function cI(i){return function(){var gN=this.cm;if(!gN||gN.curOp){return i.apply(this,arguments)}cO(gN);try{return i.apply(this,arguments)}finally{al(gN)}}}function ag(gU,gS,gT,gV){if(gS==null){gS=gU.doc.first}if(gT==null){gT=gU.doc.first+gU.doc.size}if(!gV){gV=0}var gP=gU.display;if(gV&&gT<gP.viewTo&&(gP.updateLineNumbers==null||gP.updateLineNumbers>gS)){gP.updateLineNumbers=gS}gU.curOp.viewChanged=true;if(gS>=gP.viewTo){if(a7&&aW(gU.doc,gS)<gP.viewTo){eK(gU)}}else{if(gT<=gP.viewFrom){if(a7&&ed(gU.doc,gT+gV)>gP.viewFrom){eK(gU)}else{gP.viewFrom+=gV;gP.viewTo+=gV}}else{if(gS<=gP.viewFrom&&gT>=gP.viewTo){eK(gU)}else{if(gS<=gP.viewFrom){var gR=dm(gU,gT,gT+gV,1);if(gR){gP.view=gP.view.slice(gR.index);gP.viewFrom=gR.lineN;gP.viewTo+=gV}else{eK(gU)}}else{if(gT>=gP.viewTo){var gN=dm(gU,gS,gS,-1);if(gN){gP.view=gP.view.slice(0,gN.index);gP.viewTo=gN.lineN}else{eK(gU)}}else{var gQ=dm(gU,gS,gS,-1);var gO=dm(gU,gT,gT+gV,1);if(gQ&&gO){gP.view=gP.view.slice(0,gQ.index).concat(fd(gU,gQ.lineN,gO.lineN)).concat(gP.view.slice(gO.index));gP.viewTo+=gV}else{eK(gU)}}}}}}var i=gP.externalMeasured;if(i){if(gT<i.lineN){i.lineN+=gV}else{if(gS<i.lineN+i.size){gP.externalMeasured=null}}}}function Q(gN,gO,gR){gN.curOp.viewChanged=true;var gS=gN.display,gQ=gN.display.externalMeasured;if(gQ&&gO>=gQ.lineN&&gO<gQ.lineN+gQ.size){gS.externalMeasured=null}if(gO<gS.viewFrom||gO>=gS.viewTo){return}var gP=gS.view[dz(gN,gO)];if(gP.node==null){return}var i=gP.changes||(gP.changes=[]);if(dr(i,gR)==-1){i.push(gR)}}function eK(i){i.display.viewFrom=i.display.viewTo=i.doc.first;i.display.view=[];i.display.viewOffset=0}function dm(gV,gP,gR,gO){var gS=dz(gV,gP),gU,gT=gV.display.view;if(!a7||gR==gV.doc.first+gV.doc.size){return{index:gS,lineN:gR}}var gN=gV.display.viewFrom;for(var gQ=0;gQ<gS;gQ++){gN+=gT[gQ].size}if(gN!=gP){if(gO>0){if(gS==gT.length-1){return null}gU=(gN+gT[gS].size)-gP;gS++}else{gU=gN-gP}gP+=gU;gR+=gU}while(aW(gV.doc,gR)!=gR){if(gS==(gO<0?0:gT.length-1)){return null}gR+=gO*gT[gS-(gO<0?1:0)].size;gS+=gO}return{index:gS,lineN:gR}}function cX(i,gQ,gP){var gO=i.display,gN=gO.view;if(gN.length==0||gQ>=gO.viewTo||gP<=gO.viewFrom){gO.view=fd(i,gQ,gP);gO.viewFrom=gQ}else{if(gO.viewFrom>gQ){gO.view=fd(i,gQ,gO.viewFrom).concat(gO.view)}else{if(gO.viewFrom<gQ){gO.view=gO.view.slice(dz(i,gQ))}}gO.viewFrom=gQ;if(gO.viewTo<gP){gO.view=gO.view.concat(fd(i,gO.viewTo,gP))}else{if(gO.viewTo>gP){gO.view=gO.view.slice(0,dz(i,gP))}}}gO.viewTo=gP}function dj(gN){var gO=gN.display.view,gR=0;for(var gQ=0;gQ<gO.length;gQ++){var gP=gO[gQ];if(!gP.hidden&&(!gP.node||gP.changes)){++gR}}return gR}function ep(i,gN){if(i.doc.mode.startState&&i.doc.frontier<i.display.viewTo){i.state.highlight.set(gN,cA(cV,i))}}function cV(i){var gQ=i.doc;if(gQ.frontier<gQ.first){gQ.frontier=gQ.first}if(gQ.frontier>=i.display.viewTo){return}var gO=+new Date+i.options.workTime;var gP=b7(gQ.mode,dK(i,gQ.frontier));var gN=[];gQ.iter(gQ.frontier,Math.min(gQ.first+gQ.size,i.display.viewTo+500),function(gR){if(gQ.frontier>=i.display.viewFrom){var gU=gR.styles,gY=gR.text.length>i.options.maxHighlightLength;var gW=fT(i,gR,gY?b7(gQ.mode,gP):gP,true);gR.styles=gW.styles;var gT=gR.styleClasses,gV=gW.classes;if(gV){gR.styleClasses=gV}else{if(gT){gR.styleClasses=null}}var gX=!gU||gU.length!=gR.styles.length||gT!=gV&&(!gT||!gV||gT.bgClass!=gV.bgClass||gT.textClass!=gV.textClass);for(var gS=0;!gX&&gS<gU.length;++gS){gX=gU[gS]!=gR.styles[gS]}if(gX){gN.push(gQ.frontier)}gR.stateAfter=gY?gP:b7(gQ.mode,gP)}else{if(gR.text.length<=i.options.maxHighlightLength){dF(i,gR.text,gP)}gR.stateAfter=gQ.frontier%5==0?b7(gQ.mode,gP):null}++gQ.frontier;if(+new Date>gO){ep(i,i.options.workDelay);return true}});if(gN.length){cS(i,function(){for(var gR=0;gR<gN.length;gR++){Q(i,gN[gR],"text")}})}}function aJ(gN,i,gO){var gP=gN.display;this.viewport=i;this.visible=ca(gP,gN.doc,i);this.editorIsHidden=!gP.wrapper.offsetWidth;this.wrapperHeight=gP.wrapper.clientHeight;this.wrapperWidth=gP.wrapper.clientWidth;this.oldDisplayWidth=du(gN);this.force=gO;this.dims=fw(gN);this.events=[]}aJ.prototype.signal=function(gN,i){if(fE(gN,i)){this.events.push(arguments)}};aJ.prototype.finish=function(){var gO=this;for(var gN=0;gN<this.events.length;gN++){aE.apply(null,gO.events[gN])}};function I(i){var gN=i.display;if(!gN.scrollbarsClipped&&gN.scroller.offsetWidth){gN.nativeBarWidth=gN.scroller.offsetWidth-gN.scroller.clientWidth;gN.heightForcer.style.height=cZ(i)+"px";gN.sizer.style.marginBottom=-gN.nativeBarWidth+"px";gN.sizer.style.borderRightWidth=cZ(i)+"px";gN.scrollbarsClipped=true}}function B(gV,gP){var gQ=gV.display,gU=gV.doc;if(gP.editorIsHidden){eK(gV);return false}if(!gP.force&&gP.visible.from>=gQ.viewFrom&&gP.visible.to<=gQ.viewTo&&(gQ.updateLineNumbers==null||gQ.updateLineNumbers>=gQ.viewTo)&&gQ.renderedView==gQ.view&&dj(gV)==0){return false}if(ef(gV)){eK(gV);gP.dims=fw(gV)}var gO=gU.first+gU.size;var gS=Math.max(gP.visible.from-gV.options.viewportMargin,gU.first);var gT=Math.min(gO,gP.visible.to+gV.options.viewportMargin);if(gQ.viewFrom<gS&&gS-gQ.viewFrom<20){gS=Math.max(gU.first,gQ.viewFrom)}if(gQ.viewTo>gT&&gQ.viewTo-gT<20){gT=Math.min(gO,gQ.viewTo)}if(a7){gS=aW(gV.doc,gS);gT=ed(gV.doc,gT)}var gN=gS!=gQ.viewFrom||gT!=gQ.viewTo||gQ.lastWrapHeight!=gP.wrapperHeight||gQ.lastWrapWidth!=gP.wrapperWidth;cX(gV,gS,gT);gQ.viewOffset=bP(fy(gV.doc,gQ.viewFrom));gV.display.mover.style.top=gQ.viewOffset+"px";var i=dj(gV);if(!gN&&i==0&&!gP.force&&gQ.renderedView==gQ.view&&(gQ.updateLineNumbers==null||gQ.updateLineNumbers>=gQ.viewTo)){return false}var gR=dW();if(i>4){gQ.lineDiv.style.display="none"}cq(gV,gQ.updateLineNumbers,gP.dims);if(i>4){gQ.lineDiv.style.display=""}gQ.renderedView=gQ.view;if(gR&&dW()!=gR&&gR.offsetHeight){gR.focus()}eb(gQ.cursorDiv);eb(gQ.selectionDiv);gQ.gutters.style.height=gQ.sizer.style.minHeight=0;if(gN){gQ.lastWrapHeight=gP.wrapperHeight;gQ.lastWrapWidth=gP.wrapperWidth;ep(gV,400)}gQ.updateLineNumbers=null;return true}function co(gN,gQ){var i=gQ.viewport;for(var gP=true;;gP=false){if(!gP||!gN.options.lineWrapping||gQ.oldDisplayWidth==du(gN)){if(i&&i.top!=null){i={top:Math.min(gN.doc.height+bL(gN.display)-c1(gN),i.top)}}gQ.visible=ca(gN.display,gN.doc,i);if(gQ.visible.from>=gN.display.viewFrom&&gQ.visible.to<=gN.display.viewTo){break}}if(!B(gN,gQ)){break}a9(gN);var gO=dI(gN);bF(gN);fg(gN,gO);dG(gN,gO)}gQ.signal(gN,"update",gN);if(gN.display.viewFrom!=gN.display.reportedViewFrom||gN.display.viewTo!=gN.display.reportedViewTo){gQ.signal(gN,"viewportChange",gN,gN.display.viewFrom,gN.display.viewTo);gN.display.reportedViewFrom=gN.display.viewFrom;gN.display.reportedViewTo=gN.display.viewTo}}function d2(gN,i){var gP=new aJ(gN,i);if(B(gN,gP)){a9(gN);co(gN,gP);var gO=dI(gN);bF(gN);fg(gN,gO);dG(gN,gO);gP.finish()}}function cq(gY,gP,gX){var gU=gY.display,g0=gY.options.lineNumbers;var gN=gU.lineDiv,gZ=gN.firstChild;function gT(g1){var i=g1.nextSibling;if(c6&&cb&&gY.display.currentWheelTarget==g1){g1.style.display="none"}else{g1.parentNode.removeChild(g1)}return i}var gV=gU.view,gS=gU.viewFrom;for(var gQ=0;gQ<gV.length;gQ++){var gR=gV[gQ];if(gR.hidden){}else{if(!gR.node||gR.node.parentNode!=gN){var gO=aF(gY,gR,gS,gX);gN.insertBefore(gO,gZ)}else{while(gZ!=gR.node){gZ=gT(gZ)}var gW=g0&&gP!=null&&gP<=gS&&gR.lineNumber;if(gR.changes){if(dr(gR.changes,"gutter")>-1){gW=false}aa(gY,gR,gS,gX)}if(gW){eb(gR.lineNumber);gR.lineNumber.appendChild(document.createTextNode(eF(gY.options,gS)))}gZ=gR.node.nextSibling}}gS+=gR.size}while(gZ){gZ=gT(gZ)}}function da(i){var gN=i.display.gutters.offsetWidth;i.display.sizer.style.marginLeft=gN+"px"}function dG(i,gN){i.display.sizer.style.minHeight=gN.docHeight+"px";i.display.heightForcer.style.top=gN.docHeight+"px";i.display.gutters.style.height=(gN.docHeight+i.display.barHeight+cZ(i))+"px"}function en(gN){var gO=gN.display.gutters,gS=gN.options.gutters;eb(gO);var gP=0;for(;gP<gS.length;++gP){var gQ=gS[gP];var gR=gO.appendChild(gv("div",null,"CodeMirror-gutter "+gQ));if(gQ=="CodeMirror-linenumbers"){gN.display.lineGutter=gR;gR.style.width=(gN.display.lineNumWidth||1)+"px"}}gO.style.display=gP?"":"none";da(gN)}function cj(i){var gN=dr(i.gutters,"CodeMirror-linenumbers");if(gN==-1&&i.lineNumbers){i.gutters=i.gutters.concat(["CodeMirror-linenumbers"])}else{if(gN>-1&&!i.lineNumbers){i.gutters=i.gutters.slice(0);i.gutters.splice(gN,1)}}}function gu(i,gN){this.ranges=i;this.primIndex=gN}gu.prototype={primary:function(){return this.ranges[this.primIndex]},equals:function(gN){var gR=this;if(gN==this){return true}if(gN.primIndex!=this.primIndex||gN.ranges.length!=this.ranges.length){return false}for(var gP=0;gP<this.ranges.length;gP++){var gO=gR.ranges[gP],gQ=gN.ranges[gP];if(ck(gO.anchor,gQ.anchor)!=0||ck(gO.head,gQ.head)!=0){return false}}return true},deepCopy:function(){var gP=this;var gN=[];for(var gO=0;gO<this.ranges.length;gO++){gN[gO]=new d6(cn(gP.ranges[gO].anchor),cn(gP.ranges[gO].head))}return new gu(gN,this.primIndex)},somethingSelected:function(){var gO=this;for(var gN=0;gN<this.ranges.length;gN++){if(!gO.ranges[gN].empty()){return true}}return false},contains:function(gR,gN){var gQ=this;if(!gN){gN=gR}for(var gP=0;gP<this.ranges.length;gP++){var gO=gQ.ranges[gP];if(ck(gN,gO.from())>=0&&ck(gR,gO.to())<=0){return gP}}return -1}};function d6(i,gN){this.anchor=i;this.head=gN}d6.prototype={from:function(){return aq(this.anchor,this.head)},to:function(){return bA(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}};function cB(gN,gU){var gP=gN[gU];gN.sort(function(gW,i){return ck(gW.from(),i.from())});gU=dr(gN,gP);for(var gR=1;gR<gN.length;gR++){var gV=gN[gR],gO=gN[gR-1];if(ck(gO.to(),gV.from())>=0){var gS=aq(gO.from(),gV.from()),gT=bA(gO.to(),gV.to());var gQ=gO.empty()?gV.from()==gV.head:gO.from()==gO.head;if(gR<=gU){--gU}gN.splice(--gR,2,new d6(gQ?gT:gS,gQ?gS:gT))}}return new gu(gN,gU)}function e8(i,gN){return new gu([new d6(i,gN||i)],0)}function c3(i){if(!i.text){return i.to}return V(i.from.line+i.text.length-1,f2(i.text).length+(i.text.length==1?i.from.ch:0))}function b3(gP,gO){if(ck(gP,gO.from)<0){return gP}if(ck(gP,gO.to)<=0){return c3(gO)}var i=gP.line+gO.text.length-(gO.to.line-gO.from.line)-1,gN=gP.ch;if(gP.line==gO.to.line){gN+=c3(gO).ch-gO.to.ch}return V(i,gN)}function fD(gQ,gR){var gO=[];for(var gP=0;gP<gQ.sel.ranges.length;gP++){var gN=gQ.sel.ranges[gP];gO.push(new d6(b3(gN.anchor,gR),b3(gN.head,gR)))}return cB(gO,gQ.sel.primIndex)}function bw(gO,gN,i){if(gO.line==gN.line){return V(i.line,gO.ch-gN.ch+i.ch)}else{return V(i.line+(gO.line-gN.line),gO.ch)}}function ae(gX,gU,gO){var gP=[];var gN=V(gX.first,0),gY=gN;for(var gR=0;gR<gU.length;gR++){var gT=gU[gR];var gW=bw(gT.from,gN,gY);var gV=bw(c3(gT),gN,gY);gN=gT.to;gY=gV;if(gO=="around"){var gS=gX.sel.ranges[gR],gQ=ck(gS.head,gS.anchor)<0;gP[gR]=new d6(gQ?gV:gW,gQ?gW:gV)}else{gP[gR]=new d6(gW,gW)}}return new gu(gP,gX.sel.primIndex)}function bt(i){i.doc.mode=fV(i.options,i.doc.modeOption);ex(i)}function ex(i){i.doc.iter(function(gN){if(gN.stateAfter){gN.stateAfter=null}if(gN.styles){gN.styles=null}});i.doc.frontier=i.doc.first;ep(i,100);i.state.modeGen++;if(i.curOp){ag(i)}}function d1(i,gN){return gN.from.ch==0&&gN.to.ch==0&&f2(gN.text)==""&&(!i.cm||i.cm.options.wholeLineUpdateBefore)}function fS(g3,gW,gQ,gV){function gP(g4){return gQ?gQ[g4]:null}function gU(g4,g6,g5){ez(g4,g6,g5,gV);ad(g4,"change",g4,gW)}function g0(g7,g5){var g4=[];for(var g6=g7;g6<g5;++g6){g4.push(new gy(gY[g6],gP(g6),gV))}return g4}var g1=gW.from,gN=gW.to,gY=gW.text;var gX=fy(g3,g1.line),i=fy(g3,gN.line);var gO=f2(gY),g2=gP(gY.length-1),gZ=gN.line-g1.line;if(gW.full){g3.insert(0,g0(0,gY.length));g3.remove(gY.length,g3.size-gY.length)}else{if(d1(g3,gW)){var gT=g0(0,gY.length-1);gU(i,i.text,g2);if(gZ){g3.remove(g1.line,gZ)}if(gT.length){g3.insert(g1.line,gT)}}else{if(gX==i){if(gY.length==1){gU(gX,gX.text.slice(0,g1.ch)+gO+gX.text.slice(gN.ch),g2)}else{var gS=g0(1,gY.length-1);gS.push(new gy(gO+gX.text.slice(gN.ch),g2,gV));gU(gX,gX.text.slice(0,g1.ch)+gY[0],gP(0));g3.insert(g1.line+1,gS)}}else{if(gY.length==1){gU(gX,gX.text.slice(0,g1.ch)+gY[0]+i.text.slice(gN.ch),gP(0));g3.remove(g1.line+1,gZ)}else{gU(gX,gX.text.slice(0,g1.ch)+gY[0],gP(0));gU(i,gO+i.text.slice(gN.ch),g2);var gR=g0(1,gY.length-1);if(gZ>1){g3.remove(g1.line+1,gZ-1)}g3.insert(g1.line+1,gR)}}}}ad(g3,"change",g3,gW)}function eh(gP,gO,gN){function i(gV,gT,gR){if(gV.linked){for(var gS=0;gS<gV.linked.length;++gS){var gQ=gV.linked[gS];if(gQ.doc==gT){continue}var gU=gR&&gQ.sharedHist;if(gN&&!gU){continue}gO(gQ.doc,gU);i(gQ.doc,gV,gU)}}}i(gP,null,true)}function em(i,gN){if(gN.cm){throw new Error("This document is already in use.")}i.doc=gN;gN.cm=i;X(i);bt(i);if(!i.options.lineWrapping){f(i)}i.options.mode=gN.modeOption;ag(i)}function gk(i){this.done=[];this.undone=[];this.undoDepth=Infinity;this.lastModTime=this.lastSelTime=0;this.lastOp=this.lastSelOp=null;this.lastOrigin=this.lastSelOrigin=null;this.generation=this.maxGeneration=i||1}function dD(i,gO){var gN={from:cn(gO.from),to:c3(gO),text:gw(i,gO.from,gO.to)};b2(i,gN,gO.from.line,gO.to.line+1);eh(i,function(gP){return b2(gP,gN,gO.from.line,gO.to.line+1)},true);return gN}function fX(gN){while(gN.length){var i=f2(gN);if(i.ranges){gN.pop()}else{break}}}function e3(gN,i){if(i){fX(gN.done);return f2(gN.done)}else{if(gN.done.length&&!f2(gN.done).ranges){return f2(gN.done)}else{if(gN.done.length>1&&!gN.done[gN.done.length-2].ranges){gN.done.pop();return f2(gN.done)}}}}function f9(gS,gQ,i,gP){var gO=gS.history;gO.undone.length=0;var gN=+new Date,gT;var gU;if((gO.lastOp==gP||gO.lastOrigin==gQ.origin&&gQ.origin&&((gQ.origin.charAt(0)=="+"&&gS.cm&&gO.lastModTime>gN-gS.cm.options.historyEventDelay)||gQ.origin.charAt(0)=="*"))&&(gT=e3(gO,gO.lastOp==gP))){gU=f2(gT.changes);if(ck(gQ.from,gQ.to)==0&&ck(gQ.from,gU.to)==0){gU.to=c3(gQ)}else{gT.changes.push(dD(gS,gQ))}}else{var gR=f2(gO.done);if(!gR||!gR.ranges){cU(gS.sel,gO.done)}gT={changes:[dD(gS,gQ)],generation:gO.generation};gO.done.push(gT);while(gO.done.length>gO.undoDepth){gO.done.shift();if(!gO.done[0].ranges){gO.done.shift()}}}gO.done.push(i);gO.generation=++gO.maxGeneration;gO.lastModTime=gO.lastSelTime=gN;gO.lastOp=gO.lastSelOp=gP;gO.lastOrigin=gO.lastSelOrigin=gQ.origin;if(!gU){aE(gS,"historyAdded")}}function bD(gQ,i,gO,gP){var gN=i.charAt(0);return gN=="*"||gN=="+"&&gO.ranges.length==gP.ranges.length&&gO.somethingSelected()==gP.somethingSelected()&&new Date-gQ.history.lastSelTime<=(gQ.cm?gQ.cm.options.historyEventDelay:500)}function gF(gR,gP,i,gO){var gQ=gR.history,gN=gO&&gO.origin;if(i==gQ.lastSelOp||(gN&&gQ.lastSelOrigin==gN&&(gQ.lastModTime==gQ.lastSelTime&&gQ.lastOrigin==gN||bD(gR,gN,f2(gQ.done),gP)))){gQ.done[gQ.done.length-1]=gP}else{cU(gP,gQ.done)}gQ.lastSelTime=+new Date;gQ.lastSelOrigin=gN;gQ.lastSelOp=i;if(gO&&gO.clearRedo!==false){fX(gQ.undone)}}function cU(gN,i){var gO=f2(i);if(!(gO&&gO.ranges&&gO.equals(gN))){i.push(gN)}}function b2(gN,gR,gQ,gP){var i=gR["spans_"+gN.id],gO=0;gN.iter(Math.max(gN.first,gQ),Math.min(gN.first+gN.size,gP),function(gS){if(gS.markedSpans){(i||(i=gR["spans_"+gN.id]={}))[gO]=gS.markedSpans}++gO})}function bl(gP){if(!gP){return null}var gN;for(var gO=0;gO<gP.length;++gO){if(gP[gO].marker.explicitlyCleared){if(!gN){gN=gP.slice(0,gO)}}else{if(gN){gN.push(gP[gO])}}}return !gN?gP:gN.length?gN:null}function b8(gQ,gR){var gP=gR["spans_"+gQ.id];if(!gP){return null}var gN=[];for(var gO=0;gO<gR.text.length;++gO){gN.push(bl(gP[gO]))}return gN}function ej(gV,gT){var gN=b8(gV,gT);var gW=ev(gV,gT);if(!gN){return gW}if(!gW){return gN}for(var gQ=0;gQ<gN.length;++gQ){var gR=gN[gQ],gS=gW[gQ];if(gR&&gS){spans:for(var gP=0;gP<gS.length;++gP){var gU=gS[gP];for(var gO=0;gO<gR.length;++gO){if(gR[gO].marker==gU.marker){continue spans}}gR.push(gU)}}else{if(gS){gN[gQ]=gS}}}return gN}function bS(gY,gQ,gX){var gO=[];for(var gT=0;gT<gY.length;++gT){var gP=gY[gT];if(gP.ranges){gO.push(gX?gu.prototype.deepCopy.call(gP):gP);continue}var gV=gP.changes,gW=[];gO.push({changes:gW});for(var gS=0;gS<gV.length;++gS){var gU=gV[gS],gR=void 0;gW.push({from:gU.from,to:gU.to,text:gU.text});if(gQ){for(var gN in gU){if(gR=gN.match(/^spans_(\d+)$/)){if(dr(gQ,Number(gR[1]))>-1){f2(gW)[gN]=gU[gN];delete gU[gN]}}}}}}return gO}function fO(gR,gN,gQ,i){if(gR.cm&&gR.cm.display.shift||gR.extend){var gP=gN.anchor;if(i){var gO=ck(gQ,gP)<0;if(gO!=(ck(i,gP)<0)){gP=gQ;gQ=i}else{if(gO!=(ck(gQ,i)<0)){gQ=i}}}return new d6(gP,gQ)}else{return new d6(i||gQ,gQ)}}function gp(gP,gO,i,gN){bX(gP,new gu([fO(gP,gP.sel.primary(),gO,i)],0),gN)}function av(gS,gR,gP){var gO=[];for(var gQ=0;gQ<gS.sel.ranges.length;gQ++){gO[gQ]=fO(gS,gS.sel.ranges[gQ],gR[gQ],null)}var gN=cB(gO,gS.sel.primIndex);bX(gS,gN,gP)}function e(gR,gQ,gO,gP){var gN=gR.sel.ranges.slice(0);gN[gQ]=gO;bX(gR,cB(gN,gR.sel.primIndex),gP)}function F(gP,gN,gO,i){bX(gP,e8(gN,gO),i)}function b(gP,gN,i){var gO={ranges:gN.ranges,update:function(gQ){var gS=this;this.ranges=[];for(var gR=0;gR<gQ.length;gR++){gS.ranges[gR]=new d6(f7(gP,gQ[gR].anchor),f7(gP,gQ[gR].head))}},origin:i&&i.origin};aE(gP,"beforeSelectionChange",gP,gO);if(gP.cm){aE(gP.cm,"beforeSelectionChange",gP.cm,gO)}if(gO.ranges!=gN.ranges){return cB(gO.ranges,gO.ranges.length-1)}else{return gN}}function fr(gQ,gP,gN){var i=gQ.history.done,gO=f2(i);if(gO&&gO.ranges){i[i.length-1]=gP;eB(gQ,gP,gN)}else{bX(gQ,gP,gN)}}function bX(gO,gN,i){eB(gO,gN,i);gF(gO,gO.sel,gO.cm?gO.cm.curOp.id:NaN,i)}function eB(gP,gO,gN){if(fE(gP,"beforeSelectionChange")||gP.cm&&fE(gP.cm,"beforeSelectionChange")){gO=b(gP,gO,gN)}var i=gN&&gN.bias||(ck(gO.primary().head,gP.sel.primary().head)<0?-1:1);df(gP,o(gP,gO,i,true));if(!(gN&&gN.scroll===false)&&gP.cm){f1(gP.cm)}}function df(gN,i){if(i.equals(gN.sel)){return}gN.sel=i;if(gN.cm){gN.cm.curOp.updateInput=gN.cm.curOp.selectionChanged=true;U(gN.cm)}ad(gN,"cursorActivity",gN)}function eL(i){df(i,o(i,i.sel,null,false),Y)}function o(gW,gN,gT,gU){var gQ;for(var gR=0;gR<gN.ranges.length;gR++){var gS=gN.ranges[gR];var gO=gN.ranges.length==gW.sel.ranges.length&&gW.sel.ranges[gR];var gV=bY(gW,gS.anchor,gO&&gO.anchor,gT,gU);var gP=bY(gW,gS.head,gO&&gO.head,gT,gU);if(gQ||gV!=gS.anchor||gP!=gS.head){if(!gQ){gQ=gN.ranges.slice(0,gR)}gQ[gR]=new d6(gV,gP)}}return gQ?cB(gQ,gN.primIndex):gN}function eZ(gX,gV,gQ,gP,gT){var gY=fy(gX,gV.line);if(gY.markedSpans){for(var gR=0;gR<gY.markedSpans.length;++gR){var gN=gY.markedSpans[gR],gO=gN.marker;if((gN.from==null||(gO.inclusiveLeft?gN.from<=gV.ch:gN.from<gV.ch))&&(gN.to==null||(gO.inclusiveRight?gN.to>=gV.ch:gN.to>gV.ch))){if(gT){aE(gO,"beforeCursorEnter");if(gO.explicitlyCleared){if(!gY.markedSpans){break}else{--gR;continue}}}if(!gO.atomic){continue}if(gQ){var gU=gO.find(gP<0?1:-1),gW=void 0;if(gP<0?gO.inclusiveRight:gO.inclusiveLeft){gU=gJ(gX,gU,-gP,gU&&gU.line==gV.line?gY:null)}if(gU&&gU.line==gV.line&&(gW=ck(gU,gQ))&&(gP<0?gW<0:gW>0)){return eZ(gX,gU,gV,gP,gT)}}var gS=gO.find(gP<0?-1:1);if(gP<0?gO.inclusiveLeft:gO.inclusiveRight){gS=gJ(gX,gS,gP,gS.line==gV.line?gY:null)}return gS?eZ(gX,gS,gV,gP,gT):null}}}return gV}function bY(gR,gS,gP,gN,i){var gO=gN||1;var gQ=eZ(gR,gS,gP,gO,i)||(!i&&eZ(gR,gS,gP,gO,true))||eZ(gR,gS,gP,-gO,i)||(!i&&eZ(gR,gS,gP,-gO,true));if(!gQ){gR.cantEdit=true;return V(gR.first,0)}return gQ}function gJ(gO,gP,gN,i){if(gN<0&&gP.ch==0){if(gP.line>gO.first){return f7(gO,V(gP.line-1))}else{return null}}else{if(gN>0&&gP.ch==(i||fy(gO,gP.line)).text.length){if(gP.line<gO.first+gO.size-1){return V(gP.line+1,0)}else{return null}}else{return new V(gP.line,gP.ch+gN)}}}function ak(i){i.setSelection(V(i.firstLine(),0),V(i.lastLine()),Y)}function dZ(gN,gP,gO){var i={canceled:false,from:gP.from,to:gP.to,text:gP.text,origin:gP.origin,cancel:function(){return i.canceled=true}};if(gO){i.update=function(gT,gS,gR,gQ){if(gT){i.from=f7(gN,gT)}if(gS){i.to=f7(gN,gS)}if(gR){i.text=gR}if(gQ!==undefined){i.origin=gQ}}}aE(gN,"beforeChange",gN,i);if(gN.cm){aE(gN.cm,"beforeChange",gN.cm,i)}if(i.canceled){return null}return{from:i.from,to:i.to,text:i.text,origin:i.origin}}function bg(gQ,gR,gP){if(gQ.cm){if(!gQ.cm.curOp){return c7(gQ.cm,bg)(gQ,gR,gP)}if(gQ.cm.state.suppressEdits){return}}if(fE(gQ,"beforeChange")||gQ.cm&&fE(gQ.cm,"beforeChange")){gR=dZ(gQ,gR,true);if(!gR){return}}var gO=gG&&!gP&&cN(gQ,gR.from,gR.to);if(gO){for(var gN=gO.length-1;gN>=0;--gN){J(gQ,{from:gO[gN].from,to:gO[gN].to,text:gN?[""]:gR.text})}}else{J(gQ,gR)}}function J(gO,gP){if(gP.text.length==1&&gP.text[0]==""&&ck(gP.from,gP.to)==0){return}var gN=fD(gO,gP);f9(gO,gP,gN,gO.cm?gO.cm.curOp.id:NaN);eo(gO,gP,gN,ev(gO,gP));var i=[];eh(gO,function(gR,gQ){if(!gQ&&dr(i,gR.history)==-1){dM(gR.history,gP);i.push(gR.history)}eo(gR,gP,null,ev(gR,gP))})}function cc(gY,gX,g0){if(gY.cm&&gY.cm.state.suppressEdits&&!g0){return}var gW=gY.history,gO,gQ=gY.sel;var gN=gX=="undo"?gW.done:gW.undone,gZ=gX=="undo"?gW.undone:gW.done;var gT=0;for(;gT<gN.length;gT++){gO=gN[gT];if(g0?gO.ranges&&!gO.equals(gY.sel):!gO.ranges){break}}if(gT==gN.length){return}gW.lastOrigin=gW.lastSelOrigin=null;for(;;){gO=gN.pop();if(gO.ranges){cU(gO,gZ);if(g0&&!gO.equals(gY.sel)){bX(gY,gO,{clearRedo:false});return}gQ=gO}else{break}}var gV=[];cU(gQ,gZ);gZ.push({changes:gV,generation:gW.generation});gW.generation=gO.generation||++gW.maxGeneration;var gP=fE(gY,"beforeChange")||gY.cm&&fE(gY.cm,"beforeChange");var gU=function(g1){var g4=gO.changes[g1];g4.origin=gX;if(gP&&!dZ(gY,g4,false)){gN.length=0;return{}}gV.push(dD(gY,g4));var g3=g1?fD(gY,g4):f2(gN);eo(gY,g4,g3,ej(gY,g4));if(!g1&&gY.cm){gY.cm.scrollIntoView({from:g4.from,to:c3(g4)})}var g2=[];eh(gY,function(g5,i){if(!i&&dr(g2,g5.history)==-1){dM(g5.history,g4);g2.push(g5.history)}eo(g5,g4,null,ej(g5,g4))})};for(var gR=gO.changes.length-1;gR>=0;--gR){var gS=gU(gR);if(gS){return gS.v}}}function fH(gN,gP){if(gP==0){return}gN.first+=gP;gN.sel=new gu(bW(gN.sel.ranges,function(gQ){return new d6(V(gQ.anchor.line+gP,gQ.anchor.ch),V(gQ.head.line+gP,gQ.head.ch))}),gN.sel.primIndex);if(gN.cm){ag(gN.cm,gN.first,gN.first-gP,gP);for(var gO=gN.cm.display,i=gO.viewFrom;i<gO.viewTo;i++){Q(gN.cm,i,"gutter")}}}function eo(gQ,gR,gP,gN){if(gQ.cm&&!gQ.cm.curOp){return c7(gQ.cm,eo)(gQ,gR,gP,gN)}if(gR.to.line<gQ.first){fH(gQ,gR.text.length-1-(gR.to.line-gR.from.line));return}if(gR.from.line>gQ.lastLine()){return}if(gR.from.line<gQ.first){var i=gR.text.length-1-(gQ.first-gR.from.line);fH(gQ,i);gR={from:V(gQ.first,0),to:V(gR.to.line+i,gR.to.ch),text:[f2(gR.text)],origin:gR.origin}}var gO=gQ.lastLine();if(gR.to.line>gO){gR={from:gR.from,to:V(gO,fy(gQ,gO).text.length),text:[gR.text[0]],origin:gR.origin}}gR.removed=gw(gQ,gR.from,gR.to);if(!gP){gP=fD(gQ,gR)}if(gQ.cm){aI(gQ.cm,gR,gN)}else{fS(gQ,gR,gN)}eB(gQ,gP,Y)}function aI(gX,gT,gR){var gW=gX.doc,gS=gX.display,gU=gT.from,gV=gT.to;var i=false,gQ=gU.line;if(!gX.options.lineWrapping){gQ=bQ(y(fy(gW,gU.line)));gW.iter(gQ,gV.line+1,function(gZ){if(gZ==gS.maxLine){i=true;return true}})}if(gW.sel.contains(gT.from,gT.to)>-1){U(gX)}fS(gW,gT,gR,be(gX));if(!gX.options.lineWrapping){gW.iter(gQ,gU.line+gT.text.length,function(g0){var gZ=ey(g0);if(gZ>gS.maxLineLength){gS.maxLine=g0;gS.maxLineLength=gZ;gS.maxLineChanged=true;i=false}});if(i){gX.curOp.updateMaxLine=true}}gW.frontier=Math.min(gW.frontier,gU.line);ep(gX,400);var gY=gT.text.length-(gV.line-gU.line)-1;if(gT.full){ag(gX)}else{if(gU.line==gV.line&&gT.text.length==1&&!d1(gX.doc,gT)){Q(gX,gU.line,"text")}else{ag(gX,gU.line,gV.line+1,gY)}}var gO=fE(gX,"changes"),gP=fE(gX,"change");if(gP||gO){var gN={from:gU,to:gV,text:gT.text,removed:gT.removed,origin:gT.origin};if(gP){ad(gX,"change",gX,gN)}if(gO){(gX.curOp.changeObjs||(gX.curOp.changeObjs=[])).push(gN)}}gX.display.selForContextMenu=null}function a1(gP,gO,gR,gQ,i){if(!gQ){gQ=gR}if(ck(gQ,gR)<0){var gN=gQ;gQ=gR;gR=gN}if(typeof gO=="string"){gO=gP.splitLines(gO)}bg(gP,{from:gR,to:gQ,text:gO,origin:i})}function H(gP,gO,gN,i){if(gN<gP.line){gP.line+=i}else{if(gO<gP.line){gP.line=gO;gP.ch=0}}}function fB(gR,gT,gU,gV){for(var gQ=0;gQ<gR.length;++gQ){var gN=gR[gQ],gS=true;if(gN.ranges){if(!gN.copied){gN=gR[gQ]=gN.deepCopy();gN.copied=true}for(var gP=0;gP<gN.ranges.length;gP++){H(gN.ranges[gP].anchor,gT,gU,gV);H(gN.ranges[gP].head,gT,gU,gV)}continue}for(var gO=0;gO<gN.changes.length;++gO){var gW=gN.changes[gO];if(gU<gW.from.line){gW.from=V(gW.from.line+gV,gW.from.ch);gW.to=V(gW.to.line+gV,gW.to.ch)}else{if(gT<=gW.to.line){gS=false;break}}}if(!gS){gR.splice(0,gQ+1);gQ=0}}}function dM(gN,gQ){var gP=gQ.from.line,gO=gQ.to.line,i=gQ.text.length-(gO-gP)-1;fB(gN.done,gP,gO,i);fB(gN.undone,gP,gO,i)}function eN(gP,gO,i,gR){var gQ=gO,gN=gO;if(typeof gO=="number"){gN=fy(gP,db(gP,gO))}else{gQ=bQ(gO)}if(gQ==null){return null}if(gR(gN,gQ)&&gP.cm){Q(gP.cm,gQ,i)}return gN}function fh(gO){var gQ=this;this.lines=gO;this.parent=null;var gN=0;for(var gP=0;gP<gO.length;++gP){gO[gP].parent=gQ;gN+=gO[gP].height}this.height=gN}fh.prototype={chunkSize:function(){return this.lines.length},removeInner:function(gN,gS){var gR=this;for(var gP=gN,gQ=gN+gS;gP<gQ;++gP){var gO=gR.lines[gP];gR.height-=gO.height;bE(gO);ad(gO,"delete")}this.lines.splice(gN,gS)},collapse:function(i){i.push.apply(i,this.lines)},insertInner:function(gO,gP,gN){var gR=this;this.height+=gN;this.lines=this.lines.slice(0,gO).concat(gP).concat(this.lines.slice(gO));for(var gQ=0;gQ<gP.length;++gQ){gP[gQ].parent=gR}},iterN:function(i,gQ,gP){var gO=this;for(var gN=i+gQ;i<gN;++i){if(gP(gO.lines[i])){return true}}}};function fR(gQ){var gS=this;this.children=gQ;var gP=0,gN=0;for(var gO=0;gO<gQ.length;++gO){var gR=gQ[gO];gP+=gR.chunkSize();gN+=gR.height;gR.parent=gS}this.size=gP;this.height=gN;this.parent=null}fR.prototype={chunkSize:function(){return this.size},removeInner:function(gP,gO){var gR=this;this.size-=gO;for(var gQ=0;gQ<this.children.length;++gQ){var gN=gR.children[gQ],gT=gN.chunkSize();if(gP<gT){var gS=Math.min(gO,gT-gP),gU=gN.height;gN.removeInner(gP,gS);gR.height-=gU-gN.height;if(gT==gS){gR.children.splice(gQ--,1);gN.parent=null}if((gO-=gS)==0){break}gP=0}else{gP-=gT}}if(this.size-gO<25&&(this.children.length>1||!(this.children[0] instanceof fh))){var gV=[];this.collapse(gV);this.children=[new fh(gV)];this.children[0].parent=this}},collapse:function(gN){var gP=this;for(var gO=0;gO<this.children.length;++gO){gP.children[gO].collapse(gN)}},insertInner:function(gO,gW,gV){var gR=this;this.size+=gW.length;this.height+=gV;for(var gQ=0;gQ<this.children.length;++gQ){var gN=gR.children[gQ],gT=gN.chunkSize();if(gO<=gT){gN.insertInner(gO,gW,gV);if(gN.lines&&gN.lines.length>50){var gP=gN.lines.length%25+25;for(var gU=gP;gU<gN.lines.length;){var gS=new fh(gN.lines.slice(gU,gU+=25));gN.height-=gS.height;gR.children.splice(++gQ,0,gS);gS.parent=gR}gN.lines=gN.lines.slice(0,gP);gR.maybeSpill()}break}gO-=gT}},maybeSpill:function(){if(this.children.length<=10){return}var gP=this;do{var gN=gP.children.splice(gP.children.length-5,5);var gO=new fR(gN);if(!gP.parent){var gQ=new fR(gP.children);gQ.parent=gP;gP.children=[gQ,gO];gP=gQ}else{gP.size-=gO.size;gP.height-=gO.height;var i=dr(gP.parent.children,gP);gP.parent.children.splice(i+1,0,gO)}gO.parent=gP.parent}while(gP.children.length>10);gP.parent.maybeSpill()},iterN:function(gN,gU,gT){var gS=this;for(var gO=0;gO<this.children.length;++gO){var gR=gS.children[gO],gQ=gR.chunkSize();if(gN<gQ){var gP=Math.min(gU,gQ-gN);if(gR.iterN(gN,gP,gT)){return true}if((gU-=gP)==0){break}gN=0}else{gN-=gQ}}}};function dJ(gP,gO,i){var gQ=this;if(i){for(var gN in i){if(i.hasOwnProperty(gN)){gQ[gN]=i[gN]}}}this.doc=gP;this.node=gO}bC(dJ);function d8(i,gN,gO){if(bP(gN)<((i.curOp&&i.curOp.scrollTop)||i.doc.scrollTop)){cR(i,null,gO)}}dJ.prototype.clear=function(){var gT=this;var gO=this.doc.cm,gQ=this.line.widgets,gP=this.line,gS=bQ(gP);if(gS==null||!gQ){return}for(var gR=0;gR<gQ.length;++gR){if(gQ[gR]==gT){gQ.splice(gR--,1)}}if(!gQ.length){gP.widgets=null}var gN=c4(this);gz(gP,Math.max(0,gP.height-gN));if(gO){cS(gO,function(){d8(gO,gP,-gN);Q(gO,gS,"widget")})}};dJ.prototype.changed=function(){var gN=this.height,i=this.doc.cm,gO=this.line;this.height=null;var gP=c4(this)-gN;if(!gP){return}gz(gO,gO.height+gP);if(i){cS(i,function(){i.curOp.forceUpdate=true;d8(i,gO,gP)})}};function bJ(gR,gQ,gO,gN){var gP=new dJ(gR,gO,gN);var i=gR.cm;if(i&&gP.noHScroll){i.display.alignWidgets=true}eN(gR,gQ,"widget",function(gT){var gU=gT.widgets||(gT.widgets=[]);if(gP.insertAt==null){gU.push(gP)}else{gU.splice(Math.min(gU.length-1,Math.max(0,gP.insertAt)),0,gP)}gP.line=gT;if(i&&!fP(gR,gT)){var gS=bP(gT)<gR.scrollTop;gz(gT,gT.height+c4(gP));if(gS){cR(i,null,gP.height)}i.curOp.forceUpdate=true}return true});return gP}var a4=0;function P(gN,i){this.lines=[];this.type=i;this.doc=gN;this.id=++a4}bC(P);P.prototype.clear=function(){var gS=this;if(this.explicitlyCleared){return}var gW=this.doc.cm,gP=gW&&!gW.curOp;if(gP){cO(gW)}if(fE(this,"clear")){var gX=this.find();if(gX){ad(this,"clear",gX.from,gX.to)}}var gQ=null,gU=null;for(var gR=0;gR<this.lines.length;++gR){var gY=gS.lines[gR];var gV=ft(gY.markedSpans,gS);if(gW&&!gS.collapsed){Q(gW,bQ(gY),"text")}else{if(gW){if(gV.to!=null){gU=bQ(gY)}if(gV.from!=null){gQ=bQ(gY)}}}gY.markedSpans=eX(gY.markedSpans,gV);if(gV.from==null&&gS.collapsed&&!fP(gS.doc,gY)&&gW){gz(gY,aY(gW.display))}}if(gW&&this.collapsed&&!gW.options.lineWrapping){for(var gO=0;gO<this.lines.length;++gO){var gN=y(gS.lines[gO]),gT=ey(gN);if(gT>gW.display.maxLineLength){gW.display.maxLine=gN;gW.display.maxLineLength=gT;gW.display.maxLineChanged=true}}}if(gQ!=null&&gW&&this.collapsed){ag(gW,gQ,gU+1)}this.lines.length=0;this.explicitlyCleared=true;if(this.atomic&&this.doc.cantEdit){this.doc.cantEdit=false;if(gW){eL(gW.doc)}}if(gW){ad(gW,"markerCleared",gW,this)}if(gP){al(gW)}if(this.parent){this.parent.clear()}};P.prototype.find=function(gQ,gO){var gU=this;if(gQ==null&&this.type=="bookmark"){gQ=1}var gT,gS;for(var gP=0;gP<this.lines.length;++gP){var gN=gU.lines[gP];var gR=ft(gN.markedSpans,gU);if(gR.from!=null){gT=V(gO?gN:bQ(gN),gR.from);if(gQ==-1){return gT}}if(gR.to!=null){gS=V(gO?gN:bQ(gN),gR.to);if(gQ==1){return gS}}}return gT&&{from:gT,to:gS}};P.prototype.changed=function(){var gO=this.find(-1,true),gN=this,i=this.doc.cm;if(!gO||!i){return}cS(i,function(){var gQ=gO.line,gR=bQ(gO.line);var gP=fv(i,gR);if(gP){au(gP);i.curOp.selectionChanged=i.curOp.forceUpdate=true}i.curOp.updateMaxLine=true;if(!fP(gN.doc,gQ)&&gN.height!=null){var gT=gN.height;gN.height=null;var gS=c4(gN)-gT;if(gS){gz(gQ,gQ.height+gS)}}})};P.prototype.attachLine=function(i){if(!this.lines.length&&this.doc.cm){var gN=this.doc.cm.curOp;if(!gN.maybeHiddenMarkers||dr(gN.maybeHiddenMarkers,this)==-1){(gN.maybeUnhiddenMarkers||(gN.maybeUnhiddenMarkers=[])).push(this)}}this.lines.push(i)};P.prototype.detachLine=function(i){this.lines.splice(dr(this.lines,i),1);if(!this.lines.length&&this.doc.cm){var gN=this.doc.cm.curOp;(gN.maybeHiddenMarkers||(gN.maybeHiddenMarkers=[])).push(this)}};function eU(gV,gT,gU,gX,gR){if(gX&&gX.shared){return M(gV,gT,gU,gX,gR)}if(gV.cm&&!gV.cm.curOp){return c7(gV.cm,eU)(gV,gT,gU,gX,gR)}var gQ=new P(gV,gR),gW=ck(gT,gU);if(gX){aN(gX,gQ,false)}if(gW>0||gW==0&&gQ.clearWhenEmpty!==false){return gQ}if(gQ.replacedWith){gQ.collapsed=true;gQ.widgetNode=gv("span",[gQ.replacedWith],"CodeMirror-widget");if(!gX.handleMouseEvents){gQ.widgetNode.setAttribute("cm-ignore-events","true")}if(gX.insertLeft){gQ.widgetNode.insertLeft=true}}if(gQ.collapsed){if(z(gV,gT.line,gT,gU,gQ)||gT.line!=gU.line&&z(gV,gU.line,gT,gU,gQ)){throw new Error("Inserting collapsed marker partially overlapping an existing one")}bz()}if(gQ.addToHistory){f9(gV,{from:gT,to:gU,origin:"markText"},gV.sel,NaN)}var gO=gT.line,gS=gV.cm,gN;gV.iter(gO,gU.line+1,function(i){if(gS&&gQ.collapsed&&!gS.options.lineWrapping&&y(i)==gS.display.maxLine){gN=true}if(gQ.collapsed&&gO!=gT.line){gz(i,0)}ci(i,new eu(gQ,gO==gT.line?gT.ch:null,gO==gU.line?gU.ch:null));++gO});if(gQ.collapsed){gV.iter(gT.line,gU.line+1,function(i){if(fP(gV,i)){gz(i,0)}})}if(gQ.clearOnEnter){b0(gQ,"beforeCursorEnter",function(){return gQ.clear()})}if(gQ.readOnly){fU();if(gV.history.done.length||gV.history.undone.length){gV.clearHistory()}}if(gQ.collapsed){gQ.id=++a4;gQ.atomic=true}if(gS){if(gN){gS.curOp.updateMaxLine=true}if(gQ.collapsed){ag(gS,gT.line,gU.line+1)}else{if(gQ.className||gQ.title||gQ.startStyle||gQ.endStyle||gQ.css){for(var gP=gT.line;gP<=gU.line;gP++){Q(gS,gP,"text")}}}if(gQ.atomic){eL(gS.doc)}ad(gS,"markerAdded",gS,gQ)}return gQ}function x(gP,gO){var gQ=this;this.markers=gP;this.primary=gO;for(var gN=0;gN<gP.length;++gN){gP[gN].parent=gQ}}bC(x);x.prototype.clear=function(){var gO=this;if(this.explicitlyCleared){return}this.explicitlyCleared=true;for(var gN=0;gN<this.markers.length;++gN){gO.markers[gN].clear()}ad(this,"clear")};x.prototype.find=function(gN,i){return this.primary.find(gN,i)};function M(gQ,gT,gS,i,gO){i=aN(i);i.shared=false;var gR=[eU(gQ,gT,gS,i,gO)],gN=gR[0];var gP=i.widgetNode;eh(gQ,function(gV){if(gP){i.widgetNode=gP.cloneNode(true)}gR.push(eU(gV,f7(gV,gT),f7(gV,gS),i,gO));for(var gU=0;gU<gV.linked.length;++gU){if(gV.linked[gU].isParent){return}}gN=f2(gR)});return new x(gR,gN)}function e5(i){return i.findMarks(V(i.first,0),i.clipPos(V(i.lastLine())),function(gN){return gN.parent})}function dN(gS,gT){for(var gQ=0;gQ<gT.length;gQ++){var gO=gT[gQ],gU=gO.find();var gN=gS.clipPos(gU.from),gR=gS.clipPos(gU.to);if(ck(gN,gR)){var gP=eU(gS,gN,gR,gO.primary,gO.primary.type);gO.markers.push(gP);gP.parent=gO}}}function eA(gP){var gN=function(gS){var gQ=gP[gS],gU=[gQ.primary.doc];eh(gQ.primary.doc,function(i){return gU.push(i)});for(var gR=0;gR<gQ.markers.length;gR++){var gT=gQ.markers[gR];if(dr(gU,gT.doc)==-1){gT.parent=null;gQ.markers.splice(gR--,1)}}};for(var gO=0;gO<gP.length;gO++){gN(gO)}}var cw=0;var at=function(gP,gO,i,gN){if(!(this instanceof at)){return new at(gP,gO,i,gN)}if(i==null){i=0}fR.call(this,[new fh([new gy("",null)])]);this.first=i;this.scrollTop=this.scrollLeft=0;this.cantEdit=false;this.cleanGeneration=1;this.frontier=i;var gQ=V(i,0);this.sel=e8(gQ);this.history=new gk(null);this.id=++cw;this.modeOption=gO;this.lineSep=gN;this.extend=false;if(typeof gP=="string"){gP=this.splitLines(gP)}fS(this,{from:gQ,to:gQ,text:gP});bX(this,e8(gQ),Y)};at.prototype=cp(fR.prototype,{constructor:at,iter:function(gO,gN,i){if(i){this.iterN(gO-this.first,gN-gO,i)}else{this.iterN(this.first,this.first+this.size,gO)}},insert:function(gO,gP){var gN=0;for(var gQ=0;gQ<gP.length;++gQ){gN+=gP[gQ].height}this.insertInner(gO-this.first,gP,gN)},remove:function(i,gN){this.removeInner(i-this.first,gN)},getValue:function(gN){var i=a2(this,this.first,this.first+this.size);if(gN===false){return i}return i.join(gN||this.lineSeparator())},setValue:cI(function(gN){var gO=V(this.first,0),i=this.first+this.size-1;bg(this,{from:gO,to:V(i,fy(this,i).text.length),text:this.splitLines(gN),origin:"setValue",full:true},true);bX(this,e8(gO))}),replaceRange:function(gN,gP,gO,i){gP=f7(this,gP);gO=gO?f7(this,gO):gP;a1(this,gN,gP,gO,i)},getRange:function(gP,gO,gN){var i=gw(this,f7(this,gP),f7(this,gO));if(gN===false){return i}return i.join(gN||this.lineSeparator())},getLine:function(gN){var i=this.getLineHandle(gN);return i&&i.text},getLineHandle:function(i){if(cd(this,i)){return fy(this,i)}},getLineNumber:function(i){return bQ(i)},getLineHandleVisualStart:function(i){if(typeof i=="number"){i=fy(this,i)}return y(i)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(i){return f7(this,i)},getCursor:function(gO){var i=this.sel.primary(),gN;if(gO==null||gO=="head"){gN=i.head}else{if(gO=="anchor"){gN=i.anchor}else{if(gO=="end"||gO=="to"||gO===false){gN=i.to()}else{gN=i.from()}}}return gN},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:cI(function(i,gO,gN){F(this,f7(this,typeof i=="number"?V(i,gO||0):i),null,gN)}),setSelection:cI(function(gN,gO,i){F(this,f7(this,gN),f7(this,gO||gN),i)}),extendSelection:cI(function(gO,i,gN){gp(this,f7(this,gO),i&&f7(this,i),gN)}),extendSelections:cI(function(gN,i){av(this,d9(this,gN),i)}),extendSelectionsBy:cI(function(gO,i){var gN=bW(this.sel.ranges,gO);av(this,d9(this,gN),i)}),setSelections:cI(function(gN,gR,gP){var gS=this;if(!gN.length){return}var gO=[];for(var gQ=0;gQ<gN.length;gQ++){gO[gQ]=new d6(f7(gS,gN[gQ].anchor),f7(gS,gN[gQ].head))}if(gR==null){gR=Math.min(gN.length-1,this.sel.primIndex)}bX(this,cB(gO,gR),gP)}),addSelection:cI(function(gO,gP,gN){var i=this.sel.ranges.slice(0);i.push(new d6(f7(this,gO),f7(this,gP||gO)));bX(this,cB(i,i.length-1),gN)}),getSelection:function(gR){var gS=this;var gO=this.sel.ranges,gN;for(var gP=0;gP<gO.length;gP++){var gQ=gw(gS,gO[gP].from(),gO[gP].to());gN=gN?gN.concat(gQ):gQ}if(gR===false){return gN}else{return gN.join(gR||this.lineSeparator())}},getSelections:function(gR){var gS=this;var gQ=[],gN=this.sel.ranges;for(var gO=0;gO<gN.length;gO++){var gP=gw(gS,gN[gO].from(),gN[gO].to());if(gR!==false){gP=gP.join(gR||gS.lineSeparator())}gQ[gO]=gP}return gQ},replaceSelection:function(gP,gR,gN){var gQ=[];for(var gO=0;gO<this.sel.ranges.length;gO++){gQ[gO]=gP}this.replaceSelections(gQ,gR,gN||"+input")},replaceSelections:cI(function(gO,gT,gV){var gS=this;var gU=[],gQ=this.sel;for(var gR=0;gR<gQ.ranges.length;gR++){var gW=gQ.ranges[gR];gU[gR]={from:gW.from(),to:gW.to(),text:gS.splitLines(gO[gR]),origin:gV}}var gN=gT&&gT!="end"&&ae(this,gU,gT);for(var gP=gU.length-1;gP>=0;gP--){bg(gS,gU[gP])}if(gN){fr(this,gN)}else{if(this.cm){f1(this.cm)}}}),undo:cI(function(){cc(this,"undo")}),redo:cI(function(){cc(this,"redo")}),undoSelection:cI(function(){cc(this,"undo",true)}),redoSelection:cI(function(){cc(this,"redo",true)}),setExtending:function(i){this.extend=i},getExtending:function(){return this.extend},historySize:function(){var gQ=this.history,gN=0,gP=0;for(var gO=0;gO<gQ.done.length;gO++){if(!gQ.done[gO].ranges){++gN}}for(var gR=0;gR<gQ.undone.length;gR++){if(!gQ.undone[gR].ranges){++gP}}return{undo:gN,redo:gP}},clearHistory:function(){this.history=new gk(this.history.maxGeneration)},markClean:function(){this.cleanGeneration=this.changeGeneration(true)},changeGeneration:function(i){if(i){this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null}return this.history.generation},isClean:function(i){return this.history.generation==(i||this.cleanGeneration)},getHistory:function(){return{done:bS(this.history.done),undone:bS(this.history.undone)}},setHistory:function(gN){var i=this.history=new gk(this.history.maxGeneration);i.done=bS(gN.done.slice(0),null,true);i.undone=bS(gN.undone.slice(0),null,true)},setGutterMarker:cI(function(i,gN,gO){return eN(this,i,"gutter",function(gP){var gQ=gP.gutterMarkers||(gP.gutterMarkers={});gQ[gN]=gO;if(!gO&&fc(gQ)){gP.gutterMarkers=null}return true})}),clearGutter:cI(function(gO){var gP=this;var gN=this.first;this.iter(function(i){if(i.gutterMarkers&&i.gutterMarkers[gO]){eN(gP,i,"gutter",function(){i.gutterMarkers[gO]=null;if(fc(i.gutterMarkers)){i.gutterMarkers=null}return true})}++gN})}),lineInfo:function(i){var gN;if(typeof i=="number"){if(!cd(this,i)){return null}gN=i;i=fy(this,i);if(!i){return null}}else{gN=bQ(i);if(gN==null){return null}}return{line:gN,handle:i,text:i.text,gutterMarkers:i.gutterMarkers,textClass:i.textClass,bgClass:i.bgClass,wrapClass:i.wrapClass,widgets:i.widgets}},addLineClass:cI(function(gO,gN,i){return eN(this,gO,gN=="gutter"?"gutter":"class",function(gP){var gQ=gN=="text"?"textClass":gN=="background"?"bgClass":gN=="gutter"?"gutterClass":"wrapClass";if(!gP[gQ]){gP[gQ]=i}else{if(R(i).test(gP[gQ])){return false}else{gP[gQ]+=" "+i}}return true})}),removeLineClass:cI(function(gO,gN,i){return eN(this,gO,gN=="gutter"?"gutter":"class",function(gQ){var gT=gN=="text"?"textClass":gN=="background"?"bgClass":gN=="gutter"?"gutterClass":"wrapClass";var gS=gQ[gT];if(!gS){return false}else{if(i==null){gQ[gT]=null}else{var gR=gS.match(R(i));if(!gR){return false}var gP=gR.index+gR[0].length;gQ[gT]=gS.slice(0,gR.index)+(!gR.index||gP==gS.length?"":" ")+gS.slice(gP)||null}}return true})}),addLineWidget:cI(function(gO,gN,i){return bJ(this,gO,gN,i)}),removeLineWidget:function(i){i.clear()},markText:function(gO,gN,i){return eU(this,f7(this,gO),f7(this,gN),i,i&&i.type||"range")},setBookmark:function(gO,i){var gN={replacedWith:i&&(i.nodeType==null?i.widget:i),insertLeft:i&&i.insertLeft,clearWhenEmpty:false,shared:i&&i.shared,handleMouseEvents:i&&i.handleMouseEvents};gO=f7(this,gO);return eU(this,gO,gO,gN,"bookmark")},findMarksAt:function(gR){gR=f7(this,gR);var gQ=[],gO=fy(this,gR.line).markedSpans;if(gO){for(var gN=0;gN<gO.length;++gN){var gP=gO[gN];if((gP.from==null||gP.from<=gR.ch)&&(gP.to==null||gP.to>=gR.ch)){gQ.push(gP.marker.parent||gP.marker)}}}return gQ},findMarks:function(gQ,gP,gN){gQ=f7(this,gQ);gP=f7(this,gP);var gO=[],i=gQ.line;this.iter(gQ.line,gP.line+1,function(gR){var gT=gR.markedSpans;if(gT){for(var gS=0;gS<gT.length;gS++){var gU=gT[gS];if(!(gU.to!=null&&i==gQ.line&&gQ.ch>=gU.to||gU.from==null&&i!=gQ.line||gU.from!=null&&i==gP.line&&gU.from>=gP.ch)&&(!gN||gN(gU.marker))){gO.push(gU.marker.parent||gU.marker)}}}++i});return gO},getAllMarks:function(){var i=[];this.iter(function(gO){var gN=gO.markedSpans;if(gN){for(var gP=0;gP<gN.length;++gP){if(gN[gP].from!=null){i.push(gN[gP].marker)}}}});return i},posFromIndex:function(gP){var gN,i=this.first,gO=this.lineSeparator().length;this.iter(function(gQ){var gR=gQ.text.length+gO;if(gR>gP){gN=gP;return true}gP-=gR;++i});return f7(this,V(i,gN))},indexFromPos:function(gO){gO=f7(this,gO);var i=gO.ch;if(gO.line<this.first||gO.ch<0){return 0}var gN=this.lineSeparator().length;this.iter(this.first,gO.line,function(gP){i+=gP.text.length+gN});return i},copy:function(i){var gN=new at(a2(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep);gN.scrollTop=this.scrollTop;gN.scrollLeft=this.scrollLeft;gN.sel=this.sel;gN.extend=false;if(i){gN.history.undoDepth=this.history.undoDepth;gN.setHistory(this.getHistory())}return gN},linkedDoc:function(i){if(!i){i={}}var gP=this.first,gO=this.first+this.size;if(i.from!=null&&i.from>gP){gP=i.from}if(i.to!=null&&i.to<gO){gO=i.to}var gN=new at(a2(this,gP,gO),i.mode||this.modeOption,gP,this.lineSep);if(i.sharedHist){gN.history=this.history}(this.linked||(this.linked=[])).push({doc:gN,sharedHist:i.sharedHist});gN.linked=[{doc:this,isParent:true,sharedHist:i.sharedHist}];dN(gN,e5(this));return gN},unlinkDoc:function(gO){var gR=this;if(gO instanceof fn){gO=gO.doc}if(this.linked){for(var gP=0;gP<this.linked.length;++gP){var gQ=gR.linked[gP];if(gQ.doc!=gO){continue}gR.linked.splice(gP,1);gO.unlinkDoc(gR);eA(e5(gR));break}}if(gO.history==this.history){var gN=[gO.id];eh(gO,function(i){return gN.push(i.id)},true);gO.history=new gk(null);gO.history.done=bS(this.history.done,gN);gO.history.undone=bS(this.history.undone,gN)}},iterLinkedDocs:function(i){eh(this,i)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(i){if(this.lineSep){return i.split(this.lineSep)}return gh(i)},lineSeparator:function(){return this.lineSep||"\n"}});at.prototype.eachLine=at.prototype.iter;var af=0;function bk(gV){var gX=this;di(gX);if(aR(gX,gV)||bb(gX.display,gV)){return}cL(gV);if(dS){af=+new Date}var gW=cs(gX,gV,true),gO=gV.dataTransfer.files;if(!gW||gX.isReadOnly()){return}if(gO&&gO.length&&window.FileReader&&window.File){var gR=gO.length,gY=Array(gR),gP=0;var gT=function(g1,g0){if(gX.options.allowDropFileTypes&&dr(gX.options.allowDropFileTypes,g1.type)==-1){return}var gZ=new FileReader;gZ.onload=c7(gX,function(){var i=gZ.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(i)){i=""}gY[g0]=i;if(++gP==gR){gW=f7(gX.doc,gW);var g2={from:gW,to:gW,text:gX.doc.splitLines(gY.join(gX.doc.lineSeparator())),origin:"paste"};bg(gX.doc,g2);fr(gX.doc,e8(gW,c3(g2)))}});gZ.readAsText(g1)};for(var gU=0;gU<gR;++gU){gT(gO[gU],gU)}}else{if(gX.state.draggingText&&gX.doc.sel.contains(gW)>-1){gX.state.draggingText(gV);setTimeout(function(){return gX.display.input.focus()},20);return}try{var gN=gV.dataTransfer.getData("Text");if(gN){var gS;if(gX.state.draggingText&&!gX.state.draggingText.copy){gS=gX.listSelections()}eB(gX.doc,e8(gW,gW));if(gS){for(var gQ=0;gQ<gS.length;++gQ){a1(gX.doc,"",gS[gQ].anchor,gS[gQ].head,"drag")}}gX.replaceSelection(gN,"around","paste");gX.display.input.focus()}}catch(gV){}}}function O(i,gO){if(dS&&(!i.state.draggingText||+new Date-af<100)){eD(gO);return}if(aR(i,gO)||bb(i.display,gO)){return}gO.dataTransfer.setData("Text",i.getSelection());gO.dataTransfer.effectAllowed="copyMove";if(gO.dataTransfer.setDragImage&&!aC){var gN=gv("img",null,null,"position: fixed; left: 0; top: 0;");gN.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==";if(ec){gN.width=gN.height=1;i.display.wrapper.appendChild(gN);gN._top=gN.offsetTop}gO.dataTransfer.setDragImage(gN,0,0);if(ec){gN.parentNode.removeChild(gN)}}}function gK(i,gN){var gP=cs(i,gN);if(!gP){return}var gO=document.createDocumentFragment();A(i,gP,gO);if(!i.display.dragCursor){i.display.dragCursor=gv("div",null,"CodeMirror-cursors CodeMirror-dragcursors");i.display.lineSpace.insertBefore(i.display.dragCursor,i.display.cursorDiv)}bV(i.display.dragCursor,gO)}function di(i){if(i.display.dragCursor){i.display.lineSpace.removeChild(i.display.dragCursor);i.display.dragCursor=null}}function aA(gQ){if(!document.body.getElementsByClassName){return}var gP=document.body.getElementsByClassName("CodeMirror");for(var gO=0;gO<gP.length;gO++){var gN=gP[gO].CodeMirror;if(gN){gQ(gN)}}}var cH=false;function bj(){if(cH){return}f0();cH=true}function f0(){var i;b0(window,"resize",function(){if(i==null){i=setTimeout(function(){i=null;aA(aT)},100)}});b0(window,"blur",function(){return aA(aV)})}function aT(i){var gN=i.display;if(gN.lastWrapHeight==gN.wrapper.clientHeight&&gN.lastWrapWidth==gN.wrapper.clientWidth){return}gN.cachedCharWidth=gN.cachedTextHeight=gN.cachedPaddingH=null;gN.scrollbarsClipped=false;i.setSize()}var fA={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"};for(var fQ=0;fQ<10;fQ++){fA[fQ+48]=fA[fQ+96]=String(fQ)}for(var gj=65;gj<=90;gj++){fA[gj]=String.fromCharCode(gj)}for(var gi=1;gi<=12;gi++){fA[gi+111]=fA[gi+63235]="F"+gi}var fu={};fu.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"};fu.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"};fu.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"};fu.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"]};fu["default"]=cb?fu.macDefault:fu.pcDefault;function dB(gO){var gU=gO.split(/-(?!$)/);gO=gU[gU.length-1];var gT,gS,gN,gR;for(var gQ=0;gQ<gU.length-1;gQ++){var gP=gU[gQ];if(/^(cmd|meta|m)$/i.test(gP)){gR=true}else{if(/^a(lt)?$/i.test(gP)){gT=true}else{if(/^(c|ctrl|control)$/i.test(gP)){gS=true}else{if(/^s(hift)?$/i.test(gP)){gN=true}else{throw new Error("Unrecognized modifier name: "+gP)}}}}}if(gT){gO="Alt-"+gO}if(gS){gO="Ctrl-"+gO}if(gR){gO="Cmd-"+gO}if(gN){gO="Shift-"+gO}return gO}function cM(gU){var gO={};for(var gT in gU){if(gU.hasOwnProperty(gT)){var gV=gU[gT];if(/^(name|fallthrough|(de|at)tach)$/.test(gT)){continue}if(gV=="..."){delete gU[gT];continue}var gW=bW(gT.split(" "),dB);for(var gS=0;gS<gW.length;gS++){var gQ=void 0,gP=void 0;if(gS==gW.length-1){gP=gW.join(" ");gQ=gV}else{gP=gW.slice(0,gS+1).join(" ");gQ="..."}var gR=gO[gP];if(!gR){gO[gP]=gQ}else{if(gR!=gQ){throw new Error("Inconsistent bindings for "+gP)}}}delete gU[gT]}}for(var gN in gO){gU[gN]=gO[gN]}return gU}function j(gQ,gR,gT,gP){gR=go(gR);var gS=gR.call?gR.call(gQ,gP):gR[gQ];if(gS===false){return"nothing"}if(gS==="..."){return"multi"}if(gS!=null&&gT(gS)){return"handled"}if(gR.fallthrough){if(Object.prototype.toString.call(gR.fallthrough)!="[object Array]"){return j(gQ,gR.fallthrough,gT,gP)}for(var gO=0;gO<gR.fallthrough.length;gO++){var gN=j(gQ,gR.fallthrough[gO],gT,gP);if(gN){return gN}}}}function eO(gN){var i=typeof gN=="string"?gN:fA[gN.keyCode];return i=="Ctrl"||i=="Alt"||i=="Shift"||i=="Mod"}function fK(gN,gP){if(ec&&gN.keyCode==34&&gN["char"]){return false}var gO=fA[gN.keyCode],i=gO;if(i==null||gN.altGraphKey){return false}if(gN.altKey&&gO!="Alt"){i="Alt-"+i}if((bT?gN.metaKey:gN.ctrlKey)&&gO!="Ctrl"){i="Ctrl-"+i}if((bT?gN.ctrlKey:gN.metaKey)&&gO!="Cmd"){i="Cmd-"+i}if(!gP&&gN.shiftKey&&gO!="Shift"){i="Shift-"+i}return i}function go(i){return typeof i=="string"?fu[i]:i}function ff(gN,gT){var gO=gN.doc.sel.ranges,gR=[];for(var gQ=0;gQ<gO.length;gQ++){var gP=gT(gO[gQ]);while(gR.length&&ck(gP.from,f2(gR).to)<=0){var gS=gR.pop();if(ck(gS.from,gP.from)<0){gP.from=gS.from;break}}gR.push(gP)}cS(gN,function(){for(var gU=gR.length-1;gU>=0;gU--){a1(gN.doc,"",gR[gU].from,gR[gU].to,"+delete")}f1(gN)})}var eR={selectAll:ak,singleSelection:function(i){return i.setSelection(i.getCursor("anchor"),i.getCursor("head"),Y)},killLine:function(i){return ff(i,function(gO){if(gO.empty()){var gN=fy(i.doc,gO.head.line).text.length;if(gO.head.ch==gN&&gO.head.line<i.lastLine()){return{from:gO.head,to:V(gO.head.line+1,0)}}else{return{from:gO.head,to:V(gO.head.line,gN)}}}else{return{from:gO.from(),to:gO.to()}}})},deleteLine:function(i){return ff(i,function(gN){return({from:V(gN.from().line,0),to:f7(i.doc,V(gN.to().line+1,0))})})},delLineLeft:function(i){return ff(i,function(gN){return({from:V(gN.from().line,0),to:gN.from()})})},delWrappedLineLeft:function(i){return ff(i,function(gN){var gP=i.charCoords(gN.head,"div").top+5;var gO=i.coordsChar({left:0,top:gP},"div");return{from:gO,to:gN.from()}})},delWrappedLineRight:function(i){return ff(i,function(gN){var gP=i.charCoords(gN.head,"div").top+5;var gO=i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:gP},"div");return{from:gN.from(),to:gO}})},undo:function(i){return i.undo()},redo:function(i){return i.redo()},undoSelection:function(i){return i.undoSelection()},redoSelection:function(i){return i.redoSelection()},goDocStart:function(i){return i.extendSelection(V(i.firstLine(),0))},goDocEnd:function(i){return i.extendSelection(V(i.lastLine()))},goLineStart:function(i){return i.extendSelectionsBy(function(gN){return bv(i,gN.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(i){return i.extendSelectionsBy(function(gN){return dQ(i,gN.head)},{origin:"+move",bias:1})},goLineEnd:function(i){return i.extendSelectionsBy(function(gN){return dY(i,gN.head.line)},{origin:"+move",bias:-1})},goLineRight:function(i){return i.extendSelectionsBy(function(gN){var gO=i.charCoords(gN.head,"div").top+5;return i.coordsChar({left:i.display.lineDiv.offsetWidth+100,top:gO},"div")},c2)},goLineLeft:function(i){return i.extendSelectionsBy(function(gN){var gO=i.charCoords(gN.head,"div").top+5;return i.coordsChar({left:0,top:gO},"div")},c2)},goLineLeftSmart:function(i){return i.extendSelectionsBy(function(gN){var gO=i.charCoords(gN.head,"div").top+5;var gP=i.coordsChar({left:0,top:gO},"div");if(gP.ch<i.getLine(gP.line).search(/\S/)){return dQ(i,gN.head)}return gP},c2)},goLineUp:function(i){return i.moveV(-1,"line")},goLineDown:function(i){return i.moveV(1,"line")},goPageUp:function(i){return i.moveV(-1,"page")},goPageDown:function(i){return i.moveV(1,"page")},goCharLeft:function(i){return i.moveH(-1,"char")},goCharRight:function(i){return i.moveH(1,"char")},goColumnLeft:function(i){return i.moveH(-1,"column")},goColumnRight:function(i){return i.moveH(1,"column")},goWordLeft:function(i){return i.moveH(-1,"word")},goGroupRight:function(i){return i.moveH(1,"group")},goGroupLeft:function(i){return i.moveH(-1,"group")},goWordRight:function(i){return i.moveH(1,"word")},delCharBefore:function(i){return i.deleteH(-1,"char")},delCharAfter:function(i){return i.deleteH(1,"char")},delWordBefore:function(i){return i.deleteH(-1,"word")},delWordAfter:function(i){return i.deleteH(1,"word")},delGroupBefore:function(i){return i.deleteH(-1,"group")},delGroupAfter:function(i){return i.deleteH(1,"group")},indentAuto:function(i){return i.indentSelection("smart")},indentMore:function(i){return i.indentSelection("add")},indentLess:function(i){return i.indentSelection("subtract")},insertTab:function(i){return i.replaceSelection("\t")},insertSoftTab:function(gN){var gP=[],gO=gN.listSelections(),gS=gN.options.tabSize;for(var gR=0;gR<gO.length;gR++){var gT=gO[gR].from();var gQ=bU(gN.getLine(gT.line),gT.ch,gS);gP.push(cu(gS-gQ%gS))}gN.replaceSelections(gP)},defaultTab:function(i){if(i.somethingSelected()){i.indentSelection("add")}else{i.execCommand("insertTab")}},transposeChars:function(i){return cS(i,function(){var gP=i.listSelections(),gO=[];for(var gQ=0;gQ<gP.length;gQ++){if(!gP[gQ].empty()){continue}var gS=gP[gQ].head,gN=fy(i.doc,gS.line).text;if(gN){if(gS.ch==gN.length){gS=new V(gS.line,gS.ch-1)}if(gS.ch>0){gS=new V(gS.line,gS.ch+1);i.replaceRange(gN.charAt(gS.ch-1)+gN.charAt(gS.ch-2),V(gS.line,gS.ch-2),gS,"+transpose")}else{if(gS.line>i.doc.first){var gR=fy(i.doc,gS.line-1).text;if(gR){gS=new V(gS.line,1);i.replaceRange(gN.charAt(0)+i.doc.lineSeparator()+gR.charAt(gR.length-1),V(gS.line-1,gR.length-1),gS,"+transpose")}}}}gO.push(new d6(gS,gS))}i.setSelections(gO)})},newlineAndIndent:function(i){return cS(i,function(){var gN=i.listSelections();for(var gO=gN.length-1;gO>=0;gO--){i.replaceRange(i.doc.lineSeparator(),gN[gO].anchor,gN[gO].head,"+input")}gN=i.listSelections();for(var gP=0;gP<gN.length;gP++){i.indentLine(gN[gP].from().line,null,true)}f1(i)})},openLine:function(i){return i.replaceSelection("\n","start")},toggleOverwrite:function(i){return i.toggleOverwrite()}};function bv(gN,gQ){var gO=fy(gN.doc,gQ);var gR=y(gO);if(gR!=gO){gQ=bQ(gR)}var i=a(gR);var gP=!i?0:i[0].level%2?cY(gR):cJ(gR);return V(gQ,gP)}function dY(gO,gR){var gN,gP=fy(gO.doc,gR);while(gN=eJ(gP)){gP=gN.find(1,true).line;gR=null}var i=a(gP);var gQ=!i?gP.text.length:i[0].level%2?cJ(gP):cY(gP);return V(gR==null?bQ(gP):gR,gQ)}function dQ(gN,gS){var gR=bv(gN,gS.line);var gO=fy(gN.doc,gR.line);var i=a(gO);if(!i||i[0].level==0){var gQ=Math.max(0,gO.text.search(/\S/));var gP=gS.line==gR.line&&gS.ch<=gQ&&gS.ch;return V(gR.line,gP?0:gQ)}return gR}function gg(gN,gQ,i){if(typeof gQ=="string"){gQ=eR[gQ];if(!gQ){return false}}gN.display.input.ensurePolled();var gP=gN.display.shift,gO=false;try{if(gN.isReadOnly()){gN.state.suppressEdits=true}if(i){gN.display.shift=false}gO=gQ(gN)!=cg}finally{gN.display.shift=gP;gN.state.suppressEdits=false}return gO}function ei(gO,gP,gR){for(var gQ=0;gQ<gO.state.keyMaps.length;gQ++){var gN=j(gP,gO.state.keyMaps[gQ],gR,gO);if(gN){return gN}}return(gO.options.extraKeys&&j(gP,gO.options.extraKeys,gR,gO))||j(gP,gO.options.keyMap,gR,gO)}var dU=new gM;function bd(gN,gP,gR,gQ){var gO=gN.state.keySeq;if(gO){if(eO(gP)){return"handled"}dU.set(50,function(){if(gN.state.keySeq==gO){gN.state.keySeq=null;gN.display.input.reset()}});gP=gO+" "+gP}var i=ei(gN,gP,gQ);if(i=="multi"){gN.state.keySeq=gP}if(i=="handled"){ad(gN,"keyHandled",gN,gP,gR)}if(i=="handled"||i=="multi"){cL(gR);p(gN)}if(gO&&!i&&/\'$/.test(gP)){cL(gR);return true}return !!i}function fC(i,gO){var gN=fK(gO,true);if(!gN){return false}if(gO.shiftKey&&!i.state.keySeq){return bd(i,"Shift-"+gN,gO,function(gP){return gg(i,gP,true)})||bd(i,gN,gO,function(gP){if(typeof gP=="string"?/^go[A-Z]/.test(gP):gP.motion){return gg(i,gP)}})}else{return bd(i,gN,gO,function(gP){return gg(i,gP)})}}function et(i,gO,gN){return bd(i,"'"+gN+"'",gO,function(gP){return gg(i,gP,true)})}var dw=null;function q(gP){var i=this;i.curOp.focus=dW();if(aR(i,gP)){return}if(dS&&l<11&&gP.keyCode==27){gP.returnValue=false}var gN=gP.keyCode;i.display.shift=gN==16||gP.shiftKey;var gO=fC(i,gP);if(ec){dw=gO?gN:null;if(!gO&&gN==88&&!dh&&(cb?gP.metaKey:gP.ctrlKey)){i.replaceSelection("",null,"cut")}}if(gN==18&&!/\bCodeMirror-crosshair\b/.test(i.display.lineDiv.className)){ar(i)}}function ar(gN){var gO=gN.display.lineDiv;fW(gO,"CodeMirror-crosshair");function i(gP){if(gP.keyCode==18||!gP.altKey){h(gO,"CodeMirror-crosshair");eq(document,"keyup",i);eq(document,"mouseover",i)}}b0(document,"keyup",i);b0(document,"mouseover",i)}function bh(i){if(i.keyCode==16){this.doc.sel.shift=false}aR(this,i)}function cC(gQ){var i=this;if(bb(i.display,gQ)||aR(i,gQ)||gQ.ctrlKey&&!gQ.altKey||cb&&gQ.metaKey){return}var gP=gQ.keyCode,gN=gQ.charCode;if(ec&&gP==dw){dw=null;cL(gQ);return}if((ec&&(!gQ.which||gQ.which<10))&&fC(i,gQ)){return}var gO=String.fromCharCode(gN==null?gP:gN);if(gO=="\x08"){return}if(et(i,gQ,gO)){return}i.display.input.onKeyPress(gQ)}function eH(gO){var i=this,gN=i.display;if(aR(i,gO)||gN.activeTouch&&gN.input.supportsTouch()){return}gN.input.ensurePolled();gN.shift=gO.shiftKey;if(bb(gN,gO)){if(!c6){gN.scroller.draggable=false;setTimeout(function(){return gN.scroller.draggable=true},100)}return}if(m(i,gO)){return}var gP=cs(i,gO);window.focus();switch(gc(gO)){case 1:if(i.state.selectingText){i.state.selectingText(gO)}else{if(gP){aw(i,gO,gP)}else{if(K(gO)==gN.scroller){cL(gO)}}}break;case 2:if(c6){i.state.lastMiddleDown=+new Date}if(gP){gp(i.doc,gP)}setTimeout(function(){return gN.input.focus()},20);cL(gO);break;case 3:if(gC){ax(i,gO)}else{aj(i)}break}}var dv;var dl;function aw(gN,gS,gT){if(dS){setTimeout(cA(s,gN),0)}else{gN.curOp.focus=dW()}var gO=+new Date,gQ;if(dl&&dl.time>gO-400&&ck(dl.pos,gT)==0){gQ="triple"}else{if(dv&&dv.time>gO-400&&ck(dv.pos,gT)==0){gQ="double";dl={time:gO,pos:gT}}else{gQ="single";dv={time:gO,pos:gT}}}var gR=gN.doc.sel,i=cb?gS.metaKey:gS.ctrlKey,gP;if(gN.options.dragDrop&&e2&&!gN.isReadOnly()&&gQ=="single"&&(gP=gR.contains(gT))>-1&&(ck((gP=gR.ranges[gP]).from(),gT)<0||gT.xRel>0)&&(ck(gP.to(),gT)>0||gT.xRel<0)){a3(gN,gS,gT,i)}else{n(gN,gS,gT,gQ,i)}}function a3(gO,gR,gS,gN){var gQ=gO.display,gP=+new Date;var i=c7(gO,function(gT){if(c6){gQ.scroller.draggable=false}gO.state.draggingText=false;eq(document,"mouseup",i);eq(gQ.scroller,"drop",i);if(Math.abs(gR.clientX-gT.clientX)+Math.abs(gR.clientY-gT.clientY)<10){cL(gT);if(!gN&&+new Date-200<gP){gp(gO.doc,gS)}if(c6||dS&&l==9){setTimeout(function(){document.body.focus();gQ.input.focus()},20)}else{gQ.input.focus()}}});if(c6){gQ.scroller.draggable=true}gO.state.draggingText=i;i.copy=cb?gR.altKey:gR.ctrlKey;if(gQ.scroller.dragDrop){gQ.scroller.dragDrop()}b0(document,"mouseup",i);b0(gQ.scroller,"drop",i)}function n(gQ,g4,gP,gN,gS){var g1=gQ.display,g6=gQ.doc;cL(g4);var gO,g5,gR=g6.sel,i=gR.ranges;if(gS&&!g4.shiftKey){g5=g6.sel.contains(gP);if(g5>-1){gO=i[g5]}else{gO=new d6(gP,gP)}}else{gO=g6.sel.primary();g5=g6.sel.primIndex}if(f6?g4.shiftKey&&g4.metaKey:g4.altKey){gN="rect";if(!gS){gO=new d6(gP,gP)}gP=cs(gQ,g4,true,true);g5=-1}else{if(gN=="double"){var g2=gQ.findWordAt(gP);if(gQ.display.shift||g6.extend){gO=fO(g6,gO,g2.anchor,g2.head)}else{gO=g2}}else{if(gN=="triple"){var gV=new d6(V(gP.line,0),f7(g6,V(gP.line+1,0)));if(gQ.display.shift||g6.extend){gO=fO(g6,gO,gV.anchor,gV.head)}else{gO=gV}}else{gO=fO(g6,gO,gP)}}}if(!gS){g5=0;bX(g6,new gu([gO],0),L);gR=g6.sel}else{if(g5==-1){g5=i.length;bX(g6,cB(i.concat([gO]),g5),{scroll:false,origin:"*mouse"})}else{if(i.length>1&&i[g5].empty()&&gN=="single"&&!g4.shiftKey){bX(g6,cB(i.slice(0,g5).concat(i.slice(g5+1)),0),{scroll:false,origin:"*mouse"});gR=g6.sel}else{e(g6,g5,gO,L)}}}var g0=gP;function gZ(hh){if(ck(g0,hh)==0){return}g0=hh;if(gN=="rect"){var g9=[],he=gQ.options.tabSize;var g8=bU(fy(g6,gP.line).text,gP.ch,he);var hl=bU(fy(g6,hh.line).text,hh.ch,he);var ha=Math.min(g8,hl),hj=Math.max(g8,hl);for(var hm=Math.min(gP.line,hh.line),hc=Math.min(gQ.lastLine(),Math.max(gP.line,hh.line));hm<=hc;hm++){var hk=fy(g6,hm).text,hb=eC(hk,ha,he);if(ha==hj){g9.push(new d6(V(hm,hb),V(hm,hb)))}else{if(hk.length>hb){g9.push(new d6(V(hm,hb),V(hm,eC(hk,hj,he))))}}}if(!g9.length){g9.push(new d6(gP,gP))}bX(g6,cB(gR.ranges.slice(0,g5).concat(g9),g5),{origin:"*mouse",scroll:false});gQ.scrollIntoView(hh)}else{var hf=gO;var hd=hf.anchor,hg=hh;if(gN!="single"){var hi;if(gN=="double"){hi=gQ.findWordAt(hh)}else{hi=new d6(V(hh.line,0),f7(g6,V(hh.line+1,0)))}if(ck(hi.anchor,hd)>0){hg=hi.head;hd=aq(hf.from(),hi.anchor)}else{hg=hi.anchor;hd=bA(hf.to(),hi.head)}}var g7=gR.ranges.slice(0);g7[g5]=new d6(f7(g6,hd),hg);bX(g6,cB(g7,g5),L)}}var gX=g1.wrapper.getBoundingClientRect();var gT=0;function g3(g9){var g7=++gT;var hb=cs(gQ,g9,true,gN=="rect");if(!hb){return}if(ck(hb,g0)!=0){gQ.curOp.focus=dW();gZ(hb);var ha=ca(g1,g6);if(hb.line>=ha.to||hb.line<ha.from){setTimeout(c7(gQ,function(){if(gT==g7){g3(g9)}}),150)}}else{var g8=g9.clientY<gX.top?-20:g9.clientY>gX.bottom?20:0;if(g8){setTimeout(c7(gQ,function(){if(gT!=g7){return}g1.scroller.scrollTop+=g8;g3(g9)}),50)}}}function gW(g7){gQ.state.selectingText=false;gT=Infinity;cL(g7);g1.input.focus();eq(document,"mousemove",gY);eq(document,"mouseup",gU);g6.history.lastSelOrigin=null}var gY=c7(gQ,function(g7){if(!gc(g7)){gW(g7)}else{g3(g7)}});var gU=c7(gQ,gW);gQ.state.selectingText=gU;b0(document,"mousemove",gY);b0(document,"mouseup",gU)}function gL(gX,gT,gV,gW){var gO,gN;try{gO=gT.clientX;gN=gT.clientY}catch(gT){return false}if(gO>=Math.floor(gX.display.gutters.getBoundingClientRect().right)){return false}if(gW){cL(gT)}var gU=gX.display;var gS=gU.lineDiv.getBoundingClientRect();if(gN>gS.bottom||!fE(gX,gV)){return bO(gT)}gN-=gS.top-gU.viewOffset;for(var gQ=0;gQ<gX.options.gutters.length;++gQ){var gR=gU.gutters.childNodes[gQ];if(gR&&gR.getBoundingClientRect().right>=gO){var gY=bK(gX.doc,gN);var gP=gX.options.gutters[gQ];aE(gX,gV,gX,gY,gP,gT);return bO(gT)}}}function m(i,gN){return gL(i,gN,"gutterClick",true)}function ax(i,gN){if(bb(i.display,gN)||dp(i,gN)){return}if(aR(i,gN,"contextmenu")){return}i.display.input.onContextMenu(gN)}function dp(i,gN){if(!fE(i,"gutterContextMenu")){return false}return gL(i,gN,"gutterContextMenu",false)}function cT(i){i.display.wrapper.className=i.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+i.options.theme.replace(/(^|\s)\s*/g," cm-s-");ai(i)}var ch={toString:function(){return"CodeMirror.Init"}};var fk={};var bf={};function eW(i){var gO=i.optionHandlers;function gN(gP,gS,gR,gQ){i.defaults[gP]=gS;if(gR){gO[gP]=gQ?function(gT,gV,gU){if(gU!=ch){gR(gT,gV,gU)}}:gR}}i.defineOption=gN;i.Init=ch;gN("value","",function(gP,gQ){return gP.setValue(gQ)},true);gN("mode",null,function(gP,gQ){gP.doc.modeOption=gQ;bt(gP)},true);gN("indentUnit",2,bt,true);gN("indentWithTabs",false);gN("smartIndent",true);gN("tabSize",4,function(gP){ex(gP);ai(gP);ag(gP)},true);gN("lineSeparator",null,function(gP,gS){gP.doc.lineSep=gS;if(!gS){return}var gR=[],gT=gP.doc.first;gP.doc.iter(function(gU){for(var gW=0;;){var gV=gU.text.indexOf(gS,gW);if(gV==-1){break}gW=gV+gS.length;gR.push(V(gT,gV))}gT++});for(var gQ=gR.length-1;gQ>=0;gQ--){a1(gP.doc,gS,gR[gQ],V(gR[gQ].line,gR[gQ].ch+gS.length))}});gN("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(gP,gR,gQ){gP.state.specialChars=new RegExp(gR.source+(gR.test("\t")?"":"|\t"),"g");if(gQ!=ch){gP.refresh()}});gN("specialCharPlaceholder",fx,function(gP){return gP.refresh()},true);gN("electricChars",true);gN("inputStyle",er?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},true);gN("spellcheck",false,function(gP,gQ){return gP.getInputField().spellcheck=gQ},true);gN("rtlMoveVisually",!aP);gN("wholeLineUpdateBefore",true);gN("theme","default",function(gP){cT(gP);dE(gP)},true);gN("keyMap","default",function(gP,gT,gQ){var gR=go(gT);var gS=gQ!=ch&&go(gQ);if(gS&&gS.detach){gS.detach(gP,gR)}if(gR.attach){gR.attach(gP,gS||null)}});gN("extraKeys",null);gN("lineWrapping",false,eV,true);gN("gutters",[],function(gP){cj(gP.options);dE(gP)},true);gN("fixedGutter",true,function(gP,gQ){gP.display.gutters.style.left=gQ?d7(gP.display)+"px":"0";gP.refresh()},true);gN("coverGutterNextToScrollbar",false,function(gP){return fg(gP)},true);gN("scrollbarStyle","native",function(gP){aD(gP);fg(gP);gP.display.scrollbars.setScrollTop(gP.doc.scrollTop);gP.display.scrollbars.setScrollLeft(gP.doc.scrollLeft)},true);gN("lineNumbers",false,function(gP){cj(gP.options);dE(gP)},true);gN("firstLineNumber",1,dE,true);gN("lineNumberFormatter",function(gP){return gP},dE,true);gN("showCursorWhenSelecting",false,bF,true);gN("resetSelectionOnContextMenu",true);gN("lineWiseCopyCut",true);gN("readOnly",false,function(gP,gQ){if(gQ=="nocursor"){aV(gP);gP.display.input.blur();gP.display.disabled=true}else{gP.display.disabled=false}gP.display.input.readOnlyChanged(gQ)});gN("disableInput",false,function(gP,gQ){if(!gQ){gP.display.input.reset()}},true);gN("dragDrop",true,gs);gN("allowDropFileTypes",null);gN("cursorBlinkRate",530);gN("cursorScrollMargin",0);gN("cursorHeight",1,bF,true);gN("singleCursorHeightPerLine",true,bF,true);gN("workTime",100);gN("workDelay",100);gN("flattenSpans",true,ex,true);gN("addModeClass",false,ex,true);gN("pollInterval",100);gN("undoDepth",200,function(gP,gQ){return gP.doc.history.undoDepth=gQ});gN("historyEventDelay",1250);gN("viewportMargin",10,function(gP){return gP.refresh()},true);gN("maxHighlightLength",10000,ex,true);gN("moveInputWithCursor",true,function(gP,gQ){if(!gQ){gP.display.input.resetPosition()}});gN("tabindex",null,function(gP,gQ){return gP.display.input.getField().tabIndex=gQ||""});gN("autofocus",null)}function dE(i){en(i);ag(i);setTimeout(function(){return eT(i)},20)}function gs(gN,gQ,gO){var gR=gO&&gO!=ch;if(!gQ!=!gR){var gP=gN.display.dragFunctions;var i=gQ?b0:eq;i(gN.display.scroller,"dragstart",gP.start);i(gN.display.scroller,"dragenter",gP.enter);i(gN.display.scroller,"dragover",gP.over);i(gN.display.scroller,"dragleave",gP.leave);i(gN.display.scroller,"drop",gP.drop)}}function eV(i){if(i.options.lineWrapping){fW(i.display.wrapper,"CodeMirror-wrap");i.display.sizer.style.minWidth="";i.display.sizerWidth=null}else{h(i.display.wrapper,"CodeMirror-wrap");f(i)}X(i);ag(i);ai(i);setTimeout(function(){return fg(i)},100)}function fn(gN,gP){var gU=this;if(!(this instanceof fn)){return new fn(gN,gP)}this.options=gP=gP?aN(gP):{};aN(fk,gP,false);cj(gP);var gT=gP.value;if(typeof gT=="string"){gT=new at(gT,gP.mode,null,gP.lineSeparator)}this.doc=gT;var gO=new fn.inputStyles[gP.inputStyle](this);var gS=this.display=new eY(gN,gT,gO);gS.wrapper.CodeMirror=this;en(this);cT(this);if(gP.lineWrapping){this.display.wrapper.className+=" CodeMirror-wrap"}if(gP.autofocus&&!er){gS.input.focus()}aD(this);this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:false,delayingBlurEvent:false,focused:false,suppressEdits:false,pasteIncoming:false,cutIncoming:false,selectingText:false,draggingText:false,highlight:new gM(),keySeq:null,specialChars:null};if(dS&&l<11){setTimeout(function(){return gU.display.input.reset(true)},20)}gf(this);bj();cO(this);this.curOp.forceUpdate=true;em(this,gT);if((gP.autofocus&&!er)||this.hasFocus()){setTimeout(cA(cG,this),20)}else{aV(this)}for(var gR in bf){if(bf.hasOwnProperty(gR)){bf[gR](gU,gP[gR],ch)}}ef(this);if(gP.finishInit){gP.finishInit(this)}for(var gQ=0;gQ<a8.length;++gQ){a8[gQ](gU)}al(this);if(c6&&gP.lineWrapping&&getComputedStyle(gS.lineDiv).textRendering=="optimizelegibility"){gS.lineDiv.style.textRendering="auto"}}fn.defaults=fk;fn.optionHandlers=bf;function gf(gN){var gR=gN.display;b0(gR.scroller,"mousedown",c7(gN,eH));if(dS&&l<11){b0(gR.scroller,"dblclick",c7(gN,function(gV){if(aR(gN,gV)){return}var gW=cs(gN,gV);if(!gW||m(gN,gV)||bb(gN.display,gV)){return}cL(gV);var gU=gN.findWordAt(gW);gp(gN.doc,gU.anchor,gU.head)}))}else{b0(gR.scroller,"dblclick",function(gU){return aR(gN,gU)||cL(gU)})}if(!gC){b0(gR.scroller,"contextmenu",function(gU){return ax(gN,gU)})}var gT,i={end:0};function gS(){if(gR.activeTouch){gT=setTimeout(function(){return gR.activeTouch=null},1000);i=gR.activeTouch;i.end=+new Date}}function gP(gU){if(gU.touches.length!=1){return false}var gV=gU.touches[0];return gV.radiusX<=1&&gV.radiusY<=1}function gO(gX,gU){if(gU.left==null){return true}var gW=gU.left-gX.left,gV=gU.top-gX.top;return gW*gW+gV*gV>20*20}b0(gR.scroller,"touchstart",function(gV){if(!aR(gN,gV)&&!gP(gV)){gR.input.ensurePolled();clearTimeout(gT);var gU=+new Date;gR.activeTouch={start:gU,moved:false,prev:gU-i.end<=300?i:null};if(gV.touches.length==1){gR.activeTouch.left=gV.touches[0].pageX;gR.activeTouch.top=gV.touches[0].pageY}}});b0(gR.scroller,"touchmove",function(){if(gR.activeTouch){gR.activeTouch.moved=true}});b0(gR.scroller,"touchend",function(gV){var gX=gR.activeTouch;if(gX&&!bb(gR,gV)&&gX.left!=null&&!gX.moved&&new Date-gX.start<300){var gW=gN.coordsChar(gR.activeTouch,"page"),gU;if(!gX.prev||gO(gX,gX.prev)){gU=new d6(gW,gW)}else{if(!gX.prev.prev||gO(gX,gX.prev.prev)){gU=gN.findWordAt(gW)}else{gU=new d6(V(gW.line,0),f7(gN.doc,V(gW.line+1,0)))}}gN.setSelection(gU.anchor,gU.head);gN.focus();cL(gV)}gS()});b0(gR.scroller,"touchcancel",gS);b0(gR.scroller,"scroll",function(){if(gR.scroller.clientHeight){N(gN,gR.scroller.scrollTop);bH(gN,gR.scroller.scrollLeft,true);aE(gN,"scroll",gN)}});b0(gR.scroller,"mousewheel",function(gU){return c(gN,gU)});b0(gR.scroller,"DOMMouseScroll",function(gU){return c(gN,gU)});b0(gR.wrapper,"scroll",function(){return gR.wrapper.scrollTop=gR.wrapper.scrollLeft=0});gR.dragFunctions={enter:function(gU){if(!aR(gN,gU)){eD(gU)}},over:function(gU){if(!aR(gN,gU)){gK(gN,gU);eD(gU)}},start:function(gU){return O(gN,gU)},drop:c7(gN,bk),leave:function(gU){if(!aR(gN,gU)){di(gN)}}};var gQ=gR.input.getField();b0(gQ,"keyup",function(gU){return bh.call(gN,gU)});b0(gQ,"keydown",c7(gN,q));b0(gQ,"keypress",c7(gN,cC));b0(gQ,"focus",function(gU){return cG(gN,gU)});b0(gQ,"blur",function(gU){return aV(gN,gU)})}var a8=[];fn.defineInitHook=function(i){return a8.push(i)};function ab(g2,gR,g1,gP){var g0=g2.doc,gO;if(g1==null){g1="add"}if(g1=="smart"){if(!g0.mode.indent){g1="prev"}else{gO=dK(g2,gR)}}var gV=g2.options.tabSize;var g3=fy(g0,gR),gU=bU(g3.text,null,gV);if(g3.stateAfter){g3.stateAfter=null}var gN=g3.text.match(/^\s*/)[0],gY;if(!gP&&!/\S/.test(g3.text)){gY=0;g1="not"}else{if(g1=="smart"){gY=g0.mode.indent(gO,g3.text.slice(gN.length),g3.text);if(gY==cg||gY>150){if(!gP){return}g1="prev"}}}if(g1=="prev"){if(gR>g0.first){gY=bU(fy(g0,gR-1).text,null,gV)}else{gY=0}}else{if(g1=="add"){gY=gU+g2.options.indentUnit}else{if(g1=="subtract"){gY=gU-g2.options.indentUnit}else{if(typeof g1=="number"){gY=gU+g1}}}}gY=Math.max(0,gY);var gZ="",gX=0;if(g2.options.indentWithTabs){for(var gS=Math.floor(gY/gV);gS;--gS){gX+=gV;gZ+="\t"}}if(gX<gY){gZ+=cu(gY-gX)}if(gZ!=gN){a1(g0,gZ,V(gR,0),V(gR,gN.length),"+input");g3.stateAfter=null;return true}else{for(var gQ=0;gQ<g0.sel.ranges.length;gQ++){var gT=g0.sel.ranges[gQ];if(gT.head.line==gR&&gT.head.ch<gN.length){var gW=V(gR,gN.length);e(g0,gQ,new d6(gW,gW));break}}}}var bm=null;function dc(i){bm=i}function gq(g1,gS,gQ,gP,g0){var gZ=g1.doc;g1.display.shift=false;if(!gP){gP=gZ.sel}var gR=g1.state.pasteIncoming||g0=="paste";var gU=gh(gS),gN=null;if(gR&&gP.ranges.length>1){if(bm&&bm.text.join("\n")==gS){if(gP.ranges.length%bm.text.length==0){gN=[];for(var gT=0;gT<bm.text.length;gT++){gN.push(gZ.splitLines(bm.text[gT]))}}}else{if(gU.length==gP.ranges.length){gN=bW(gU,function(i){return[i]})}}}var gV;for(var gO=gP.ranges.length-1;gO>=0;gO--){var g2=gP.ranges[gO];var gY=g2.from(),gX=g2.to();if(g2.empty()){if(gQ&&gQ>0){gY=V(gY.line,gY.ch-gQ)}else{if(g1.state.overwrite&&!gR){gX=V(gX.line,Math.min(fy(gZ,gX.line).text.length,gX.ch+f2(gU).length))}else{if(bm&&bm.lineWise&&bm.text.join("\n")==gS){gY=gX=V(gY.line,0)}}}}gV=g1.curOp.updateInput;var gW={from:gY,to:gX,text:gN?gN[gO%gN.length]:gU,origin:g0||(gR?"paste":g1.state.cutIncoming?"cut":"+input")};bg(g1.doc,gW);ad(g1,"inputRead",g1,gW)}if(gS&&!gR){gn(g1,gS)}f1(g1);g1.curOp.updateInput=gV;g1.curOp.typing=true;g1.state.pasteIncoming=g1.state.cutIncoming=false}function ba(gO,i){var gN=gO.clipboardData&&gO.clipboardData.getData("Text");if(gN){gO.preventDefault();if(!i.isReadOnly()&&!i.options.disableInput){cS(i,function(){return gq(i,gN,0,null,"paste")})}return true}}function gn(gN,gQ){if(!gN.options.electricChars||!gN.options.smartIndent){return}var gR=gN.doc.sel;for(var gP=gR.ranges.length-1;gP>=0;gP--){var gT=gR.ranges[gP];if(gT.head.ch>100||(gP&&gR.ranges[gP-1].head.line==gT.head.line)){continue}var gS=gN.getModeAt(gT.head);var gU=false;if(gS.electricChars){for(var gO=0;gO<gS.electricChars.length;gO++){if(gQ.indexOf(gS.electricChars.charAt(gO))>-1){gU=ab(gN,gT.head.line,"smart");break}}}else{if(gS.electricInput){if(gS.electricInput.test(fy(gN.doc,gT.head.line).text.slice(0,gT.head.ch))){gU=ab(gN,gT.head.line,"smart")}}}if(gU){ad(gN,"electricInput",gN,gT.head.line)}}}function dq(gN){var gS=[],gP=[];for(var gQ=0;gQ<gN.doc.sel.ranges.length;gQ++){var gO=gN.doc.sel.ranges[gQ].head.line;var gR={anchor:V(gO,0),head:V(gO+1,0)};gP.push(gR);gS.push(gN.getRange(gR.anchor,gR.head))}return{text:gS,ranges:gP}}function gd(gN,i){gN.setAttribute("autocorrect","off");gN.setAttribute("autocapitalize","off");gN.setAttribute("spellcheck",!!i)}function aX(){var i=gv("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none");var gN=gv("div",[i],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");if(c6){i.style.width="1000px"}else{i.setAttribute("wrap","off")}if(fj){i.style.border="1px solid black"}gd(i);return gN}var dX=function(i){var gN=i.optionHandlers;var gO=i.helpers={};i.prototype={constructor:i,focus:function(){window.focus();this.display.input.focus()},setOption:function(gR,gS){var gQ=this.options,gP=gQ[gR];if(gQ[gR]==gS&&gR!="mode"){return}gQ[gR]=gS;if(gN.hasOwnProperty(gR)){c7(this,gN[gR])(this,gS,gP)}},getOption:function(gP){return this.options[gP]},getDoc:function(){return this.doc},addKeyMap:function(gQ,gP){this.state.keyMaps[gP?"push":"unshift"](go(gQ))},removeKeyMap:function(gQ){var gR=this.state.keyMaps;for(var gP=0;gP<gR.length;++gP){if(gR[gP]==gQ||gR[gP].name==gQ){gR.splice(gP,1);return true}}},addOverlay:dg(function(gP,gQ){var gR=gP.token?gP:i.getMode(this.options,gP);if(gR.startState){throw new Error("Overlays may not be stateful.")}ce(this.state.overlays,{mode:gR,modeSpec:gP,opaque:gQ&&gQ.opaque,priority:(gQ&&gQ.priority)||0},function(gS){return gS.priority});this.state.modeGen++;ag(this)}),removeOverlay:dg(function(gP){var gT=this;var gR=this.state.overlays;for(var gQ=0;gQ<gR.length;++gQ){var gS=gR[gQ].modeSpec;if(gS==gP||typeof gP=="string"&&gS.name==gP){gR.splice(gQ,1);gT.state.modeGen++;ag(gT);return}}}),indentLine:dg(function(gR,gP,gQ){if(typeof gP!="string"&&typeof gP!="number"){if(gP==null){gP=this.options.smartIndent?"smart":"prev"}else{gP=gP?"add":"subtract"}}if(cd(this.doc,gR)){ab(this,gR,gP,gQ)}}),indentSelection:dg(function(gY){var gV=this;var gP=this.doc.sel.ranges,gS=-1;for(var gU=0;gU<gP.length;gU++){var gZ=gP[gU];if(!gZ.empty()){var gW=gZ.from(),gX=gZ.to();var gQ=Math.max(gS,gW.line);gS=Math.min(gV.lastLine(),gX.line-(gX.ch?0:1))+1;for(var gT=gQ;gT<gS;++gT){ab(gV,gT,gY)}var gR=gV.doc.sel.ranges;if(gW.ch==0&&gP.length==gR.length&&gR[gU].from().ch>0){e(gV.doc,gU,new d6(gW,gR[gU].to()),Y)}}else{if(gZ.head.line>gS){ab(gV,gZ.head.line,gY,true);gS=gZ.head.line;if(gU==gV.doc.sel.primIndex){f1(gV)}}}}}),getTokenAt:function(gQ,gP){return cv(this,gQ,gP)},getLineTokens:function(gQ,gP){return cv(this,V(gQ),gP,true)},getTokenTypeAt:function(gW){gW=f7(this.doc,gW);var gS=de(this,fy(this.doc,gW.line));var gU=0,gV=(gS.length-1)/2,gR=gW.ch;var gQ;if(gR==0){gQ=gS[2]}else{for(;;){var gP=(gU+gV)>>1;if((gP?gS[gP*2-1]:0)>=gR){gV=gP}else{if(gS[gP*2+1]<gR){gU=gP+1}else{gQ=gS[gP*2+2];break}}}}var gT=gQ?gQ.indexOf("overlay "):-1;return gT<0?gQ:gT==0?null:gQ.slice(0,gT-1)},getModeAt:function(gQ){var gP=this.doc.mode;if(!gP.innerMode){return gP}return i.innerMode(gP,this.getTokenAt(gQ).state).mode},getHelper:function(gQ,gP){return this.getHelpers(gQ,gP)[0]},getHelpers:function(gW,gV){var gT=this;var gY=[];if(!gO.hasOwnProperty(gV)){return gY}var gR=gO[gV],gU=this.getModeAt(gW);if(typeof gU[gV]=="string"){if(gR[gU[gV]]){gY.push(gR[gU[gV]])}}else{if(gU[gV]){for(var gS=0;gS<gU[gV].length;gS++){var gQ=gR[gU[gV][gS]];if(gQ){gY.push(gQ)}}}else{if(gU.helperType&&gR[gU.helperType]){gY.push(gR[gU.helperType])}else{if(gR[gU.name]){gY.push(gR[gU.name])}}}}for(var gP=0;gP<gR._global.length;gP++){var gX=gR._global[gP];if(gX.pred(gU,gT)&&dr(gY,gX.val)==-1){gY.push(gX.val)}}return gY},getStateAfter:function(gQ,gP){var gR=this.doc;gQ=db(gR,gQ==null?gR.first+gR.size-1:gQ);return dK(this,gQ+1,gP)},cursorCoords:function(gS,gQ){var gR,gP=this.doc.sel.primary();if(gS==null){gR=gP.head}else{if(typeof gS=="object"){gR=f7(this.doc,gS)}else{gR=gS?gP.from():gP.to()}}return d3(this,gR,gQ||"page")},charCoords:function(gQ,gP){return cP(this,f7(this.doc,gQ),gP||"page")},coordsChar:function(gP,gQ){gP=gI(this,gP,gQ||"page");return ge(this,gP.left,gP.top)},lineAtHeight:function(gP,gQ){gP=gI(this,{top:gP,left:0},gQ||"page").top;return bK(this.doc,gP+this.display.viewOffset)},heightAtLine:function(gQ,gU,gT){var gP=false,gR;if(typeof gQ=="number"){var gS=this.doc.first+this.doc.size-1;if(gQ<this.doc.first){gQ=this.doc.first}else{if(gQ>gS){gQ=gS;gP=true}}gR=fy(this.doc,gQ)}else{gR=gQ}return e7(this,gR,{top:0,left:0},gU||"page",gT).top+(gP?this.doc.height-bP(gR):0)},defaultTextHeight:function(){return aY(this.display)},defaultCharWidth:function(){return dL(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(gU,gR,gW,gS,gY){var gT=this.display;gU=d3(this,f7(this.doc,gU));var gV=gU.bottom,gQ=gU.left;gR.style.position="absolute";gR.setAttribute("cm-ignore-events","true");this.display.input.setUneditable(gR);gT.sizer.appendChild(gR);if(gS=="over"){gV=gU.top}else{if(gS=="above"||gS=="near"){var gP=Math.max(gT.wrapper.clientHeight,this.doc.height),gX=Math.max(gT.sizer.clientWidth,gT.lineSpace.clientWidth);if((gS=="above"||gU.bottom+gR.offsetHeight>gP)&&gU.top>gR.offsetHeight){gV=gU.top-gR.offsetHeight}else{if(gU.bottom+gR.offsetHeight<=gP){gV=gU.bottom}}if(gQ+gR.offsetWidth>gX){gQ=gX-gR.offsetWidth}}}gR.style.top=gV+"px";gR.style.left=gR.style.right="";if(gY=="right"){gQ=gT.sizer.clientWidth-gR.offsetWidth;gR.style.right="0px"}else{if(gY=="left"){gQ=0}else{if(gY=="middle"){gQ=(gT.sizer.clientWidth-gR.offsetWidth)/2}}gR.style.left=gQ+"px"}if(gW){E(this,gQ,gV,gQ+gR.offsetWidth,gV+gR.offsetHeight)}},triggerOnKeyDown:dg(q),triggerOnKeyPress:dg(cC),triggerOnKeyUp:bh,execCommand:function(gP){if(eR.hasOwnProperty(gP)){return eR[gP].call(null,this)}},triggerElectric:dg(function(gP){gn(this,gP)}),findPosH:function(gW,gS,gT,gQ){var gV=this;var gP=1;if(gS<0){gP=-1;gS=-gS}var gU=f7(this.doc,gW);for(var gR=0;gR<gS;++gR){gU=by(gV.doc,gU,gP,gT,gQ);if(gU.hitSide){break}}return gU},moveH:dg(function(gP,gQ){var gR=this;this.extendSelectionsBy(function(gS){if(gR.display.shift||gR.doc.extend||gS.empty()){return by(gR.doc,gS.head,gP,gQ,gR.options.rtlMoveVisually)}else{return gP<0?gS.from():gS.to()}},c2)}),deleteH:dg(function(gP,gQ){var gR=this.doc.sel,gS=this.doc;if(gR.somethingSelected()){gS.replaceSelection("",null,"+delete")}else{ff(this,function(gU){var gT=by(gS,gU.head,gP,gQ,false);return gP<0?{from:gT,to:gU.head}:{from:gU.head,to:gT}})}}),findPosV:function(gV,gS,gW,gY){var gR=this;var gP=1,gU=gY;if(gS<0){gP=-1;gS=-gS}var gX=f7(this.doc,gV);for(var gQ=0;gQ<gS;++gQ){var gT=d3(gR,gX,"div");if(gU==null){gU=gT.left}else{gT.left=gU}gX=bs(gR,gT,gP,gW);if(gX.hitSide){break}}return gX},moveV:dg(function(gP,gR){var gV=this;var gT=this.doc,gS=[];var gU=!this.display.shift&&!gT.extend&&gT.sel.somethingSelected();gT.extendSelectionsBy(function(gW){if(gU){return gP<0?gW.from():gW.to()}var gY=d3(gV,gW.head,"div");if(gW.goalColumn!=null){gY.left=gW.goalColumn}gS.push(gY.left);var gX=bs(gV,gY,gP,gR);if(gR=="page"&&gW==gT.sel.primary()){cR(gV,null,cP(gV,gX,"div").top-gY.top)}return gX},c2);if(gS.length){for(var gQ=0;gQ<gT.sel.ranges.length;gQ++){gT.sel.ranges[gQ].goalColumn=gS[gQ]}}}),findWordAt:function(gW){var gU=this.doc,gS=fy(gU,gW.line).text;var gV=gW.ch,gR=gW.ch;if(gS){var gT=this.getHelper(gW,"wordChars");if((gW.xRel<0||gR==gS.length)&&gV){--gV}else{++gR}var gQ=gS.charAt(gV);var gP=cF(gQ,gT)?function(gX){return cF(gX,gT)}:/\s/.test(gQ)?function(gX){return/\s/.test(gX)}:function(gX){return(!/\s/.test(gX)&&!cF(gX))};while(gV>0&&gP(gS.charAt(gV-1))){--gV}while(gR<gS.length&&gP(gS.charAt(gR))){++gR}}return new d6(V(gW.line,gV),V(gW.line,gR))},toggleOverwrite:function(gP){if(gP!=null&&gP==this.state.overwrite){return}if(this.state.overwrite=!this.state.overwrite){fW(this.display.cursorDiv,"CodeMirror-overwrite")}else{h(this.display.cursorDiv,"CodeMirror-overwrite")}aE(this,"overwriteToggle",this,this.state.overwrite)},hasFocus:function(){return this.display.input.getField()==dW()},isReadOnly:function(){return !!(this.options.readOnly||this.doc.cantEdit)},scrollTo:dg(function(gP,gQ){if(gP!=null||gQ!=null){fY(this)}if(gP!=null){this.curOp.scrollLeft=gP}if(gQ!=null){this.curOp.scrollTop=gQ}}),getScrollInfo:function(){var gP=this.display.scroller;return{left:gP.scrollLeft,top:gP.scrollTop,height:gP.scrollHeight-cZ(this)-this.display.barHeight,width:gP.scrollWidth-cZ(this)-this.display.barWidth,clientHeight:c1(this),clientWidth:du(this)}},scrollIntoView:dg(function(gR,gQ){if(gR==null){gR={from:this.doc.sel.primary().head,to:null};if(gQ==null){gQ=this.options.cursorScrollMargin}}else{if(typeof gR=="number"){gR={from:V(gR,0),to:null}}else{if(gR.from==null){gR={from:gR,to:null}}}}if(!gR.to){gR.to=gR.from}gR.margin=gQ||0;if(gR.from.line!=null){fY(this);this.curOp.scrollToPos=gR}else{var gP=G(this,Math.min(gR.from.left,gR.to.left),Math.min(gR.from.top,gR.to.top)-gR.margin,Math.max(gR.from.right,gR.to.right),Math.max(gR.from.bottom,gR.to.bottom)+gR.margin);this.scrollTo(gP.scrollLeft,gP.scrollTop)}}),setSize:dg(function(gS,gP){var gT=this;var gR=function(gU){return typeof gU=="number"||/^\d+$/.test(String(gU))?gU+"px":gU};if(gS!=null){this.display.wrapper.style.width=gR(gS)}if(gP!=null){this.display.wrapper.style.height=gR(gP)}if(this.options.lineWrapping){aO(this)}var gQ=this.display.viewFrom;this.doc.iter(gQ,this.display.viewTo,function(gU){if(gU.widgets){for(var gV=0;gV<gU.widgets.length;gV++){if(gU.widgets[gV].noHScroll){Q(gT,gQ,"widget");break}}}++gQ});this.curOp.forceUpdate=true;aE(this,"refresh",this)}),operation:function(gP){return cS(this,gP)},refresh:dg(function(){var gP=this.display.cachedTextHeight;ag(this);this.curOp.forceUpdate=true;ai(this);this.scrollTo(this.doc.scrollLeft,this.doc.scrollTop);da(this);if(gP==null||Math.abs(gP-aY(this.display))>0.5){X(this)}aE(this,"refresh",this)}),swapDoc:dg(function(gQ){var gP=this.doc;gP.cm=null;em(this,gQ);ai(this);this.display.input.reset();this.scrollTo(gQ.scrollLeft,gQ.scrollTop);this.curOp.forceScroll=true;ad(this,"swapDoc",this,gP);return gP}),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}};bC(i);i.registerHelper=function(gQ,gP,gR){if(!gO.hasOwnProperty(gQ)){gO[gQ]=i[gQ]={_global:[]}}gO[gQ][gP]=gR};i.registerGlobalHelper=function(gR,gQ,gP,gS){i.registerHelper(gR,gQ,gS);gO[gR]._global.push({pred:gP,val:gS})}};function by(g3,gQ,gY,gX,gS){var gV=gQ.line,gW=gQ.ch,g2=gY;var gN=fy(g3,gV);function g1(){var g4=gV+gY;if(g4<g3.first||g4>=g3.first+g3.size){return false}gV=g4;return gN=fy(g3,g4)}function g0(g5){var g4=(gS?u:ah)(gN,gW,gY,true);if(g4==null){if(!g5&&g1()){if(gS){gW=(gY<0?cY:cJ)(gN)}else{gW=gY<0?gN.text.length:0}}else{return false}}else{gW=g4}return true}if(gX=="char"){g0()}else{if(gX=="column"){g0(true)}else{if(gX=="word"||gX=="group"){var gZ=null,gT=gX=="group";var i=g3.cm&&g3.cm.getHelper(gQ,"wordChars");for(var gR=true;;gR=false){if(gY<0&&!g0(!gR)){break}var gO=gN.text.charAt(gW)||"\n";var gP=cF(gO,i)?"w":gT&&gO=="\n"?"n":!gT||/\s/.test(gO)?null:"p";if(gT&&!gR&&!gP){gP="s"}if(gZ&&gZ!=gP){if(gY<0){gY=1;g0()}break}if(gP){gZ=gP}if(gY>0&&!g0(!gR)){break}}}}}var gU=bY(g3,V(gV,gW),gQ,g2,true);if(!ck(gQ,gU)){gU.hitSide=true}return gU}function bs(gV,gQ,gN,gU){var gT=gV.doc,gS=gQ.left,gR;if(gU=="page"){var gP=Math.min(gV.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight);var i=Math.max(gP-0.5*aY(gV.display),3);gR=(gN>0?gQ.bottom:gQ.top)+gN*i}else{if(gU=="line"){gR=gN>0?gQ.bottom+3:gQ.top-3}}var gO;for(;;){gO=ge(gV,gS,gR);if(!gO.outside){break}if(gN<0?gR<=0:gR>=gT.height){gO.hitSide=true;break}gR+=gN*5}return gO}function dC(i){this.cm=i;this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null;this.polling=new gM();this.composing=null;this.gracePeriod=false;this.readDOMTimeout=null}dC.prototype=aN({init:function(gP){var gR=this;var gO=this,i=gO.cm;var gQ=gO.div=gP.lineDiv;gd(gQ,i.options.spellcheck);b0(gQ,"paste",function(gS){if(aR(i,gS)||ba(gS,i)){return}if(l<=11){setTimeout(c7(i,function(){if(!gO.pollContent()){ag(i)}}),20)}});b0(gQ,"compositionstart",function(gS){gR.composing={data:gS.data}});b0(gQ,"compositionupdate",function(gS){if(!gR.composing){gR.composing={data:gS.data}}});b0(gQ,"compositionend",function(gS){if(gR.composing){if(gS.data!=gR.composing.data){gR.readFromDOMSoon()}gR.composing=null}});b0(gQ,"touchstart",function(){return gO.forceCompositionEnd()});b0(gQ,"input",function(){if(!gR.composing){gR.readFromDOMSoon()}});function gN(gW){if(aR(i,gW)){return}if(i.somethingSelected()){dc({lineWise:false,text:i.getSelections()});if(gW.type=="cut"){i.replaceSelection("",null,"cut")}}else{if(!i.options.lineWiseCopyCut){return}else{var gT=dq(i);dc({lineWise:true,text:gT.text});if(gW.type=="cut"){i.operation(function(){i.setSelections(gT.ranges,0,Y);i.replaceSelection("",null,"cut")})}}}if(gW.clipboardData){gW.clipboardData.clearData();var gV=bm.text.join("\n");gW.clipboardData.setData("Text",gV);if(gW.clipboardData.getData("Text")==gV){gW.preventDefault();return}}var gU=aX(),gX=gU.firstChild;i.display.lineSpace.insertBefore(gU,i.display.lineSpace.firstChild);gX.value=bm.text.join("\n");var gS=document.activeElement;dT(gX);setTimeout(function(){i.display.lineSpace.removeChild(gU);gS.focus();if(gS==gQ){gO.showPrimarySelection()}},50)}b0(gQ,"copy",gN);b0(gQ,"cut",gN)},prepareSelection:function(){var i=f5(this.cm,false);i.focus=this.cm.state.focused;return i},showSelection:function(gN,i){if(!gN||!this.cm.display.view.length){return}if(gN.focus||i){this.showPrimarySelection()}this.showMultipleSelections(gN)},showPrimarySelection:function(){var gP=window.getSelection(),gS=this.cm.doc.sel.primary();var gQ=ay(this.cm,gP.anchorNode,gP.anchorOffset);var gU=ay(this.cm,gP.focusNode,gP.focusOffset);if(gQ&&!gQ.bad&&gU&&!gU.bad&&ck(aq(gQ,gU),gS.from())==0&&ck(bA(gQ,gU),gS.to())==0){return}var gO=cE(this.cm,gS.from());var gT=cE(this.cm,gS.to());if(!gO&&!gT){return}var gW=this.cm.display.view;var gR=gP.rangeCount&&gP.getRangeAt(0);if(!gO){gO={node:gW[0].measure.map[2],offset:0}}else{if(!gT){var gN=gW[gW.length-1].measure;var gX=gN.maps?gN.maps[gN.maps.length-1]:gN.map;gT={node:gX[gX.length-1],offset:gX[gX.length-2]-gX[gX.length-3]}}}var i;try{i=cr(gO.node,gO.offset,gT.offset,gT.node)}catch(gV){}if(i){if(!ct&&this.cm.state.focused){gP.collapse(gO.node,gO.offset);if(!i.collapsed){gP.removeAllRanges();gP.addRange(i)}}else{gP.removeAllRanges();gP.addRange(i)}if(gR&&gP.anchorNode==null){gP.addRange(gR)}else{if(ct){this.startGracePeriod()}}}this.rememberSelection()},startGracePeriod:function(){var i=this;clearTimeout(this.gracePeriod);this.gracePeriod=setTimeout(function(){i.gracePeriod=false;if(i.selectionChanged()){i.cm.operation(function(){return i.cm.curOp.selectionChanged=true})}},20)},showMultipleSelections:function(i){bV(this.cm.display.cursorDiv,i.cursors);bV(this.cm.display.selectionDiv,i.selection)},rememberSelection:function(){var i=window.getSelection();this.lastAnchorNode=i.anchorNode;this.lastAnchorOffset=i.anchorOffset;this.lastFocusNode=i.focusNode;this.lastFocusOffset=i.focusOffset},selectionInEditor:function(){var gN=window.getSelection();if(!gN.rangeCount){return false}var i=gN.getRangeAt(0).commonAncestorContainer;return gD(this.div,i)},focus:function(){if(this.cm.options.readOnly!="nocursor"){if(!this.selectionInEditor()){this.showSelection(this.prepareSelection(),true)}this.div.focus()}},blur:function(){this.div.blur()},getField:function(){return this.div},supportsTouch:function(){return true},receivedFocus:function(){var i=this;if(this.selectionInEditor()){this.pollSelection()}else{cS(this.cm,function(){return i.cm.curOp.selectionChanged=true})}function gN(){if(i.cm.state.focused){i.pollSelection();i.polling.set(i.cm.options.pollInterval,gN)}}this.polling.set(this.cm.options.pollInterval,gN)},selectionChanged:function(){var i=window.getSelection();return i.anchorNode!=this.lastAnchorNode||i.anchorOffset!=this.lastAnchorOffset||i.focusNode!=this.lastFocusNode||i.focusOffset!=this.lastFocusOffset},pollSelection:function(){if(!this.composing&&this.readDOMTimeout==null&&!this.gracePeriod&&this.selectionChanged()){var gP=window.getSelection(),i=this.cm;this.rememberSelection();var gN=ay(i,gP.anchorNode,gP.anchorOffset);var gO=ay(i,gP.focusNode,gP.focusOffset);if(gN&&gO){cS(i,function(){bX(i.doc,e8(gN,gO),Y);if(gN.bad||gO.bad){i.curOp.selectionChanged=true}})}}},pollContent:function(){if(this.readDOMTimeout!=null){clearTimeout(this.readDOMTimeout);this.readDOMTimeout=null}var gW=this.cm,g6=gW.display,g4=gW.doc.sel.primary();var g5=g4.from(),gQ=g4.to();if(g5.ch==0&&g5.line>gW.firstLine()){g5=V(g5.line-1,fy(gW.doc,g5.line-1).length)}if(gQ.ch==fy(gW.doc,gQ.line).text.length&&gQ.line<gW.lastLine()){gQ=V(gQ.line+1,0)}if(g5.line<g6.viewFrom||gQ.line>g6.viewTo-1){return false}var gT,gR,gV;if(g5.line==g6.viewFrom||(gT=dz(gW,g5.line))==0){gR=bQ(g6.view[0].line);gV=g6.view[0].node}else{gR=bQ(g6.view[gT].line);gV=g6.view[gT-1].node.nextSibling}var g3=dz(gW,gQ.line);var gY,g1;if(g3==g6.view.length-1){gY=g6.viewTo-1;g1=g6.lineDiv.lastChild}else{gY=bQ(g6.view[g3+1].line)-1;g1=g6.view[g3+1].node.previousSibling}if(!gV){return false}var g7=gW.doc.splitLines(gr(gW,gV,g1,gR,gY));var g0=gw(gW.doc,V(gR,0),V(gY,fy(gW.doc,gY).text.length));while(g7.length>1&&g0.length>1){if(f2(g7)==f2(g0)){g7.pop();g0.pop();gY--}else{if(g7[0]==g0[0]){g7.shift();g0.shift();gR++}else{break}}}var g2=0,gO=0;var gX=g7[0],gN=g0[0],i=Math.min(gX.length,gN.length);while(g2<i&&gX.charCodeAt(g2)==gN.charCodeAt(g2)){++g2}var gU=f2(g7),g8=f2(g0);var gP=Math.min(gU.length-(g7.length==1?g2:0),g8.length-(g0.length==1?g2:0));while(gO<gP&&gU.charCodeAt(gU.length-gO-1)==g8.charCodeAt(g8.length-gO-1)){++gO}g7[g7.length-1]=gU.slice(0,gU.length-gO).replace(/^\u200b+/,"");g7[0]=g7[0].slice(g2).replace(/\u200b+$/,"");var gS=V(gR,g2);var gZ=V(gY,g0.length?f2(g0).length-gO:0);if(g7.length>1||g7[0]||ck(gS,gZ)){a1(gW.doc,g7,gS,gZ,"+input");return true}},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){if(!this.composing){return}this.composing=null;if(!this.pollContent()){ag(this.cm)}this.div.blur();this.div.focus()},readFromDOMSoon:function(){var i=this;if(this.readDOMTimeout!=null){return}this.readDOMTimeout=setTimeout(function(){i.readDOMTimeout=null;if(i.composing){return}if(i.cm.isReadOnly()||!i.pollContent()){cS(i.cm,function(){return ag(i.cm)})}},80)},setUneditable:function(i){i.contentEditable="false"},onKeyPress:function(i){i.preventDefault();if(!this.cm.isReadOnly()){c7(this.cm,gq)(this.cm,String.fromCharCode(i.charCode==null?i.keyCode:i.charCode),0)}},readOnlyChanged:function(i){this.div.contentEditable=String(i!="nocursor")},onContextMenu:gm,resetPosition:gm,needsContentAttribute:true},dC.prototype);function cE(gS,gQ){var gR=fv(gS,gQ.line);if(!gR||gR.hidden){return null}var gU=fy(gS.doc,gQ.line);var gN=cy(gR,gU,gQ.line);var gO=a(gU),gP="left";if(gO){var i=aH(gO,gQ.ch);gP=i%2?"right":"left"}var gT=aK(gN.map,gQ.ch,gP);gT.offset=gT.collapse=="right"?gT.end:gT.start;return gT}function eE(gN,i){if(i){gN.bad=true}return gN}function gr(gU,gS,gT,gP,gN){var gV="",gO=false,i=gU.doc.lineSeparator();function gQ(gW){return function(gX){return gX.id==gW}}function gR(gZ){if(gZ.nodeType==1){var gW=gZ.getAttribute("cm-text");if(gW!=null){if(gW==""){gV+=gZ.textContent.replace(/\u200b/g,"")}else{gV+=gW}return}var gY=gZ.getAttribute("cm-marker"),g2;if(gY){var g0=gU.findMarks(V(gP,0),V(gN+1,0),gQ(+gY));if(g0.length&&(g2=g0[0].find())){gV+=gw(gU.doc,g2.from,g2.to).join(i)}return}if(gZ.getAttribute("contenteditable")=="false"){return}for(var gX=0;gX<gZ.childNodes.length;gX++){gR(gZ.childNodes[gX])}if(/^(pre|div|p)$/i.test(gZ.nodeName)){gO=true}}else{if(gZ.nodeType==3){var g1=gZ.nodeValue;if(!g1){return}if(gO){gV+=i;gO=false}gV+=g1}}}for(;;){gR(gS);if(gS==gT){break}gS=gS.nextSibling}return gV}function ay(gN,gQ,gS){var gR;if(gQ==gN.display.lineDiv){gR=gN.display.lineDiv.childNodes[gS];if(!gR){return eE(gN.clipPos(V(gN.display.viewTo-1)),true)}gQ=null;gS=0}else{for(gR=gQ;;gR=gR.parentNode){if(!gR||gR==gN.display.lineDiv){return null}if(gR.parentNode&&gR.parentNode==gN.display.lineDiv){break}}}for(var gP=0;gP<gN.display.view.length;gP++){var gO=gN.display.view[gP];if(gO.node==gR){return Z(gO,gQ,gS)}}}function Z(gV,gR,gT){var gO=gV.text.firstChild,gQ=false;if(!gR||!gD(gO,gR)){return eE(V(bQ(gV.line),0),true)}if(gR==gO){gQ=true;gR=gO.childNodes[gT];gT=0;if(!gR){var g1=gV.rest?f2(gV.rest):gV.line;return eE(V(bQ(g1),g1.text.length),gQ)}}var gS=gR.nodeType==3?gR:null,gZ=gR;if(!gS&&gR.childNodes.length==1&&gR.firstChild.nodeType==3){gS=gR.firstChild;if(gT){gT=gS.nodeValue.length}}while(gZ.parentNode!=gO){gZ=gZ.parentNode}var gN=gV.measure,gX=gN.maps;function gU(g3,g8,g5){for(var g7=-1;g7<(gX?gX.length:0);g7++){var g9=g7<0?gN.map:gX[g7];for(var g6=0;g6<g9.length;g6+=3){var g4=g9[g6+2];if(g4==g3||g4==g8){var ha=bQ(g7<0?gV.line:gV.rest[g7]);var g2=g9[g6]+g5;if(g5<0||g4!=g3){g2=g9[g6+(g5?1:0)]}return V(ha,g2)}}}}var g0=gU(gS,gZ,gT);if(g0){return eE(g0,gQ)}for(var i=gZ.nextSibling,gW=gS?gS.nodeValue.length-gT:0;i;i=i.nextSibling){g0=gU(i,i.firstChild,0);if(g0){return eE(V(g0.line,g0.ch-gW),gQ)}else{gW+=i.textContent.length}}for(var gY=gZ.previousSibling,gP=gT;gY;gY=gY.previousSibling){g0=gU(gY,gY.firstChild,-1);if(g0){return eE(V(g0.line,g0.ch+gP),gQ)}else{gP+=gY.textContent.length}}}function W(i){this.cm=i;this.prevInput="";this.pollingFast=false;this.polling=new gM();this.inaccurateSelection=false;this.hasSelection=false;this.composing=null}W.prototype=aN({init:function(gO){var gS=this;var gN=this,i=this.cm;var gR=this.wrapper=aX();var gP=this.textarea=gR.firstChild;gO.wrapper.insertBefore(gR,gO.wrapper.firstChild);if(fj){gP.style.width="0px"}b0(gP,"input",function(){if(dS&&l>=9&&gS.hasSelection){gS.hasSelection=null}gN.poll()});b0(gP,"paste",function(gT){if(aR(i,gT)||ba(gT,i)){return}i.state.pasteIncoming=true;gN.fastPoll()});function gQ(gU){if(aR(i,gU)){return}if(i.somethingSelected()){dc({lineWise:false,text:i.getSelections()});if(gN.inaccurateSelection){gN.prevInput="";gN.inaccurateSelection=false;gP.value=bm.text.join("\n");dT(gP)}}else{if(!i.options.lineWiseCopyCut){return}else{var gT=dq(i);dc({lineWise:true,text:gT.text});if(gU.type=="cut"){i.setSelections(gT.ranges,null,Y)}else{gN.prevInput="";gP.value=gT.text.join("\n");dT(gP)}}}if(gU.type=="cut"){i.state.cutIncoming=true}}b0(gP,"cut",gQ);b0(gP,"copy",gQ);b0(gO.scroller,"paste",function(gT){if(bb(gO,gT)||aR(i,gT)){return}i.state.pasteIncoming=true;gN.focus()});b0(gO.lineSpace,"selectstart",function(gT){if(!bb(gO,gT)){cL(gT)}});b0(gP,"compositionstart",function(){var gT=i.getCursor("from");if(gN.composing){gN.composing.range.clear()}gN.composing={start:gT,range:i.markText(gT,i.getCursor("to"),{className:"CodeMirror-composing"})}});b0(gP,"compositionend",function(){if(gN.composing){gN.poll();gN.composing.range.clear();gN.composing=null}})},prepareSelection:function(){var gN=this.cm,gR=gN.display,gQ=gN.doc;var i=f5(gN);if(gN.options.moveInputWithCursor){var gS=d3(gN,gQ.sel.primary().head,"div");var gO=gR.wrapper.getBoundingClientRect(),gP=gR.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(gR.wrapper.clientHeight-10,gS.top+gP.top-gO.top));i.teLeft=Math.max(0,Math.min(gR.wrapper.clientWidth-10,gS.left+gP.left-gO.left))}return i},showSelection:function(gO){var i=this.cm,gN=i.display;bV(gN.cursorDiv,gO.cursors);bV(gN.selectionDiv,gO.selection);if(gO.teTop!=null){this.wrapper.style.top=gO.teTop+"px";this.wrapper.style.left=gO.teLeft+"px"}},reset:function(gP){if(this.contextMenuPending){return}var gN,gO,i=this.cm,gR=i.doc;if(i.somethingSelected()){this.prevInput="";var gS=gR.sel.primary();gN=dh&&(gS.to().line-gS.from().line>100||(gO=i.getSelection()).length>1000);var gQ=gN?"-":gO||i.getSelection();this.textarea.value=gQ;if(i.state.focused){dT(this.textarea)}if(dS&&l>=9){this.hasSelection=gQ}}else{if(!gP){this.prevInput=this.textarea.value="";if(dS&&l>=9){this.hasSelection=null}}}this.inaccurateSelection=gN},getField:function(){return this.textarea},supportsTouch:function(){return false},focus:function(){if(this.cm.options.readOnly!="nocursor"&&(!er||dW()!=this.textarea)){try{this.textarea.focus()}catch(i){}}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var i=this;if(this.pollingFast){return}this.polling.set(this.cm.options.pollInterval,function(){i.poll();if(i.cm.state.focused){i.slowPoll()}})},fastPoll:function(){var gN=false,i=this;i.pollingFast=true;function gO(){var gP=i.poll();if(!gP&&!gN){gN=true;i.polling.set(60,gO)}else{i.pollingFast=false;i.slowPoll()}}i.polling.set(20,gO)},poll:function(){var gT=this;var i=this.cm,gO=this.textarea,gP=this.prevInput;if(this.contextMenuPending||!i.state.focused||(bu(gO)&&!gP&&!this.composing)||i.isReadOnly()||i.options.disableInput||i.state.keySeq){return false}var gR=gO.value;if(gR==gP&&!i.somethingSelected()){return false}if(dS&&l>=9&&this.hasSelection===gR||cb&&/[\uf700-\uf7ff]/.test(gR)){i.display.input.reset();return false}if(i.doc.sel==i.display.selForContextMenu){var gQ=gR.charCodeAt(0);if(gQ==8203&&!gP){gP="\u200b"}if(gQ==8666){this.reset();return this.cm.execCommand("undo")}}var gS=0,gN=Math.min(gP.length,gR.length);while(gS<gN&&gP.charCodeAt(gS)==gR.charCodeAt(gS)){++gS}cS(i,function(){gq(i,gR.slice(gS),gP.length-gS,null,gT.composing?"*compose":null);if(gR.length>1000||gR.indexOf("\n")>-1){gO.value=gT.prevInput=""}else{gT.prevInput=gR}if(gT.composing){gT.composing.range.clear();gT.composing.range=i.markText(gT.composing.start,i.getCursor("to"),{className:"CodeMirror-composing"})}});return true},ensurePolled:function(){if(this.pollingFast&&this.poll()){this.pollingFast=false}},onKeyPress:function(){if(dS&&l>=9){this.hasSelection=null}this.fastPoll()},onContextMenu:function(gR){var gW=this,gX=gW.cm,gT=gX.display,gN=gW.textarea;var gV=cs(gX,gR),i=gT.scroller.scrollTop;if(!gV||ec){return}var gQ=gX.options.resetSelectionOnContextMenu;if(gQ&&gX.doc.sel.contains(gV)==-1){c7(gX,bX)(gX.doc,e8(gV),Y)}var gS=gN.style.cssText,g0=gW.wrapper.style.cssText;gW.wrapper.style.cssText="position: absolute";var gZ=gW.wrapper.getBoundingClientRect();gN.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(gR.clientY-gZ.top-5)+"px; left: "+(gR.clientX-gZ.left-5)+"px;\n z-index: 1000; background: "+(dS?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var gY;if(c6){gY=window.scrollY}gT.input.focus();if(c6){window.scrollTo(null,gY)}gT.input.reset();if(!gX.somethingSelected()){gN.value=gW.prevInput=" "}gW.contextMenuPending=true;gT.selForContextMenu=gX.doc.sel;clearTimeout(gT.detectingSelectAll);function gP(){if(gN.selectionStart!=null){var g1=gX.somethingSelected();var g2="\u200b"+(g1?gN.value:"");gN.value="\u21da";gN.value=g2;gW.prevInput=g1?"":"\u200b";gN.selectionStart=1;gN.selectionEnd=g2.length;gT.selForContextMenu=gX.doc.sel}}function gU(){gW.contextMenuPending=false;gW.wrapper.style.cssText=g0;gN.style.cssText=gS;if(dS&&l<9){gT.scrollbars.setScrollTop(gT.scroller.scrollTop=i)}if(gN.selectionStart!=null){if(!dS||(dS&&l<9)){gP()}var g1=0,g2=function(){if(gT.selForContextMenu==gX.doc.sel&&gN.selectionStart==0&&gN.selectionEnd>0&&gW.prevInput=="\u200b"){c7(gX,ak)(gX)}else{if(g1++<10){gT.detectingSelectAll=setTimeout(g2,500)}else{gT.input.reset()}}};gT.detectingSelectAll=setTimeout(g2,200)}}if(dS&&l>=9){gP()}if(gC){eD(gR);var gO=function(){eq(window,"mouseup",gO);setTimeout(gU,20)};b0(window,"mouseup",gO)}else{setTimeout(gU,50)}},readOnlyChanged:function(i){if(!i){this.reset()}},setUneditable:gm,needsContentAttribute:false},W.prototype);function f3(gT,gU){gU=gU?aN(gU):{};gU.value=gT.value;if(!gU.tabindex&&gT.tabIndex){gU.tabindex=gT.tabIndex}if(!gU.placeholder&&gT.placeholder){gU.placeholder=gT.placeholder}if(gU.autofocus==null){var i=dW();gU.autofocus=i==gT||gT.getAttribute("autofocus")!=null&&i==document.body}function gQ(){gT.value=gS.getValue()}var gR;if(gT.form){b0(gT.form,"submit",gQ);if(!gU.leaveSubmitMethodAlone){var gN=gT.form;gR=gN.submit;try{var gP=gN.submit=function(){gQ();gN.submit=gR;gN.submit();gN.submit=gP}}catch(gO){}}}gU.finishInit=function(gV){gV.save=gQ;gV.getTextArea=function(){return gT};gV.toTextArea=function(){gV.toTextArea=isNaN;gQ();gT.parentNode.removeChild(gV.getWrapperElement());gT.style.display="";if(gT.form){eq(gT.form,"submit",gQ);if(typeof gT.form.submit=="function"){gT.form.submit=gR}}}};gT.style.display="none";var gS=fn(function(gV){return gT.parentNode.insertBefore(gV,gT.nextSibling)},gU);return gS}function f8(i){i.off=eq;i.on=b0;i.wheelEventPixels=az;i.Doc=at;i.splitLines=gh;i.countColumn=bU;i.findColumn=eC;i.isWordChar=fZ;i.Pass=cg;i.signal=aE;i.Line=gy;i.changeEnd=c3;i.scrollbarModel=bn;i.Pos=V;i.cmpPos=ck;i.modes=dA;i.mimeModes=aS;i.resolveMode=gE;i.getMode=fV;i.modeExtensions=dx;i.extendMode=eS;i.copyState=b7;i.startState=b4;i.innerMode=gA;i.commands=eR;i.keyMap=fu;i.keyName=fK;i.isModifierKey=eO;i.lookupKey=j;i.normalizeKeyMap=cM;i.StringStream=fb;i.SharedTextMarker=x;i.TextMarker=P;i.LineWidget=dJ;i.e_preventDefault=cL;i.e_stopPropagation=dy;i.e_stop=eD;i.addClass=fW;i.contains=gD;i.rmClass=h;i.keyNames=fA}eW(fn);dX(fn);var d="iter insert remove copy getEditor constructor".split(" ");for(var bN in at.prototype){if(at.prototype.hasOwnProperty(bN)&&dr(d,bN)<0){fn.prototype[bN]=(function(i){return function(){return i.apply(this.doc,arguments)}})(at.prototype[bN])}}bC(at);fn.inputStyles={textarea:W,contenteditable:dC};fn.defineMode=function(i){if(!fn.defaults.mode&&i!="null"){fn.defaults.mode=i}eG.apply(this,arguments)};fn.defineMIME=bo;fn.defineMode("null",function(){return({token:function(i){return i.skipToEnd()}})});fn.defineMIME("text/plain","null");fn.defineExtension=function(i,gN){fn.prototype[i]=gN};fn.defineDocExtension=function(i,gN){at.prototype[i]=gN};fn.fromTextArea=f3;f8(fn);fn.version="5.21.0";return fn})));
|
data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.htmlmixed.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b={autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,menuitem:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true};var c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,caseFold:false};a.defineMode("xml",function(m,y){var r=m.indentUnit;var z={};var l=y.htmlMode?b:c;for(var f in l){z[f]=l[f]}for(var f in y){z[f]=y[f]}var g,h;function p(G,F){function D(H){F.tokenize=H;return H(G,F)}var E=G.next();if(E=="<"){if(G.eat("!")){if(G.eat("[")){if(G.match("CDATA[")){return D(x("atom","]]>"))}else{return null}}else{if(G.match("--")){return D(x("comment","-->"))}else{if(G.match("DOCTYPE",true,true)){G.eatWhile(/[\w\._\-]/);return D(A(1))}else{return null}}}}else{if(G.eat("?")){G.eatWhile(/[\w\._\-]/);F.tokenize=x("meta","?>");return"meta"}else{g=G.eat("/")?"closeTag":"openTag";F.tokenize=o;return"tag bracket"}}}else{if(E=="&"){var C;if(G.eat("#")){if(G.eat("x")){C=G.eatWhile(/[a-fA-F\d]/)&&G.eat(";")}else{C=G.eatWhile(/[\d]/)&&G.eat(";")}}else{C=G.eatWhile(/[\w\.\-:]/)&&G.eat(";")}return C?"atom":"error"}else{G.eatWhile(/[^&<]/);return null}}}p.isInText=true;function o(F,E){var D=F.next();if(D==">"||(D=="/"&&F.eat(">"))){E.tokenize=p;g=D==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(D=="="){g="equals";return null}else{if(D=="<"){E.tokenize=p;E.state=n;E.tagName=E.tagStart=null;var C=E.tokenize(F,E);return C?C+" tag error":"tag error"}else{if(/[\'\"]/.test(D)){E.tokenize=k(D);E.stringStartCol=F.column();return E.tokenize(F,E)}else{F.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function k(C){var D=function(F,E){while(!F.eol()){if(F.next()==C){E.tokenize=o;break}}return"string"};D.isInAttribute=true;return D}function x(D,C){return function(F,E){while(!F.eol()){if(F.match(C)){E.tokenize=p;break}F.next()}return D}}function A(C){return function(F,E){var D;while((D=F.next())!=null){if(D=="<"){E.tokenize=A(C+1);return E.tokenize(F,E)}else{if(D==">"){if(C==1){E.tokenize=p;break}else{E.tokenize=A(C-1);return E.tokenize(F,E)}}}}return"meta"}}function t(D,C,E){this.prev=D.context;this.tagName=C;this.indent=D.indented;this.startOfLine=E;if(z.doNotIndent.hasOwnProperty(C)||(D.context&&D.context.noIndent)){this.noIndent=true}}function w(C){if(C.context){C.context=C.context.prev}}function s(E,D){var C;while(true){if(!E.context){return}C=E.context.tagName;if(!z.contextGrabbers.hasOwnProperty(C)||!z.contextGrabbers[C].hasOwnProperty(D)){return}w(E)}}function n(C,E,D){if(C=="openTag"){D.tagStart=E.column();return d}else{if(C=="closeTag"){return v}else{return n}}}function d(C,E,D){if(C=="word"){D.tagName=E.current();h="tag";return e}else{h="error";return d}}function v(D,F,E){if(D=="word"){var C=F.current();if(E.context&&E.context.tagName!=C&&z.implicitlyClosed.hasOwnProperty(E.context.tagName)){w(E)}if((E.context&&E.context.tagName==C)||z.matchClosing===false){h="tag";return u}else{h="tag error";return B}}else{h="error";return B}}function u(D,C,E){if(D!="endTag"){h="error";return u}w(E);return n}function B(C,E,D){h="error";return u(C,E,D)}function e(F,D,G){if(F=="word"){h="attribute";return j}else{if(F=="endTag"||F=="selfcloseTag"){var E=G.tagName,C=G.tagStart;G.tagName=G.tagStart=null;if(F=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(E)){s(G,E)}else{s(G,E);G.context=new t(G,E,C==G.indented)}return n}}h="error";return e}function j(C,E,D){if(C=="equals"){return q}if(!z.allowMissing){h="error"}return e(C,E,D)}function q(C,E,D){if(C=="string"){return i}if(C=="word"&&z.allowUnquoted){h="string";return e}h="error";return e(C,E,D)}function i(C,E,D){if(C=="string"){return i}return e(C,E,D)}return{startState:function(C){var D={tokenize:p,state:n,indented:C||0,tagName:null,tagStart:null,context:null};if(C!=null){D.baseIndent=C}return D},token:function(E,D){if(!D.tagName&&E.sol()){D.indented=E.indentation()}if(E.eatSpace()){return null}g=null;var C=D.tokenize(E,D);if((C||g)&&C!="comment"){h=null;D.state=D.state(g||C,E,D);if(h){C=h=="error"?C+" error":h}}return C},indent:function(H,D,G){var F=H.context;if(H.tokenize.isInAttribute){if(H.tagStart==H.indented){return H.stringStartCol+1}else{return H.indented+r}}if(F&&F.noIndent){return a.Pass}if(H.tokenize!=o&&H.tokenize!=p){return G?G.match(/^(\s*)/)[0].length:0}if(H.tagName){if(z.multilineTagIndentPastTag!==false){return H.tagStart+H.tagName.length+2}else{return H.tagStart+r*(z.multilineTagIndentFactor||1)}}if(z.alignCDATA&&/<!\[CDATA\[/.test(D)){return 0}var C=D&&/^<(\/)?([\w_:\.-]*)/.exec(D);if(C&&C[1]){while(F){if(F.tagName==C[2]){F=F.prev;break}else{if(z.implicitlyClosed.hasOwnProperty(F.tagName)){F=F.prev}else{break}}}}else{if(C){while(F){var E=z.contextGrabbers[F.tagName];if(E&&E.hasOwnProperty(C[2])){F=F.prev}else{break}}}}while(F&&F.prev&&!F.startOfLine){F=F.prev}if(F){return F.indent+r}else{return H.baseIndent||0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(C){if(C.state==q){C.state=e}}}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){function b(e,d,c){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(d.lastType)||(d.lastType=="quasi"&&/\{\s*$/.test(e.string.slice(0,e.pos-(c||0))))}a.defineMode("javascript",function(ac,am){var m=ac.indentUnit;var C=am.statementIndent;var aE=am.jsonld;var B=am.json||aE;var h=am.typescript;var ax=am.wordCharacters||/[\w$\xa1-\uffff]/;var av=function(){function aU(aW){return{type:aW,style:"keyword"}}var aP=aU("keyword a"),aN=aU("keyword b"),aM=aU("keyword c");var aO=aU("operator"),aS={type:"atom",style:"atom"};var aQ={"if":aU("if"),"while":aP,"with":aP,"else":aN,"do":aN,"try":aN,"finally":aN,"return":aM,"break":aM,"continue":aM,"new":aU("new"),"delete":aM,"throw":aM,"debugger":aM,"var":aU("var"),"const":aU("var"),let:aU("var"),"function":aU("function"),"catch":aU("catch"),"for":aU("for"),"switch":aU("switch"),"case":aU("case"),"default":aU("default"),"in":aO,"typeof":aO,"instanceof":aO,"true":aS,"false":aS,"null":aS,"undefined":aS,"NaN":aS,"Infinity":aS,"this":aU("this"),"class":aU("class"),"super":aU("atom"),yield:aM,"export":aU("export"),"import":aU("import"),"extends":aM};if(h){var aV={type:"variable",style:"variable-3"};var aR={"interface":aU("class"),"implements":aM,namespace:aM,module:aU("module"),"enum":aU("module"),"public":aU("modifier"),"private":aU("modifier"),"protected":aU("modifier"),"abstract":aU("modifier"),as:aO,string:aV,number:aV,"boolean":aV,any:aV};for(var aT in aR){aQ[aT]=aR[aT]}}return aQ}();var R=/[+\-*&%=<>!?|~^]/;var au=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function H(aP){var aN=false,aM,aO=false;while((aM=aP.next())!=null){if(!aN){if(aM=="/"&&!aO){return}if(aM=="["){aO=true}else{if(aO&&aM=="]"){aO=false}}}aN=!aN&&aM=="\\"}}var U,I;function N(aO,aN,aM){U=aO;I=aM;return aN}function W(aQ,aO){var aM=aQ.next();if(aM=='"'||aM=="'"){aO.tokenize=T(aM);return aO.tokenize(aQ,aO)}else{if(aM=="."&&aQ.match(/^\d+(?:[eE][+\-]?\d+)?/)){return N("number","number")}else{if(aM=="."&&aQ.match("..")){return N("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aM)){return N(aM)}else{if(aM=="="&&aQ.eat(">")){return N("=>","operator")}else{if(aM=="0"&&aQ.eat(/x/i)){aQ.eatWhile(/[\da-f]/i);return N("number","number")}else{if(aM=="0"&&aQ.eat(/o/i)){aQ.eatWhile(/[0-7]/i);return N("number","number")}else{if(aM=="0"&&aQ.eat(/b/i)){aQ.eatWhile(/[01]/i);return N("number","number")}else{if(/\d/.test(aM)){aQ.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return N("number","number")}else{if(aM=="/"){if(aQ.eat("*")){aO.tokenize=aD;return aD(aQ,aO)}else{if(aQ.eat("/")){aQ.skipToEnd();return N("comment","comment")}else{if(b(aQ,aO,1)){H(aQ);aQ.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return N("regexp","string-2")}else{aQ.eatWhile(R);return N("operator","operator",aQ.current())}}}}else{if(aM=="`"){aO.tokenize=aF;return aF(aQ,aO)}else{if(aM=="#"){aQ.skipToEnd();return N("error","error")}else{if(R.test(aM)){aQ.eatWhile(R);return N("operator","operator",aQ.current())}else{if(ax.test(aM)){aQ.eatWhile(ax);var aP=aQ.current(),aN=av.propertyIsEnumerable(aP)&&av[aP];return(aN&&aO.lastType!=".")?N(aN.type,aN.style,aP):N("variable","variable",aP)}}}}}}}}}}}}}}}function T(aM){return function(aQ,aO){var aP=false,aN;if(aE&&aQ.peek()=="@"&&aQ.match(au)){aO.tokenize=W;return N("jsonld-keyword","meta")}while((aN=aQ.next())!=null){if(aN==aM&&!aP){break}aP=!aP&&aN=="\\"}if(!aP){aO.tokenize=W}return N("string","string")}}function aD(aP,aO){var aM=false,aN;while(aN=aP.next()){if(aN=="/"&&aM){aO.tokenize=W;break}aM=(aN=="*")}return N("comment","comment")}function aF(aP,aN){var aO=false,aM;while((aM=aP.next())!=null){if(!aO&&(aM=="`"||aM=="$"&&aP.eat("{"))){aN.tokenize=W;break}aO=!aO&&aM=="\\"}return N("quasi","string-2",aP.current())}var n="([{}])";function aA(aS,aP){if(aP.fatArrowAt){aP.fatArrowAt=null}var aO=aS.string.indexOf("=>",aS.start);if(aO<0){return}var aR=0,aN=false;for(var aT=aO-1;aT>=0;--aT){var aM=aS.string.charAt(aT);var aQ=n.indexOf(aM);if(aQ>=0&&aQ<3){if(!aR){++aT;break}if(--aR==0){break}}else{if(aQ>=3&&aQ<6){++aR}else{if(ax.test(aM)){aN=true}else{if(/["'\/]/.test(aM)){return}else{if(aN&&!aR){++aT;break}}}}}}if(aN&&!aR){aP.fatArrowAt=aT}}var c={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function L(aR,aN,aM,aQ,aO,aP){this.indented=aR;this.column=aN;this.type=aM;this.prev=aO;this.info=aP;if(aQ!=null){this.align=aQ}}function u(aP,aO){for(var aN=aP.localVars;aN;aN=aN.next){if(aN.name==aO){return true}}for(var aM=aP.context;aM;aM=aM.prev){for(var aN=aM.vars;aN;aN=aN.next){if(aN.name==aO){return true}}}}function g(aQ,aN,aM,aP,aR){var aS=aQ.cc;F.state=aQ;F.stream=aR;F.marked=null,F.cc=aS;F.style=aN;if(!aQ.lexical.hasOwnProperty("align")){aQ.lexical.align=true}while(true){var aO=aS.length?aS.pop():B?aq:aK;if(aO(aM,aP)){while(aS.length&&aS[aS.length-1].lex){aS.pop()()}if(F.marked){return F.marked}if(aM=="variable"&&u(aQ,aP)){return"variable-2"}return aN}}}var F={state:null,column:null,marked:null,cc:null};function ad(){for(var aM=arguments.length-1;aM>=0;aM--){F.cc.push(arguments[aM])}}function ai(){ad.apply(null,arguments);return true}function az(aN){function aM(aQ){for(var aP=aQ;aP;aP=aP.next){if(aP.name==aN){return true}}return false}var aO=F.state;F.marked="def";if(aO.context){if(aM(aO.localVars)){return}aO.localVars={name:aN,next:aO.localVars}}else{if(aM(aO.globalVars)){return}if(am.globalVars){aO.globalVars={name:aN,next:aO.globalVars}}}}var s={name:"this",next:{name:"arguments"}};function y(){F.state.context={prev:F.state.context,vars:F.state.localVars};F.state.localVars=s}function z(){F.state.localVars=F.state.context.vars;F.state.context=F.state.context.prev}function aI(aN,aO){var aM=function(){var aR=F.state,aP=aR.indented;if(aR.lexical.type=="stat"){aP=aR.lexical.indented}else{for(var aQ=aR.lexical;aQ&&aQ.type==")"&&aQ.align;aQ=aQ.prev){aP=aQ.indented}}aR.lexical=new L(aP,F.stream.column(),aN,null,aR.lexical,aO)};aM.lex=true;return aM}function i(){var aM=F.state;if(aM.lexical.prev){if(aM.lexical.type==")"){aM.indented=aM.lexical.indented}aM.lexical=aM.lexical.prev}}i.lex=true;function t(aM){function aN(aO){if(aO==aM){return ai()}else{if(aM==";"){return ad()}else{return ai(aN)}}}return aN}function aK(aM,aN){if(aM=="var"){return ai(aI("vardef",aN.length),e,t(";"),i)}if(aM=="keyword a"){return ai(aI("form"),aq,aK,i)}if(aM=="keyword b"){return ai(aI("form"),aK,i)}if(aM=="{"){return ai(aI("}"),A,i)}if(aM==";"){return ai()}if(aM=="if"){if(F.state.lexical.info=="else"&&F.state.cc[F.state.cc.length-1]==i){F.state.cc.pop()()}return ai(aI("form"),aq,aK,i,f)}if(aM=="function"){return ai(O)}if(aM=="for"){return ai(aI("form"),w,aK,i)}if(aM=="variable"){return ai(aI("stat"),aL)}if(aM=="switch"){return ai(aI("form"),aq,aI("}","switch"),t("{"),A,i,i)}if(aM=="case"){return ai(aq,t(":"))}if(aM=="default"){return ai(t(":"))}if(aM=="catch"){return ai(aI("form"),y,t("("),ag,t(")"),aK,i,z)}if(aM=="class"){return ai(aI("form"),Y,i)}if(aM=="export"){return ai(aI("stat"),aJ,i)}if(aM=="import"){return ai(aI("stat"),aj,i)}if(aM=="module"){return ai(aI("form"),j,aI("}"),t("{"),A,i,i)}return ad(aI("stat"),aq,t(";"),i)}function aq(aM){return ab(aM,false)}function aH(aM){return ab(aM,true)}function ab(aN,aP){if(F.state.fatArrowAt==F.stream.start){var aM=aP?P:Z;if(aN=="("){return ai(y,aI(")"),aw(j,")"),i,t("=>"),aM,z)}else{if(aN=="variable"){return ad(y,j,t("=>"),aM,z)}}}var aO=aP?k:ae;if(c.hasOwnProperty(aN)){return ai(aO)}if(aN=="function"){return ai(O,aO)}if(aN=="keyword c"){return ai(aP?an:al)}if(aN=="("){return ai(aI(")"),al,aC,t(")"),i,aO)}if(aN=="operator"||aN=="spread"){return ai(aP?aH:aq)}if(aN=="["){return ai(aI("]"),o,i,aO)}if(aN=="{"){return aB(v,"}",null,aO)}if(aN=="quasi"){return ad(S,aO)}if(aN=="new"){return ai(J(aP))}return ai()}function al(aM){if(aM.match(/[;\}\)\],]/)){return ad()}return ad(aq)}function an(aM){if(aM.match(/[;\}\)\],]/)){return ad()}return ad(aH)}function ae(aM,aN){if(aM==","){return ai(aq)}return k(aM,aN,false)}function k(aM,aO,aQ){var aN=aQ==false?ae:k;var aP=aQ==false?aq:aH;if(aM=="=>"){return ai(y,aQ?P:Z,z)}if(aM=="operator"){if(/\+\+|--/.test(aO)){return ai(aN)}if(aO=="?"){return ai(aq,t(":"),aP)}return ai(aP)}if(aM=="quasi"){return ad(S,aN)}if(aM==";"){return}if(aM=="("){return aB(aH,")","call",aN)}if(aM=="."){return ai(ao,aN)}if(aM=="["){return ai(aI("]"),al,t("]"),i,aN)}}function S(aM,aN){if(aM!="quasi"){return ad()}if(aN.slice(aN.length-2)!="${"){return ai(S)}return ai(aq,r)}function r(aM){if(aM=="}"){F.marked="string-2";F.state.tokenize=aF;return ai(S)}}function Z(aM){aA(F.stream,F.state);return ad(aM=="{"?aK:aq)}function P(aM){aA(F.stream,F.state);return ad(aM=="{"?aK:aH)}function J(aM){return function(aN){if(aN=="."){return ai(aM?p:X)}else{return ad(aM?aH:aq)}}}function X(aM,aN){if(aN=="target"){F.marked="keyword";return ai(ae)}}function p(aM,aN){if(aN=="target"){F.marked="keyword";return ai(k)}}function aL(aM){if(aM==":"){return ai(i,aK)}return ad(ae,t(";"),i)}function ao(aM){if(aM=="variable"){F.marked="property";return ai()}}function v(aM,aN){if(aM=="variable"||F.style=="keyword"){F.marked="property";if(aN=="get"||aN=="set"){return ai(K)}return ai(M)}else{if(aM=="number"||aM=="string"){F.marked=aE?"property":(F.style+" property");return ai(M)}else{if(aM=="jsonld-keyword"){return ai(M)}else{if(aM=="modifier"){return ai(v)}else{if(aM=="["){return ai(aq,t("]"),M)}else{if(aM=="spread"){return ai(aq)}}}}}}}function K(aM){if(aM!="variable"){return ad(M)}F.marked="property";return ai(O)}function M(aM){if(aM==":"){return ai(aH)}if(aM=="("){return ad(O)}}function aw(aO,aM){function aN(aQ){if(aQ==","){var aP=F.state.lexical;if(aP.info=="call"){aP.pos=(aP.pos||0)+1}return ai(aO,aN)}if(aQ==aM){return ai()}return ai(t(aM))}return function(aP){if(aP==aM){return ai()}return ad(aO,aN)}}function aB(aP,aM,aO){for(var aN=3;aN<arguments.length;aN++){F.cc.push(arguments[aN])}return ai(aI(aM,aO),aw(aP,aM),i)}function A(aM){if(aM=="}"){return ai()}return ad(aK,A)}function V(aM){if(h&&aM==":"){return ai(ah)}}function ay(aM,aN){if(aN=="="){return ai(aH)}}function ah(aM){if(aM=="variable"){F.marked="variable-3";return ai()}}function e(){return ad(j,V,af,aa)}function j(aM,aN){if(aM=="modifier"){return ai(j)}if(aM=="variable"){az(aN);return ai()}if(aM=="spread"){return ai(j)}if(aM=="["){return aB(j,"]")}if(aM=="{"){return aB(aG,"}")}}function aG(aM,aN){if(aM=="variable"&&!F.stream.match(/^\s*:/,false)){az(aN);return ai(af)}if(aM=="variable"){F.marked="property"}if(aM=="spread"){return ai(j)}if(aM=="}"){return ad()}return ai(t(":"),j,af)}function af(aM,aN){if(aN=="="){return ai(aH)}}function aa(aM){if(aM==","){return ai(e)}}function f(aM,aN){if(aM=="keyword b"&&aN=="else"){return ai(aI("form","else"),aK,i)}}function w(aM){if(aM=="("){return ai(aI(")"),G,t(")"),i)}}function G(aM){if(aM=="var"){return ai(e,t(";"),E)}if(aM==";"){return ai(E)}if(aM=="variable"){return ai(x)}return ad(aq,t(";"),E)}function x(aM,aN){if(aN=="in"||aN=="of"){F.marked="keyword";return ai(aq)}return ai(ae,E)}function E(aM,aN){if(aM==";"){return ai(D)}if(aN=="in"||aN=="of"){F.marked="keyword";return ai(aq)}return ad(aq,t(";"),D)}function D(aM){if(aM!=")"){ai(aq)}}function O(aM,aN){if(aN=="*"){F.marked="keyword";return ai(O)}if(aM=="variable"){az(aN);return ai(O)}if(aM=="("){return ai(y,aI(")"),aw(ag,")"),i,aK,z)}}function ag(aM){if(aM=="spread"){return ai(ag)}return ad(j,V,ay)}function Y(aM,aN){if(aM=="variable"){az(aN);return ai(Q)}}function Q(aM,aN){if(aN=="extends"){return ai(aq,Q)}if(aM=="{"){return ai(aI("}"),q,i)}}function q(aM,aN){if(aM=="variable"||F.style=="keyword"){if(aN=="static"){F.marked="keyword";return ai(q)}F.marked="property";if(aN=="get"||aN=="set"){return ai(d,O,q)}return ai(O,q)}if(aN=="*"){F.marked="keyword";return ai(q)}if(aM==";"){return ai(q)}if(aM=="}"){return ai()}}function d(aM){if(aM!="variable"){return ad()}F.marked="property";return ai()}function aJ(aM,aN){if(aN=="*"){F.marked="keyword";return ai(ak,t(";"))}if(aN=="default"){F.marked="keyword";return ai(aq,t(";"))}return ad(aK)}function aj(aM){if(aM=="string"){return ai()}return ad(at,ak)}function at(aM,aN){if(aM=="{"){return aB(at,"}")}if(aM=="variable"){az(aN)}if(aN=="*"){F.marked="keyword"}return ai(l)}function l(aM,aN){if(aN=="as"){F.marked="keyword";return ai(at)}}function ak(aM,aN){if(aN=="from"){F.marked="keyword";return ai(aq)}}function o(aM){if(aM=="]"){return ai()}return ad(aH,ap)}function ap(aM){if(aM=="for"){return ad(aC,t("]"))}if(aM==","){return ai(aw(an,"]"))}return ad(aw(aH,"]"))}function aC(aM){if(aM=="for"){return ai(w,aC)}if(aM=="if"){return ai(aq,aC)}}function ar(aN,aM){return aN.lastType=="operator"||aN.lastType==","||R.test(aM.charAt(0))||/[,.]/.test(aM.charAt(0))}return{startState:function(aN){var aM={tokenize:W,lastType:"sof",cc:[],lexical:new L((aN||0)-m,0,"block",false),localVars:am.localVars,context:am.localVars&&{vars:am.localVars},indented:aN||0};if(am.globalVars&&typeof am.globalVars=="object"){aM.globalVars=am.globalVars}return aM},token:function(aO,aN){if(aO.sol()){if(!aN.lexical.hasOwnProperty("align")){aN.lexical.align=false}aN.indented=aO.indentation();aA(aO,aN)}if(aN.tokenize!=aD&&aO.eatSpace()){return null}var aM=aN.tokenize(aO,aN);if(U=="comment"){return aM}aN.lastType=U=="operator"&&(I=="++"||I=="--")?"incdec":U;return g(aN,aM,U,I,aO)},indent:function(aS,aM){if(aS.tokenize==aD){return a.Pass}if(aS.tokenize!=W){return 0}var aR=aM&&aM.charAt(0),aP=aS.lexical;if(!/^\s*else\b/.test(aM)){for(var aO=aS.cc.length-1;aO>=0;--aO){var aT=aS.cc[aO];if(aT==i){aP=aP.prev}else{if(aT!=f){break}}}}if(aP.type=="stat"&&aR=="}"){aP=aP.prev}if(C&&aP.type==")"&&aP.prev.type=="stat"){aP=aP.prev}var aQ=aP.type,aN=aR==aQ;if(aQ=="vardef"){return aP.indented+(aS.lastType=="operator"||aS.lastType==","?aP.info+1:0)}else{if(aQ=="form"&&aR=="{"){return aP.indented}else{if(aQ=="form"){return aP.indented+m}else{if(aQ=="stat"){return aP.indented+(ar(aS,aM)?C||m:0)}else{if(aP.info=="switch"&&!aN&&am.doubleIndentSwitch!=false){return aP.indented+(/^(?:case|default)\b/.test(aM)?m:2*m)}else{if(aP.align){return aP.column+(aN?0:1)}else{return aP.indented+(aN?0:m)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:B?null:"/*",blockCommentEnd:B?null:"*/",lineComment:B?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:B?"json":"javascript",jsonldMode:aE,jsonMode:B,expressionAllowed:b,skipExpression:function(aM){var aN=aM.cc[aM.cc.length-1];if(aN==aq||aN==aH){aM.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(r){r.defineMode("css",function(Y,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Y.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},X=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},W=J.counterDescriptors||{},O=J.colorKeywords||{},S=J.valueKeywords||{},M=J.allowNested,U=J.supportsAtComponent===true;var C,N;function Z(ac,ad){C=ad;return ac}function ab(af,ae){var ad=af.next();if(A[ad]){var ac=A[ad](af,ae);if(ac!==false){return ac}}if(ad=="@"){af.eatWhile(/[\w\\\-]/);return Z("def",af.current())}else{if(ad=="="||(ad=="~"||ad=="|")&&af.eat("=")){return Z(null,"compare")}else{if(ad=='"'||ad=="'"){ae.tokenize=K(ad);return ae.tokenize(af,ae)}else{if(ad=="#"){af.eatWhile(/[\w\\\-]/);return Z("atom","hash")}else{if(ad=="!"){af.match(/^\s*\w*/);return Z("keyword","important")}else{if(/\d/.test(ad)||ad=="."&&af.eat(/\d/)){af.eatWhile(/[\w.%]/);return Z("number","unit")}else{if(ad==="-"){if(/[\d.]/.test(af.peek())){af.eatWhile(/[\w.%]/);return Z("number","unit")}else{if(af.match(/^-[\w\\\-]+/)){af.eatWhile(/[\w\\\-]/);if(af.match(/^\s*:/,false)){return Z("variable-2","variable-definition")}return Z("variable-2","variable")}else{if(af.match(/^\w+-/)){return Z("meta","meta")}}}}else{if(/[,+>*\/]/.test(ad)){return Z(null,"select-op")}else{if(ad=="."&&af.match(/^-?[_a-z][_a-z0-9-]*/i)){return Z("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ad)){return Z(null,ad)}else{if((ad=="u"&&af.match(/rl(-prefix)?\(/))||(ad=="d"&&af.match("omain("))||(ad=="r"&&af.match("egexp("))){af.backUp(1);ae.tokenize=aa;return Z("property","word")}else{if(/[\w\\\-]/.test(ad)){af.eatWhile(/[\w\\\-]/);return Z("property","word")}else{return Z(null,null)}}}}}}}}}}}}}function K(ac){return function(ag,ae){var af=false,ad;while((ad=ag.next())!=null){if(ad==ac&&!af){if(ac==")"){ag.backUp(1)}break}af=!af&&ad=="\\"}if(ad==ac||!af&&ac!=")"){ae.tokenize=null}return Z("string","string")}}function aa(ad,ac){ad.next();if(!ad.match(/\s*[\"\')]/,false)){ac.tokenize=K(")")}else{ac.tokenize=null}return Z(null,"(")}function R(ad,ac,ae){this.type=ad;this.indent=ac;this.prev=ae}function G(ae,af,ad,ac){ae.context=new R(ad,af.indentation()+(ac===false?0:Q),ae.context);return ad}function T(ac){if(ac.context.prev){ac.context=ac.context.prev}return ac.context.type}function z(ac,ae,ad){return F[ad.context.type](ac,ae,ad)}function V(ad,af,ae,ag){for(var ac=ag||1;ac>0;ac--){ae.context=ae.context.prev}return z(ad,af,ae)}function H(ad){var ac=ad.current().toLowerCase();if(S.hasOwnProperty(ac)){N="atom"}else{if(O.hasOwnProperty(ac)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ac,ae,ad){if(ac=="{"){return G(ad,ae,"block")}else{if(ac=="}"&&ad.context.prev){return T(ad)}else{if(U&&/@component/.test(ac)){return G(ad,ae,"atComponentBlock")}else{if(/^@(-moz-)?document$/.test(ac)){return G(ad,ae,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/.test(ac)){return G(ad,ae,"atBlock")}else{if(/^@(font-face|counter-style)/.test(ac)){ad.stateArg=ac;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(ac)){return"keyframes"}else{if(ac&&ac.charAt(0)=="@"){return G(ad,ae,"at")}else{if(ac=="hash"){N="builtin"}else{if(ac=="word"){N="tag"}else{if(ac=="variable-definition"){return"maybeprop"}else{if(ac=="interpolation"){return G(ad,ae,"interpolation")}else{if(ac==":"){return"pseudo"}else{if(M&&ac=="("){return G(ad,ae,"parens")}}}}}}}}}}}}}}return ad.context.type};F.block=function(ac,af,ad){if(ac=="word"){var ae=af.current().toLowerCase();if(I.hasOwnProperty(ae)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(ae)){N="string-2";return"maybeprop"}else{if(M){N=af.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ac=="meta"){return"block"}else{if(!M&&(ac=="hash"||ac=="qualifier")){N="error";return"block"}else{return F.top(ac,af,ad)}}}};F.maybeprop=function(ac,ae,ad){if(ac==":"){return G(ad,ae,"prop")}return z(ac,ae,ad)};F.prop=function(ac,ae,ad){if(ac==";"){return T(ad)}if(ac=="{"&&M){return G(ad,ae,"propBlock")}if(ac=="}"||ac=="{"){return V(ac,ae,ad)}if(ac=="("){return G(ad,ae,"parens")}if(ac=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(ae.current())){N+=" error"}else{if(ac=="word"){H(ae)}else{if(ac=="interpolation"){return G(ad,ae,"interpolation")}}}return"prop"};F.propBlock=function(ad,ac,ae){if(ad=="}"){return T(ae)}if(ad=="word"){N="property";return"maybeprop"}return ae.context.type};F.parens=function(ac,ae,ad){if(ac=="{"||ac=="}"){return V(ac,ae,ad)}if(ac==")"){return T(ad)}if(ac=="("){return G(ad,ae,"parens")}if(ac=="interpolation"){return G(ad,ae,"interpolation")}if(ac=="word"){H(ae)}return"parens"};F.pseudo=function(ac,ae,ad){if(ac=="word"){N="variable-3";return ad.context.type}return z(ac,ae,ad)};F.documentTypes=function(ac,ae,ad){if(ac=="word"&&y.hasOwnProperty(ae.current())){N="tag";return ad.context.type}else{return F.atBlock(ac,ae,ad)}};F.atBlock=function(ac,af,ad){if(ac=="("){return G(ad,af,"atBlock_parens")}if(ac=="}"||ac==";"){return V(ac,af,ad)}if(ac=="{"){return T(ad)&&G(ad,af,M?"block":"top")}if(ac=="interpolation"){return G(ad,af,"interpolation")}if(ac=="word"){var ae=af.current().toLowerCase();if(ae=="only"||ae=="not"||ae=="and"||ae=="or"){N="keyword"}else{if(X.hasOwnProperty(ae)){N="attribute"}else{if(L.hasOwnProperty(ae)){N="property"}else{if(P.hasOwnProperty(ae)){N="keyword"}else{if(I.hasOwnProperty(ae)){N="property"}else{if(B.hasOwnProperty(ae)){N="string-2"}else{if(S.hasOwnProperty(ae)){N="atom"}else{if(O.hasOwnProperty(ae)){N="keyword"}else{N="error"}}}}}}}}}return ad.context.type};F.atComponentBlock=function(ac,ae,ad){if(ac=="}"){return V(ac,ae,ad)}if(ac=="{"){return T(ad)&&G(ad,ae,M?"block":"top",false)}if(ac=="word"){N="error"}return ad.context.type};F.atBlock_parens=function(ac,ae,ad){if(ac==")"){return T(ad)}if(ac=="{"||ac=="}"){return V(ac,ae,ad,2)}return F.atBlock(ac,ae,ad)};F.restricted_atBlock_before=function(ac,ae,ad){if(ac=="{"){return G(ad,ae,"restricted_atBlock")}if(ac=="word"&&ad.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ac,ae,ad)};F.restricted_atBlock=function(ac,ae,ad){if(ac=="}"){ad.stateArg=null;return T(ad)}if(ac=="word"){if((ad.stateArg=="@font-face"&&!E.hasOwnProperty(ae.current().toLowerCase()))||(ad.stateArg=="@counter-style"&&!W.hasOwnProperty(ae.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ac,ae,ad){if(ac=="word"){N="variable";return"keyframes"}if(ac=="{"){return G(ad,ae,"top")}return z(ac,ae,ad)};F.at=function(ac,ae,ad){if(ac==";"){return T(ad)}if(ac=="{"||ac=="}"){return V(ac,ae,ad)}if(ac=="word"){N="tag"}else{if(ac=="hash"){N="builtin"}}return"at"};F.interpolation=function(ac,ae,ad){if(ac=="}"){return T(ad)}if(ac=="{"||ac==";"){return V(ac,ae,ad)}if(ac=="word"){N="variable"}else{if(ac!="variable"&&ac!="("&&ac!=")"){N="error"}}return"interpolation"};return{startState:function(ac){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ac||0,null)}},token:function(ae,ad){if(!ad.tokenize&&ae.eatSpace()){return null}var ac=(ad.tokenize||ab)(ae,ad);if(ac&&typeof ac=="object"){C=ac[1];ac=ac[0]}N=ac;ad.state=F[ad.state](C,ae,ad);return N},indent:function(ag,ae){var ad=ag.context,af=ae&&ae.charAt(0);var ac=ad.indent;if(ad.type=="prop"&&(af=="}"||af==")")){ad=ad.prev}if(ad.prev){if(af=="}"&&(ad.type=="block"||ad.type=="top"||ad.type=="interpolation"||ad.type=="restricted_atBlock")){ad=ad.prev;ac=ad.indent}else{if(af==")"&&(ad.type=="parens"||ad.type=="atBlock_parens")||af=="{"&&(ad.type=="at"||ad.type=="atBlock")){ac=Math.max(0,ad.indent-Q);ad=ad.prev}}}return ac},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});function g(A){var z={};for(var y=0;y<A.length;++y){z[A[y]]=true}return z}var k=["domain","regexp","url","url-prefix"],a=g(k);var b=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],v=g(b);var x=["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","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],i=g(x);var l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],p=g(l);var d=["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-blend-mode","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","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"],h=g(d);var n=["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"],e=g(n);var t=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],f=g(t);var q=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],u=g(q);var 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"],m=g(c);var j=["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","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","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","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","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","lighten","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","luminosity","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","multiply","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","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","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","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","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","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],s=g(j);var o=k.concat(b).concat(x).concat(l).concat(d).concat(n).concat(c).concat(j);r.registerHelper("hintWords","css",o);function w(B,A){var y=false,z;while((z=B.next())!=null){if(y&&z=="/"){A.tokenize=null;break}y=(z=="*")}return["comment","comment"]}r.defineMIME("text/css",{documentTypes:a,mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css"});r.defineMIME("text/x-scss",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},":":function(y){if(y.match(/\s*\{/)){return[null,"{"]}return false},"$":function(y){y.match(/^[\w-]+/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(y){if(!y.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});r.defineMIME("text/x-less",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},"@":function(y){if(y.eat("{")){return[null,"interpolation"]}if(y.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,false)){return false}y.eatWhile(/[\w\\\-]/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"});r.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:v,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,supportsAtComponent:true,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css",helperType:"gss"})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(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"],a)}else{a(CodeMirror)}}})(function(d){var g={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/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 f(n,j,k){var m=n.current(),l=m.search(j);if(l>-1){n.backUp(m.length-l)}else{if(m.match(/<\/?$/)){n.backUp(m.length);if(!n.match(j,false)){n.match(m)}}}return k}var e={};function c(j){var k=e[j];if(k){return k}return e[j]=new RegExp("\\s+"+j+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function a(l,j){var k=l.match(c(j));return k?k[2]:""}function i(k,j){return new RegExp((j?"^":"")+"</s*"+k+"s*>","i")}function h(o,n){for(var j in o){var k=n[j]||(n[j]=[]);var m=o[j];for(var l=m.length-1;l>=0;l--){k.unshift(m[l])}}}function b(l,m){for(var k=0;k<l.length;k++){var j=l[k];if(!j[0]||j[1].test(a(m,j[0]))){return j[2]}}}d.defineMode("htmlmixed",function(k,o){var q=d.getMode(k,{name:"xml",htmlMode:true,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag});var j={};var p=o&&o.tags,n=o&&o.scriptTypes;h(g,j);if(p){h(p,j)}if(n){for(var m=n.length-1;m>=0;m--){j.script.unshift(["type",n[m].matches,n[m].mode])}}function l(z,r){var s=q.token(z,r.htmlState),A=/\btag\b/.test(s),u;if(A&&!/[<>\s\/]/.test(z.current())&&(u=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(u)){r.inTag=u+" "}else{if(r.inTag&&A&&/>$/.test(z.current())){var t=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var y=z.current()==">"&&b(j[t[1]],t[2]);var x=d.getMode(k,y);var w=i(t[1],true),v=i(t[1],false);r.token=function(C,B){if(C.match(w,false)){B.token=l;B.localState=B.localMode=null;return null}return f(C,v,B.localMode.token(C,B.localState))};r.localMode=x;r.localState=d.startState(x,q.indent(r.htmlState,""))}else{if(r.inTag){r.inTag+=z.current();if(z.eol()){r.inTag+=" "}}}}return s}return{startState:function(){var r=q.startState();return{token:l,inTag:null,localMode:null,localState:null,htmlState:r}},copyState:function(s){var r;if(s.localState){r=d.copyState(s.localMode,s.localState)}return{token:s.token,inTag:s.inTag,localMode:s.localMode,localState:r,htmlState:d.copyState(q,s.htmlState)}},token:function(s,r){return r.token(s,r)},indent:function(s,r){if(!s.localMode||/^\s*<\//.test(r)){return q.indent(s.htmlState,r)}else{if(s.localMode.indent){return s.localMode.indent(s.localState,r)}else{return d.Pass}}},innerMode:function(r){return{state:r.localState||r.htmlState,mode:r.localMode||q}}}},"xml","javascript","css");d.defineMIME("text/html","htmlmixed")});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(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"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("htmlembedded",function(b,c){return a.multiplexingMode(a.getMode(b,"htmlmixed"),{open:c.open||c.scriptStartRegex||"<%",close:c.close||c.scriptEndRegex||"%>",mode:a.getMode(b,c.scriptingModeSpec)})},"htmlmixed");a.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"});a.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"});a.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"});a.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})});
|
1
|
+
(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b={autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,menuitem:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true};var c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,caseFold:false};a.defineMode("xml",function(m,y){var r=m.indentUnit;var z={};var l=y.htmlMode?b:c;for(var f in l){z[f]=l[f]}for(var f in y){z[f]=y[f]}var g,h;function p(G,F){function D(H){F.tokenize=H;return H(G,F)}var E=G.next();if(E=="<"){if(G.eat("!")){if(G.eat("[")){if(G.match("CDATA[")){return D(x("atom","]]>"))}else{return null}}else{if(G.match("--")){return D(x("comment","-->"))}else{if(G.match("DOCTYPE",true,true)){G.eatWhile(/[\w\._\-]/);return D(A(1))}else{return null}}}}else{if(G.eat("?")){G.eatWhile(/[\w\._\-]/);F.tokenize=x("meta","?>");return"meta"}else{g=G.eat("/")?"closeTag":"openTag";F.tokenize=o;return"tag bracket"}}}else{if(E=="&"){var C;if(G.eat("#")){if(G.eat("x")){C=G.eatWhile(/[a-fA-F\d]/)&&G.eat(";")}else{C=G.eatWhile(/[\d]/)&&G.eat(";")}}else{C=G.eatWhile(/[\w\.\-:]/)&&G.eat(";")}return C?"atom":"error"}else{G.eatWhile(/[^&<]/);return null}}}p.isInText=true;function o(F,E){var D=F.next();if(D==">"||(D=="/"&&F.eat(">"))){E.tokenize=p;g=D==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(D=="="){g="equals";return null}else{if(D=="<"){E.tokenize=p;E.state=n;E.tagName=E.tagStart=null;var C=E.tokenize(F,E);return C?C+" tag error":"tag error"}else{if(/[\'\"]/.test(D)){E.tokenize=k(D);E.stringStartCol=F.column();return E.tokenize(F,E)}else{F.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function k(C){var D=function(F,E){while(!F.eol()){if(F.next()==C){E.tokenize=o;break}}return"string"};D.isInAttribute=true;return D}function x(D,C){return function(F,E){while(!F.eol()){if(F.match(C)){E.tokenize=p;break}F.next()}return D}}function A(C){return function(F,E){var D;while((D=F.next())!=null){if(D=="<"){E.tokenize=A(C+1);return E.tokenize(F,E)}else{if(D==">"){if(C==1){E.tokenize=p;break}else{E.tokenize=A(C-1);return E.tokenize(F,E)}}}}return"meta"}}function t(D,C,E){this.prev=D.context;this.tagName=C;this.indent=D.indented;this.startOfLine=E;if(z.doNotIndent.hasOwnProperty(C)||(D.context&&D.context.noIndent)){this.noIndent=true}}function w(C){if(C.context){C.context=C.context.prev}}function s(E,D){var C;while(true){if(!E.context){return}C=E.context.tagName;if(!z.contextGrabbers.hasOwnProperty(C)||!z.contextGrabbers[C].hasOwnProperty(D)){return}w(E)}}function n(C,E,D){if(C=="openTag"){D.tagStart=E.column();return d}else{if(C=="closeTag"){return v}else{return n}}}function d(C,E,D){if(C=="word"){D.tagName=E.current();h="tag";return e}else{h="error";return d}}function v(D,F,E){if(D=="word"){var C=F.current();if(E.context&&E.context.tagName!=C&&z.implicitlyClosed.hasOwnProperty(E.context.tagName)){w(E)}if((E.context&&E.context.tagName==C)||z.matchClosing===false){h="tag";return u}else{h="tag error";return B}}else{h="error";return B}}function u(D,C,E){if(D!="endTag"){h="error";return u}w(E);return n}function B(C,E,D){h="error";return u(C,E,D)}function e(F,D,G){if(F=="word"){h="attribute";return j}else{if(F=="endTag"||F=="selfcloseTag"){var E=G.tagName,C=G.tagStart;G.tagName=G.tagStart=null;if(F=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(E)){s(G,E)}else{s(G,E);G.context=new t(G,E,C==G.indented)}return n}}h="error";return e}function j(C,E,D){if(C=="equals"){return q}if(!z.allowMissing){h="error"}return e(C,E,D)}function q(C,E,D){if(C=="string"){return i}if(C=="word"&&z.allowUnquoted){h="string";return e}h="error";return e(C,E,D)}function i(C,E,D){if(C=="string"){return i}return e(C,E,D)}return{startState:function(C){var D={tokenize:p,state:n,indented:C||0,tagName:null,tagStart:null,context:null};if(C!=null){D.baseIndent=C}return D},token:function(E,D){if(!D.tagName&&E.sol()){D.indented=E.indentation()}if(E.eatSpace()){return null}g=null;var C=D.tokenize(E,D);if((C||g)&&C!="comment"){h=null;D.state=D.state(g||C,E,D);if(h){C=h=="error"?C+" error":h}}return C},indent:function(H,D,G){var F=H.context;if(H.tokenize.isInAttribute){if(H.tagStart==H.indented){return H.stringStartCol+1}else{return H.indented+r}}if(F&&F.noIndent){return a.Pass}if(H.tokenize!=o&&H.tokenize!=p){return G?G.match(/^(\s*)/)[0].length:0}if(H.tagName){if(z.multilineTagIndentPastTag!==false){return H.tagStart+H.tagName.length+2}else{return H.tagStart+r*(z.multilineTagIndentFactor||1)}}if(z.alignCDATA&&/<!\[CDATA\[/.test(D)){return 0}var C=D&&/^<(\/)?([\w_:\.-]*)/.exec(D);if(C&&C[1]){while(F){if(F.tagName==C[2]){F=F.prev;break}else{if(z.implicitlyClosed.hasOwnProperty(F.tagName)){F=F.prev}else{break}}}}else{if(C){while(F){var E=z.contextGrabbers[F.tagName];if(E&&E.hasOwnProperty(C[2])){F=F.prev}else{break}}}}while(F&&F.prev&&!F.startOfLine){F=F.prev}if(F){return F.indent+r}else{return H.baseIndent||0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(C){if(C.state==q){C.state=e}}}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){function b(e,d,c){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(d.lastType)||(d.lastType=="quasi"&&/\{\s*$/.test(e.string.slice(0,e.pos-(c||0))))}a.defineMode("javascript",function(af,ap){var m=af.indentUnit;var C=ap.statementIndent;var aG=ap.jsonld;var B=ap.json||aG;var g=ap.typescript;var aB=ap.wordCharacters||/[\w$\xa1-\uffff]/;var az=function(){function aX(aZ){return{type:aZ,style:"keyword"}}var aS=aX("keyword a"),aQ=aX("keyword b"),aP=aX("keyword c");var aR=aX("operator"),aV={type:"atom",style:"atom"};var aT={"if":aX("if"),"while":aS,"with":aS,"else":aQ,"do":aQ,"try":aQ,"finally":aQ,"return":aP,"break":aP,"continue":aP,"new":aX("new"),"delete":aP,"throw":aP,"debugger":aP,"var":aX("var"),"const":aX("var"),let:aX("var"),"function":aX("function"),"catch":aX("catch"),"for":aX("for"),"switch":aX("switch"),"case":aX("case"),"default":aX("default"),"in":aR,"typeof":aR,"instanceof":aR,"true":aV,"false":aV,"null":aV,"undefined":aV,"NaN":aV,"Infinity":aV,"this":aX("this"),"class":aX("class"),"super":aX("atom"),yield:aP,"export":aX("export"),"import":aX("import"),"extends":aP,await:aP,async:aX("async")};if(g){var aY={type:"variable",style:"variable-3"};var aU={"interface":aX("class"),"implements":aP,namespace:aP,module:aX("module"),"enum":aX("module"),type:aX("type"),"public":aX("modifier"),"private":aX("modifier"),"protected":aX("modifier"),"abstract":aX("modifier"),as:aR,string:aY,number:aY,"boolean":aY,any:aY};for(var aW in aU){aT[aW]=aU[aW]}}return aT}();var T=/[+\-*&%=<>!?|~^]/;var ay=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function H(aS){var aQ=false,aP,aR=false;while((aP=aS.next())!=null){if(!aQ){if(aP=="/"&&!aR){return}if(aP=="["){aR=true}else{if(aR&&aP=="]"){aR=false}}}aQ=!aQ&&aP=="\\"}}var X,I;function P(aR,aQ,aP){X=aR;I=aP;return aQ}function Z(aT,aR){var aP=aT.next();if(aP=='"'||aP=="'"){aR.tokenize=W(aP);return aR.tokenize(aT,aR)}else{if(aP=="."&&aT.match(/^\d+(?:[eE][+\-]?\d+)?/)){return P("number","number")}else{if(aP=="."&&aT.match("..")){return P("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aP)){return P(aP)}else{if(aP=="="&&aT.eat(">")){return P("=>","operator")}else{if(aP=="0"&&aT.eat(/x/i)){aT.eatWhile(/[\da-f]/i);return P("number","number")}else{if(aP=="0"&&aT.eat(/o/i)){aT.eatWhile(/[0-7]/i);return P("number","number")}else{if(aP=="0"&&aT.eat(/b/i)){aT.eatWhile(/[01]/i);return P("number","number")}else{if(/\d/.test(aP)){aT.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return P("number","number")}else{if(aP=="/"){if(aT.eat("*")){aR.tokenize=aF;return aF(aT,aR)}else{if(aT.eat("/")){aT.skipToEnd();return P("comment","comment")}else{if(b(aT,aR,1)){H(aT);aT.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return P("regexp","string-2")}else{aT.eatWhile(T);return P("operator","operator",aT.current())}}}}else{if(aP=="`"){aR.tokenize=aH;return aH(aT,aR)}else{if(aP=="#"){aT.skipToEnd();return P("error","error")}else{if(T.test(aP)){aT.eatWhile(T);return P("operator","operator",aT.current())}else{if(aB.test(aP)){aT.eatWhile(aB);var aS=aT.current(),aQ=az.propertyIsEnumerable(aS)&&az[aS];return(aQ&&aR.lastType!=".")?P(aQ.type,aQ.style,aS):P("variable","variable",aS)}}}}}}}}}}}}}}}function W(aP){return function(aT,aR){var aS=false,aQ;if(aG&&aT.peek()=="@"&&aT.match(ay)){aR.tokenize=Z;return P("jsonld-keyword","meta")}while((aQ=aT.next())!=null){if(aQ==aP&&!aS){break}aS=!aS&&aQ=="\\"}if(!aS){aR.tokenize=Z}return P("string","string")}}function aF(aS,aR){var aP=false,aQ;while(aQ=aS.next()){if(aQ=="/"&&aP){aR.tokenize=Z;break}aP=(aQ=="*")}return P("comment","comment")}function aH(aS,aQ){var aR=false,aP;while((aP=aS.next())!=null){if(!aR&&(aP=="`"||aP=="$"&&aS.eat("{"))){aQ.tokenize=Z;break}aR=!aR&&aP=="\\"}return P("quasi","string-2",aS.current())}var n="([{}])";function aD(aX,aR){if(aR.fatArrowAt){aR.fatArrowAt=null}var aW=aX.string.indexOf("=>",aX.start);if(aW<0){return}if(g){var aT=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(aX.string.slice(aX.start,aW));if(aT){aW=aT.index}}var aU=0,aS=false;for(var aV=aW-1;aV>=0;--aV){var aP=aX.string.charAt(aV);var aQ=n.indexOf(aP);if(aQ>=0&&aQ<3){if(!aU){++aV;break}if(--aU==0){if(aP=="("){aS=true}break}}else{if(aQ>=3&&aQ<6){++aU}else{if(aB.test(aP)){aS=true}else{if(/["'\/]/.test(aP)){return}else{if(aS&&!aU){++aV;break}}}}}}if(aS&&!aU){aR.fatArrowAt=aV}}var c={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function N(aU,aQ,aP,aT,aR,aS){this.indented=aU;this.column=aQ;this.type=aP;this.prev=aR;this.info=aS;if(aT!=null){this.align=aT}}function u(aS,aR){for(var aQ=aS.localVars;aQ;aQ=aQ.next){if(aQ.name==aR){return true}}for(var aP=aS.context;aP;aP=aP.prev){for(var aQ=aP.vars;aQ;aQ=aQ.next){if(aQ.name==aR){return true}}}}function f(aT,aQ,aP,aS,aU){var aV=aT.cc;G.state=aT;G.stream=aU;G.marked=null,G.cc=aV;G.style=aQ;if(!aT.lexical.hasOwnProperty("align")){aT.lexical.align=true}while(true){var aR=aV.length?aV.pop():B?au:aM;if(aR(aP,aS)){while(aV.length&&aV[aV.length-1].lex){aV.pop()()}if(G.marked){return G.marked}if(aP=="variable"&&u(aT,aS)){return"variable-2"}return aQ}}}var G={state:null,column:null,marked:null,cc:null};function ag(){for(var aP=arguments.length-1;aP>=0;aP--){G.cc.push(arguments[aP])}}function al(){ag.apply(null,arguments);return true}function aC(aQ){function aP(aT){for(var aS=aT;aS;aS=aS.next){if(aS.name==aQ){return true}}return false}var aR=G.state;G.marked="def";if(aR.context){if(aP(aR.localVars)){return}aR.localVars={name:aQ,next:aR.localVars}}else{if(aP(aR.globalVars)){return}if(ap.globalVars){aR.globalVars={name:aQ,next:aR.globalVars}}}}var s={name:"this",next:{name:"arguments"}};function y(){G.state.context={prev:G.state.context,vars:G.state.localVars};G.state.localVars=s}function z(){G.state.localVars=G.state.context.vars;G.state.context=G.state.context.prev}function aK(aQ,aR){var aP=function(){var aU=G.state,aS=aU.indented;if(aU.lexical.type=="stat"){aS=aU.lexical.indented}else{for(var aT=aU.lexical;aT&&aT.type==")"&&aT.align;aT=aT.prev){aS=aT.indented}}aU.lexical=new N(aS,G.stream.column(),aQ,null,aU.lexical,aR)};aP.lex=true;return aP}function h(){var aP=G.state;if(aP.lexical.prev){if(aP.lexical.type==")"){aP.indented=aP.lexical.indented}aP.lexical=aP.lexical.prev}}h.lex=true;function t(aP){function aQ(aR){if(aR==aP){return al()}else{if(aP==";"){return ag()}else{return al(aQ)}}}return aQ}function aM(aP,aQ){if(aP=="var"){return al(aK("vardef",aQ.length),d,t(";"),h)}if(aP=="keyword a"){return al(aK("form"),av,aM,h)}if(aP=="keyword b"){return al(aK("form"),aM,h)}if(aP=="{"){return al(aK("}"),A,h)}if(aP==";"){return al()}if(aP=="if"){if(G.state.lexical.info=="else"&&G.state.cc[G.state.cc.length-1]==h){G.state.cc.pop()()}return al(aK("form"),av,aM,h,e)}if(aP=="function"){return al(Q)}if(aP=="for"){return al(aK("form"),w,aM,h)}if(aP=="variable"){return al(aK("stat"),aN)}if(aP=="switch"){return al(aK("form"),av,aK("}","switch"),t("{"),A,h,h)}if(aP=="case"){return al(au,t(":"))}if(aP=="default"){return al(t(":"))}if(aP=="catch"){return al(aK("form"),y,t("("),ak,t(")"),aM,h,z)}if(aP=="class"){return al(aK("form"),ab,h)}if(aP=="export"){return al(aK("stat"),aL,h)}if(aP=="import"){return al(aK("stat"),am,h)}if(aP=="module"){return al(aK("form"),i,aK("}"),t("{"),A,h,h)}if(aP=="type"){return al(j,t("operator"),j,t(";"))}if(aP=="async"){return al(aM)}return ag(aK("stat"),au,t(";"),h)}function au(aP){return ae(aP,false)}function aJ(aP){return ae(aP,true)}function av(aP){if(aP!="("){return ag()}return al(aK(")"),au,t(")"),h)}function ae(aQ,aS){if(G.state.fatArrowAt==G.stream.start){var aP=aS?R:ac;if(aQ=="("){return al(y,aK(")"),aA(i,")"),h,t("=>"),aP,z)}else{if(aQ=="variable"){return ag(y,i,t("=>"),aP,z)}}}var aR=aS?k:ah;if(c.hasOwnProperty(aQ)){return al(aR)}if(aQ=="function"){return al(Q,aR)}if(aQ=="class"){return al(aK("form"),L,h)}if(aQ=="keyword c"||aQ=="async"){return al(aS?aq:ao)}if(aQ=="("){return al(aK(")"),ao,t(")"),h,aR)}if(aQ=="operator"||aQ=="spread"){return al(aS?aJ:au)}if(aQ=="["){return al(aK("]"),o,h,aR)}if(aQ=="{"){return aE(v,"}",null,aR)}if(aQ=="quasi"){return ag(U,aR)}if(aQ=="new"){return al(K(aS))}return al()}function ao(aP){if(aP.match(/[;\}\)\],]/)){return ag()}return ag(au)}function aq(aP){if(aP.match(/[;\}\)\],]/)){return ag()}return ag(aJ)}function ah(aP,aQ){if(aP==","){return al(au)}return k(aP,aQ,false)}function k(aP,aR,aT){var aQ=aT==false?ah:k;var aS=aT==false?au:aJ;if(aP=="=>"){return al(y,aT?R:ac,z)}if(aP=="operator"){if(/\+\+|--/.test(aR)){return al(aQ)}if(aR=="?"){return al(au,t(":"),aS)}return al(aS)}if(aP=="quasi"){return ag(U,aQ)}if(aP==";"){return}if(aP=="("){return aE(aJ,")","call",aQ)}if(aP=="."){return al(ar,aQ)}if(aP=="["){return al(aK("]"),ao,t("]"),h,aQ)}}function U(aP,aQ){if(aP!="quasi"){return ag()}if(aQ.slice(aQ.length-2)!="${"){return al(U)}return al(au,r)}function r(aP){if(aP=="}"){G.marked="string-2";G.state.tokenize=aH;return al(U)}}function ac(aP){aD(G.stream,G.state);return ag(aP=="{"?aM:au)}function R(aP){aD(G.stream,G.state);return ag(aP=="{"?aM:aJ)}function K(aP){return function(aQ){if(aQ=="."){return al(aP?p:aa)}else{return ag(aP?aJ:au)}}}function aa(aP,aQ){if(aQ=="target"){G.marked="keyword";return al(ah)}}function p(aP,aQ){if(aQ=="target"){G.marked="keyword";return al(k)}}function aN(aP){if(aP==":"){return al(h,aM)}return ag(ah,t(";"),h)}function ar(aP){if(aP=="variable"){G.marked="property";return al()}}function v(aP,aQ){if(aP=="async"){G.marked="property";return al(v)}else{if(aP=="variable"||G.style=="keyword"){G.marked="property";if(aQ=="get"||aQ=="set"){return al(M)}return al(O)}else{if(aP=="number"||aP=="string"){G.marked=aG?"property":(G.style+" property");return al(O)}else{if(aP=="jsonld-keyword"){return al(O)}else{if(aP=="modifier"){return al(v)}else{if(aP=="["){return al(au,t("]"),O)}else{if(aP=="spread"){return al(au)}else{if(aP==":"){return ag(O)}}}}}}}}}function M(aP){if(aP!="variable"){return ag(O)}G.marked="property";return al(Q)}function O(aP){if(aP==":"){return al(aJ)}if(aP=="("){return ag(Q)}}function aA(aR,aP){function aQ(aT,aU){if(aT==","){var aS=G.state.lexical;if(aS.info=="call"){aS.pos=(aS.pos||0)+1}return al(function(aV,aW){if(aV==aP||aW==aP){return ag()}return ag(aR)},aQ)}if(aT==aP||aU==aP){return al()}return al(t(aP))}return function(aS,aT){if(aS==aP||aT==aP){return al()}return ag(aR,aQ)}}function aE(aS,aP,aR){for(var aQ=3;aQ<arguments.length;aQ++){G.cc.push(arguments[aQ])}return al(aK(aP,aR),aA(aS,aP),h)}function A(aP){if(aP=="}"){return al()}return ag(aM,A)}function Y(aP,aQ){if(g){if(aP==":"){return al(j)}if(aQ=="?"){return al(Y)}}}function j(aP){if(aP=="variable"){G.marked="variable-3";return al(J)}if(aP=="{"){return al(aA(at,"}"))}if(aP=="("){return al(aA(ai,")"),V)}}function V(aP){if(aP=="=>"){return al(j)}}function at(aP){if(aP=="variable"||G.style=="keyword"){G.marked="property";return al(at)}else{if(aP==":"){return al(j)}}}function ai(aP){if(aP=="variable"){return al(ai)}else{if(aP==":"){return al(j)}}}function J(aP,aQ){if(aQ=="<"){return al(aA(j,">"),J)}if(aP=="["){return al(t("]"),J)}}function d(){return ag(i,Y,aj,ad)}function i(aP,aQ){if(aP=="modifier"){return al(i)}if(aP=="variable"){aC(aQ);return al()}if(aP=="spread"){return al(i)}if(aP=="["){return aE(i,"]")}if(aP=="{"){return aE(aI,"}")}}function aI(aP,aQ){if(aP=="variable"&&!G.stream.match(/^\s*:/,false)){aC(aQ);return al(aj)}if(aP=="variable"){G.marked="property"}if(aP=="spread"){return al(i)}if(aP=="}"){return ag()}return al(t(":"),i,aj)}function aj(aP,aQ){if(aQ=="="){return al(aJ)}}function ad(aP){if(aP==","){return al(d)}}function e(aP,aQ){if(aP=="keyword b"&&aQ=="else"){return al(aK("form","else"),aM,h)}}function w(aP){if(aP=="("){return al(aK(")"),F,t(")"),h)}}function F(aP){if(aP=="var"){return al(d,t(";"),E)}if(aP==";"){return al(E)}if(aP=="variable"){return al(x)}return ag(au,t(";"),E)}function x(aP,aQ){if(aQ=="in"||aQ=="of"){G.marked="keyword";return al(au)}return al(ah,E)}function E(aP,aQ){if(aP==";"){return al(D)}if(aQ=="in"||aQ=="of"){G.marked="keyword";return al(au)}return ag(au,t(";"),D)}function D(aP){if(aP!=")"){al(au)}}function Q(aP,aQ){if(aQ=="*"){G.marked="keyword";return al(Q)}if(aP=="variable"){aC(aQ);return al(Q)}if(aP=="("){return al(y,aK(")"),aA(ak,")"),h,Y,aM,z)}}function ak(aP){if(aP=="spread"){return al(ak)}return ag(i,Y,aj)}function L(aP,aQ){if(aP=="variable"){return ab(aP,aQ)}return S(aP,aQ)}function ab(aP,aQ){if(aP=="variable"){aC(aQ);return al(S)}}function S(aP,aQ){if(aQ=="extends"||aQ=="implements"){return al(g?j:au,S)}if(aP=="{"){return al(aK("}"),q,h)}}function q(aP,aQ){if(aP=="variable"||G.style=="keyword"){if((aQ=="static"||aQ=="get"||aQ=="set"||(g&&(aQ=="public"||aQ=="private"||aQ=="protected"||aQ=="readonly"||aQ=="abstract")))&&G.stream.match(/^\s+[\w$\xa1-\uffff]/,false)){G.marked="keyword";return al(q)}G.marked="property";return al(g?aO:Q,q)}if(aQ=="*"){G.marked="keyword";return al(q)}if(aP==";"){return al(q)}if(aP=="}"){return al()}}function aO(aP,aQ){if(aQ=="?"){return al(aO)}if(aP==":"){return al(j,aj)}return ag(Q)}function aL(aP,aQ){if(aQ=="*"){G.marked="keyword";return al(an,t(";"))}if(aQ=="default"){G.marked="keyword";return al(au,t(";"))}return ag(aM)}function am(aP){if(aP=="string"){return al()}return ag(ax,an)}function ax(aP,aQ){if(aP=="{"){return aE(ax,"}")}if(aP=="variable"){aC(aQ)}if(aQ=="*"){G.marked="keyword"}return al(l)}function l(aP,aQ){if(aQ=="as"){G.marked="keyword";return al(ax)}}function an(aP,aQ){if(aQ=="from"){G.marked="keyword";return al(au)}}function o(aP){if(aP=="]"){return al()}return ag(aA(aJ,"]"))}function aw(aQ,aP){return aQ.lastType=="operator"||aQ.lastType==","||T.test(aP.charAt(0))||/[,.]/.test(aP.charAt(0))}return{startState:function(aQ){var aP={tokenize:Z,lastType:"sof",cc:[],lexical:new N((aQ||0)-m,0,"block",false),localVars:ap.localVars,context:ap.localVars&&{vars:ap.localVars},indented:aQ||0};if(ap.globalVars&&typeof ap.globalVars=="object"){aP.globalVars=ap.globalVars}return aP},token:function(aR,aQ){if(aR.sol()){if(!aQ.lexical.hasOwnProperty("align")){aQ.lexical.align=false}aQ.indented=aR.indentation();aD(aR,aQ)}if(aQ.tokenize!=aF&&aR.eatSpace()){return null}var aP=aQ.tokenize(aR,aQ);if(X=="comment"){return aP}aQ.lastType=X=="operator"&&(I=="++"||I=="--")?"incdec":X;return f(aQ,aP,X,I,aR)},indent:function(aP,aS){if(aP.tokenize==aF){return a.Pass}if(aP.tokenize!=Z){return 0}var aW=aS&&aS.charAt(0),aX=aP.lexical,aV;if(!/^\s*else\b/.test(aS)){for(var aR=aP.cc.length-1;aR>=0;--aR){var aT=aP.cc[aR];if(aT==h){aX=aX.prev}else{if(aT!=e){break}}}}while((aX.type=="stat"||aX.type=="form")&&(aW=="}"||((aV=aP.cc[aP.cc.length-1])&&(aV==ah||aV==k)&&!/^[,\.=+\-*:?[\(]/.test(aS)))){aX=aX.prev}if(C&&aX.type==")"&&aX.prev.type=="stat"){aX=aX.prev}var aU=aX.type,aQ=aW==aU;if(aU=="vardef"){return aX.indented+(aP.lastType=="operator"||aP.lastType==","?aX.info+1:0)}else{if(aU=="form"&&aW=="{"){return aX.indented}else{if(aU=="form"){return aX.indented+m}else{if(aU=="stat"){return aX.indented+(aw(aP,aS)?C||m:0)}else{if(aX.info=="switch"&&!aQ&&ap.doubleIndentSwitch!=false){return aX.indented+(/^(?:case|default)\b/.test(aS)?m:2*m)}else{if(aX.align){return aX.column+(aQ?0:1)}else{return aX.indented+(aQ?0:m)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:B?null:"/*",blockCommentEnd:B?null:"*/",lineComment:B?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:B?"json":"javascript",jsonldMode:aG,jsonMode:B,expressionAllowed:b,skipExpression:function(aP){var aQ=aP.cc[aP.cc.length-1];if(aQ==au||aQ==aJ){aP.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(r){r.defineMode("css",function(Y,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Y.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},X=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},W=J.counterDescriptors||{},O=J.colorKeywords||{},S=J.valueKeywords||{},M=J.allowNested,U=J.supportsAtComponent===true;var C,N;function Z(ac,ad){C=ad;return ac}function ab(af,ae){var ad=af.next();if(A[ad]){var ac=A[ad](af,ae);if(ac!==false){return ac}}if(ad=="@"){af.eatWhile(/[\w\\\-]/);return Z("def",af.current())}else{if(ad=="="||(ad=="~"||ad=="|")&&af.eat("=")){return Z(null,"compare")}else{if(ad=='"'||ad=="'"){ae.tokenize=K(ad);return ae.tokenize(af,ae)}else{if(ad=="#"){af.eatWhile(/[\w\\\-]/);return Z("atom","hash")}else{if(ad=="!"){af.match(/^\s*\w*/);return Z("keyword","important")}else{if(/\d/.test(ad)||ad=="."&&af.eat(/\d/)){af.eatWhile(/[\w.%]/);return Z("number","unit")}else{if(ad==="-"){if(/[\d.]/.test(af.peek())){af.eatWhile(/[\w.%]/);return Z("number","unit")}else{if(af.match(/^-[\w\\\-]+/)){af.eatWhile(/[\w\\\-]/);if(af.match(/^\s*:/,false)){return Z("variable-2","variable-definition")}return Z("variable-2","variable")}else{if(af.match(/^\w+-/)){return Z("meta","meta")}}}}else{if(/[,+>*\/]/.test(ad)){return Z(null,"select-op")}else{if(ad=="."&&af.match(/^-?[_a-z][_a-z0-9-]*/i)){return Z("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ad)){return Z(null,ad)}else{if((ad=="u"&&af.match(/rl(-prefix)?\(/))||(ad=="d"&&af.match("omain("))||(ad=="r"&&af.match("egexp("))){af.backUp(1);ae.tokenize=aa;return Z("property","word")}else{if(/[\w\\\-]/.test(ad)){af.eatWhile(/[\w\\\-]/);return Z("property","word")}else{return Z(null,null)}}}}}}}}}}}}}function K(ac){return function(ag,ae){var af=false,ad;while((ad=ag.next())!=null){if(ad==ac&&!af){if(ac==")"){ag.backUp(1)}break}af=!af&&ad=="\\"}if(ad==ac||!af&&ac!=")"){ae.tokenize=null}return Z("string","string")}}function aa(ad,ac){ad.next();if(!ad.match(/\s*[\"\')]/,false)){ac.tokenize=K(")")}else{ac.tokenize=null}return Z(null,"(")}function R(ad,ac,ae){this.type=ad;this.indent=ac;this.prev=ae}function G(ae,af,ad,ac){ae.context=new R(ad,af.indentation()+(ac===false?0:Q),ae.context);return ad}function T(ac){if(ac.context.prev){ac.context=ac.context.prev}return ac.context.type}function z(ac,ae,ad){return F[ad.context.type](ac,ae,ad)}function V(ad,af,ae,ag){for(var ac=ag||1;ac>0;ac--){ae.context=ae.context.prev}return z(ad,af,ae)}function H(ad){var ac=ad.current().toLowerCase();if(S.hasOwnProperty(ac)){N="atom"}else{if(O.hasOwnProperty(ac)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ac,ae,ad){if(ac=="{"){return G(ad,ae,"block")}else{if(ac=="}"&&ad.context.prev){return T(ad)}else{if(U&&/@component/.test(ac)){return G(ad,ae,"atComponentBlock")}else{if(/^@(-moz-)?document$/.test(ac)){return G(ad,ae,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/.test(ac)){return G(ad,ae,"atBlock")}else{if(/^@(font-face|counter-style)/.test(ac)){ad.stateArg=ac;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(ac)){return"keyframes"}else{if(ac&&ac.charAt(0)=="@"){return G(ad,ae,"at")}else{if(ac=="hash"){N="builtin"}else{if(ac=="word"){N="tag"}else{if(ac=="variable-definition"){return"maybeprop"}else{if(ac=="interpolation"){return G(ad,ae,"interpolation")}else{if(ac==":"){return"pseudo"}else{if(M&&ac=="("){return G(ad,ae,"parens")}}}}}}}}}}}}}}return ad.context.type};F.block=function(ac,af,ad){if(ac=="word"){var ae=af.current().toLowerCase();if(I.hasOwnProperty(ae)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(ae)){N="string-2";return"maybeprop"}else{if(M){N=af.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ac=="meta"){return"block"}else{if(!M&&(ac=="hash"||ac=="qualifier")){N="error";return"block"}else{return F.top(ac,af,ad)}}}};F.maybeprop=function(ac,ae,ad){if(ac==":"){return G(ad,ae,"prop")}return z(ac,ae,ad)};F.prop=function(ac,ae,ad){if(ac==";"){return T(ad)}if(ac=="{"&&M){return G(ad,ae,"propBlock")}if(ac=="}"||ac=="{"){return V(ac,ae,ad)}if(ac=="("){return G(ad,ae,"parens")}if(ac=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(ae.current())){N+=" error"}else{if(ac=="word"){H(ae)}else{if(ac=="interpolation"){return G(ad,ae,"interpolation")}}}return"prop"};F.propBlock=function(ad,ac,ae){if(ad=="}"){return T(ae)}if(ad=="word"){N="property";return"maybeprop"}return ae.context.type};F.parens=function(ac,ae,ad){if(ac=="{"||ac=="}"){return V(ac,ae,ad)}if(ac==")"){return T(ad)}if(ac=="("){return G(ad,ae,"parens")}if(ac=="interpolation"){return G(ad,ae,"interpolation")}if(ac=="word"){H(ae)}return"parens"};F.pseudo=function(ac,ae,ad){if(ac=="word"){N="variable-3";return ad.context.type}return z(ac,ae,ad)};F.documentTypes=function(ac,ae,ad){if(ac=="word"&&y.hasOwnProperty(ae.current())){N="tag";return ad.context.type}else{return F.atBlock(ac,ae,ad)}};F.atBlock=function(ac,af,ad){if(ac=="("){return G(ad,af,"atBlock_parens")}if(ac=="}"||ac==";"){return V(ac,af,ad)}if(ac=="{"){return T(ad)&&G(ad,af,M?"block":"top")}if(ac=="interpolation"){return G(ad,af,"interpolation")}if(ac=="word"){var ae=af.current().toLowerCase();if(ae=="only"||ae=="not"||ae=="and"||ae=="or"){N="keyword"}else{if(X.hasOwnProperty(ae)){N="attribute"}else{if(L.hasOwnProperty(ae)){N="property"}else{if(P.hasOwnProperty(ae)){N="keyword"}else{if(I.hasOwnProperty(ae)){N="property"}else{if(B.hasOwnProperty(ae)){N="string-2"}else{if(S.hasOwnProperty(ae)){N="atom"}else{if(O.hasOwnProperty(ae)){N="keyword"}else{N="error"}}}}}}}}}return ad.context.type};F.atComponentBlock=function(ac,ae,ad){if(ac=="}"){return V(ac,ae,ad)}if(ac=="{"){return T(ad)&&G(ad,ae,M?"block":"top",false)}if(ac=="word"){N="error"}return ad.context.type};F.atBlock_parens=function(ac,ae,ad){if(ac==")"){return T(ad)}if(ac=="{"||ac=="}"){return V(ac,ae,ad,2)}return F.atBlock(ac,ae,ad)};F.restricted_atBlock_before=function(ac,ae,ad){if(ac=="{"){return G(ad,ae,"restricted_atBlock")}if(ac=="word"&&ad.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ac,ae,ad)};F.restricted_atBlock=function(ac,ae,ad){if(ac=="}"){ad.stateArg=null;return T(ad)}if(ac=="word"){if((ad.stateArg=="@font-face"&&!E.hasOwnProperty(ae.current().toLowerCase()))||(ad.stateArg=="@counter-style"&&!W.hasOwnProperty(ae.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ac,ae,ad){if(ac=="word"){N="variable";return"keyframes"}if(ac=="{"){return G(ad,ae,"top")}return z(ac,ae,ad)};F.at=function(ac,ae,ad){if(ac==";"){return T(ad)}if(ac=="{"||ac=="}"){return V(ac,ae,ad)}if(ac=="word"){N="tag"}else{if(ac=="hash"){N="builtin"}}return"at"};F.interpolation=function(ac,ae,ad){if(ac=="}"){return T(ad)}if(ac=="{"||ac==";"){return V(ac,ae,ad)}if(ac=="word"){N="variable"}else{if(ac!="variable"&&ac!="("&&ac!=")"){N="error"}}return"interpolation"};return{startState:function(ac){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ac||0,null)}},token:function(ae,ad){if(!ad.tokenize&&ae.eatSpace()){return null}var ac=(ad.tokenize||ab)(ae,ad);if(ac&&typeof ac=="object"){C=ac[1];ac=ac[0]}N=ac;ad.state=F[ad.state](C,ae,ad);return N},indent:function(ag,ae){var ad=ag.context,af=ae&&ae.charAt(0);var ac=ad.indent;if(ad.type=="prop"&&(af=="}"||af==")")){ad=ad.prev}if(ad.prev){if(af=="}"&&(ad.type=="block"||ad.type=="top"||ad.type=="interpolation"||ad.type=="restricted_atBlock")){ad=ad.prev;ac=ad.indent}else{if(af==")"&&(ad.type=="parens"||ad.type=="atBlock_parens")||af=="{"&&(ad.type=="at"||ad.type=="atBlock")){ac=Math.max(0,ad.indent-Q);ad=ad.prev}}}return ac},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});function g(A){var z={};for(var y=0;y<A.length;++y){z[A[y].toLowerCase()]=true}return z}var k=["domain","regexp","url","url-prefix"],a=g(k);var b=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],v=g(b);var x=["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","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],i=g(x);var l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],p=g(l);var d=["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-blend-mode","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-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","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","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","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","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"],h=g(d);var n=["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"],e=g(n);var t=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],f=g(t);var q=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],u=g(q);var 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"],m=g(c);var j=["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","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","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","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","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","lighten","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","luminosity","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","multiply","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","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","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","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","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","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],s=g(j);var o=k.concat(b).concat(x).concat(l).concat(d).concat(n).concat(c).concat(j);r.registerHelper("hintWords","css",o);function w(B,A){var y=false,z;while((z=B.next())!=null){if(y&&z=="/"){A.tokenize=null;break}y=(z=="*")}return["comment","comment"]}r.defineMIME("text/css",{documentTypes:a,mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css"});r.defineMIME("text/x-scss",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},":":function(y){if(y.match(/\s*\{/)){return[null,"{"]}return false},"$":function(y){y.match(/^[\w-]+/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(y){if(!y.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});r.defineMIME("text/x-less",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},"@":function(y){if(y.eat("{")){return[null,"interpolation"]}if(y.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,false)){return false}y.eatWhile(/[\w\\\-]/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"});r.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:v,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,supportsAtComponent:true,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css",helperType:"gss"})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(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"],a)}else{a(CodeMirror)}}})(function(d){var g={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/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 f(n,j,k){var m=n.current(),l=m.search(j);if(l>-1){n.backUp(m.length-l)}else{if(m.match(/<\/?$/)){n.backUp(m.length);if(!n.match(j,false)){n.match(m)}}}return k}var e={};function c(j){var k=e[j];if(k){return k}return e[j]=new RegExp("\\s+"+j+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function a(l,j){var k=l.match(c(j));return k?/^\s*(.*?)\s*$/.exec(k[2])[1]:""}function i(k,j){return new RegExp((j?"^":"")+"</s*"+k+"s*>","i")}function h(o,n){for(var j in o){var k=n[j]||(n[j]=[]);var m=o[j];for(var l=m.length-1;l>=0;l--){k.unshift(m[l])}}}function b(l,m){for(var k=0;k<l.length;k++){var j=l[k];if(!j[0]||j[1].test(a(m,j[0]))){return j[2]}}}d.defineMode("htmlmixed",function(k,o){var q=d.getMode(k,{name:"xml",htmlMode:true,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag});var j={};var p=o&&o.tags,n=o&&o.scriptTypes;h(g,j);if(p){h(p,j)}if(n){for(var m=n.length-1;m>=0;m--){j.script.unshift(["type",n[m].matches,n[m].mode])}}function l(z,r){var s=q.token(z,r.htmlState),A=/\btag\b/.test(s),u;if(A&&!/[<>\s\/]/.test(z.current())&&(u=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(u)){r.inTag=u+" "}else{if(r.inTag&&A&&/>$/.test(z.current())){var t=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var y=z.current()==">"&&b(j[t[1]],t[2]);var x=d.getMode(k,y);var w=i(t[1],true),v=i(t[1],false);r.token=function(C,B){if(C.match(w,false)){B.token=l;B.localState=B.localMode=null;return null}return f(C,v,B.localMode.token(C,B.localState))};r.localMode=x;r.localState=d.startState(x,q.indent(r.htmlState,""))}else{if(r.inTag){r.inTag+=z.current();if(z.eol()){r.inTag+=" "}}}}return s}return{startState:function(){var r=d.startState(q);return{token:l,inTag:null,localMode:null,localState:null,htmlState:r}},copyState:function(s){var r;if(s.localState){r=d.copyState(s.localMode,s.localState)}return{token:s.token,inTag:s.inTag,localMode:s.localMode,localState:r,htmlState:d.copyState(q,s.htmlState)}},token:function(s,r){return r.token(s,r)},indent:function(s,r){if(!s.localMode||/^\s*<\//.test(r)){return q.indent(s.htmlState,r)}else{if(s.localMode.indent){return s.localMode.indent(s.localState,r)}else{return d.Pass}}},innerMode:function(r){return{state:r.localState||r.htmlState,mode:r.localMode||q}}}},"xml","javascript","css");d.defineMIME("text/html","htmlmixed")});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(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"],a)}else{a(CodeMirror)}}})(function(a){a.defineMode("htmlembedded",function(b,c){return a.multiplexingMode(a.getMode(b,"htmlmixed"),{open:c.open||c.scriptStartRegex||"<%",close:c.close||c.scriptEndRegex||"%>",mode:a.getMode(b,c.scriptingModeSpec)})},"htmlmixed");a.defineMIME("application/x-ejs",{name:"htmlembedded",scriptingModeSpec:"javascript"});a.defineMIME("application/x-aspx",{name:"htmlembedded",scriptingModeSpec:"text/x-csharp"});a.defineMIME("application/x-jsp",{name:"htmlembedded",scriptingModeSpec:"text/x-java"});a.defineMIME("application/x-erb",{name:"htmlembedded",scriptingModeSpec:"ruby"})});
|
data/vendor/assets/javascripts/ckeditor/plugins/codemirror/js/codemirror.mode.javascript.min.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){function b(e,d,c){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(d.lastType)||(d.lastType=="quasi"&&/\{\s*$/.test(e.string.slice(0,e.pos-(c||0))))}a.defineMode("javascript",function(ac,am){var m=ac.indentUnit;var C=am.statementIndent;var aE=am.jsonld;var B=am.json||aE;var h=am.typescript;var ax=am.wordCharacters||/[\w$\xa1-\uffff]/;var av=function(){function aU(aW){return{type:aW,style:"keyword"}}var aP=aU("keyword a"),aN=aU("keyword b"),aM=aU("keyword c");var aO=aU("operator"),aS={type:"atom",style:"atom"};var aQ={"if":aU("if"),"while":aP,"with":aP,"else":aN,"do":aN,"try":aN,"finally":aN,"return":aM,"break":aM,"continue":aM,"new":aU("new"),"delete":aM,"throw":aM,"debugger":aM,"var":aU("var"),"const":aU("var"),let:aU("var"),"function":aU("function"),"catch":aU("catch"),"for":aU("for"),"switch":aU("switch"),"case":aU("case"),"default":aU("default"),"in":aO,"typeof":aO,"instanceof":aO,"true":aS,"false":aS,"null":aS,"undefined":aS,"NaN":aS,"Infinity":aS,"this":aU("this"),"class":aU("class"),"super":aU("atom"),yield:aM,"export":aU("export"),"import":aU("import"),"extends":aM};if(h){var aV={type:"variable",style:"variable-3"};var aR={"interface":aU("class"),"implements":aM,namespace:aM,module:aU("module"),"enum":aU("module"),"public":aU("modifier"),"private":aU("modifier"),"protected":aU("modifier"),"abstract":aU("modifier"),as:aO,string:aV,number:aV,"boolean":aV,any:aV};for(var aT in aR){aQ[aT]=aR[aT]}}return aQ}();var R=/[+\-*&%=<>!?|~^]/;var au=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function H(aP){var aN=false,aM,aO=false;while((aM=aP.next())!=null){if(!aN){if(aM=="/"&&!aO){return}if(aM=="["){aO=true}else{if(aO&&aM=="]"){aO=false}}}aN=!aN&&aM=="\\"}}var U,I;function N(aO,aN,aM){U=aO;I=aM;return aN}function W(aQ,aO){var aM=aQ.next();if(aM=='"'||aM=="'"){aO.tokenize=T(aM);return aO.tokenize(aQ,aO)}else{if(aM=="."&&aQ.match(/^\d+(?:[eE][+\-]?\d+)?/)){return N("number","number")}else{if(aM=="."&&aQ.match("..")){return N("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aM)){return N(aM)}else{if(aM=="="&&aQ.eat(">")){return N("=>","operator")}else{if(aM=="0"&&aQ.eat(/x/i)){aQ.eatWhile(/[\da-f]/i);return N("number","number")}else{if(aM=="0"&&aQ.eat(/o/i)){aQ.eatWhile(/[0-7]/i);return N("number","number")}else{if(aM=="0"&&aQ.eat(/b/i)){aQ.eatWhile(/[01]/i);return N("number","number")}else{if(/\d/.test(aM)){aQ.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return N("number","number")}else{if(aM=="/"){if(aQ.eat("*")){aO.tokenize=aD;return aD(aQ,aO)}else{if(aQ.eat("/")){aQ.skipToEnd();return N("comment","comment")}else{if(b(aQ,aO,1)){H(aQ);aQ.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return N("regexp","string-2")}else{aQ.eatWhile(R);return N("operator","operator",aQ.current())}}}}else{if(aM=="`"){aO.tokenize=aF;return aF(aQ,aO)}else{if(aM=="#"){aQ.skipToEnd();return N("error","error")}else{if(R.test(aM)){aQ.eatWhile(R);return N("operator","operator",aQ.current())}else{if(ax.test(aM)){aQ.eatWhile(ax);var aP=aQ.current(),aN=av.propertyIsEnumerable(aP)&&av[aP];return(aN&&aO.lastType!=".")?N(aN.type,aN.style,aP):N("variable","variable",aP)}}}}}}}}}}}}}}}function T(aM){return function(aQ,aO){var aP=false,aN;if(aE&&aQ.peek()=="@"&&aQ.match(au)){aO.tokenize=W;return N("jsonld-keyword","meta")}while((aN=aQ.next())!=null){if(aN==aM&&!aP){break}aP=!aP&&aN=="\\"}if(!aP){aO.tokenize=W}return N("string","string")}}function aD(aP,aO){var aM=false,aN;while(aN=aP.next()){if(aN=="/"&&aM){aO.tokenize=W;break}aM=(aN=="*")}return N("comment","comment")}function aF(aP,aN){var aO=false,aM;while((aM=aP.next())!=null){if(!aO&&(aM=="`"||aM=="$"&&aP.eat("{"))){aN.tokenize=W;break}aO=!aO&&aM=="\\"}return N("quasi","string-2",aP.current())}var n="([{}])";function aA(aS,aP){if(aP.fatArrowAt){aP.fatArrowAt=null}var aO=aS.string.indexOf("=>",aS.start);if(aO<0){return}var aR=0,aN=false;for(var aT=aO-1;aT>=0;--aT){var aM=aS.string.charAt(aT);var aQ=n.indexOf(aM);if(aQ>=0&&aQ<3){if(!aR){++aT;break}if(--aR==0){break}}else{if(aQ>=3&&aQ<6){++aR}else{if(ax.test(aM)){aN=true}else{if(/["'\/]/.test(aM)){return}else{if(aN&&!aR){++aT;break}}}}}}if(aN&&!aR){aP.fatArrowAt=aT}}var c={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function L(aR,aN,aM,aQ,aO,aP){this.indented=aR;this.column=aN;this.type=aM;this.prev=aO;this.info=aP;if(aQ!=null){this.align=aQ}}function u(aP,aO){for(var aN=aP.localVars;aN;aN=aN.next){if(aN.name==aO){return true}}for(var aM=aP.context;aM;aM=aM.prev){for(var aN=aM.vars;aN;aN=aN.next){if(aN.name==aO){return true}}}}function g(aQ,aN,aM,aP,aR){var aS=aQ.cc;F.state=aQ;F.stream=aR;F.marked=null,F.cc=aS;F.style=aN;if(!aQ.lexical.hasOwnProperty("align")){aQ.lexical.align=true}while(true){var aO=aS.length?aS.pop():B?aq:aK;if(aO(aM,aP)){while(aS.length&&aS[aS.length-1].lex){aS.pop()()}if(F.marked){return F.marked}if(aM=="variable"&&u(aQ,aP)){return"variable-2"}return aN}}}var F={state:null,column:null,marked:null,cc:null};function ad(){for(var aM=arguments.length-1;aM>=0;aM--){F.cc.push(arguments[aM])}}function ai(){ad.apply(null,arguments);return true}function az(aN){function aM(aQ){for(var aP=aQ;aP;aP=aP.next){if(aP.name==aN){return true}}return false}var aO=F.state;F.marked="def";if(aO.context){if(aM(aO.localVars)){return}aO.localVars={name:aN,next:aO.localVars}}else{if(aM(aO.globalVars)){return}if(am.globalVars){aO.globalVars={name:aN,next:aO.globalVars}}}}var s={name:"this",next:{name:"arguments"}};function y(){F.state.context={prev:F.state.context,vars:F.state.localVars};F.state.localVars=s}function z(){F.state.localVars=F.state.context.vars;F.state.context=F.state.context.prev}function aI(aN,aO){var aM=function(){var aR=F.state,aP=aR.indented;if(aR.lexical.type=="stat"){aP=aR.lexical.indented}else{for(var aQ=aR.lexical;aQ&&aQ.type==")"&&aQ.align;aQ=aQ.prev){aP=aQ.indented}}aR.lexical=new L(aP,F.stream.column(),aN,null,aR.lexical,aO)};aM.lex=true;return aM}function i(){var aM=F.state;if(aM.lexical.prev){if(aM.lexical.type==")"){aM.indented=aM.lexical.indented}aM.lexical=aM.lexical.prev}}i.lex=true;function t(aM){function aN(aO){if(aO==aM){return ai()}else{if(aM==";"){return ad()}else{return ai(aN)}}}return aN}function aK(aM,aN){if(aM=="var"){return ai(aI("vardef",aN.length),e,t(";"),i)}if(aM=="keyword a"){return ai(aI("form"),aq,aK,i)}if(aM=="keyword b"){return ai(aI("form"),aK,i)}if(aM=="{"){return ai(aI("}"),A,i)}if(aM==";"){return ai()}if(aM=="if"){if(F.state.lexical.info=="else"&&F.state.cc[F.state.cc.length-1]==i){F.state.cc.pop()()}return ai(aI("form"),aq,aK,i,f)}if(aM=="function"){return ai(O)}if(aM=="for"){return ai(aI("form"),w,aK,i)}if(aM=="variable"){return ai(aI("stat"),aL)}if(aM=="switch"){return ai(aI("form"),aq,aI("}","switch"),t("{"),A,i,i)}if(aM=="case"){return ai(aq,t(":"))}if(aM=="default"){return ai(t(":"))}if(aM=="catch"){return ai(aI("form"),y,t("("),ag,t(")"),aK,i,z)}if(aM=="class"){return ai(aI("form"),Y,i)}if(aM=="export"){return ai(aI("stat"),aJ,i)}if(aM=="import"){return ai(aI("stat"),aj,i)}if(aM=="module"){return ai(aI("form"),j,aI("}"),t("{"),A,i,i)}return ad(aI("stat"),aq,t(";"),i)}function aq(aM){return ab(aM,false)}function aH(aM){return ab(aM,true)}function ab(aN,aP){if(F.state.fatArrowAt==F.stream.start){var aM=aP?P:Z;if(aN=="("){return ai(y,aI(")"),aw(j,")"),i,t("=>"),aM,z)}else{if(aN=="variable"){return ad(y,j,t("=>"),aM,z)}}}var aO=aP?k:ae;if(c.hasOwnProperty(aN)){return ai(aO)}if(aN=="function"){return ai(O,aO)}if(aN=="keyword c"){return ai(aP?an:al)}if(aN=="("){return ai(aI(")"),al,aC,t(")"),i,aO)}if(aN=="operator"||aN=="spread"){return ai(aP?aH:aq)}if(aN=="["){return ai(aI("]"),o,i,aO)}if(aN=="{"){return aB(v,"}",null,aO)}if(aN=="quasi"){return ad(S,aO)}if(aN=="new"){return ai(J(aP))}return ai()}function al(aM){if(aM.match(/[;\}\)\],]/)){return ad()}return ad(aq)}function an(aM){if(aM.match(/[;\}\)\],]/)){return ad()}return ad(aH)}function ae(aM,aN){if(aM==","){return ai(aq)}return k(aM,aN,false)}function k(aM,aO,aQ){var aN=aQ==false?ae:k;var aP=aQ==false?aq:aH;if(aM=="=>"){return ai(y,aQ?P:Z,z)}if(aM=="operator"){if(/\+\+|--/.test(aO)){return ai(aN)}if(aO=="?"){return ai(aq,t(":"),aP)}return ai(aP)}if(aM=="quasi"){return ad(S,aN)}if(aM==";"){return}if(aM=="("){return aB(aH,")","call",aN)}if(aM=="."){return ai(ao,aN)}if(aM=="["){return ai(aI("]"),al,t("]"),i,aN)}}function S(aM,aN){if(aM!="quasi"){return ad()}if(aN.slice(aN.length-2)!="${"){return ai(S)}return ai(aq,r)}function r(aM){if(aM=="}"){F.marked="string-2";F.state.tokenize=aF;return ai(S)}}function Z(aM){aA(F.stream,F.state);return ad(aM=="{"?aK:aq)}function P(aM){aA(F.stream,F.state);return ad(aM=="{"?aK:aH)}function J(aM){return function(aN){if(aN=="."){return ai(aM?p:X)}else{return ad(aM?aH:aq)}}}function X(aM,aN){if(aN=="target"){F.marked="keyword";return ai(ae)}}function p(aM,aN){if(aN=="target"){F.marked="keyword";return ai(k)}}function aL(aM){if(aM==":"){return ai(i,aK)}return ad(ae,t(";"),i)}function ao(aM){if(aM=="variable"){F.marked="property";return ai()}}function v(aM,aN){if(aM=="variable"||F.style=="keyword"){F.marked="property";if(aN=="get"||aN=="set"){return ai(K)}return ai(M)}else{if(aM=="number"||aM=="string"){F.marked=aE?"property":(F.style+" property");return ai(M)}else{if(aM=="jsonld-keyword"){return ai(M)}else{if(aM=="modifier"){return ai(v)}else{if(aM=="["){return ai(aq,t("]"),M)}else{if(aM=="spread"){return ai(aq)}}}}}}}function K(aM){if(aM!="variable"){return ad(M)}F.marked="property";return ai(O)}function M(aM){if(aM==":"){return ai(aH)}if(aM=="("){return ad(O)}}function aw(aO,aM){function aN(aQ){if(aQ==","){var aP=F.state.lexical;if(aP.info=="call"){aP.pos=(aP.pos||0)+1}return ai(aO,aN)}if(aQ==aM){return ai()}return ai(t(aM))}return function(aP){if(aP==aM){return ai()}return ad(aO,aN)}}function aB(aP,aM,aO){for(var aN=3;aN<arguments.length;aN++){F.cc.push(arguments[aN])}return ai(aI(aM,aO),aw(aP,aM),i)}function A(aM){if(aM=="}"){return ai()}return ad(aK,A)}function V(aM){if(h&&aM==":"){return ai(ah)}}function ay(aM,aN){if(aN=="="){return ai(aH)}}function ah(aM){if(aM=="variable"){F.marked="variable-3";return ai()}}function e(){return ad(j,V,af,aa)}function j(aM,aN){if(aM=="modifier"){return ai(j)}if(aM=="variable"){az(aN);return ai()}if(aM=="spread"){return ai(j)}if(aM=="["){return aB(j,"]")}if(aM=="{"){return aB(aG,"}")}}function aG(aM,aN){if(aM=="variable"&&!F.stream.match(/^\s*:/,false)){az(aN);return ai(af)}if(aM=="variable"){F.marked="property"}if(aM=="spread"){return ai(j)}if(aM=="}"){return ad()}return ai(t(":"),j,af)}function af(aM,aN){if(aN=="="){return ai(aH)}}function aa(aM){if(aM==","){return ai(e)}}function f(aM,aN){if(aM=="keyword b"&&aN=="else"){return ai(aI("form","else"),aK,i)}}function w(aM){if(aM=="("){return ai(aI(")"),G,t(")"),i)}}function G(aM){if(aM=="var"){return ai(e,t(";"),E)}if(aM==";"){return ai(E)}if(aM=="variable"){return ai(x)}return ad(aq,t(";"),E)}function x(aM,aN){if(aN=="in"||aN=="of"){F.marked="keyword";return ai(aq)}return ai(ae,E)}function E(aM,aN){if(aM==";"){return ai(D)}if(aN=="in"||aN=="of"){F.marked="keyword";return ai(aq)}return ad(aq,t(";"),D)}function D(aM){if(aM!=")"){ai(aq)}}function O(aM,aN){if(aN=="*"){F.marked="keyword";return ai(O)}if(aM=="variable"){az(aN);return ai(O)}if(aM=="("){return ai(y,aI(")"),aw(ag,")"),i,aK,z)}}function ag(aM){if(aM=="spread"){return ai(ag)}return ad(j,V,ay)}function Y(aM,aN){if(aM=="variable"){az(aN);return ai(Q)}}function Q(aM,aN){if(aN=="extends"){return ai(aq,Q)}if(aM=="{"){return ai(aI("}"),q,i)}}function q(aM,aN){if(aM=="variable"||F.style=="keyword"){if(aN=="static"){F.marked="keyword";return ai(q)}F.marked="property";if(aN=="get"||aN=="set"){return ai(d,O,q)}return ai(O,q)}if(aN=="*"){F.marked="keyword";return ai(q)}if(aM==";"){return ai(q)}if(aM=="}"){return ai()}}function d(aM){if(aM!="variable"){return ad()}F.marked="property";return ai()}function aJ(aM,aN){if(aN=="*"){F.marked="keyword";return ai(ak,t(";"))}if(aN=="default"){F.marked="keyword";return ai(aq,t(";"))}return ad(aK)}function aj(aM){if(aM=="string"){return ai()}return ad(at,ak)}function at(aM,aN){if(aM=="{"){return aB(at,"}")}if(aM=="variable"){az(aN)}if(aN=="*"){F.marked="keyword"}return ai(l)}function l(aM,aN){if(aN=="as"){F.marked="keyword";return ai(at)}}function ak(aM,aN){if(aN=="from"){F.marked="keyword";return ai(aq)}}function o(aM){if(aM=="]"){return ai()}return ad(aH,ap)}function ap(aM){if(aM=="for"){return ad(aC,t("]"))}if(aM==","){return ai(aw(an,"]"))}return ad(aw(aH,"]"))}function aC(aM){if(aM=="for"){return ai(w,aC)}if(aM=="if"){return ai(aq,aC)}}function ar(aN,aM){return aN.lastType=="operator"||aN.lastType==","||R.test(aM.charAt(0))||/[,.]/.test(aM.charAt(0))}return{startState:function(aN){var aM={tokenize:W,lastType:"sof",cc:[],lexical:new L((aN||0)-m,0,"block",false),localVars:am.localVars,context:am.localVars&&{vars:am.localVars},indented:aN||0};if(am.globalVars&&typeof am.globalVars=="object"){aM.globalVars=am.globalVars}return aM},token:function(aO,aN){if(aO.sol()){if(!aN.lexical.hasOwnProperty("align")){aN.lexical.align=false}aN.indented=aO.indentation();aA(aO,aN)}if(aN.tokenize!=aD&&aO.eatSpace()){return null}var aM=aN.tokenize(aO,aN);if(U=="comment"){return aM}aN.lastType=U=="operator"&&(I=="++"||I=="--")?"incdec":U;return g(aN,aM,U,I,aO)},indent:function(aS,aM){if(aS.tokenize==aD){return a.Pass}if(aS.tokenize!=W){return 0}var aR=aM&&aM.charAt(0),aP=aS.lexical;if(!/^\s*else\b/.test(aM)){for(var aO=aS.cc.length-1;aO>=0;--aO){var aT=aS.cc[aO];if(aT==i){aP=aP.prev}else{if(aT!=f){break}}}}if(aP.type=="stat"&&aR=="}"){aP=aP.prev}if(C&&aP.type==")"&&aP.prev.type=="stat"){aP=aP.prev}var aQ=aP.type,aN=aR==aQ;if(aQ=="vardef"){return aP.indented+(aS.lastType=="operator"||aS.lastType==","?aP.info+1:0)}else{if(aQ=="form"&&aR=="{"){return aP.indented}else{if(aQ=="form"){return aP.indented+m}else{if(aQ=="stat"){return aP.indented+(ar(aS,aM)?C||m:0)}else{if(aP.info=="switch"&&!aN&&am.doubleIndentSwitch!=false){return aP.indented+(/^(?:case|default)\b/.test(aM)?m:2*m)}else{if(aP.align){return aP.column+(aN?0:1)}else{return aP.indented+(aN?0:m)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:B?null:"/*",blockCommentEnd:B?null:"*/",lineComment:B?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:B?"json":"javascript",jsonldMode:aE,jsonMode:B,expressionAllowed:b,skipExpression:function(aM){var aN=aM.cc[aM.cc.length-1];if(aN==aq||aN==aH){aM.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});
|
1
|
+
(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){function b(e,d,c){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(d.lastType)||(d.lastType=="quasi"&&/\{\s*$/.test(e.string.slice(0,e.pos-(c||0))))}a.defineMode("javascript",function(af,ap){var m=af.indentUnit;var C=ap.statementIndent;var aG=ap.jsonld;var B=ap.json||aG;var g=ap.typescript;var aB=ap.wordCharacters||/[\w$\xa1-\uffff]/;var az=function(){function aX(aZ){return{type:aZ,style:"keyword"}}var aS=aX("keyword a"),aQ=aX("keyword b"),aP=aX("keyword c");var aR=aX("operator"),aV={type:"atom",style:"atom"};var aT={"if":aX("if"),"while":aS,"with":aS,"else":aQ,"do":aQ,"try":aQ,"finally":aQ,"return":aP,"break":aP,"continue":aP,"new":aX("new"),"delete":aP,"throw":aP,"debugger":aP,"var":aX("var"),"const":aX("var"),let:aX("var"),"function":aX("function"),"catch":aX("catch"),"for":aX("for"),"switch":aX("switch"),"case":aX("case"),"default":aX("default"),"in":aR,"typeof":aR,"instanceof":aR,"true":aV,"false":aV,"null":aV,"undefined":aV,"NaN":aV,"Infinity":aV,"this":aX("this"),"class":aX("class"),"super":aX("atom"),yield:aP,"export":aX("export"),"import":aX("import"),"extends":aP,await:aP,async:aX("async")};if(g){var aY={type:"variable",style:"variable-3"};var aU={"interface":aX("class"),"implements":aP,namespace:aP,module:aX("module"),"enum":aX("module"),type:aX("type"),"public":aX("modifier"),"private":aX("modifier"),"protected":aX("modifier"),"abstract":aX("modifier"),as:aR,string:aY,number:aY,"boolean":aY,any:aY};for(var aW in aU){aT[aW]=aU[aW]}}return aT}();var T=/[+\-*&%=<>!?|~^]/;var ay=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function H(aS){var aQ=false,aP,aR=false;while((aP=aS.next())!=null){if(!aQ){if(aP=="/"&&!aR){return}if(aP=="["){aR=true}else{if(aR&&aP=="]"){aR=false}}}aQ=!aQ&&aP=="\\"}}var X,I;function P(aR,aQ,aP){X=aR;I=aP;return aQ}function Z(aT,aR){var aP=aT.next();if(aP=='"'||aP=="'"){aR.tokenize=W(aP);return aR.tokenize(aT,aR)}else{if(aP=="."&&aT.match(/^\d+(?:[eE][+\-]?\d+)?/)){return P("number","number")}else{if(aP=="."&&aT.match("..")){return P("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aP)){return P(aP)}else{if(aP=="="&&aT.eat(">")){return P("=>","operator")}else{if(aP=="0"&&aT.eat(/x/i)){aT.eatWhile(/[\da-f]/i);return P("number","number")}else{if(aP=="0"&&aT.eat(/o/i)){aT.eatWhile(/[0-7]/i);return P("number","number")}else{if(aP=="0"&&aT.eat(/b/i)){aT.eatWhile(/[01]/i);return P("number","number")}else{if(/\d/.test(aP)){aT.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return P("number","number")}else{if(aP=="/"){if(aT.eat("*")){aR.tokenize=aF;return aF(aT,aR)}else{if(aT.eat("/")){aT.skipToEnd();return P("comment","comment")}else{if(b(aT,aR,1)){H(aT);aT.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return P("regexp","string-2")}else{aT.eatWhile(T);return P("operator","operator",aT.current())}}}}else{if(aP=="`"){aR.tokenize=aH;return aH(aT,aR)}else{if(aP=="#"){aT.skipToEnd();return P("error","error")}else{if(T.test(aP)){aT.eatWhile(T);return P("operator","operator",aT.current())}else{if(aB.test(aP)){aT.eatWhile(aB);var aS=aT.current(),aQ=az.propertyIsEnumerable(aS)&&az[aS];return(aQ&&aR.lastType!=".")?P(aQ.type,aQ.style,aS):P("variable","variable",aS)}}}}}}}}}}}}}}}function W(aP){return function(aT,aR){var aS=false,aQ;if(aG&&aT.peek()=="@"&&aT.match(ay)){aR.tokenize=Z;return P("jsonld-keyword","meta")}while((aQ=aT.next())!=null){if(aQ==aP&&!aS){break}aS=!aS&&aQ=="\\"}if(!aS){aR.tokenize=Z}return P("string","string")}}function aF(aS,aR){var aP=false,aQ;while(aQ=aS.next()){if(aQ=="/"&&aP){aR.tokenize=Z;break}aP=(aQ=="*")}return P("comment","comment")}function aH(aS,aQ){var aR=false,aP;while((aP=aS.next())!=null){if(!aR&&(aP=="`"||aP=="$"&&aS.eat("{"))){aQ.tokenize=Z;break}aR=!aR&&aP=="\\"}return P("quasi","string-2",aS.current())}var n="([{}])";function aD(aX,aR){if(aR.fatArrowAt){aR.fatArrowAt=null}var aW=aX.string.indexOf("=>",aX.start);if(aW<0){return}if(g){var aT=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(aX.string.slice(aX.start,aW));if(aT){aW=aT.index}}var aU=0,aS=false;for(var aV=aW-1;aV>=0;--aV){var aP=aX.string.charAt(aV);var aQ=n.indexOf(aP);if(aQ>=0&&aQ<3){if(!aU){++aV;break}if(--aU==0){if(aP=="("){aS=true}break}}else{if(aQ>=3&&aQ<6){++aU}else{if(aB.test(aP)){aS=true}else{if(/["'\/]/.test(aP)){return}else{if(aS&&!aU){++aV;break}}}}}}if(aS&&!aU){aR.fatArrowAt=aV}}var c={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function N(aU,aQ,aP,aT,aR,aS){this.indented=aU;this.column=aQ;this.type=aP;this.prev=aR;this.info=aS;if(aT!=null){this.align=aT}}function u(aS,aR){for(var aQ=aS.localVars;aQ;aQ=aQ.next){if(aQ.name==aR){return true}}for(var aP=aS.context;aP;aP=aP.prev){for(var aQ=aP.vars;aQ;aQ=aQ.next){if(aQ.name==aR){return true}}}}function f(aT,aQ,aP,aS,aU){var aV=aT.cc;G.state=aT;G.stream=aU;G.marked=null,G.cc=aV;G.style=aQ;if(!aT.lexical.hasOwnProperty("align")){aT.lexical.align=true}while(true){var aR=aV.length?aV.pop():B?au:aM;if(aR(aP,aS)){while(aV.length&&aV[aV.length-1].lex){aV.pop()()}if(G.marked){return G.marked}if(aP=="variable"&&u(aT,aS)){return"variable-2"}return aQ}}}var G={state:null,column:null,marked:null,cc:null};function ag(){for(var aP=arguments.length-1;aP>=0;aP--){G.cc.push(arguments[aP])}}function al(){ag.apply(null,arguments);return true}function aC(aQ){function aP(aT){for(var aS=aT;aS;aS=aS.next){if(aS.name==aQ){return true}}return false}var aR=G.state;G.marked="def";if(aR.context){if(aP(aR.localVars)){return}aR.localVars={name:aQ,next:aR.localVars}}else{if(aP(aR.globalVars)){return}if(ap.globalVars){aR.globalVars={name:aQ,next:aR.globalVars}}}}var s={name:"this",next:{name:"arguments"}};function y(){G.state.context={prev:G.state.context,vars:G.state.localVars};G.state.localVars=s}function z(){G.state.localVars=G.state.context.vars;G.state.context=G.state.context.prev}function aK(aQ,aR){var aP=function(){var aU=G.state,aS=aU.indented;if(aU.lexical.type=="stat"){aS=aU.lexical.indented}else{for(var aT=aU.lexical;aT&&aT.type==")"&&aT.align;aT=aT.prev){aS=aT.indented}}aU.lexical=new N(aS,G.stream.column(),aQ,null,aU.lexical,aR)};aP.lex=true;return aP}function h(){var aP=G.state;if(aP.lexical.prev){if(aP.lexical.type==")"){aP.indented=aP.lexical.indented}aP.lexical=aP.lexical.prev}}h.lex=true;function t(aP){function aQ(aR){if(aR==aP){return al()}else{if(aP==";"){return ag()}else{return al(aQ)}}}return aQ}function aM(aP,aQ){if(aP=="var"){return al(aK("vardef",aQ.length),d,t(";"),h)}if(aP=="keyword a"){return al(aK("form"),av,aM,h)}if(aP=="keyword b"){return al(aK("form"),aM,h)}if(aP=="{"){return al(aK("}"),A,h)}if(aP==";"){return al()}if(aP=="if"){if(G.state.lexical.info=="else"&&G.state.cc[G.state.cc.length-1]==h){G.state.cc.pop()()}return al(aK("form"),av,aM,h,e)}if(aP=="function"){return al(Q)}if(aP=="for"){return al(aK("form"),w,aM,h)}if(aP=="variable"){return al(aK("stat"),aN)}if(aP=="switch"){return al(aK("form"),av,aK("}","switch"),t("{"),A,h,h)}if(aP=="case"){return al(au,t(":"))}if(aP=="default"){return al(t(":"))}if(aP=="catch"){return al(aK("form"),y,t("("),ak,t(")"),aM,h,z)}if(aP=="class"){return al(aK("form"),ab,h)}if(aP=="export"){return al(aK("stat"),aL,h)}if(aP=="import"){return al(aK("stat"),am,h)}if(aP=="module"){return al(aK("form"),i,aK("}"),t("{"),A,h,h)}if(aP=="type"){return al(j,t("operator"),j,t(";"))}if(aP=="async"){return al(aM)}return ag(aK("stat"),au,t(";"),h)}function au(aP){return ae(aP,false)}function aJ(aP){return ae(aP,true)}function av(aP){if(aP!="("){return ag()}return al(aK(")"),au,t(")"),h)}function ae(aQ,aS){if(G.state.fatArrowAt==G.stream.start){var aP=aS?R:ac;if(aQ=="("){return al(y,aK(")"),aA(i,")"),h,t("=>"),aP,z)}else{if(aQ=="variable"){return ag(y,i,t("=>"),aP,z)}}}var aR=aS?k:ah;if(c.hasOwnProperty(aQ)){return al(aR)}if(aQ=="function"){return al(Q,aR)}if(aQ=="class"){return al(aK("form"),L,h)}if(aQ=="keyword c"||aQ=="async"){return al(aS?aq:ao)}if(aQ=="("){return al(aK(")"),ao,t(")"),h,aR)}if(aQ=="operator"||aQ=="spread"){return al(aS?aJ:au)}if(aQ=="["){return al(aK("]"),o,h,aR)}if(aQ=="{"){return aE(v,"}",null,aR)}if(aQ=="quasi"){return ag(U,aR)}if(aQ=="new"){return al(K(aS))}return al()}function ao(aP){if(aP.match(/[;\}\)\],]/)){return ag()}return ag(au)}function aq(aP){if(aP.match(/[;\}\)\],]/)){return ag()}return ag(aJ)}function ah(aP,aQ){if(aP==","){return al(au)}return k(aP,aQ,false)}function k(aP,aR,aT){var aQ=aT==false?ah:k;var aS=aT==false?au:aJ;if(aP=="=>"){return al(y,aT?R:ac,z)}if(aP=="operator"){if(/\+\+|--/.test(aR)){return al(aQ)}if(aR=="?"){return al(au,t(":"),aS)}return al(aS)}if(aP=="quasi"){return ag(U,aQ)}if(aP==";"){return}if(aP=="("){return aE(aJ,")","call",aQ)}if(aP=="."){return al(ar,aQ)}if(aP=="["){return al(aK("]"),ao,t("]"),h,aQ)}}function U(aP,aQ){if(aP!="quasi"){return ag()}if(aQ.slice(aQ.length-2)!="${"){return al(U)}return al(au,r)}function r(aP){if(aP=="}"){G.marked="string-2";G.state.tokenize=aH;return al(U)}}function ac(aP){aD(G.stream,G.state);return ag(aP=="{"?aM:au)}function R(aP){aD(G.stream,G.state);return ag(aP=="{"?aM:aJ)}function K(aP){return function(aQ){if(aQ=="."){return al(aP?p:aa)}else{return ag(aP?aJ:au)}}}function aa(aP,aQ){if(aQ=="target"){G.marked="keyword";return al(ah)}}function p(aP,aQ){if(aQ=="target"){G.marked="keyword";return al(k)}}function aN(aP){if(aP==":"){return al(h,aM)}return ag(ah,t(";"),h)}function ar(aP){if(aP=="variable"){G.marked="property";return al()}}function v(aP,aQ){if(aP=="async"){G.marked="property";return al(v)}else{if(aP=="variable"||G.style=="keyword"){G.marked="property";if(aQ=="get"||aQ=="set"){return al(M)}return al(O)}else{if(aP=="number"||aP=="string"){G.marked=aG?"property":(G.style+" property");return al(O)}else{if(aP=="jsonld-keyword"){return al(O)}else{if(aP=="modifier"){return al(v)}else{if(aP=="["){return al(au,t("]"),O)}else{if(aP=="spread"){return al(au)}else{if(aP==":"){return ag(O)}}}}}}}}}function M(aP){if(aP!="variable"){return ag(O)}G.marked="property";return al(Q)}function O(aP){if(aP==":"){return al(aJ)}if(aP=="("){return ag(Q)}}function aA(aR,aP){function aQ(aT,aU){if(aT==","){var aS=G.state.lexical;if(aS.info=="call"){aS.pos=(aS.pos||0)+1}return al(function(aV,aW){if(aV==aP||aW==aP){return ag()}return ag(aR)},aQ)}if(aT==aP||aU==aP){return al()}return al(t(aP))}return function(aS,aT){if(aS==aP||aT==aP){return al()}return ag(aR,aQ)}}function aE(aS,aP,aR){for(var aQ=3;aQ<arguments.length;aQ++){G.cc.push(arguments[aQ])}return al(aK(aP,aR),aA(aS,aP),h)}function A(aP){if(aP=="}"){return al()}return ag(aM,A)}function Y(aP,aQ){if(g){if(aP==":"){return al(j)}if(aQ=="?"){return al(Y)}}}function j(aP){if(aP=="variable"){G.marked="variable-3";return al(J)}if(aP=="{"){return al(aA(at,"}"))}if(aP=="("){return al(aA(ai,")"),V)}}function V(aP){if(aP=="=>"){return al(j)}}function at(aP){if(aP=="variable"||G.style=="keyword"){G.marked="property";return al(at)}else{if(aP==":"){return al(j)}}}function ai(aP){if(aP=="variable"){return al(ai)}else{if(aP==":"){return al(j)}}}function J(aP,aQ){if(aQ=="<"){return al(aA(j,">"),J)}if(aP=="["){return al(t("]"),J)}}function d(){return ag(i,Y,aj,ad)}function i(aP,aQ){if(aP=="modifier"){return al(i)}if(aP=="variable"){aC(aQ);return al()}if(aP=="spread"){return al(i)}if(aP=="["){return aE(i,"]")}if(aP=="{"){return aE(aI,"}")}}function aI(aP,aQ){if(aP=="variable"&&!G.stream.match(/^\s*:/,false)){aC(aQ);return al(aj)}if(aP=="variable"){G.marked="property"}if(aP=="spread"){return al(i)}if(aP=="}"){return ag()}return al(t(":"),i,aj)}function aj(aP,aQ){if(aQ=="="){return al(aJ)}}function ad(aP){if(aP==","){return al(d)}}function e(aP,aQ){if(aP=="keyword b"&&aQ=="else"){return al(aK("form","else"),aM,h)}}function w(aP){if(aP=="("){return al(aK(")"),F,t(")"),h)}}function F(aP){if(aP=="var"){return al(d,t(";"),E)}if(aP==";"){return al(E)}if(aP=="variable"){return al(x)}return ag(au,t(";"),E)}function x(aP,aQ){if(aQ=="in"||aQ=="of"){G.marked="keyword";return al(au)}return al(ah,E)}function E(aP,aQ){if(aP==";"){return al(D)}if(aQ=="in"||aQ=="of"){G.marked="keyword";return al(au)}return ag(au,t(";"),D)}function D(aP){if(aP!=")"){al(au)}}function Q(aP,aQ){if(aQ=="*"){G.marked="keyword";return al(Q)}if(aP=="variable"){aC(aQ);return al(Q)}if(aP=="("){return al(y,aK(")"),aA(ak,")"),h,Y,aM,z)}}function ak(aP){if(aP=="spread"){return al(ak)}return ag(i,Y,aj)}function L(aP,aQ){if(aP=="variable"){return ab(aP,aQ)}return S(aP,aQ)}function ab(aP,aQ){if(aP=="variable"){aC(aQ);return al(S)}}function S(aP,aQ){if(aQ=="extends"||aQ=="implements"){return al(g?j:au,S)}if(aP=="{"){return al(aK("}"),q,h)}}function q(aP,aQ){if(aP=="variable"||G.style=="keyword"){if((aQ=="static"||aQ=="get"||aQ=="set"||(g&&(aQ=="public"||aQ=="private"||aQ=="protected"||aQ=="readonly"||aQ=="abstract")))&&G.stream.match(/^\s+[\w$\xa1-\uffff]/,false)){G.marked="keyword";return al(q)}G.marked="property";return al(g?aO:Q,q)}if(aQ=="*"){G.marked="keyword";return al(q)}if(aP==";"){return al(q)}if(aP=="}"){return al()}}function aO(aP,aQ){if(aQ=="?"){return al(aO)}if(aP==":"){return al(j,aj)}return ag(Q)}function aL(aP,aQ){if(aQ=="*"){G.marked="keyword";return al(an,t(";"))}if(aQ=="default"){G.marked="keyword";return al(au,t(";"))}return ag(aM)}function am(aP){if(aP=="string"){return al()}return ag(ax,an)}function ax(aP,aQ){if(aP=="{"){return aE(ax,"}")}if(aP=="variable"){aC(aQ)}if(aQ=="*"){G.marked="keyword"}return al(l)}function l(aP,aQ){if(aQ=="as"){G.marked="keyword";return al(ax)}}function an(aP,aQ){if(aQ=="from"){G.marked="keyword";return al(au)}}function o(aP){if(aP=="]"){return al()}return ag(aA(aJ,"]"))}function aw(aQ,aP){return aQ.lastType=="operator"||aQ.lastType==","||T.test(aP.charAt(0))||/[,.]/.test(aP.charAt(0))}return{startState:function(aQ){var aP={tokenize:Z,lastType:"sof",cc:[],lexical:new N((aQ||0)-m,0,"block",false),localVars:ap.localVars,context:ap.localVars&&{vars:ap.localVars},indented:aQ||0};if(ap.globalVars&&typeof ap.globalVars=="object"){aP.globalVars=ap.globalVars}return aP},token:function(aR,aQ){if(aR.sol()){if(!aQ.lexical.hasOwnProperty("align")){aQ.lexical.align=false}aQ.indented=aR.indentation();aD(aR,aQ)}if(aQ.tokenize!=aF&&aR.eatSpace()){return null}var aP=aQ.tokenize(aR,aQ);if(X=="comment"){return aP}aQ.lastType=X=="operator"&&(I=="++"||I=="--")?"incdec":X;return f(aQ,aP,X,I,aR)},indent:function(aP,aS){if(aP.tokenize==aF){return a.Pass}if(aP.tokenize!=Z){return 0}var aW=aS&&aS.charAt(0),aX=aP.lexical,aV;if(!/^\s*else\b/.test(aS)){for(var aR=aP.cc.length-1;aR>=0;--aR){var aT=aP.cc[aR];if(aT==h){aX=aX.prev}else{if(aT!=e){break}}}}while((aX.type=="stat"||aX.type=="form")&&(aW=="}"||((aV=aP.cc[aP.cc.length-1])&&(aV==ah||aV==k)&&!/^[,\.=+\-*:?[\(]/.test(aS)))){aX=aX.prev}if(C&&aX.type==")"&&aX.prev.type=="stat"){aX=aX.prev}var aU=aX.type,aQ=aW==aU;if(aU=="vardef"){return aX.indented+(aP.lastType=="operator"||aP.lastType==","?aX.info+1:0)}else{if(aU=="form"&&aW=="{"){return aX.indented}else{if(aU=="form"){return aX.indented+m}else{if(aU=="stat"){return aX.indented+(aw(aP,aS)?C||m:0)}else{if(aX.info=="switch"&&!aQ&&ap.doubleIndentSwitch!=false){return aX.indented+(/^(?:case|default)\b/.test(aS)?m:2*m)}else{if(aX.align){return aX.column+(aQ?0:1)}else{return aX.indented+(aQ?0:m)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:B?null:"/*",blockCommentEnd:B?null:"*/",lineComment:B?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:B?"json":"javascript",jsonldMode:aG,jsonMode:B,expressionAllowed:b,skipExpression:function(aP){var aQ=aP.cc[aP.cc.length-1];if(aQ==au||aQ==aJ){aP.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});
|
@@ -1 +1 @@
|
|
1
|
-
(function(a){if(typeof exports=="object"&&typeof module=="object"){a(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"],a)}else{a(CodeMirror)}}})(function(d){var g={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/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 f(n,j,k){var m=n.current(),l=m.search(j);if(l>-1){n.backUp(m.length-l)}else{if(m.match(/<\/?$/)){n.backUp(m.length);if(!n.match(j,false)){n.match(m)}}}return k}var e={};function c(j){var k=e[j];if(k){return k}return e[j]=new RegExp("\\s+"+j+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function a(l,j){var k=l.match(c(j));return k?k[2]:""}function i(k,j){return new RegExp((j?"^":"")+"</s*"+k+"s*>","i")}function h(o,n){for(var j in o){var k=n[j]||(n[j]=[]);var m=o[j];for(var l=m.length-1;l>=0;l--){k.unshift(m[l])}}}function b(l,m){for(var k=0;k<l.length;k++){var j=l[k];if(!j[0]||j[1].test(a(m,j[0]))){return j[2]}}}d.defineMode("htmlmixed",function(k,o){var q=d.getMode(k,{name:"xml",htmlMode:true,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag});var j={};var p=o&&o.tags,n=o&&o.scriptTypes;h(g,j);if(p){h(p,j)}if(n){for(var m=n.length-1;m>=0;m--){j.script.unshift(["type",n[m].matches,n[m].mode])}}function l(z,r){var s=q.token(z,r.htmlState),A=/\btag\b/.test(s),u;if(A&&!/[<>\s\/]/.test(z.current())&&(u=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(u)){r.inTag=u+" "}else{if(r.inTag&&A&&/>$/.test(z.current())){var t=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var y=z.current()==">"&&b(j[t[1]],t[2]);var x=d.getMode(k,y);var w=i(t[1],true),v=i(t[1],false);r.token=function(C,B){if(C.match(w,false)){B.token=l;B.localState=B.localMode=null;return null}return f(C,v,B.localMode.token(C,B.localState))};r.localMode=x;r.localState=d.startState(x,q.indent(r.htmlState,""))}else{if(r.inTag){r.inTag+=z.current();if(z.eol()){r.inTag+=" "}}}}return s}return{startState:function(){var r=q.startState();return{token:l,inTag:null,localMode:null,localState:null,htmlState:r}},copyState:function(s){var r;if(s.localState){r=d.copyState(s.localMode,s.localState)}return{token:s.token,inTag:s.inTag,localMode:s.localMode,localState:r,htmlState:d.copyState(q,s.htmlState)}},token:function(s,r){return r.token(s,r)},indent:function(s,r){if(!s.localMode||/^\s*<\//.test(r)){return q.indent(s.htmlState,r)}else{if(s.localMode.indent){return s.localMode.indent(s.localState,r)}else{return d.Pass}}},innerMode:function(r){return{state:r.localState||r.htmlState,mode:r.localMode||q}}}},"xml","javascript","css");d.defineMIME("text/html","htmlmixed")});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b={autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,menuitem:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true};var c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,caseFold:false};a.defineMode("xml",function(m,y){var r=m.indentUnit;var z={};var l=y.htmlMode?b:c;for(var f in l){z[f]=l[f]}for(var f in y){z[f]=y[f]}var g,h;function p(G,F){function D(H){F.tokenize=H;return H(G,F)}var E=G.next();if(E=="<"){if(G.eat("!")){if(G.eat("[")){if(G.match("CDATA[")){return D(x("atom","]]>"))}else{return null}}else{if(G.match("--")){return D(x("comment","-->"))}else{if(G.match("DOCTYPE",true,true)){G.eatWhile(/[\w\._\-]/);return D(A(1))}else{return null}}}}else{if(G.eat("?")){G.eatWhile(/[\w\._\-]/);F.tokenize=x("meta","?>");return"meta"}else{g=G.eat("/")?"closeTag":"openTag";F.tokenize=o;return"tag bracket"}}}else{if(E=="&"){var C;if(G.eat("#")){if(G.eat("x")){C=G.eatWhile(/[a-fA-F\d]/)&&G.eat(";")}else{C=G.eatWhile(/[\d]/)&&G.eat(";")}}else{C=G.eatWhile(/[\w\.\-:]/)&&G.eat(";")}return C?"atom":"error"}else{G.eatWhile(/[^&<]/);return null}}}p.isInText=true;function o(F,E){var D=F.next();if(D==">"||(D=="/"&&F.eat(">"))){E.tokenize=p;g=D==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(D=="="){g="equals";return null}else{if(D=="<"){E.tokenize=p;E.state=n;E.tagName=E.tagStart=null;var C=E.tokenize(F,E);return C?C+" tag error":"tag error"}else{if(/[\'\"]/.test(D)){E.tokenize=k(D);E.stringStartCol=F.column();return E.tokenize(F,E)}else{F.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function k(C){var D=function(F,E){while(!F.eol()){if(F.next()==C){E.tokenize=o;break}}return"string"};D.isInAttribute=true;return D}function x(D,C){return function(F,E){while(!F.eol()){if(F.match(C)){E.tokenize=p;break}F.next()}return D}}function A(C){return function(F,E){var D;while((D=F.next())!=null){if(D=="<"){E.tokenize=A(C+1);return E.tokenize(F,E)}else{if(D==">"){if(C==1){E.tokenize=p;break}else{E.tokenize=A(C-1);return E.tokenize(F,E)}}}}return"meta"}}function t(D,C,E){this.prev=D.context;this.tagName=C;this.indent=D.indented;this.startOfLine=E;if(z.doNotIndent.hasOwnProperty(C)||(D.context&&D.context.noIndent)){this.noIndent=true}}function w(C){if(C.context){C.context=C.context.prev}}function s(E,D){var C;while(true){if(!E.context){return}C=E.context.tagName;if(!z.contextGrabbers.hasOwnProperty(C)||!z.contextGrabbers[C].hasOwnProperty(D)){return}w(E)}}function n(C,E,D){if(C=="openTag"){D.tagStart=E.column();return d}else{if(C=="closeTag"){return v}else{return n}}}function d(C,E,D){if(C=="word"){D.tagName=E.current();h="tag";return e}else{h="error";return d}}function v(D,F,E){if(D=="word"){var C=F.current();if(E.context&&E.context.tagName!=C&&z.implicitlyClosed.hasOwnProperty(E.context.tagName)){w(E)}if((E.context&&E.context.tagName==C)||z.matchClosing===false){h="tag";return u}else{h="tag error";return B}}else{h="error";return B}}function u(D,C,E){if(D!="endTag"){h="error";return u}w(E);return n}function B(C,E,D){h="error";return u(C,E,D)}function e(F,D,G){if(F=="word"){h="attribute";return j}else{if(F=="endTag"||F=="selfcloseTag"){var E=G.tagName,C=G.tagStart;G.tagName=G.tagStart=null;if(F=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(E)){s(G,E)}else{s(G,E);G.context=new t(G,E,C==G.indented)}return n}}h="error";return e}function j(C,E,D){if(C=="equals"){return q}if(!z.allowMissing){h="error"}return e(C,E,D)}function q(C,E,D){if(C=="string"){return i}if(C=="word"&&z.allowUnquoted){h="string";return e}h="error";return e(C,E,D)}function i(C,E,D){if(C=="string"){return i}return e(C,E,D)}return{startState:function(C){var D={tokenize:p,state:n,indented:C||0,tagName:null,tagStart:null,context:null};if(C!=null){D.baseIndent=C}return D},token:function(E,D){if(!D.tagName&&E.sol()){D.indented=E.indentation()}if(E.eatSpace()){return null}g=null;var C=D.tokenize(E,D);if((C||g)&&C!="comment"){h=null;D.state=D.state(g||C,E,D);if(h){C=h=="error"?C+" error":h}}return C},indent:function(H,D,G){var F=H.context;if(H.tokenize.isInAttribute){if(H.tagStart==H.indented){return H.stringStartCol+1}else{return H.indented+r}}if(F&&F.noIndent){return a.Pass}if(H.tokenize!=o&&H.tokenize!=p){return G?G.match(/^(\s*)/)[0].length:0}if(H.tagName){if(z.multilineTagIndentPastTag!==false){return H.tagStart+H.tagName.length+2}else{return H.tagStart+r*(z.multilineTagIndentFactor||1)}}if(z.alignCDATA&&/<!\[CDATA\[/.test(D)){return 0}var C=D&&/^<(\/)?([\w_:\.-]*)/.exec(D);if(C&&C[1]){while(F){if(F.tagName==C[2]){F=F.prev;break}else{if(z.implicitlyClosed.hasOwnProperty(F.tagName)){F=F.prev}else{break}}}}else{if(C){while(F){var E=z.contextGrabbers[F.tagName];if(E&&E.hasOwnProperty(C[2])){F=F.prev}else{break}}}}while(F&&F.prev&&!F.startOfLine){F=F.prev}if(F){return F.indent+r}else{return H.baseIndent||0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(C){if(C.state==q){C.state=e}}}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){function b(e,d,c){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(d.lastType)||(d.lastType=="quasi"&&/\{\s*$/.test(e.string.slice(0,e.pos-(c||0))))}a.defineMode("javascript",function(ac,am){var m=ac.indentUnit;var C=am.statementIndent;var aE=am.jsonld;var B=am.json||aE;var h=am.typescript;var ax=am.wordCharacters||/[\w$\xa1-\uffff]/;var av=function(){function aU(aW){return{type:aW,style:"keyword"}}var aP=aU("keyword a"),aN=aU("keyword b"),aM=aU("keyword c");var aO=aU("operator"),aS={type:"atom",style:"atom"};var aQ={"if":aU("if"),"while":aP,"with":aP,"else":aN,"do":aN,"try":aN,"finally":aN,"return":aM,"break":aM,"continue":aM,"new":aU("new"),"delete":aM,"throw":aM,"debugger":aM,"var":aU("var"),"const":aU("var"),let:aU("var"),"function":aU("function"),"catch":aU("catch"),"for":aU("for"),"switch":aU("switch"),"case":aU("case"),"default":aU("default"),"in":aO,"typeof":aO,"instanceof":aO,"true":aS,"false":aS,"null":aS,"undefined":aS,"NaN":aS,"Infinity":aS,"this":aU("this"),"class":aU("class"),"super":aU("atom"),yield:aM,"export":aU("export"),"import":aU("import"),"extends":aM};if(h){var aV={type:"variable",style:"variable-3"};var aR={"interface":aU("class"),"implements":aM,namespace:aM,module:aU("module"),"enum":aU("module"),"public":aU("modifier"),"private":aU("modifier"),"protected":aU("modifier"),"abstract":aU("modifier"),as:aO,string:aV,number:aV,"boolean":aV,any:aV};for(var aT in aR){aQ[aT]=aR[aT]}}return aQ}();var R=/[+\-*&%=<>!?|~^]/;var au=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function H(aP){var aN=false,aM,aO=false;while((aM=aP.next())!=null){if(!aN){if(aM=="/"&&!aO){return}if(aM=="["){aO=true}else{if(aO&&aM=="]"){aO=false}}}aN=!aN&&aM=="\\"}}var U,I;function N(aO,aN,aM){U=aO;I=aM;return aN}function W(aQ,aO){var aM=aQ.next();if(aM=='"'||aM=="'"){aO.tokenize=T(aM);return aO.tokenize(aQ,aO)}else{if(aM=="."&&aQ.match(/^\d+(?:[eE][+\-]?\d+)?/)){return N("number","number")}else{if(aM=="."&&aQ.match("..")){return N("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aM)){return N(aM)}else{if(aM=="="&&aQ.eat(">")){return N("=>","operator")}else{if(aM=="0"&&aQ.eat(/x/i)){aQ.eatWhile(/[\da-f]/i);return N("number","number")}else{if(aM=="0"&&aQ.eat(/o/i)){aQ.eatWhile(/[0-7]/i);return N("number","number")}else{if(aM=="0"&&aQ.eat(/b/i)){aQ.eatWhile(/[01]/i);return N("number","number")}else{if(/\d/.test(aM)){aQ.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return N("number","number")}else{if(aM=="/"){if(aQ.eat("*")){aO.tokenize=aD;return aD(aQ,aO)}else{if(aQ.eat("/")){aQ.skipToEnd();return N("comment","comment")}else{if(b(aQ,aO,1)){H(aQ);aQ.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return N("regexp","string-2")}else{aQ.eatWhile(R);return N("operator","operator",aQ.current())}}}}else{if(aM=="`"){aO.tokenize=aF;return aF(aQ,aO)}else{if(aM=="#"){aQ.skipToEnd();return N("error","error")}else{if(R.test(aM)){aQ.eatWhile(R);return N("operator","operator",aQ.current())}else{if(ax.test(aM)){aQ.eatWhile(ax);var aP=aQ.current(),aN=av.propertyIsEnumerable(aP)&&av[aP];return(aN&&aO.lastType!=".")?N(aN.type,aN.style,aP):N("variable","variable",aP)}}}}}}}}}}}}}}}function T(aM){return function(aQ,aO){var aP=false,aN;if(aE&&aQ.peek()=="@"&&aQ.match(au)){aO.tokenize=W;return N("jsonld-keyword","meta")}while((aN=aQ.next())!=null){if(aN==aM&&!aP){break}aP=!aP&&aN=="\\"}if(!aP){aO.tokenize=W}return N("string","string")}}function aD(aP,aO){var aM=false,aN;while(aN=aP.next()){if(aN=="/"&&aM){aO.tokenize=W;break}aM=(aN=="*")}return N("comment","comment")}function aF(aP,aN){var aO=false,aM;while((aM=aP.next())!=null){if(!aO&&(aM=="`"||aM=="$"&&aP.eat("{"))){aN.tokenize=W;break}aO=!aO&&aM=="\\"}return N("quasi","string-2",aP.current())}var n="([{}])";function aA(aS,aP){if(aP.fatArrowAt){aP.fatArrowAt=null}var aO=aS.string.indexOf("=>",aS.start);if(aO<0){return}var aR=0,aN=false;for(var aT=aO-1;aT>=0;--aT){var aM=aS.string.charAt(aT);var aQ=n.indexOf(aM);if(aQ>=0&&aQ<3){if(!aR){++aT;break}if(--aR==0){break}}else{if(aQ>=3&&aQ<6){++aR}else{if(ax.test(aM)){aN=true}else{if(/["'\/]/.test(aM)){return}else{if(aN&&!aR){++aT;break}}}}}}if(aN&&!aR){aP.fatArrowAt=aT}}var c={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function L(aR,aN,aM,aQ,aO,aP){this.indented=aR;this.column=aN;this.type=aM;this.prev=aO;this.info=aP;if(aQ!=null){this.align=aQ}}function u(aP,aO){for(var aN=aP.localVars;aN;aN=aN.next){if(aN.name==aO){return true}}for(var aM=aP.context;aM;aM=aM.prev){for(var aN=aM.vars;aN;aN=aN.next){if(aN.name==aO){return true}}}}function g(aQ,aN,aM,aP,aR){var aS=aQ.cc;F.state=aQ;F.stream=aR;F.marked=null,F.cc=aS;F.style=aN;if(!aQ.lexical.hasOwnProperty("align")){aQ.lexical.align=true}while(true){var aO=aS.length?aS.pop():B?aq:aK;if(aO(aM,aP)){while(aS.length&&aS[aS.length-1].lex){aS.pop()()}if(F.marked){return F.marked}if(aM=="variable"&&u(aQ,aP)){return"variable-2"}return aN}}}var F={state:null,column:null,marked:null,cc:null};function ad(){for(var aM=arguments.length-1;aM>=0;aM--){F.cc.push(arguments[aM])}}function ai(){ad.apply(null,arguments);return true}function az(aN){function aM(aQ){for(var aP=aQ;aP;aP=aP.next){if(aP.name==aN){return true}}return false}var aO=F.state;F.marked="def";if(aO.context){if(aM(aO.localVars)){return}aO.localVars={name:aN,next:aO.localVars}}else{if(aM(aO.globalVars)){return}if(am.globalVars){aO.globalVars={name:aN,next:aO.globalVars}}}}var s={name:"this",next:{name:"arguments"}};function y(){F.state.context={prev:F.state.context,vars:F.state.localVars};F.state.localVars=s}function z(){F.state.localVars=F.state.context.vars;F.state.context=F.state.context.prev}function aI(aN,aO){var aM=function(){var aR=F.state,aP=aR.indented;if(aR.lexical.type=="stat"){aP=aR.lexical.indented}else{for(var aQ=aR.lexical;aQ&&aQ.type==")"&&aQ.align;aQ=aQ.prev){aP=aQ.indented}}aR.lexical=new L(aP,F.stream.column(),aN,null,aR.lexical,aO)};aM.lex=true;return aM}function i(){var aM=F.state;if(aM.lexical.prev){if(aM.lexical.type==")"){aM.indented=aM.lexical.indented}aM.lexical=aM.lexical.prev}}i.lex=true;function t(aM){function aN(aO){if(aO==aM){return ai()}else{if(aM==";"){return ad()}else{return ai(aN)}}}return aN}function aK(aM,aN){if(aM=="var"){return ai(aI("vardef",aN.length),e,t(";"),i)}if(aM=="keyword a"){return ai(aI("form"),aq,aK,i)}if(aM=="keyword b"){return ai(aI("form"),aK,i)}if(aM=="{"){return ai(aI("}"),A,i)}if(aM==";"){return ai()}if(aM=="if"){if(F.state.lexical.info=="else"&&F.state.cc[F.state.cc.length-1]==i){F.state.cc.pop()()}return ai(aI("form"),aq,aK,i,f)}if(aM=="function"){return ai(O)}if(aM=="for"){return ai(aI("form"),w,aK,i)}if(aM=="variable"){return ai(aI("stat"),aL)}if(aM=="switch"){return ai(aI("form"),aq,aI("}","switch"),t("{"),A,i,i)}if(aM=="case"){return ai(aq,t(":"))}if(aM=="default"){return ai(t(":"))}if(aM=="catch"){return ai(aI("form"),y,t("("),ag,t(")"),aK,i,z)}if(aM=="class"){return ai(aI("form"),Y,i)}if(aM=="export"){return ai(aI("stat"),aJ,i)}if(aM=="import"){return ai(aI("stat"),aj,i)}if(aM=="module"){return ai(aI("form"),j,aI("}"),t("{"),A,i,i)}return ad(aI("stat"),aq,t(";"),i)}function aq(aM){return ab(aM,false)}function aH(aM){return ab(aM,true)}function ab(aN,aP){if(F.state.fatArrowAt==F.stream.start){var aM=aP?P:Z;if(aN=="("){return ai(y,aI(")"),aw(j,")"),i,t("=>"),aM,z)}else{if(aN=="variable"){return ad(y,j,t("=>"),aM,z)}}}var aO=aP?k:ae;if(c.hasOwnProperty(aN)){return ai(aO)}if(aN=="function"){return ai(O,aO)}if(aN=="keyword c"){return ai(aP?an:al)}if(aN=="("){return ai(aI(")"),al,aC,t(")"),i,aO)}if(aN=="operator"||aN=="spread"){return ai(aP?aH:aq)}if(aN=="["){return ai(aI("]"),o,i,aO)}if(aN=="{"){return aB(v,"}",null,aO)}if(aN=="quasi"){return ad(S,aO)}if(aN=="new"){return ai(J(aP))}return ai()}function al(aM){if(aM.match(/[;\}\)\],]/)){return ad()}return ad(aq)}function an(aM){if(aM.match(/[;\}\)\],]/)){return ad()}return ad(aH)}function ae(aM,aN){if(aM==","){return ai(aq)}return k(aM,aN,false)}function k(aM,aO,aQ){var aN=aQ==false?ae:k;var aP=aQ==false?aq:aH;if(aM=="=>"){return ai(y,aQ?P:Z,z)}if(aM=="operator"){if(/\+\+|--/.test(aO)){return ai(aN)}if(aO=="?"){return ai(aq,t(":"),aP)}return ai(aP)}if(aM=="quasi"){return ad(S,aN)}if(aM==";"){return}if(aM=="("){return aB(aH,")","call",aN)}if(aM=="."){return ai(ao,aN)}if(aM=="["){return ai(aI("]"),al,t("]"),i,aN)}}function S(aM,aN){if(aM!="quasi"){return ad()}if(aN.slice(aN.length-2)!="${"){return ai(S)}return ai(aq,r)}function r(aM){if(aM=="}"){F.marked="string-2";F.state.tokenize=aF;return ai(S)}}function Z(aM){aA(F.stream,F.state);return ad(aM=="{"?aK:aq)}function P(aM){aA(F.stream,F.state);return ad(aM=="{"?aK:aH)}function J(aM){return function(aN){if(aN=="."){return ai(aM?p:X)}else{return ad(aM?aH:aq)}}}function X(aM,aN){if(aN=="target"){F.marked="keyword";return ai(ae)}}function p(aM,aN){if(aN=="target"){F.marked="keyword";return ai(k)}}function aL(aM){if(aM==":"){return ai(i,aK)}return ad(ae,t(";"),i)}function ao(aM){if(aM=="variable"){F.marked="property";return ai()}}function v(aM,aN){if(aM=="variable"||F.style=="keyword"){F.marked="property";if(aN=="get"||aN=="set"){return ai(K)}return ai(M)}else{if(aM=="number"||aM=="string"){F.marked=aE?"property":(F.style+" property");return ai(M)}else{if(aM=="jsonld-keyword"){return ai(M)}else{if(aM=="modifier"){return ai(v)}else{if(aM=="["){return ai(aq,t("]"),M)}else{if(aM=="spread"){return ai(aq)}}}}}}}function K(aM){if(aM!="variable"){return ad(M)}F.marked="property";return ai(O)}function M(aM){if(aM==":"){return ai(aH)}if(aM=="("){return ad(O)}}function aw(aO,aM){function aN(aQ){if(aQ==","){var aP=F.state.lexical;if(aP.info=="call"){aP.pos=(aP.pos||0)+1}return ai(aO,aN)}if(aQ==aM){return ai()}return ai(t(aM))}return function(aP){if(aP==aM){return ai()}return ad(aO,aN)}}function aB(aP,aM,aO){for(var aN=3;aN<arguments.length;aN++){F.cc.push(arguments[aN])}return ai(aI(aM,aO),aw(aP,aM),i)}function A(aM){if(aM=="}"){return ai()}return ad(aK,A)}function V(aM){if(h&&aM==":"){return ai(ah)}}function ay(aM,aN){if(aN=="="){return ai(aH)}}function ah(aM){if(aM=="variable"){F.marked="variable-3";return ai()}}function e(){return ad(j,V,af,aa)}function j(aM,aN){if(aM=="modifier"){return ai(j)}if(aM=="variable"){az(aN);return ai()}if(aM=="spread"){return ai(j)}if(aM=="["){return aB(j,"]")}if(aM=="{"){return aB(aG,"}")}}function aG(aM,aN){if(aM=="variable"&&!F.stream.match(/^\s*:/,false)){az(aN);return ai(af)}if(aM=="variable"){F.marked="property"}if(aM=="spread"){return ai(j)}if(aM=="}"){return ad()}return ai(t(":"),j,af)}function af(aM,aN){if(aN=="="){return ai(aH)}}function aa(aM){if(aM==","){return ai(e)}}function f(aM,aN){if(aM=="keyword b"&&aN=="else"){return ai(aI("form","else"),aK,i)}}function w(aM){if(aM=="("){return ai(aI(")"),G,t(")"),i)}}function G(aM){if(aM=="var"){return ai(e,t(";"),E)}if(aM==";"){return ai(E)}if(aM=="variable"){return ai(x)}return ad(aq,t(";"),E)}function x(aM,aN){if(aN=="in"||aN=="of"){F.marked="keyword";return ai(aq)}return ai(ae,E)}function E(aM,aN){if(aM==";"){return ai(D)}if(aN=="in"||aN=="of"){F.marked="keyword";return ai(aq)}return ad(aq,t(";"),D)}function D(aM){if(aM!=")"){ai(aq)}}function O(aM,aN){if(aN=="*"){F.marked="keyword";return ai(O)}if(aM=="variable"){az(aN);return ai(O)}if(aM=="("){return ai(y,aI(")"),aw(ag,")"),i,aK,z)}}function ag(aM){if(aM=="spread"){return ai(ag)}return ad(j,V,ay)}function Y(aM,aN){if(aM=="variable"){az(aN);return ai(Q)}}function Q(aM,aN){if(aN=="extends"){return ai(aq,Q)}if(aM=="{"){return ai(aI("}"),q,i)}}function q(aM,aN){if(aM=="variable"||F.style=="keyword"){if(aN=="static"){F.marked="keyword";return ai(q)}F.marked="property";if(aN=="get"||aN=="set"){return ai(d,O,q)}return ai(O,q)}if(aN=="*"){F.marked="keyword";return ai(q)}if(aM==";"){return ai(q)}if(aM=="}"){return ai()}}function d(aM){if(aM!="variable"){return ad()}F.marked="property";return ai()}function aJ(aM,aN){if(aN=="*"){F.marked="keyword";return ai(ak,t(";"))}if(aN=="default"){F.marked="keyword";return ai(aq,t(";"))}return ad(aK)}function aj(aM){if(aM=="string"){return ai()}return ad(at,ak)}function at(aM,aN){if(aM=="{"){return aB(at,"}")}if(aM=="variable"){az(aN)}if(aN=="*"){F.marked="keyword"}return ai(l)}function l(aM,aN){if(aN=="as"){F.marked="keyword";return ai(at)}}function ak(aM,aN){if(aN=="from"){F.marked="keyword";return ai(aq)}}function o(aM){if(aM=="]"){return ai()}return ad(aH,ap)}function ap(aM){if(aM=="for"){return ad(aC,t("]"))}if(aM==","){return ai(aw(an,"]"))}return ad(aw(aH,"]"))}function aC(aM){if(aM=="for"){return ai(w,aC)}if(aM=="if"){return ai(aq,aC)}}function ar(aN,aM){return aN.lastType=="operator"||aN.lastType==","||R.test(aM.charAt(0))||/[,.]/.test(aM.charAt(0))}return{startState:function(aN){var aM={tokenize:W,lastType:"sof",cc:[],lexical:new L((aN||0)-m,0,"block",false),localVars:am.localVars,context:am.localVars&&{vars:am.localVars},indented:aN||0};if(am.globalVars&&typeof am.globalVars=="object"){aM.globalVars=am.globalVars}return aM},token:function(aO,aN){if(aO.sol()){if(!aN.lexical.hasOwnProperty("align")){aN.lexical.align=false}aN.indented=aO.indentation();aA(aO,aN)}if(aN.tokenize!=aD&&aO.eatSpace()){return null}var aM=aN.tokenize(aO,aN);if(U=="comment"){return aM}aN.lastType=U=="operator"&&(I=="++"||I=="--")?"incdec":U;return g(aN,aM,U,I,aO)},indent:function(aS,aM){if(aS.tokenize==aD){return a.Pass}if(aS.tokenize!=W){return 0}var aR=aM&&aM.charAt(0),aP=aS.lexical;if(!/^\s*else\b/.test(aM)){for(var aO=aS.cc.length-1;aO>=0;--aO){var aT=aS.cc[aO];if(aT==i){aP=aP.prev}else{if(aT!=f){break}}}}if(aP.type=="stat"&&aR=="}"){aP=aP.prev}if(C&&aP.type==")"&&aP.prev.type=="stat"){aP=aP.prev}var aQ=aP.type,aN=aR==aQ;if(aQ=="vardef"){return aP.indented+(aS.lastType=="operator"||aS.lastType==","?aP.info+1:0)}else{if(aQ=="form"&&aR=="{"){return aP.indented}else{if(aQ=="form"){return aP.indented+m}else{if(aQ=="stat"){return aP.indented+(ar(aS,aM)?C||m:0)}else{if(aP.info=="switch"&&!aN&&am.doubleIndentSwitch!=false){return aP.indented+(/^(?:case|default)\b/.test(aM)?m:2*m)}else{if(aP.align){return aP.column+(aN?0:1)}else{return aP.indented+(aN?0:m)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:B?null:"/*",blockCommentEnd:B?null:"*/",lineComment:B?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:B?"json":"javascript",jsonldMode:aE,jsonMode:B,expressionAllowed:b,skipExpression:function(aM){var aN=aM.cc[aM.cc.length-1];if(aN==aq||aN==aH){aM.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(r){r.defineMode("css",function(Y,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Y.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},X=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},W=J.counterDescriptors||{},O=J.colorKeywords||{},S=J.valueKeywords||{},M=J.allowNested,U=J.supportsAtComponent===true;var C,N;function Z(ac,ad){C=ad;return ac}function ab(af,ae){var ad=af.next();if(A[ad]){var ac=A[ad](af,ae);if(ac!==false){return ac}}if(ad=="@"){af.eatWhile(/[\w\\\-]/);return Z("def",af.current())}else{if(ad=="="||(ad=="~"||ad=="|")&&af.eat("=")){return Z(null,"compare")}else{if(ad=='"'||ad=="'"){ae.tokenize=K(ad);return ae.tokenize(af,ae)}else{if(ad=="#"){af.eatWhile(/[\w\\\-]/);return Z("atom","hash")}else{if(ad=="!"){af.match(/^\s*\w*/);return Z("keyword","important")}else{if(/\d/.test(ad)||ad=="."&&af.eat(/\d/)){af.eatWhile(/[\w.%]/);return Z("number","unit")}else{if(ad==="-"){if(/[\d.]/.test(af.peek())){af.eatWhile(/[\w.%]/);return Z("number","unit")}else{if(af.match(/^-[\w\\\-]+/)){af.eatWhile(/[\w\\\-]/);if(af.match(/^\s*:/,false)){return Z("variable-2","variable-definition")}return Z("variable-2","variable")}else{if(af.match(/^\w+-/)){return Z("meta","meta")}}}}else{if(/[,+>*\/]/.test(ad)){return Z(null,"select-op")}else{if(ad=="."&&af.match(/^-?[_a-z][_a-z0-9-]*/i)){return Z("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ad)){return Z(null,ad)}else{if((ad=="u"&&af.match(/rl(-prefix)?\(/))||(ad=="d"&&af.match("omain("))||(ad=="r"&&af.match("egexp("))){af.backUp(1);ae.tokenize=aa;return Z("property","word")}else{if(/[\w\\\-]/.test(ad)){af.eatWhile(/[\w\\\-]/);return Z("property","word")}else{return Z(null,null)}}}}}}}}}}}}}function K(ac){return function(ag,ae){var af=false,ad;while((ad=ag.next())!=null){if(ad==ac&&!af){if(ac==")"){ag.backUp(1)}break}af=!af&&ad=="\\"}if(ad==ac||!af&&ac!=")"){ae.tokenize=null}return Z("string","string")}}function aa(ad,ac){ad.next();if(!ad.match(/\s*[\"\')]/,false)){ac.tokenize=K(")")}else{ac.tokenize=null}return Z(null,"(")}function R(ad,ac,ae){this.type=ad;this.indent=ac;this.prev=ae}function G(ae,af,ad,ac){ae.context=new R(ad,af.indentation()+(ac===false?0:Q),ae.context);return ad}function T(ac){if(ac.context.prev){ac.context=ac.context.prev}return ac.context.type}function z(ac,ae,ad){return F[ad.context.type](ac,ae,ad)}function V(ad,af,ae,ag){for(var ac=ag||1;ac>0;ac--){ae.context=ae.context.prev}return z(ad,af,ae)}function H(ad){var ac=ad.current().toLowerCase();if(S.hasOwnProperty(ac)){N="atom"}else{if(O.hasOwnProperty(ac)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ac,ae,ad){if(ac=="{"){return G(ad,ae,"block")}else{if(ac=="}"&&ad.context.prev){return T(ad)}else{if(U&&/@component/.test(ac)){return G(ad,ae,"atComponentBlock")}else{if(/^@(-moz-)?document$/.test(ac)){return G(ad,ae,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/.test(ac)){return G(ad,ae,"atBlock")}else{if(/^@(font-face|counter-style)/.test(ac)){ad.stateArg=ac;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(ac)){return"keyframes"}else{if(ac&&ac.charAt(0)=="@"){return G(ad,ae,"at")}else{if(ac=="hash"){N="builtin"}else{if(ac=="word"){N="tag"}else{if(ac=="variable-definition"){return"maybeprop"}else{if(ac=="interpolation"){return G(ad,ae,"interpolation")}else{if(ac==":"){return"pseudo"}else{if(M&&ac=="("){return G(ad,ae,"parens")}}}}}}}}}}}}}}return ad.context.type};F.block=function(ac,af,ad){if(ac=="word"){var ae=af.current().toLowerCase();if(I.hasOwnProperty(ae)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(ae)){N="string-2";return"maybeprop"}else{if(M){N=af.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ac=="meta"){return"block"}else{if(!M&&(ac=="hash"||ac=="qualifier")){N="error";return"block"}else{return F.top(ac,af,ad)}}}};F.maybeprop=function(ac,ae,ad){if(ac==":"){return G(ad,ae,"prop")}return z(ac,ae,ad)};F.prop=function(ac,ae,ad){if(ac==";"){return T(ad)}if(ac=="{"&&M){return G(ad,ae,"propBlock")}if(ac=="}"||ac=="{"){return V(ac,ae,ad)}if(ac=="("){return G(ad,ae,"parens")}if(ac=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(ae.current())){N+=" error"}else{if(ac=="word"){H(ae)}else{if(ac=="interpolation"){return G(ad,ae,"interpolation")}}}return"prop"};F.propBlock=function(ad,ac,ae){if(ad=="}"){return T(ae)}if(ad=="word"){N="property";return"maybeprop"}return ae.context.type};F.parens=function(ac,ae,ad){if(ac=="{"||ac=="}"){return V(ac,ae,ad)}if(ac==")"){return T(ad)}if(ac=="("){return G(ad,ae,"parens")}if(ac=="interpolation"){return G(ad,ae,"interpolation")}if(ac=="word"){H(ae)}return"parens"};F.pseudo=function(ac,ae,ad){if(ac=="word"){N="variable-3";return ad.context.type}return z(ac,ae,ad)};F.documentTypes=function(ac,ae,ad){if(ac=="word"&&y.hasOwnProperty(ae.current())){N="tag";return ad.context.type}else{return F.atBlock(ac,ae,ad)}};F.atBlock=function(ac,af,ad){if(ac=="("){return G(ad,af,"atBlock_parens")}if(ac=="}"||ac==";"){return V(ac,af,ad)}if(ac=="{"){return T(ad)&&G(ad,af,M?"block":"top")}if(ac=="interpolation"){return G(ad,af,"interpolation")}if(ac=="word"){var ae=af.current().toLowerCase();if(ae=="only"||ae=="not"||ae=="and"||ae=="or"){N="keyword"}else{if(X.hasOwnProperty(ae)){N="attribute"}else{if(L.hasOwnProperty(ae)){N="property"}else{if(P.hasOwnProperty(ae)){N="keyword"}else{if(I.hasOwnProperty(ae)){N="property"}else{if(B.hasOwnProperty(ae)){N="string-2"}else{if(S.hasOwnProperty(ae)){N="atom"}else{if(O.hasOwnProperty(ae)){N="keyword"}else{N="error"}}}}}}}}}return ad.context.type};F.atComponentBlock=function(ac,ae,ad){if(ac=="}"){return V(ac,ae,ad)}if(ac=="{"){return T(ad)&&G(ad,ae,M?"block":"top",false)}if(ac=="word"){N="error"}return ad.context.type};F.atBlock_parens=function(ac,ae,ad){if(ac==")"){return T(ad)}if(ac=="{"||ac=="}"){return V(ac,ae,ad,2)}return F.atBlock(ac,ae,ad)};F.restricted_atBlock_before=function(ac,ae,ad){if(ac=="{"){return G(ad,ae,"restricted_atBlock")}if(ac=="word"&&ad.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ac,ae,ad)};F.restricted_atBlock=function(ac,ae,ad){if(ac=="}"){ad.stateArg=null;return T(ad)}if(ac=="word"){if((ad.stateArg=="@font-face"&&!E.hasOwnProperty(ae.current().toLowerCase()))||(ad.stateArg=="@counter-style"&&!W.hasOwnProperty(ae.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ac,ae,ad){if(ac=="word"){N="variable";return"keyframes"}if(ac=="{"){return G(ad,ae,"top")}return z(ac,ae,ad)};F.at=function(ac,ae,ad){if(ac==";"){return T(ad)}if(ac=="{"||ac=="}"){return V(ac,ae,ad)}if(ac=="word"){N="tag"}else{if(ac=="hash"){N="builtin"}}return"at"};F.interpolation=function(ac,ae,ad){if(ac=="}"){return T(ad)}if(ac=="{"||ac==";"){return V(ac,ae,ad)}if(ac=="word"){N="variable"}else{if(ac!="variable"&&ac!="("&&ac!=")"){N="error"}}return"interpolation"};return{startState:function(ac){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ac||0,null)}},token:function(ae,ad){if(!ad.tokenize&&ae.eatSpace()){return null}var ac=(ad.tokenize||ab)(ae,ad);if(ac&&typeof ac=="object"){C=ac[1];ac=ac[0]}N=ac;ad.state=F[ad.state](C,ae,ad);return N},indent:function(ag,ae){var ad=ag.context,af=ae&&ae.charAt(0);var ac=ad.indent;if(ad.type=="prop"&&(af=="}"||af==")")){ad=ad.prev}if(ad.prev){if(af=="}"&&(ad.type=="block"||ad.type=="top"||ad.type=="interpolation"||ad.type=="restricted_atBlock")){ad=ad.prev;ac=ad.indent}else{if(af==")"&&(ad.type=="parens"||ad.type=="atBlock_parens")||af=="{"&&(ad.type=="at"||ad.type=="atBlock")){ac=Math.max(0,ad.indent-Q);ad=ad.prev}}}return ac},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});function g(A){var z={};for(var y=0;y<A.length;++y){z[A[y]]=true}return z}var k=["domain","regexp","url","url-prefix"],a=g(k);var b=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],v=g(b);var x=["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","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],i=g(x);var l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],p=g(l);var d=["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-blend-mode","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","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"],h=g(d);var n=["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"],e=g(n);var t=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],f=g(t);var q=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],u=g(q);var 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"],m=g(c);var j=["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","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","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","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","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","lighten","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","luminosity","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","multiply","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","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","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","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","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","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],s=g(j);var o=k.concat(b).concat(x).concat(l).concat(d).concat(n).concat(c).concat(j);r.registerHelper("hintWords","css",o);function w(B,A){var y=false,z;while((z=B.next())!=null){if(y&&z=="/"){A.tokenize=null;break}y=(z=="*")}return["comment","comment"]}r.defineMIME("text/css",{documentTypes:a,mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css"});r.defineMIME("text/x-scss",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},":":function(y){if(y.match(/\s*\{/)){return[null,"{"]}return false},"$":function(y){y.match(/^[\w-]+/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(y){if(!y.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});r.defineMIME("text/x-less",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},"@":function(y){if(y.eat("{")){return[null,"interpolation"]}if(y.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,false)){return false}y.eatWhile(/[\w\\\-]/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"});r.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:v,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,supportsAtComponent:true,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css",helperType:"gss"})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(s){function r(B,y,x,A,z){this.indented=B;this.column=y;this.type=x;this.align=A;this.prev=z}function k(x){return x=="statement"||x=="switchstatement"||x=="namespace"}function g(A,y,z){var x=A.indented;if(A.context&&k(A.context.type)&&!k(z)){x=A.context.indented}return A.context=new r(x,y,z,null,A.context)}function u(y){var x=y.context.type;if(x==")"||x=="]"||x=="}"){y.indented=y.context.indented}return y.context=y.context.prev}function a(y,x){if(x.prevToken=="variable"||x.prevToken=="variable-3"){return true}if(/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(y.string.slice(0,y.start))){return true}}function q(x){for(;;){if(!x||x.type=="top"){return true}if(x.type=="}"&&x.prev.type!="namespace"){return false}x=x.prev}}s.defineMode("clike",function(U,F){var Q=U.indentUnit,N=F.statementIndentUnit||Q,R=F.dontAlignCalls,I=F.keywords||{},L=F.types||{},V=F.builtin||{},S=F.blockKeywords||{},P=F.defKeywords||{},A=F.atoms||{},y=F.hooks||{},M=F.multiLineStrings,K=F.indentStatements!==false,H=F.indentSwitch!==false,C=F.namespaceSeparator,E=F.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,B=F.numberStart||/[\d\.]/,x=F.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,J=F.isOperatorChar||/[+\-*&%=<>!?|\/]/,z=F.endStatement||/^[;:,]$/;var T,D;function W(ab,Z){var Y=ab.next();if(y[Y]){var X=y[Y](ab,Z);if(X!==false){return X}}if(Y=='"'||Y=="'"){Z.tokenize=G(Y);return Z.tokenize(ab,Z)}if(E.test(Y)){T=Y;return null}if(B.test(Y)){ab.backUp(1);if(ab.match(x)){return"number"}ab.next()}if(Y=="/"){if(ab.eat("*")){Z.tokenize=O;return O(ab,Z)}if(ab.eat("/")){ab.skipToEnd();return"comment"}}if(J.test(Y)){while(!ab.match(/^\/[\/*]/,false)&&ab.eat(J)){}return"operator"}ab.eatWhile(/[\w\$_\xa1-\uffff]/);if(C){while(ab.match(C)){ab.eatWhile(/[\w\$_\xa1-\uffff]/)}}var aa=ab.current();if(h(I,aa)){if(h(S,aa)){T="newstatement"}if(h(P,aa)){D=true}return"keyword"}if(h(L,aa)){return"variable-3"}if(h(V,aa)){if(h(S,aa)){T="newstatement"}return"builtin"}if(h(A,aa)){return"atom"}return"variable"}function G(X){return function(ac,aa){var ab=false,Z,Y=false;while((Z=ac.next())!=null){if(Z==X&&!ab){Y=true;break}ab=!ab&&Z=="\\"}if(Y||!(ab||M)){aa.tokenize=null}return"string"}}function O(aa,Z){var X=false,Y;while(Y=aa.next()){if(Y=="/"&&X){Z.tokenize=null;break}X=(Y=="*")}return"comment"}return{startState:function(X){return{tokenize:null,context:new r((X||0)-Q,0,"top",false),indented:0,startOfLine:true,prevToken:null}},token:function(ac,ab){var Y=ab.context;if(ac.sol()){if(Y.align==null){Y.align=false}ab.indented=ac.indentation();ab.startOfLine=true}if(ac.eatSpace()){return null}T=D=null;var aa=(ab.tokenize||W)(ac,ab);if(aa=="comment"||aa=="meta"){return aa}if(Y.align==null){Y.align=true}if(z.test(T)){while(k(ab.context.type)){u(ab)}}else{if(T=="{"){g(ab,ac.column(),"}")}else{if(T=="["){g(ab,ac.column(),"]")}else{if(T=="("){g(ab,ac.column(),")")}else{if(T=="}"){while(k(Y.type)){Y=u(ab)}if(Y.type=="}"){Y=u(ab)}while(k(Y.type)){Y=u(ab)}}else{if(T==Y.type){u(ab)}else{if(K&&(((Y.type=="}"||Y.type=="top")&&T!=";")||(k(Y.type)&&T=="newstatement"))){var Z="statement";if(T=="newstatement"&&H&&ac.current()=="switch"){Z="switchstatement"}else{if(aa=="keyword"&&ac.current()=="namespace"){Z="namespace"}}g(ab,ac.column(),Z)}}}}}}}if(aa=="variable"&&((ab.prevToken=="def"||(F.typeFirstDefinitions&&a(ac,ab)&&q(ab.context)&&ac.match(/^\s*\(/,false))))){aa="def"}if(y.token){var X=y.token(ac,ab,aa);if(X!==undefined){aa=X}}if(aa=="def"&&F.styleDefs===false){aa="variable"}ab.startOfLine=false;ab.prevToken=D?"def":aa||T;return aa},indent:function(ad,Y){if(ad.tokenize!=W&&ad.tokenize!=null){return s.Pass}var X=ad.context,ab=Y&&Y.charAt(0);if(k(X.type)&&ab=="}"){X=X.prev}if(y.indent){var ac=y.indent(ad,X,Y);if(typeof ac=="number"){return ac}}var Z=ab==X.type;var aa=X.prev&&X.prev.type=="switchstatement";if(F.allmanIndentation&&/[{(]/.test(ab)){while(X.type!="top"&&X.type!="}"){X=X.prev}return X.indented}if(k(X.type)){return X.indented+(ab=="{"?0:N)}if(X.align&&(!R||X.type!=")")){return X.column+(Z?0:1)}if(X.type==")"&&!Z){return X.indented+N}return X.indented+(Z?0:Q)+(!Z&&aa&&!/^(?:case|default)\b/.test(Y)?Q:0)},electricInput:H?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});function p(A){var y={},z=A.split(" ");for(var x=0;x<z.length;++x){y[z[x]]=true}return y}function h(y,x){if(typeof y==="function"){return y(x)}else{return y.propertyIsEnumerable(x)}}var m="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile";var t="int long char short double float unsigned signed void size_t ptrdiff_t";function n(A,z){if(!z.startOfLine){return false}for(var y,x=null;y=A.peek();){if(y=="\\"&&A.match(/^.$/)){x=n;break}else{if(y=="/"&&A.match(/^\/[\/\*]/,false)){break}}A.next()}z.tokenize=x;return"meta"}function d(x,y){if(y.prevToken=="variable-3"){return"variable-3"}return false}function f(x){x.eatWhile(/[\w\.']/);return"number"}function o(z,y){z.backUp(1);if(z.match(/(R|u8R|uR|UR|LR)/)){var x=z.match(/"([^\s\\()]{0,16})\(/);if(!x){return false}y.cpp11RawStringDelim=x[1];y.tokenize=i;return i(z,y)}if(z.match(/(u8|u|U|L)/)){if(z.match(/["']/,false)){return"string"}return false}z.next();return false}function w(y){var x=/(\w+)::(\w+)$/.exec(y);return x&&x[1]==x[2]}function v(z,y){var x;while((x=z.next())!=null){if(x=='"'&&!z.eat('"')){y.tokenize=null;break}}return"string"}function i(A,y){var z=y.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");var x=A.match(new RegExp(".*?\\)"+z+'"'));if(x){y.tokenize=null}else{A.skipToEnd()}return"string"}function l(x,B){if(typeof x=="string"){x=[x]}var A=[];function z(C){if(C){for(var D in C){if(C.hasOwnProperty(D)){A.push(D)}}}}z(B.keywords);z(B.types);z(B.builtin);z(B.atoms);if(A.length){B.helperType=x[0];s.registerHelper("hintWords",x[0],A)}for(var y=0;y<x.length;++y){s.defineMIME(x[y],B)}}l(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:p(m),types:p(t+" 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:p("case do else for if switch while struct"),defKeywords:p("struct"),typeFirstDefinitions:true,atoms:p("null true false"),hooks:{"#":n,"*":d},modeProps:{fold:["brace","include"]}});l(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:p(m+" 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:p(t+" bool wchar_t"),blockKeywords:p("catch class do else finally for if struct switch try while"),defKeywords:p("class namespace struct enum union"),typeFirstDefinitions:true,atoms:p("true false null"),hooks:{"#":n,"*":d,u:o,U:o,L:o,R:o,"0":f,"1":f,"2":f,"3":f,"4":f,"5":f,"6":f,"7":f,"8":f,"9":f,token:function(z,y,x){if(x=="variable"&&z.peek()=="("&&(y.prevToken==";"||y.prevToken==null||y.prevToken=="}")&&w(z.current())){return"def"}}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}});l("text/x-java",{name:"clike",keywords:p("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"),types:p("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:p("catch class do else finally for if switch try while"),defKeywords:p("class interface package enum"),typeFirstDefinitions:true,atoms:p("true false null"),endStatement:/^[;:]$/,hooks:{"@":function(x){x.eatWhile(/[\w\$_]/);return"meta"}},modeProps:{fold:["brace","import"]}});l("text/x-csharp",{name:"clike",keywords:p("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:p("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:p("catch class do else finally for foreach if struct switch try while"),defKeywords:p("class interface namespace struct var"),typeFirstDefinitions:true,atoms:p("true false null"),hooks:{"@":function(y,x){if(y.eat('"')){x.tokenize=v;return v(y,x)}y.eatWhile(/[\w\$_]/);return"meta"}}});function c(z,x){var y=false;while(!z.eol()){if(!y&&z.match('"""')){x.tokenize=null;break}y=z.next()=="\\"&&!y}return"string"}l("text/x-scala",{name:"clike",keywords:p("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:p("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:true,blockKeywords:p("catch class do else finally for forSome if match switch try while"),defKeywords:p("class def object package trait type val var"),atoms:p("true false null"),indentStatements:false,indentSwitch:false,hooks:{"@":function(x){x.eatWhile(/[\w\$_]/);return"meta"},'"':function(y,x){if(!y.match('""')){return false}x.tokenize=c;return x.tokenize(y,x)},"'":function(x){x.eatWhile(/[\w\$_\xa1-\uffff]/);return"atom"},"=":function(z,y){var x=y.context;if(x.type=="}"&&x.align&&z.eat(">")){y.context=new r(x.indented,x.column,x.type,null,x.prev);return"operator"}else{return false}}},modeProps:{closeBrackets:{triples:'"'}}});function b(x){return function(C,A){var B=false,z,y=false;while(!C.eol()){if(!x&&!B&&C.match('"')){y=true;break}if(x&&C.match('"""')){y=true;break}z=C.next();if(!B&&z=="$"&&C.match("{")){C.skipTo("}")}B=!B&&z=="\\"&&!x}if(y||!x){A.tokenize=null}return"string"}}l("text/x-kotlin",{name:"clike",keywords:p("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"),types:p("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:false,indentStatements:false,multiLineStrings:true,blockKeywords:p("catch class do else finally for if where try while enum"),defKeywords:p("class val var object package interface fun"),atoms:p("true false null this"),hooks:{'"':function(y,x){x.tokenize=b(y.match('""'));return x.tokenize(y,x)}},modeProps:{closeBrackets:{triples:'"'}}});l(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:p("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:p("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:p("for while do if else struct"),builtin:p("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:p("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:false,hooks:{"#":n},modeProps:{fold:["brace","include"]}});l("text/x-nesc",{name:"clike",keywords:p(m+"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:p(t),blockKeywords:p("case do else for if switch while struct"),atoms:p("null true false"),hooks:{"#":n},modeProps:{fold:["brace","include"]}});l("text/x-objectivec",{name:"clike",keywords:p(m+"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:p(t),atoms:p("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(x){x.eatWhile(/[\w\$]/);return"keyword"},"#":n,indent:function(z,x,y){if(x.type=="statement"&&/^@\w/.test(y)){return x.indented}}},modeProps:{fold:"brace"}});l("text/x-squirrel",{name:"clike",keywords:p("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:p(t),blockKeywords:p("case catch class else for foreach if switch try while"),defKeywords:p("function local class"),typeFirstDefinitions:true,atoms:p("true false null"),hooks:{"#":n},modeProps:{fold:["brace","include"]}});var e=null;function j(x){return function(C,A){var B=false,z,y=false;while(!C.eol()){if(!B&&C.match('"')&&(x=="single"||C.match('""'))){y=true;break}if(!B&&C.match("``")){e=j(x);y=true;break}z=C.next();B=x=="single"&&!B&&z=="\\"}if(y){A.tokenize=null}return"string"}}l("text/x-ceylon",{name:"clike",keywords:p("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(x){var y=x.charAt(0);return(y===y.toUpperCase()&&y!==y.toLowerCase())},blockKeywords:p("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:p("class dynamic function interface module object package value"),builtin:p("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:true,typeFirstDefinitions:true,atoms:p("true false null larger smaller equal empty finished"),indentSwitch:false,styleDefs:false,hooks:{"@":function(x){x.eatWhile(/[\w\$_]/);return"meta"},'"':function(y,x){x.tokenize=j(y.match('""')?"triple":"single");return x.tokenize(y,x)},"`":function(y,x){if(!e||!y.match("`")){return false}x.tokenize=e;e=null;return x.tokenize(y,x)},"'":function(x){x.eatWhile(/[\w\$_\xa1-\uffff]/);return"atom"},token:function(x,z,y){if((y=="variable"||y=="variable-3")&&z.prevToken=="."){return"variable-2"}}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],a)}else{a(CodeMirror)}}})(function(d){function f(m){var k={},l=m.split(" ");for(var j=0;j<l.length;++j){k[l[j]]=true}return k}function e(l,j,k){if(l.length==0){return b(j)}return function(p,o){var n=l[0];for(var m=0;m<n.length;m++){if(p.match(n[m][0])){o.tokenize=e(l.slice(1),j);return n[m][1]}}o.tokenize=b(j,k);return"string"}}function b(k,j){return function(m,l){return c(m,l,k,j)}}function c(n,l,k,j){if(j!==false&&n.match("${",false)||n.match("{$",false)){l.tokenize=null;return"string"}if(j!==false&&n.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)){if(n.match("[",false)){l.tokenize=e([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],k,j)}if(n.match(/\-\>\w/,false)){l.tokenize=e([[["->",null]],[[/[\w]+/,"variable"]]],k,j)}return"variable-2"}var m=false;while(!n.eol()&&(m||j===false||(!n.match("{$",false)&&!n.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,false)))){if(!m&&n.match(k)){l.tokenize=null;l.tokStack.pop();l.tokStack.pop();break}m=n.next()=="\\"&&!m}return"string"}var h="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";var i="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";var 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 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";d.registerHelper("hintWords","php",[h,i,a].join(" ").split(" "));d.registerHelper("wordChars","php",/[\w$]/);var g={name:"clike",helperType:"php",keywords:f(h),blockKeywords:f("catch do else elseif for foreach if switch try while finally"),defKeywords:f("class function interface namespace trait"),atoms:f(i),builtin:f(a),multiLineStrings:true,hooks:{"$":function(j){j.eatWhile(/[\w\$_]/);return"variable-2"},"<":function(n,l){var k;if(k=n.match(/<<\s*/)){var j=n.eat(/['"]/);n.eatWhile(/[\w\.]/);var m=n.current().slice(k[0].length+(j?2:1));if(j){n.eat(j)}if(m){(l.tokStack||(l.tokStack=[])).push(m,0);l.tokenize=b(m,j!="'");return"string"}}return false},"#":function(j){while(!j.eol()&&!j.match("?>",false)){j.next()}return"comment"},"/":function(j){if(j.eat("/")){while(!j.eol()&&!j.match("?>",false)){j.next()}return"comment"}return false},'"':function(j,k){(k.tokStack||(k.tokStack=[])).push('"',0);k.tokenize=b('"');return"string"},"{":function(j,k){if(k.tokStack&&k.tokStack.length){k.tokStack[k.tokStack.length-1]++}return false},"}":function(j,k){if(k.tokStack&&k.tokStack.length>0&&!--k.tokStack[k.tokStack.length-1]){k.tokenize=b(k.tokStack[k.tokStack.length-2])}return false}}};d.defineMode("php",function(l,m){var n=d.getMode(l,"text/html");var j=d.getMode(l,g);function k(u,s){var r=s.curMode==j;if(u.sol()&&s.pending&&s.pending!='"'&&s.pending!="'"){s.pending=null}if(!r){if(u.match(/^<\?\w*/)){s.curMode=j;if(!s.php){s.php=d.startState(j,n.indent(s.html,""))}s.curState=s.php;return"meta"}if(s.pending=='"'||s.pending=="'"){while(!u.eol()&&u.next()!=s.pending){}var q="string"}else{if(s.pending&&u.pos<s.pending.end){u.pos=s.pending.end;var q=s.pending.style}else{var q=n.token(u,s.curState)}}if(s.pending){s.pending=null}var t=u.current(),p=t.search(/<\?/),o;if(p!=-1){if(q=="string"&&(o=t.match(/[\'\"]$/))&&!/\?>/.test(t)){s.pending=o[0]}else{s.pending={end:u.pos,style:q}}u.backUp(t.length-p)}return q}else{if(r&&s.php.tokenize==null&&u.match("?>")){s.curMode=n;s.curState=s.html;if(!s.php.context.prev){s.php=null}return"meta"}else{return j.token(u,s.curState)}}}return{startState:function(){var o=d.startState(n);var p=m.startOpen?d.startState(j):null;return{html:o,php:p,curMode:m.startOpen?j:n,curState:m.startOpen?p:o,pending:null}},copyState:function(r){var p=r.html,q=d.copyState(n,p),t=r.php,o=t&&d.copyState(j,t),s;if(r.curMode==n){s=q}else{s=o}return{html:q,php:o,curMode:r.curMode,curState:s,pending:r.pending}},token:k,indent:function(p,o){if((p.curMode!=j&&/^\s*<\//.test(o))||(p.curMode==j&&/^\?>/.test(o))){return n.indent(p.html,o)}return p.curMode.indent(p.curState,o)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(o){return{state:o.curState,mode:o.curMode}}}},"htmlmixed","clike");d.defineMIME("application/x-httpd-php","php");d.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:true});d.defineMIME("text/x-php",g)});
|
1
|
+
(function(a){if(typeof exports=="object"&&typeof module=="object"){a(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"],a)}else{a(CodeMirror)}}})(function(d){var g={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/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 f(n,j,k){var m=n.current(),l=m.search(j);if(l>-1){n.backUp(m.length-l)}else{if(m.match(/<\/?$/)){n.backUp(m.length);if(!n.match(j,false)){n.match(m)}}}return k}var e={};function c(j){var k=e[j];if(k){return k}return e[j]=new RegExp("\\s+"+j+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*")}function a(l,j){var k=l.match(c(j));return k?/^\s*(.*?)\s*$/.exec(k[2])[1]:""}function i(k,j){return new RegExp((j?"^":"")+"</s*"+k+"s*>","i")}function h(o,n){for(var j in o){var k=n[j]||(n[j]=[]);var m=o[j];for(var l=m.length-1;l>=0;l--){k.unshift(m[l])}}}function b(l,m){for(var k=0;k<l.length;k++){var j=l[k];if(!j[0]||j[1].test(a(m,j[0]))){return j[2]}}}d.defineMode("htmlmixed",function(k,o){var q=d.getMode(k,{name:"xml",htmlMode:true,multilineTagIndentFactor:o.multilineTagIndentFactor,multilineTagIndentPastTag:o.multilineTagIndentPastTag});var j={};var p=o&&o.tags,n=o&&o.scriptTypes;h(g,j);if(p){h(p,j)}if(n){for(var m=n.length-1;m>=0;m--){j.script.unshift(["type",n[m].matches,n[m].mode])}}function l(z,r){var s=q.token(z,r.htmlState),A=/\btag\b/.test(s),u;if(A&&!/[<>\s\/]/.test(z.current())&&(u=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&j.hasOwnProperty(u)){r.inTag=u+" "}else{if(r.inTag&&A&&/>$/.test(z.current())){var t=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var y=z.current()==">"&&b(j[t[1]],t[2]);var x=d.getMode(k,y);var w=i(t[1],true),v=i(t[1],false);r.token=function(C,B){if(C.match(w,false)){B.token=l;B.localState=B.localMode=null;return null}return f(C,v,B.localMode.token(C,B.localState))};r.localMode=x;r.localState=d.startState(x,q.indent(r.htmlState,""))}else{if(r.inTag){r.inTag+=z.current();if(z.eol()){r.inTag+=" "}}}}return s}return{startState:function(){var r=d.startState(q);return{token:l,inTag:null,localMode:null,localState:null,htmlState:r}},copyState:function(s){var r;if(s.localState){r=d.copyState(s.localMode,s.localState)}return{token:s.token,inTag:s.inTag,localMode:s.localMode,localState:r,htmlState:d.copyState(q,s.htmlState)}},token:function(s,r){return r.token(s,r)},indent:function(s,r){if(!s.localMode||/^\s*<\//.test(r)){return q.indent(s.htmlState,r)}else{if(s.localMode.indent){return s.localMode.indent(s.localState,r)}else{return d.Pass}}},innerMode:function(r){return{state:r.localState||r.htmlState,mode:r.localMode||q}}}},"xml","javascript","css");d.defineMIME("text/html","htmlmixed")});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){var b={autoSelfClosers:{area:true,base:true,br:true,col:true,command:true,embed:true,frame:true,hr:true,img:true,input:true,keygen:true,link:true,meta:true,param:true,source:true,track:true,wbr:true,menuitem:true},implicitlyClosed:{dd:true,li:true,optgroup:true,option:true,p:true,rp:true,rt:true,tbody:true,td:true,tfoot:true,th:true,tr:true},contextGrabbers:{dd:{dd:true,dt:true},dt:{dd:true,dt:true},li:{li:true},option:{option:true,optgroup:true},optgroup:{optgroup:true},p:{address:true,article:true,aside:true,blockquote:true,dir:true,div:true,dl:true,fieldset:true,footer:true,form:true,h1:true,h2:true,h3:true,h4:true,h5:true,h6:true,header:true,hgroup:true,hr:true,menu:true,nav:true,ol:true,p:true,pre:true,section:true,table:true,ul:true},rp:{rp:true,rt:true},rt:{rp:true,rt:true},tbody:{tbody:true,tfoot:true},td:{td:true,th:true},tfoot:{tbody:true},th:{td:true,th:true},thead:{tbody:true,tfoot:true},tr:{tr:true}},doNotIndent:{pre:true},allowUnquoted:true,allowMissing:true,caseFold:true};var c={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:false,allowMissing:false,caseFold:false};a.defineMode("xml",function(m,y){var r=m.indentUnit;var z={};var l=y.htmlMode?b:c;for(var f in l){z[f]=l[f]}for(var f in y){z[f]=y[f]}var g,h;function p(G,F){function D(H){F.tokenize=H;return H(G,F)}var E=G.next();if(E=="<"){if(G.eat("!")){if(G.eat("[")){if(G.match("CDATA[")){return D(x("atom","]]>"))}else{return null}}else{if(G.match("--")){return D(x("comment","-->"))}else{if(G.match("DOCTYPE",true,true)){G.eatWhile(/[\w\._\-]/);return D(A(1))}else{return null}}}}else{if(G.eat("?")){G.eatWhile(/[\w\._\-]/);F.tokenize=x("meta","?>");return"meta"}else{g=G.eat("/")?"closeTag":"openTag";F.tokenize=o;return"tag bracket"}}}else{if(E=="&"){var C;if(G.eat("#")){if(G.eat("x")){C=G.eatWhile(/[a-fA-F\d]/)&&G.eat(";")}else{C=G.eatWhile(/[\d]/)&&G.eat(";")}}else{C=G.eatWhile(/[\w\.\-:]/)&&G.eat(";")}return C?"atom":"error"}else{G.eatWhile(/[^&<]/);return null}}}p.isInText=true;function o(F,E){var D=F.next();if(D==">"||(D=="/"&&F.eat(">"))){E.tokenize=p;g=D==">"?"endTag":"selfcloseTag";return"tag bracket"}else{if(D=="="){g="equals";return null}else{if(D=="<"){E.tokenize=p;E.state=n;E.tagName=E.tagStart=null;var C=E.tokenize(F,E);return C?C+" tag error":"tag error"}else{if(/[\'\"]/.test(D)){E.tokenize=k(D);E.stringStartCol=F.column();return E.tokenize(F,E)}else{F.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/);return"word"}}}}}function k(C){var D=function(F,E){while(!F.eol()){if(F.next()==C){E.tokenize=o;break}}return"string"};D.isInAttribute=true;return D}function x(D,C){return function(F,E){while(!F.eol()){if(F.match(C)){E.tokenize=p;break}F.next()}return D}}function A(C){return function(F,E){var D;while((D=F.next())!=null){if(D=="<"){E.tokenize=A(C+1);return E.tokenize(F,E)}else{if(D==">"){if(C==1){E.tokenize=p;break}else{E.tokenize=A(C-1);return E.tokenize(F,E)}}}}return"meta"}}function t(D,C,E){this.prev=D.context;this.tagName=C;this.indent=D.indented;this.startOfLine=E;if(z.doNotIndent.hasOwnProperty(C)||(D.context&&D.context.noIndent)){this.noIndent=true}}function w(C){if(C.context){C.context=C.context.prev}}function s(E,D){var C;while(true){if(!E.context){return}C=E.context.tagName;if(!z.contextGrabbers.hasOwnProperty(C)||!z.contextGrabbers[C].hasOwnProperty(D)){return}w(E)}}function n(C,E,D){if(C=="openTag"){D.tagStart=E.column();return d}else{if(C=="closeTag"){return v}else{return n}}}function d(C,E,D){if(C=="word"){D.tagName=E.current();h="tag";return e}else{h="error";return d}}function v(D,F,E){if(D=="word"){var C=F.current();if(E.context&&E.context.tagName!=C&&z.implicitlyClosed.hasOwnProperty(E.context.tagName)){w(E)}if((E.context&&E.context.tagName==C)||z.matchClosing===false){h="tag";return u}else{h="tag error";return B}}else{h="error";return B}}function u(D,C,E){if(D!="endTag"){h="error";return u}w(E);return n}function B(C,E,D){h="error";return u(C,E,D)}function e(F,D,G){if(F=="word"){h="attribute";return j}else{if(F=="endTag"||F=="selfcloseTag"){var E=G.tagName,C=G.tagStart;G.tagName=G.tagStart=null;if(F=="selfcloseTag"||z.autoSelfClosers.hasOwnProperty(E)){s(G,E)}else{s(G,E);G.context=new t(G,E,C==G.indented)}return n}}h="error";return e}function j(C,E,D){if(C=="equals"){return q}if(!z.allowMissing){h="error"}return e(C,E,D)}function q(C,E,D){if(C=="string"){return i}if(C=="word"&&z.allowUnquoted){h="string";return e}h="error";return e(C,E,D)}function i(C,E,D){if(C=="string"){return i}return e(C,E,D)}return{startState:function(C){var D={tokenize:p,state:n,indented:C||0,tagName:null,tagStart:null,context:null};if(C!=null){D.baseIndent=C}return D},token:function(E,D){if(!D.tagName&&E.sol()){D.indented=E.indentation()}if(E.eatSpace()){return null}g=null;var C=D.tokenize(E,D);if((C||g)&&C!="comment"){h=null;D.state=D.state(g||C,E,D);if(h){C=h=="error"?C+" error":h}}return C},indent:function(H,D,G){var F=H.context;if(H.tokenize.isInAttribute){if(H.tagStart==H.indented){return H.stringStartCol+1}else{return H.indented+r}}if(F&&F.noIndent){return a.Pass}if(H.tokenize!=o&&H.tokenize!=p){return G?G.match(/^(\s*)/)[0].length:0}if(H.tagName){if(z.multilineTagIndentPastTag!==false){return H.tagStart+H.tagName.length+2}else{return H.tagStart+r*(z.multilineTagIndentFactor||1)}}if(z.alignCDATA&&/<!\[CDATA\[/.test(D)){return 0}var C=D&&/^<(\/)?([\w_:\.-]*)/.exec(D);if(C&&C[1]){while(F){if(F.tagName==C[2]){F=F.prev;break}else{if(z.implicitlyClosed.hasOwnProperty(F.tagName)){F=F.prev}else{break}}}}else{if(C){while(F){var E=z.contextGrabbers[F.tagName];if(E&&E.hasOwnProperty(C[2])){F=F.prev}else{break}}}}while(F&&F.prev&&!F.startOfLine){F=F.prev}if(F){return F.indent+r}else{return H.baseIndent||0}},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:z.htmlMode?"html":"xml",helperType:z.htmlMode?"html":"xml",skipAttribute:function(C){if(C.state==q){C.state=e}}}});a.defineMIME("text/xml","xml");a.defineMIME("application/xml","xml");if(!a.mimeModes.hasOwnProperty("text/html")){a.defineMIME("text/html",{name:"xml",htmlMode:true})}});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(a){function b(e,d,c){return/^(?:operator|sof|keyword c|case|new|[\[{}\(,;:]|=>)$/.test(d.lastType)||(d.lastType=="quasi"&&/\{\s*$/.test(e.string.slice(0,e.pos-(c||0))))}a.defineMode("javascript",function(af,ap){var m=af.indentUnit;var C=ap.statementIndent;var aG=ap.jsonld;var B=ap.json||aG;var g=ap.typescript;var aB=ap.wordCharacters||/[\w$\xa1-\uffff]/;var az=function(){function aX(aZ){return{type:aZ,style:"keyword"}}var aS=aX("keyword a"),aQ=aX("keyword b"),aP=aX("keyword c");var aR=aX("operator"),aV={type:"atom",style:"atom"};var aT={"if":aX("if"),"while":aS,"with":aS,"else":aQ,"do":aQ,"try":aQ,"finally":aQ,"return":aP,"break":aP,"continue":aP,"new":aX("new"),"delete":aP,"throw":aP,"debugger":aP,"var":aX("var"),"const":aX("var"),let:aX("var"),"function":aX("function"),"catch":aX("catch"),"for":aX("for"),"switch":aX("switch"),"case":aX("case"),"default":aX("default"),"in":aR,"typeof":aR,"instanceof":aR,"true":aV,"false":aV,"null":aV,"undefined":aV,"NaN":aV,"Infinity":aV,"this":aX("this"),"class":aX("class"),"super":aX("atom"),yield:aP,"export":aX("export"),"import":aX("import"),"extends":aP,await:aP,async:aX("async")};if(g){var aY={type:"variable",style:"variable-3"};var aU={"interface":aX("class"),"implements":aP,namespace:aP,module:aX("module"),"enum":aX("module"),type:aX("type"),"public":aX("modifier"),"private":aX("modifier"),"protected":aX("modifier"),"abstract":aX("modifier"),as:aR,string:aY,number:aY,"boolean":aY,any:aY};for(var aW in aU){aT[aW]=aU[aW]}}return aT}();var T=/[+\-*&%=<>!?|~^]/;var ay=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function H(aS){var aQ=false,aP,aR=false;while((aP=aS.next())!=null){if(!aQ){if(aP=="/"&&!aR){return}if(aP=="["){aR=true}else{if(aR&&aP=="]"){aR=false}}}aQ=!aQ&&aP=="\\"}}var X,I;function P(aR,aQ,aP){X=aR;I=aP;return aQ}function Z(aT,aR){var aP=aT.next();if(aP=='"'||aP=="'"){aR.tokenize=W(aP);return aR.tokenize(aT,aR)}else{if(aP=="."&&aT.match(/^\d+(?:[eE][+\-]?\d+)?/)){return P("number","number")}else{if(aP=="."&&aT.match("..")){return P("spread","meta")}else{if(/[\[\]{}\(\),;\:\.]/.test(aP)){return P(aP)}else{if(aP=="="&&aT.eat(">")){return P("=>","operator")}else{if(aP=="0"&&aT.eat(/x/i)){aT.eatWhile(/[\da-f]/i);return P("number","number")}else{if(aP=="0"&&aT.eat(/o/i)){aT.eatWhile(/[0-7]/i);return P("number","number")}else{if(aP=="0"&&aT.eat(/b/i)){aT.eatWhile(/[01]/i);return P("number","number")}else{if(/\d/.test(aP)){aT.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);return P("number","number")}else{if(aP=="/"){if(aT.eat("*")){aR.tokenize=aF;return aF(aT,aR)}else{if(aT.eat("/")){aT.skipToEnd();return P("comment","comment")}else{if(b(aT,aR,1)){H(aT);aT.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/);return P("regexp","string-2")}else{aT.eatWhile(T);return P("operator","operator",aT.current())}}}}else{if(aP=="`"){aR.tokenize=aH;return aH(aT,aR)}else{if(aP=="#"){aT.skipToEnd();return P("error","error")}else{if(T.test(aP)){aT.eatWhile(T);return P("operator","operator",aT.current())}else{if(aB.test(aP)){aT.eatWhile(aB);var aS=aT.current(),aQ=az.propertyIsEnumerable(aS)&&az[aS];return(aQ&&aR.lastType!=".")?P(aQ.type,aQ.style,aS):P("variable","variable",aS)}}}}}}}}}}}}}}}function W(aP){return function(aT,aR){var aS=false,aQ;if(aG&&aT.peek()=="@"&&aT.match(ay)){aR.tokenize=Z;return P("jsonld-keyword","meta")}while((aQ=aT.next())!=null){if(aQ==aP&&!aS){break}aS=!aS&&aQ=="\\"}if(!aS){aR.tokenize=Z}return P("string","string")}}function aF(aS,aR){var aP=false,aQ;while(aQ=aS.next()){if(aQ=="/"&&aP){aR.tokenize=Z;break}aP=(aQ=="*")}return P("comment","comment")}function aH(aS,aQ){var aR=false,aP;while((aP=aS.next())!=null){if(!aR&&(aP=="`"||aP=="$"&&aS.eat("{"))){aQ.tokenize=Z;break}aR=!aR&&aP=="\\"}return P("quasi","string-2",aS.current())}var n="([{}])";function aD(aX,aR){if(aR.fatArrowAt){aR.fatArrowAt=null}var aW=aX.string.indexOf("=>",aX.start);if(aW<0){return}if(g){var aT=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(aX.string.slice(aX.start,aW));if(aT){aW=aT.index}}var aU=0,aS=false;for(var aV=aW-1;aV>=0;--aV){var aP=aX.string.charAt(aV);var aQ=n.indexOf(aP);if(aQ>=0&&aQ<3){if(!aU){++aV;break}if(--aU==0){if(aP=="("){aS=true}break}}else{if(aQ>=3&&aQ<6){++aU}else{if(aB.test(aP)){aS=true}else{if(/["'\/]/.test(aP)){return}else{if(aS&&!aU){++aV;break}}}}}}if(aS&&!aU){aR.fatArrowAt=aV}}var c={atom:true,number:true,variable:true,string:true,regexp:true,"this":true,"jsonld-keyword":true};function N(aU,aQ,aP,aT,aR,aS){this.indented=aU;this.column=aQ;this.type=aP;this.prev=aR;this.info=aS;if(aT!=null){this.align=aT}}function u(aS,aR){for(var aQ=aS.localVars;aQ;aQ=aQ.next){if(aQ.name==aR){return true}}for(var aP=aS.context;aP;aP=aP.prev){for(var aQ=aP.vars;aQ;aQ=aQ.next){if(aQ.name==aR){return true}}}}function f(aT,aQ,aP,aS,aU){var aV=aT.cc;G.state=aT;G.stream=aU;G.marked=null,G.cc=aV;G.style=aQ;if(!aT.lexical.hasOwnProperty("align")){aT.lexical.align=true}while(true){var aR=aV.length?aV.pop():B?au:aM;if(aR(aP,aS)){while(aV.length&&aV[aV.length-1].lex){aV.pop()()}if(G.marked){return G.marked}if(aP=="variable"&&u(aT,aS)){return"variable-2"}return aQ}}}var G={state:null,column:null,marked:null,cc:null};function ag(){for(var aP=arguments.length-1;aP>=0;aP--){G.cc.push(arguments[aP])}}function al(){ag.apply(null,arguments);return true}function aC(aQ){function aP(aT){for(var aS=aT;aS;aS=aS.next){if(aS.name==aQ){return true}}return false}var aR=G.state;G.marked="def";if(aR.context){if(aP(aR.localVars)){return}aR.localVars={name:aQ,next:aR.localVars}}else{if(aP(aR.globalVars)){return}if(ap.globalVars){aR.globalVars={name:aQ,next:aR.globalVars}}}}var s={name:"this",next:{name:"arguments"}};function y(){G.state.context={prev:G.state.context,vars:G.state.localVars};G.state.localVars=s}function z(){G.state.localVars=G.state.context.vars;G.state.context=G.state.context.prev}function aK(aQ,aR){var aP=function(){var aU=G.state,aS=aU.indented;if(aU.lexical.type=="stat"){aS=aU.lexical.indented}else{for(var aT=aU.lexical;aT&&aT.type==")"&&aT.align;aT=aT.prev){aS=aT.indented}}aU.lexical=new N(aS,G.stream.column(),aQ,null,aU.lexical,aR)};aP.lex=true;return aP}function h(){var aP=G.state;if(aP.lexical.prev){if(aP.lexical.type==")"){aP.indented=aP.lexical.indented}aP.lexical=aP.lexical.prev}}h.lex=true;function t(aP){function aQ(aR){if(aR==aP){return al()}else{if(aP==";"){return ag()}else{return al(aQ)}}}return aQ}function aM(aP,aQ){if(aP=="var"){return al(aK("vardef",aQ.length),d,t(";"),h)}if(aP=="keyword a"){return al(aK("form"),av,aM,h)}if(aP=="keyword b"){return al(aK("form"),aM,h)}if(aP=="{"){return al(aK("}"),A,h)}if(aP==";"){return al()}if(aP=="if"){if(G.state.lexical.info=="else"&&G.state.cc[G.state.cc.length-1]==h){G.state.cc.pop()()}return al(aK("form"),av,aM,h,e)}if(aP=="function"){return al(Q)}if(aP=="for"){return al(aK("form"),w,aM,h)}if(aP=="variable"){return al(aK("stat"),aN)}if(aP=="switch"){return al(aK("form"),av,aK("}","switch"),t("{"),A,h,h)}if(aP=="case"){return al(au,t(":"))}if(aP=="default"){return al(t(":"))}if(aP=="catch"){return al(aK("form"),y,t("("),ak,t(")"),aM,h,z)}if(aP=="class"){return al(aK("form"),ab,h)}if(aP=="export"){return al(aK("stat"),aL,h)}if(aP=="import"){return al(aK("stat"),am,h)}if(aP=="module"){return al(aK("form"),i,aK("}"),t("{"),A,h,h)}if(aP=="type"){return al(j,t("operator"),j,t(";"))}if(aP=="async"){return al(aM)}return ag(aK("stat"),au,t(";"),h)}function au(aP){return ae(aP,false)}function aJ(aP){return ae(aP,true)}function av(aP){if(aP!="("){return ag()}return al(aK(")"),au,t(")"),h)}function ae(aQ,aS){if(G.state.fatArrowAt==G.stream.start){var aP=aS?R:ac;if(aQ=="("){return al(y,aK(")"),aA(i,")"),h,t("=>"),aP,z)}else{if(aQ=="variable"){return ag(y,i,t("=>"),aP,z)}}}var aR=aS?k:ah;if(c.hasOwnProperty(aQ)){return al(aR)}if(aQ=="function"){return al(Q,aR)}if(aQ=="class"){return al(aK("form"),L,h)}if(aQ=="keyword c"||aQ=="async"){return al(aS?aq:ao)}if(aQ=="("){return al(aK(")"),ao,t(")"),h,aR)}if(aQ=="operator"||aQ=="spread"){return al(aS?aJ:au)}if(aQ=="["){return al(aK("]"),o,h,aR)}if(aQ=="{"){return aE(v,"}",null,aR)}if(aQ=="quasi"){return ag(U,aR)}if(aQ=="new"){return al(K(aS))}return al()}function ao(aP){if(aP.match(/[;\}\)\],]/)){return ag()}return ag(au)}function aq(aP){if(aP.match(/[;\}\)\],]/)){return ag()}return ag(aJ)}function ah(aP,aQ){if(aP==","){return al(au)}return k(aP,aQ,false)}function k(aP,aR,aT){var aQ=aT==false?ah:k;var aS=aT==false?au:aJ;if(aP=="=>"){return al(y,aT?R:ac,z)}if(aP=="operator"){if(/\+\+|--/.test(aR)){return al(aQ)}if(aR=="?"){return al(au,t(":"),aS)}return al(aS)}if(aP=="quasi"){return ag(U,aQ)}if(aP==";"){return}if(aP=="("){return aE(aJ,")","call",aQ)}if(aP=="."){return al(ar,aQ)}if(aP=="["){return al(aK("]"),ao,t("]"),h,aQ)}}function U(aP,aQ){if(aP!="quasi"){return ag()}if(aQ.slice(aQ.length-2)!="${"){return al(U)}return al(au,r)}function r(aP){if(aP=="}"){G.marked="string-2";G.state.tokenize=aH;return al(U)}}function ac(aP){aD(G.stream,G.state);return ag(aP=="{"?aM:au)}function R(aP){aD(G.stream,G.state);return ag(aP=="{"?aM:aJ)}function K(aP){return function(aQ){if(aQ=="."){return al(aP?p:aa)}else{return ag(aP?aJ:au)}}}function aa(aP,aQ){if(aQ=="target"){G.marked="keyword";return al(ah)}}function p(aP,aQ){if(aQ=="target"){G.marked="keyword";return al(k)}}function aN(aP){if(aP==":"){return al(h,aM)}return ag(ah,t(";"),h)}function ar(aP){if(aP=="variable"){G.marked="property";return al()}}function v(aP,aQ){if(aP=="async"){G.marked="property";return al(v)}else{if(aP=="variable"||G.style=="keyword"){G.marked="property";if(aQ=="get"||aQ=="set"){return al(M)}return al(O)}else{if(aP=="number"||aP=="string"){G.marked=aG?"property":(G.style+" property");return al(O)}else{if(aP=="jsonld-keyword"){return al(O)}else{if(aP=="modifier"){return al(v)}else{if(aP=="["){return al(au,t("]"),O)}else{if(aP=="spread"){return al(au)}else{if(aP==":"){return ag(O)}}}}}}}}}function M(aP){if(aP!="variable"){return ag(O)}G.marked="property";return al(Q)}function O(aP){if(aP==":"){return al(aJ)}if(aP=="("){return ag(Q)}}function aA(aR,aP){function aQ(aT,aU){if(aT==","){var aS=G.state.lexical;if(aS.info=="call"){aS.pos=(aS.pos||0)+1}return al(function(aV,aW){if(aV==aP||aW==aP){return ag()}return ag(aR)},aQ)}if(aT==aP||aU==aP){return al()}return al(t(aP))}return function(aS,aT){if(aS==aP||aT==aP){return al()}return ag(aR,aQ)}}function aE(aS,aP,aR){for(var aQ=3;aQ<arguments.length;aQ++){G.cc.push(arguments[aQ])}return al(aK(aP,aR),aA(aS,aP),h)}function A(aP){if(aP=="}"){return al()}return ag(aM,A)}function Y(aP,aQ){if(g){if(aP==":"){return al(j)}if(aQ=="?"){return al(Y)}}}function j(aP){if(aP=="variable"){G.marked="variable-3";return al(J)}if(aP=="{"){return al(aA(at,"}"))}if(aP=="("){return al(aA(ai,")"),V)}}function V(aP){if(aP=="=>"){return al(j)}}function at(aP){if(aP=="variable"||G.style=="keyword"){G.marked="property";return al(at)}else{if(aP==":"){return al(j)}}}function ai(aP){if(aP=="variable"){return al(ai)}else{if(aP==":"){return al(j)}}}function J(aP,aQ){if(aQ=="<"){return al(aA(j,">"),J)}if(aP=="["){return al(t("]"),J)}}function d(){return ag(i,Y,aj,ad)}function i(aP,aQ){if(aP=="modifier"){return al(i)}if(aP=="variable"){aC(aQ);return al()}if(aP=="spread"){return al(i)}if(aP=="["){return aE(i,"]")}if(aP=="{"){return aE(aI,"}")}}function aI(aP,aQ){if(aP=="variable"&&!G.stream.match(/^\s*:/,false)){aC(aQ);return al(aj)}if(aP=="variable"){G.marked="property"}if(aP=="spread"){return al(i)}if(aP=="}"){return ag()}return al(t(":"),i,aj)}function aj(aP,aQ){if(aQ=="="){return al(aJ)}}function ad(aP){if(aP==","){return al(d)}}function e(aP,aQ){if(aP=="keyword b"&&aQ=="else"){return al(aK("form","else"),aM,h)}}function w(aP){if(aP=="("){return al(aK(")"),F,t(")"),h)}}function F(aP){if(aP=="var"){return al(d,t(";"),E)}if(aP==";"){return al(E)}if(aP=="variable"){return al(x)}return ag(au,t(";"),E)}function x(aP,aQ){if(aQ=="in"||aQ=="of"){G.marked="keyword";return al(au)}return al(ah,E)}function E(aP,aQ){if(aP==";"){return al(D)}if(aQ=="in"||aQ=="of"){G.marked="keyword";return al(au)}return ag(au,t(";"),D)}function D(aP){if(aP!=")"){al(au)}}function Q(aP,aQ){if(aQ=="*"){G.marked="keyword";return al(Q)}if(aP=="variable"){aC(aQ);return al(Q)}if(aP=="("){return al(y,aK(")"),aA(ak,")"),h,Y,aM,z)}}function ak(aP){if(aP=="spread"){return al(ak)}return ag(i,Y,aj)}function L(aP,aQ){if(aP=="variable"){return ab(aP,aQ)}return S(aP,aQ)}function ab(aP,aQ){if(aP=="variable"){aC(aQ);return al(S)}}function S(aP,aQ){if(aQ=="extends"||aQ=="implements"){return al(g?j:au,S)}if(aP=="{"){return al(aK("}"),q,h)}}function q(aP,aQ){if(aP=="variable"||G.style=="keyword"){if((aQ=="static"||aQ=="get"||aQ=="set"||(g&&(aQ=="public"||aQ=="private"||aQ=="protected"||aQ=="readonly"||aQ=="abstract")))&&G.stream.match(/^\s+[\w$\xa1-\uffff]/,false)){G.marked="keyword";return al(q)}G.marked="property";return al(g?aO:Q,q)}if(aQ=="*"){G.marked="keyword";return al(q)}if(aP==";"){return al(q)}if(aP=="}"){return al()}}function aO(aP,aQ){if(aQ=="?"){return al(aO)}if(aP==":"){return al(j,aj)}return ag(Q)}function aL(aP,aQ){if(aQ=="*"){G.marked="keyword";return al(an,t(";"))}if(aQ=="default"){G.marked="keyword";return al(au,t(";"))}return ag(aM)}function am(aP){if(aP=="string"){return al()}return ag(ax,an)}function ax(aP,aQ){if(aP=="{"){return aE(ax,"}")}if(aP=="variable"){aC(aQ)}if(aQ=="*"){G.marked="keyword"}return al(l)}function l(aP,aQ){if(aQ=="as"){G.marked="keyword";return al(ax)}}function an(aP,aQ){if(aQ=="from"){G.marked="keyword";return al(au)}}function o(aP){if(aP=="]"){return al()}return ag(aA(aJ,"]"))}function aw(aQ,aP){return aQ.lastType=="operator"||aQ.lastType==","||T.test(aP.charAt(0))||/[,.]/.test(aP.charAt(0))}return{startState:function(aQ){var aP={tokenize:Z,lastType:"sof",cc:[],lexical:new N((aQ||0)-m,0,"block",false),localVars:ap.localVars,context:ap.localVars&&{vars:ap.localVars},indented:aQ||0};if(ap.globalVars&&typeof ap.globalVars=="object"){aP.globalVars=ap.globalVars}return aP},token:function(aR,aQ){if(aR.sol()){if(!aQ.lexical.hasOwnProperty("align")){aQ.lexical.align=false}aQ.indented=aR.indentation();aD(aR,aQ)}if(aQ.tokenize!=aF&&aR.eatSpace()){return null}var aP=aQ.tokenize(aR,aQ);if(X=="comment"){return aP}aQ.lastType=X=="operator"&&(I=="++"||I=="--")?"incdec":X;return f(aQ,aP,X,I,aR)},indent:function(aP,aS){if(aP.tokenize==aF){return a.Pass}if(aP.tokenize!=Z){return 0}var aW=aS&&aS.charAt(0),aX=aP.lexical,aV;if(!/^\s*else\b/.test(aS)){for(var aR=aP.cc.length-1;aR>=0;--aR){var aT=aP.cc[aR];if(aT==h){aX=aX.prev}else{if(aT!=e){break}}}}while((aX.type=="stat"||aX.type=="form")&&(aW=="}"||((aV=aP.cc[aP.cc.length-1])&&(aV==ah||aV==k)&&!/^[,\.=+\-*:?[\(]/.test(aS)))){aX=aX.prev}if(C&&aX.type==")"&&aX.prev.type=="stat"){aX=aX.prev}var aU=aX.type,aQ=aW==aU;if(aU=="vardef"){return aX.indented+(aP.lastType=="operator"||aP.lastType==","?aX.info+1:0)}else{if(aU=="form"&&aW=="{"){return aX.indented}else{if(aU=="form"){return aX.indented+m}else{if(aU=="stat"){return aX.indented+(aw(aP,aS)?C||m:0)}else{if(aX.info=="switch"&&!aQ&&ap.doubleIndentSwitch!=false){return aX.indented+(/^(?:case|default)\b/.test(aS)?m:2*m)}else{if(aX.align){return aX.column+(aQ?0:1)}else{return aX.indented+(aQ?0:m)}}}}}}},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:B?null:"/*",blockCommentEnd:B?null:"*/",lineComment:B?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:B?"json":"javascript",jsonldMode:aG,jsonMode:B,expressionAllowed:b,skipExpression:function(aP){var aQ=aP.cc[aP.cc.length-1];if(aQ==au||aQ==aJ){aP.cc.pop()}}}});a.registerHelper("wordChars","javascript",/[\w$]/);a.defineMIME("text/javascript","javascript");a.defineMIME("text/ecmascript","javascript");a.defineMIME("application/javascript","javascript");a.defineMIME("application/x-javascript","javascript");a.defineMIME("application/ecmascript","javascript");a.defineMIME("application/json",{name:"javascript",json:true});a.defineMIME("application/x-json",{name:"javascript",json:true});a.defineMIME("application/ld+json",{name:"javascript",jsonld:true});a.defineMIME("text/typescript",{name:"javascript",typescript:true});a.defineMIME("application/typescript",{name:"javascript",typescript:true})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(r){r.defineMode("css",function(Y,J){var D=J.inline;if(!J.propertyKeywords){J=r.resolveMode("text/css")}var Q=Y.indentUnit,A=J.tokenHooks,y=J.documentTypes||{},X=J.mediaTypes||{},L=J.mediaFeatures||{},P=J.mediaValueKeywords||{},I=J.propertyKeywords||{},B=J.nonStandardPropertyKeywords||{},E=J.fontProperties||{},W=J.counterDescriptors||{},O=J.colorKeywords||{},S=J.valueKeywords||{},M=J.allowNested,U=J.supportsAtComponent===true;var C,N;function Z(ac,ad){C=ad;return ac}function ab(af,ae){var ad=af.next();if(A[ad]){var ac=A[ad](af,ae);if(ac!==false){return ac}}if(ad=="@"){af.eatWhile(/[\w\\\-]/);return Z("def",af.current())}else{if(ad=="="||(ad=="~"||ad=="|")&&af.eat("=")){return Z(null,"compare")}else{if(ad=='"'||ad=="'"){ae.tokenize=K(ad);return ae.tokenize(af,ae)}else{if(ad=="#"){af.eatWhile(/[\w\\\-]/);return Z("atom","hash")}else{if(ad=="!"){af.match(/^\s*\w*/);return Z("keyword","important")}else{if(/\d/.test(ad)||ad=="."&&af.eat(/\d/)){af.eatWhile(/[\w.%]/);return Z("number","unit")}else{if(ad==="-"){if(/[\d.]/.test(af.peek())){af.eatWhile(/[\w.%]/);return Z("number","unit")}else{if(af.match(/^-[\w\\\-]+/)){af.eatWhile(/[\w\\\-]/);if(af.match(/^\s*:/,false)){return Z("variable-2","variable-definition")}return Z("variable-2","variable")}else{if(af.match(/^\w+-/)){return Z("meta","meta")}}}}else{if(/[,+>*\/]/.test(ad)){return Z(null,"select-op")}else{if(ad=="."&&af.match(/^-?[_a-z][_a-z0-9-]*/i)){return Z("qualifier","qualifier")}else{if(/[:;{}\[\]\(\)]/.test(ad)){return Z(null,ad)}else{if((ad=="u"&&af.match(/rl(-prefix)?\(/))||(ad=="d"&&af.match("omain("))||(ad=="r"&&af.match("egexp("))){af.backUp(1);ae.tokenize=aa;return Z("property","word")}else{if(/[\w\\\-]/.test(ad)){af.eatWhile(/[\w\\\-]/);return Z("property","word")}else{return Z(null,null)}}}}}}}}}}}}}function K(ac){return function(ag,ae){var af=false,ad;while((ad=ag.next())!=null){if(ad==ac&&!af){if(ac==")"){ag.backUp(1)}break}af=!af&&ad=="\\"}if(ad==ac||!af&&ac!=")"){ae.tokenize=null}return Z("string","string")}}function aa(ad,ac){ad.next();if(!ad.match(/\s*[\"\')]/,false)){ac.tokenize=K(")")}else{ac.tokenize=null}return Z(null,"(")}function R(ad,ac,ae){this.type=ad;this.indent=ac;this.prev=ae}function G(ae,af,ad,ac){ae.context=new R(ad,af.indentation()+(ac===false?0:Q),ae.context);return ad}function T(ac){if(ac.context.prev){ac.context=ac.context.prev}return ac.context.type}function z(ac,ae,ad){return F[ad.context.type](ac,ae,ad)}function V(ad,af,ae,ag){for(var ac=ag||1;ac>0;ac--){ae.context=ae.context.prev}return z(ad,af,ae)}function H(ad){var ac=ad.current().toLowerCase();if(S.hasOwnProperty(ac)){N="atom"}else{if(O.hasOwnProperty(ac)){N="keyword"}else{N="variable"}}}var F={};F.top=function(ac,ae,ad){if(ac=="{"){return G(ad,ae,"block")}else{if(ac=="}"&&ad.context.prev){return T(ad)}else{if(U&&/@component/.test(ac)){return G(ad,ae,"atComponentBlock")}else{if(/^@(-moz-)?document$/.test(ac)){return G(ad,ae,"documentTypes")}else{if(/^@(media|supports|(-moz-)?document|import)$/.test(ac)){return G(ad,ae,"atBlock")}else{if(/^@(font-face|counter-style)/.test(ac)){ad.stateArg=ac;return"restricted_atBlock_before"}else{if(/^@(-(moz|ms|o|webkit)-)?keyframes$/.test(ac)){return"keyframes"}else{if(ac&&ac.charAt(0)=="@"){return G(ad,ae,"at")}else{if(ac=="hash"){N="builtin"}else{if(ac=="word"){N="tag"}else{if(ac=="variable-definition"){return"maybeprop"}else{if(ac=="interpolation"){return G(ad,ae,"interpolation")}else{if(ac==":"){return"pseudo"}else{if(M&&ac=="("){return G(ad,ae,"parens")}}}}}}}}}}}}}}return ad.context.type};F.block=function(ac,af,ad){if(ac=="word"){var ae=af.current().toLowerCase();if(I.hasOwnProperty(ae)){N="property";return"maybeprop"}else{if(B.hasOwnProperty(ae)){N="string-2";return"maybeprop"}else{if(M){N=af.match(/^\s*:(?:\s|$)/,false)?"property":"tag";return"block"}else{N+=" error";return"maybeprop"}}}}else{if(ac=="meta"){return"block"}else{if(!M&&(ac=="hash"||ac=="qualifier")){N="error";return"block"}else{return F.top(ac,af,ad)}}}};F.maybeprop=function(ac,ae,ad){if(ac==":"){return G(ad,ae,"prop")}return z(ac,ae,ad)};F.prop=function(ac,ae,ad){if(ac==";"){return T(ad)}if(ac=="{"&&M){return G(ad,ae,"propBlock")}if(ac=="}"||ac=="{"){return V(ac,ae,ad)}if(ac=="("){return G(ad,ae,"parens")}if(ac=="hash"&&!/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(ae.current())){N+=" error"}else{if(ac=="word"){H(ae)}else{if(ac=="interpolation"){return G(ad,ae,"interpolation")}}}return"prop"};F.propBlock=function(ad,ac,ae){if(ad=="}"){return T(ae)}if(ad=="word"){N="property";return"maybeprop"}return ae.context.type};F.parens=function(ac,ae,ad){if(ac=="{"||ac=="}"){return V(ac,ae,ad)}if(ac==")"){return T(ad)}if(ac=="("){return G(ad,ae,"parens")}if(ac=="interpolation"){return G(ad,ae,"interpolation")}if(ac=="word"){H(ae)}return"parens"};F.pseudo=function(ac,ae,ad){if(ac=="word"){N="variable-3";return ad.context.type}return z(ac,ae,ad)};F.documentTypes=function(ac,ae,ad){if(ac=="word"&&y.hasOwnProperty(ae.current())){N="tag";return ad.context.type}else{return F.atBlock(ac,ae,ad)}};F.atBlock=function(ac,af,ad){if(ac=="("){return G(ad,af,"atBlock_parens")}if(ac=="}"||ac==";"){return V(ac,af,ad)}if(ac=="{"){return T(ad)&&G(ad,af,M?"block":"top")}if(ac=="interpolation"){return G(ad,af,"interpolation")}if(ac=="word"){var ae=af.current().toLowerCase();if(ae=="only"||ae=="not"||ae=="and"||ae=="or"){N="keyword"}else{if(X.hasOwnProperty(ae)){N="attribute"}else{if(L.hasOwnProperty(ae)){N="property"}else{if(P.hasOwnProperty(ae)){N="keyword"}else{if(I.hasOwnProperty(ae)){N="property"}else{if(B.hasOwnProperty(ae)){N="string-2"}else{if(S.hasOwnProperty(ae)){N="atom"}else{if(O.hasOwnProperty(ae)){N="keyword"}else{N="error"}}}}}}}}}return ad.context.type};F.atComponentBlock=function(ac,ae,ad){if(ac=="}"){return V(ac,ae,ad)}if(ac=="{"){return T(ad)&&G(ad,ae,M?"block":"top",false)}if(ac=="word"){N="error"}return ad.context.type};F.atBlock_parens=function(ac,ae,ad){if(ac==")"){return T(ad)}if(ac=="{"||ac=="}"){return V(ac,ae,ad,2)}return F.atBlock(ac,ae,ad)};F.restricted_atBlock_before=function(ac,ae,ad){if(ac=="{"){return G(ad,ae,"restricted_atBlock")}if(ac=="word"&&ad.stateArg=="@counter-style"){N="variable";return"restricted_atBlock_before"}return z(ac,ae,ad)};F.restricted_atBlock=function(ac,ae,ad){if(ac=="}"){ad.stateArg=null;return T(ad)}if(ac=="word"){if((ad.stateArg=="@font-face"&&!E.hasOwnProperty(ae.current().toLowerCase()))||(ad.stateArg=="@counter-style"&&!W.hasOwnProperty(ae.current().toLowerCase()))){N="error"}else{N="property"}return"maybeprop"}return"restricted_atBlock"};F.keyframes=function(ac,ae,ad){if(ac=="word"){N="variable";return"keyframes"}if(ac=="{"){return G(ad,ae,"top")}return z(ac,ae,ad)};F.at=function(ac,ae,ad){if(ac==";"){return T(ad)}if(ac=="{"||ac=="}"){return V(ac,ae,ad)}if(ac=="word"){N="tag"}else{if(ac=="hash"){N="builtin"}}return"at"};F.interpolation=function(ac,ae,ad){if(ac=="}"){return T(ad)}if(ac=="{"||ac==";"){return V(ac,ae,ad)}if(ac=="word"){N="variable"}else{if(ac!="variable"&&ac!="("&&ac!=")"){N="error"}}return"interpolation"};return{startState:function(ac){return{tokenize:null,state:D?"block":"top",stateArg:null,context:new R(D?"block":"top",ac||0,null)}},token:function(ae,ad){if(!ad.tokenize&&ae.eatSpace()){return null}var ac=(ad.tokenize||ab)(ae,ad);if(ac&&typeof ac=="object"){C=ac[1];ac=ac[0]}N=ac;ad.state=F[ad.state](C,ae,ad);return N},indent:function(ag,ae){var ad=ag.context,af=ae&&ae.charAt(0);var ac=ad.indent;if(ad.type=="prop"&&(af=="}"||af==")")){ad=ad.prev}if(ad.prev){if(af=="}"&&(ad.type=="block"||ad.type=="top"||ad.type=="interpolation"||ad.type=="restricted_atBlock")){ad=ad.prev;ac=ad.indent}else{if(af==")"&&(ad.type=="parens"||ad.type=="atBlock_parens")||af=="{"&&(ad.type=="at"||ad.type=="atBlock")){ac=Math.max(0,ad.indent-Q);ad=ad.prev}}}return ac},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",fold:"brace"}});function g(A){var z={};for(var y=0;y<A.length;++y){z[A[y].toLowerCase()]=true}return z}var k=["domain","regexp","url","url-prefix"],a=g(k);var b=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],v=g(b);var x=["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","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover"],i=g(x);var l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive"],p=g(l);var d=["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-blend-mode","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-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","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","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","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","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"],h=g(d);var n=["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"],e=g(n);var t=["font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"],f=g(t);var q=["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"],u=g(q);var 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"],m=g(c);var j=["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","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","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","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","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","lighten","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","luminosity","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","multiply","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","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","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","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","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","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],s=g(j);var o=k.concat(b).concat(x).concat(l).concat(d).concat(n).concat(c).concat(j);r.registerHelper("hintWords","css",o);function w(B,A){var y=false,z;while((z=B.next())!=null){if(y&&z=="/"){A.tokenize=null;break}y=(z=="*")}return["comment","comment"]}r.defineMIME("text/css",{documentTypes:a,mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css"});r.defineMIME("text/x-scss",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},":":function(y){if(y.match(/\s*\{/)){return[null,"{"]}return false},"$":function(y){y.match(/^[\w-]+/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"#":function(y){if(!y.eat("{")){return false}return[null,"interpolation"]}},name:"css",helperType:"scss"});r.defineMIME("text/x-less",{mediaTypes:v,mediaFeatures:i,mediaValueKeywords:p,propertyKeywords:h,nonStandardPropertyKeywords:e,colorKeywords:m,valueKeywords:s,fontProperties:f,allowNested:true,tokenHooks:{"/":function(z,y){if(z.eat("/")){z.skipToEnd();return["comment","comment"]}else{if(z.eat("*")){y.tokenize=w;return w(z,y)}else{return["operator","operator"]}}},"@":function(y){if(y.eat("{")){return[null,"interpolation"]}if(y.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/,false)){return false}y.eatWhile(/[\w\\\-]/);if(y.match(/^\s*:/,false)){return["variable-2","variable-definition"]}return["variable-2","variable"]},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"});r.defineMIME("text/x-gss",{documentTypes:a,mediaTypes:v,mediaFeatures:i,propertyKeywords:h,nonStandardPropertyKeywords:e,fontProperties:f,counterDescriptors:u,colorKeywords:m,valueKeywords:s,supportsAtComponent:true,tokenHooks:{"/":function(z,y){if(!z.eat("*")){return false}y.tokenize=w;return w(z,y)}},name:"css",helperType:"gss"})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror"],a)}else{a(CodeMirror)}}})(function(r){function q(B,x,w,z,A,y){this.indented=B;this.column=x;this.type=w;this.info=z;this.align=A;this.prev=y}function g(z,x,y,A){var w=z.indented;if(z.context&&z.context.type=="statement"&&y!="statement"){w=z.context.indented}return z.context=new q(w,x,y,A,null,z.context)}function t(x){var w=x.context.type;if(w==")"||w=="]"||w=="}"){x.indented=x.context.indented}return x.context=x.context.prev}function a(x,w,y){if(w.prevToken=="variable"||w.prevToken=="variable-3"){return true}if(/\S(?:[^- ]>|[*\]])\s*$|\*$/.test(x.string.slice(0,y))){return true}if(w.typeAtEndOfLine&&x.column()==x.indentation()){return true}}function p(w){for(;;){if(!w||w.type=="top"){return true}if(w.type=="}"&&w.prev.info!="namespace"){return false}w=w.prev}}r.defineMode("clike",function(S,D){var O=S.indentUnit,L=D.statementIndentUnit||O,P=D.dontAlignCalls,G=D.keywords||{},J=D.types||{},T=D.builtin||{},Q=D.blockKeywords||{},N=D.defKeywords||{},y=D.atoms||{},x=D.hooks||{},K=D.multiLineStrings,I=D.indentStatements!==false,F=D.indentSwitch!==false,A=D.namespaceSeparator,C=D.isPunctuationChar||/[\[\]{}\(\),;\:\.]/,z=D.numberStart||/[\d\.]/,w=D.number||/^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)(u|ll?|l|f)?/i,H=D.isOperatorChar||/[+\-*&%=<>!?|\/]/;var R,B;function V(aa,Y){var X=aa.next();if(x[X]){var W=x[X](aa,Y);if(W!==false){return W}}if(X=='"'||X=="'"){Y.tokenize=E(X);return Y.tokenize(aa,Y)}if(C.test(X)){R=X;return null}if(z.test(X)){aa.backUp(1);if(aa.match(w)){return"number"}aa.next()}if(X=="/"){if(aa.eat("*")){Y.tokenize=M;return M(aa,Y)}if(aa.eat("/")){aa.skipToEnd();return"comment"}}if(H.test(X)){while(!aa.match(/^\/[\/*]/,false)&&aa.eat(H)){}return"operator"}aa.eatWhile(/[\w\$_\xa1-\uffff]/);if(A){while(aa.match(A)){aa.eatWhile(/[\w\$_\xa1-\uffff]/)}}var Z=aa.current();if(h(G,Z)){if(h(Q,Z)){R="newstatement"}if(h(N,Z)){B=true}return"keyword"}if(h(J,Z)){return"variable-3"}if(h(T,Z)){if(h(Q,Z)){R="newstatement"}return"builtin"}if(h(y,Z)){return"atom"}return"variable"}function E(W){return function(ab,Z){var aa=false,Y,X=false;while((Y=ab.next())!=null){if(Y==W&&!aa){X=true;break}aa=!aa&&Y=="\\"}if(X||!(aa||K)){Z.tokenize=null}return"string"}}function M(Z,Y){var W=false,X;while(X=Z.next()){if(X=="/"&&W){Y.tokenize=null;break}W=(X=="*")}return"comment"}function U(X,W){if(D.typeFirstDefinitions&&X.eol()&&p(W.context)){W.typeAtEndOfLine=a(X,W,X.pos)}}return{startState:function(W){return{tokenize:null,context:new q((W||0)-O,0,"top",null,false),indented:0,startOfLine:true,prevToken:null}},token:function(aa,Z){var X=Z.context;if(aa.sol()){if(X.align==null){X.align=false}Z.indented=aa.indentation();Z.startOfLine=true}if(aa.eatSpace()){U(aa,Z);return null}R=B=null;var Y=(Z.tokenize||V)(aa,Z);if(Y=="comment"||Y=="meta"){return Y}if(X.align==null){X.align=true}if(R==";"||R==":"||(R==","&&aa.match(/^\s*(?:\/\/.*)?$/,false))){while(Z.context.type=="statement"){t(Z)}}else{if(R=="{"){g(Z,aa.column(),"}")}else{if(R=="["){g(Z,aa.column(),"]")}else{if(R=="("){g(Z,aa.column(),")")}else{if(R=="}"){while(X.type=="statement"){X=t(Z)}if(X.type=="}"){X=t(Z)}while(X.type=="statement"){X=t(Z)}}else{if(R==X.type){t(Z)}else{if(I&&(((X.type=="}"||X.type=="top")&&R!=";")||(X.type=="statement"&&R=="newstatement"))){g(Z,aa.column(),"statement",aa.current())}}}}}}}if(Y=="variable"&&((Z.prevToken=="def"||(D.typeFirstDefinitions&&a(aa,Z,aa.start)&&p(Z.context)&&aa.match(/^\s*\(/,false))))){Y="def"}if(x.token){var W=x.token(aa,Z,Y);if(W!==undefined){Y=W}}if(Y=="def"&&D.styleDefs===false){Y="variable"}Z.startOfLine=false;Z.prevToken=B?"def":Y||R;U(aa,Z);return Y},indent:function(ac,X){if(ac.tokenize!=V&&ac.tokenize!=null||ac.typeAtEndOfLine){return r.Pass}var W=ac.context,aa=X&&X.charAt(0);if(W.type=="statement"&&aa=="}"){W=W.prev}if(D.dontIndentStatements){while(W.type=="statement"&&D.dontIndentStatements.test(W.info)){W=W.prev}}if(x.indent){var ab=x.indent(ac,W,X);if(typeof ab=="number"){return ab}}var Y=aa==W.type;var Z=W.prev&&W.prev.info=="switch";if(D.allmanIndentation&&/[{(]/.test(aa)){while(W.type!="top"&&W.type!="}"){W=W.prev}return W.indented}if(W.type=="statement"){return W.indented+(aa=="{"?0:L)}if(W.align&&(!P||W.type!=")")){return W.column+(Y?0:1)}if(W.type==")"&&!Y){return W.indented+L}return W.indented+(Y?0:O)+(!Y&&Z&&!/^(?:case|default)\b/.test(X)?O:0)},electricInput:F?/^\s*(?:case .*?:|default:|\{\}?|\})$/:/^\s*[{}]$/,blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",fold:"brace"}});function o(z){var x={},y=z.split(" ");for(var w=0;w<y.length;++w){x[y[w]]=true}return x}function h(x,w){if(typeof x==="function"){return x(w)}else{return x.propertyIsEnumerable(w)}}var l="auto if break case register continue return default do sizeof static else struct switch extern typedef union for goto while enum const volatile";var s="int long char short double float unsigned signed void size_t ptrdiff_t";function m(z,y){if(!y.startOfLine){return false}for(var x,w=null;x=z.peek();){if(x=="\\"&&z.match(/^.$/)){w=m;break}else{if(x=="/"&&z.match(/^\/[\/\*]/,false)){break}}z.next()}y.tokenize=w;return"meta"}function d(w,x){if(x.prevToken=="variable-3"){return"variable-3"}return false}function f(w){w.eatWhile(/[\w\.']/);return"number"}function n(y,x){y.backUp(1);if(y.match(/(R|u8R|uR|UR|LR)/)){var w=y.match(/"([^\s\\()]{0,16})\(/);if(!w){return false}x.cpp11RawStringDelim=w[1];x.tokenize=i;return i(y,x)}if(y.match(/(u8|u|U|L)/)){if(y.match(/["']/,false)){return"string"}return false}y.next();return false}function v(x){var w=/(\w+)::(\w+)$/.exec(x);return w&&w[1]==w[2]}function u(y,x){var w;while((w=y.next())!=null){if(w=='"'&&!y.eat('"')){x.tokenize=null;break}}return"string"}function i(z,x){var y=x.cpp11RawStringDelim.replace(/[^\w\s]/g,"\\$&");var w=z.match(new RegExp(".*?\\)"+y+'"'));if(w){x.tokenize=null}else{z.skipToEnd()}return"string"}function k(w,A){if(typeof w=="string"){w=[w]}var z=[];function y(B){if(B){for(var C in B){if(B.hasOwnProperty(C)){z.push(C)}}}}y(A.keywords);y(A.types);y(A.builtin);y(A.atoms);if(z.length){A.helperType=w[0];r.registerHelper("hintWords",w[0],z)}for(var x=0;x<w.length;++x){r.defineMIME(w[x],A)}}k(["text/x-csrc","text/x-c","text/x-chdr"],{name:"clike",keywords:o(l),types:o(s+" 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:o("case do else for if switch while struct"),defKeywords:o("struct"),typeFirstDefinitions:true,atoms:o("null true false"),hooks:{"#":m,"*":d},modeProps:{fold:["brace","include"]}});k(["text/x-c++src","text/x-c++hdr"],{name:"clike",keywords:o(l+" 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:o(s+" bool wchar_t"),blockKeywords:o("catch class do else finally for if struct switch try while"),defKeywords:o("class namespace struct enum union"),typeFirstDefinitions:true,atoms:o("true false null"),dontIndentStatements:/^template$/,hooks:{"#":m,"*":d,u:n,U:n,L:n,R:n,"0":f,"1":f,"2":f,"3":f,"4":f,"5":f,"6":f,"7":f,"8":f,"9":f,token:function(y,x,w){if(w=="variable"&&y.peek()=="("&&(x.prevToken==";"||x.prevToken==null||x.prevToken=="}")&&v(y.current())){return"def"}}},namespaceSeparator:"::",modeProps:{fold:["brace","include"]}});k("text/x-java",{name:"clike",keywords:o("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"),types:o("byte short int long float double boolean char void Boolean Byte Character Double Float Integer Long Number Object Short String StringBuffer StringBuilder Void"),blockKeywords:o("catch class do else finally for if switch try while"),defKeywords:o("class interface package enum"),typeFirstDefinitions:true,atoms:o("true false null"),number:/^(?:0x[a-f\d_]+|0b[01_]+|(?:[\d_]+\.?\d*|\.\d+)(?:e[-+]?[\d_]+)?)(u|ll?|l|f)?/i,hooks:{"@":function(w){w.eatWhile(/[\w\$_]/);return"meta"}},modeProps:{fold:["brace","import"]}});k("text/x-csharp",{name:"clike",keywords:o("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:o("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:o("catch class do else finally for foreach if struct switch try while"),defKeywords:o("class interface namespace struct var"),typeFirstDefinitions:true,atoms:o("true false null"),hooks:{"@":function(x,w){if(x.eat('"')){w.tokenize=u;return u(x,w)}x.eatWhile(/[\w\$_]/);return"meta"}}});function c(y,w){var x=false;while(!y.eol()){if(!x&&y.match('"""')){w.tokenize=null;break}x=y.next()=="\\"&&!x}return"string"}k("text/x-scala",{name:"clike",keywords:o("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:o("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:true,blockKeywords:o("catch class do else finally for forSome if match switch try while"),defKeywords:o("class def object package trait type val var"),atoms:o("true false null"),indentStatements:false,indentSwitch:false,hooks:{"@":function(w){w.eatWhile(/[\w\$_]/);return"meta"},'"':function(x,w){if(!x.match('""')){return false}w.tokenize=c;return w.tokenize(x,w)},"'":function(w){w.eatWhile(/[\w\$_\xa1-\uffff]/);return"atom"},"=":function(y,x){var w=x.context;if(w.type=="}"&&w.align&&y.eat(">")){x.context=new q(w.indented,w.column,w.type,w.info,null,w.prev);return"operator"}else{return false}}},modeProps:{closeBrackets:{triples:'"'}}});function b(w){return function(B,z){var A=false,y,x=false;while(!B.eol()){if(!w&&!A&&B.match('"')){x=true;break}if(w&&B.match('"""')){x=true;break}y=B.next();if(!A&&y=="$"&&B.match("{")){B.skipTo("}")}A=!A&&y=="\\"&&!w}if(x||!w){z.tokenize=null}return"string"}}k("text/x-kotlin",{name:"clike",keywords:o("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"),types:o("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:false,indentStatements:false,multiLineStrings:true,blockKeywords:o("catch class do else finally for if where try while enum"),defKeywords:o("class val var object package interface fun"),atoms:o("true false null this"),hooks:{'"':function(x,w){w.tokenize=b(x.match('""'));return w.tokenize(x,w)}},modeProps:{closeBrackets:{triples:'"'}}});k(["x-shader/x-vertex","x-shader/x-fragment"],{name:"clike",keywords:o("sampler1D sampler2D sampler3D samplerCube sampler1DShadow sampler2DShadow const attribute uniform varying break continue discard return for while do if else struct in out inout"),types:o("float int bool void vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 mat2 mat3 mat4"),blockKeywords:o("for while do if else struct"),builtin:o("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:o("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:false,hooks:{"#":m},modeProps:{fold:["brace","include"]}});k("text/x-nesc",{name:"clike",keywords:o(l+"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:o(s),blockKeywords:o("case do else for if switch while struct"),atoms:o("null true false"),hooks:{"#":m},modeProps:{fold:["brace","include"]}});k("text/x-objectivec",{name:"clike",keywords:o(l+"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:o(s),atoms:o("YES NO NULL NILL ON OFF true false"),hooks:{"@":function(w){w.eatWhile(/[\w\$]/);return"keyword"},"#":m,indent:function(y,w,x){if(w.type=="statement"&&/^@\w/.test(x)){return w.indented}}},modeProps:{fold:"brace"}});k("text/x-squirrel",{name:"clike",keywords:o("base break clone continue const default delete enum extends function in class foreach local resume return this throw typeof yield constructor instanceof static"),types:o(s),blockKeywords:o("case catch class else for foreach if switch try while"),defKeywords:o("function local class"),typeFirstDefinitions:true,atoms:o("true false null"),hooks:{"#":m},modeProps:{fold:["brace","include"]}});var e=null;function j(w){return function(B,z){var A=false,y,x=false;while(!B.eol()){if(!A&&B.match('"')&&(w=="single"||B.match('""'))){x=true;break}if(!A&&B.match("``")){e=j(w);x=true;break}y=B.next();A=w=="single"&&!A&&y=="\\"}if(x){z.tokenize=null}return"string"}}k("text/x-ceylon",{name:"clike",keywords:o("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(w){var x=w.charAt(0);return(x===x.toUpperCase()&&x!==x.toLowerCase())},blockKeywords:o("case catch class dynamic else finally for function if interface module new object switch try while"),defKeywords:o("class dynamic function interface module object package value"),builtin:o("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:true,typeFirstDefinitions:true,atoms:o("true false null larger smaller equal empty finished"),indentSwitch:false,styleDefs:false,hooks:{"@":function(w){w.eatWhile(/[\w\$_]/);return"meta"},'"':function(x,w){w.tokenize=j(x.match('""')?"triple":"single");return w.tokenize(x,w)},"`":function(x,w){if(!e||!x.match("`")){return false}w.tokenize=e;e=null;return w.tokenize(x,w)},"'":function(w){w.eatWhile(/[\w\$_\xa1-\uffff]/);return"atom"},token:function(w,y,x){if((x=="variable"||x=="variable-3")&&y.prevToken=="."){return"variable-2"}}},modeProps:{fold:["brace","import"],closeBrackets:{triples:'"'}}})});(function(a){if(typeof exports=="object"&&typeof module=="object"){a(require("../../lib/codemirror"),require("../htmlmixed/htmlmixed"),require("../clike/clike"))}else{if(typeof define=="function"&&define.amd){define(["../../lib/codemirror","../htmlmixed/htmlmixed","../clike/clike"],a)}else{a(CodeMirror)}}})(function(d){function f(m){var k={},l=m.split(" ");for(var j=0;j<l.length;++j){k[l[j]]=true}return k}function e(l,j,k){if(l.length==0){return b(j)}return function(p,o){var n=l[0];for(var m=0;m<n.length;m++){if(p.match(n[m][0])){o.tokenize=e(l.slice(1),j);return n[m][1]}}o.tokenize=b(j,k);return"string"}}function b(k,j){return function(m,l){return c(m,l,k,j)}}function c(n,l,k,j){if(j!==false&&n.match("${",false)||n.match("{$",false)){l.tokenize=null;return"string"}if(j!==false&&n.match(/^\$[a-zA-Z_][a-zA-Z0-9_]*/)){if(n.match("[",false)){l.tokenize=e([[["[",null]],[[/\d[\w\.]*/,"number"],[/\$[a-zA-Z_][a-zA-Z0-9_]*/,"variable-2"],[/[\w\$]+/,"variable"]],[["]",null]]],k,j)}if(n.match(/\-\>\w/,false)){l.tokenize=e([[["->",null]],[[/[\w]+/,"variable"]]],k,j)}return"variable-2"}var m=false;while(!n.eol()&&(m||j===false||(!n.match("{$",false)&&!n.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|\$\{)/,false)))){if(!m&&n.match(k)){l.tokenize=null;l.tokStack.pop();l.tokStack.pop();break}m=n.next()=="\\"&&!m}return"string"}var h="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";var i="true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__";var 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";d.registerHelper("hintWords","php",[h,i,a].join(" ").split(" "));d.registerHelper("wordChars","php",/[\w$]/);var g={name:"clike",helperType:"php",keywords:f(h),blockKeywords:f("catch do else elseif for foreach if switch try while finally"),defKeywords:f("class function interface namespace trait"),atoms:f(i),builtin:f(a),multiLineStrings:true,hooks:{"$":function(j){j.eatWhile(/[\w\$_]/);return"variable-2"},"<":function(n,l){var k;if(k=n.match(/<<\s*/)){var j=n.eat(/['"]/);n.eatWhile(/[\w\.]/);var m=n.current().slice(k[0].length+(j?2:1));if(j){n.eat(j)}if(m){(l.tokStack||(l.tokStack=[])).push(m,0);l.tokenize=b(m,j!="'");return"string"}}return false},"#":function(j){while(!j.eol()&&!j.match("?>",false)){j.next()}return"comment"},"/":function(j){if(j.eat("/")){while(!j.eol()&&!j.match("?>",false)){j.next()}return"comment"}return false},'"':function(j,k){(k.tokStack||(k.tokStack=[])).push('"',0);k.tokenize=b('"');return"string"},"{":function(j,k){if(k.tokStack&&k.tokStack.length){k.tokStack[k.tokStack.length-1]++}return false},"}":function(j,k){if(k.tokStack&&k.tokStack.length>0&&!--k.tokStack[k.tokStack.length-1]){k.tokenize=b(k.tokStack[k.tokStack.length-2])}return false}}};d.defineMode("php",function(l,m){var n=d.getMode(l,"text/html");var j=d.getMode(l,g);function k(u,s){var r=s.curMode==j;if(u.sol()&&s.pending&&s.pending!='"'&&s.pending!="'"){s.pending=null}if(!r){if(u.match(/^<\?\w*/)){s.curMode=j;if(!s.php){s.php=d.startState(j,n.indent(s.html,""))}s.curState=s.php;return"meta"}if(s.pending=='"'||s.pending=="'"){while(!u.eol()&&u.next()!=s.pending){}var q="string"}else{if(s.pending&&u.pos<s.pending.end){u.pos=s.pending.end;var q=s.pending.style}else{var q=n.token(u,s.curState)}}if(s.pending){s.pending=null}var t=u.current(),p=t.search(/<\?/),o;if(p!=-1){if(q=="string"&&(o=t.match(/[\'\"]$/))&&!/\?>/.test(t)){s.pending=o[0]}else{s.pending={end:u.pos,style:q}}u.backUp(t.length-p)}return q}else{if(r&&s.php.tokenize==null&&u.match("?>")){s.curMode=n;s.curState=s.html;if(!s.php.context.prev){s.php=null}return"meta"}else{return j.token(u,s.curState)}}}return{startState:function(){var o=d.startState(n);var p=m.startOpen?d.startState(j):null;return{html:o,php:p,curMode:m.startOpen?j:n,curState:m.startOpen?p:o,pending:null}},copyState:function(r){var p=r.html,q=d.copyState(n,p),t=r.php,o=t&&d.copyState(j,t),s;if(r.curMode==n){s=q}else{s=o}return{html:q,php:o,curMode:r.curMode,curState:s,pending:r.pending}},token:k,indent:function(p,o){if((p.curMode!=j&&/^\s*<\//.test(o))||(p.curMode==j&&/^\?>/.test(o))){return n.indent(p.html,o)}return p.curMode.indent(p.curState,o)},blockCommentStart:"/*",blockCommentEnd:"*/",lineComment:"//",innerMode:function(o){return{state:o.curState,mode:o.curMode}}}},"htmlmixed","clike");d.defineMIME("application/x-httpd-php","php");d.defineMIME("application/x-httpd-php-open",{name:"php",startOpen:true});d.defineMIME("text/x-php",g)});
|
@@ -0,0 +1,137 @@
|
|
1
|
+
/**
|
2
|
+
* @file bbcode.js
|
3
|
+
* @brief BBCode mode for CodeMirror<http://codemirror.net/>
|
4
|
+
* @author Ruslan Osmanov <rrosmanov@gmail.com>
|
5
|
+
* @version 2.0
|
6
|
+
* @date 12.10.2013
|
7
|
+
*/
|
8
|
+
|
9
|
+
CodeMirror.defineMode("bbcode", function(config) {
|
10
|
+
var settings, m, last;
|
11
|
+
|
12
|
+
settings = {
|
13
|
+
bbCodeTags: "b i u s img quote code list table tr td size color url",
|
14
|
+
bbCodeUnaryTags: "* :-) hr cut"
|
15
|
+
};
|
16
|
+
|
17
|
+
if (config.hasOwnProperty("bbCodeTags")) {
|
18
|
+
settings.bbCodeTags = config.bbCodeTags;
|
19
|
+
}
|
20
|
+
if (config.hasOwnProperty("bbCodeUnaryTags")) {
|
21
|
+
settings.bbCodeUnaryTags = config.bbCodeUnaryTags;
|
22
|
+
}
|
23
|
+
|
24
|
+
var helpers = {
|
25
|
+
cont: function(style, lastType) {
|
26
|
+
last = lastType;
|
27
|
+
return style;
|
28
|
+
},
|
29
|
+
escapeRegEx: function(s) {
|
30
|
+
return s.replace(/([\:\-\)\(\*\+\?\[\]])/g, '\\$1');
|
31
|
+
}
|
32
|
+
};
|
33
|
+
|
34
|
+
var regs = {
|
35
|
+
validIdentifier: /[a-zA-Z0-9_]/,
|
36
|
+
stringChar: /['"]/,
|
37
|
+
tags: new RegExp("(?:" + helpers.escapeRegEx(settings.bbCodeTags).split(" ").join("|") + ")"),
|
38
|
+
unaryTags: new RegExp("(?:" + helpers.escapeRegEx(settings.bbCodeUnaryTags).split(" ").join("|") + ")")
|
39
|
+
};
|
40
|
+
|
41
|
+
var parsers = {
|
42
|
+
tokenizer: function (stream, state) {
|
43
|
+
if (stream.eatSpace()) return null;
|
44
|
+
|
45
|
+
if (stream.match('[', true)) {
|
46
|
+
state.tokenize = parsers.bbcode;
|
47
|
+
return helpers.cont("tag", "startTag");
|
48
|
+
}
|
49
|
+
|
50
|
+
stream.next();
|
51
|
+
return null;
|
52
|
+
},
|
53
|
+
inAttribute: function(quote) {
|
54
|
+
return function(stream, state) {
|
55
|
+
var prevChar = null;
|
56
|
+
var currChar = null;
|
57
|
+
while (!stream.eol()) {
|
58
|
+
currChar = stream.peek();
|
59
|
+
if (stream.next() == quote && prevChar !== '\\') {
|
60
|
+
state.tokenize = parsers.bbcode;
|
61
|
+
break;
|
62
|
+
}
|
63
|
+
prevChar = currChar;
|
64
|
+
}
|
65
|
+
return "string";
|
66
|
+
};
|
67
|
+
},
|
68
|
+
bbcode: function (stream, state) {
|
69
|
+
if (m = stream.match(']', true)) {
|
70
|
+
state.tokenize = parsers.tokenizer;
|
71
|
+
return helpers.cont("tag", null);
|
72
|
+
}
|
73
|
+
|
74
|
+
if (stream.match('[', true)) {
|
75
|
+
return helpers.cont("tag", "startTag");
|
76
|
+
}
|
77
|
+
|
78
|
+
var ch = stream.next();
|
79
|
+
if (regs.stringChar.test(ch)) {
|
80
|
+
state.tokenize = parsers.inAttribute(ch);
|
81
|
+
return helpers.cont("string", "string");
|
82
|
+
} else if (/\d/.test(ch)) {
|
83
|
+
stream.eatWhile(/\d/);
|
84
|
+
return helpers.cont("number", "number");
|
85
|
+
} else {
|
86
|
+
if (state.last == "whitespace") {
|
87
|
+
stream.eatWhile(regs.validIdentifier);
|
88
|
+
return helpers.cont("attribute", "modifier");
|
89
|
+
} if (state.last == "property") {
|
90
|
+
stream.eatWhile(regs.validIdentifier);
|
91
|
+
return helpers.cont("property", null);
|
92
|
+
} else if (/\s/.test(ch)) {
|
93
|
+
last = "whitespace";
|
94
|
+
return null;
|
95
|
+
}
|
96
|
+
|
97
|
+
var str = "";
|
98
|
+
if (ch != "/") {
|
99
|
+
str += ch;
|
100
|
+
}
|
101
|
+
var c = null;
|
102
|
+
while (c = stream.eat(regs.validIdentifier)) {
|
103
|
+
str += c;
|
104
|
+
}
|
105
|
+
if (regs.unaryTags.test(str)) {
|
106
|
+
return helpers.cont("atom", "atom");
|
107
|
+
}
|
108
|
+
if (regs.tags.test(str)) {
|
109
|
+
return helpers.cont("keyword", "keyword");
|
110
|
+
}
|
111
|
+
if (/\s/.test(ch)) {
|
112
|
+
return null;
|
113
|
+
}
|
114
|
+
return helpers.cont("tag", "tag");
|
115
|
+
}
|
116
|
+
}
|
117
|
+
};
|
118
|
+
|
119
|
+
return {
|
120
|
+
startState: function() {
|
121
|
+
return {
|
122
|
+
tokenize: parsers.tokenizer,
|
123
|
+
mode: "bbcode",
|
124
|
+
last: null
|
125
|
+
};
|
126
|
+
},
|
127
|
+
token: function(stream, state) {
|
128
|
+
var style = state.tokenize(stream, state);
|
129
|
+
state.last = last;
|
130
|
+
return style;
|
131
|
+
},
|
132
|
+
electricChars: ""
|
133
|
+
};
|
134
|
+
});
|
135
|
+
|
136
|
+
CodeMirror.defineMIME("text/x-bbcode", "bbcode");
|
137
|
+
// vim: et ts=2 sts=2 sw=2
|
@@ -0,0 +1,73 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
|
3
|
+
<title>CodeMirror: BBCode mode</title>
|
4
|
+
<meta charset="utf-8"/>
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
8
|
+
<script src="../../lib/codemirror.js"></script>
|
9
|
+
<script src="bbcode.js"></script>
|
10
|
+
<div id=nav>
|
11
|
+
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
|
12
|
+
|
13
|
+
<ul>
|
14
|
+
<li><a href="../../index.html">Home</a>
|
15
|
+
<li><a href="../../doc/manual.html">Manual</a>
|
16
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
17
|
+
</ul>
|
18
|
+
<ul>
|
19
|
+
<li><a href="../index.html">Language modes</a>
|
20
|
+
<li><a class=active href="#">BBCode</a>
|
21
|
+
</ul>
|
22
|
+
</div>
|
23
|
+
|
24
|
+
<article>
|
25
|
+
<h2>BBCode mode</h2>
|
26
|
+
<form><textarea id="code" name="code">
|
27
|
+
[*] item [:-)]
|
28
|
+
Normal text [b]Bold text[/b] [i]italic[/i] [s]strikethrough[/s]
|
29
|
+
[hr]
|
30
|
+
|
31
|
+
[url]http://domain.com[/url]
|
32
|
+
[url=http://domain.com?a=1&b=2]Link[/url]
|
33
|
+
|
34
|
+
[img]http://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/Go-home.svg/100px-Go-home.svg.png[/img]
|
35
|
+
|
36
|
+
[quote]quoted text[/quote]
|
37
|
+
|
38
|
+
[code]monospaced text[/code]
|
39
|
+
|
40
|
+
[size=15]Large Text[/size]
|
41
|
+
|
42
|
+
[color=red]Red Text[/color]
|
43
|
+
or
|
44
|
+
[color=#FF0000]Red Text[/color]
|
45
|
+
or
|
46
|
+
[color=FF0000]Red Text[/color]
|
47
|
+
|
48
|
+
[list] [*]Entry 1 [*]Entry 2 [/list]
|
49
|
+
[list] *Entry 1 *Entry 2 [/list]
|
50
|
+
|
51
|
+
[table] [tr] [td]table data[/td] [/tr] [/table]
|
52
|
+
|
53
|
+
[code]Invalid 1[/b]
|
54
|
+
[unknown]Invalid 1[/unknown]
|
55
|
+
|
56
|
+
[brackets][opening[/brackets]
|
57
|
+
[brackets]closing][/brackets]
|
58
|
+
[brackets][unmatched][/brackets]
|
59
|
+
</textarea></form>
|
60
|
+
|
61
|
+
<script type="text/javascript">
|
62
|
+
var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("code"), {
|
63
|
+
mode : "bbcode",
|
64
|
+
tabSize : 2,
|
65
|
+
indentUnit : 2,
|
66
|
+
indentWithTabs : false,
|
67
|
+
lineNumbers : true
|
68
|
+
});
|
69
|
+
</script>
|
70
|
+
|
71
|
+
<p><strong>MIME types defined:</strong> <code>text/x-bbcode</code>.</p>
|
72
|
+
</article>
|
73
|
+
<!-- vim: set ts=2 sts=2 sw=2 et: -->
|
@@ -0,0 +1,161 @@
|
|
1
|
+
CodeMirror.defineMode("bbcodemixed", function(config) {
|
2
|
+
var settings, regs, helpers, parsers,
|
3
|
+
htmlMixedMode = CodeMirror.getMode(config, "htmlmixed"),
|
4
|
+
bbcodeMode = CodeMirror.getMode(config, "bbcode"),
|
5
|
+
|
6
|
+
settings = {
|
7
|
+
bbCodeLiteral: 'literal'
|
8
|
+
};
|
9
|
+
if (config.hasOwnProperty("bbCodeLiteral")) {
|
10
|
+
settings.bbCodeLiteral = config.bbCodeLiteral;
|
11
|
+
}
|
12
|
+
|
13
|
+
function escapeRegExp(s) {
|
14
|
+
return s.replace(/([\[\]\.\-\+\<\>\?\:\(\)\{\}])/g, '\\$1');
|
15
|
+
}
|
16
|
+
|
17
|
+
regs = {
|
18
|
+
hasLeftDelimeter: /.*\[/,
|
19
|
+
htmlHasLeftDelimeter: /[^\<\>]*\[/,
|
20
|
+
literalOpen: new RegExp(escapeRegExp("[" + settings.bbCodeLiteral + "]")),
|
21
|
+
literalClose: new RegExp(escapeRegExp("[/" + settings.bbCodeLiteral + "]"))
|
22
|
+
};
|
23
|
+
|
24
|
+
helpers = {
|
25
|
+
chain: function(stream, state, parser) {
|
26
|
+
state.tokenize = parser;
|
27
|
+
return parser(stream, state);
|
28
|
+
},
|
29
|
+
|
30
|
+
cleanChain: function(stream, state, parser) {
|
31
|
+
state.tokenize = null;
|
32
|
+
state.localState = null;
|
33
|
+
state.localMode = null;
|
34
|
+
return (typeof parser == "string") ? (parser ? parser : null) : parser(stream, state);
|
35
|
+
},
|
36
|
+
|
37
|
+
maybeBackup: function(stream, pat, style) {
|
38
|
+
pat = escapeRegExp(pat);
|
39
|
+
var cur = stream.current();
|
40
|
+
var close = cur.search(pat),
|
41
|
+
m;
|
42
|
+
if (close > - 1) stream.backUp(cur.length - close);
|
43
|
+
else if (m = cur.match(/<\/?$/)) {
|
44
|
+
stream.backUp(cur.length);
|
45
|
+
if (!stream.match(pat, false)) stream.match(cur[0]);
|
46
|
+
}
|
47
|
+
return style;
|
48
|
+
}
|
49
|
+
};
|
50
|
+
|
51
|
+
parsers = {
|
52
|
+
html: function(stream, state) {
|
53
|
+
if (!state.inLiteral && stream.match(regs.htmlHasLeftDelimeter, false) && state.htmlMixedState.htmlState.tagName === null) {
|
54
|
+
state.tokenize = parsers.bbcode;
|
55
|
+
state.localMode = bbcodeMode;
|
56
|
+
state.localState = bbcodeMode.startState(htmlMixedMode.indent(state.htmlMixedState, ""));
|
57
|
+
return helpers.maybeBackup(stream, "[", bbcodeMode.token(stream, state.localState));
|
58
|
+
} else if (!state.inLiteral && stream.match("[", false)) {
|
59
|
+
state.tokenize = parsers.bbcode;
|
60
|
+
state.localMode = bbcodeMode;
|
61
|
+
state.localState = bbcodeMode.startState(htmlMixedMode.indent(state.htmlMixedState, ""));
|
62
|
+
return helpers.maybeBackup(stream, "[", bbcodeMode.token(stream, state.localState));
|
63
|
+
}
|
64
|
+
return htmlMixedMode.token(stream, state.htmlMixedState);
|
65
|
+
},
|
66
|
+
|
67
|
+
bbcode: function(stream, state) {
|
68
|
+
if (stream.match("]", false)) {
|
69
|
+
stream.eat("]");
|
70
|
+
state.tokenize = parsers.html;
|
71
|
+
state.localMode = htmlMixedMode;
|
72
|
+
state.localState = state.htmlMixedState;
|
73
|
+
return "tag";
|
74
|
+
//return bbcodeMode.token(stream, state);
|
75
|
+
}
|
76
|
+
|
77
|
+
return helpers.maybeBackup(stream, "]", bbcodeMode.token(stream, state.localState));
|
78
|
+
},
|
79
|
+
|
80
|
+
inBlock: function(style, terminator) {
|
81
|
+
return function(stream, state) {
|
82
|
+
while (!stream.eol()) {
|
83
|
+
if (stream.match(terminator)) {
|
84
|
+
helpers.cleanChain(stream, state, "");
|
85
|
+
break;
|
86
|
+
}
|
87
|
+
stream.next();
|
88
|
+
}
|
89
|
+
return style;
|
90
|
+
};
|
91
|
+
}
|
92
|
+
};
|
93
|
+
|
94
|
+
return {
|
95
|
+
startState: function() {
|
96
|
+
var state = htmlMixedMode.startState();
|
97
|
+
return {
|
98
|
+
token: parsers.html,
|
99
|
+
localMode: null,
|
100
|
+
localState: null,
|
101
|
+
htmlMixedState: state,
|
102
|
+
tokenize: null,
|
103
|
+
inLiteral: false
|
104
|
+
};
|
105
|
+
},
|
106
|
+
|
107
|
+
copyState: function(state) {
|
108
|
+
var local = null, tok = (state.tokenize || state.token);
|
109
|
+
if (state.localState) {
|
110
|
+
local = CodeMirror.copyState((tok != parsers.html ? bbcodeMode : htmlMixedMode), state.localState);
|
111
|
+
}
|
112
|
+
return {
|
113
|
+
token: state.token,
|
114
|
+
tokenize: state.tokenize,
|
115
|
+
localMode: state.localMode,
|
116
|
+
localState: local,
|
117
|
+
htmlMixedState: CodeMirror.copyState(htmlMixedMode, state.htmlMixedState),
|
118
|
+
inLiteral: state.inLiteral
|
119
|
+
};
|
120
|
+
},
|
121
|
+
|
122
|
+
token: function(stream, state) {
|
123
|
+
if (stream.match("[", false)) {
|
124
|
+
if (!state.inLiteral && stream.match(regs.literalOpen, true)) {
|
125
|
+
state.inLiteral = true;
|
126
|
+
return "keyword";
|
127
|
+
} else if (state.inLiteral && stream.match(regs.literalClose, true)) {
|
128
|
+
state.inLiteral = false;
|
129
|
+
return "keyword";
|
130
|
+
}
|
131
|
+
}
|
132
|
+
if (state.inLiteral && state.localState != state.htmlMixedState) {
|
133
|
+
state.tokenize = parsers.html;
|
134
|
+
state.localMode = htmlMixedMode;
|
135
|
+
state.localState = state.htmlMixedState;
|
136
|
+
}
|
137
|
+
|
138
|
+
var style = (state.tokenize || state.token)(stream, state);
|
139
|
+
return style;
|
140
|
+
},
|
141
|
+
|
142
|
+
indent: function(state, textAfter) {
|
143
|
+
if (state.localMode == bbcodeMode
|
144
|
+
|| (state.inLiteral && !state.localMode)
|
145
|
+
|| regs.hasLeftDelimeter.test(textAfter)) {
|
146
|
+
return CodeMirror.Pass;
|
147
|
+
}
|
148
|
+
return htmlMixedMode.indent(state.htmlMixedState, textAfter);
|
149
|
+
},
|
150
|
+
|
151
|
+
innerMode: function(state) {
|
152
|
+
return {
|
153
|
+
state: state.localState || state.htmlMixedState,
|
154
|
+
mode: state.localMode || htmlMixedMode
|
155
|
+
};
|
156
|
+
}
|
157
|
+
};
|
158
|
+
}, "xml", "javascript", "css");
|
159
|
+
|
160
|
+
CodeMirror.defineMIME("text/x-bbcode", "bbcodemixed");
|
161
|
+
// vim: et ts=2 sts=2 sw=2
|
@@ -0,0 +1,128 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
|
3
|
+
<title>CodeMirror: BBCode mixed mode</title>
|
4
|
+
<meta charset="utf-8"/>
|
5
|
+
<link rel=stylesheet href="../../doc/docs.css">
|
6
|
+
|
7
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
8
|
+
<script src="../../lib/codemirror.js"></script>
|
9
|
+
<script src="../../mode/xml/xml.js"></script>
|
10
|
+
<script src="../../mode/javascript/javascript.js"></script>
|
11
|
+
<script src="../../mode/css/css.js"></script>
|
12
|
+
<script src="../../mode/htmlmixed/htmlmixed.js"></script>
|
13
|
+
<script src="../../mode/bbcode/bbcode.js"></script>
|
14
|
+
<script src="../../mode/bbcodemixed/bbcodemixed.js"></script>
|
15
|
+
<div id=nav>
|
16
|
+
<a href="http://codemirror.net"><img id=logo src="../../doc/logo.png"></a>
|
17
|
+
|
18
|
+
<ul>
|
19
|
+
<li><a href="../../index.html">Home</a>
|
20
|
+
<li><a href="../../doc/manual.html">Manual</a>
|
21
|
+
<li><a href="https://github.com/marijnh/codemirror">Code</a>
|
22
|
+
</ul>
|
23
|
+
<ul>
|
24
|
+
<li><a href="../index.html">Language modes</a>
|
25
|
+
<li><a class=active href="#">BBCode mixed</a>
|
26
|
+
</ul>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<article>
|
30
|
+
<h2>BBCode mixed mode</h2>
|
31
|
+
<form><textarea id="code" name="code">
|
32
|
+
[literal]
|
33
|
+
<script type="text/javascript">//<![CDATA[
|
34
|
+
|
35
|
+
var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("code"), {
|
36
|
+
mode : "bbcodemixed",
|
37
|
+
tabSize : 2,
|
38
|
+
indentUnit : 2,
|
39
|
+
indentWithTabs : false,
|
40
|
+
lineNumbers : true
|
41
|
+
});
|
42
|
+
// ]]>
|
43
|
+
</script>
|
44
|
+
[/literal]
|
45
|
+
<style>
|
46
|
+
/* CSS content
|
47
|
+
[b]bbcode[/b] */
|
48
|
+
.some-class { font-weight: bolder; color: "orange"; }
|
49
|
+
</style>
|
50
|
+
[*] item [:-)]
|
51
|
+
Normal text [b]Bold text[/b] [i]italic[/i] [s]strikethrough[/s]
|
52
|
+
[hr]
|
53
|
+
|
54
|
+
<strong>[url]http://domain.com[/url]</strong>
|
55
|
+
<div>
|
56
|
+
[url=http://domain.com?a=1&b=2]<span>Link</span>[/url]
|
57
|
+
</div>
|
58
|
+
|
59
|
+
[img]http://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/Go-home.svg/100px-Go-home.svg.png[/img]
|
60
|
+
|
61
|
+
[quote]quoted text[/quote]
|
62
|
+
|
63
|
+
[code]monospaced text[/code]
|
64
|
+
|
65
|
+
[size=15]Large Text[/size]
|
66
|
+
|
67
|
+
[color=red]Red Text[/color]
|
68
|
+
or
|
69
|
+
[color=#FF0000]Red Text[/color]
|
70
|
+
or
|
71
|
+
[color=FF0000]Red Text[/color]
|
72
|
+
|
73
|
+
[list] [*]Entry 1 [*]Entry 2 [/list]
|
74
|
+
[list] *Entry 1 *Entry 2 [/list]
|
75
|
+
|
76
|
+
[table] [tr] [td]table data[/td] [/tr] [/table]
|
77
|
+
|
78
|
+
<h2>this is H2 tag</h2>
|
79
|
+
<p>This is a part of one snippet</p>
|
80
|
+
<div id="homeBlocks" class="clearfix">
|
81
|
+
|
82
|
+
<div id="bioBlock" class="placed featured-image-wrapper brick">
|
83
|
+
<div class="caption">[home_content]</div>
|
84
|
+
</div>
|
85
|
+
[pageImage type="medium" link="url" show="99" form="home-images" xhtml="yes"]
|
86
|
+
|
87
|
+
</div>
|
88
|
+
[if_data]
|
89
|
+
<div class="contact-bar hidden-phone pull-right">
|
90
|
+
<!-- <span class="sitePhone"><b>CALL NOW: [sitePhone]</b></span> -->
|
91
|
+
%%[contactBar]%%
|
92
|
+
|
93
|
+
</div><!-- END contact-bar -->
|
94
|
+
[/if_data]
|
95
|
+
|
96
|
+
[if_data][contactBar][/if_data]
|
97
|
+
|
98
|
+
[if_data]soemthing here %%[contactBar]%% and after[/if_data]
|
99
|
+
|
100
|
+
[if_data]<div class="contact-bar hidden-phone pull-right"><!-- <span
|
101
|
+
class="sitePhone"><b>CALL NOW: [sitePhone]</b></span>
|
102
|
+
-->%%[contactBar]%%</div><!-- END contact-bar -->[/if_data]
|
103
|
+
|
104
|
+
[if_data]<img src="%%[logoPath]%%" alt="[siteTitle]"
|
105
|
+
/>[else_if_data][siteTitle][/if_data]
|
106
|
+
|
107
|
+
</textarea></form>
|
108
|
+
|
109
|
+
<script type="text/javascript">
|
110
|
+
var myCodeMirror = CodeMirror.fromTextArea(document.getElementById("code"), {
|
111
|
+
mode : "bbcodemixed",
|
112
|
+
tabSize : 2,
|
113
|
+
indentUnit : 2,
|
114
|
+
indentWithTabs : false,
|
115
|
+
lineNumbers : true,
|
116
|
+
matchBrackets : true
|
117
|
+
});
|
118
|
+
</script>
|
119
|
+
|
120
|
+
<p>The BBCodeMixed mixed mode depends on the BBCode and HTML mixed modes. HTML
|
121
|
+
mixed mode itself depends on XML, JavaScript, and CSS modes.</p>
|
122
|
+
|
123
|
+
<p>It takes the same options, as BBCode and HTML mixed modes.</p>
|
124
|
+
|
125
|
+
<p><strong>MIME types defined:</strong> <code>text/x-bbcode</code>.</p>
|
126
|
+
</article>
|
127
|
+
|
128
|
+
<!-- vim: set et ts=2 sts=2 sw=2: -->
|