From 735ffd12b9ef969f9c3e4baec85af8daea12cd56 Mon Sep 17 00:00:00 2001 From: oldj Date: Wed, 8 Apr 2020 16:49:54 +0800 Subject: [PATCH] update themes. --- app-ui/App.jsx | 7 +- app-ui/App.less | 10 +- app-ui/Panel/Buttons.less | 21 +- app-ui/Panel/List.less | 2 +- app-ui/Panel/ListItem.less | 26 +- app-ui/Panel/Menu.less | 37 +- app-ui/Panel/index.less | 21 +- app-ui/about/About.less | 2 +- app-ui/content/Content.less | 25 +- app-ui/content/Editor.jsx | 2 +- app-ui/content/Editor.less | 34 +- app-ui/content/SearchBar.less | 2 +- app-ui/frame/EditPrompt.less | 12 +- app-ui/frame/Group.less | 8 +- app-ui/frame/MyFrame.less | 6 +- app-ui/frame/PreferencesPrompt.less | 14 +- app-ui/styles/base.less | 121 + app-ui/styles/cfg.less | 50 +- app-ui/styles/main.less | 10 - app-ui/styles/themes/dark.less | 276 - app-ui/styles/themes/dark/colors.less | 67 + app-ui/styles/themes/dark/index.less | 3 + app-ui/styles/themes/light.less | 1 - app-ui/styles/themes/light/colors.less | 25 + app-ui/styles/themes/light/index.less | 2 + app/ui/app.css | 2 +- app/ui/app.js | 2 +- app/ui/index.html | 3 +- app/ui/theme-dark.css | 23874 +++++++++++++++++++++++ app/ui/{main.css => theme-light.css} | 166 +- app/version.js | 2 +- package.json | 2 +- scripts/less.sh | 7 + 33 files changed, 24322 insertions(+), 520 deletions(-) create mode 100644 app-ui/styles/base.less delete mode 100644 app-ui/styles/main.less delete mode 100644 app-ui/styles/themes/dark.less create mode 100644 app-ui/styles/themes/dark/colors.less create mode 100644 app-ui/styles/themes/dark/index.less delete mode 100644 app-ui/styles/themes/light.less create mode 100644 app-ui/styles/themes/light/colors.less create mode 100644 app-ui/styles/themes/light/index.less create mode 100644 app/ui/theme-dark.css rename app/ui/{main.css => theme-light.css} (99%) create mode 100755 scripts/less.sh diff --git a/app-ui/App.jsx b/app-ui/App.jsx index e85df7cb2..9756bb20a 100644 --- a/app-ui/App.jsx +++ b/app-ui/App.jsx @@ -40,8 +40,11 @@ export default class App extends React.Component { Agent.pact('getPref') .then(pref => { - this.setState({theme: pref.theme || 'light'}) - document.body.className += ' theme-' + pref.theme + let theme = pref.theme || 'light' + this.setState({theme}) + document.body.className += ' theme-' + theme + document.querySelector(`link[data-theme=${theme}]`).disabled = false + document.body.style.visibility = 'visible' return pref.user_language || 'en' }) diff --git a/app-ui/App.less b/app-ui/App.less index 73c444603..ee1b49af4 100644 --- a/app-ui/App.less +++ b/app-ui/App.less @@ -1,7 +1,5 @@ //@import "../node_modules/antd/dist/antd.less"; @import "styles/cfg"; -@import "./styles/themes/light"; -@import "./styles/themes/dark"; html, body { margin: 0; @@ -9,9 +7,13 @@ html, body { height: 100%; font-size: 12px; font-family: Arial, Helvetica, sans-serif; - color: @font_color; line-height: 20px; - background: #fff; + color: var(--swh-font-color); + background: var(--swh-bg-color); +} + +body { + visibility: hidden; } a { diff --git a/app-ui/Panel/Buttons.less b/app-ui/Panel/Buttons.less index 7289ca3d2..839dd8691 100644 --- a/app-ui/Panel/Buttons.less +++ b/app-ui/Panel/Buttons.less @@ -7,9 +7,9 @@ width: @panel-width - @m * 2; height: 30px; line-height: 30px; - background: @bg_left; + //background: @bg_left; margin: 0 @m; - border-top: 1px solid @bd_color * 1.1; + border-top: 1px solid var(--swh-border-color); -webkit-app-region: drag; } @@ -22,11 +22,11 @@ display: inline-block; text-align: center; width: 20px; - color: @font_color_left; + color: var(--swh-font-color); text-decoration: none; &:hover { - background: rgba(255, 255, 255, 0.1); + background: var(--swh-bg-color-hover); } } @@ -51,18 +51,7 @@ .icon-search { padding: 0 8px; &.on { - background: @bg_left_search; + background: var(--swh-bg-color-hover); } } } - -:global(.theme-dark) { - .root { - background: @bg_left_dark; - border-top-color: @bd_color_dark; - } - - .btn-add { - color: @font_color_left_dark; - } -} diff --git a/app-ui/Panel/List.less b/app-ui/Panel/List.less index eadb31ac1..54a854e1a 100644 --- a/app-ui/Panel/List.less +++ b/app-ui/Panel/List.less @@ -35,7 +35,7 @@ } .sort-bg { - background: @sorg-bg-color; + //background: @sorg-bg-color; } :global(.platform-darwin) { diff --git a/app-ui/Panel/ListItem.less b/app-ui/Panel/ListItem.less index 641cae373..a55870c13 100644 --- a/app-ui/Panel/ListItem.less +++ b/app-ui/Panel/ListItem.less @@ -22,7 +22,7 @@ display: block; width: 800px; height: 30px; - background: @bg_color_selected; + background: var(--swh-bg-color-selected); //opacity: 0.5; position: absolute; right: -5px; @@ -86,7 +86,7 @@ } .sort-bg { - background: @sorg-bg-color; + //background: @sorg-bg-color; } .sys-hosts { @@ -105,25 +105,3 @@ margin-top: 0; } } - -:global(.theme-dark) { - .list-item { - &.selected { - //background: @bg_left_dark * 1.1; - - span { - color: #fff; - } - - .item-icon { - color: #fff; - } - - &:hover { - .icon-edit { - color: #fff; - } - } - } - } -} diff --git a/app-ui/Panel/Menu.less b/app-ui/Panel/Menu.less index b0190b308..201468f1a 100644 --- a/app-ui/Panel/Menu.less +++ b/app-ui/Panel/Menu.less @@ -17,8 +17,8 @@ .items { min-height: 100px; - background: #fff; - border: 1px solid @bd_color; + background: var(--swh-bg-color); + border: 1px solid var(--swh-border-color); padding: 0 4px; } @@ -28,14 +28,14 @@ cursor: pointer; &:hover { - color: @font_color * 1.2; + color: var(--swh-font-color-hl); } } .sep { height: 1px; cursor: default; - background: @bd_color * 1.2; + background: var(--swh-border-color); } .item_icon { @@ -50,9 +50,9 @@ .handler { @w: @menu_handler_size + 6px; @h: @menu_handler_size - 4px; - background: #fff; - border: 1px solid @bd_color; - border-top-color: #fff; + background: var(--swh-bg-color); + border: 1px solid var(--swh-border-color); + border-top-color: var(--swh-bg-color); position: absolute; width: @w; height: @h; @@ -66,26 +66,3 @@ margin-left: 5px; } } - -:global(.theme-dark) { - .items, - .handler { - background-color: @editor_bg_dark; - border-color: @bd_color_dark; - color: @font_color_dark; - } - - .item { - &:hover { - color: @font_color_dark * 1.2; - } - } - - .sep { - background-color: @bd_color_dark * 0.8; - } - - .handler { - border-top-color: @editor_bg_dark; - } -} diff --git a/app-ui/Panel/index.less b/app-ui/Panel/index.less index 568131dd9..ef0307eb7 100644 --- a/app-ui/Panel/index.less +++ b/app-ui/Panel/index.less @@ -10,8 +10,8 @@ z-index: 10; //height: 100%; overflow: hidden; - background: @bg_left; - color: @font_color_left; + //background: @bg_left; + //color: @font_color_left; user-select: none; -webkit-app-region: drag; @@ -30,20 +30,3 @@ height: 36px; -webkit-app-region: drag; } - -:global(.theme-dark) { - .root { - background: @bg_left_dark; - color: @font_color_left_dark; - } - - :global { - .ant-tree { - color: @font_color_left_dark; - - li .ant-tree-node-content-wrapper { - color: @font_color_left_dark; - } - } - } -} diff --git a/app-ui/about/About.less b/app-ui/about/About.less index 51f012dd1..d39f75d73 100644 --- a/app-ui/about/About.less +++ b/app-ui/about/About.less @@ -40,7 +40,7 @@ } .version { - color: #999; + color: var(--swh-font-color-weak); margin-bottom: 5px; } diff --git a/app-ui/content/Content.less b/app-ui/content/Content.less index 775c3e77b..5c3326e2f 100644 --- a/app-ui/content/Content.less +++ b/app-ui/content/Content.less @@ -15,11 +15,11 @@ top: 5px; right: 10px; opacity: 0.5; - background: #fff; + background: var(--swh-bg-color); span[role=img] { display: none; - color: #666; + color: var(--swh-font-color-weak); margin-left: 5px; &.show { @@ -38,7 +38,7 @@ } .loading { - color: #f00; + color: var(--swh-font-color); padding: 10px; } @@ -51,7 +51,7 @@ right: 0; padding: 4px 40px; text-align: center; - background: rgba(153, 0, 0, 0.5); + background: var(--swh-editor-error); color: #fff; transition: 0.5s; @@ -65,7 +65,7 @@ left: @panel-width; right: 0; bottom: 0; - background-color: #fff; + background-color: var(--swh-bg-color); z-index: 10; } @@ -74,18 +74,3 @@ right: 20px; } } - -:global(.theme-dark) { - .inform { - background: @editor_bg_dark; - - span[role=img] { - color: #aaa; - } - } - - .search-bar-wrapper { - background-color: @editor_bg_dark * 1.1; - box-shadow: 0 -1px 0 0 rgba(255, 255, 255, 0.2); - } -} diff --git a/app-ui/content/Editor.jsx b/app-ui/content/Editor.jsx index b2daf2fb7..22b62d7e8 100644 --- a/app-ui/content/Editor.jsx +++ b/app-ui/content/Editor.jsx @@ -13,7 +13,7 @@ import classnames from 'classnames' import m_kw from './kw' import Agent from '../Agent' import * as func from '../libs/search' -import 'codemirror/lib/codemirror.css' +//import 'codemirror/lib/codemirror.css' import styles from './Editor.less' import modeHosts from './cm_hl' diff --git a/app-ui/content/Editor.less b/app-ui/content/Editor.less index 0a457f4cb..3d156fde2 100644 --- a/app-ui/content/Editor.less +++ b/app-ui/content/Editor.less @@ -5,13 +5,13 @@ box-sizing: border-box; font-family: @font-editor; padding: 4px 4px 4px 0; - background: @bg_left; + background: var(--swh-bg-color); font-size: 13px; line-height: 1.6em; & > :global(.CodeMirror) { border-radius: 4px; - border: 1px solid @bd_color * 1.1; + border: 1px solid var(--swh-border-color); z-index: 4; // 修复代码行数的背景与左下角圆角冲突的问题 :global { @@ -82,22 +82,22 @@ } .cm-s-default .cm-comment { - color: #090; + color: var(--swh-editor-comment); } .cm-s-default .cm-ip { - color: #00a; + color: var(--swh-editor-ip); font-weight: bold; } .cm-s-default .cm-hl { - background: #ff0; + background: var(--swh-editor-hl-bg); } .CodeMirror-gutters { border-right: none; padding-right: 6px; - background: #fafafa; + background: var(--swh-editor-gutter-bg); border-radius: 4px 0 0 4px; } @@ -107,25 +107,3 @@ } } - -:global(.theme-dark) { - .root { - background: @bg_left_dark; - - & > :global(.CodeMirror) { - border: 1px solid #444; - } - } - - .cm-s-default .cm-comment { - //color: #090; - } - - .cm-s-default .cm-ip { - color: #096dd9; - } - - .cm-s-default .cm-hl { - //background: #ff0; - } -} diff --git a/app-ui/content/SearchBar.less b/app-ui/content/SearchBar.less index 438824c85..1cfa16f01 100644 --- a/app-ui/content/SearchBar.less +++ b/app-ui/content/SearchBar.less @@ -1,6 +1,6 @@ .root { padding: 6px 10px; - box-shadow: 0 -2px 0 0 rgba(0, 0, 0, 0.05); + box-shadow: 0 -2px 0 0 var(--swh-shadow-color); } .btn_close { diff --git a/app-ui/frame/EditPrompt.less b/app-ui/frame/EditPrompt.less index f79f1934c..9dc0ab801 100644 --- a/app-ui/frame/EditPrompt.less +++ b/app-ui/frame/EditPrompt.less @@ -28,9 +28,9 @@ } .ln { - i.icon-refresh { + span.icon-refresh { display: inline-block; - color: #999; + color: var(--swh-font-color-weak); margin: 0 5px; cursor: pointer; width: 20px; @@ -41,7 +41,7 @@ vertical-align: middle; &:hover { - color: #333; + color: var(--swh-link-color-hover); } &.loading { @@ -56,11 +56,11 @@ .last-refresh { //padding-left: 1em; - color: #999; + color: var(--swh-font-color-weak); } a.del { - color: @color_danger; + color: var(--swh-danger-color); span { padding-left: 0.5em; @@ -70,7 +70,7 @@ .theme-dark { .frame .ln i.icon-refresh:hover { - color: @dark-hl; + color: var(--swh-font-color-hl); } } } diff --git a/app-ui/frame/Group.less b/app-ui/frame/Group.less index dad5075ba..100d607fc 100644 --- a/app-ui/frame/Group.less +++ b/app-ui/frame/Group.less @@ -30,11 +30,11 @@ .hosts-group-list { height: @h; overflow: auto; - border: solid 1px #ccc; + border: solid 1px var(--swh-border-color); border-radius: 2px; &:hover { - border-color: #49a9ee; + border-color: var(--swh-border-color-hover); } .hosts-item { @@ -43,12 +43,12 @@ line-height: 24px; &:hover { - background: #f5f5f5; + background: var(--swh-bg-color-hover); } span[role=img] { font-size: 12px; - color: #999; + color: var(--swh-font-color-weak); } & > span { diff --git a/app-ui/frame/MyFrame.less b/app-ui/frame/MyFrame.less index 0e97e81c1..d1f0b7da9 100644 --- a/app-ui/frame/MyFrame.less +++ b/app-ui/frame/MyFrame.less @@ -2,8 +2,6 @@ :global { .frame { - @bg: #f5f5f5; - @btn_default: #05a; @lh: 28px; text-align: center; white-space: nowrap; @@ -61,7 +59,7 @@ } .inform { - color: #aaa; + color: var(--swh-font-color-weak); line-height: 20px; margin-bottom: 5px; } @@ -89,7 +87,7 @@ .ant-modal { .prompt-body { .CodeMirror-scroll { - background: @ipt_bg_dark; + background: var(--swh-bg-color); } } } diff --git a/app-ui/frame/PreferencesPrompt.less b/app-ui/frame/PreferencesPrompt.less index 1d6301a3d..54b6725cd 100644 --- a/app-ui/frame/PreferencesPrompt.less +++ b/app-ui/frame/PreferencesPrompt.less @@ -6,13 +6,13 @@ float: right; margin-top: -61px; margin-right: 30px; - color: #999; + color: var(--swh-font-color); a { - color: #999; + color: var(--swh-font-color-weak); &:hover { - color: #000; + color: var(--swh-link-color-hover); } } @@ -23,14 +23,14 @@ float: right; width: 6px; height: 6px; - background: #f00; + background: var(--swh-danger-color); border-radius: 3px; } } } .pref-cm { - border: 1px solid #d9d9d9; + border: 1px solid var(--swh-border-color); width: 95%; box-sizing: border-box; @@ -38,10 +38,12 @@ height: 160px; line-height: 20px; font-family: @font-editor; + background: var(--swh-editor-bg-color); + color: var(--swh-font-color-weak); } .cm-s-default .cm-comment { - color: #090; + color: var(--swh-font-color-weak); } } } diff --git a/app-ui/styles/base.less b/app-ui/styles/base.less new file mode 100644 index 000000000..8d1dd3c76 --- /dev/null +++ b/app-ui/styles/base.less @@ -0,0 +1,121 @@ +@import "../../node_modules/antd/dist/antd.less"; +@import "../../node_modules/codemirror/lib/codemirror.css"; + + +body { + color: var(--swh-font-color); + caret-color: var(--swh-font-color); +} + +a { + color: var(--swh-link-color); + + &:hover { + color: var(--swh-link-color-hover); + } +} + +body { + .CodeMirror, + .CodeMirror-gutter-filler, + .CodeMirror-scrollbar-filler, + .CodeMirror-scroll, + .CodeMirror-gutters { + color: var(--swh-font-color); + background-color: var(--swh-editor-bg-color); + } + + .CodeMirror-linenumber { + color: var(--swh-font-color-weak); + } + + .CodeMirror-cursor { + border-color: var(--swh-font-color); + } + + .CodeMirror-line, + pre.CodeMirror-line { + color: var(--swh-font-color); + } + + .cm-ip { + color: var(--swh-editor-ip); + } + + .frame { + .current-version a:hover { + color: var(--swh-font-color-weak); + } + + .pref-cm { + border-color: var(--swh-border-color); + } + } + + .cm-s-default { + .cm-builtin { + color: var(--swh-editor-keyword); + } + + .cm-error { + color: var(--swh-editor-error); + } + } +} + +// for antd +@border-radius-base: 2px; +@border-radius-sm: 1px; +@font-size-base: 12px; + +@shadow-1-up: 0 -2px 0 var(--swh-shadow-color); +@shadow-1-down: 0 2px 0 var(--swh-shadow-color); +@shadow-1-left: -2px 0 0 var(--swh-shadow-color); +@shadow-1-right: 2px 0 0 var(--swh-shadow-color); +@shadow-2: 0 4px 0 var(--swh-shadow-color); + +@checkbox-check-bg: var(--swh-bg-color); +@input-placeholder-color: var(--swh-placeholder-color); + +.shadow { + box-shadow: 2px 2px 0 0 var(--swh-shadow-color); +} + +.ant-popover-inner, +.ant-message-notice-content, +.ant-select-dropdown, +.ant-notification-notice { + //border-radius: 0; + .shadow(); + border: 1px solid var(--swh-border-color); +} + +textarea.ant-input { + line-height: 1.5em; +} + +.ant-message { + top: 60px; +} + +.ant-tooltip .ant-tooltip-content { + a { + color: var(--swh-font-color-weak); + + &:hover { + color: var(--swh-bg-color); + } + } +} + +.ant-divider { + background: var(--swh-border-color); +} + +.ant-radio-button-wrapper-disabled.ant-radio-button-wrapper-checked { + background: var(--swh-bg-color-selected); +} + +.ant-modal-close:focus, .ant-modal-close:hover { + color: var(--swh-font-color-weak); +} diff --git a/app-ui/styles/cfg.less b/app-ui/styles/cfg.less index 0ca38b2fd..44fd65bbb 100644 --- a/app-ui/styles/cfg.less +++ b/app-ui/styles/cfg.less @@ -1,32 +1,32 @@ -@font_color: #212121; -@bg_prompt: #f5f5f5; -@bg_color_selected: rgba(0, 153, 255, 0.2); -//@color_hover: rgba(0, 153, 255, 0.2); -@color_on: #af9; -@color_danger: #c36; -@bg_left: #eef0f5; -@bg_left_search: @bg_left * 0.9; -@font_color_left: #333; -@color_off: @font_color_left; -@bd_color: @bg_left * 0.8; +//@font_color: #212121; +//@bg_prompt: #f5f5f5; +//@bg_color_selected: rgba(0, 153, 255, 0.2); +////@color_hover: rgba(0, 153, 255, 0.2); +//@color_on: #af9; +//@color_danger: #c36; +//@bg_left: #eef0f5; +//@bg_left_search: @bg_left * 0.9; +//@font_color_left: #333; +//@color_off: @font_color_left; +//@bd_color: @bg_left * 0.8; @left_width: 240px; @font-editor: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; @panel-width: 240px; -@sorg-bg-color: rgba(0, 128, 256, 0.2); - - -// dark theme -@editor_bg_dark: #282c33; -@bg_left_dark: #2f343f; -@bg_left_search_dark: @bg_left_dark * 1.1; -@font_color_dark: #999; -@font_color_left_dark: #979da7; -@ipt_bg_dark: #101010; -@bd_color_dark: #444; - -@dark-hl: #555; -@dark-blue: #4c8098; +//@sorg-bg-color: rgba(0, 128, 256, 0.2); +// +// +//// dark theme +//@editor_bg_dark: #282c33; +//@bg_left_dark: #2f343f; +//@bg_left_search_dark: @bg_left_dark * 1.1; +//@font_color_dark: #999; +//@font_color_left_dark: #979da7; +//@ipt_bg_dark: #101010; +//@bd_color_dark: #444; +// +//@dark-hl: #555; +//@dark-blue: #4c8098; @import "./scroll"; diff --git a/app-ui/styles/main.less b/app-ui/styles/main.less deleted file mode 100644 index 8c4737373..000000000 --- a/app-ui/styles/main.less +++ /dev/null @@ -1,10 +0,0 @@ -@import "../../node_modules/antd/dist/antd.less"; - -/** - * 这边可以覆盖 ant.design 的默认样式 - * 参考: https://github.com/ant-design/ant-design/blob/master/components/style/themes/default.less - */ -@border-radius-base: 2px; -@border-radius-sm: 1px; -@font-size-base: 12px; - diff --git a/app-ui/styles/themes/dark.less b/app-ui/styles/themes/dark.less deleted file mode 100644 index fb3955fd7..000000000 --- a/app-ui/styles/themes/dark.less +++ /dev/null @@ -1,276 +0,0 @@ -@import "../cfg"; - -:global { - .theme-dark { - color: #999; - - h1, h2, h3, h4, h5, h6 { - color: #999; - } - - a { - color: @dark-blue; - - &:hover { - color: @dark-blue * 1.5; - } - } - - .CodeMirror-gutter-filler, - .CodeMirror-scrollbar-filler, - .CodeMirror-scroll, - .CodeMirror-gutters { - background-color: @editor_bg_dark; - } - - .CodeMirror-linenumber { - color: #555; - } - - .CodeMirror-cursor { - border-color: #999; - } - - .CodeMirror-line, - pre.CodeMirror-line { - color: #aaa; - } - - .cm-ip { - color: #096dd9; - } - - .frame { - .current-version a:hover { - color: @font_color_dark * 1.5; - } - - .pref-cm { - border-color: @bd_color_dark; - } - } - - .cm-s-default { - .cm-builtin { - color: @dark-blue * 1.2; - } - - .cm-error { - color: #c36; - } - } - - #hosts-group { - .hosts-group-list { - border-color: @bd_color_dark; - - .hosts-item:hover { - background: @editor_bg_dark * 1.5; - } - } - } - - // antd - .ant-input { - background: @ipt_bg_dark; - color: @font_color_dark; - border-color: @bd_color_dark; - - &::placeholder { - color: #666; - } - } - - .ant-input-prefix { - span[role=img] { - color: @font_color_dark; - } - } - - .ant-btn { - background-color: @dark-hl; - border-color: @bd_color_dark; - color: @font_color_dark * 1.5; - - &:hover { - background-color: @dark-hl * 1.2; - border-color: @bd_color_dark; - color: @font_color_dark * 1.5; - } - } - - .ant-btn-primary { - background-color: @dark-blue; - border-color: @dark-blue * 0.8; - - &:hover { - background-color: @dark-blue * 1.2; - border-color: @dark-blue; - color: @font_color_dark * 1.5; - } - } - - .ant-btn[disabled] { - background-color: @dark-hl * 0.6; - color: @dark-hl* 0.8; - border-color: @bd_color_dark; - - &:hover { - border-color: @bd_color_dark; - background-color: @dark-hl * 0.8; - } - } - - .ant-tabs, - .ant-modal-confirm-body .ant-modal-confirm-title, - .ant-modal-confirm-body .ant-modal-confirm-content, - .ant-input-affix-wrapper .ant-input-prefix, - .ant-input-affix-wrapper .ant-input-suffix { - color: @font_color_dark; - } - - .ant-modal-header, - .ant-modal-content, - .ant-modal-footer { - background-color: @editor_bg_dark; - color: @font_color_dark; - border-color: @bd_color_dark; - } - - .ant-modal-content { - border: 1px solid @bd_color_dark; - } - - .ant-modal-title { - color: @font_color_dark; - - h3 { - color: @font_color_dark; - } - } - - .ant-modal-close, - .ant-notification-notice-close, - .ant-checkbox-wrapper { - color: @font_color_dark; - } - - .ant-modal-close:focus, .ant-modal-close:hover { - color: @font_color_dark * 1.5; - } - - .ant-tabs-nav { - .ant-tabs-tab-active { - color: @dark-blue; - } - } - - .ant-tabs { - .ant-tabs-left-bar { - border-right-color: @bd_color_dark; - } - - .ant-tabs-left-content { - border-left-color: @bd_color_dark; - } - } - - .ant-tabs-ink-bar { - background-color: @dark-blue; - } - - .ant-checkbox-inner { - border-color: @bd_color_dark; - background-color: @ipt_bg_dark; - } - - .ant-checkbox-checked .ant-checkbox-inner { - border-color: @dark-blue; - background-color: @dark-blue; - } - - .ant-input-number-handler-wrap, - .ant-input-number-input, - .ant-input-number, - .ant-select-selection, - .ant-select-dropdown { - background-color: @ipt_bg_dark; - border-color: @bd_color_dark; - color: @font_color_dark; - } - - .ant-select-dropdown-menu-item:hover { - background-color: @dark-hl; - } - - .ant-select-arrow, .ant-popover-arrow { - background-color: @ipt_bg_dark; - } - - .ant-select-arrow, - .ant-input-number-handler { - color: @font_color_dark; - } - - .ant-select-dropdown-menu-item-selected, - .ant-select-dropdown-menu-item-selected:hover { - background: @dark-hl; - color: @font_color_dark; - } - - .ant-input-number-handler-down-inner, - .ant-input-number-handler-up-inner, - .ant-select-dropdown-menu-item { - color: @font_color_dark; - } - - .ant-input-number-handler-down { - border-color: @bd_color_dark; - } - - .ant-radio-button-wrapper { - border-color: @bd_color_dark; - background: @ipt_bg_dark; - color: @font_color_dark; - - &:first-child { - border-left-color: @bd_color_dark; - } - } - - .ant-radio-button-wrapper-disabled, - .ant-radio-button-wrapper-disabled:hover, - .ant-radio-button-wrapper-disabled:first-child { - //opacity: 0.5; - border-color: @bd_color_dark * 0.618; - background: @ipt_bg_dark * 0.618; - color: @font_color_dark * 0.618; - } - - .ant-radio-button-wrapper-checked, - .ant-radio-button-wrapper-checked:hover, - .ant-radio-button-wrapper-checked:first-child { - box-shadow: -1px 0 0 0 @dark-blue; - border-color: @dark-blue; - background-color: @dark-hl; - color: @font_color_dark * 1.5; - - &.ant-radio-button-wrapper-disabled { - box-shadow: none; - border-color: @bd_color_dark * 1.2; - background: @ipt_bg_dark * 1.2; - color: @font_color_dark * 1.2; - } - } - - .ant-radio-button-wrapper-checked { - &.ant-radio-button-wrapper-disabled { - border-left: 1px solid (@bd_color_dark * 1.2); - } - } - - .ant-radio-button-wrapper:not(:first-child):before { - background-color: @bd_color_dark; - } - } -} diff --git a/app-ui/styles/themes/dark/colors.less b/app-ui/styles/themes/dark/colors.less new file mode 100644 index 000000000..146880639 --- /dev/null +++ b/app-ui/styles/themes/dark/colors.less @@ -0,0 +1,67 @@ +:root { + --swh-bg-color: #20252c; + --swh-bg-color-hover: #383E49; + --swh-bg-color-selected: #383E49; + --swh-font-color: #999; + --swh-font-color-weak: #aaa; + --swh-font-color-hl: #ccc; + --swh-link-color: #3f74ae; + --swh-link-color-hover: #4a89ce; + --swh-border-color: #424242; + --swh-border-color-hover: #676767; + --swh-shadow-color: rgba(0, 0, 0, 0.05); + --swh-danger-color: #ca4f4f; + --swh-placeholder-color: rgba(255, 255, 255, 0.2); + + --swh-editor-bg-color: #272c35; + --swh-editor-ip: #096dd9; + --swh-editor-keyword: #06427d; + --swh-editor-error: #c36; + --swh-editor-comment: #090; + --swh-editor-hl-bg: #ff0; + --swh-editor-gutter-bg: #282C34; +} + +@dark-blue: #244f9d; + +// for antd +@primary-color: #4f819d; // 全局主色 +@link-color: @dark-blue; // 链接色 +@success-color: #126415; // 成功色 +@warning-color: #874613; // 警告色 +@error-color: #972524; // 错误色 +@text-color: #adb1b5; // 主文本色 +@heading-color: @text-color; // 标题色 +@text-color-secondary: #595e65; // 次文本色 +@disabled-color: #5a5a5a; // 失效色 +@border-color-base: #38404a; // 边框色 +@box-shadow-base: 0 2px 8px rgba(0, 0, 0, 0.2); // 浮层阴影 + +@primary-1: @primary-color * 0.5; + +// Background color for `` +@body-background: #20252c; +// Base background color for most components +@component-background: @body-background; + +@background-color-light: #2C323C; // background of header and selected item +@background-color-base: #202020; // Default grey background color + +@border-color-split: @border-color-base; // split border inside a component +@border-color-inverse: #333; + +@slider-rail-background-color-hover: #383E49; + +//@item-active-bg: @primary-1; +@item-hover-bg: #383E49; + +@tooltip-color: #fff; +// Tooltip background color +@tooltip-bg: rgba(128, 128, 128, 0.85); + +@slider-rail-background-color: @background-color-base * 1.5; +@slider-rail-background-color-hover: @background-color-base * 2; +@slider-track-background-color: fade(@primary-color, 50%); +@slider-track-background-color-hover: @primary-color; +@slider-handle-color: fade(@primary-color, 50%); +@slider-handle-color-hover: @primary-color; diff --git a/app-ui/styles/themes/dark/index.less b/app-ui/styles/themes/dark/index.less new file mode 100644 index 000000000..a654a59c2 --- /dev/null +++ b/app-ui/styles/themes/dark/index.less @@ -0,0 +1,3 @@ +@import "../../base"; +@import "./colors"; + diff --git a/app-ui/styles/themes/light.less b/app-ui/styles/themes/light.less deleted file mode 100644 index 9a7e01fe9..000000000 --- a/app-ui/styles/themes/light.less +++ /dev/null @@ -1 +0,0 @@ -@import "../cfg"; diff --git a/app-ui/styles/themes/light/colors.less b/app-ui/styles/themes/light/colors.less new file mode 100644 index 000000000..8afb2ba33 --- /dev/null +++ b/app-ui/styles/themes/light/colors.less @@ -0,0 +1,25 @@ +:root { + --swh-bg-color: #EEF0F5; + --swh-bg-color-hover: #d7d8dd; + --swh-bg-color-selected: #CBDEF6; + --swh-font-color: #333; + --swh-font-color-weak: #999; + --swh-font-color-hl: #4090F7; + --swh-link-color: #4090F7; + --swh-link-color-hover: #77acff; + --swh-border-color: #ccc; + --swh-border-color-hover: #4090F7; + --swh-shadow-color: rgba(0, 0, 0, 0.05); + --swh-danger-color: #ee5555; + --swh-placeholder-color: rgba(0, 0, 0, 0.2); + + --swh-editor-bg-color: #fff; + --swh-editor-ip: #096dd9; + --swh-editor-keyword: #06427d; + --swh-editor-error: #c36; + --swh-editor-comment: #090; + --swh-editor-hl-bg: #ff0; + --swh-editor-gutter-bg: #f5f5f5; +} + +// for antd diff --git a/app-ui/styles/themes/light/index.less b/app-ui/styles/themes/light/index.less new file mode 100644 index 000000000..60f225a5f --- /dev/null +++ b/app-ui/styles/themes/light/index.less @@ -0,0 +1,2 @@ +@import "../../base"; +@import "./colors"; diff --git a/app/ui/app.css b/app/ui/app.css index c333ad8bf..ed4fdeb43 100644 --- a/app/ui/app.css +++ b/app/ui/app.css @@ -1 +1 @@ -.Panel__Menu__root{position:fixed;left:80px;bottom:0;z-index:100;width:160px;box-sizing:border-box;padding-bottom:24px;user-select:none;-webkit-app-region:no-drag}.Panel__Menu__items{min-height:100px;background:#fff;border:1px solid #bec0c4;padding:0 4px}.Panel__Menu__item{padding:4px 10px;line-height:2.2em;cursor:pointer}.Panel__Menu__item:hover{color:#282828}.Panel__Menu__sep{height:1px;cursor:default;background:#e4e6eb}.Panel__Menu__item_icon{display:inline-block;width:20px}.Panel__Menu__handler{background:#fff;border:1px solid #bec0c4;border-top-color:#fff;position:absolute;width:30px;height:20px;margin-top:-1px;margin-left:130px;line-height:20px;cursor:pointer}.Panel__Menu__handler span[role=img]{margin-left:5px}.theme-dark .Panel__Menu__handler,.theme-dark .Panel__Menu__items{background-color:#282c33;border-color:#444;color:#999}.theme-dark .Panel__Menu__item:hover{color:#b8b8b8}.theme-dark .Panel__Menu__sep{background-color:#363636}.theme-dark .Panel__Menu__handler{border-top-color:#282c33}.Panel__Buttons__root{position:fixed;bottom:0;width:224px;height:30px;line-height:30px;background:#eef0f5;margin:0 8px;border-top:1px solid #d1d3d8;-webkit-app-region:drag}.Panel__Buttons__left{float:left;padding-left:2px}.Panel__Buttons__btn-add{display:inline-block;text-align:center;width:20px;color:#333;text-decoration:none}.Panel__Buttons__btn-add:hover{background:hsla(0,0%,100%,.1)}.Panel__Buttons__right{float:right;padding-right:4px;height:30px}.Panel__Buttons__right span[role=img]{display:inline-block;margin-left:10px;cursor:pointer}.icon-switchoff{position:relative;top:-1px}.icon-search{padding:0 8px}.icon-search.on{background:#d6d8dd}.theme-dark .Panel__Buttons__root{background:#2f343f;border-top-color:#444}.theme-dark .Panel__Buttons__btn-add{color:#979da7}.Panel__ListItem__list-item{position:relative;cursor:pointer;-webkit-app-region:no-drag}.Panel__ListItem__list-item.Panel__ListItem__selected:before{content:"";display:block;width:800px;height:30px;background:rgba(0,153,255,.2);position:absolute;right:-5px;z-index:-1;margin-top:-4px}.Panel__ListItem__list-item.Panel__ListItem__selected:hover .Panel__ListItem__icon-edit{display:inline-block}.Panel__ListItem__item-icon{margin-left:-8px;margin-right:4px;width:1.5em}.Panel__ListItem__icon-edit{margin-right:.5em;font-size:1.5em;transform:scale(.7);cursor:pointer;vertical-align:baseline!important}.Panel__ListItem__switcher{cursor:pointer;font-size:2em}.Panel__ListItem__item-buttons{position:absolute;right:4px;margin-top:-1px}.Panel__ListItem__title{display:inline-block;width:130px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;vertical-align:middle}.Panel__ListItem__sort-bg{background:rgba(0,128,255,.2)}.Panel__ListItem__sys-hosts{margin-top:10px}.Panel__ListItem__sys-hosts .Panel__ListItem__item-icon{margin-left:21px}.Panel__ListItem__not-match{opacity:.5}.platform-darwin .Panel__ListItem__sys-hosts{margin-top:0}.theme-dark .Panel__ListItem__list-item.Panel__ListItem__selected .Panel__ListItem__item-icon,.theme-dark .Panel__ListItem__list-item.Panel__ListItem__selected:hover .Panel__ListItem__icon-edit,.theme-dark .Panel__ListItem__list-item.Panel__ListItem__selected span{color:#fff}.Panel__List__root{-webkit-app-region:no-drag;line-height:24px}.Panel__List__root .ant-tree{background:transparent}.Panel__List__root .ant-tree .ant-tree-treenode{padding:2px 0 0;height:30px}.Panel__List__root .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected,.Panel__List__root .ant-tree .ant-tree-node-content-wrapper:hover{background:transparent}.Panel__List__custom-items{position:fixed;width:240px;top:36px;bottom:30px;overflow:auto}.Panel__List__custom-items::-webkit-scrollbar{width:8px;height:0}.Panel__List__custom-items:hover::-webkit-scrollbar{position:absolute}.Panel__List__custom-items:hover::-webkit-scrollbar-corner,.Panel__List__custom-items:hover::-webkit-scrollbar-track{background:rgba(0,0,0,.05)}.Panel__List__custom-items:hover::-webkit-scrollbar-thumb{background:hsla(0,0%,50.2%,.5)}.Panel__List__sort-bg{background:rgba(0,128,255,.2)}.platform-darwin .Panel__List__custom-items{top:66px}.Panel__index__root{position:fixed;width:240px;top:0;left:0;bottom:0;z-index:10;overflow:hidden;background:#eef0f5;color:#333;user-select:none;-webkit-app-region:drag}.Panel__index__root .ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected,.Panel__index__root .ant-tree li .ant-tree-node-content-wrapper:hover{background:none}.Panel__index__mac_handler{height:36px;-webkit-app-region:drag}.theme-dark .Panel__index__root{background:#2f343f;color:#979da7}.theme-dark .ant-tree,.theme-dark .ant-tree li .ant-tree-node-content-wrapper{color:#979da7}.content__SearchBar__root{padding:6px 10px;box-shadow:0 -2px 0 0 rgba(0,0,0,.05)}.content__SearchBar__btn_close{margin-top:8px;cursor:pointer;float:right}.content__SearchBar__count_wrapper{line-height:28px;text-align:center}.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-gutter-filler,.CodeMirror-scrollbar-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid #000;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:rgba(20,255,20,.5)}.cm-animate-fat-cursor,.cm-fat-cursor-mark{-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-type,.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-invalidchar,.cm-s-default .cm-error{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:#fff}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-30px;margin-right:-30px;padding-bottom:30px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:30px solid transparent}.CodeMirror-gutter-filler,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-vscrollbar{position:absolute;z-index:6;display:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-30px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber,.CodeMirror-scroll,.CodeMirror-sizer{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.CodeMirror-focused div.CodeMirror-cursors,div.CodeMirror-dragcursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}.content__Editor__root{height:100%;box-sizing:border-box;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;padding:4px 4px 4px 0;background:#eef0f5;font-size:13px;line-height:1.6em}.content__Editor__root>.CodeMirror{border-radius:4px;border:1px solid #d1d3d8;z-index:4}.content__Editor__root>.CodeMirror .CodeMirror-scrollbar-filler{opacity:0}.content__Editor__root>.CodeMirror .CodeMirror-hscrollbar::-webkit-scrollbar,.content__Editor__root>.CodeMirror .CodeMirror-vscrollbar::-webkit-scrollbar{width:0;height:0}.content__Editor__root:hover .CodeMirror-vscrollbar>div{width:8px}.content__Editor__root:hover .CodeMirror-vscrollbar::-webkit-scrollbar{width:8px;height:0;position:absolute}.content__Editor__root:hover .CodeMirror-vscrollbar::-webkit-scrollbar-corner,.content__Editor__root:hover .CodeMirror-vscrollbar::-webkit-scrollbar-track{background:rgba(0,0,0,.05)}.content__Editor__root:hover .CodeMirror-vscrollbar::-webkit-scrollbar-thumb{background:hsla(0,0%,50.2%,.5)}.content__Editor__root:hover .CodeMirror-hscrollbar::-webkit-scrollbar{width:0;height:8px;position:absolute}.content__Editor__root:hover .CodeMirror-hscrollbar::-webkit-scrollbar-corner,.content__Editor__root:hover .CodeMirror-hscrollbar::-webkit-scrollbar-track{background:rgba(0,0,0,.05)}.content__Editor__root:hover .CodeMirror-hscrollbar::-webkit-scrollbar-thumb{background:hsla(0,0%,50.2%,.5)}.content__Editor__root.content__Editor__readonly .CodeMirror .CodeMirror-linenumber{cursor:default}.content__Editor__root.content__Editor__readonly .CodeMirror .CodeMirror-cursors{display:none}.content__Editor__root.content__Editor__show_search{padding-bottom:40px}.CodeMirror{font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace}.cm-s-default .cm-comment{color:#090}.cm-s-default .cm-ip{color:#00a;font-weight:700}.cm-s-default .cm-hl{background:#ff0}.CodeMirror-gutters{border-right:none;padding-right:6px;background:#fafafa;border-radius:4px 0 0 4px}.CodeMirror-linenumber{cursor:pointer;font-size:12px}.theme-dark .content__Editor__root{background:#2f343f}.theme-dark .content__Editor__root>.CodeMirror{border:1px solid #444}.theme-dark .content__Editor__cm-s-default .content__Editor__cm-ip{color:#096dd9}.content__Content__root{position:fixed;top:0;right:0;bottom:0;left:240px;height:100%}.content__Content__inform{position:absolute;z-index:100;top:5px;right:10px;opacity:.5;background:#fff}.content__Content__inform span[role=img]{display:none;color:#666;margin-left:5px}.content__Content__inform span[role=img].content__Content__show{display:inline-block}.content__Content__inform span{display:none}.content__Content__inform span.content__Content__show{display:inline-block}.content__Content__loading{color:red;padding:10px}.content__Content__errorMessage{display:none;position:absolute;z-index:101;top:0;left:0;right:0;padding:4px 40px;text-align:center;background:rgba(153,0,0,.5);color:#fff;transition:.5s}.content__Content__errorMessage.content__Content__show{display:block}.content__Content__search-bar-wrapper{position:fixed;left:240px;right:0;bottom:0;background-color:#fff;z-index:10}.platform-win32 .content__Content__inform{right:20px}.theme-dark .content__Content__inform{background:#282c33}.theme-dark .content__Content__inform span[role=img]{color:#aaa}.theme-dark .content__Content__search-bar-wrapper{background-color:#2c3038;box-shadow:0 -1px 0 0 hsla(0,0%,100%,.2)}.frame{text-align:center;white-space:nowrap}.frame:before{content:"";display:inline-block;height:100%;vertical-align:middle;width:0}.frame h3{font-size:14px;margin:0;padding:0}.frame .ant-modal{display:inline-block;vertical-align:middle;top:0;padding-bottom:0;text-align:left}.frame .ant-modal .prompt-body .ln{line-height:28px;padding:2px 0;margin-bottom:10px;white-space:normal}.frame .ant-modal .prompt-body .ln .title{float:left;width:100px;line-height:28px}.frame .ant-modal .prompt-body .ln .cnt{margin-left:100px;line-height:28px}.frame .ant-modal .prompt-body .ln .cnt input[type=text]{width:240px;outline:none;padding:4px 10px}.frame .ant-modal .prompt-body .ln .cnt textarea{font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace}.frame .ant-modal .prompt-body .ln .inform{color:#aaa;line-height:20px;margin-bottom:5px}.frame .ant-modal .prompt-body input[type=password]{letter-spacing:8px}.frame .ant-modal .prompt-body .ant-tabs-left-bar{min-width:120px}.frame.sudo-prompt .ant-modal{width:300px}.theme-dark .frame .ant-modal .prompt-body .CodeMirror-scroll{background:#101010}#hosts-group{position:relative;margin-top:20px;height:162px;overflow:auto}#hosts-group:after{content:"";clear:both}#hosts-group .arrow{position:absolute;top:50%;left:50%;width:20px;height:20px;line-height:20px;text-align:center;transform:translate(-50%,-50%)}#hosts-group .hosts-group-list{height:160px;overflow:auto;border:1px solid #ccc;border-radius:2px}#hosts-group .hosts-group-list:hover{border-color:#49a9ee}#hosts-group .hosts-group-list .hosts-item{cursor:move;padding:2px 6px;line-height:24px}#hosts-group .hosts-group-list .hosts-item:hover{background:#f5f5f5}#hosts-group .hosts-group-list .hosts-item span[role=img]{font-size:12px;color:#999}#hosts-group .hosts-group-list .hosts-item>span{padding-left:6px}#hosts-group-valid{width:45%;float:left}#hosts-group-current{width:45%;float:right}.frame__EditPrompt__tab{user-select:none;-webkit-app-region:no-drag}@keyframes frame__EditPrompt__loading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.frame .spiner{transform-origin:right center;animation:spin 1s;animation-iteration-count:1;-webkit-animation-iteration-count:1}.frame .ln i.icon-refresh{display:inline-block;color:#999;margin:0 5px;cursor:pointer;width:20px;height:20px;overflow:hidden;text-align:center;line-height:20px;vertical-align:middle}.frame .ln i.icon-refresh:hover{color:#333}.frame .ln i.icon-refresh.loading{animation:loading 1s linear infinite}.frame .ln i.icon-refresh.invisible{visibility:hidden}.frame .last-refresh{color:#999}.frame a.del{color:#c36}.frame a.del span{padding-left:.5em}.theme-dark .frame .ln i.icon-refresh:hover{color:#555}.about__About__logo{text-align:center;margin:10px 0}.about__About__logo img{width:64px;height:64px}.about__About__content{text-align:center;font-size:12px;white-space:normal}.about__About__content h2,.about__About__content h3{font-size:14px;margin:0;padding:0}.about__About__content h3{font-size:12px;line-height:30px}.about__About__content a{margin:0 5px;display:inline-block}.about__About__content a:first-child{margin-left:0}.about__About__content a:last-child{margin-right:0}.about__About__version{color:#999;margin-bottom:5px}.about__About__br{height:10px}.frame .current-version{float:right;margin-top:-61px;margin-right:30px;color:#999}.frame .current-version a{color:#999}.frame .current-version a:hover{color:#000}.frame .current-version.update-found:after{content:"";display:block;float:right;width:6px;height:6px;background:red;border-radius:3px}.frame .pref-cm{border:1px solid #d9d9d9;width:95%;box-sizing:border-box}.frame .pref-cm .CodeMirror{height:160px;line-height:20px;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace}.frame .pref-cm .cm-s-default .cm-comment{color:#090}.theme-dark,.theme-dark h1,.theme-dark h2,.theme-dark h3,.theme-dark h4,.theme-dark h5,.theme-dark h6{color:#999}.theme-dark a{color:#4c8098}.theme-dark a:hover{color:#72c0e4}.theme-dark .CodeMirror-gutter-filler,.theme-dark .CodeMirror-gutters,.theme-dark .CodeMirror-scroll,.theme-dark .CodeMirror-scrollbar-filler{background-color:#282c33}.theme-dark .CodeMirror-linenumber{color:#555}.theme-dark .CodeMirror-cursor{border-color:#999}.theme-dark .CodeMirror-line,.theme-dark pre.CodeMirror-line{color:#aaa}.theme-dark .cm-ip{color:#096dd9}.theme-dark .frame .current-version a:hover{color:#e6e6e6}.theme-dark .frame .pref-cm{border-color:#444}.theme-dark .cm-s-default .cm-builtin{color:#5b9ab6}.theme-dark .cm-s-default .cm-error{color:#c36}.theme-dark #hosts-group .hosts-group-list{border-color:#444}.theme-dark #hosts-group .hosts-group-list .hosts-item:hover{background:#3c424d}.theme-dark .ant-input{background:#101010;color:#999;border-color:#444}.theme-dark .ant-input::placeholder{color:#666}.theme-dark .ant-input-prefix span[role=img]{color:#999}.theme-dark .ant-btn{background-color:#555;border-color:#444;color:#e6e6e6}.theme-dark .ant-btn:hover{background-color:#666;border-color:#444;color:#e6e6e6}.theme-dark .ant-btn-primary{background-color:#4c8098;border-color:#3d667a}.theme-dark .ant-btn-primary:hover{background-color:#5b9ab6;border-color:#4c8098;color:#e6e6e6}.theme-dark .ant-btn[disabled]{background-color:#333;color:#444;border-color:#444}.theme-dark .ant-btn[disabled]:hover{border-color:#444;background-color:#444}.theme-dark .ant-input-affix-wrapper .ant-input-prefix,.theme-dark .ant-input-affix-wrapper .ant-input-suffix,.theme-dark .ant-modal-confirm-body .ant-modal-confirm-content,.theme-dark .ant-modal-confirm-body .ant-modal-confirm-title,.theme-dark .ant-tabs{color:#999}.theme-dark .ant-modal-content,.theme-dark .ant-modal-footer,.theme-dark .ant-modal-header{background-color:#282c33;color:#999;border-color:#444}.theme-dark .ant-modal-content{border:1px solid #444}.theme-dark .ant-checkbox-wrapper,.theme-dark .ant-modal-close,.theme-dark .ant-modal-title,.theme-dark .ant-modal-title h3,.theme-dark .ant-notification-notice-close{color:#999}.theme-dark .ant-modal-close:focus,.theme-dark .ant-modal-close:hover{color:#e6e6e6}.theme-dark .ant-tabs-nav .ant-tabs-tab-active{color:#4c8098}.theme-dark .ant-tabs .ant-tabs-left-bar{border-right-color:#444}.theme-dark .ant-tabs .ant-tabs-left-content{border-left-color:#444}.theme-dark .ant-tabs-ink-bar{background-color:#4c8098}.theme-dark .ant-checkbox-inner{border-color:#444;background-color:#101010}.theme-dark .ant-checkbox-checked .ant-checkbox-inner{border-color:#4c8098;background-color:#4c8098}.theme-dark .ant-input-number,.theme-dark .ant-input-number-handler-wrap,.theme-dark .ant-input-number-input,.theme-dark .ant-select-dropdown,.theme-dark .ant-select-selection{background-color:#101010;border-color:#444;color:#999}.theme-dark .ant-select-dropdown-menu-item:hover{background-color:#555}.theme-dark .ant-popover-arrow,.theme-dark .ant-select-arrow{background-color:#101010}.theme-dark .ant-input-number-handler,.theme-dark .ant-select-arrow{color:#999}.theme-dark .ant-select-dropdown-menu-item-selected,.theme-dark .ant-select-dropdown-menu-item-selected:hover{background:#555;color:#999}.theme-dark .ant-input-number-handler-down-inner,.theme-dark .ant-input-number-handler-up-inner,.theme-dark .ant-select-dropdown-menu-item{color:#999}.theme-dark .ant-input-number-handler-down{border-color:#444}.theme-dark .ant-radio-button-wrapper{border-color:#444;background:#101010;color:#999}.theme-dark .ant-radio-button-wrapper:first-child{border-left-color:#444}.theme-dark .ant-radio-button-wrapper-disabled,.theme-dark .ant-radio-button-wrapper-disabled:first-child,.theme-dark .ant-radio-button-wrapper-disabled:hover{border-color:#2a2a2a;background:#0a0a0a;color:#5f5f5f}.theme-dark .ant-radio-button-wrapper-checked,.theme-dark .ant-radio-button-wrapper-checked:first-child,.theme-dark .ant-radio-button-wrapper-checked:hover{box-shadow:-1px 0 0 0 #4c8098;border-color:#4c8098;background-color:#555;color:#e6e6e6}.theme-dark .ant-radio-button-wrapper-checked.ant-radio-button-wrapper-disabled,.theme-dark .ant-radio-button-wrapper-checked:first-child.ant-radio-button-wrapper-disabled,.theme-dark .ant-radio-button-wrapper-checked:hover.ant-radio-button-wrapper-disabled{box-shadow:none;border-color:#525252;background:#131313;color:#b8b8b8}.theme-dark .ant-radio-button-wrapper-checked.ant-radio-button-wrapper-disabled{border-left:1px solid #525252}.theme-dark .ant-radio-button-wrapper:not(:first-child):before{background-color:#444}body,html{margin:0;padding:0;height:100%;font-size:12px;font-family:Arial,Helvetica,sans-serif;color:#212121;line-height:20px;background:#fff}a{text-decoration:none}#app{height:100%}.hidden{display:none} \ No newline at end of file +.Panel__Menu__root{position:fixed;left:80px;bottom:0;z-index:100;width:160px;box-sizing:border-box;padding-bottom:24px;user-select:none;-webkit-app-region:no-drag}.Panel__Menu__items{min-height:100px;background:var(--swh-bg-color);border:1px solid var(--swh-border-color);padding:0 4px}.Panel__Menu__item{padding:4px 10px;line-height:2.2em;cursor:pointer}.Panel__Menu__item:hover{color:var(--swh-font-color-hl)}.Panel__Menu__sep{height:1px;cursor:default;background:var(--swh-border-color)}.Panel__Menu__item_icon{display:inline-block;width:20px}.Panel__Menu__handler{background:var(--swh-bg-color);border:1px solid var(--swh-border-color);border-top-color:var(--swh-bg-color);position:absolute;width:30px;height:20px;margin-top:-1px;margin-left:130px;line-height:20px;cursor:pointer}.Panel__Menu__handler span[role=img]{margin-left:5px}.Panel__Buttons__root{position:fixed;bottom:0;width:224px;height:30px;line-height:30px;margin:0 8px;border-top:1px solid var(--swh-border-color);-webkit-app-region:drag}.Panel__Buttons__left{float:left;padding-left:2px}.Panel__Buttons__btn-add{display:inline-block;text-align:center;width:20px;color:var(--swh-font-color);text-decoration:none}.Panel__Buttons__btn-add:hover{background:var(--swh-bg-color-hover)}.Panel__Buttons__right{float:right;padding-right:4px;height:30px}.Panel__Buttons__right span[role=img]{display:inline-block;margin-left:10px;cursor:pointer}.icon-switchoff{position:relative;top:-1px}.icon-search{padding:0 8px}.icon-search.on{background:var(--swh-bg-color-hover)}.Panel__ListItem__list-item{position:relative;cursor:pointer;-webkit-app-region:no-drag}.Panel__ListItem__list-item.Panel__ListItem__selected:before{content:"";display:block;width:800px;height:30px;background:var(--swh-bg-color-selected);position:absolute;right:-5px;z-index:-1;margin-top:-4px}.Panel__ListItem__list-item.Panel__ListItem__selected:hover .Panel__ListItem__icon-edit{display:inline-block}.Panel__ListItem__item-icon{margin-left:-8px;margin-right:4px;width:1.5em}.Panel__ListItem__icon-edit{margin-right:.5em;font-size:1.5em;transform:scale(.7);cursor:pointer;vertical-align:baseline!important}.Panel__ListItem__switcher{cursor:pointer;font-size:2em}.Panel__ListItem__item-buttons{position:absolute;right:4px;margin-top:-1px}.Panel__ListItem__title{display:inline-block;width:130px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;vertical-align:middle}.Panel__ListItem__sys-hosts{margin-top:10px}.Panel__ListItem__sys-hosts .Panel__ListItem__item-icon{margin-left:21px}.Panel__ListItem__not-match{opacity:.5}.platform-darwin .Panel__ListItem__sys-hosts{margin-top:0}.Panel__List__root{-webkit-app-region:no-drag;line-height:24px}.Panel__List__root .ant-tree{background:transparent}.Panel__List__root .ant-tree .ant-tree-treenode{padding:2px 0 0;height:30px}.Panel__List__root .ant-tree .ant-tree-node-content-wrapper.ant-tree-node-selected,.Panel__List__root .ant-tree .ant-tree-node-content-wrapper:hover{background:transparent}.Panel__List__custom-items{position:fixed;width:240px;top:36px;bottom:30px;overflow:auto}.Panel__List__custom-items::-webkit-scrollbar{width:8px;height:0}.Panel__List__custom-items:hover::-webkit-scrollbar{position:absolute}.Panel__List__custom-items:hover::-webkit-scrollbar-corner,.Panel__List__custom-items:hover::-webkit-scrollbar-track{background:rgba(0,0,0,.05)}.Panel__List__custom-items:hover::-webkit-scrollbar-thumb{background:hsla(0,0%,50.2%,.5)}.platform-darwin .Panel__List__custom-items{top:66px}.Panel__index__root{position:fixed;width:240px;top:0;left:0;bottom:0;z-index:10;overflow:hidden;user-select:none;-webkit-app-region:drag}.Panel__index__root .ant-tree li .ant-tree-node-content-wrapper.ant-tree-node-selected,.Panel__index__root .ant-tree li .ant-tree-node-content-wrapper:hover{background:none}.Panel__index__mac_handler{height:36px;-webkit-app-region:drag}.content__SearchBar__root{padding:6px 10px;box-shadow:0 -2px 0 0 var(--swh-shadow-color)}.content__SearchBar__btn_close{margin-top:8px;cursor:pointer;float:right}.content__SearchBar__count_wrapper{line-height:28px;text-align:center}.content__Editor__root{height:100%;box-sizing:border-box;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;padding:4px 4px 4px 0;background:var(--swh-bg-color);font-size:13px;line-height:1.6em}.content__Editor__root>.CodeMirror{border-radius:4px;border:1px solid var(--swh-border-color);z-index:4}.content__Editor__root>.CodeMirror .CodeMirror-scrollbar-filler{opacity:0}.content__Editor__root>.CodeMirror .CodeMirror-hscrollbar::-webkit-scrollbar,.content__Editor__root>.CodeMirror .CodeMirror-vscrollbar::-webkit-scrollbar{width:0;height:0}.content__Editor__root:hover .CodeMirror-vscrollbar>div{width:8px}.content__Editor__root:hover .CodeMirror-vscrollbar::-webkit-scrollbar{width:8px;height:0;position:absolute}.content__Editor__root:hover .CodeMirror-vscrollbar::-webkit-scrollbar-corner,.content__Editor__root:hover .CodeMirror-vscrollbar::-webkit-scrollbar-track{background:rgba(0,0,0,.05)}.content__Editor__root:hover .CodeMirror-vscrollbar::-webkit-scrollbar-thumb{background:hsla(0,0%,50.2%,.5)}.content__Editor__root:hover .CodeMirror-hscrollbar::-webkit-scrollbar{width:0;height:8px;position:absolute}.content__Editor__root:hover .CodeMirror-hscrollbar::-webkit-scrollbar-corner,.content__Editor__root:hover .CodeMirror-hscrollbar::-webkit-scrollbar-track{background:rgba(0,0,0,.05)}.content__Editor__root:hover .CodeMirror-hscrollbar::-webkit-scrollbar-thumb{background:hsla(0,0%,50.2%,.5)}.content__Editor__root.content__Editor__readonly .CodeMirror .CodeMirror-linenumber{cursor:default}.content__Editor__root.content__Editor__readonly .CodeMirror .CodeMirror-cursors{display:none}.content__Editor__root.content__Editor__show_search{padding-bottom:40px}.CodeMirror{font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace}.cm-s-default .cm-comment{color:var(--swh-editor-comment)}.cm-s-default .cm-ip{color:var(--swh-editor-ip);font-weight:700}.cm-s-default .cm-hl{background:var(--swh-editor-hl-bg)}.CodeMirror-gutters{border-right:none;padding-right:6px;background:var(--swh-editor-gutter-bg);border-radius:4px 0 0 4px}.CodeMirror-linenumber{cursor:pointer;font-size:12px}.content__Content__root{position:fixed;top:0;right:0;bottom:0;left:240px;height:100%}.content__Content__inform{position:absolute;z-index:100;top:5px;right:10px;opacity:.5;background:var(--swh-bg-color)}.content__Content__inform span[role=img]{display:none;color:var(--swh-font-color-weak);margin-left:5px}.content__Content__inform span[role=img].content__Content__show{display:inline-block}.content__Content__inform span{display:none}.content__Content__inform span.content__Content__show{display:inline-block}.content__Content__loading{color:var(--swh-font-color);padding:10px}.content__Content__errorMessage{display:none;position:absolute;z-index:101;top:0;left:0;right:0;padding:4px 40px;text-align:center;background:var(--swh-editor-error);color:#fff;transition:.5s}.content__Content__errorMessage.content__Content__show{display:block}.content__Content__search-bar-wrapper{position:fixed;left:240px;right:0;bottom:0;background-color:var(--swh-bg-color);z-index:10}.platform-win32 .content__Content__inform{right:20px}.frame{text-align:center;white-space:nowrap}.frame:before{content:"";display:inline-block;height:100%;vertical-align:middle;width:0}.frame h3{font-size:14px;margin:0;padding:0}.frame .ant-modal{display:inline-block;vertical-align:middle;top:0;padding-bottom:0;text-align:left}.frame .ant-modal .prompt-body .ln{line-height:28px;padding:2px 0;margin-bottom:10px;white-space:normal}.frame .ant-modal .prompt-body .ln .title{float:left;width:100px;line-height:28px}.frame .ant-modal .prompt-body .ln .cnt{margin-left:100px;line-height:28px}.frame .ant-modal .prompt-body .ln .cnt input[type=text]{width:240px;outline:none;padding:4px 10px}.frame .ant-modal .prompt-body .ln .cnt textarea{font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace}.frame .ant-modal .prompt-body .ln .inform{color:var(--swh-font-color-weak);line-height:20px;margin-bottom:5px}.frame .ant-modal .prompt-body input[type=password]{letter-spacing:8px}.frame .ant-modal .prompt-body .ant-tabs-left-bar{min-width:120px}.frame.sudo-prompt .ant-modal{width:300px}.theme-dark .frame .ant-modal .prompt-body .CodeMirror-scroll{background:var(--swh-bg-color)}#hosts-group{position:relative;margin-top:20px;height:162px;overflow:auto}#hosts-group:after{content:"";clear:both}#hosts-group .arrow{position:absolute;top:50%;left:50%;width:20px;height:20px;line-height:20px;text-align:center;transform:translate(-50%,-50%)}#hosts-group .hosts-group-list{height:160px;overflow:auto;border:1px solid var(--swh-border-color);border-radius:2px}#hosts-group .hosts-group-list:hover{border-color:var(--swh-border-color-hover)}#hosts-group .hosts-group-list .hosts-item{cursor:move;padding:2px 6px;line-height:24px}#hosts-group .hosts-group-list .hosts-item:hover{background:var(--swh-bg-color-hover)}#hosts-group .hosts-group-list .hosts-item span[role=img]{font-size:12px;color:var(--swh-font-color-weak)}#hosts-group .hosts-group-list .hosts-item>span{padding-left:6px}#hosts-group-valid{width:45%;float:left}#hosts-group-current{width:45%;float:right}.frame__EditPrompt__tab{user-select:none;-webkit-app-region:no-drag}@keyframes frame__EditPrompt__loading{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.frame .spiner{transform-origin:right center;animation:spin 1s;animation-iteration-count:1;-webkit-animation-iteration-count:1}.frame .ln span.icon-refresh{display:inline-block;color:var(--swh-font-color-weak);margin:0 5px;cursor:pointer;width:20px;height:20px;overflow:hidden;text-align:center;line-height:20px;vertical-align:middle}.frame .ln span.icon-refresh:hover{color:var(--swh-link-color-hover)}.frame .ln span.icon-refresh.loading{animation:loading 1s linear infinite}.frame .ln span.icon-refresh.invisible{visibility:hidden}.frame .last-refresh{color:var(--swh-font-color-weak)}.frame a.del{color:var(--swh-danger-color)}.frame a.del span{padding-left:.5em}.theme-dark .frame .ln i.icon-refresh:hover{color:var(--swh-font-color-hl)}.about__About__logo{text-align:center;margin:10px 0}.about__About__logo img{width:64px;height:64px}.about__About__content{text-align:center;font-size:12px;white-space:normal}.about__About__content h2,.about__About__content h3{font-size:14px;margin:0;padding:0}.about__About__content h3{font-size:12px;line-height:30px}.about__About__content a{margin:0 5px;display:inline-block}.about__About__content a:first-child{margin-left:0}.about__About__content a:last-child{margin-right:0}.about__About__version{color:var(--swh-font-color-weak);margin-bottom:5px}.about__About__br{height:10px}.frame .current-version{float:right;margin-top:-61px;margin-right:30px;color:var(--swh-font-color)}.frame .current-version a{color:var(--swh-font-color-weak)}.frame .current-version a:hover{color:var(--swh-link-color-hover)}.frame .current-version.update-found:after{content:"";display:block;float:right;width:6px;height:6px;background:var(--swh-danger-color);border-radius:3px}.frame .pref-cm{border:1px solid var(--swh-border-color);width:95%;box-sizing:border-box}.frame .pref-cm .CodeMirror{height:160px;line-height:20px;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;background:var(--swh-editor-bg-color)}.frame .pref-cm .cm-s-default .cm-comment,.frame .pref-cm .CodeMirror{color:var(--swh-font-color-weak)}body,html{margin:0;padding:0;height:100%;font-size:12px;font-family:Arial,Helvetica,sans-serif;line-height:20px;color:var(--swh-font-color);background:var(--swh-bg-color)}body{visibility:hidden}a{text-decoration:none}#app{height:100%}.hidden{display:none} \ No newline at end of file diff --git a/app/ui/app.js b/app/ui/app.js index 4efc49376..d908ce456 100644 --- a/app/ui/app.js +++ b/app/ui/app.js @@ -1,3 +1,3 @@ /*! For license information please see app.js.LICENSE.txt */ -!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=278)}([function(e,t,n){"use strict";e.exports=n(279)},function(e,t,n){"use strict";var r=n(0),o=n(3),i=n.n(o),a=n(91),c=n(71),l=n(20);function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}Object(c.b)("#1890ff");var d=r.forwardRef((function(e,t){var n,o,c,s=e.className,d=e.icon,p=e.spin,h=e.rotate,v=e.tabIndex,m=e.onClick,g=e.twoToneColor,y=f(e,["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"]),b=i()("anticon",(n={},o="anticon-".concat(d.name),c=Boolean(d.name),o in n?Object.defineProperty(n,o,{value:c,enumerable:!0,configurable:!0,writable:!0}):n[o]=c,n),s),w=i()({"anticon-spin":!!p||"loading"===d.name}),O=v;void 0===O&&m&&(O=-1);var x=h?{msTransform:"rotate(".concat(h,"deg)"),transform:"rotate(".concat(h,"deg)")}:void 0,S=u(Object(l.d)(g),2),_=S[0],C=S[1];return r.createElement("span",Object.assign({role:"img","aria-label":d.name},y,{ref:t,tabIndex:O,onClick:m,className:b}),r.createElement(a.a,{className:w,icon:d,primaryColor:_,secondaryColor:C,style:x}))}));d.displayName="AntdIcon",d.getTwoToneColor=c.a,d.setTwoToneColor=c.b,t.a=d},function(e,t,n){e.exports=n(322)()},function(e,t,n){var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e=[],t=0;t>>0;if(""+n!==t||4294967295===n)return NaN;t=n}return t<0?x(e)+t:t}function _(){return!0}function C(e,t,n){return(0===e||void 0!==n&&e<=-n)&&(void 0===t||void 0!==n&&t>=n)}function E(e,t){return z(e,t,0)}function M(e,t){return z(e,t,t)}function z(e,t,n){return void 0===e?n:e<0?Math.max(0,t+e):void 0===t?e:Math.min(t,e)}var T,k,j,P="function"==typeof Symbol&&Symbol.iterator,N=P||"@@iterator";function H(e){this.next=e}function F(e,t,n,r){var o=0===e?t:1===e?n:[t,n];return r?r.value=o:r={value:o,done:!1},r}function L(){return{value:void 0,done:!0}}function R(e){return!!D(e)}function V(e){return e&&"function"==typeof e.next}function A(e){var t=D(e);return t&&t.call(e)}function D(e){var t=e&&(P&&e[P]||e["@@iterator"]);if("function"==typeof t)return t}function B(e){return e&&"number"==typeof e.length}function I(e){return null==e?Q():a(e)?e.toSeq():function(e){var t=ee(e)||"object"==typeof e&&new G(e);if(!t)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+e);return t}(e)}function W(e){return null==e?Q().toKeyedSeq():a(e)?c(e)?e.toSeq():e.fromEntrySeq():Z(e)}function K(e){return null==e?Q():a(e)?c(e)?e.entrySeq():e.toIndexedSeq():J(e)}function U(e){return(null==e?Q():a(e)?c(e)?e.entrySeq():e:J(e)).toSetSeq()}function q(e){this._array=e,this.size=e.length}function G(e){var t=Object.keys(e);this._object=e,this._keys=t,this.size=t.length}function $(e){this._iterable=e,this.size=e.length||e.size}function Y(e){this._iterator=e,this._iteratorCache=[]}function X(e){return!(!e||!e["@@__IMMUTABLE_SEQ__@@"])}function Q(){return T||(T=new q([]))}function Z(e){var t=Array.isArray(e)?new q(e).fromEntrySeq():V(e)?new Y(e).fromEntrySeq():R(e)?new $(e).fromEntrySeq():"object"==typeof e?new G(e):void 0;if(!t)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+e);return t}function J(e){var t=ee(e);if(!t)throw new TypeError("Expected Array or iterable object of values: "+e);return t}function ee(e){return B(e)?new q(e):V(e)?new Y(e):R(e)?new $(e):void 0}function te(e,t,n,r){var o=e._cache;if(o){for(var i=o.length-1,a=0;a<=i;a++){var c=o[n?i-a:a];if(!1===t(c[1],r?c[0]:a,e))return a+1}return a}return e.__iterateUncached(t,n)}function ne(e,t,n,r){var o=e._cache;if(o){var i=o.length-1,a=0;return new H((function(){var e=o[n?i-a:a];return a++>i?{value:void 0,done:!0}:F(t,r?e[0]:a-1,e[1])}))}return e.__iteratorUncached(t,n)}function re(e,t){return t?function e(t,n,r,o){return Array.isArray(n)?t.call(o,r,K(n).map((function(r,o){return e(t,r,o,n)}))):ie(n)?t.call(o,r,W(n).map((function(r,o){return e(t,r,o,n)}))):n}(t,e,"",{"":e}):oe(e)}function oe(e){return Array.isArray(e)?K(e).map(oe).toList():ie(e)?W(e).map(oe).toMap():e}function ie(e){return e&&(e.constructor===Object||void 0===e.constructor)}function ae(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!("function"!=typeof e.equals||"function"!=typeof t.equals||!e.equals(t))}function ce(e,t){if(e===t)return!0;if(!a(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||c(e)!==c(t)||l(e)!==l(t)||s(e)!==s(t))return!1;if(0===e.size&&0===t.size)return!0;var n=!u(e);if(s(e)){var r=e.entries();return t.every((function(e,t){var o=r.next().value;return o&&ae(o[1],e)&&(n||ae(o[0],t))}))&&r.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var i=e;e=t,t=i}var f=!0,d=t.__iterate((function(t,r){if(n?!e.has(t):o?!ae(t,e.get(r,v)):!ae(e.get(r,v),t))return f=!1,!1}));return f&&e.size===d}function le(e,t){if(!(this instanceof le))return new le(e,t);if(this._value=e,this.size=void 0===t?1/0:Math.max(0,t),0===this.size){if(k)return k;k=this}}function ue(e,t){if(!e)throw new Error(t)}function se(e,t,n){if(!(this instanceof se))return new se(e,t,n);if(ue(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===t&&(t=1/0),n=void 0===n?1:Math.abs(n),tr?{value:void 0,done:!0}:F(e,o,n[t?r-o++:o++])}))},t(G,W),G.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},G.prototype.has=function(e){return this._object.hasOwnProperty(e)},G.prototype.__iterate=function(e,t){for(var n=this._object,r=this._keys,o=r.length-1,i=0;i<=o;i++){var a=r[t?o-i:i];if(!1===e(n[a],a,this))return i+1}return i},G.prototype.__iterator=function(e,t){var n=this._object,r=this._keys,o=r.length-1,i=0;return new H((function(){var a=r[t?o-i:i];return i++>o?{value:void 0,done:!0}:F(e,a,n[a])}))},G.prototype[h]=!0,t($,K),$.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var n=A(this._iterable),r=0;if(V(n))for(var o;!(o=n.next()).done&&!1!==e(o.value,r++,this););return r},$.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var n=A(this._iterable);if(!V(n))return new H(L);var r=0;return new H((function(){var t=n.next();return t.done?t:F(e,r++,t.value)}))},t(Y,K),Y.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);for(var n,r=this._iterator,o=this._iteratorCache,i=0;i=r.length){var t=n.next();if(t.done)return t;r[o]=t.value}return F(e,o,r[o++])}))},t(le,K),le.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},le.prototype.get=function(e,t){return this.has(e)?this._value:t},le.prototype.includes=function(e){return ae(this._value,e)},le.prototype.slice=function(e,t){var n=this.size;return C(e,t,n)?this:new le(this._value,M(t,n)-E(e,n))},le.prototype.reverse=function(){return this},le.prototype.indexOf=function(e){return ae(this._value,e)?0:-1},le.prototype.lastIndexOf=function(e){return ae(this._value,e)?this.size:-1},le.prototype.__iterate=function(e,t){for(var n=0;n1?" by "+this._step:"")+" ]"},se.prototype.get=function(e,t){return this.has(e)?this._start+S(this,e)*this._step:t},se.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t=0&&nn?{value:void 0,done:!0}:F(e,i++,a)}))},se.prototype.equals=function(e){return e instanceof se?this._start===e._start&&this._end===e._end&&this._step===e._step:ce(this,e)},t(fe,n),t(de,fe),t(pe,fe),t(he,fe),fe.Keyed=de,fe.Indexed=pe,fe.Set=he;var ve="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var n=65535&(e|=0),r=65535&(t|=0);return n*r+((e>>>16)*r+n*(t>>>16)<<16>>>0)|0};function me(e){return e>>>1&1073741824|3221225471&e}function ge(e){if(!1===e||null==e)return 0;if("function"==typeof e.valueOf&&(!1===(e=e.valueOf())||null==e))return 0;if(!0===e)return 1;var t=typeof e;if("number"===t){var n=0|e;for(n!==e&&(n^=4294967295*e);e>4294967295;)n^=e/=4294967295;return me(n)}if("string"===t)return e.length>Ce?function(e){var t=ze[e];return void 0===t&&(t=ye(e),Me===Ee&&(Me=0,ze={}),Me++,ze[e]=t),t}(e):ye(e);if("function"==typeof e.hashCode)return e.hashCode();if("object"===t)return function(e){var t;if(xe&&void 0!==(t=be.get(e)))return t;if(void 0!==(t=e[_e]))return t;if(!Oe){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[_e]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=++Se,1073741824&Se&&(Se=0),xe)be.set(e,t);else{if(void 0!==we&&!1===we(e))throw new Error("Non-extensible objects are not allowed as keys.");if(Oe)Object.defineProperty(e,_e,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[_e]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[_e]=t}}return t}(e);if("function"==typeof e.toString)return ye(e.toString());throw new Error("Value type "+t+" cannot be hashed.")}function ye(e){for(var t=0,n=0;n>>n),c=31&(0===n?r:r>>>n);return new Le(t,1<>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,e+=e>>8,127&(e+=e>>16)}function et(e,t,n,r){var o=r?e:O(e);return o[t]=n,o}He[Ne]=!0,He.delete=He.remove,He.removeIn=He.deleteIn,Fe.prototype.get=function(e,t,n,r){for(var o=this.entries,i=0,a=o.length;i=tt)return function(e,t,n,r){e||(e=new w);for(var o=new Ae(e,ge(n),[n,r]),i=0;i>>e)),i=this.bitmap;return 0==(i&o)?r:this.nodes[Je(i&o-1)].get(e+5,t,n,r)},Le.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=ge(r));var c=31&(0===t?n:n>>>t),l=1<=nt)return function(e,t,n,r,o){for(var i=0,a=new Array(32),c=0;0!==n;c++,n>>>=1)a[c]=1&n?t[i++]:void 0;return a[r]=o,new Re(e,i+1,a)}(e,d,u,c,h);if(s&&!h&&2===d.length&&Ge(d[1^f]))return d[1^f];if(s&&h&&1===d.length&&Ge(h))return h;var m=e&&e===this.ownerID,g=s?h?u:u^l:u|l,y=s?h?et(d,f,h,m):function(e,t,n){var r=e.length-1;if(n&&t===r)return e.pop(),e;for(var o=new Array(r),i=0,a=0;a>>e),i=this.nodes[o];return i?i.get(e+5,t,n,r):r},Re.prototype.update=function(e,t,n,r,o,i,a){void 0===n&&(n=ge(r));var c=31&(0===t?n:n>>>t),l=o===v,u=this.nodes,s=u[c];if(l&&!s)return this;var f=qe(s,e,t+5,n,r,o,i,a);if(f===s)return this;var d=this.count;if(s){if(!f&&--d0&&r<32?pt(0,r,5,null,new lt(n.toArray())):t.withMutations((function(e){e.setSize(r),n.forEach((function(t,n){return e.set(n,t)}))})))}function it(e){return!(!e||!e[at])}t(ot,pe),ot.of=function(){return this(arguments)},ot.prototype.toString=function(){return this.__toString("List [","]")},ot.prototype.get=function(e,t){if((e=S(this,e))>=0&&e=e.size||t<0)return e.withMutations((function(e){t<0?yt(e,t).set(0,n):yt(e,0,t+1).set(t,n)}));t+=e._origin;var r=e._tail,o=e._root,i=y(g);return t>=wt(e._capacity)?r=vt(r,e.__ownerID,0,t,n,i):o=vt(o,e.__ownerID,e._level,t,n,i),i.value?e.__ownerID?(e._root=o,e._tail=r,e.__hash=void 0,e.__altered=!0,e):pt(e._origin,e._capacity,e._level,o,r):e}(this,e,t)},ot.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},ot.prototype.insert=function(e,t){return this.splice(e,0,t)},ot.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=null,this.__hash=void 0,this.__altered=!0,this):ht()},ot.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations((function(n){yt(n,0,t+e.length);for(var r=0;r>>t&31;if(r>=this.array.length)return new lt([],e);var o,i=0===r;if(t>0){var a=this.array[r];if((o=a&&a.removeBefore(e,t-5,n))===a&&i)return this}if(i&&!o)return this;var c=mt(this,e);if(!i)for(var l=0;l>>t&31;if(o>=this.array.length)return this;if(t>0){var i=this.array[o];if((r=i&&i.removeAfter(e,t-5,n))===i&&o===this.array.length-1)return this}var a=mt(this,e);return a.array.splice(o+1),r&&(a.array[o]=r),a};var ut,st,ft={};function dt(e,t){var n=e._origin,r=e._capacity,o=wt(r),i=e._tail;return a(e._root,e._level,0);function a(e,c,l){return 0===c?function(e,a){var c=a===o?i&&i.array:e&&e.array,l=a>n?0:n-a,u=r-a;return u>32&&(u=32),function(){if(l===u)return ft;var e=t?--u:l++;return c&&c[e]}}(e,l):function(e,o,i){var c,l=e&&e.array,u=i>n?0:n-i>>o,s=1+(r-i>>o);return s>32&&(s=32),function(){for(;;){if(c){var e=c();if(e!==ft)return e;c=null}if(u===s)return ft;var n=t?--s:u++;c=a(l&&l[n],o-5,i+(n<>>n&31,l=e&&c0){var u=e&&e.array[c],s=vt(u,t,n-5,r,o,i);return s===u?e:((a=mt(e,t)).array[c]=s,a)}return l&&e.array[c]===o?e:(b(i),a=mt(e,t),void 0===o&&c===a.array.length-1?a.array.pop():a.array[c]=o,a)}function mt(e,t){return t&&e&&t===e.ownerID?e:new lt(e?e.array.slice():[],t)}function gt(e,t){if(t>=wt(e._capacity))return e._tail;if(t<1<0;)n=n.array[t>>>r&31],r-=5;return n}}function yt(e,t,n){void 0!==t&&(t|=0),void 0!==n&&(n|=0);var r=e.__ownerID||new w,o=e._origin,i=e._capacity,a=o+t,c=void 0===n?i:n<0?i+n:o+n;if(a===o&&c===i)return e;if(a>=c)return e.clear();for(var l=e._level,u=e._root,s=0;a+s<0;)u=new lt(u&&u.array.length?[void 0,u]:[],r),s+=1<<(l+=5);s&&(a+=s,o+=s,c+=s,i+=s);for(var f=wt(i),d=wt(c);d>=1<f?new lt([],r):p;if(p&&d>f&&a5;m-=5){var g=f>>>m&31;v=v.array[g]=mt(v.array[g],r)}v.array[f>>>5&31]=p}if(c=d)a-=d,c-=d,l=5,u=null,h=h&&h.removeBefore(r,0,a);else if(a>o||d>>l&31;if(y!==d>>>l&31)break;y&&(s+=(1<o&&(u=u.removeBefore(r,l,a-s)),u&&di&&(i=u.size),a(l)||(u=u.map((function(e){return re(e)}))),r.push(u)}return i>e.size&&(e=e.setSize(i)),Ze(e,t,r)}function wt(e){return e<32?0:e-1>>>5<<5}function Ot(e){return null==e?_t():xt(e)?e:_t().withMutations((function(t){var n=r(e);Te(n.size),n.forEach((function(e,n){return t.set(n,e)}))}))}function xt(e){return je(e)&&s(e)}function St(e,t,n,r){var o=Object.create(Ot.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=n,o.__hash=r,o}function _t(){return st||(st=St(Ke(),ht()))}function Ct(e,t,n){var r,o,i=e._map,a=e._list,c=i.get(t),l=void 0!==c;if(n===v){if(!l)return e;a.size>=32&&a.size>=2*i.size?(r=(o=a.filter((function(e,t){return void 0!==e&&c!==t}))).toKeyedSeq().map((function(e){return e[0]})).flip().toMap(),e.__ownerID&&(r.__ownerID=o.__ownerID=e.__ownerID)):(r=i.remove(t),o=c===a.size-1?a.pop():a.set(c,void 0))}else if(l){if(n===a.get(c)[1])return e;r=i,o=a.set(c,[t,n])}else r=i.set(t,a.size),o=a.set(a.size,[t,n]);return e.__ownerID?(e.size=r.size,e._map=r,e._list=o,e.__hash=void 0,e):St(r,o)}function Et(e,t){this._iter=e,this._useKeys=t,this.size=e.size}function Mt(e){this._iter=e,this.size=e.size}function zt(e){this._iter=e,this.size=e.size}function Tt(e){this._iter=e,this.size=e.size}function kt(e){var t=qt(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Gt,t.__iterateUncached=function(t,n){var r=this;return e.__iterate((function(e,n){return!1!==t(n,e,r)}),n)},t.__iteratorUncached=function(t,n){if(2===t){var r=e.__iterator(t,n);return new H((function(){var e=r.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e}))}return e.__iterator(1===t?0:1,n)},t}function jt(e,t,n){var r=qt(e);return r.size=e.size,r.has=function(t){return e.has(t)},r.get=function(r,o){var i=e.get(r,v);return i===v?o:t.call(n,i,r,e)},r.__iterateUncached=function(r,o){var i=this;return e.__iterate((function(e,o,a){return!1!==r(t.call(n,e,o,a),o,i)}),o)},r.__iteratorUncached=function(r,o){var i=e.__iterator(2,o);return new H((function(){var o=i.next();if(o.done)return o;var a=o.value,c=a[0];return F(r,c,t.call(n,a[1],c,e),o)}))},r}function Pt(e,t){var n=qt(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=kt(e);return t.reverse=function(){return e.flip()},t}),n.get=function(n,r){return e.get(t?n:-1-n,r)},n.has=function(n){return e.has(t?n:-1-n)},n.includes=function(t){return e.includes(t)},n.cacheResult=Gt,n.__iterate=function(t,n){var r=this;return e.__iterate((function(e,n){return t(e,n,r)}),!n)},n.__iterator=function(t,n){return e.__iterator(t,!n)},n}function Nt(e,t,n,r){var o=qt(e);return r&&(o.has=function(r){var o=e.get(r,v);return o!==v&&!!t.call(n,o,r,e)},o.get=function(r,o){var i=e.get(r,v);return i!==v&&t.call(n,i,r,e)?i:o}),o.__iterateUncached=function(o,i){var a=this,c=0;return e.__iterate((function(e,i,l){if(t.call(n,e,i,l))return c++,o(e,r?i:c-1,a)}),i),c},o.__iteratorUncached=function(o,i){var a=e.__iterator(2,i),c=0;return new H((function(){for(;;){var i=a.next();if(i.done)return i;var l=i.value,u=l[0],s=l[1];if(t.call(n,s,u,e))return F(o,r?u:c++,s,i)}}))},o}function Ht(e,t,n,r){var o=e.size;if(void 0!==t&&(t|=0),void 0!==n&&(n|=0),C(t,n,o))return e;var i=E(t,o),a=M(n,o);if(i!=i||a!=a)return Ht(e.toSeq().cacheResult(),t,n,r);var c,l=a-i;l==l&&(c=l<0?0:l);var u=qt(e);return u.size=0===c?c:e.size&&c||void 0,!r&&X(e)&&c>=0&&(u.get=function(t,n){return(t=S(this,t))>=0&&tc)return{value:void 0,done:!0};var e=o.next();return r||1===t?e:F(t,l-1,0===t?void 0:e.value[1],e)}))},u}function Ft(e,t,n,r){var o=qt(e);return o.__iterateUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterate(o,i);var c=!0,l=0;return e.__iterate((function(e,i,u){if(!c||!(c=t.call(n,e,i,u)))return l++,o(e,r?i:l-1,a)})),l},o.__iteratorUncached=function(o,i){var a=this;if(i)return this.cacheResult().__iterator(o,i);var c=e.__iterator(2,i),l=!0,u=0;return new H((function(){var e,i,s;do{if((e=c.next()).done)return r||1===o?e:F(o,u++,0===o?void 0:e.value[1],e);var f=e.value;i=f[0],s=f[1],l&&(l=t.call(n,s,i,a))}while(l);return 2===o?e:F(o,i,s,e)}))},o}function Lt(e,t){var n=c(e),o=[e].concat(t).map((function(e){return a(e)?n&&(e=r(e)):e=n?Z(e):J(Array.isArray(e)?e:[e]),e})).filter((function(e){return 0!==e.size}));if(0===o.length)return e;if(1===o.length){var i=o[0];if(i===e||n&&c(i)||l(e)&&l(i))return i}var u=new q(o);return n?u=u.toKeyedSeq():l(e)||(u=u.toSetSeq()),(u=u.flatten(!0)).size=o.reduce((function(e,t){if(void 0!==e){var n=t.size;if(void 0!==n)return e+n}}),0),u}function Rt(e,t,n){var r=qt(e);return r.__iterateUncached=function(r,o){var i=0,c=!1;return function e(l,u){var s=this;l.__iterate((function(o,l){return(!t||u0}function Bt(e,t,r){var o=qt(e);return o.size=new q(r).map((function(e){return e.size})).min(),o.__iterate=function(e,t){for(var n,r=this.__iterator(1,t),o=0;!(n=r.next()).done&&!1!==e(n.value,o++,this););return o},o.__iteratorUncached=function(e,o){var i=r.map((function(e){return e=n(e),A(o?e.reverse():e)})),a=0,c=!1;return new H((function(){var n;return c||(n=i.map((function(e){return e.next()})),c=n.some((function(e){return e.done}))),c?{value:void 0,done:!0}:F(e,a++,t.apply(null,n.map((function(e){return e.value}))))}))},o}function It(e,t){return X(e)?t:e.constructor(t)}function Wt(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function Kt(e){return Te(e.size),x(e)}function Ut(e){return c(e)?r:l(e)?o:i}function qt(e){return Object.create((c(e)?W:l(e)?K:U).prototype)}function Gt(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):I.prototype.cacheResult.call(this)}function $t(e,t){return e>t?1:e=0;n--)t={value:arguments[n],next:t};return this.__ownerID?(this.size=e,this._head=t,this.__hash=void 0,this.__altered=!0,this):On(e,t)},mn.prototype.pushAll=function(e){if(0===(e=o(e)).size)return this;Te(e.size);var t=this.size,n=this._head;return e.reverse().forEach((function(e){t++,n={value:e,next:n}})),this.__ownerID?(this.size=t,this._head=n,this.__hash=void 0,this.__altered=!0,this):On(t,n)},mn.prototype.pop=function(){return this.slice(1)},mn.prototype.unshift=function(){return this.push.apply(this,arguments)},mn.prototype.unshiftAll=function(e){return this.pushAll(e)},mn.prototype.shift=function(){return this.pop.apply(this,arguments)},mn.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):xn()},mn.prototype.slice=function(e,t){if(C(e,t,this.size))return this;var n=E(e,this.size);if(M(t,this.size)!==this.size)return pe.prototype.slice.call(this,e,t);for(var r=this.size-n,o=this._head;n--;)o=o.next;return this.__ownerID?(this.size=r,this._head=o,this.__hash=void 0,this.__altered=!0,this):On(r,o)},mn.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?On(this.size,this._head,e,this.__hash):(this.__ownerID=e,this.__altered=!1,this)},mn.prototype.__iterate=function(e,t){if(t)return this.reverse().__iterate(e);for(var n=0,r=this._head;r&&!1!==e(r.value,n++,this);)r=r.next;return n},mn.prototype.__iterator=function(e,t){if(t)return this.reverse().__iterator(e);var n=0,r=this._head;return new H((function(){if(r){var t=r.value;return r=r.next,F(e,n++,t)}return{value:void 0,done:!0}}))},mn.isStack=gn;var yn,bn="@@__IMMUTABLE_STACK__@@",wn=mn.prototype;function On(e,t,n,r){var o=Object.create(wn);return o.size=e,o._head=t,o.__ownerID=n,o.__hash=r,o.__altered=!1,o}function xn(){return yn||(yn=On(0))}function Sn(e,t){var n=function(n){e.prototype[n]=t[n]};return Object.keys(t).forEach(n),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(n),e}wn[bn]=!0,wn.withMutations=He.withMutations,wn.asMutable=He.asMutable,wn.asImmutable=He.asImmutable,wn.wasAltered=He.wasAltered,n.Iterator=H,Sn(n,{toArray:function(){Te(this.size);var e=new Array(this.size||0);return this.valueSeq().__iterate((function(t,n){e[n]=t})),e},toIndexedSeq:function(){return new Mt(this)},toJS:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJS?e.toJS():e})).__toJS()},toJSON:function(){return this.toSeq().map((function(e){return e&&"function"==typeof e.toJSON?e.toJSON():e})).__toJS()},toKeyedSeq:function(){return new Et(this,!0)},toMap:function(){return ke(this.toKeyedSeq())},toObject:function(){Te(this.size);var e={};return this.__iterate((function(t,n){e[n]=t})),e},toOrderedMap:function(){return Ot(this.toKeyedSeq())},toOrderedSet:function(){return sn(c(this)?this.valueSeq():this)},toSet:function(){return tn(c(this)?this.valueSeq():this)},toSetSeq:function(){return new zt(this)},toSeq:function(){return l(this)?this.toIndexedSeq():c(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return mn(c(this)?this.valueSeq():this)},toList:function(){return ot(c(this)?this.valueSeq():this)},toString:function(){return"[Iterable]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){var t=e.call(arguments,0);return It(this,Lt(this,t))},includes:function(e){return this.some((function(t){return ae(t,e)}))},entries:function(){return this.__iterator(2)},every:function(e,t){Te(this.size);var n=!0;return this.__iterate((function(r,o,i){if(!e.call(t,r,o,i))return n=!1,!1})),n},filter:function(e,t){return It(this,Nt(this,e,t,!0))},find:function(e,t,n){var r=this.findEntry(e,t);return r?r[1]:n},findEntry:function(e,t){var n;return this.__iterate((function(r,o,i){if(e.call(t,r,o,i))return n=[o,r],!1})),n},findLastEntry:function(e,t){return this.toSeq().reverse().findEntry(e,t)},forEach:function(e,t){return Te(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Te(this.size),e=void 0!==e?""+e:",";var t="",n=!0;return this.__iterate((function(r){n?n=!1:t+=e,t+=null!=r?r.toString():""})),t},keys:function(){return this.__iterator(0)},map:function(e,t){return It(this,jt(this,e,t))},reduce:function(e,t,n){var r,o;return Te(this.size),arguments.length<2?o=!0:r=t,this.__iterate((function(t,i,a){o?(o=!1,r=t):r=e.call(n,r,t,i,a)})),r},reduceRight:function(e,t,n){var r=this.toKeyedSeq().reverse();return r.reduce.apply(r,arguments)},reverse:function(){return It(this,Pt(this,!0))},slice:function(e,t){return It(this,Ht(this,e,t,!0))},some:function(e,t){return!this.every(zn(e),t)},sort:function(e){return It(this,Vt(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some((function(){return!0}))},count:function(e,t){return x(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,n){var r=ke().asMutable();return e.__iterate((function(o,i){r.update(t.call(n,o,i,e),0,(function(e){return e+1}))})),r.asImmutable()}(this,e,t)},equals:function(e){return ce(this,e)},entrySeq:function(){var e=this;if(e._cache)return new q(e._cache);var t=e.toSeq().map(Mn).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(zn(e),t)},findLast:function(e,t,n){return this.toKeyedSeq().reverse().find(e,t,n)},first:function(){return this.find(_)},flatMap:function(e,t){return It(this,function(e,t,n){var r=Ut(e);return e.toSeq().map((function(o,i){return r(t.call(n,o,i,e))})).flatten(!0)}(this,e,t))},flatten:function(e){return It(this,Rt(this,e,!0))},fromEntrySeq:function(){return new Tt(this)},get:function(e,t){return this.find((function(t,n){return ae(n,e)}),void 0,t)},getIn:function(e,t){for(var n,r=this,o=Yt(e);!(n=o.next()).done;){var i=n.value;if((r=r&&r.get?r.get(i,v):v)===v)return t}return r},groupBy:function(e,t){return function(e,t,n){var r=c(e),o=(s(e)?Ot():ke()).asMutable();e.__iterate((function(i,a){o.update(t.call(n,i,a,e),(function(e){return(e=e||[]).push(r?[a,i]:i),e}))}));var i=Ut(e);return o.map((function(t){return It(e,i(t))}))}(this,e,t)},has:function(e){return this.get(e,v)!==v},hasIn:function(e){return this.getIn(e,v)!==v},isSubset:function(e){return e="function"==typeof e.includes?e:n(e),this.every((function(t){return e.includes(t)}))},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:n(e)).isSubset(this)},keySeq:function(){return this.toSeq().map(En).toIndexedSeq()},last:function(){return this.toSeq().reverse().first()},max:function(e){return At(this,e)},maxBy:function(e,t){return At(this,t,e)},min:function(e){return At(this,e?Tn(e):Pn)},minBy:function(e,t){return At(this,t?Tn(t):Pn,e)},rest:function(){return this.slice(1)},skip:function(e){return this.slice(Math.max(0,e))},skipLast:function(e){return It(this,this.toSeq().reverse().skip(e).reverse())},skipWhile:function(e,t){return It(this,Ft(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(zn(e),t)},sortBy:function(e,t){return It(this,Vt(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return It(this,this.toSeq().reverse().take(e).reverse())},takeWhile:function(e,t){return It(this,function(e,t,n){var r=qt(e);return r.__iterateUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterate(r,o);var a=0;return e.__iterate((function(e,o,c){return t.call(n,e,o,c)&&++a&&r(e,o,i)})),a},r.__iteratorUncached=function(r,o){var i=this;if(o)return this.cacheResult().__iterator(r,o);var a=e.__iterator(2,o),c=!0;return new H((function(){if(!c)return{value:void 0,done:!0};var e=a.next();if(e.done)return e;var o=e.value,l=o[0],u=o[1];return t.call(n,u,l,i)?2===r?e:F(r,l,u,e):(c=!1,{value:void 0,done:!0})}))},r}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(zn(e),t)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=s(e),n=c(e),r=t?1:0;return function(e,t){return t=ve(t,3432918353),t=ve(t<<15|t>>>-15,461845907),t=ve(t<<13|t>>>-13,5),t=ve((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=me((t=ve(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(n?t?function(e,t){r=31*r+Nn(ge(e),ge(t))|0}:function(e,t){r=r+Nn(ge(e),ge(t))|0}:t?function(e){r=31*r+ge(e)|0}:function(e){r=r+ge(e)|0}),r)}(this))}});var _n=n.prototype;_n[f]=!0,_n[N]=_n.values,_n.__toJS=_n.toArray,_n.__toStringMapper=kn,_n.inspect=_n.toSource=function(){return this.toString()},_n.chain=_n.flatMap,_n.contains=_n.includes,function(){try{Object.defineProperty(_n,"length",{get:function(){if(!n.noLengthWarning){var e;try{throw new Error}catch(t){e=t.stack}if(-1===e.indexOf("_wrapObject"))return console&&console.warn&&console.warn("iterable.length has been deprecated, use iterable.size or iterable.count(). This warning will become a silent error in a future version. "+e),this.size}}})}catch(e){}}(),Sn(r,{flip:function(){return It(this,kt(this))},findKey:function(e,t){var n=this.findEntry(e,t);return n&&n[0]},findLastKey:function(e,t){return this.toSeq().reverse().findKey(e,t)},keyOf:function(e){return this.findKey((function(t){return ae(t,e)}))},lastKeyOf:function(e){return this.findLastKey((function(t){return ae(t,e)}))},mapEntries:function(e,t){var n=this,r=0;return It(this,this.toSeq().map((function(o,i){return e.call(t,[i,o],r++,n)})).fromEntrySeq())},mapKeys:function(e,t){var n=this;return It(this,this.toSeq().flip().map((function(r,o){return e.call(t,r,o,n)})).flip())}});var Cn=r.prototype;function En(e,t){return t}function Mn(e,t){return[t,e]}function zn(e){return function(){return!e.apply(this,arguments)}}function Tn(e){return function(){return-e.apply(this,arguments)}}function kn(e){return"string"==typeof e?JSON.stringify(e):e}function jn(){return O(arguments)}function Pn(e,t){return et?-1:0}function Nn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}return Cn[d]=!0,Cn[N]=_n.entries,Cn.__toJS=_n.toObject,Cn.__toStringMapper=function(e,t){return JSON.stringify(t)+": "+kn(e)},Sn(o,{toKeyedSeq:function(){return new Et(this,!1)},filter:function(e,t){return It(this,Nt(this,e,t,!1))},findIndex:function(e,t){var n=this.findEntry(e,t);return n?n[0]:-1},indexOf:function(e){var t=this.toKeyedSeq().keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.toKeyedSeq().reverse().keyOf(e);return void 0===t?-1:t},reverse:function(){return It(this,Pt(this,!1))},slice:function(e,t){return It(this,Ht(this,e,t,!1))},splice:function(e,t){var n=arguments.length;if(t=Math.max(0|t,0),0===n||2===n&&!t)return this;e=E(e,e<0?this.count():this.size);var r=this.slice(0,e);return It(this,1===n?r:r.concat(O(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var n=this.toKeyedSeq().findLastKey(e,t);return void 0===n?-1:n},first:function(){return this.get(0)},flatten:function(e){return It(this,Rt(this,e,!1))},get:function(e,t){return(e=S(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find((function(t,n){return n===e}),void 0,t)},has:function(e){return(e=S(this,e))>=0&&(void 0!==this.size?this.size===1/0||e0&&"function"==typeof t[t.length-1]&&(n=t.pop()),"function"==typeof n&&r.once(o,(e,t)=>n.apply(null,t)),r.send("x",{action:e,data:t,callback:o})}r.on("y",(e,t)=>{i.emit(t.event,...t.data||[])}),e.exports={IS_DEV:n,platform:o,act:c,pact:function(e,...t){return new Promise((n,r)=>{t.push((e,t)=>e?r(e):n(t)),c(e,...t)})},on:(...e)=>i.on(...e),emit:(...e)=>i.emit(...e)}},function(e,t,n){"use strict";var r=n(21)||function(e){for(var t=1;t0)return o.getInlineStyleAt(r-1);if(o.getLength())return o.getInlineStyleAt(0);return m(e,n)}(t,n):function(e,t){var n=t.getStartKey(),r=t.getStartOffset(),o=e.getBlockForKey(n);if(r0)return o.getInlineStyleAt(r-1);return m(e,n)}(t,n)},e.prototype.getBlockTree=function(e){return this.getImmutable().getIn(["treeMap",e])},e.prototype.isSelectionAtStartOfContent=function(){var e=this.getCurrentContent().getBlockMap().first().getKey();return this.getSelection().hasEdgeWithin(e,0,0)},e.prototype.isSelectionAtEndOfContent=function(){var e=this.getCurrentContent().getBlockMap().last(),t=e.getLength();return this.getSelection().hasEdgeWithin(e.getKey(),t,t)},e.prototype.getDirectionMap=function(){return this.getImmutable().get("directionMap")},e.acceptSelection=function(e,t){return h(e,t,!1)},e.forceSelection=function(e,t){return t.getHasFocus()||(t=t.set("hasFocus",!0)),h(e,t,!0)},e.moveSelectionToEnd=function(t){var n=t.getCurrentContent().getLastBlock(),r=n.getKey(),o=n.getLength();return e.acceptSelection(t,new l({anchorKey:r,anchorOffset:o,focusKey:r,focusOffset:o,isBackward:!1}))},e.moveFocusToEnd=function(t){var n=e.moveSelectionToEnd(t);return e.forceSelection(n,n.getSelection())},e.push=function(t,n,r){if(t.getCurrentContent()===n)return t;var o="insert-characters"!==r,i=a.getDirectionMap(n,t.getDirectionMap());if(!t.getAllowUndo())return e.set(t,{currentContent:n,directionMap:i,lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:null});var c=t.getSelection(),l=t.getCurrentContent(),u=t.getUndoStack(),s=n;c!==l.getSelectionAfter()||function(e,t){var n=e.getLastChangeType();return t!==n||"insert-characters"!==t&&"backspace-character"!==t&&"delete-character"!==t}(t,r)?(u=u.push(l),s=s.set("selectionBefore",c)):"insert-characters"!==r&&"backspace-character"!==r&&"delete-character"!==r||(s=s.set("selectionBefore",l.getSelectionBefore()));var d=t.getInlineStyleOverride();-1===["adjust-depth","change-block-type","split-block"].indexOf(r)&&(d=null);var p={currentContent:s,directionMap:i,undoStack:u,redoStack:f(),lastChangeType:r,selection:n.getSelectionAfter(),forceSelection:o,inlineStyleOverride:d};return e.set(t,p)},e.undo=function(t){if(!t.getAllowUndo())return t;var n=t.getUndoStack(),r=n.peek();if(!r)return t;var o=t.getCurrentContent(),i=a.getDirectionMap(r,t.getDirectionMap());return e.set(t,{currentContent:r,directionMap:i,undoStack:n.shift(),redoStack:t.getRedoStack().push(o),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"undo",nativelyRenderedContent:null,selection:o.getSelectionBefore()})},e.redo=function(t){if(!t.getAllowUndo())return t;var n=t.getRedoStack(),r=n.peek();if(!r)return t;var o=t.getCurrentContent(),i=a.getDirectionMap(r,t.getDirectionMap());return e.set(t,{currentContent:r,directionMap:i,undoStack:t.getUndoStack().push(o),redoStack:n.shift(),forceSelection:!0,inlineStyleOverride:null,lastChangeType:"redo",nativelyRenderedContent:null,selection:r.getSelectionAfter()})},e.prototype.getImmutable=function(){return this._immutable},e}();function h(e,t,n){return p.set(e,{selection:t,forceSelection:n,nativelyRenderedContent:null,inlineStyleOverride:null})}function v(e,t){return e.getBlockMap().map((function(n){return o.generate(e,n,t)})).toOrderedMap()}function m(e,t){var n=e.getBlockMap().reverse().skipUntil((function(e,n){return n===t})).skip(1).skipUntil((function(e,t){return e.getLength()})).first();return n?n.getInlineStyleAt(n.getLength()-1):u()}e.exports=p},function(e,t,n){"use strict";var r={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(e){var t=e.keyCode;if(e.altKey&&!e.ctrlKey||e.metaKey||t>=r.F1&&t<=r.F12)return!1;switch(t){case r.ALT:case r.CAPS_LOCK:case r.CONTEXT_MENU:case r.CTRL:case r.DOWN:case r.END:case r.ESC:case r.HOME:case r.INSERT:case r.LEFT:case r.MAC_FF_META:case r.META:case r.NUMLOCK:case r.NUM_CENTER:case r.PAGE_DOWN:case r.PAGE_UP:case r.PAUSE:case r.PRINT_SCREEN:case r.RIGHT:case r.SHIFT:case r.UP:case r.WIN_KEY:case r.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(e){if(e>=r.ZERO&&e<=r.NINE)return!0;if(e>=r.NUM_ZERO&&e<=r.NUM_MULTIPLY)return!0;if(e>=r.A&&e<=r.Z)return!0;if(-1!==window.navigator.userAgent.indexOf("WebKit")&&0===e)return!0;switch(e){case r.SPACE:case r.QUESTION_MARK:case r.NUM_PLUS:case r.NUM_MINUS:case r.NUM_PERIOD:case r.NUM_DIVISION:case r.SEMICOLON:case r.DASH:case r.EQUALS:case r.COMMA:case r.PERIOD:case r.SLASH:case r.APOSTROPHE:case r.SINGLE_QUOTE:case r.OPEN_SQUARE_BRACKET:case r.BACKSLASH:case r.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}};t.a=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ConfigConsumer",{enumerable:!0,get:function(){return l.ConfigConsumer}}),Object.defineProperty(t,"ConfigContext",{enumerable:!0,get:function(){return l.ConfigContext}}),t.default=t.configConsumerProps=void 0;var r,o=f(n(0)),i=n(687),a=f(n(342)),c=(r=n(100))&&r.__esModule?r:{default:r},l=n(347),u=n(77);function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function f(e){if(e&&e.__esModule)return e;if(null===e||"object"!==d(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=r?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(n,o,i):n[o]=e[o]}return n.default=e,t&&t.set(e,n),n}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(){return(p=Object.assign||function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(0,c.setTwoToneColor)("#1890ff");var h=o.forwardRef((function(e,t){var n,r,c,u=e.className,s=e.icon,d=e.spin,h=e.rotate,v=e.tabIndex,m=e.onClick,g=e.twoToneColor,y=p(e,["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"]),b=(0,i.default)("anticon",(n={},r="anticon-".concat(s.name),c=Boolean(s.name),r in n?Object.defineProperty(n,r,{value:c,enumerable:!0,configurable:!0,writable:!0}):n[r]=c,n),u),w=(0,i.default)({"anticon-spin":!!d||"loading"===s.name}),O=v;void 0===O&&m&&(O=-1);var x=h?{msTransform:"rotate(".concat(h,"deg)"),transform:"rotate(".concat(h,"deg)")}:void 0,S=f((0,l.normalizeTwoToneColors)(g),2),_=S[0],C=S[1];return o.createElement("span",Object.assign({role:"img","aria-label":s.name},y,{ref:t,tabIndex:O,onClick:m,className:b}),o.createElement(a.default,{className:w,icon:s,primaryColor:_,secondaryColor:C,style:x}))}));h.displayName="AntdIcon",h.getTwoToneColor=c.getTwoToneColor,h.setTwoToneColor=c.setTwoToneColor;var v=h;t.default=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t=a)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(e){return"[Circular]"}break;default:return e}})),l=t[r];r0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t}),{})}function v(e,t,n){return n?i.a.createElement(e.tag,u({key:t},h(e.attrs),{},n),(e.children||[]).map((function(n,r){return v(n,"".concat(t,"-").concat(e.tag,"-").concat(r))}))):i.a.createElement(e.tag,u({key:t},h(e.attrs)),(e.children||[]).map((function(n,r){return v(n,"".concat(t,"-").concat(e.tag,"-").concat(r))})))}function m(e){return Object(r.generate)(e)[0]}function g(e){return e?Array.isArray(e)?e:[e]:[]}var y={width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",focusable:"false"},b="\n.anticon {\n display: inline-block;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n",w=!1,O=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:b;Object(o.useEffect)((function(){w||(Object(c.insertCss)(e,{prepend:!0}),w=!0)}),[])}},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,c,l=a(e),u=1;u0&&void 0!==arguments[0]?arguments[0]:h;return r(this,t),o(this,e.call(this,g(n)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getKey=function(){return this.get("key")},t.prototype.getType=function(){return this.get("type")},t.prototype.getText=function(){return this.get("text")},t.prototype.getCharacterList=function(){return this.get("characterList")},t.prototype.getLength=function(){return this.getText().length},t.prototype.getDepth=function(){return this.get("depth")},t.prototype.getData=function(){return this.get("data")},t.prototype.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():p},t.prototype.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},t.prototype.getChildKeys=function(){return this.get("children")},t.prototype.getParentKey=function(){return this.get("parent")},t.prototype.getPrevSiblingKey=function(){return this.get("prevSibling")},t.prototype.getNextSiblingKey=function(){return this.get("nextSibling")},t.prototype.findStyleRanges=function(e,t){c(this.getCharacterList(),v,e,t)},t.prototype.findEntityRanges=function(e,t){c(this.getCharacterList(),m,e,t)},t}(f(h));e.exports=y},function(e,t,n){"use strict";n.r(t);var r=n(4),o=n.n(r);t.default=function(e,t){for(var n=o()({},e),r=0;r{if(e&&(r.push(e),(!t||!e.collapsed)&&e.children)){let o=n(e.children,t);r=r.concat(o)}}),r}const r=(e,t)=>n(e).find(e=>e.id===t),o=(e,t,n=null)=>{let r=e.findIndex(e=>e.id===t);if(r>=0)return{idx:r,item:e[r],parent_list:e,parent:n};for(let n of e){Array.isArray(n.children)||(n.children=[]);let e=o(n.children,t,n);if(e)return e}return null},i=(e,t)=>{let n=e.findIndex(e=>e.id===t);return n>=0?(e.splice(n,1),e):(e.map(e=>i(e.children||[],t)),e)};e.exports={flatTree:n,updateTree:(e,t)=>{let{source_id:n,target_id:a,where_to:c}=t;if(!n||!a||n===a)return e;let l=r(e,n);e=i(e,n);let{item:u,parent_list:s,idx:f}=o(e,a)||{};return u?(0===c?(Array.isArray(u.children)||(u.children=[]),u.children.push(l)):-1===c?s.splice(f,0,l):s.splice(f+1,0,l),e):(console.log("no item!"),console.log(n,a),e)},getItemById:r,getItemDetailById:o,removeItemFromTreeById:i,getUpItemWithCollapseState:function(e,t){let r=n(e,!0),o=r.findIndex(e=>e.id===t);return o>0?r[o-1]:null},getDownItemWithCollapseState:function(e,t){let r=n(e,!0),o=r.findIndex(e=>e.id===t);return r[o+1]||null}}},function(e,t,n){(function(t){for(var r=n(550),o="undefined"==typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",c=o["request"+a],l=o["cancel"+a]||o["cancelRequest"+a],u=0;!c&&u children");r=e}})),r}var S=n(7),_=n.n(S),C=n(111),E=n.n(C),M={transitionstart:{transition:"transitionstart",WebkitTransition:"webkitTransitionStart",MozTransition:"mozTransitionStart",OTransition:"oTransitionStart",msTransition:"MSTransitionStart"},animationstart:{animation:"animationstart",WebkitAnimation:"webkitAnimationStart",MozAnimation:"mozAnimationStart",OAnimation:"oAnimationStart",msAnimation:"MSAnimationStart"}},z={transitionend:{transition:"transitionend",WebkitTransition:"webkitTransitionEnd",MozTransition:"mozTransitionEnd",OTransition:"oTransitionEnd",msTransition:"MSTransitionEnd"},animationend:{animation:"animationend",WebkitAnimation:"webkitAnimationEnd",MozAnimation:"mozAnimationEnd",OAnimation:"oAnimationEnd",msAnimation:"MSAnimationEnd"}},T=[],k=[];function j(e,t,n){e.addEventListener(t,n,!1)}function P(e,t,n){e.removeEventListener(t,n,!1)}"undefined"!=typeof window&&"undefined"!=typeof document&&function(){var e=document.createElement("div").style;function t(t,n){for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];for(var i in o)if(i in e){n.push(o[i]);break}}}"AnimationEvent"in window||(delete M.animationstart.animation,delete z.animationend.animation),"TransitionEvent"in window||(delete M.transitionstart.transition,delete z.transitionend.transition),t(M,T),t(z,k)}();var N={startEvents:T,addStartEventListener:function(e,t){0!==T.length?T.forEach((function(n){j(e,n,t)})):window.setTimeout(t,0)},removeStartEventListener:function(e,t){0!==T.length&&T.forEach((function(n){P(e,n,t)}))},endEvents:k,addEndEventListener:function(e,t){0!==k.length?k.forEach((function(n){j(e,n,t)})):window.setTimeout(t,0)},removeEndEventListener:function(e,t){0!==k.length&&k.forEach((function(n){P(e,n,t)}))}},H=n(267),F=n.n(H),L=0!==N.endEvents.length,R=["Webkit","Moz","O","ms"],V=["-webkit-","-moz-","-o-","ms-",""];function A(e,t){for(var n=window.getComputedStyle(e,null),r="",o=0;o children");return m.a.createElement(G,{key:n.key,ref:function(t){e.childrenRefs[n.key]=t},animation:t.animation,transitionName:t.transitionName,transitionEnter:t.transitionEnter,transitionAppear:t.transitionAppear,transitionLeave:t.transitionLeave},n)})));var i=t.component;if(i){var a=t;return"string"==typeof i&&(a=o()({className:t.className,style:t.style},t.componentProps)),m.a.createElement(i,a,r)}return r[0]||null}}]),t}(m.a.Component);Q.isAnimate=!0,Q.propTypes={className:y.a.string,style:y.a.object,component:y.a.any,componentProps:y.a.object,animation:y.a.object,transitionName:y.a.oneOfType([y.a.string,y.a.object]),transitionEnter:y.a.bool,transitionAppear:y.a.bool,exclusive:y.a.bool,transitionLeave:y.a.bool,onEnd:y.a.func,onEnter:y.a.func,onLeave:y.a.func,onAppear:y.a.func,showProp:y.a.string,children:y.a.node},Q.defaultProps={animation:{},component:"span",componentProps:{},transitionEnter:!0,transitionLeave:!0,transitionAppear:!1,onEnd:X,onEnter:X,onLeave:X,onAppear:X};var Z=function(){var e=this;this.performEnter=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillEnter(e.handleDoneAdding.bind(e,t,"enter")))},this.performAppear=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillAppear(e.handleDoneAdding.bind(e,t,"appear")))},this.handleDoneAdding=function(t,n){var r=e.props;if(delete e.currentlyAnimatingKeys[t],!r.exclusive||r===e.nextProps){var o=w(Y(r));e.isValidChildByKey(o,t)?"appear"===n?K.allowAppearCallback(r)&&(r.onAppear(t),r.onEnd(t,!0)):K.allowEnterCallback(r)&&(r.onEnter(t),r.onEnd(t,!0)):e.performLeave(t)}},this.performLeave=function(t){e.childrenRefs[t]&&(e.currentlyAnimatingKeys[t]=!0,e.childrenRefs[t].componentWillLeave(e.handleDoneLeaving.bind(e,t)))},this.handleDoneLeaving=function(t){var n=e.props;if(delete e.currentlyAnimatingKeys[t],!n.exclusive||n===e.nextProps){var r,o,i,a,c=w(Y(n));if(e.isValidChildByKey(c,t))e.performEnter(t);else{var l=function(){K.allowLeaveCallback(n)&&(n.onLeave(t),n.onEnd(t,!1))};r=e.state.children,o=c,i=n.showProp,(a=r.length===o.length)&&r.forEach((function(e,t){var n=o[t];e&&n&&(e&&!n||!e&&n||e.key!==n.key||i&&e.props[i]!==n.props[i])&&(a=!1)})),a?l():e.setState({children:c},l)}}}};t.a=Object(b.a)(Q)},,function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var r=n(62),o=n(182),i=n(121),a=Object.defineProperty;t.f=n(48)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){e.exports=!n(73)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var r=n(431);e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(7),o=n.n(r);function i(e){return e instanceof HTMLElement?e:o.a.findDOMNode(e)}},function(e,t,n){"use strict";function r(e,t){for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(46),o=n(34),i=n(120),a=n(61),c=n(53),l=function(e,t,n){var u,s,f,d=e&l.F,p=e&l.G,h=e&l.S,v=e&l.P,m=e&l.B,g=e&l.W,y=p?o:o[t]||(o[t]={}),b=y.prototype,w=p?r:h?r[t]:(r[t]||{}).prototype;for(u in p&&(n=t),n)(s=!d&&w&&void 0!==w[u])&&c(y,u)||(f=s?w[u]:n[u],y[u]=p&&"function"!=typeof w[u]?n[u]:m&&s?i(f,r):g&&w[u]==f?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):v&&"function"==typeof f?i(Function.call,f):f,v&&((y.virtual||(y.virtual={}))[u]=f,e&l.R&&b&&!b[u]&&a(b,u,f)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(369),o=n(372);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){"use strict";var r=n(25),o=n(6),i=n(81),a=o.List,c=o.Map,l=o.OrderedSet,u=o.Record,s=o.Repeat,f=l(),d=u({key:"",type:"unstyled",text:"",characterList:a(),depth:0,data:c()}),p=function(e){function t(n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,function(e){if(!e)return e;var t=e.characterList,n=e.text;return n&&!t&&(e.characterList=a(s(r.EMPTY,n.length))),e}(n)))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getKey=function(){return this.get("key")},t.prototype.getType=function(){return this.get("type")},t.prototype.getText=function(){return this.get("text")},t.prototype.getCharacterList=function(){return this.get("characterList")},t.prototype.getLength=function(){return this.getText().length},t.prototype.getDepth=function(){return this.get("depth")},t.prototype.getData=function(){return this.get("data")},t.prototype.getInlineStyleAt=function(e){var t=this.getCharacterList().get(e);return t?t.getStyle():f},t.prototype.getEntityAt=function(e){var t=this.getCharacterList().get(e);return t?t.getEntity():null},t.prototype.findStyleRanges=function(e,t){i(this.getCharacterList(),h,e,t)},t.prototype.findEntityRanges=function(e,t){i(this.getCharacterList(),v,e,t)},t}(d);function h(e,t){return e.getStyle()===t.getStyle()}function v(e,t){return e.getEntity()===t.getEntity()}e.exports=p},function(e,t,n){"use strict";var r=n(9),o=/[\uD800-\uDFFF]/;function i(e){return 55296<=e&&e<=57343}function a(e){return o.test(e)}function c(e,t){return 1+i(e.charCodeAt(t))}function l(e,t,n){if(t=t||0,n=void 0===n?1/0:n||0,!a(e))return e.substr(t,n);var r=e.length;if(r<=0||t>r||n<=0)return"";var o=0;if(t>0){for(;t>0&&o=r)return""}else if(t<0){for(o=r;t<0&&00&&i{let r={list:t},a=e.state.current;if(a&&a.is_sys){let e=await o.default.pact("getSysHosts");r.sys_hosts=e,r.current=e}else if(n)r.current=n;else if(a){let e=(0,i.flatTree)(t).find(e=>e.id===a.id);e&&(r.current=e)}e.setState(r,()=>{n&&o.default.emit("select",n.id)})}},function(e,t,n){"use strict";t.__esModule=!0,t.default=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(22),o=n.n(r),i=n(4),a=n.n(i),c=n(10),l=n.n(c),u=n(37),s=n.n(u),f=n(15),d=n.n(f),p=n(16),h=n.n(p),v=n(0),m=n.n(v),g=n(2),y=n.n(g),b=n(32),w=n(50),O=n(3),x=n.n(O),S=n(43),_=n.n(S),C=n(38),E={eventProps:y.a.object,visible:y.a.bool,children:y.a.func,motionName:y.a.oneOfType([y.a.string,y.a.object]),motionAppear:y.a.bool,motionEnter:y.a.bool,motionLeave:y.a.bool,motionLeaveImmediately:y.a.bool,removeOnLeave:y.a.bool,leavedClassName:y.a.string,onAppearStart:y.a.func,onAppearActive:y.a.func,onAppearEnd:y.a.func,onEnterStart:y.a.func,onEnterActive:y.a.func,onEnterEnd:y.a.func,onLeaveStart:y.a.func,onLeaveActive:y.a.func,onLeaveEnd:y.a.func};t.b=function(e){var t=e,n=!!m.a.forwardRef;function r(e){return!(!e.motionName||!t)}"object"==typeof e&&(t=e.transitionSupport,n="forwardRef"in e?e.forwardRef:n);var i=function(e){function t(){l()(this,t);var e=d()(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.onDomUpdate=function(){var t=e.state,n=t.status,o=t.newStatus,i=e.props,a=i.onAppearStart,c=i.onEnterStart,l=i.onLeaveStart,u=i.onAppearActive,s=i.onEnterActive,f=i.onLeaveActive,d=i.motionAppear,p=i.motionEnter,h=i.motionLeave;if(r(e.props)){var v=e.getElement();e.$cacheEle!==v&&(e.removeEventListener(e.$cacheEle),e.addEventListener(v),e.$cacheEle=v),o&&"appear"===n&&d?e.updateStatus(a,null,null,(function(){e.updateActiveStatus(u,"appear")})):o&&"enter"===n&&p?e.updateStatus(c,null,null,(function(){e.updateActiveStatus(s,"enter")})):o&&"leave"===n&&h&&e.updateStatus(l,null,null,(function(){e.updateActiveStatus(f,"leave")}))}},e.onMotionEnd=function(t){var n=e.state,r=n.status,o=n.statusActive,i=e.props,a=i.onAppearEnd,c=i.onEnterEnd,l=i.onLeaveEnd;"appear"===r&&o?e.updateStatus(a,{status:"none"},t):"enter"===r&&o?e.updateStatus(c,{status:"none"},t):"leave"===r&&o&&e.updateStatus(l,{status:"none"},t)},e.setNodeRef=function(t){var n=e.props.internalRef;e.node=t,"function"==typeof n?n(t):n&&"current"in n&&(n.current=t)},e.getElement=function(){return Object(w.a)(e.node||e)},e.addEventListener=function(t){t&&(t.addEventListener(C.d,e.onMotionEnd),t.addEventListener(C.a,e.onMotionEnd))},e.removeEventListener=function(t){t&&(t.removeEventListener(C.d,e.onMotionEnd),t.removeEventListener(C.a,e.onMotionEnd))},e.updateStatus=function(t,n,r,o){var i=t?t(e.getElement(),r):null;if(!1!==i&&!e._destroyed){var c=void 0;o&&(c=function(){e.nextFrame(o)}),e.setState(a()({statusStyle:"object"==typeof i?i:null,newStatus:!1},n),c)}},e.updateActiveStatus=function(t,n){e.nextFrame((function(){e.state.status===n&&e.updateStatus(t,{statusActive:!0})}))},e.nextFrame=function(t){e.cancelNextFrame(),e.raf=_()(t)},e.cancelNextFrame=function(){e.raf&&(_.a.cancel(e.raf),e.raf=null)},e.state={status:"none",statusActive:!1,newStatus:!1,statusStyle:null},e.$cacheEle=null,e.node=null,e.raf=null,e}return h()(t,e),s()(t,[{key:"componentDidMount",value:function(){this.onDomUpdate()}},{key:"componentDidUpdate",value:function(){this.onDomUpdate()}},{key:"componentWillUnmount",value:function(){this._destroyed=!0,this.removeEventListener(this.$cacheEle),this.cancelNextFrame()}},{key:"render",value:function(){var e,t=this.state,n=t.status,i=t.statusActive,c=t.statusStyle,l=this.props,u=l.children,s=l.motionName,f=l.visible,d=l.removeOnLeave,p=l.leavedClassName,h=l.eventProps;return u?"none"!==n&&r(this.props)?u(a()({},h,{className:x()((e={},o()(e,Object(C.b)(s,n),"none"!==n),o()(e,Object(C.b)(s,n+"-active"),"none"!==n&&i),o()(e,s,"string"==typeof s),e)),style:c}),this.setNodeRef):f?u(a()({},h),this.setNodeRef):d?null:u(a()({},h,{className:p}),this.setNodeRef):null}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.status;if(!r(e))return{};var i=e.visible,a=e.motionAppear,c=e.motionEnter,l=e.motionLeave,u=e.motionLeaveImmediately,s={prevProps:e};return("appear"===o&&!a||"enter"===o&&!c||"leave"===o&&!l)&&(s.status="none",s.statusActive=!1,s.newStatus=!1),!n&&i&&a&&(s.status="appear",s.statusActive=!1,s.newStatus=!0),n&&!n.visible&&i&&c&&(s.status="enter",s.statusActive=!1,s.newStatus=!0),(n&&n.visible&&!i&&l||!n&&u&&!i&&l)&&(s.status="leave",s.statusActive=!1,s.newStatus=!0),s}}]),t}(m.a.Component);return i.propTypes=a()({},E,{internalRef:y.a.oneOfType([y.a.object,y.a.func])}),i.defaultProps={visible:!0,motionEnter:!0,motionAppear:!0,motionLeave:!0,removeOnLeave:!0},Object(b.polyfill)(i),n?m.a.forwardRef((function(e,t){return m.a.createElement(i,a()({internalRef:t},e))})):i}(C.c)},function(e,t,n){e.exports=n(341)},function(e,t,n){var r=n(47),o=n(74);e.exports=n(48)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(63);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var r=n(185),o=n(123);e.exports=function(e){return r(o(e))}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(102),o=n(360),i=n(361),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var i=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.serialize=function(){return"Anchor: "+this.getAnchorKey()+":"+this.getAnchorOffset()+", Focus: "+this.getFocusKey()+":"+this.getFocusOffset()+", Is Backward: "+String(this.getIsBackward())+", Has Focus: "+String(this.getHasFocus())},t.prototype.getAnchorKey=function(){return this.get("anchorKey")},t.prototype.getAnchorOffset=function(){return this.get("anchorOffset")},t.prototype.getFocusKey=function(){return this.get("focusKey")},t.prototype.getFocusOffset=function(){return this.get("focusOffset")},t.prototype.getIsBackward=function(){return this.get("isBackward")},t.prototype.getHasFocus=function(){return this.get("hasFocus")},t.prototype.hasEdgeWithin=function(e,t,n){var r=this.getAnchorKey(),o=this.getFocusKey();if(r===o&&r===e){var i=this.getStartOffset();return t<=this.getEndOffset()&&i<=n}if(e!==r&&e!==o)return!1;var a=e===r?this.getAnchorOffset():this.getFocusOffset();return t<=a&&n>=a},t.prototype.isCollapsed=function(){return this.getAnchorKey()===this.getFocusKey()&&this.getAnchorOffset()===this.getFocusOffset()},t.prototype.getStartKey=function(){return this.getIsBackward()?this.getFocusKey():this.getAnchorKey()},t.prototype.getStartOffset=function(){return this.getIsBackward()?this.getFocusOffset():this.getAnchorOffset()},t.prototype.getEndKey=function(){return this.getIsBackward()?this.getAnchorKey():this.getFocusKey()},t.prototype.getEndOffset=function(){return this.getIsBackward()?this.getAnchorOffset():this.getFocusOffset()},t.createEmpty=function(e){return new t({anchorKey:e,anchorOffset:0,focusKey:e,focusOffset:0,isBackward:!1,hasFocus:!1})},t}((0,n(6).Record)({anchorKey:"",anchorOffset:0,focusKey:"",focusOffset:0,isBackward:!1,hasFocus:!1}));e.exports=i},function(e,t,n){"use strict";function r(e){return e.replace(/\//g,"-")}e.exports=function(e){return"object"==typeof e?Object.keys(e).filter((function(t){return e[t]})).map(r).join(" "):Array.prototype.map.call(arguments,r).join(" ")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(594)),o=i(n(597));function i(e){return e&&e.__esModule?e:{default:e}}r.default.Group=o.default;var a=r.default;t.default=a},function(e,t,n){"use strict";var r={encode:function(e,t,n){return e+"-"+t+"-"+n},decode:function(e){var t=e.split("-"),n=t[0],r=t[1],o=t[2];return{blockKey:n,decoratorKey:parseInt(r,10),leafKey:parseInt(o,10)}}};e.exports=r},function(e,t,n){"use strict";n.d(t,"b",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(91),o=n(20);function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==c.return||c.return()}finally{if(o)throw i}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return a(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n> \u63d2\u4ef6: [",t.name,"] \u65e0\u6548\u3002\u63d2\u4ef6\u6216\u8bb8\u5df2\u7ecf\u8fc7\u671f\u3002"),!1})).filter((function(e){return e})).toArray():[]},n.prototype.componentWillMount=function(){var e=this.initPlugins().concat([x]),t={},n={},r=Object(u.Map)(l.DefaultDraftBlockRenderMap),o=Object(u.List)([]),i=new l.CompositeDecorator(e.filter((function(e){return void 0!==e.decorators})).map((function(e){return e.decorators})).reduce((function(e,t){return e.concat(t)}),[])),a=Object(u.List)(e.filter((function(e){return!!e.component&&"toolbar"!==e.name})));e.forEach((function(e){var i=e.styleMap,a=e.blockStyleMap,c=e.blockRenderMap,l=e.toHtml;if(i)for(var u in i)i.hasOwnProperty(u)&&(t[u]=i[u]);if(a)for(var s in a)a.hasOwnProperty(s)&&(n[s]=a[s],r=r.set(s,{element:null}));if(l&&(o=o.push(l)),c)for(var f in c)c.hasOwnProperty(f)&&(r=r.set(f,c[f]))})),S.set("customStyleMap",t),S.set("customBlockStyleMap",n),S.set("blockRenderMap",r),S.set("customStyleFn",this.customStyleFn.bind(this)),S.set("toHTMLList",o),this.setState({toolbarPlugins:a,compositeDecorator:i}),this.setEditorState(l.EditorState.set(this.state.editorState,{decorator:i}),!1,!1)},n.prototype.componentWillReceiveProps=function(e){if(this.forceUpdateImmediate&&this.cancelForceUpdateImmediate(),this.controlledMode){var t=e.value.getDecorator()?e.value:l.EditorState.set(e.value,{decorator:this.state.compositeDecorator});this.setState({editorState:t})}},n.prototype.componentWillUnmount=function(){this.cancelForceUpdateImmediate()},n.prototype.generatorDefaultValue=function(e){var t=this.getDefaultValue();return t||e},n.prototype.getStyleMap=function(){return S.get("customStyleMap")},n.prototype.setStyleMap=function(e){S.set("customStyleMap",e),this.render()},n.prototype.initPlugins=function(){var e=this,t=["focus","getEditorState","setEditorState","getStyleMap","setStyleMap"];return this.getPlugins().map((function(n){return t.forEach((function(t){n.callbacks.hasOwnProperty(t)&&(n.callbacks[t]=e[t].bind(e))})),n}))},n.prototype.focusEditor=function(e){this.refs.editor.focus(e),this.props.readOnly&&this._focusDummy.focus(),this.props.onFocus&&this.props.onFocus(e)},n.prototype._focus=function(e){if(e&&e.nativeEvent&&e.nativeEvent.target&&(!document.activeElement||"true"!==document.activeElement.getAttribute("contenteditable")))return this.focus(e)},n.prototype.focus=function(e){var t=this,n=e&&e.nativeEvent;if(n&&n.target===this._editorWrapper){var r=this.state.editorState,o=r.getSelection();if(!o.getHasFocus()&&o.isCollapsed())return this.setState({editorState:l.EditorState.moveSelectionToEnd(r)},(function(){t.focusEditor(e)}))}this.focusEditor(e)},n.prototype.getPlugins=function(){return this.state.plugins.slice()},n.prototype.getEventHandler=function(){var e=this,t={};return["onUpArrow","onDownArrow","handleReturn","onFocus","onBlur","onTab","handlePastedText"].forEach((function(n){t[n]=e.generatorEventHandler(n)})),t},n.prototype.getEditorState=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e&&this.refs.editor.focus(),this.state.editorState},n.prototype.setEditorState=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=e;this.getPlugins().forEach((function(e){if(e.onChange){var t=e.onChange(i);t&&(i=t)}})),this.props.onChange&&o&&(this.props.onChange(i),this.controlledMode&&(this.forceUpdateImmediate=r((function(){return t.setState({editorState:new l.EditorState(t.state.editorState.getImmutable())})})))),this.controlledMode||this.setState({editorState:i},n?function(){return r((function(){return t.refs.editor.focus()}))}:b)},n.prototype.handleKeyBinding=function(e){if(this.props.onKeyDown){e.ctrlKey=y(e);var t=this.props.onKeyDown(e);return t||Object(l.getDefaultKeyBinding)(e)}return Object(l.getDefaultKeyBinding)(e)},n.prototype.handleKeyCommand=function(e){return this.props.multiLines?this.eventHandle("handleKeyBinding",e):"split-block"===e?"handled":"not-handled"},n.prototype.getBlockStyle=function(e){var t=S.get("customBlockStyleMap"),n=e.getType();return t.hasOwnProperty(n)?t[n]:""},n.prototype.blockRendererFn=function(e){var t=null;return this.getPlugins().forEach((function(n){if(n.blockRendererFn){var r=n.blockRendererFn(e);r&&(t=r)}})),t},n.prototype.eventHandle=function(e){for(var t,n=this.getPlugins(),r=arguments.length,o=Array(r>1?r-1:0),i=1;i=15&&(f=!1,l=!0);var x=y&&(u||f&&(null==O||O<12.11)),S=n||a&&c>=9;function _(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var C,E=function(e,t){var n=e.className,r=_(t).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}};function M(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function z(e,t){return M(e).appendChild(t)}function T(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i=t)return a+(t-i);a+=c-i,a+=n-a%n,i=c+1}}v?F=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(F=function(e){try{e.select()}catch(e){}});var A=function(){this.id=null,this.f=null,this.time=0,this.handler=L(this.onTimeout,this)};function D(e,t){for(var n=0;n=t)return r+Math.min(a,t-o);if(o+=i-r,r=i+1,(o+=n-o%n)>=t)return r}}var q=[""];function G(e){for(;q.length<=e;)q.push($(q)+" ");return q[e]}function $(e){return e[e.length-1]}function Y(e,t){for(var n=[],r=0;r"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&J(e))||t.test(e):J(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,n){for(;(n<0?t>0:tn?-1:1;;){if(t==n)return t;var o=(t+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}var ae=null;function ce(e,t,n){var r;ae=null;for(var o=0;ot)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:ae=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:ae=o)}return null!=r?r:ae}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,o=/[1n]/;function i(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,c){var l="ltr"==c?"L":"R";if(0==a.length||"ltr"==c&&!e.test(a))return!1;for(var u,s=a.length,f=[],d=0;d-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function he(e,t){var n=de(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o0}function ye(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function we(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Oe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function xe(e){be(e),we(e)}function Se(e){return e.target||e.srcElement}function _e(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Ce,Ee,Me=function(){if(a&&c<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}();function ze(e){if(null==Ce){var t=T("span","\u200b");z(e,T("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ce=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&c<8))}var n=Ce?T("span","\u200b"):T("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Te(e){if(null!=Ee)return Ee;var t=z(e,document.createTextNode("A\u062eA")),n=C(t,0,1).getBoundingClientRect(),r=C(t,1,2).getBoundingClientRect();return M(e),!(!n||n.left==n.right)&&(Ee=r.right-n.right<3)}var ke,je=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Pe=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Ne="oncopy"in(ke=T("div"))||(ke.setAttribute("oncopy","return;"),"function"==typeof ke.oncopy),He=null,Fe={},Le={};function Re(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Fe[e]=t}function Ve(e){if("string"==typeof e&&Le.hasOwnProperty(e))e=Le[e];else if(e&&"string"==typeof e.name&&Le.hasOwnProperty(e.name)){var t=Le[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return Ve("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return Ve("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ae(e,t){t=Ve(t);var n=Fe[t.name];if(!n)return Ae(e,"text/plain");var r=n(e,t);if(De.hasOwnProperty(t.name)){var o=De[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var De={};function Be(e,t){R(t,De.hasOwnProperty(e)?De[e]:De[e]={})}function Ie(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function We(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ke(e,t,n){return!e.startState||e.startState(t,n)}var Ue=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function qe(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(t=e.first&&tn?et(n,qe(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?et(e.line,t):n<0?et(e.line,0):e}(t,qe(e,t.line).text.length)}function lt(e,t){for(var n=[],r=0;r=this.string.length},Ue.prototype.sol=function(){return this.pos==this.lineStart},Ue.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Ue.prototype.next=function(){if(this.post},Ue.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Ue.prototype.skipToEnd=function(){this.pos=this.string.length},Ue.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Ue.prototype.backUp=function(e){this.pos-=e},Ue.prototype.column=function(){return this.lastColumnPos0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},Ue.prototype.current=function(){return this.string.slice(this.start,this.pos)},Ue.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Ue.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Ue.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},st=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function ft(e,t,n,r){var o=[e.state.modeGen],i={};wt(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),i,r);for(var a=n.state,c=function(r){n.baseTokens=o;var c=e.state.overlays[r],l=1,u=0;n.state=!0,wt(e,t.text,c.mode,n,(function(e,t){for(var n=l;ue&&o.splice(l,1,e,o[l+1],r),l+=2,u=Math.min(e,r)}if(t)if(c.opaque)o.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;ne.options.maxHighlightLength&&Ie(e.doc.mode,r.state),i=ft(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function pt(e,t,n){var r=e.doc,o=e.display;if(!r.mode.startState)return new st(r,!0,t);var i=function(e,t,n){for(var r,o,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),c=t;c>a;--c){if(c<=i.first)return i.first;var l=qe(i,c-1),u=l.stateAfter;if(u&&(!n||c+(u instanceof ut?u.lookAhead:0)<=i.modeFrontier))return c;var s=V(l.text,null,e.options.tabSize);(null==o||r>s)&&(o=c-1,r=s)}return o}(e,t,n),a=i>r.first&&qe(r,i-1).stateAfter,c=a?st.fromSaved(r,a,i):new st(r,Ke(r.mode),i);return r.iter(i,t,(function(n){ht(e,n.text,c);var r=c.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&rt.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}st.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},st.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},st.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},st.fromSaved=function(e,t,n){return t instanceof ut?new st(e,Ie(e.mode,t.state),n,t.lookAhead):new st(e,Ie(e.mode,t),n)},st.prototype.save=function(e){var t=!1!==e?Ie(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var gt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function yt(e,t,n,r){var o,i,a=e.doc,c=a.mode,l=qe(a,(t=ct(a,t)).line),u=pt(e,t.line,n),s=new Ue(l.text,e.options.tabSize,u);for(r&&(i=[]);(r||s.pose.options.maxHighlightLength?(c=!1,a&&ht(e,t,r,f.pos),f.pos=t.length,l=null):l=bt(mt(n,f,r.state,d),i),d){var p=d[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!c||s!=l){for(;u=t:i.to>t);(r||(r=[])).push(new St(a,i.from,c?null:i.to))}}return r}(n,o,a),l=function(e,t,n){var r;if(e)for(var o=0;o=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var c=null==i.from||(a.inclusiveLeft?i.from<=t:i.from0&&c)for(var b=0;bt)&&(!n||Pt(n,i.marker)<0)&&(n=i.marker)}return n}function Rt(e,t,n,r,o){var i=qe(e,t),a=xt&&i.markedSpans;if(a)for(var c=0;c=0&&f<=0||s<=0&&f>=0)&&(s<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?tt(u.to,n)>=0:tt(u.to,n)>0)||s>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?tt(u.from,r)<=0:tt(u.from,r)<0)))return!0}}}function Vt(e){for(var t;t=Ht(e);)e=t.find(-1,!0).line;return e}function At(e,t){var n=qe(e,t),r=Vt(n);return n==r?t:Xe(r)}function Dt(e,t){if(t>e.lastLine())return t;var n,r=qe(e,t);if(!Bt(e,r))return t;for(;n=Ft(r);)r=n.find(1,!0).line;return Xe(r)+1}function Bt(e,t){var n=xt&&t.markedSpans;if(n)for(var r=void 0,o=0;ot.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var qt=function(e,t,n){this.text=e,Tt(this,t),this.height=n?n(this):1};function Gt(e){e.parent=null,zt(e)}qt.prototype.lineNo=function(){return Xe(this)},ye(qt);var $t={},Yt={};function Xt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Yt:$t;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Qt(e,t){var n=k("span",null,null,l?"padding-right: .1px":null),r={pre:k("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;r.pos=0,r.addToken=Jt,Te(e.display.measure)&&(a=ue(i,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(i,r,dt(e,i,t!=e.display.externalMeasured&&Xe(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=H(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=H(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(ze(e.display.measure))),0==o?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var c=r.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=H(r.pre.className,r.textClass||"")),r}function Zt(e){var t=T("span","\u2022","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Jt(e,t,n,r,o,i,l){if(t){var u,s=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;ou&&f.from<=u);d++);if(f.to>=s)return e(n,r,o,i,a,c,l);e(n,r.slice(0,f.to-u),o,i,null,c,l),i=null,r=r.slice(f.to-u),u=f.to}}}function tn(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,c,l,u,s,f,d,p=o.length,h=0,v=1,m="",g=0;;){if(g==h){l=u=s=c="",d=null,f=null,g=1/0;for(var y=[],b=void 0,w=0;wh||x.collapsed&&O.to==h&&O.from==h)){if(null!=O.to&&O.to!=h&&g>O.to&&(g=O.to,u=""),x.className&&(l+=" "+x.className),x.css&&(c=(c?c+";":"")+x.css),x.startStyle&&O.from==h&&(s+=" "+x.startStyle),x.endStyle&&O.to==g&&(b||(b=[])).push(x.endStyle,O.to),x.title&&((d||(d={})).title=x.title),x.attributes)for(var S in x.attributes)(d||(d={}))[S]=x.attributes[S];x.collapsed&&(!f||Pt(f.marker,x)<0)&&(f=O)}else O.from>h&&g>O.from&&(g=O.from)}if(b)for(var _=0;_=p)break;for(var E=Math.min(p,g);;){if(m){var M=h+m.length;if(!f){var z=M>E?m.slice(0,E-h):m;t.addToken(t,z,a?a+l:l,s,h+z.length==g?u:"",c,d)}if(M>=E){m=m.slice(E-h),h=E;break}h=M,s=""}m=o.slice(i,i=n[v++]),a=Xt(n[v++],t.cm.options)}}else for(var T=1;Tn)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function kn(e,t,n,r){return Nn(e,Pn(e,t),n,r)}function jn(e,t){if(t>=e.display.viewFrom&&t=n.lineN&&t2&&i.push((l.bottom+u.top)/2-n.top)}}i.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(i=function(e,t,n,r){var o,i=Ln(t.map,n,r),l=i.node,u=i.start,s=i.end,f=i.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;u&&re(t.line.text.charAt(i.coverStart+u));)--u;for(;i.coverStart+s1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,o))}else{var p;u>0&&(f=r="right"),o=e.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==r?p.length-1:0]:l.getBoundingClientRect()}if(a&&c<9&&!u&&(!o||!o.left&&!o.right)){var h=l.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+or(e.display),top:h.top,bottom:h.bottom}:Fn}for(var v=o.top-t.rect.top,m=o.bottom-t.rect.top,g=(v+m)/2,y=t.view.measure.heights,b=0;bt)&&(o=(i=l-c)-1,t>=l&&(a="right")),null!=o){if(r=e[u+2],c==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;u&&e[u-2]==e[u-3]&&e[u-1].insertLeft;)r=e[2+(u-=3)],a="left";if("right"==n&&o==l-c)for(;u=0&&(n=e[o]).left==n.right;o--);return n}function Vn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t=r.text.length?(l=r.text.length,u="before"):l<=0&&(l=0,u="after"),!c)return a("before"==u?l-1:l,"before"==u);function s(e,t,n){return a(n?e-1:e,1==c[t].level!=n)}var f=ce(c,l,u),d=ae,p=s(l,f,"before"==u);return null!=d&&(p.other=s(l,d,"before"!=u)),p}function $n(e,t){var n=0;t=ct(e.doc,t),e.options.lineWrapping||(n=or(e.display)*t.ch);var r=qe(e.doc,t.line),o=Wt(r)+Sn(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function Yn(e,t,n,r,o){var i=et(e,t,n);return i.xRel=o,r&&(i.outside=r),i}function Xn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Yn(r.first,0,null,-1,-1);var o=Qe(r,n),i=r.first+r.size-1;if(o>i)return Yn(r.first+r.size-1,qe(r,i).text.length,null,1,1);t<0&&(t=0);for(var a=qe(r,o);;){var c=er(e,a,o,t,n),l=Lt(a,c.ch+(c.xRel>0||c.outside>0?1:0));if(!l)return c;var u=l.find(1);if(u.line==o)return u;a=qe(r,o=u.line)}}function Qn(e,t,n,r){r-=Wn(t);var o=t.text.length,i=ie((function(t){return Nn(e,n,t-1).bottom<=r}),o,0);return{begin:i,end:o=ie((function(t){return Nn(e,n,t).top>r}),i,o)}}function Zn(e,t,n,r){return n||(n=Pn(e,t)),Qn(e,t,n,Kn(e,t,Nn(e,n,r),"line").top)}function Jn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,o){o-=Wt(t);var i=Pn(e,t),a=Wn(t),c=0,l=t.text.length,u=!0,s=ue(t,e.doc.direction);if(s){var f=(e.options.lineWrapping?nr:tr)(e,t,n,i,s,r,o);c=(u=1!=f.level)?f.from:f.to-1,l=u?f.to:f.from-1}var d,p,h=null,v=null,m=ie((function(t){var n=Nn(e,i,t);return n.top+=a,n.bottom+=a,!!Jn(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(h=t,v=n),!0)}),c,l),g=!1;if(v){var y=r-v.left=w.bottom?1:0}return Yn(n,m=oe(t.text,m,1),p,g,r-d)}function tr(e,t,n,r,o,i,a){var c=ie((function(c){var l=o[c],u=1!=l.level;return Jn(Gn(e,et(n,u?l.to:l.from,u?"before":"after"),"line",t,r),i,a,!0)}),0,o.length-1),l=o[c];if(c>0){var u=1!=l.level,s=Gn(e,et(n,u?l.from:l.to,u?"after":"before"),"line",t,r);Jn(s,i,a,!0)&&s.top>a&&(l=o[c-1])}return l}function nr(e,t,n,r,o,i,a){var c=Qn(e,t,r,a),l=c.begin,u=c.end;/\s/.test(t.text.charAt(u-1))&&u--;for(var s=null,f=null,d=0;d=u||p.to<=l)){var h=Nn(e,r,1!=p.level?Math.min(u,p.to)-1:Math.max(l,p.from)).right,v=hv)&&(s=p,f=v)}}return s||(s=o[o.length-1]),s.fromu&&(s={from:s.from,to:u,level:s.level}),s}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Hn){Hn=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Hn.appendChild(document.createTextNode("x")),Hn.appendChild(T("br"));Hn.appendChild(document.createTextNode("x"))}z(e.measure,Hn);var n=Hn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),M(e.measure),n||1}function or(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),n=T("pre",[t],"CodeMirror-line-like");z(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ir(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var c=e.display.gutterSpecs[a].className;n[c]=i.offsetLeft+i.clientLeft+o,r[c]=i.clientWidth}return{fixedPos:ar(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function ar(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function cr(e){var t=rr(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/or(e.display)-3);return function(o){if(Bt(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a0&&(l=qe(e.doc,u.line).text).length==u.ch){var s=V(l,l.length,e.options.tabSize)-l.length;u=et(u.line,Math.max(0,Math.round((i-Cn(e.display).left)/or(e.display))-s))}return u}function sr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;rt)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)xt&&At(e.doc,t)o.viewFrom?pr(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)pr(e);else if(t<=o.viewFrom){var i=hr(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):pr(e)}else if(n>=o.viewTo){var a=hr(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):pr(e)}else{var c=hr(e,t,t,-1),l=hr(e,n,n+r,1);c&&l?(o.view=o.view.slice(0,c.index).concat(on(e,c.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=r):pr(e)}var u=o.externalMeasured;u&&(n=o.lineN&&t=r.viewTo)){var i=r.view[sr(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==D(a,n)&&a.push(n)}}}function pr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function hr(e,t,n,r){var o,i=sr(e,t),a=e.display.view;if(!xt||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var c=e.display.viewFrom,l=0;l0){if(i==a.length-1)return null;o=c+a[i].size-t,i++}else o=c-t;t+=o,n+=o}for(;At(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function vr(e){for(var t=e.display.view,n=0,r=0;r=e.display.viewTo||c.to().linet||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(t,n,"ltr")}(v,n||0,null==r?d:r,(function(e,t,o,f){var m="ltr"==o,g=p(e,m?"left":"right"),y=p(t-1,m?"right":"left"),b=null==n&&0==e,w=null==r&&t==d,O=0==f,x=!v||f==v.length-1;if(y.top-g.top<=3){var S=(u?w:b)&&x,_=(u?b:w)&&O?c:(m?g:y).left,C=S?l:(m?y:g).right;s(_,g.top,C-_,g.bottom)}else{var E,M,z,T;m?(E=u&&b&&O?c:g.left,M=u?l:h(e,o,"before"),z=u?c:h(t,o,"after"),T=u&&w&&x?l:y.right):(E=u?h(e,o,"before"):c,M=!u&&b&&O?l:g.right,z=!u&&w&&x?c:y.left,T=u?h(t,o,"after"):l),s(E,g.top,M-E,g.bottom),g.bottom0?t.blinker=setInterval((function(){return t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function xr(e){e.state.focused||(e.display.input.focus(),_r(e))}function Sr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Cr(e))}),100)}function _r(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,N(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),Or(e))}function Cr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,E(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Er(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r.005||d<-.005)&&(Ye(o.line,l),Mr(o.line),o.rest))for(var p=0;pe.display.sizerWidth){var h=Math.ceil(u/or(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}}function Mr(e){if(e.widgets)for(var t=0;t=a&&(i=Qe(t,Wt(qe(t,l))-e.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function Tr(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=zn(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var c=e.doc.height+_n(n),l=t.topc-r;if(t.topo+i){var s=Math.min(t.top,(u?c:t.bottom)-i);s!=o&&(a.scrollTop=s)}var f=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft,d=Mn(e)-(e.options.fixedGutter?n.gutters.offsetWidth:0),p=t.right-t.left>d;return p&&(t.right=t.left+d),t.left<10?a.scrollLeft=0:t.leftd+f-3&&(a.scrollLeft=t.right+(p?0:10)-d),a}function kr(e,t){null!=t&&(Nr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function jr(e){Nr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Pr(e,t,n){null==t&&null==n||Nr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Nr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Hr(e,$n(e,t.from),$n(e,t.to),t.margin))}function Hr(e,t,n,r){var o=Tr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Pr(e,o.scrollLeft,o.scrollTop)}function Fr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||lo(e,{top:t}),Lr(e,t,!0),n&&lo(e),ro(e,100))}function Lr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Rr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,fo(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function Vr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+_n(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+En(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Ar=function(e,t,n){this.cm=n;var r=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),fe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),fe(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&c<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Ar.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Ar.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Ar.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Ar.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new A,this.disableVert=new A},Ar.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Ar.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Dr=function(){};function Br(e,t){t||(t=Vr(e));var n=e.display.barWidth,r=e.display.barHeight;Ir(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Er(e),Ir(e,Vr(e)),n=e.display.barWidth,r=e.display.barHeight}function Ir(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Dr.prototype.update=function(){return{bottom:0,right:0}},Dr.prototype.setScrollLeft=function(){},Dr.prototype.setScrollTop=function(){},Dr.prototype.clear=function(){};var Wr={native:Ar,null:Dr};function Kr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&E(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Wr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Rr(e,t):Fr(e,t)}),e),e.display.scrollbars.addClass&&N(e.display.wrapper,e.display.scrollbars.addClass)}var Ur=0;function qr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ur},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function Gr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Yr(e){e.updatedDisplay=e.mustUpdate&&ao(e.cm,e.update)}function Xr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Er(t),e.barMeasure=Vr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=kn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+En(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Mn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Qr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!h){var i=T("div","\u200b",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Sn(e.display))+"px;\n height: "+(t.bottom-t.top+En(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}(t,function(e,t,n,r){var o;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?et(t.line,t.ch+1,"before"):t);for(var i=0;i<5;i++){var a=!1,c=Gn(e,t),l=n&&n!=t?Gn(e,n):c,u=Tr(e,o={left:Math.min(c.left,l.left),top:Math.min(c.top,l.top)-r,right:Math.max(c.left,l.left),bottom:Math.max(c.bottom,l.bottom)+r}),s=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=u.scrollTop&&(Fr(e,u.scrollTop),Math.abs(e.doc.scrollTop-s)>1&&(a=!0)),null!=u.scrollLeft&&(Rr(e,u.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return o}(t,ct(r,e.scrollToPos.from),ct(r,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a=e.display.viewTo)){var n=+new Date+e.options.workTime,r=pt(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(r.line>=e.display.viewFrom){var a=i.styles,c=i.text.length>e.options.maxHighlightLength?Ie(t.mode,r.state):null,l=ft(e,i,r,!0);c&&(r.state=c),i.styles=l.styles;var u=i.styleClasses,s=l.classes;s?i.styleClasses=s:u&&(i.styleClasses=null);for(var f=!a||a.length!=i.styles.length||u!=s&&(!u||!s||u.bgClass!=s.bgClass||u.textClass!=s.textClass),d=0;!f&&dn)return ro(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&Jr(e,(function(){for(var t=0;t=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==vr(e))return!1;po(e)&&(pr(e),t.dims=ir(e));var o=r.first+r.size,i=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),xt&&(i=At(e.doc,i),a=Dt(e.doc,a));var c=i!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=on(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=on(e,t,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,sr(e,n)))),r.viewTo=n}(e,i,a),n.viewOffset=Wt(qe(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var u=vr(e);if(!c&&0==u&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var s=function(e){if(e.hasFocus())return null;var t=P();if(!t||!j(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&j(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return u>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,o=e.options.lineNumbers,i=r.lineDiv,a=i.firstChild;function c(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var u=r.view,s=r.viewFrom,f=0;f-1&&(p=!1),sn(e,d,s,n)),p&&(M(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(Je(e.options,s)))),a=d.node.nextSibling}else{var h=gn(e,d,s,n);i.insertBefore(h,a)}s+=d.size}for(;a;)a=c(a)}(e,n.updateLineNumbers,t.dims),u>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=P()&&(e.activeElt.focus(),e.anchorNode&&j(document.body,e.anchorNode)&&j(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(s),M(n.cursorDiv),M(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,c&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ro(e,400)),n.updateLineNumbers=null,!0}function co(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Mn(e))r&&(t.visible=zr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+_n(e.display)-zn(e),n.top)}),t.visible=zr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ao(e,t))break;Er(e);var o=Vr(e);mr(e),Br(e,o),so(e,o),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function lo(e,t){var n=new io(e,t);if(ao(e,n)){Er(e),co(e,n);var r=Vr(e);mr(e),Br(e,r),so(e,r),n.finish()}}function uo(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function so(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+En(e)+"px"}function fo(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=ar(t)-t.scroller.scrollLeft+e.doc.scrollLeft,o=t.gutters.offsetWidth,i=r+"px",a=0;ac.clientWidth,s=c.scrollHeight>c.clientHeight;if(o&&u||i&&s){if(i&&y&&l)e:for(var d=t.target,p=a.view;d!=c;d=d.parentNode)for(var h=0;h=0&&tt(e,r.to())<=0)return n}return-1};var _o=function(e,t){this.anchor=e,this.head=t};function Co(e,t,n){var r=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=D(t,o);for(var i=1;i0:l>=0){var u=it(c.from(),a.from()),s=ot(c.to(),a.to()),f=c.empty()?a.from()==a.head:c.from()==c.head;i<=n&&--n,t.splice(--i,2,new _o(f?s:u,f?u:s))}}return new So(t,n)}function Eo(e,t){return new So([new _o(e,t||e)],0)}function Mo(e){return e.text?et(e.from.line+e.text.length-1,$(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function zo(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Mo(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Mo(t).ch-t.to.ch),et(n,r)}function To(e,t){for(var n=[],r=0;r1&&e.remove(c.line+1,h-1),e.insert(c.line+1,g)}ln(e,"change",e,t)}function Fo(e,t,n){!function e(r,o,i){if(r.linked)for(var a=0;ac-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(Do(e.done),$(e.done)):e.done.length&&!$(e.done).ranges?$(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),$(e.done)):void 0}(o,o.lastOp==r)))a=$(i.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=Mo(t):i.changes.push(Ao(e,t));else{var l=$(o.done);for(l&&l.ranges||Wo(e.sel,o.done),i={changes:[Ao(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=c,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,a||he(e,"historyAdded")}function Io(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,$(o.done),t))?o.done[o.done.length-1]=t:Wo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&Do(o.undone)}function Wo(e,t){var n=$(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ko(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i}))}function Uo(e){if(!e)return null;for(var t,n=0;n-1&&($(c)[f]=u[f],delete u[f])}}}return r}function $o(e,t,n,r){if(r){var o=e.anchor;if(n){var i=tt(t,o)<0;i!=tt(n,o)<0?(o=t,t=n):i!=tt(t,n)<0&&(t=n)}return new _o(o,t)}return new _o(n||t,t)}function Yo(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ei(e,new So([$o(e.sel.primary(),t,n,o)],0),r)}function Xo(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i=t.ch:c.to>t.ch))){if(o&&(he(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var f=l.find(r<0?1:-1),d=void 0;if((r<0?s:u)&&(f=ci(e,f,-r,f&&f.line==t.line?i:null)),f&&f.line==t.line&&(d=tt(f,n))&&(r<0?d<0:d>0))return ii(e,f,t,r,o)}var p=l.find(r<0?-1:1);return(r<0?u:s)&&(p=ci(e,p,r,p.line==t.line?i:null)),p?ii(e,p,t,r,o):null}}return t}function ai(e,t,n,r,o){var i=r||1,a=ii(e,t,n,i,o)||!o&&ii(e,t,n,i,!0)||ii(e,t,n,-i,o)||!o&&ii(e,t,n,-i,!0);return a||(e.cantEdit=!0,et(e.first,0))}function ci(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?ct(e,et(t.line-1)):null:n>0&&t.ch==(r||qe(e,t.line)).text.length?t.line0)){var s=[l,1],f=tt(u.from,c.from),d=tt(u.to,c.to);(f<0||!a.inclusiveLeft&&!f)&&s.push({from:u.from,to:c.from}),(d>0||!a.inclusiveRight&&!d)&&s.push({from:c.to,to:u.to}),o.splice.apply(o,s),l+=s.length-3}}return o}(e,t.from,t.to);if(r)for(var o=r.length-1;o>=0;--o)fi(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else fi(e,t)}}function fi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=To(e,t);Bo(e,t,n,e.cm?e.cm.curOp.id:NaN),hi(e,t,n,Et(e,t));var r=[];Fo(e,(function(e,n){n||-1!=D(r,e.history)||(yi(e.history,t),r.push(e.history)),hi(e,t,null,Et(e,t))}))}}function di(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,i=e.history,a=e.sel,c="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,u=0;u=0;--p){var h=d(p);if(h)return h.v}}}}function pi(e,t){if(0!=t&&(e.first+=t,e.sel=new So(Y(e.sel.ranges,(function(e){return new _o(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){fr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;re.lastLine())){if(t.from.linei&&(t={from:t.from,to:et(i,qe(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ge(e,t.from,t.to),n||(n=To(e,t)),e.cm?function(e,t,n){var r=e.doc,o=e.display,i=t.from,a=t.to,c=!1,l=i.line;e.options.lineWrapping||(l=Xe(Vt(qe(r,i.line))),r.iter(l,a.line+1,(function(e){if(e==o.maxLine)return c=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&me(e),Ho(r,t,n,cr(e)),e.options.lineWrapping||(r.iter(l,i.line+t.text.length,(function(e){var t=Kt(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,c=!1)})),c&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontiern;r--){var o=qe(e,r).stateAfter;if(o&&(!(o instanceof ut)||r+o.lookAhead1||!(this.children[0]instanceof wi))){var c=[];this.collapse(c),this.children=[new wi(c)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t50){for(var a=o.lines.length%25+25,c=a;c10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=k("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Rt(e,t.line,t,n,i)||t.line!=n.line&&Rt(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");xt=!0}i.addToHistory&&Bo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var c,l=t.line,u=e.cm;if(e.iter(l,n.line+1,(function(e){u&&i.collapsed&&!u.options.lineWrapping&&Vt(e)==u.display.maxLine&&(c=!0),i.collapsed&&l!=t.line&&Ye(e,0),function(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}(e,new St(i,l==t.line?t.ch:null,l==n.line?n.ch:null)),++l})),i.collapsed&&e.iter(t.line,n.line+1,(function(t){Bt(e,t)&&Ye(t,0)})),i.clearOnEnter&&fe(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(Ot=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++_i,i.atomic=!0),u){if(c&&(u.curOp.updateMaxLine=!0),i.collapsed)fr(u,t.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var s=t.line;s<=n.line;s++)dr(u,s,"text");i.atomic&&ri(u.doc),ln(u,"markerAdded",u,i)}return i}Ci.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&qr(e),ge(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;ie.display.maxLineLength&&(e.display.maxLine=u,e.display.maxLineLength=s,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&fr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ri(e.doc)),e&&ln(e,"markerCleared",e,this,r,o),t&&Gr(e),this.parent&&this.parent.clear()}},Ci.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o=0;l--)si(this,r[l]);c?Jo(this,c):this.cm&&jr(this.cm)})),undo:no((function(){di(this,"undo")})),redo:no((function(){di(this,"redo")})),undoSelection:no((function(){di(this,"undo",!0)})),redoSelection:no((function(){di(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=ct(this,e),t=ct(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,(function(i){var a=i.markedSpans;if(a)for(var c=0;c=l.to||null==l.from&&o!=e.line||null!=l.from&&o==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++o})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;re)return t=e,!0;e-=i,++n})),ct(this,et(n,t))},indexFromPos:function(e){var t=(e=ct(this,e)).ch;if(e.linet&&(t=e.from),null!=e.to&&e.to-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),ti(t.doc,Eo(n,n)),d)for(var p=0;p=0;t--)vi(e.doc,"",r[t].from,r[t].to,"+delete");jr(e)}))}function Zi(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Ji(e,t,n){var r=Zi(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,o){if(e){"rtl"==t.doc.direction&&(o=-o);var i=ue(n,t.doc.direction);if(i){var a,c=o<0?$(i):i[0],l=o<0==(1==c.level)?"after":"before";if(c.level>0||"rtl"==t.doc.direction){var u=Pn(t,n);a=o<0?n.text.length-1:0;var s=Nn(t,u,a).top;a=ie((function(e){return Nn(t,u,e).top==s}),o<0==(1==c.level)?c.from:c.to-1,a),"before"==l&&(a=Zi(n,a,1))}else a=o<0?c.to:c.from;return new et(r,a,l)}}return new et(r,o<0?n.text.length:0,o<0?"before":"after")}Wi.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"},Wi.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"},Wi.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"},Wi.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"]},Wi.default=y?Wi.macDefault:Wi.pcDefault;var ta={selectAll:li,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),I)},killLine:function(e){return Qi(e,(function(t){if(t.empty()){var n=qe(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line0)o=new et(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),et(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=qe(e.doc,o.line-1).text;a&&(o=new et(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(o.line-1,a.length-1),o,"+transpose"))}n.push(new _o(o,o))}e.setSelections(n)}))},newlineAndIndent:function(e){return Jr(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r-1&&(tt((o=u.ranges[o]).from(),t)<0||t.xRel>0)&&(tt(o.to(),t)>0||t.xRel<0)?function(e,t,n,r){var o=e.display,i=!1,u=eo(e,(function(t){l&&(o.scroller.draggable=!1),e.state.draggingText=!1,pe(o.wrapper.ownerDocument,"mouseup",u),pe(o.wrapper.ownerDocument,"mousemove",s),pe(o.scroller,"dragstart",f),pe(o.scroller,"drop",u),i||(be(t),r.addNew||Yo(e.doc,n,null,null,r.extend),l||a&&9==c?setTimeout((function(){o.wrapper.ownerDocument.body.focus(),o.input.focus()}),20):o.input.focus())})),s=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return i=!0};l&&(o.scroller.draggable=!0),e.state.draggingText=u,u.copy=!r.moveOnDrag,o.scroller.dragDrop&&o.scroller.dragDrop(),fe(o.wrapper.ownerDocument,"mouseup",u),fe(o.wrapper.ownerDocument,"mousemove",s),fe(o.scroller,"dragstart",f),fe(o.scroller,"drop",u),Sr(e),setTimeout((function(){return o.input.focus()}),20)}(e,r,t,i):function(e,t,n,r){var o=e.display,i=e.doc;be(t);var a,c,l=i.sel,u=l.ranges;if(r.addNew&&!r.extend?(c=i.sel.contains(n),a=c>-1?u[c]:new _o(n,n)):(a=i.sel.primary(),c=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(a=new _o(n,n)),n=ur(e,t,!0,!0),c=-1;else{var s=ga(e,n,r.unit);a=r.extend?$o(a,s.anchor,s.head,r.extend):s}r.addNew?-1==c?(c=u.length,ei(i,Co(e,u.concat([a]),c),{scroll:!1,origin:"*mouse"})):u.length>1&&u[c].empty()&&"char"==r.unit&&!r.extend?(ei(i,Co(e,u.slice(0,c).concat(u.slice(c+1)),0),{scroll:!1,origin:"*mouse"}),l=i.sel):Qo(i,c,a,W):(c=0,ei(i,new So([a],0),W),l=i.sel);var f=n;function d(t){if(0!=tt(f,t))if(f=t,"rectangle"==r.unit){for(var o=[],u=e.options.tabSize,s=V(qe(i,n.line).text,n.ch,u),d=V(qe(i,t.line).text,t.ch,u),p=Math.min(s,d),h=Math.max(s,d),v=Math.min(n.line,t.line),m=Math.min(e.lastLine(),Math.max(n.line,t.line));v<=m;v++){var g=qe(i,v).text,y=U(g,p,u);p==h?o.push(new _o(et(v,y),et(v,y))):g.length>y&&o.push(new _o(et(v,y),et(v,U(g,h,u))))}o.length||o.push(new _o(n,n)),ei(i,Co(e,l.ranges.slice(0,c).concat(o),c),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=a,O=ga(e,t,r.unit),x=w.anchor;tt(O.anchor,x)>0?(b=O.head,x=it(w.from(),O.anchor)):(b=O.anchor,x=ot(w.to(),O.head));var S=l.ranges.slice(0);S[c]=function(e,t){var n=t.anchor,r=t.head,o=qe(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var i=ue(o);if(!i)return t;var a=ce(i,n.ch,n.sticky),c=i[a];if(c.from!=n.ch&&c.to!=n.ch)return t;var l,u=a+(c.from==n.ch==(1!=c.level)?0:1);if(0==u||u==i.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var s=ce(i,r.ch,r.sticky),f=s-a||(r.ch-n.ch)*(1==c.level?-1:1);l=s==u-1||s==u?f<0:f>0}var d=i[u+(l?-1:0)],p=l==(1==d.level),h=p?d.from:d.to,v=p?"after":"before";return n.ch==h&&n.sticky==v?t:new _o(new et(n.line,h,v),r)}(e,new _o(ct(i,x),b)),ei(i,Co(e,S,c),W)}}var p=o.wrapper.getBoundingClientRect(),h=0;function v(t){e.state.selectingText=!1,h=1/0,t&&(be(t),o.input.focus()),pe(o.wrapper.ownerDocument,"mousemove",m),pe(o.wrapper.ownerDocument,"mouseup",g),i.history.lastSelOrigin=null}var m=eo(e,(function(t){0!==t.buttons&&_e(t)?function t(n){var a=++h,c=ur(e,n,!0,"rectangle"==r.unit);if(c)if(0!=tt(c,f)){e.curOp.focus=P(),d(c);var l=zr(o,i);(c.line>=l.to||c.linep.bottom?20:0;u&&setTimeout(eo(e,(function(){h==a&&(o.scroller.scrollTop+=u,t(n))})),50)}}(t):v(t)})),g=eo(e,v);e.state.selectingText=g,fe(o.wrapper.ownerDocument,"mousemove",m),fe(o.wrapper.ownerDocument,"mouseup",g)}(e,r,t,i)}(t,r,i,e):Se(e)==n.scroller&&be(e):2==o?(r&&Yo(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==o&&(S?t.display.input.onContextMenu(e):Sr(t)))}}function ga(e,t,n){if("char"==n)return new _o(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new _o(et(t.line,0),ct(e.doc,et(t.line+1,0)));var r=n(e,t);return new _o(r.from,r.to)}function ya(e,t,n,r){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(t){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,c=a.lineDiv.getBoundingClientRect();if(i>c.bottom||!ge(e,n))return Oe(t);i-=c.top-a.viewOffset;for(var l=0;l=o)return he(e,n,e,Qe(e.doc,i),e.display.gutterSpecs[l].className,t),Oe(t)}}function ba(e,t){return ya(e,t,"gutterClick",!0)}function wa(e,t){xn(e.display,t)||function(e,t){return!!ge(e,"gutterContextMenu")&&ya(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||S||e.display.input.onContextMenu(t)}function Oa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Dn(e)}va.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var xa={toString:function(){return"CodeMirror.Init"}},Sa={},_a={};function Ca(e,t,n){if(!t!=!(n&&n!=xa)){var r=e.display.dragFunctions,o=t?fe:pe;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Ea(e){e.options.lineWrapping?(N(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(E(e.display.wrapper,"CodeMirror-wrap"),Ut(e)),lr(e),fr(e),Dn(e),setTimeout((function(){return Br(e)}),100)}function Ma(e,t){var n=this;if(!(this instanceof Ma))return new Ma(e,t);this.options=t=t?R(t):{},R(Sa,t,!1);var r=t.value;"string"==typeof r?r=new ji(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var o=new Ma.inputStyles[t.inputStyle](this),i=this.display=new go(e,r,o,t);for(var u in i.wrapper.CodeMirror=this,Oa(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Kr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new A,keySeq:null,specialChars:null},t.autofocus&&!g&&i.input.focus(),a&&c<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;fe(t.scroller,"mousedown",eo(e,ma)),fe(t.scroller,"dblclick",a&&c<11?eo(e,(function(t){if(!ve(e,t)){var n=ur(e,t);if(n&&!ba(e,t)&&!xn(e.display,t)){be(t);var r=e.findWordAt(n);Yo(e.doc,r.anchor,r.head)}}})):function(t){return ve(e,t)||be(t)}),fe(t.scroller,"contextmenu",(function(t){return wa(e,t)})),fe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||wa(e,n)}));var n,r={end:0};function o(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function i(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>400}fe(t.scroller,"touchstart",(function(o){if(!ve(e,o)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(o)&&!ba(e,o)){t.input.ensurePolled(),clearTimeout(n);var i=+new Date;t.activeTouch={start:i,moved:!1,prev:i-r.end<=300?r:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.touches[0].pageY)}})),fe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),fe(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!xn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,c=e.coordsChar(t.activeTouch,"page");a=!r.prev||i(r,r.prev)?new _o(c,c):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(c):new _o(et(c.line,0),ct(e.doc,et(c.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(n)}o()})),fe(t.scroller,"touchcancel",o),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Fr(e,t.scroller.scrollTop),Rr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return xo(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return xo(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ve(e,t)||xe(t)},over:function(t){ve(e,t)||(function(e,t){var n=ur(e,t);if(n){var r=document.createDocumentFragment();yr(e,n,r),e.display.dragCursor||(e.display.dragCursor=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),z(e.display.dragCursor,r)}}(e,t),xe(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Pi<100))xe(t);else if(!ve(e,t)&&!xn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=T("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}(e,t)},drop:eo(e,Ni),leave:function(t){ve(e,t)||Hi(e)}};var l=t.input.getField();fe(l,"keyup",(function(t){return fa.call(e,t)})),fe(l,"keydown",eo(e,sa)),fe(l,"keypress",eo(e,da)),fe(l,"focus",(function(t){return _r(e,t)})),fe(l,"blur",(function(t){return Cr(e,t)}))}(this),Ri(),qr(this),this.curOp.forceUpdate=!0,Lo(this,r),t.autofocus&&!g||this.hasFocus()?setTimeout(L(_r,this),20):Cr(this),_a)_a.hasOwnProperty(u)&&_a[u](this,t[u],xa);po(this),t.finishInit&&t.finishInit(this);for(var s=0;s150)){if(!r)return;n="prev"}}else u=0,n="not";"prev"==n?u=t>i.first?V(qe(i,t-1).text,null,a):0:"add"==n?u=l+e.options.indentUnit:"subtract"==n?u=l-e.options.indentUnit:"number"==typeof n&&(u=l+n),u=Math.max(0,u);var f="",d=0;if(e.options.indentWithTabs)for(var p=Math.floor(u/a);p;--p)d+=a,f+="\t";if(da,l=je(t),u=null;if(c&&r.ranges.length>1)if(ka&&ka.text.join("\n")==t){if(r.ranges.length%ka.text.length==0){u=[];for(var s=0;s=0;d--){var p=r.ranges[d],h=p.from(),v=p.to();p.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!c?v=et(v.line,Math.min(qe(i,v.line).text.length,v.ch+$(l).length)):c&&ka&&ka.lineWise&&ka.text.join("\n")==t&&(h=v=et(h.line,0)));var m={from:h,to:v,text:u?u[d%u.length]:l,origin:o||(c?"paste":e.state.cutIncoming>a?"cut":"+input")};si(e.doc,m),ln(e,"inputRead",e,m)}t&&!c&&Ha(e,t),jr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Na(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Jr(t,(function(){return Pa(t,n,0,null,"paste")})),!0}function Ha(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var c=0;c-1){a=Ta(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(qe(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Ta(e,o.head.line,"smart"));a&&ln(e,"electricInput",e,o.head.line)}}}function Fa(e){for(var t=[],n=[],r=0;r=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=ce(o,n.ch,n.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from=a.from&&d>=s.begin)){var p=f?"before":"after";return new et(n.line,d,p)}}var h=function(e,t,r){for(var i=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e0==(1!=a.level),u=c?r.begin:l(r.end,-1);if(a.from<=u&&u0?s.end:l(s.begin,-1);return null==m||r>0&&m==t.text.length||!(v=h(r>0?0:o.length-1,r,u(m)))?null:v}(e.cm,c,t,n):Ji(c,t,n))){if(r||(a=t.line+l)=e.first+e.size||(t=new et(a,t.ch,t.sticky),!(c=qe(e,a))))return!1;t=ea(o,e.cm,c,t.line,l)}else t=i;return!0}if("char"==r)u();else if("column"==r)u(!0);else if("word"==r||"group"==r)for(var s=null,f="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),p=!0;!(n<0)||u(!p);p=!1){var h=c.text.charAt(t.ch)||"\n",v=ee(h,d)?"w":f&&"\n"==h?"n":!f||/\s/.test(h)?null:"p";if(!f||p||v||(v="s"),s&&s!=v){n<0&&(n=1,u(),t.sticky="after");break}if(v&&(s=v),n>0&&!u(!p))break}var m=ai(e,t,i,a,!0);return nt(i,m)&&(m.hitSide=!0),m}function Aa(e,t,n,r){var o,i,a=e.doc,c=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),u=Math.max(l-.5*rr(e.display),3);o=(n>0?t.bottom:t.top)+n*u}else"line"==r&&(o=n>0?t.bottom+3:t.top-3);for(;(i=Xn(e,c,o)).outside;){if(n<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*n}return i}var Da=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new A,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ba(e,t){var n=jn(e,t.line);if(!n||n.hidden)return null;var r=qe(e.doc,t.line),o=Tn(n,r,t.line),i=ue(r,e.doc.direction),a="left";i&&(a=ce(i,t.ch)%2?"right":"left");var c=Ln(o.map,t.ch,a);return c.offset="right"==c.collapse?c.end:c.start,c}function Ia(e,t){return t&&(e.bad=!0),e}function Wa(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Ia(e.clipPos(et(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var o=0;o=t.display.viewTo||i.line=t.display.viewFrom&&Ba(t,o)||{node:l[0].measure.map[2],offset:0},s=i.liner.firstLine()&&(a=et(a.line-1,qe(r.doc,a.line-1).length)),c.ch==qe(r.doc,c.line).text.length&&c.lineo.viewTo-1)return!1;a.line==o.viewFrom||0==(e=sr(r,a.line))?(t=Xe(o.view[0].line),n=o.view[0].node):(t=Xe(o.view[e].line),n=o.view[e-1].node.nextSibling);var l,u,s=sr(r,c.line);if(s==o.view.length-1?(l=o.viewTo-1,u=o.lineDiv.lastChild):(l=Xe(o.view[s+1].line)-1,u=o.view[s+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(e,t,n,r,o){var i="",a=!1,c=e.doc.lineSeparator(),l=!1;function u(){a&&(i+=c,l&&(i+=c),a=l=!1)}function s(e){e&&(u(),i+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void s(n);var i,d=t.getAttribute("cm-marker");if(d){var p=e.findMarks(et(r,0),et(o+1,0),(m=+d,function(e){return e.id==m}));return void(p.length&&(i=p[0].find(0))&&s(Ge(e.doc,i.from,i.to).join(c)))}if("false"==t.getAttribute("contenteditable"))return;var h=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;h&&u();for(var v=0;v1&&d.length>1;)if($(f)==$(d))f.pop(),d.pop(),l--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var p=0,h=0,v=f[0],m=d[0],g=Math.min(v.length,m.length);pa.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)p--,h++;f[f.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(p).replace(/\u200b+$/,"");var O=et(t,p),x=et(l,d.length?$(d).length-h:0);return f.length>1||f[0]||tt(O,x)?(vi(r.doc,f,O,x,"+input"),!0):void 0},Da.prototype.ensurePolled=function(){this.forceCompositionEnd()},Da.prototype.reset=function(){this.forceCompositionEnd()},Da.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Da.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Da.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Jr(this.cm,(function(){return fr(e.cm)}))},Da.prototype.setUneditable=function(e){e.contentEditable="false"},Da.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||eo(this.cm,Pa)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Da.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Da.prototype.onContextMenu=function(){},Da.prototype.resetPosition=function(){},Da.prototype.needsContentAttribute=!0;var Ua=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new A,this.hasSelection=!1,this.composing=null};Ua.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!ve(r,e)){if(r.somethingSelected())ja({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Fa(r);ja({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,I):(n.prevInput="",o.value=t.text.join("\n"),F(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(o.style.width="0px"),fe(o,"input",(function(){a&&c>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),fe(o,"paste",(function(e){ve(r,e)||Na(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),fe(o,"cut",i),fe(o,"copy",i),fe(e.scroller,"paste",(function(t){if(!xn(e,t)&&!ve(r,t)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,o.dispatchEvent(i)}})),fe(e.lineSpace,"selectstart",(function(t){xn(e,t)||be(t)})),fe(o,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),fe(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ua.prototype.createField=function(e){this.wrapper=Ra(),this.textarea=this.wrapper.firstChild},Ua.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=gr(e);if(e.options.moveInputWithCursor){var o=Gn(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},Ua.prototype.showSelection=function(e){var t=this.cm.display;z(t.cursorDiv,e.cursors),z(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ua.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&F(this.textarea),a&&c>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&c>=9&&(this.hasSelection=null))}},Ua.prototype.getField=function(){return this.textarea},Ua.prototype.supportsTouch=function(){return!1},Ua.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||P()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ua.prototype.blur=function(){this.textarea.blur()},Ua.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ua.prototype.receivedFocus=function(){this.slowPoll()},Ua.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ua.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ua.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Pe(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(a&&c>=9&&this.hasSelection===o||y&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="\u200b"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var l=0,u=Math.min(r.length,o.length);l1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ua.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ua.prototype.onKeyPress=function(){a&&c>=9&&(this.hasSelection=null),this.fastPoll()},Ua.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=ur(n,e),u=r.scroller.scrollTop;if(i&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(i)&&eo(n,ei)(n.doc,Eo(i),I);var s,d=o.style.cssText,p=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-h.top-5)+"px; left: "+(e.clientX-h.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(s=window.scrollY),r.input.focus(),l&&window.scrollTo(null,s),r.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=g,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&c>=9&&m(),S){xe(e);var v=function(){pe(window,"mouseup",v),setTimeout(g,20)};fe(window,"mouseup",v)}else setTimeout(g,50)}function m(){if(null!=o.selectionStart){var e=n.somethingSelected(),i="\u200b"+(e?o.value:"");o.value="\u21da",o.value=i,t.prevInput=e?"":"\u200b",o.selectionStart=1,o.selectionEnd=i.length,r.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,o.style.cssText=d,a&&c<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=u),null!=o.selectionStart)){(!a||a&&c<9)&&m();var e=0,i=function(){r.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"\u200b"==t.prevInput?eo(n,li)(n):e++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},Ua.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e},Ua.prototype.setUneditable=function(){},Ua.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,o,i){e.defaults[n]=r,o&&(t[n]=i?function(e,t,n){n!=xa&&o(e,t,n)}:o)}e.defineOption=n,e.Init=xa,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,jo(e)}),!0),n("indentUnit",2,jo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Po(e),Dn(e),fr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,n.push(et(r,i))}r++}));for(var o=n.length-1;o>=0;o--)vi(e.doc,t,n[o],et(n[o].line,n[o].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=xa&&e.refresh()})),n("specialCharPlaceholder",Zt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",g?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Oa(e),mo(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Xi(t),o=n!=xa&&Xi(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ea,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=ho(t,e.options.lineNumbers),mo(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?ar(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Br(e)}),!0),n("scrollbarStyle","native",(function(e){Kr(e),Br(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=ho(e.options.gutters,t),mo(e)}),!0),n("firstLineNumber",1,mo,!0),n("lineNumberFormatter",(function(e){return e}),mo,!0),n("showCursorWhenSelecting",!1,mr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Cr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Ca),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,mr,!0),n("singleCursorHeightPerLine",!0,mr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Po,!0),n("addModeClass",!1,Po,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Po,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(Ma),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,o=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&eo(this,t[e])(this,n,o),he(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Xi(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;nn&&(Ta(this,o.head.line,e,!0),n=o.head.line,r==this.doc.sel.primIndex&&jr(this));else{var i=o.from(),a=o.to(),c=Math.max(n,i.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=c;l0&&Qo(this.doc,r,new _o(i,u[r].to()),I)}}})),getTokenAt:function(e,t){return yt(this,e,t)},getLineTokens:function(e,t){return yt(this,et(e),t,!0)},getTokenTypeAt:function(e){e=ct(this.doc,e);var t,n=dt(this,qe(this.doc,e.line)),r=0,o=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var a=r+o>>1;if((a?n[2*a-1]:0)>=i)o=a;else{if(!(n[2*a+1]i&&(e=i,o=!0),r=qe(this.doc,e)}else r=e;return Kn(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-Wt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return or(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i,a,c,l=this.display,u=(e=Gn(this,ct(this.doc,e))).bottom,s=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)u=e.top;else if("above"==r||"near"==r){var f=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?u=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(u=e.bottom),s+t.offsetWidth>d&&(s=d-t.offsetWidth)}t.style.top=u+"px",t.style.left=t.style.right="","right"==o?(s=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?s=0:"middle"==o&&(s=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=s+"px"),n&&(i=this,a={left:s,top:u,right:s+t.offsetWidth,bottom:u+t.offsetHeight},null!=(c=Tr(i,a)).scrollTop&&Fr(i,c.scrollTop),null!=c.scrollLeft&&Rr(i,c.scrollLeft))},triggerOnKeyDown:to(sa),triggerOnKeyPress:to(da),triggerOnKeyUp:fa,triggerOnMouseDown:to(ma),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:to((function(e){Ha(this,e)})),findPosH:function(e,t,n,r){var o=1;t<0&&(o=-1,t=-t);for(var i=ct(this.doc,e),a=0;a0&&a(t.charAt(n-1));)--n;for(;r.5)&&lr(this),he(this,"refresh",this)})),swapDoc:to((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Lo(this,e),Dn(this),this.display.input.reset(),Pr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},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}},ye(e),e.registerHelper=function(t,r,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=o},e.registerGlobalHelper=function(t,r,o,i){e.registerHelper(t,r,i),n[t]._global.push({pred:o,val:i})}}(Ma);var qa="iter insert remove copy getEditor constructor".split(" ");for(var Ga in ji.prototype)ji.prototype.hasOwnProperty(Ga)&&D(qa,Ga)<0&&(Ma.prototype[Ga]=function(e){return function(){return e.apply(this.doc,arguments)}}(ji.prototype[Ga]));return ye(ji),Ma.inputStyles={textarea:Ua,contenteditable:Da},Ma.defineMode=function(e){Ma.defaults.mode||"null"==e||(Ma.defaults.mode=e),Re.apply(this,arguments)},Ma.defineMIME=function(e,t){Le[e]=t},Ma.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ma.defineMIME("text/plain","null"),Ma.defineExtension=function(e,t){Ma.prototype[e]=t},Ma.defineDocExtension=function(e,t){ji.prototype[e]=t},Ma.fromTextArea=function(e,t){if((t=t?R(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=P();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=c.getValue()}var o;if(e.form&&(fe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var c=Ma((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return c},function(e){e.off=pe,e.on=fe,e.wheelEventPixels=Oo,e.Doc=ji,e.splitLines=je,e.countColumn=V,e.findColumn=U,e.isWordChar=J,e.Pass=B,e.signal=he,e.Line=qt,e.changeEnd=Mo,e.scrollbarModel=Wr,e.Pos=et,e.cmpPos=tt,e.modes=Fe,e.mimeModes=Le,e.resolveMode=Ve,e.getMode=Ae,e.modeExtensions=De,e.extendMode=Be,e.copyState=Ie,e.startState=Ke,e.innerMode=We,e.commands=ta,e.keyMap=Wi,e.keyName=Yi,e.isModifierKey=Gi,e.lookupKey=qi,e.normalizeKeyMap=Ui,e.StringStream=Ue,e.SharedTextMarker=Mi,e.TextMarker=Ci,e.LineWidget=xi,e.e_preventDefault=be,e.e_stopPropagation=we,e.e_stop=xe,e.addClass=N,e.contains=j,e.rmClass=E,e.keyNames=Ai}(Ma),Ma.version="5.52.2",Ma}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=a,t.getActiveIndex=function(e,t){for(var n=a(e),r=0;r2&&void 0!==arguments[2]?arguments[2]:"ltr",r=l(t)?"translateY":"translateX";if(!l(t)&&"rtl"===n)return"".concat(r,"(").concat(100*e,"%) translateZ(0)");return"".concat(r,"(").concat(100*-e,"%) translateZ(0)")},t.getMarginStyle=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"ltr",r=l(t)?"marginTop":"marginLeft";if(!l(t)&&"rtl"===n)return i({},r,"".concat(100*(e+1),"%"));return i({},r,"".concat(100*-e,"%"))},t.getStyle=u,t.setPxStyle=function(e,t,n){t=n?"0px, ".concat(t,"px, 0px"):"".concat(t,"px, 0px, 0px"),c(e.style,"translate3d(".concat(t,")"))},t.getDataAttr=function(e){return Object.keys(e).reduce((function(t,n){return"aria-"!==n.substr(0,5)&&"data-"!==n.substr(0,5)&&"role"!==n||(t[n]=e[n]),t}),{})},t.getLeft=function(e,t){return f("left","offsetWidth","right",e,t)},t.getTop=function(e,t){return f("top","offsetHeight","bottom",e,t)};var r,o=(r=n(0))&&r.__esModule?r:{default:r};function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=[];return o.default.Children.forEach(e,(function(e){e&&t.push(e)})),t}function c(e,t){e.transform=t,e.webkitTransform=t,e.mozTransform=t}function l(e){return"left"===e||"right"===e}function u(e,t){return+window.getComputedStyle(e).getPropertyValue(t).replace("px","")}function s(e,t){return+e.getPropertyValue(t).replace("px","")}function f(e,t,n,r,o){var i=u(o,"padding-".concat(e));if(!r||!r.parentNode)return i;var a=r.parentNode.childNodes;return Array.prototype.some.call(a,(function(o){var a=window.getComputedStyle(o);return o!==r?(i+=s(a,"margin-".concat(e)),i+=o[t],i+=s(a,"margin-".concat(n)),"content-box"===a.boxSizing&&(i+=s(a,"border-".concat(e,"-width"))+s(a,"border-".concat(n,"-width"))),!1):(i+=s(a,"margin-".concat(e)),!0)})),i}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reg=void 0;var r,o=(r=n(11))&&r.__esModule?r:{default:r};const i=n(683);t.reg=e=>{i.keys().map(t=>{let r=t.match(/^\.\/([\w\-]+)\.js$/),i=r?r[1]:null;i&&"index"!==i&&o.default.on(i,(...t)=>{n(684)(`./${i}`)(e,...t)})})}},function(e,t,n){"use strict";var r,o=(r=n(11))&&r.__esModule?r:{default:r};const i=n(57);e.exports=(e,t,n=null,r=!1)=>o.default.pact("saveHosts",t).then(t=>{r||i(e,t,n)}).catch(e=>{console.log(e)})},function(e,t,n){"use strict";n.r(t),function(e){var n=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),O="undefined"!=typeof WeakMap?new WeakMap:new n,x=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),r=new w(t,n,this);O.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){x.prototype[e]=function(){var t;return(t=O.get(this))[e].apply(t,arguments)}}));var S=void 0!==o.ResizeObserver?o.ResizeObserver:x;t.default=S}.call(this,n(19))},function(e,t,n){"use strict";var r=n(20);function o(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t{this.onCancel()})}onOK(){this.props.onOK()}onCancel(){this.props.onCancel()}renderFootButtons(){let e=[],{lang:t}=this.props;return e.push(i.default.createElement("div",{className:"button btn-cancel",key:"btn-cancel",onClick:this.onCancel.bind(this)},this.props.cancel_title||t.cancel)),e.push(i.default.createElement("div",{className:"button btn-ok btn-default",key:"btn-ok",onClick:this.onOK.bind(this)},this.props.ok_title||t.ok)),e}render(){if(!this.props.show)return null;let{show:e,title:t,body:n,lang:a,width:c,okText:l,cancelText:u,maskClosable:s}=this.props;return i.default.createElement(r.default,{visible:e,title:i.default.createElement("h3",null,t),onOk:this.onOK.bind(this),onCancel:this.onCancel.bind(this),wrapClassName:"frame",width:c,footer:[i.default.createElement(o.default,{key:"back",size:"large",onClick:this.onCancel.bind(this)},u||a.cancel),i.default.createElement(o.default,{key:"submit",type:"primary",size:"large",loading:!1,onClick:this.onOK.bind(this)},l||a.ok)],maskClosable:s},i.default.createElement("div",{className:"prompt-body"},n))}}t.default=l},function(e,t,n){"use strict";t.__esModule=!0;var r=a(n(294)),o=a(n(305)),i="function"==typeof o.default&&"symbol"==typeof r.default?function(e){return typeof e}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":typeof e};function a(e){return e&&e.__esModule?e:{default:e}}t.default="function"==typeof o.default&&"symbol"===i(r.default)?function(e){return void 0===e?"undefined":i(e)}:function(e){return e&&"function"==typeof o.default&&e.constructor===o.default&&e!==o.default.prototype?"symbol":void 0===e?"undefined":i(e)}},function(e,t,n){"use strict";var r=n(0),o=n(3),i=n.n(o),a=n(20);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var s=r.forwardRef((function(e,t){var n=e.className,o=e.component,s=e.viewBox,f=e.spin,d=e.rotate,p=e.tabIndex,h=e.onClick,v=e.children,m=u(e,["className","component","viewBox","spin","rotate","tabIndex","onClick","children"]);Object(a.g)(Boolean(o||v),"Should have `component` prop or `children`."),Object(a.f)();var g=i()("anticon",n),y=i()({"anticon-spin":!!f}),b=d?{msTransform:"rotate(".concat(d,"deg)"),transform:"rotate(".concat(d,"deg)")}:void 0,w=function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function p(e,t){return e<0?0:e>=t?t:e}function h(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;if(n<=r)return 0;var o=n-r;return p(t,o)/o}function v(e){return e?h(e):0}function m(e,t,n){var r=function(e,t){var n=Math.floor(e*t),r=n/t;return{index:n,offsetPtg:(e-r)/((n+1)/t-r)}}(e,t),o=r.index,i=r.offsetPtg,a=Math.ceil(e*n),c=Math.ceil((1-e)*n);return{itemIndex:o,itemOffsetPtg:i,startIndex:Math.max(0,o-a),endIndex:Math.min(t-1,o+c)}}function g(e){var t=e.itemIndex,n=e.itemOffsetPtg,r=e.itemElementHeights,o=e.scrollPtg*e.clientHeight,i=n*(r[(0,e.getItemKey)(t)]||0);return Math.floor(o-i)}function y(e){var t=e.locatedItemRelativeTop,n=e.locatedItemIndex,r=e.compareItemIndex,o=e.startIndex,i=e.endIndex,a=e.getItemKey,c=e.itemElementHeights,l=t,u=a(r);if(r<=n)for(var s=n;s>=o;s-=1){if(a(s)===u)break;l-=c[a(s-1)]||0}else for(var f=n;f<=i;f+=1){var d=a(f);if(d===u)break;l+=c[d]||0}return l}function b(e,t,n,r){return!1!==r&&"number"==typeof e&&n*t>e}function w(e,t,n,r){var o=n-e,i=t-n;if(r<=2*Math.min(o,i)){var a=Math.floor(r/2);return r%2?n+a+1:n-a}return o>i?n-(r-i):n+(r-o)}function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t){for(var n=0;n=p}if(!r){var v=m(O,a.length,f),g=v.itemIndex,b=v.itemOffsetPtg,S=v.startIndex,_=v.endIndex;return void n.setState({scrollTop:w,itemIndex:g,itemOffsetPtg:b,startIndex:S,endIndex:_})}t=un.listRef.current.scrollTop+p&&(S="bottom")),"top"===S?n.listRef.current.scrollTop=E:"bottom"===S&&(n.listRef.current.scrollTop=E-(p-_))}}}else n.listRef.current.scrollTop=e}))},n.renderChildren=function(e,t,o){var i=n.state.status;return e.map((function(e,a){var c=t+a,l=o(e,c,{style:"MEASURE_START"===i?{visibility:"hidden"}:{}}),u=n.getIndexKey(c);return r.cloneElement(l,{key:u,ref:function(e){n.itemElements[u]=e}})}))},n.cachedProps=e,n.state={status:"NONE",scrollTop:null,itemIndex:0,itemOffsetPtg:0,startIndex:0,endIndex:0,startItemTop:0,isVirtual:b(e.height,e.itemHeight,e.data.length,e.virtual),itemCount:e.data.length},n}var n,o,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&T(e,t)}(t,e),n=t,a=[{key:"getDerivedStateFromProps",value:function(e){return e.disabled?null:{itemCount:e.data.length}}}],(o=[{key:"componentDidMount",value:function(){this.listRef.current&&(this.listRef.current.scrollTop=0,this.onScroll(null))}},{key:"componentDidUpdate",value:function(){var e=this,t=this.state.status,n=this.props,r=n.data,o=n.height,i=n.itemHeight,a=n.disabled,c=n.onSkipRender,l=n.virtual,u=this.cachedProps.data||[],s=null;if(u.length!==r.length){var f=function(e,t,n){var r,o,i=e.length,a=t.length;if(0===i&&0===a)return null;iu.length){var p=this.state,m=p.startIndex,w=p.endIndex;c&&(null===s||s=_;T-=1)z-=this.itemElementHeights[this.getIndexKey(T)]||0;this.setState({status:"MEASURE_DONE",startItemTop:z})}var k;if("SWITCH_TO_RAW"===t){for(var j=this.state.cacheScroll,P=j.itemIndex,N=j.relativeTop,H=0;H10)break}null!==s&&(this.lockScroll=!0,this.listRef.current.scrollTop=s,this.setState({status:"MEASURE_START",scrollTop:s,itemIndex:f,itemOffsetPtg:d,startIndex:p,endIndex:v}),requestAnimationFrame((function(){requestAnimationFrame((function(){t.lockScroll=!1}))})))}},{key:"render",value:function(){var e=this.state,t=e.isVirtual,n=e.itemCount,o=this.props,a=o.prefixCls,c=o.style,l=o.className,u=o.component,f=void 0===u?"div":u,d=o.height,p=o.itemHeight,h=o.fullHeight,v=void 0===h||h,m=o.data,g=o.children,y=(o.itemKey,o.onSkipRender,o.disabled,o.virtual),w=_(o,["prefixCls","style","className","component","height","itemHeight","fullHeight","data","children","itemKey","onSkipRender","disabled","virtual"]),O=i()(a,l);if(!t){var C=b(d,p,m.length,y);return r.createElement(f,Object.assign({style:d?x({},c,S({},v?"height":"maxHeight",d),k):c,className:O},w,{onScroll:this.onRawScroll,ref:this.listRef}),r.createElement(s,{prefixCls:a,height:d},this.renderChildren(C?m.slice(0,Math.ceil(d/p)):m,0,g)))}var E=x({},c,{height:d},k),M=this.state,z=M.status,T=M.startIndex,j=M.endIndex,P=M.startItemTop,N=n*p*1;return r.createElement(f,Object.assign({style:E,className:O},w,{onScroll:this.onScroll,ref:this.listRef}),r.createElement(s,{prefixCls:a,height:N,offset:"MEASURE_DONE"===z?P:0},this.renderChildren(m.slice(T,j+1),T,g)))}}])&&E(n.prototype,o),a&&E(n,a),t}(r.Component);j.defaultProps={itemHeight:15,data:[]};var P=j;t.a=P},function(e,t,n){var r=n(423);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(288);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(63);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(126)("keys"),o=n(95);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(34),o=n(46),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(94)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(62),o=n(298),i=n(127),a=n(125)("IE_PROTO"),c=function(){},l=function(){var e,t=n(183)("iframe"),r=i.length;for(t.style.display="none",n(299).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("