From 30329c07c059f093b876b0697ef7a53633fb0b9a Mon Sep 17 00:00:00 2001 From: JiHong88 <0125ses@hanmail.net> Date: Fri, 20 Dec 2019 15:07:22 +0900 Subject: [PATCH 1/3] fix: key code define --- src/lib/core.js | 19 ++++++++++--------- test/dev/suneditor_build_test.js | 4 +++- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/lib/core.js b/src/lib/core.js index f723c63ad..0ccdd36a8 100755 --- a/src/lib/core.js +++ b/src/lib/core.js @@ -3102,8 +3102,9 @@ export default function (context, pluginCallButtons, plugins, lang, _options) { * @description event function */ const event = { - _directionKeyKeyCode: new _w.RegExp('^(8|13|32|46|3[3-9]|40|46)$'), - _historyIgnoreKeycode: new _w.RegExp('^(13|1[6-7]|20|27|3[3-9]|40|45|11[2-9]|12[0-3]|144|145)$'), + _directionKeyCode: new _w.RegExp('^(8|13|32|46|3[3-9]|40|46)$'), + _nonTextKeyCode: new _w.RegExp('^(8|13|1[6-9]|20|27|3[3-9]|40|45|46|11[2-9]|12[0-3]|144|145)$'), + _historyIgnoreKeyCode: new _w.RegExp('^(1[6-9]|20|27|3[3-9]|40|45|11[2-9]|12[0-3]|144|145)$'), _onButtonsCheck: new _w.RegExp('^(STRONG|INS|EM|DEL|SUB|SUP|LI)$'), _frontZeroWidthReg: new _w.RegExp('^' + util.zeroWidthSpace + '+', ''), _keyCodeShortcut: { @@ -3572,7 +3573,7 @@ export default function (context, pluginCallButtons, plugins, lang, _options) { const ctrl = e.ctrlKey || e.metaKey; const alt = e.altKey; - if (!event._directionKeyKeyCode.test(keyCode)) _w.setTimeout(core._resourcesStateChange); + if (!event._directionKeyCode.test(keyCode)) _w.setTimeout(core._resourcesStateChange); if (core._isBalloon) { event._hideToolbar(); @@ -3588,7 +3589,7 @@ export default function (context, pluginCallButtons, plugins, lang, _options) { /** default key action */ const selectionNode = core.getSelectionNode(); const range = core.getRange(); - const selectRange = range.startContainer !== range.endContainer; + const selectRange = !range.collapsed || range.startContainer !== range.endContainer; const resizingName = core._resizingName; let formatEl = util.getFormatElement(selectionNode) || selectionNode; let rangeEl = util.getRangeFormatElement(selectionNode); @@ -3806,7 +3807,7 @@ export default function (context, pluginCallButtons, plugins, lang, _options) { } } - const textKey = !ctrl && !alt && !event._historyIgnoreKeycode.test(keyCode); + const textKey = !ctrl && !alt && !selectRange && !event._nonTextKeyCode.test(keyCode); if (!core._charCount(1, textKey)) { if (textKey) { e.preventDefault(); @@ -3856,15 +3857,14 @@ export default function (context, pluginCallButtons, plugins, lang, _options) { selectionNode = core.getSelectionNode(); } - if (event._directionKeyKeyCode.test(keyCode)) { + if (event._directionKeyCode.test(keyCode)) { event._findButtonEffectTag(); } core._checkComponents(); - const textKey = !ctrl && !alt && !event._historyIgnoreKeycode.test(keyCode); - - if (textKey && util.zeroWidthRegExp.test(selectionNode.textContent)) { + const historyIgnoreKey = !ctrl && !alt && !event._historyIgnoreKeyCode.test(keyCode); + if (historyIgnoreKey && util.zeroWidthRegExp.test(selectionNode.textContent)) { const range = core.getRange(); const s = range.startOffset, e = range.endOffset; const frontZeroWidthCnt = (selectionNode.textContent.match(event._frontZeroWidthReg) || '').length; @@ -3872,6 +3872,7 @@ export default function (context, pluginCallButtons, plugins, lang, _options) { core.setRange(selectionNode, s - frontZeroWidthCnt, selectionNode, e - frontZeroWidthCnt); } + const textKey = !ctrl && !alt && !event._nonTextKeyCode.test(keyCode); if (!core._charCount(1, textKey)) { if (e.key.length === 1) { e.preventDefault(); diff --git a/test/dev/suneditor_build_test.js b/test/dev/suneditor_build_test.js index 3756b3482..f66c9b7c4 100644 --- a/test/dev/suneditor_build_test.js +++ b/test/dev/suneditor_build_test.js @@ -456,7 +456,8 @@ let s3 = editor.create(document.getElementsByName('editor3')[0], { style: 'margin: 10px; background-color: #f5f5f5;', command: 'replace' }], - placeholder: 'Start typing something.4..' + placeholder: 'Start typing something.4..', + maxCharCount: 280, }); window.sun_destroy3 = function () { s3.destroy(); @@ -493,6 +494,7 @@ window.sun_create4 = function() { imageWidth: 300, mode: 'classic', // toolbarWidth: 800, + maxCharCount: 280, height: 'auto', placeholder: 'Start typing something..5.' // callBackSave: (contents) => { From 674e8d1a07ff631f5b7bc85a55d44a1d4b9f921c Mon Sep 17 00:00:00 2001 From: JiHong88 <0125ses@hanmail.net> Date: Fri, 20 Dec 2019 15:59:39 +0900 Subject: [PATCH 2/3] update: sample --- sample/css/bootstrap.css | 7215 ++++---------------------------------- 1 file changed, 680 insertions(+), 6535 deletions(-) diff --git a/sample/css/bootstrap.css b/sample/css/bootstrap.css index f2883dbd2..0f770b32a 100644 --- a/sample/css/bootstrap.css +++ b/sample/css/bootstrap.css @@ -12,101 +12,64 @@ html { body { margin: 0; } -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} -audio, -canvas, -progress, -video { - display: inline-block; - vertical-align: baseline; -} -audio:not([controls]) { - display: none; - height: 0; -} -[hidden], -template { - display: none; -} -a { - background-color: transparent; -} -a:active, -a:hover { - outline: 0; -} -abbr[title] { - border-bottom: 1px dotted; -} -b, -strong { - font-weight: bold; -} -dfn { - font-style: italic; -} -h1 { - margin: .67em 0; - font-size: 2em; -} -mark { - color: #000; - background: #ff0; + +input { + line-height: normal; } -small { - font-size: 80%; +input[type="checkbox"], +input[type="radio"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding: 0; } -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; } -sup { - top: -.5em; + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } -sub { - bottom: -.25em; +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } -img { - border: 0; +html { + font-size: 10px; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } -svg:not(:root) { - overflow: hidden; +body { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 1.42857143; + color: #333; + background-color: #fff; } -figure { - margin: 1em 40px; +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; } -hr { - height: 0; - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; +a { + color: #337ab7; + text-decoration: none; } -pre { - overflow: auto; +a:hover, +a:focus { + color: #23527c; + text-decoration: underline; } -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; +a:focus { + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } button, input, @@ -135,6348 +98,791 @@ button[disabled], html input[disabled] { cursor: default; } -button::-moz-focus-inner, -input::-moz-focus-inner { +.sr-only { + position: absolute; + width: 1px; + height: 1px; padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); border: 0; } -input { - line-height: normal; -} -input[type="checkbox"], -input[type="radio"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - padding: 0; -} -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { +.sr-only-focusable:active, +.sr-only-focusable:focus { + position: static; + width: auto; height: auto; + margin: 0; + overflow: visible; + clip: auto; } -input[type="search"] { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} -fieldset { - padding: .35em .625em .75em; - margin: 0 2px; - border: 1px solid #c0c0c0; -} -legend { - padding: 0; - border: 0; -} -textarea { - overflow: auto; -} -optgroup { - font-weight: bold; -} -table { - border-spacing: 0; - border-collapse: collapse; -} -td, -th { - padding: 0; +ul, +ol { + margin-top: 0; + margin-bottom: 10px; } -/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */ -@media print { - *, - *:before, - *:after { - color: #000 !important; - text-shadow: none !important; - background: transparent !important; - -webkit-box-shadow: none !important; - box-shadow: none !important; - } - a, - a:visited { - text-decoration: underline; - } - a[href]:after { - content: " (" attr(href) ")"; - } - abbr[title]:after { - content: " (" attr(title) ")"; - } - a[href^="#"]:after, - a[href^="javascript:"]:after { - content: ""; - } - pre, - blockquote { - border: 1px solid #999; - page-break-inside: avoid; - } - thead { - display: table-header-group; - } - tr, - img { - page-break-inside: avoid; - } - img { - max-width: 100% !important; - } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - h2, - h3 { - page-break-after: avoid; - } - .navbar { - display: none; - } - .btn > .caret, - .dropup > .btn > .caret { - border-top-color: #000 !important; - } - .label { - border: 1px solid #000; - } - .table { - border-collapse: collapse !important; - } - .table td, - .table th { - background-color: #fff !important; - } - .table-bordered th, - .table-bordered td { - border: 1px solid #ddd !important; - } +.container-fluid { + padding-right: 15px; + padding-left: 15px; + margin-right: auto; + margin-left: auto; + max-width: 1020px; } -@font-face { - font-family: 'Glyphicons Halflings'; - src: url('../fonts/glyphicons-halflings-regular.eot'); - src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg'); -} -.glyphicon { - position: relative; - top: 1px; +label { display: inline-block; - font-family: 'Glyphicons Halflings'; - font-style: normal; - font-weight: normal; - line-height: 1; - - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; -} -.glyphicon-asterisk:before { - content: "\002a"; -} -.glyphicon-plus:before { - content: "\002b"; -} -.glyphicon-euro:before, -.glyphicon-eur:before { - content: "\20ac"; -} -.glyphicon-minus:before { - content: "\2212"; -} -.glyphicon-cloud:before { - content: "\2601"; -} -.glyphicon-envelope:before { - content: "\2709"; -} -.glyphicon-pencil:before { - content: "\270f"; -} -.glyphicon-glass:before { - content: "\e001"; -} -.glyphicon-music:before { - content: "\e002"; -} -.glyphicon-search:before { - content: "\e003"; -} -.glyphicon-heart:before { - content: "\e005"; + max-width: 100%; + margin-bottom: 5px; + font-weight: bold; } -.glyphicon-star:before { - content: "\e006"; +input[type="search"] { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; } -.glyphicon-star-empty:before { - content: "\e007"; +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + line-height: normal; } -.glyphicon-user:before { - content: "\e008"; +input[type="file"] { + display: block; } -.glyphicon-film:before { - content: "\e009"; +input[type="range"] { + display: block; + width: 100%; } -.glyphicon-th-large:before { - content: "\e010"; +select[multiple], +select[size] { + height: auto; } -.glyphicon-th:before { - content: "\e011"; +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } -.glyphicon-th-list:before { - content: "\e012"; +.radio, +.checkbox { + position: relative; + display: block; + margin-top: 10px; + margin-bottom: 10px; } -.glyphicon-ok:before { - content: "\e013"; +.radio label, +.checkbox label { + min-height: 20px; + padding-left: 20px; + margin-bottom: 0; + font-weight: normal; + cursor: pointer; } -.glyphicon-remove:before { - content: "\e014"; +.btn { + display: inline-block; + padding: 6px 12px; + margin-bottom: 0; + font-size: 14px; + font-weight: normal; + line-height: 1.42857143; + text-align: center; + white-space: nowrap; + vertical-align: middle; + -ms-touch-action: manipulation; + touch-action: manipulation; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; } -.glyphicon-zoom-in:before { - content: "\e015"; +.btn:focus, +.btn:active:focus, +.btn.active:focus, +.btn.focus, +.btn:active.focus, +.btn.active.focus { + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; } -.glyphicon-zoom-out:before { - content: "\e016"; +.btn:hover, +.btn:focus, +.btn.focus { + color: #333; + text-decoration: none; } -.glyphicon-off:before { - content: "\e017"; +.btn:active, +.btn.active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); + box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); } -.glyphicon-signal:before { - content: "\e018"; +.btn.disabled, +.btn[disabled] { + cursor: not-allowed; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + box-shadow: none; + opacity: .65; } -.glyphicon-cog:before { - content: "\e019"; +a.btn.disabled { + pointer-events: none; } -.glyphicon-trash:before { - content: "\e020"; +.btn-default { + color: #333; + background-color: #fff; + border-color: #ccc; } -.glyphicon-home:before { - content: "\e021"; +.btn-default:focus, +.btn-default.focus { + color: #333; + background-color: #e6e6e6; + border-color: #8c8c8c; } -.glyphicon-file:before { - content: "\e022"; +.btn-default:hover { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; } -.glyphicon-time:before { - content: "\e023"; +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + color: #333; + background-color: #e6e6e6; + border-color: #adadad; } -.glyphicon-road:before { - content: "\e024"; -} -.glyphicon-download-alt:before { - content: "\e025"; -} -.glyphicon-download:before { - content: "\e026"; -} -.glyphicon-upload:before { - content: "\e027"; -} -.glyphicon-inbox:before { - content: "\e028"; -} -.glyphicon-play-circle:before { - content: "\e029"; -} -.glyphicon-repeat:before { - content: "\e030"; -} -.glyphicon-refresh:before { - content: "\e031"; -} -.glyphicon-list-alt:before { - content: "\e032"; -} -.glyphicon-lock:before { - content: "\e033"; -} -.glyphicon-flag:before { - content: "\e034"; -} -.glyphicon-headphones:before { - content: "\e035"; -} -.glyphicon-volume-off:before { - content: "\e036"; -} -.glyphicon-volume-down:before { - content: "\e037"; -} -.glyphicon-volume-up:before { - content: "\e038"; -} -.glyphicon-qrcode:before { - content: "\e039"; -} -.glyphicon-barcode:before { - content: "\e040"; -} -.glyphicon-tag:before { - content: "\e041"; -} -.glyphicon-tags:before { - content: "\e042"; -} -.glyphicon-book:before { - content: "\e043"; -} -.glyphicon-bookmark:before { - content: "\e044"; -} -.glyphicon-print:before { - content: "\e045"; -} -.glyphicon-camera:before { - content: "\e046"; -} -.glyphicon-font:before { - content: "\e047"; -} -.glyphicon-bold:before { - content: "\e048"; -} -.glyphicon-italic:before { - content: "\e049"; -} -.glyphicon-text-height:before { - content: "\e050"; -} -.glyphicon-text-width:before { - content: "\e051"; -} -.glyphicon-align-left:before { - content: "\e052"; -} -.glyphicon-align-center:before { - content: "\e053"; -} -.glyphicon-align-right:before { - content: "\e054"; -} -.glyphicon-align-justify:before { - content: "\e055"; -} -.glyphicon-list:before { - content: "\e056"; -} -.glyphicon-indent-left:before { - content: "\e057"; -} -.glyphicon-indent-right:before { - content: "\e058"; -} -.glyphicon-facetime-video:before { - content: "\e059"; -} -.glyphicon-picture:before { - content: "\e060"; -} -.glyphicon-map-marker:before { - content: "\e062"; -} -.glyphicon-adjust:before { - content: "\e063"; -} -.glyphicon-tint:before { - content: "\e064"; -} -.glyphicon-edit:before { - content: "\e065"; -} -.glyphicon-share:before { - content: "\e066"; -} -.glyphicon-check:before { - content: "\e067"; -} -.glyphicon-move:before { - content: "\e068"; -} -.glyphicon-step-backward:before { - content: "\e069"; -} -.glyphicon-fast-backward:before { - content: "\e070"; -} -.glyphicon-backward:before { - content: "\e071"; -} -.glyphicon-play:before { - content: "\e072"; -} -.glyphicon-pause:before { - content: "\e073"; -} -.glyphicon-stop:before { - content: "\e074"; -} -.glyphicon-forward:before { - content: "\e075"; -} -.glyphicon-fast-forward:before { - content: "\e076"; -} -.glyphicon-step-forward:before { - content: "\e077"; -} -.glyphicon-eject:before { - content: "\e078"; -} -.glyphicon-chevron-left:before { - content: "\e079"; -} -.glyphicon-chevron-right:before { - content: "\e080"; -} -.glyphicon-plus-sign:before { - content: "\e081"; -} -.glyphicon-minus-sign:before { - content: "\e082"; -} -.glyphicon-remove-sign:before { - content: "\e083"; -} -.glyphicon-ok-sign:before { - content: "\e084"; -} -.glyphicon-question-sign:before { - content: "\e085"; -} -.glyphicon-info-sign:before { - content: "\e086"; -} -.glyphicon-screenshot:before { - content: "\e087"; -} -.glyphicon-remove-circle:before { - content: "\e088"; -} -.glyphicon-ok-circle:before { - content: "\e089"; -} -.glyphicon-ban-circle:before { - content: "\e090"; -} -.glyphicon-arrow-left:before { - content: "\e091"; -} -.glyphicon-arrow-right:before { - content: "\e092"; -} -.glyphicon-arrow-up:before { - content: "\e093"; -} -.glyphicon-arrow-down:before { - content: "\e094"; -} -.glyphicon-share-alt:before { - content: "\e095"; -} -.glyphicon-resize-full:before { - content: "\e096"; -} -.glyphicon-resize-small:before { - content: "\e097"; -} -.glyphicon-exclamation-sign:before { - content: "\e101"; -} -.glyphicon-gift:before { - content: "\e102"; -} -.glyphicon-leaf:before { - content: "\e103"; -} -.glyphicon-fire:before { - content: "\e104"; -} -.glyphicon-eye-open:before { - content: "\e105"; -} -.glyphicon-eye-close:before { - content: "\e106"; -} -.glyphicon-warning-sign:before { - content: "\e107"; -} -.glyphicon-plane:before { - content: "\e108"; -} -.glyphicon-calendar:before { - content: "\e109"; -} -.glyphicon-random:before { - content: "\e110"; -} -.glyphicon-comment:before { - content: "\e111"; -} -.glyphicon-magnet:before { - content: "\e112"; -} -.glyphicon-chevron-up:before { - content: "\e113"; -} -.glyphicon-chevron-down:before { - content: "\e114"; -} -.glyphicon-retweet:before { - content: "\e115"; -} -.glyphicon-shopping-cart:before { - content: "\e116"; -} -.glyphicon-folder-close:before { - content: "\e117"; -} -.glyphicon-folder-open:before { - content: "\e118"; -} -.glyphicon-resize-vertical:before { - content: "\e119"; -} -.glyphicon-resize-horizontal:before { - content: "\e120"; -} -.glyphicon-hdd:before { - content: "\e121"; -} -.glyphicon-bullhorn:before { - content: "\e122"; -} -.glyphicon-bell:before { - content: "\e123"; -} -.glyphicon-certificate:before { - content: "\e124"; -} -.glyphicon-thumbs-up:before { - content: "\e125"; -} -.glyphicon-thumbs-down:before { - content: "\e126"; -} -.glyphicon-hand-right:before { - content: "\e127"; -} -.glyphicon-hand-left:before { - content: "\e128"; -} -.glyphicon-hand-up:before { - content: "\e129"; -} -.glyphicon-hand-down:before { - content: "\e130"; -} -.glyphicon-circle-arrow-right:before { - content: "\e131"; -} -.glyphicon-circle-arrow-left:before { - content: "\e132"; -} -.glyphicon-circle-arrow-up:before { - content: "\e133"; -} -.glyphicon-circle-arrow-down:before { - content: "\e134"; -} -.glyphicon-globe:before { - content: "\e135"; -} -.glyphicon-wrench:before { - content: "\e136"; -} -.glyphicon-tasks:before { - content: "\e137"; -} -.glyphicon-filter:before { - content: "\e138"; -} -.glyphicon-briefcase:before { - content: "\e139"; -} -.glyphicon-fullscreen:before { - content: "\e140"; -} -.glyphicon-dashboard:before { - content: "\e141"; -} -.glyphicon-paperclip:before { - content: "\e142"; -} -.glyphicon-heart-empty:before { - content: "\e143"; -} -.glyphicon-link:before { - content: "\e144"; -} -.glyphicon-phone:before { - content: "\e145"; -} -.glyphicon-pushpin:before { - content: "\e146"; -} -.glyphicon-usd:before { - content: "\e148"; -} -.glyphicon-gbp:before { - content: "\e149"; -} -.glyphicon-sort:before { - content: "\e150"; -} -.glyphicon-sort-by-alphabet:before { - content: "\e151"; -} -.glyphicon-sort-by-alphabet-alt:before { - content: "\e152"; -} -.glyphicon-sort-by-order:before { - content: "\e153"; -} -.glyphicon-sort-by-order-alt:before { - content: "\e154"; -} -.glyphicon-sort-by-attributes:before { - content: "\e155"; -} -.glyphicon-sort-by-attributes-alt:before { - content: "\e156"; -} -.glyphicon-unchecked:before { - content: "\e157"; -} -.glyphicon-expand:before { - content: "\e158"; -} -.glyphicon-collapse-down:before { - content: "\e159"; -} -.glyphicon-collapse-up:before { - content: "\e160"; -} -.glyphicon-log-in:before { - content: "\e161"; -} -.glyphicon-flash:before { - content: "\e162"; -} -.glyphicon-log-out:before { - content: "\e163"; -} -.glyphicon-new-window:before { - content: "\e164"; -} -.glyphicon-record:before { - content: "\e165"; -} -.glyphicon-save:before { - content: "\e166"; -} -.glyphicon-open:before { - content: "\e167"; -} -.glyphicon-saved:before { - content: "\e168"; -} -.glyphicon-import:before { - content: "\e169"; -} -.glyphicon-export:before { - content: "\e170"; -} -.glyphicon-send:before { - content: "\e171"; -} -.glyphicon-floppy-disk:before { - content: "\e172"; -} -.glyphicon-floppy-saved:before { - content: "\e173"; -} -.glyphicon-floppy-remove:before { - content: "\e174"; -} -.glyphicon-floppy-save:before { - content: "\e175"; -} -.glyphicon-floppy-open:before { - content: "\e176"; -} -.glyphicon-credit-card:before { - content: "\e177"; -} -.glyphicon-transfer:before { - content: "\e178"; -} -.glyphicon-cutlery:before { - content: "\e179"; -} -.glyphicon-header:before { - content: "\e180"; -} -.glyphicon-compressed:before { - content: "\e181"; -} -.glyphicon-earphone:before { - content: "\e182"; -} -.glyphicon-phone-alt:before { - content: "\e183"; -} -.glyphicon-tower:before { - content: "\e184"; -} -.glyphicon-stats:before { - content: "\e185"; -} -.glyphicon-sd-video:before { - content: "\e186"; -} -.glyphicon-hd-video:before { - content: "\e187"; -} -.glyphicon-subtitles:before { - content: "\e188"; -} -.glyphicon-sound-stereo:before { - content: "\e189"; -} -.glyphicon-sound-dolby:before { - content: "\e190"; -} -.glyphicon-sound-5-1:before { - content: "\e191"; -} -.glyphicon-sound-6-1:before { - content: "\e192"; -} -.glyphicon-sound-7-1:before { - content: "\e193"; -} -.glyphicon-copyright-mark:before { - content: "\e194"; -} -.glyphicon-registration-mark:before { - content: "\e195"; -} -.glyphicon-cloud-download:before { - content: "\e197"; -} -.glyphicon-cloud-upload:before { - content: "\e198"; -} -.glyphicon-tree-conifer:before { - content: "\e199"; -} -.glyphicon-tree-deciduous:before { - content: "\e200"; -} -.glyphicon-cd:before { - content: "\e201"; -} -.glyphicon-save-file:before { - content: "\e202"; -} -.glyphicon-open-file:before { - content: "\e203"; -} -.glyphicon-level-up:before { - content: "\e204"; -} -.glyphicon-copy:before { - content: "\e205"; -} -.glyphicon-paste:before { - content: "\e206"; -} -.glyphicon-alert:before { - content: "\e209"; -} -.glyphicon-equalizer:before { - content: "\e210"; -} -.glyphicon-king:before { - content: "\e211"; -} -.glyphicon-queen:before { - content: "\e212"; -} -.glyphicon-pawn:before { - content: "\e213"; -} -.glyphicon-bishop:before { - content: "\e214"; -} -.glyphicon-knight:before { - content: "\e215"; -} -.glyphicon-baby-formula:before { - content: "\e216"; -} -.glyphicon-tent:before { - content: "\26fa"; -} -.glyphicon-blackboard:before { - content: "\e218"; -} -.glyphicon-bed:before { - content: "\e219"; -} -.glyphicon-apple:before { - content: "\f8ff"; -} -.glyphicon-erase:before { - content: "\e221"; -} -.glyphicon-hourglass:before { - content: "\231b"; -} -.glyphicon-lamp:before { - content: "\e223"; -} -.glyphicon-duplicate:before { - content: "\e224"; -} -.glyphicon-piggy-bank:before { - content: "\e225"; -} -.glyphicon-scissors:before { - content: "\e226"; -} -.glyphicon-bitcoin:before { - content: "\e227"; -} -.glyphicon-btc:before { - content: "\e227"; -} -.glyphicon-xbt:before { - content: "\e227"; -} -.glyphicon-yen:before { - content: "\00a5"; -} -.glyphicon-jpy:before { - content: "\00a5"; -} -.glyphicon-ruble:before { - content: "\20bd"; -} -.glyphicon-rub:before { - content: "\20bd"; -} -.glyphicon-scale:before { - content: "\e230"; -} -.glyphicon-ice-lolly:before { - content: "\e231"; -} -.glyphicon-ice-lolly-tasted:before { - content: "\e232"; -} -.glyphicon-education:before { - content: "\e233"; -} -.glyphicon-option-horizontal:before { - content: "\e234"; -} -.glyphicon-option-vertical:before { - content: "\e235"; -} -.glyphicon-menu-hamburger:before { - content: "\e236"; -} -.glyphicon-modal-window:before { - content: "\e237"; -} -.glyphicon-oil:before { - content: "\e238"; -} -.glyphicon-grain:before { - content: "\e239"; -} -.glyphicon-sunglasses:before { - content: "\e240"; -} -.glyphicon-text-size:before { - content: "\e241"; -} -.glyphicon-text-color:before { - content: "\e242"; -} -.glyphicon-text-background:before { - content: "\e243"; -} -.glyphicon-object-align-top:before { - content: "\e244"; -} -.glyphicon-object-align-bottom:before { - content: "\e245"; -} -.glyphicon-object-align-horizontal:before { - content: "\e246"; -} -.glyphicon-object-align-left:before { - content: "\e247"; -} -.glyphicon-object-align-vertical:before { - content: "\e248"; -} -.glyphicon-object-align-right:before { - content: "\e249"; -} -.glyphicon-triangle-right:before { - content: "\e250"; -} -.glyphicon-triangle-left:before { - content: "\e251"; -} -.glyphicon-triangle-bottom:before { - content: "\e252"; -} -.glyphicon-triangle-top:before { - content: "\e253"; -} -.glyphicon-console:before { - content: "\e254"; -} -.glyphicon-superscript:before { - content: "\e255"; -} -.glyphicon-subscript:before { - content: "\e256"; -} -.glyphicon-menu-left:before { - content: "\e257"; -} -.glyphicon-menu-right:before { - content: "\e258"; -} -.glyphicon-menu-down:before { - content: "\e259"; -} -.glyphicon-menu-up:before { - content: "\e260"; -} -* { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -*:before, -*:after { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -html { - font-size: 10px; - - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.42857143; - color: #333; - background-color: #fff; -} -input, -button, -select, -textarea { - font-family: inherit; - font-size: inherit; - line-height: inherit; -} -a { - color: #337ab7; - text-decoration: none; -} -a:hover, -a:focus { - color: #23527c; - text-decoration: underline; -} -a:focus { - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -figure { - margin: 0; -} -img { - vertical-align: middle; -} -.img-responsive, -.thumbnail > img, -.thumbnail a > img, -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: block; - max-width: 100%; - height: auto; -} -.img-rounded { - border-radius: 6px; -} -.img-thumbnail { - display: inline-block; - max-width: 100%; - height: auto; - padding: 4px; - line-height: 1.42857143; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 4px; - -webkit-transition: all .2s ease-in-out; - -o-transition: all .2s ease-in-out; - transition: all .2s ease-in-out; -} -.img-circle { - border-radius: 50%; -} -hr { - margin-top: 20px; - margin-bottom: 20px; - border: 0; - border-top: 1px solid #eee; -} -.sr-only { - position: absolute; - width: 1px; - height: 1px; - padding: 0; - margin: -1px; - overflow: hidden; - clip: rect(0, 0, 0, 0); - border: 0; -} -.sr-only-focusable:active, -.sr-only-focusable:focus { - position: static; - width: auto; - height: auto; - margin: 0; - overflow: visible; - clip: auto; -} -[role="button"] { - cursor: pointer; -} -h1, -h2, -h3, -h4, -h5, -h6, -.h1, -.h2, -.h3, -.h4, -.h5, -.h6 { - font-family: inherit; - font-weight: 500; - line-height: 1.1; - color: inherit; -} -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small, -.h1 small, -.h2 small, -.h3 small, -.h4 small, -.h5 small, -.h6 small, -h1 .small, -h2 .small, -h3 .small, -h4 .small, -h5 .small, -h6 .small, -.h1 .small, -.h2 .small, -.h3 .small, -.h4 .small, -.h5 .small, -.h6 .small { - font-weight: normal; - line-height: 1; - color: #777; -} -h1, -.h1, -h2, -.h2, -h3, -.h3 { - margin-top: 20px; - margin-bottom: 10px; -} -h1 small, -.h1 small, -h2 small, -.h2 small, -h3 small, -.h3 small, -h1 .small, -.h1 .small, -h2 .small, -.h2 .small, -h3 .small, -.h3 .small { - font-size: 65%; -} -h4, -.h4, -h5, -.h5, -h6, -.h6 { - margin-top: 10px; - margin-bottom: 10px; -} -h4 small, -.h4 small, -h5 small, -.h5 small, -h6 small, -.h6 small, -h4 .small, -.h4 .small, -h5 .small, -.h5 .small, -h6 .small, -.h6 .small { - font-size: 75%; -} -h1, -.h1 { - font-size: 36px; -} -h2, -.h2 { - font-size: 30px; -} -h3, -.h3 { - font-size: 24px; -} -h4, -.h4 { - font-size: 18px; -} -h5, -.h5 { - font-size: 14px; -} -h6, -.h6 { - font-size: 12px; -} -p { - margin: 0 0 10px; -} -.lead { - margin-bottom: 20px; - font-size: 16px; - font-weight: 300; - line-height: 1.4; -} -@media (min-width: 919px) { - .lead { - font-size: 21px; - } -} -small, -.small { - font-size: 85%; -} -mark, -.mark { - padding: .2em; - background-color: #fcf8e3; -} -.text-left { - text-align: left; -} -.text-right { - text-align: right; -} -.text-center { - text-align: center; -} -.text-justify { - text-align: justify; -} -.text-nowrap { - white-space: nowrap; -} -.text-lowercase { - text-transform: lowercase; -} -.text-uppercase { - text-transform: uppercase; -} -.text-capitalize { - text-transform: capitalize; -} -.text-muted { - color: #777; -} -.text-primary { - color: #337ab7; -} -a.text-primary:hover, -a.text-primary:focus { - color: #286090; -} -.text-success { - color: #3c763d; -} -a.text-success:hover, -a.text-success:focus { - color: #2b542c; -} -.text-info { - color: #31708f; -} -a.text-info:hover, -a.text-info:focus { - color: #245269; -} -.text-warning { - color: #8a6d3b; -} -a.text-warning:hover, -a.text-warning:focus { - color: #66512c; -} -.text-danger { - color: #a94442; -} -a.text-danger:hover, -a.text-danger:focus { - color: #843534; -} -.bg-primary { - color: #fff; - background-color: #337ab7; -} -a.bg-primary:hover, -a.bg-primary:focus { - background-color: #286090; -} -.bg-success { - background-color: #dff0d8; -} -a.bg-success:hover, -a.bg-success:focus { - background-color: #c1e2b3; -} -.bg-info { - background-color: #d9edf7; -} -a.bg-info:hover, -a.bg-info:focus { - background-color: #afd9ee; -} -.bg-warning { - background-color: #fcf8e3; -} -a.bg-warning:hover, -a.bg-warning:focus { - background-color: #f7ecb5; -} -.bg-danger { - background-color: #f2dede; -} -a.bg-danger:hover, -a.bg-danger:focus { - background-color: #e4b9b9; -} -.page-header { - padding-bottom: 9px; - margin: 40px 0 20px; - border-bottom: 1px solid #eee; -} -ul, -ol { - margin-top: 0; - margin-bottom: 10px; -} -ul ul, -ol ul, -ul ol, -ol ol { - margin-bottom: 0; -} -.list-unstyled { - padding-left: 0; - list-style: none; -} -.list-inline { - padding-left: 0; - margin-left: -5px; - list-style: none; -} -.list-inline > li { - display: inline-block; - padding-right: 5px; - padding-left: 5px; -} -dl { - margin-top: 0; - margin-bottom: 20px; -} -dt, -dd { - line-height: 1.42857143; -} -dt { - font-weight: bold; -} -dd { - margin-left: 0; -} -@media (min-width: 919px) { - .dl-horizontal dt { - float: left; - width: 160px; - overflow: hidden; - clear: left; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; - } - .dl-horizontal dd { - margin-left: 180px; - } -} -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #777; -} -.initialism { - font-size: 90%; - text-transform: uppercase; -} -blockquote { - padding: 10px 20px; - margin: 0 0 20px; - font-size: 17.5px; - border-left: 5px solid #eee; -} -blockquote p:last-child, -blockquote ul:last-child, -blockquote ol:last-child { - margin-bottom: 0; -} -blockquote footer, -blockquote small, -blockquote .small { - display: block; - font-size: 80%; - line-height: 1.42857143; - color: #777; -} -blockquote footer:before, -blockquote small:before, -blockquote .small:before { - content: '\2014 \00A0'; -} -.blockquote-reverse, -blockquote.pull-right { - padding-right: 15px; - padding-left: 0; - text-align: right; - border-right: 5px solid #eee; - border-left: 0; -} -.blockquote-reverse footer:before, -blockquote.pull-right footer:before, -.blockquote-reverse small:before, -blockquote.pull-right small:before, -.blockquote-reverse .small:before, -blockquote.pull-right .small:before { - content: ''; -} -.blockquote-reverse footer:after, -blockquote.pull-right footer:after, -.blockquote-reverse small:after, -blockquote.pull-right small:after, -.blockquote-reverse .small:after, -blockquote.pull-right .small:after { - content: '\00A0 \2014'; -} -address { - margin-bottom: 20px; - font-style: normal; - line-height: 1.42857143; -} -code, -kbd, -pre, -samp { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; -} -code { - padding: 2px 4px; - font-size: 90%; - color: #c7254e; - background-color: #f9f2f4; - border-radius: 4px; -} -kbd { - padding: 2px 4px; - font-size: 90%; - color: #fff; - background-color: #333; - border-radius: 3px; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); -} -kbd kbd { - padding: 0; - font-size: 100%; - font-weight: bold; - -webkit-box-shadow: none; - box-shadow: none; -} -pre { - display: block; - padding: 9.5px; - margin: 0 0 10px; - font-size: 13px; - line-height: 1.42857143; - color: #333; - word-break: break-all; - word-wrap: break-word; - background-color: #f5f5f5; - border: 1px solid #ccc; - border-radius: 4px; -} -pre code { - padding: 0; - font-size: inherit; - color: inherit; - white-space: pre-wrap; - background-color: transparent; - border-radius: 0; -} -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} -.container { - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; -} -@media (min-width: 919px) { - .container { - width: 750px; - } -} -@media (min-width: 992px) { - .container { - width: 970px; - } -} -@media (min-width: 1200px) { - .container { - width: 1170px; - } -} -.container-fluid { - padding-right: 15px; - padding-left: 15px; - margin-right: auto; - margin-left: auto; - max-width: 1020px; -} -.row { - margin-right: -15px; - margin-left: -15px; -} -.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { - position: relative; - min-height: 1px; - padding-right: 15px; - padding-left: 15px; -} -.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { - float: left; -} -.col-xs-12 { - width: 100%; -} -.col-xs-11 { - width: 91.66666667%; -} -.col-xs-10 { - width: 83.33333333%; -} -.col-xs-9 { - width: 75%; -} -.col-xs-8 { - width: 66.66666667%; -} -.col-xs-7 { - width: 58.33333333%; -} -.col-xs-6 { - width: 50%; -} -.col-xs-5 { - width: 41.66666667%; -} -.col-xs-4 { - width: 33.33333333%; -} -.col-xs-3 { - width: 25%; -} -.col-xs-2 { - width: 16.66666667%; -} -.col-xs-1 { - width: 8.33333333%; -} -.col-xs-pull-12 { - right: 100%; -} -.col-xs-pull-11 { - right: 91.66666667%; -} -.col-xs-pull-10 { - right: 83.33333333%; -} -.col-xs-pull-9 { - right: 75%; -} -.col-xs-pull-8 { - right: 66.66666667%; -} -.col-xs-pull-7 { - right: 58.33333333%; -} -.col-xs-pull-6 { - right: 50%; -} -.col-xs-pull-5 { - right: 41.66666667%; -} -.col-xs-pull-4 { - right: 33.33333333%; -} -.col-xs-pull-3 { - right: 25%; -} -.col-xs-pull-2 { - right: 16.66666667%; -} -.col-xs-pull-1 { - right: 8.33333333%; -} -.col-xs-pull-0 { - right: auto; -} -.col-xs-push-12 { - left: 100%; -} -.col-xs-push-11 { - left: 91.66666667%; -} -.col-xs-push-10 { - left: 83.33333333%; -} -.col-xs-push-9 { - left: 75%; -} -.col-xs-push-8 { - left: 66.66666667%; -} -.col-xs-push-7 { - left: 58.33333333%; -} -.col-xs-push-6 { - left: 50%; -} -.col-xs-push-5 { - left: 41.66666667%; -} -.col-xs-push-4 { - left: 33.33333333%; -} -.col-xs-push-3 { - left: 25%; -} -.col-xs-push-2 { - left: 16.66666667%; -} -.col-xs-push-1 { - left: 8.33333333%; -} -.col-xs-push-0 { - left: auto; -} -.col-xs-offset-12 { - margin-left: 100%; -} -.col-xs-offset-11 { - margin-left: 91.66666667%; -} -.col-xs-offset-10 { - margin-left: 83.33333333%; -} -.col-xs-offset-9 { - margin-left: 75%; -} -.col-xs-offset-8 { - margin-left: 66.66666667%; -} -.col-xs-offset-7 { - margin-left: 58.33333333%; -} -.col-xs-offset-6 { - margin-left: 50%; -} -.col-xs-offset-5 { - margin-left: 41.66666667%; -} -.col-xs-offset-4 { - margin-left: 33.33333333%; -} -.col-xs-offset-3 { - margin-left: 25%; -} -.col-xs-offset-2 { - margin-left: 16.66666667%; -} -.col-xs-offset-1 { - margin-left: 8.33333333%; -} -.col-xs-offset-0 { - margin-left: 0; -} -@media (min-width: 919px) { - .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { - float: left; - } - .col-sm-12 { - width: 100%; - } - .col-sm-11 { - width: 91.66666667%; - } - .col-sm-10 { - width: 83.33333333%; - } - .col-sm-9 { - width: 75%; - } - .col-sm-8 { - width: 66.66666667%; - } - .col-sm-7 { - width: 58.33333333%; - } - .col-sm-6 { - width: 50%; - } - .col-sm-5 { - width: 41.66666667%; - } - .col-sm-4 { - width: 33.33333333%; - } - .col-sm-3 { - width: 25%; - } - .col-sm-2 { - width: 16.66666667%; - } - .col-sm-1 { - width: 8.33333333%; - } - .col-sm-pull-12 { - right: 100%; - } - .col-sm-pull-11 { - right: 91.66666667%; - } - .col-sm-pull-10 { - right: 83.33333333%; - } - .col-sm-pull-9 { - right: 75%; - } - .col-sm-pull-8 { - right: 66.66666667%; - } - .col-sm-pull-7 { - right: 58.33333333%; - } - .col-sm-pull-6 { - right: 50%; - } - .col-sm-pull-5 { - right: 41.66666667%; - } - .col-sm-pull-4 { - right: 33.33333333%; - } - .col-sm-pull-3 { - right: 25%; - } - .col-sm-pull-2 { - right: 16.66666667%; - } - .col-sm-pull-1 { - right: 8.33333333%; - } - .col-sm-pull-0 { - right: auto; - } - .col-sm-push-12 { - left: 100%; - } - .col-sm-push-11 { - left: 91.66666667%; - } - .col-sm-push-10 { - left: 83.33333333%; - } - .col-sm-push-9 { - left: 75%; - } - .col-sm-push-8 { - left: 66.66666667%; - } - .col-sm-push-7 { - left: 58.33333333%; - } - .col-sm-push-6 { - left: 50%; - } - .col-sm-push-5 { - left: 41.66666667%; - } - .col-sm-push-4 { - left: 33.33333333%; - } - .col-sm-push-3 { - left: 25%; - } - .col-sm-push-2 { - left: 16.66666667%; - } - .col-sm-push-1 { - left: 8.33333333%; - } - .col-sm-push-0 { - left: auto; - } - .col-sm-offset-12 { - margin-left: 100%; - } - .col-sm-offset-11 { - margin-left: 91.66666667%; - } - .col-sm-offset-10 { - margin-left: 83.33333333%; - } - .col-sm-offset-9 { - margin-left: 75%; - } - .col-sm-offset-8 { - margin-left: 66.66666667%; - } - .col-sm-offset-7 { - margin-left: 58.33333333%; - } - .col-sm-offset-6 { - margin-left: 50%; - } - .col-sm-offset-5 { - margin-left: 41.66666667%; - } - .col-sm-offset-4 { - margin-left: 33.33333333%; - } - .col-sm-offset-3 { - margin-left: 25%; - } - .col-sm-offset-2 { - margin-left: 16.66666667%; - } - .col-sm-offset-1 { - margin-left: 8.33333333%; - } - .col-sm-offset-0 { - margin-left: 0; - } -} -@media (min-width: 992px) { - .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { - float: left; - } - .col-md-12 { - width: 100%; - } - .col-md-11 { - width: 91.66666667%; - } - .col-md-10 { - width: 83.33333333%; - } - .col-md-9 { - width: 75%; - } - .col-md-8 { - width: 66.66666667%; - } - .col-md-7 { - width: 58.33333333%; - } - .col-md-6 { - width: 50%; - } - .col-md-5 { - width: 41.66666667%; - } - .col-md-4 { - width: 33.33333333%; - } - .col-md-3 { - width: 25%; - } - .col-md-2 { - width: 16.66666667%; - } - .col-md-1 { - width: 8.33333333%; - } - .col-md-pull-12 { - right: 100%; - } - .col-md-pull-11 { - right: 91.66666667%; - } - .col-md-pull-10 { - right: 83.33333333%; - } - .col-md-pull-9 { - right: 75%; - } - .col-md-pull-8 { - right: 66.66666667%; - } - .col-md-pull-7 { - right: 58.33333333%; - } - .col-md-pull-6 { - right: 50%; - } - .col-md-pull-5 { - right: 41.66666667%; - } - .col-md-pull-4 { - right: 33.33333333%; - } - .col-md-pull-3 { - right: 25%; - } - .col-md-pull-2 { - right: 16.66666667%; - } - .col-md-pull-1 { - right: 8.33333333%; - } - .col-md-pull-0 { - right: auto; - } - .col-md-push-12 { - left: 100%; - } - .col-md-push-11 { - left: 91.66666667%; - } - .col-md-push-10 { - left: 83.33333333%; - } - .col-md-push-9 { - left: 75%; - } - .col-md-push-8 { - left: 66.66666667%; - } - .col-md-push-7 { - left: 58.33333333%; - } - .col-md-push-6 { - left: 50%; - } - .col-md-push-5 { - left: 41.66666667%; - } - .col-md-push-4 { - left: 33.33333333%; - } - .col-md-push-3 { - left: 25%; - } - .col-md-push-2 { - left: 16.66666667%; - } - .col-md-push-1 { - left: 8.33333333%; - } - .col-md-push-0 { - left: auto; - } - .col-md-offset-12 { - margin-left: 100%; - } - .col-md-offset-11 { - margin-left: 91.66666667%; - } - .col-md-offset-10 { - margin-left: 83.33333333%; - } - .col-md-offset-9 { - margin-left: 75%; - } - .col-md-offset-8 { - margin-left: 66.66666667%; - } - .col-md-offset-7 { - margin-left: 58.33333333%; - } - .col-md-offset-6 { - margin-left: 50%; - } - .col-md-offset-5 { - margin-left: 41.66666667%; - } - .col-md-offset-4 { - margin-left: 33.33333333%; - } - .col-md-offset-3 { - margin-left: 25%; - } - .col-md-offset-2 { - margin-left: 16.66666667%; - } - .col-md-offset-1 { - margin-left: 8.33333333%; - } - .col-md-offset-0 { - margin-left: 0; - } -} -@media (min-width: 1200px) { - .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { - float: left; - } - .col-lg-12 { - width: 100%; - } - .col-lg-11 { - width: 91.66666667%; - } - .col-lg-10 { - width: 83.33333333%; - } - .col-lg-9 { - width: 75%; - } - .col-lg-8 { - width: 66.66666667%; - } - .col-lg-7 { - width: 58.33333333%; - } - .col-lg-6 { - width: 50%; - } - .col-lg-5 { - width: 41.66666667%; - } - .col-lg-4 { - width: 33.33333333%; - } - .col-lg-3 { - width: 25%; - } - .col-lg-2 { - width: 16.66666667%; - } - .col-lg-1 { - width: 8.33333333%; - } - .col-lg-pull-12 { - right: 100%; - } - .col-lg-pull-11 { - right: 91.66666667%; - } - .col-lg-pull-10 { - right: 83.33333333%; - } - .col-lg-pull-9 { - right: 75%; - } - .col-lg-pull-8 { - right: 66.66666667%; - } - .col-lg-pull-7 { - right: 58.33333333%; - } - .col-lg-pull-6 { - right: 50%; - } - .col-lg-pull-5 { - right: 41.66666667%; - } - .col-lg-pull-4 { - right: 33.33333333%; - } - .col-lg-pull-3 { - right: 25%; - } - .col-lg-pull-2 { - right: 16.66666667%; - } - .col-lg-pull-1 { - right: 8.33333333%; - } - .col-lg-pull-0 { - right: auto; - } - .col-lg-push-12 { - left: 100%; - } - .col-lg-push-11 { - left: 91.66666667%; - } - .col-lg-push-10 { - left: 83.33333333%; - } - .col-lg-push-9 { - left: 75%; - } - .col-lg-push-8 { - left: 66.66666667%; - } - .col-lg-push-7 { - left: 58.33333333%; - } - .col-lg-push-6 { - left: 50%; - } - .col-lg-push-5 { - left: 41.66666667%; - } - .col-lg-push-4 { - left: 33.33333333%; - } - .col-lg-push-3 { - left: 25%; - } - .col-lg-push-2 { - left: 16.66666667%; - } - .col-lg-push-1 { - left: 8.33333333%; - } - .col-lg-push-0 { - left: auto; - } - .col-lg-offset-12 { - margin-left: 100%; - } - .col-lg-offset-11 { - margin-left: 91.66666667%; - } - .col-lg-offset-10 { - margin-left: 83.33333333%; - } - .col-lg-offset-9 { - margin-left: 75%; - } - .col-lg-offset-8 { - margin-left: 66.66666667%; - } - .col-lg-offset-7 { - margin-left: 58.33333333%; - } - .col-lg-offset-6 { - margin-left: 50%; - } - .col-lg-offset-5 { - margin-left: 41.66666667%; - } - .col-lg-offset-4 { - margin-left: 33.33333333%; - } - .col-lg-offset-3 { - margin-left: 25%; - } - .col-lg-offset-2 { - margin-left: 16.66666667%; - } - .col-lg-offset-1 { - margin-left: 8.33333333%; - } - .col-lg-offset-0 { - margin-left: 0; - } -} -table { - background-color: transparent; -} -caption { - padding-top: 8px; - padding-bottom: 8px; - color: #777; - text-align: left; -} -th { - text-align: left; -} -.table { - width: 100%; - max-width: 100%; - margin-bottom: 20px; -} -.table > thead > tr > th, -.table > tbody > tr > th, -.table > tfoot > tr > th, -.table > thead > tr > td, -.table > tbody > tr > td, -.table > tfoot > tr > td { - padding: 8px; - line-height: 1.42857143; - vertical-align: top; - border-top: 1px solid #ddd; -} -.table > thead > tr > th { - vertical-align: bottom; - border-bottom: 2px solid #ddd; -} -.table > caption + thead > tr:first-child > th, -.table > colgroup + thead > tr:first-child > th, -.table > thead:first-child > tr:first-child > th, -.table > caption + thead > tr:first-child > td, -.table > colgroup + thead > tr:first-child > td, -.table > thead:first-child > tr:first-child > td { - border-top: 0; -} -.table > tbody + tbody { - border-top: 2px solid #ddd; -} -.table .table { - background-color: #fff; -} -.table-condensed > thead > tr > th, -.table-condensed > tbody > tr > th, -.table-condensed > tfoot > tr > th, -.table-condensed > thead > tr > td, -.table-condensed > tbody > tr > td, -.table-condensed > tfoot > tr > td { - padding: 5px; -} -.table-bordered { - border: 1px solid #ddd; -} -.table-bordered > thead > tr > th, -.table-bordered > tbody > tr > th, -.table-bordered > tfoot > tr > th, -.table-bordered > thead > tr > td, -.table-bordered > tbody > tr > td, -.table-bordered > tfoot > tr > td { - border: 1px solid #ddd; -} -.table-bordered > thead > tr > th, -.table-bordered > thead > tr > td { - border-bottom-width: 2px; -} -.table-striped > tbody > tr:nth-of-type(odd) { - background-color: #f9f9f9; -} -.table-hover > tbody > tr:hover { - background-color: #f5f5f5; -} -table col[class*="col-"] { - position: static; - display: table-column; - float: none; -} -table td[class*="col-"], -table th[class*="col-"] { - position: static; - display: table-cell; - float: none; -} -.table > thead > tr > td.active, -.table > tbody > tr > td.active, -.table > tfoot > tr > td.active, -.table > thead > tr > th.active, -.table > tbody > tr > th.active, -.table > tfoot > tr > th.active, -.table > thead > tr.active > td, -.table > tbody > tr.active > td, -.table > tfoot > tr.active > td, -.table > thead > tr.active > th, -.table > tbody > tr.active > th, -.table > tfoot > tr.active > th { - background-color: #f5f5f5; -} -.table-hover > tbody > tr > td.active:hover, -.table-hover > tbody > tr > th.active:hover, -.table-hover > tbody > tr.active:hover > td, -.table-hover > tbody > tr:hover > .active, -.table-hover > tbody > tr.active:hover > th { - background-color: #e8e8e8; -} -.table > thead > tr > td.success, -.table > tbody > tr > td.success, -.table > tfoot > tr > td.success, -.table > thead > tr > th.success, -.table > tbody > tr > th.success, -.table > tfoot > tr > th.success, -.table > thead > tr.success > td, -.table > tbody > tr.success > td, -.table > tfoot > tr.success > td, -.table > thead > tr.success > th, -.table > tbody > tr.success > th, -.table > tfoot > tr.success > th { - background-color: #dff0d8; -} -.table-hover > tbody > tr > td.success:hover, -.table-hover > tbody > tr > th.success:hover, -.table-hover > tbody > tr.success:hover > td, -.table-hover > tbody > tr:hover > .success, -.table-hover > tbody > tr.success:hover > th { - background-color: #d0e9c6; -} -.table > thead > tr > td.info, -.table > tbody > tr > td.info, -.table > tfoot > tr > td.info, -.table > thead > tr > th.info, -.table > tbody > tr > th.info, -.table > tfoot > tr > th.info, -.table > thead > tr.info > td, -.table > tbody > tr.info > td, -.table > tfoot > tr.info > td, -.table > thead > tr.info > th, -.table > tbody > tr.info > th, -.table > tfoot > tr.info > th { - background-color: #d9edf7; -} -.table-hover > tbody > tr > td.info:hover, -.table-hover > tbody > tr > th.info:hover, -.table-hover > tbody > tr.info:hover > td, -.table-hover > tbody > tr:hover > .info, -.table-hover > tbody > tr.info:hover > th { - background-color: #c4e3f3; -} -.table > thead > tr > td.warning, -.table > tbody > tr > td.warning, -.table > tfoot > tr > td.warning, -.table > thead > tr > th.warning, -.table > tbody > tr > th.warning, -.table > tfoot > tr > th.warning, -.table > thead > tr.warning > td, -.table > tbody > tr.warning > td, -.table > tfoot > tr.warning > td, -.table > thead > tr.warning > th, -.table > tbody > tr.warning > th, -.table > tfoot > tr.warning > th { - background-color: #fcf8e3; -} -.table-hover > tbody > tr > td.warning:hover, -.table-hover > tbody > tr > th.warning:hover, -.table-hover > tbody > tr.warning:hover > td, -.table-hover > tbody > tr:hover > .warning, -.table-hover > tbody > tr.warning:hover > th { - background-color: #faf2cc; -} -.table > thead > tr > td.danger, -.table > tbody > tr > td.danger, -.table > tfoot > tr > td.danger, -.table > thead > tr > th.danger, -.table > tbody > tr > th.danger, -.table > tfoot > tr > th.danger, -.table > thead > tr.danger > td, -.table > tbody > tr.danger > td, -.table > tfoot > tr.danger > td, -.table > thead > tr.danger > th, -.table > tbody > tr.danger > th, -.table > tfoot > tr.danger > th { - background-color: #f2dede; -} -.table-hover > tbody > tr > td.danger:hover, -.table-hover > tbody > tr > th.danger:hover, -.table-hover > tbody > tr.danger:hover > td, -.table-hover > tbody > tr:hover > .danger, -.table-hover > tbody > tr.danger:hover > th { - background-color: #ebcccc; -} -.table-responsive { - min-height: .01%; - overflow-x: auto; -} -@media screen and (max-width: 767px) { - .table-responsive { - width: 100%; - margin-bottom: 15px; - overflow-y: hidden; - -ms-overflow-style: -ms-autohiding-scrollbar; - border: 1px solid #ddd; - } - .table-responsive > .table { - margin-bottom: 0; - } - .table-responsive > .table > thead > tr > th, - .table-responsive > .table > tbody > tr > th, - .table-responsive > .table > tfoot > tr > th, - .table-responsive > .table > thead > tr > td, - .table-responsive > .table > tbody > tr > td, - .table-responsive > .table > tfoot > tr > td { - white-space: nowrap; - } - .table-responsive > .table-bordered { - border: 0; - } - .table-responsive > .table-bordered > thead > tr > th:first-child, - .table-responsive > .table-bordered > tbody > tr > th:first-child, - .table-responsive > .table-bordered > tfoot > tr > th:first-child, - .table-responsive > .table-bordered > thead > tr > td:first-child, - .table-responsive > .table-bordered > tbody > tr > td:first-child, - .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; - } - .table-responsive > .table-bordered > thead > tr > th:last-child, - .table-responsive > .table-bordered > tbody > tr > th:last-child, - .table-responsive > .table-bordered > tfoot > tr > th:last-child, - .table-responsive > .table-bordered > thead > tr > td:last-child, - .table-responsive > .table-bordered > tbody > tr > td:last-child, - .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; - } - .table-responsive > .table-bordered > tbody > tr:last-child > th, - .table-responsive > .table-bordered > tfoot > tr:last-child > th, - .table-responsive > .table-bordered > tbody > tr:last-child > td, - .table-responsive > .table-bordered > tfoot > tr:last-child > td { - border-bottom: 0; - } -} -fieldset { - min-width: 0; - padding: 0; - margin: 0; - border: 0; -} -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 20px; - font-size: 21px; - line-height: inherit; - color: #333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} -label { - display: inline-block; - max-width: 100%; - margin-bottom: 5px; - font-weight: bold; -} -input[type="search"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; - line-height: normal; -} -input[type="file"] { - display: block; -} -input[type="range"] { - display: block; - width: 100%; -} -select[multiple], -select[size] { - height: auto; -} -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -output { - display: block; - padding-top: 7px; - font-size: 14px; - line-height: 1.42857143; - color: #555; -} -.form-control { - display: block; - width: 100%; - height: 34px; - padding: 6px 12px; - font-size: 14px; - line-height: 1.42857143; - color: #555; - background-color: #fff; - background-image: none; - border: 1px solid #ccc; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; - -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; - transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; -} -.form-control:focus { - border-color: #66afe9; - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); - box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6); -} -.form-control::-moz-placeholder { - color: #999; - opacity: 1; -} -.form-control:-ms-input-placeholder { - color: #999; -} -.form-control::-webkit-input-placeholder { - color: #999; -} -.form-control::-ms-expand { - background-color: transparent; - border: 0; -} -.form-control[disabled], -.form-control[readonly], -fieldset[disabled] .form-control { - background-color: #eee; - opacity: 1; -} -.form-control[disabled], -fieldset[disabled] .form-control { - cursor: not-allowed; -} -textarea.form-control { - height: auto; -} -input[type="search"] { - -webkit-appearance: none; -} -@media screen and (-webkit-min-device-pixel-ratio: 0) { - input[type="date"].form-control, - input[type="time"].form-control, - input[type="datetime-local"].form-control, - input[type="month"].form-control { - line-height: 34px; - } - input[type="date"].input-sm, - input[type="time"].input-sm, - input[type="datetime-local"].input-sm, - input[type="month"].input-sm, - .input-group-sm input[type="date"], - .input-group-sm input[type="time"], - .input-group-sm input[type="datetime-local"], - .input-group-sm input[type="month"] { - line-height: 30px; - } - input[type="date"].input-lg, - input[type="time"].input-lg, - input[type="datetime-local"].input-lg, - input[type="month"].input-lg, - .input-group-lg input[type="date"], - .input-group-lg input[type="time"], - .input-group-lg input[type="datetime-local"], - .input-group-lg input[type="month"] { - line-height: 46px; - } -} -.form-group { - margin-bottom: 15px; -} -.radio, -.checkbox { - position: relative; - display: block; - margin-top: 10px; - margin-bottom: 10px; -} -.radio label, -.checkbox label { - min-height: 20px; - padding-left: 20px; - margin-bottom: 0; - font-weight: normal; - cursor: pointer; -} -.radio input[type="radio"], -.radio-inline input[type="radio"], -.checkbox input[type="checkbox"], -.checkbox-inline input[type="checkbox"] { - position: absolute; - margin-top: 4px \9; - margin-left: -20px; -} -.radio + .radio, -.checkbox + .checkbox { - margin-top: -5px; -} -.radio-inline, -.checkbox-inline { - position: relative; - display: inline-block; - padding-left: 20px; - margin-bottom: 0; - font-weight: normal; - vertical-align: middle; - cursor: pointer; -} -.radio-inline + .radio-inline, -.checkbox-inline + .checkbox-inline { - margin-top: 0; - margin-left: 10px; -} -input[type="radio"][disabled], -input[type="checkbox"][disabled], -input[type="radio"].disabled, -input[type="checkbox"].disabled, -fieldset[disabled] input[type="radio"], -fieldset[disabled] input[type="checkbox"] { - cursor: not-allowed; -} -.radio-inline.disabled, -.checkbox-inline.disabled, -fieldset[disabled] .radio-inline, -fieldset[disabled] .checkbox-inline { - cursor: not-allowed; -} -.radio.disabled label, -.checkbox.disabled label, -fieldset[disabled] .radio label, -fieldset[disabled] .checkbox label { - cursor: not-allowed; -} -.form-control-static { - min-height: 34px; - padding-top: 7px; - padding-bottom: 7px; - margin-bottom: 0; -} -.form-control-static.input-lg, -.form-control-static.input-sm { - padding-right: 0; - padding-left: 0; -} -.input-sm { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -select.input-sm { - height: 30px; - line-height: 30px; -} -textarea.input-sm, -select[multiple].input-sm { - height: auto; -} -.form-group-sm .form-control { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.form-group-sm select.form-control { - height: 30px; - line-height: 30px; -} -.form-group-sm textarea.form-control, -.form-group-sm select[multiple].form-control { - height: auto; -} -.form-group-sm .form-control-static { - height: 30px; - min-height: 32px; - padding: 6px 10px; - font-size: 12px; - line-height: 1.5; -} -.input-lg { - height: 46px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.3333333; - border-radius: 6px; -} -select.input-lg { - height: 46px; - line-height: 46px; -} -textarea.input-lg, -select[multiple].input-lg { - height: auto; -} -.form-group-lg .form-control { - height: 46px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.3333333; - border-radius: 6px; -} -.form-group-lg select.form-control { - height: 46px; - line-height: 46px; -} -.form-group-lg textarea.form-control, -.form-group-lg select[multiple].form-control { - height: auto; -} -.form-group-lg .form-control-static { - height: 46px; - min-height: 38px; - padding: 11px 16px; - font-size: 18px; - line-height: 1.3333333; -} -.has-feedback { - position: relative; -} -.has-feedback .form-control { - padding-right: 42.5px; -} -.form-control-feedback { - position: absolute; - top: 0; - right: 0; - z-index: 2; - display: block; - width: 34px; - height: 34px; - line-height: 34px; - text-align: center; - pointer-events: none; -} -.input-lg + .form-control-feedback, -.input-group-lg + .form-control-feedback, -.form-group-lg .form-control + .form-control-feedback { - width: 46px; - height: 46px; - line-height: 46px; -} -.input-sm + .form-control-feedback, -.input-group-sm + .form-control-feedback, -.form-group-sm .form-control + .form-control-feedback { - width: 30px; - height: 30px; - line-height: 30px; -} -.has-success .help-block, -.has-success .control-label, -.has-success .radio, -.has-success .checkbox, -.has-success .radio-inline, -.has-success .checkbox-inline, -.has-success.radio label, -.has-success.checkbox label, -.has-success.radio-inline label, -.has-success.checkbox-inline label { - color: #3c763d; -} -.has-success .form-control { - border-color: #3c763d; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} -.has-success .form-control:focus { - border-color: #2b542c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168; -} -.has-success .input-group-addon { - color: #3c763d; - background-color: #dff0d8; - border-color: #3c763d; -} -.has-success .form-control-feedback { - color: #3c763d; -} -.has-warning .help-block, -.has-warning .control-label, -.has-warning .radio, -.has-warning .checkbox, -.has-warning .radio-inline, -.has-warning .checkbox-inline, -.has-warning.radio label, -.has-warning.checkbox label, -.has-warning.radio-inline label, -.has-warning.checkbox-inline label { - color: #8a6d3b; -} -.has-warning .form-control { - border-color: #8a6d3b; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} -.has-warning .form-control:focus { - border-color: #66512c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b; -} -.has-warning .input-group-addon { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #8a6d3b; -} -.has-warning .form-control-feedback { - color: #8a6d3b; -} -.has-error .help-block, -.has-error .control-label, -.has-error .radio, -.has-error .checkbox, -.has-error .radio-inline, -.has-error .checkbox-inline, -.has-error.radio label, -.has-error.checkbox label, -.has-error.radio-inline label, -.has-error.checkbox-inline label { - color: #a94442; -} -.has-error .form-control { - border-color: #a94442; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -} -.has-error .form-control:focus { - border-color: #843534; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483; -} -.has-error .input-group-addon { - color: #a94442; - background-color: #f2dede; - border-color: #a94442; -} -.has-error .form-control-feedback { - color: #a94442; -} -.has-feedback label ~ .form-control-feedback { - top: 25px; -} -.has-feedback label.sr-only ~ .form-control-feedback { - top: 0; -} -.help-block { - display: block; - margin-top: 5px; - margin-bottom: 10px; - color: #737373; -} -@media (min-width: 919px) { - .form-inline .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .form-control { - display: inline-block; - width: auto; - vertical-align: middle; - } - .form-inline .form-control-static { - display: inline-block; - } - .form-inline .input-group { - display: inline-table; - vertical-align: middle; - } - .form-inline .input-group .input-group-addon, - .form-inline .input-group .input-group-btn, - .form-inline .input-group .form-control { - width: auto; - } - .form-inline .input-group > .form-control { - width: 100%; - } - .form-inline .control-label { - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .radio, - .form-inline .checkbox { - display: inline-block; - margin-top: 0; - margin-bottom: 0; - vertical-align: middle; - } - .form-inline .radio label, - .form-inline .checkbox label { - padding-left: 0; - } - .form-inline .radio input[type="radio"], - .form-inline .checkbox input[type="checkbox"] { - position: relative; - margin-left: 0; - } - .form-inline .has-feedback .form-control-feedback { - top: 0; - } -} -.form-horizontal .radio, -.form-horizontal .checkbox, -.form-horizontal .radio-inline, -.form-horizontal .checkbox-inline { - padding-top: 7px; - margin-top: 0; - margin-bottom: 0; -} -.form-horizontal .radio, -.form-horizontal .checkbox { - min-height: 27px; -} -.form-horizontal .form-group { - margin-right: -15px; - margin-left: -15px; -} -@media (min-width: 919px) { - .form-horizontal .control-label { - padding-top: 7px; - margin-bottom: 0; - text-align: right; - } -} -.form-horizontal .has-feedback .form-control-feedback { - right: 15px; -} -@media (min-width: 919px) { - .form-horizontal .form-group-lg .control-label { - padding-top: 11px; - font-size: 18px; - } -} -@media (min-width: 919px) { - .form-horizontal .form-group-sm .control-label { - padding-top: 6px; - font-size: 12px; - } -} -.btn { - display: inline-block; - padding: 6px 12px; - margin-bottom: 0; - font-size: 14px; - font-weight: normal; - line-height: 1.42857143; - text-align: center; - white-space: nowrap; - vertical-align: middle; - -ms-touch-action: manipulation; - touch-action: manipulation; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; -} -.btn:focus, -.btn:active:focus, -.btn.active:focus, -.btn.focus, -.btn:active.focus, -.btn.active.focus { - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} -.btn:hover, -.btn:focus, -.btn.focus { - color: #333; - text-decoration: none; -} -.btn:active, -.btn.active { - background-image: none; - outline: 0; - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -} -.btn.disabled, -.btn[disabled], -fieldset[disabled] .btn { - cursor: not-allowed; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - box-shadow: none; - opacity: .65; -} -a.btn.disabled, -fieldset[disabled] a.btn { - pointer-events: none; -} -.btn-default { - color: #333; - background-color: #fff; - border-color: #ccc; -} -.btn-default:focus, -.btn-default.focus { - color: #333; - background-color: #e6e6e6; - border-color: #8c8c8c; -} -.btn-default:hover { - color: #333; - background-color: #e6e6e6; - border-color: #adadad; -} -.btn-default:active, -.btn-default.active, -.open > .dropdown-toggle.btn-default { - color: #333; - background-color: #e6e6e6; - border-color: #adadad; -} -.btn-default:active:hover, -.btn-default.active:hover, -.open > .dropdown-toggle.btn-default:hover, -.btn-default:active:focus, -.btn-default.active:focus, -.open > .dropdown-toggle.btn-default:focus, -.btn-default:active.focus, -.btn-default.active.focus, -.open > .dropdown-toggle.btn-default.focus { - color: #333; - background-color: #d4d4d4; - border-color: #8c8c8c; -} -.btn-default:active, -.btn-default.active, -.open > .dropdown-toggle.btn-default { - background-image: none; -} -.btn-default.disabled:hover, -.btn-default[disabled]:hover, -fieldset[disabled] .btn-default:hover, -.btn-default.disabled:focus, -.btn-default[disabled]:focus, -fieldset[disabled] .btn-default:focus, -.btn-default.disabled.focus, -.btn-default[disabled].focus, -fieldset[disabled] .btn-default.focus { - background-color: #fff; - border-color: #ccc; -} -.btn-default .badge { - color: #fff; - background-color: #333; -} -.btn-primary { - color: #fff; - background-color: #337ab7; - border-color: #2e6da4; -} -.btn-primary:focus, -.btn-primary.focus { - color: #fff; - background-color: #286090; - border-color: #122b40; -} -.btn-primary:hover { - color: #fff; - background-color: #286090; - border-color: #204d74; -} -.btn-primary:active, -.btn-primary.active, -.open > .dropdown-toggle.btn-primary { - color: #fff; - background-color: #286090; - border-color: #204d74; -} -.btn-primary:active:hover, -.btn-primary.active:hover, -.open > .dropdown-toggle.btn-primary:hover, -.btn-primary:active:focus, -.btn-primary.active:focus, -.open > .dropdown-toggle.btn-primary:focus, -.btn-primary:active.focus, -.btn-primary.active.focus, -.open > .dropdown-toggle.btn-primary.focus { - color: #fff; - background-color: #204d74; - border-color: #122b40; -} -.btn-primary:active, -.btn-primary.active, -.open > .dropdown-toggle.btn-primary { - background-image: none; -} -.btn-primary.disabled:hover, -.btn-primary[disabled]:hover, -fieldset[disabled] .btn-primary:hover, -.btn-primary.disabled:focus, -.btn-primary[disabled]:focus, -fieldset[disabled] .btn-primary:focus, -.btn-primary.disabled.focus, -.btn-primary[disabled].focus, -fieldset[disabled] .btn-primary.focus { - background-color: #337ab7; - border-color: #2e6da4; -} -.btn-primary .badge { - color: #337ab7; - background-color: #fff; -} -.btn-success { - color: #fff; - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success:focus, -.btn-success.focus { - color: #fff; - background-color: #449d44; - border-color: #255625; -} -.btn-success:hover { - color: #fff; - background-color: #449d44; - border-color: #398439; -} -.btn-success:active, -.btn-success.active, -.open > .dropdown-toggle.btn-success { - color: #fff; - background-color: #449d44; - border-color: #398439; -} -.btn-success:active:hover, -.btn-success.active:hover, -.open > .dropdown-toggle.btn-success:hover, -.btn-success:active:focus, -.btn-success.active:focus, -.open > .dropdown-toggle.btn-success:focus, -.btn-success:active.focus, -.btn-success.active.focus, -.open > .dropdown-toggle.btn-success.focus { - color: #fff; - background-color: #398439; - border-color: #255625; -} -.btn-success:active, -.btn-success.active, -.open > .dropdown-toggle.btn-success { - background-image: none; -} -.btn-success.disabled:hover, -.btn-success[disabled]:hover, -fieldset[disabled] .btn-success:hover, -.btn-success.disabled:focus, -.btn-success[disabled]:focus, -fieldset[disabled] .btn-success:focus, -.btn-success.disabled.focus, -.btn-success[disabled].focus, -fieldset[disabled] .btn-success.focus { - background-color: #5cb85c; - border-color: #4cae4c; -} -.btn-success .badge { - color: #5cb85c; - background-color: #fff; -} -.btn-info { - color: #fff; - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info:focus, -.btn-info.focus { - color: #fff; - background-color: #31b0d5; - border-color: #1b6d85; -} -.btn-info:hover { - color: #fff; - background-color: #31b0d5; - border-color: #269abc; -} -.btn-info:active, -.btn-info.active, -.open > .dropdown-toggle.btn-info { - color: #fff; - background-color: #31b0d5; - border-color: #269abc; -} -.btn-info:active:hover, -.btn-info.active:hover, -.open > .dropdown-toggle.btn-info:hover, -.btn-info:active:focus, -.btn-info.active:focus, -.open > .dropdown-toggle.btn-info:focus, -.btn-info:active.focus, -.btn-info.active.focus, -.open > .dropdown-toggle.btn-info.focus { - color: #fff; - background-color: #269abc; - border-color: #1b6d85; -} -.btn-info:active, -.btn-info.active, -.open > .dropdown-toggle.btn-info { - background-image: none; -} -.btn-info.disabled:hover, -.btn-info[disabled]:hover, -fieldset[disabled] .btn-info:hover, -.btn-info.disabled:focus, -.btn-info[disabled]:focus, -fieldset[disabled] .btn-info:focus, -.btn-info.disabled.focus, -.btn-info[disabled].focus, -fieldset[disabled] .btn-info.focus { - background-color: #5bc0de; - border-color: #46b8da; -} -.btn-info .badge { - color: #5bc0de; - background-color: #fff; -} -.btn-warning { - color: #fff; - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning:focus, -.btn-warning.focus { - color: #fff; - background-color: #ec971f; - border-color: #985f0d; -} -.btn-warning:hover { - color: #fff; - background-color: #ec971f; - border-color: #d58512; -} -.btn-warning:active, -.btn-warning.active, -.open > .dropdown-toggle.btn-warning { - color: #fff; - background-color: #ec971f; - border-color: #d58512; -} -.btn-warning:active:hover, -.btn-warning.active:hover, -.open > .dropdown-toggle.btn-warning:hover, -.btn-warning:active:focus, -.btn-warning.active:focus, -.open > .dropdown-toggle.btn-warning:focus, -.btn-warning:active.focus, -.btn-warning.active.focus, -.open > .dropdown-toggle.btn-warning.focus { - color: #fff; - background-color: #d58512; - border-color: #985f0d; -} -.btn-warning:active, -.btn-warning.active, -.open > .dropdown-toggle.btn-warning { - background-image: none; -} -.btn-warning.disabled:hover, -.btn-warning[disabled]:hover, -fieldset[disabled] .btn-warning:hover, -.btn-warning.disabled:focus, -.btn-warning[disabled]:focus, -fieldset[disabled] .btn-warning:focus, -.btn-warning.disabled.focus, -.btn-warning[disabled].focus, -fieldset[disabled] .btn-warning.focus { - background-color: #f0ad4e; - border-color: #eea236; -} -.btn-warning .badge { - color: #f0ad4e; - background-color: #fff; -} -.btn-danger { - color: #fff; - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger:focus, -.btn-danger.focus { - color: #fff; - background-color: #c9302c; - border-color: #761c19; -} -.btn-danger:hover { - color: #fff; - background-color: #c9302c; - border-color: #ac2925; -} -.btn-danger:active, -.btn-danger.active, -.open > .dropdown-toggle.btn-danger { - color: #fff; - background-color: #c9302c; - border-color: #ac2925; -} -.btn-danger:active:hover, -.btn-danger.active:hover, -.open > .dropdown-toggle.btn-danger:hover, -.btn-danger:active:focus, -.btn-danger.active:focus, -.open > .dropdown-toggle.btn-danger:focus, -.btn-danger:active.focus, -.btn-danger.active.focus, -.open > .dropdown-toggle.btn-danger.focus { - color: #fff; - background-color: #ac2925; - border-color: #761c19; -} -.btn-danger:active, -.btn-danger.active, -.open > .dropdown-toggle.btn-danger { - background-image: none; -} -.btn-danger.disabled:hover, -.btn-danger[disabled]:hover, -fieldset[disabled] .btn-danger:hover, -.btn-danger.disabled:focus, -.btn-danger[disabled]:focus, -fieldset[disabled] .btn-danger:focus, -.btn-danger.disabled.focus, -.btn-danger[disabled].focus, -fieldset[disabled] .btn-danger.focus { - background-color: #d9534f; - border-color: #d43f3a; -} -.btn-danger .badge { - color: #d9534f; - background-color: #fff; -} -.btn-link { - font-weight: normal; - color: #337ab7; - border-radius: 0; -} -.btn-link, -.btn-link:active, -.btn-link.active, -.btn-link[disabled], -fieldset[disabled] .btn-link { - background-color: transparent; - -webkit-box-shadow: none; - box-shadow: none; -} -.btn-link, -.btn-link:hover, -.btn-link:focus, -.btn-link:active { - border-color: transparent; -} -.btn-link:hover, -.btn-link:focus { - color: #23527c; - text-decoration: underline; - background-color: transparent; -} -.btn-link[disabled]:hover, -fieldset[disabled] .btn-link:hover, -.btn-link[disabled]:focus, -fieldset[disabled] .btn-link:focus { - color: #777; - text-decoration: none; -} -.btn-lg, -.btn-group-lg > .btn { - padding: 10px 16px; - font-size: 18px; - line-height: 1.3333333; - border-radius: 6px; -} -.btn-sm, -.btn-group-sm > .btn { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-xs, -.btn-group-xs > .btn { - padding: 1px 5px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -.btn-block { - display: block; - width: 100%; -} -.btn-block + .btn-block { - margin-top: 5px; -} -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} -.fade { - opacity: 0; - -webkit-transition: opacity .15s linear; - -o-transition: opacity .15s linear; - transition: opacity .15s linear; -} -.fade.in { - opacity: 1; -} -.collapse { - display: none; -} -.collapse.in { - display: block; -} -tr.collapse.in { - display: table-row; -} -tbody.collapse.in { - display: table-row-group; -} -.collapsing { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition-timing-function: ease; - -o-transition-timing-function: ease; - transition-timing-function: ease; - -webkit-transition-duration: .35s; - -o-transition-duration: .35s; - transition-duration: .35s; - -webkit-transition-property: height, visibility; - -o-transition-property: height, visibility; - transition-property: height, visibility; -} -.caret { - display: inline-block; - width: 0; - height: 0; - margin-left: 2px; - vertical-align: middle; - border-top: 4px dashed; - border-top: 4px solid \9; - border-right: 4px solid transparent; - border-left: 4px solid transparent; -} -.dropup, -.dropdown { - position: relative; -} -.dropdown-toggle:focus { - outline: 0; -} -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - font-size: 14px; - text-align: left; - list-style: none; - background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, .15); - border-radius: 4px; - -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175); - box-shadow: 0 6px 12px rgba(0, 0, 0, .175); -} -.dropdown-menu.pull-right { - right: 0; - left: auto; -} -.dropdown-menu .divider { - height: 1px; - margin: 9px 0; - overflow: hidden; - background-color: #e5e5e5; -} -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 1.42857143; - color: #333; - white-space: nowrap; -} -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - color: #262626; - text-decoration: none; - background-color: #f5f5f5; -} -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #fff; - text-decoration: none; - background-color: #337ab7; - outline: 0; -} -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #777; -} -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - cursor: not-allowed; - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); -} -.open > .dropdown-menu { - display: block; -} -.open > a { - outline: 0; -} -.dropdown-menu-right { - right: 0; - left: auto; -} -.dropdown-menu-left { - right: auto; - left: 0; -} -.dropdown-header { - display: block; - padding: 3px 20px; - font-size: 12px; - line-height: 1.42857143; - color: #777; - white-space: nowrap; -} -.dropdown-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 990; -} -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - content: ""; - border-top: 0; - border-bottom: 4px dashed; - border-bottom: 4px solid \9; -} -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 2px; -} -@media (min-width: 919px) { - .navbar-right .dropdown-menu { - right: 0; - left: auto; - } - .navbar-right .dropdown-menu-left { - right: auto; - left: 0; - } -} -.btn-group, -.btn-group-vertical { - position: relative; - display: inline-block; - vertical-align: middle; -} -.btn-group > .btn, -.btn-group-vertical > .btn { - position: relative; - float: left; -} -.btn-group > .btn:hover, -.btn-group-vertical > .btn:hover, -.btn-group > .btn:focus, -.btn-group-vertical > .btn:focus, -.btn-group > .btn:active, -.btn-group-vertical > .btn:active, -.btn-group > .btn.active, -.btn-group-vertical > .btn.active { - z-index: 2; -} -.btn-group .btn + .btn, -.btn-group .btn + .btn-group, -.btn-group .btn-group + .btn, -.btn-group .btn-group + .btn-group { - margin-left: -1px; -} -.btn-toolbar { - margin-left: -5px; -} -.btn-toolbar .btn, -.btn-toolbar .btn-group, -.btn-toolbar .input-group { - float: left; -} -.btn-toolbar > .btn, -.btn-toolbar > .btn-group, -.btn-toolbar > .input-group { - margin-left: 5px; -} -.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { - border-radius: 0; -} -.btn-group > .btn:first-child { - margin-left: 0; -} -.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.btn-group > .btn:last-child:not(:first-child), -.btn-group > .dropdown-toggle:not(:first-child) { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group > .btn-group { - float: left; -} -.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child, -.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} -.btn-group > .btn + .dropdown-toggle { - padding-right: 8px; - padding-left: 8px; -} -.btn-group > .btn-lg + .dropdown-toggle { - padding-right: 12px; - padding-left: 12px; -} -.btn-group.open .dropdown-toggle { - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125); -} -.btn-group.open .dropdown-toggle.btn-link { - -webkit-box-shadow: none; - box-shadow: none; -} -.btn .caret { - margin-left: 0; -} -.btn-lg .caret { - border-width: 5px 5px 0; - border-bottom-width: 0; -} -.dropup .btn-lg .caret { - border-width: 0 5px 5px; -} -.btn-group-vertical > .btn, -.btn-group-vertical > .btn-group, -.btn-group-vertical > .btn-group > .btn { - display: block; - float: none; - width: 100%; - max-width: 100%; -} -.btn-group-vertical > .btn-group > .btn { - float: none; -} -.btn-group-vertical > .btn + .btn, -.btn-group-vertical > .btn + .btn-group, -.btn-group-vertical > .btn-group + .btn, -.btn-group-vertical > .btn-group + .btn-group { - margin-top: -1px; - margin-left: 0; -} -.btn-group-vertical > .btn:not(:first-child):not(:last-child) { - border-radius: 0; -} -.btn-group-vertical > .btn:first-child:not(:last-child) { - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group-vertical > .btn:last-child:not(:first-child) { - border-top-left-radius: 0; - border-top-right-radius: 0; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} -.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child, -.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child { - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.btn-group-justified { - display: table; - width: 100%; - table-layout: fixed; - border-collapse: separate; -} -.btn-group-justified > .btn, -.btn-group-justified > .btn-group { - display: table-cell; - float: none; - width: 1%; -} -.btn-group-justified > .btn-group .btn { - width: 100%; -} -.btn-group-justified > .btn-group .dropdown-menu { - left: auto; -} -[data-toggle="buttons"] > .btn input[type="radio"], -[data-toggle="buttons"] > .btn-group > .btn input[type="radio"], -[data-toggle="buttons"] > .btn input[type="checkbox"], -[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] { - position: absolute; - clip: rect(0, 0, 0, 0); - pointer-events: none; -} -.input-group { - position: relative; - display: table; - border-collapse: separate; -} -.input-group[class*="col-"] { - float: none; - padding-right: 0; - padding-left: 0; -} -.input-group .form-control { - position: relative; - z-index: 2; - float: left; - width: 100%; - margin-bottom: 0; -} -.input-group .form-control:focus { - z-index: 3; -} -.input-group-lg > .form-control, -.input-group-lg > .input-group-addon, -.input-group-lg > .input-group-btn > .btn { - height: 46px; - padding: 10px 16px; - font-size: 18px; - line-height: 1.3333333; - border-radius: 6px; -} -select.input-group-lg > .form-control, -select.input-group-lg > .input-group-addon, -select.input-group-lg > .input-group-btn > .btn { - height: 46px; - line-height: 46px; -} -textarea.input-group-lg > .form-control, -textarea.input-group-lg > .input-group-addon, -textarea.input-group-lg > .input-group-btn > .btn, -select[multiple].input-group-lg > .form-control, -select[multiple].input-group-lg > .input-group-addon, -select[multiple].input-group-lg > .input-group-btn > .btn { - height: auto; -} -.input-group-sm > .form-control, -.input-group-sm > .input-group-addon, -.input-group-sm > .input-group-btn > .btn { - height: 30px; - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} -select.input-group-sm > .form-control, -select.input-group-sm > .input-group-addon, -select.input-group-sm > .input-group-btn > .btn { - height: 30px; - line-height: 30px; -} -textarea.input-group-sm > .form-control, -textarea.input-group-sm > .input-group-addon, -textarea.input-group-sm > .input-group-btn > .btn, -select[multiple].input-group-sm > .form-control, -select[multiple].input-group-sm > .input-group-addon, -select[multiple].input-group-sm > .input-group-btn > .btn { - height: auto; -} -.input-group-addon, -.input-group-btn, -.input-group .form-control { - display: table-cell; -} -.input-group-addon:not(:first-child):not(:last-child), -.input-group-btn:not(:first-child):not(:last-child), -.input-group .form-control:not(:first-child):not(:last-child) { - border-radius: 0; -} -.input-group-addon, -.input-group-btn { - width: 1%; - white-space: nowrap; - vertical-align: middle; -} -.input-group-addon { - padding: 6px 12px; - font-size: 14px; - font-weight: normal; - line-height: 1; - color: #555; - text-align: center; - background-color: #eee; - border: 1px solid #ccc; - border-radius: 4px; -} -.input-group-addon.input-sm { - padding: 5px 10px; - font-size: 12px; - border-radius: 3px; -} -.input-group-addon.input-lg { - padding: 10px 16px; - font-size: 18px; - border-radius: 6px; -} -.input-group-addon input[type="radio"], -.input-group-addon input[type="checkbox"] { - margin-top: 0; -} -.input-group .form-control:first-child, -.input-group-addon:first-child, -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group > .btn, -.input-group-btn:first-child > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle), -.input-group-btn:last-child > .btn-group:not(:last-child) > .btn { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} -.input-group-addon:first-child { - border-right: 0; -} -.input-group .form-control:last-child, -.input-group-addon:last-child, -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group > .btn, -.input-group-btn:last-child > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child), -.input-group-btn:first-child > .btn-group:not(:first-child) > .btn { - border-top-left-radius: 0; - border-bottom-left-radius: 0; -} -.input-group-addon:last-child { - border-left: 0; -} -.input-group-btn { - position: relative; - font-size: 0; - white-space: nowrap; -} -.input-group-btn > .btn { - position: relative; -} -.input-group-btn > .btn + .btn { - margin-left: -1px; -} -.input-group-btn > .btn:hover, -.input-group-btn > .btn:focus, -.input-group-btn > .btn:active { - z-index: 2; -} -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .btn-group { - margin-right: -1px; -} -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .btn-group { - z-index: 2; - margin-left: -1px; -} -.nav { - padding-left: 0; - margin-bottom: 0; - list-style: none; -} -.nav > li { - position: relative; - display: block; -} -.nav > li > a { - position: relative; - display: block; - padding: 10px 15px; -} -.nav > li > a:hover, -.nav > li > a:focus { - text-decoration: none; - background-color: #eee; -} -.nav > li.disabled > a { - color: #777; -} -.nav > li.disabled > a:hover, -.nav > li.disabled > a:focus { - color: #777; - text-decoration: none; - cursor: not-allowed; - background-color: transparent; -} -.nav .open > a, -.nav .open > a:hover, -.nav .open > a:focus { - background-color: #eee; - border-color: #337ab7; -} -.nav .nav-divider { - height: 1px; - margin: 9px 0; - overflow: hidden; - background-color: #e5e5e5; -} -.nav > li > a > img { - max-width: none; -} -.nav-tabs { - border-bottom: 1px solid #ddd; -} -.nav-tabs > li { - float: left; - margin-bottom: -1px; -} -.nav-tabs > li > a { - margin-right: 2px; - line-height: 1.42857143; - border: 1px solid transparent; - border-radius: 4px 4px 0 0; -} -.nav-tabs > li > a:hover { - border-color: #eee #eee #ddd; -} -.nav-tabs > li.active > a, -.nav-tabs > li.active > a:hover, -.nav-tabs > li.active > a:focus { - color: #555; - cursor: default; - background-color: #fff; - border: 1px solid #ddd; - border-bottom-color: transparent; -} -.nav-tabs.nav-justified { - width: 100%; - border-bottom: 0; -} -.nav-tabs.nav-justified > li { - float: none; -} -.nav-tabs.nav-justified > li > a { - margin-bottom: 5px; - text-align: center; -} -.nav-tabs.nav-justified > .dropdown .dropdown-menu { - top: auto; - left: auto; -} -@media (min-width: 919px) { - .nav-tabs.nav-justified > li { - display: table-cell; - width: 1%; - } - .nav-tabs.nav-justified > li > a { - margin-bottom: 0; - } -} -.nav-tabs.nav-justified > li > a { - margin-right: 0; - border-radius: 4px; -} -.nav-tabs.nav-justified > .active > a, -.nav-tabs.nav-justified > .active > a:hover, -.nav-tabs.nav-justified > .active > a:focus { - border: 1px solid #ddd; -} -@media (min-width: 919px) { - .nav-tabs.nav-justified > li > a { - border-bottom: 1px solid #ddd; - border-radius: 4px 4px 0 0; - } - .nav-tabs.nav-justified > .active > a, - .nav-tabs.nav-justified > .active > a:hover, - .nav-tabs.nav-justified > .active > a:focus { - border-bottom-color: #fff; - } -} -.nav-pills > li { - float: left; -} -.nav-pills > li > a { - border-radius: 4px; -} -.nav-pills > li + li { - margin-left: 2px; -} -.nav-pills > li.active > a, -.nav-pills > li.active > a:hover, -.nav-pills > li.active > a:focus { - color: #fff; - background-color: #337ab7; -} -.nav-stacked > li { - float: none; -} -.nav-stacked > li + li { - margin-top: 2px; - margin-left: 0; -} -.nav-justified { - width: 100%; -} -.nav-justified > li { - float: none; -} -.nav-justified > li > a { - margin-bottom: 5px; - text-align: center; -} -.nav-justified > .dropdown .dropdown-menu { - top: auto; - left: auto; -} -@media (min-width: 919px) { - .nav-justified > li { - display: table-cell; - width: 1%; - } - .nav-justified > li > a { - margin-bottom: 0; - } -} -.nav-tabs-justified { - border-bottom: 0; -} -.nav-tabs-justified > li > a { - margin-right: 0; - border-radius: 4px; -} -.nav-tabs-justified > .active > a, -.nav-tabs-justified > .active > a:hover, -.nav-tabs-justified > .active > a:focus { - border: 1px solid #ddd; -} -@media (min-width: 919px) { - .nav-tabs-justified > li > a { - border-bottom: 1px solid #ddd; - border-radius: 4px 4px 0 0; - } - .nav-tabs-justified > .active > a, - .nav-tabs-justified > .active > a:hover, - .nav-tabs-justified > .active > a:focus { - border-bottom-color: #fff; - } -} -.tab-content > .tab-pane { - display: none; -} -.tab-content > .active { - display: block; -} -.nav-tabs .dropdown-menu { - margin-top: -1px; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.navbar { - position: relative; - min-height: 50px; - /*margin-bottom: 20px;*/ - border: 1px solid transparent; -} -@media (min-width: 919px) { - .navbar { - /*border-radius: 4px;*/ - } -} -@media (min-width: 919px) { - .navbar-header { - float: left; - } -} -.navbar-collapse { - padding-right: 15px; - padding-left: 15px; - overflow-x: visible; - -webkit-overflow-scrolling: touch; - border-top: 1px solid transparent; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); -} -.navbar-collapse.in { - overflow-y: auto; -} -@media (min-width: 919px) { - .navbar-collapse { - width: auto; - border-top: 0; - -webkit-box-shadow: none; - box-shadow: none; - } - .navbar-collapse.collapse { - display: block !important; - height: auto !important; - padding-bottom: 0; - overflow: visible !important; - } - .navbar-collapse.in { - overflow-y: visible; - } - .navbar-fixed-top .navbar-collapse, - .navbar-static-top .navbar-collapse, - .navbar-fixed-bottom .navbar-collapse { - padding-right: 0; - padding-left: 0; - } -} -.navbar-fixed-top .navbar-collapse, -.navbar-fixed-bottom .navbar-collapse { - max-height: 340px; -} -@media (max-device-width: 480px) and (orientation: landscape) { - .navbar-fixed-top .navbar-collapse, - .navbar-fixed-bottom .navbar-collapse { - max-height: 200px; - } -} -.container > .navbar-header, -.container-fluid > .navbar-header, -.container > .navbar-collapse, -.container-fluid > .navbar-collapse { - margin-right: -15px; - margin-left: -15px; -} -@media (min-width: 919px) { - .container > .navbar-header, - .container-fluid > .navbar-header, - .container > .navbar-collapse, - .container-fluid > .navbar-collapse { - margin-right: 0; - margin-left: 0; - } -} -.navbar-static-top { - z-index: 1000; - border-width: 0 0 1px; -} -@media (min-width: 919px) { - .navbar-static-top { - border-radius: 0; - } -} -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; -} -@media (min-width: 919px) { - .navbar-fixed-top, - .navbar-fixed-bottom { - border-radius: 0; - } -} -.navbar-fixed-top { - top: 0; - border-width: 0 0 1px; -} -.navbar-fixed-bottom { - bottom: 0; - margin-bottom: 0; - border-width: 1px 0 0; -} -.navbar-brand { - float: left; - height: 50px; - padding: 15px 15px; - font-size: 18px; - line-height: 20px; -} -.navbar-brand:hover, -.navbar-brand:focus { - text-decoration: none; -} -.navbar-brand > img { - display: block; -} -@media (min-width: 919px) { - .navbar > .container .navbar-brand, - .navbar > .container-fluid .navbar-brand { - margin-left: -15px; - } -} -.navbar-toggle { - position: relative; - float: right; - padding: 9px 10px; - margin-top: 8px; - margin-right: 15px; - margin-bottom: 8px; - background-color: transparent; - background-image: none; - border: 1px solid transparent; - border-radius: 4px; -} -.navbar-toggle:focus { - outline: 0; -} -.navbar-toggle .icon-bar { - display: block; - width: 22px; - height: 2px; - border-radius: 1px; -} -.navbar-toggle .icon-bar + .icon-bar { - margin-top: 4px; -} -@media (min-width: 919px) { - .navbar-toggle { - display: none; - } -} -.navbar-nav { - margin: 7.5px -15px; -} -.navbar-nav > li > a { - padding-top: 10px; - padding-bottom: 10px; - line-height: 20px; -} -@media (max-width: 767px) { - .navbar-nav .open .dropdown-menu { - position: static; - float: none; - width: auto; - margin-top: 0; - background-color: transparent; - border: 0; - -webkit-box-shadow: none; - box-shadow: none; - } - .navbar-nav .open .dropdown-menu > li > a, - .navbar-nav .open .dropdown-menu .dropdown-header { - padding: 5px 15px 5px 25px; - } - .navbar-nav .open .dropdown-menu > li > a { - line-height: 20px; - } - .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-nav .open .dropdown-menu > li > a:focus { - background-image: none; - } -} -@media (min-width: 919px) { - .navbar-nav { - float: left; - margin: 0; - } - .navbar-nav > li { - float: left; - } - .navbar-nav > li > a { - padding-top: 15px; - padding-bottom: 15px; - } -} -.navbar-form { - padding: 10px 15px; - margin-top: 8px; - margin-right: -15px; - margin-bottom: 8px; - margin-left: -15px; - border-top: 1px solid transparent; - border-bottom: 1px solid transparent; - -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); - box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1); -} -@media (min-width: 919px) { - .navbar-form .form-group { - display: inline-block; - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .form-control { - display: inline-block; - width: auto; - vertical-align: middle; - } - .navbar-form .form-control-static { - display: inline-block; - } - .navbar-form .input-group { - display: inline-table; - vertical-align: middle; - } - .navbar-form .input-group .input-group-addon, - .navbar-form .input-group .input-group-btn, - .navbar-form .input-group .form-control { - width: auto; - } - .navbar-form .input-group > .form-control { - width: 100%; - } - .navbar-form .control-label { - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .radio, - .navbar-form .checkbox { - display: inline-block; - margin-top: 0; - margin-bottom: 0; - vertical-align: middle; - } - .navbar-form .radio label, - .navbar-form .checkbox label { - padding-left: 0; - } - .navbar-form .radio input[type="radio"], - .navbar-form .checkbox input[type="checkbox"] { - position: relative; - margin-left: 0; - } - .navbar-form .has-feedback .form-control-feedback { - top: 0; - } -} -@media (max-width: 767px) { - .navbar-form .form-group { - margin-bottom: 5px; - } - .navbar-form .form-group:last-child { - margin-bottom: 0; - } -} -@media (min-width: 919px) { - .navbar-form { - width: auto; - padding-top: 0; - padding-bottom: 0; - margin-right: 0; - margin-left: 0; - border: 0; - -webkit-box-shadow: none; - box-shadow: none; - } -} -.navbar-nav > li > .dropdown-menu { - margin-top: 0; - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { - margin-bottom: 0; - border-top-left-radius: 4px; - border-top-right-radius: 4px; - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} -.navbar-btn { - margin-top: 8px; - margin-bottom: 8px; -} -.navbar-btn.btn-sm { - margin-top: 10px; - margin-bottom: 10px; -} -.navbar-btn.btn-xs { - margin-top: 14px; - margin-bottom: 14px; -} -.navbar-text { - margin-top: 15px; - margin-bottom: 15px; -} -@media (min-width: 919px) { - .navbar-text { - float: left; - margin-right: 15px; - margin-left: 15px; - } -} -@media (min-width: 919px) { - .navbar-left { - float: left !important; - } - .navbar-right { - float: right !important; - margin-right: -15px; - } - .navbar-right ~ .navbar-right { - margin-right: 0; - } -} -.navbar-default { - background-color: #f8f8f8; - border-color: #e7e7e7; -} -.navbar-default .navbar-brand { - color: #777; -} -.navbar-default .navbar-brand:hover, -.navbar-default .navbar-brand:focus { - color: #5e5e5e; - background-color: transparent; -} -.navbar-default .navbar-text { - color: #777; -} -.navbar-default .navbar-nav > li > a { - color: #777; -} -.navbar-default .navbar-nav > li > a:hover, -.navbar-default .navbar-nav > li > a:focus { - color: #333; - background-color: transparent; -} -.navbar-default .navbar-nav > .active > a, -.navbar-default .navbar-nav > .active > a:hover, -.navbar-default .navbar-nav > .active > a:focus { - color: #555; - background-color: #e7e7e7; -} -.navbar-default .navbar-nav > .disabled > a, -.navbar-default .navbar-nav > .disabled > a:hover, -.navbar-default .navbar-nav > .disabled > a:focus { - color: #ccc; - background-color: transparent; -} -.navbar-default .navbar-toggle { - border-color: #ddd; -} -.navbar-default .navbar-toggle:hover, -.navbar-default .navbar-toggle:focus { - background-color: #ddd; -} -.navbar-default .navbar-toggle .icon-bar { - background-color: #888; -} -.navbar-default .navbar-collapse, -.navbar-default .navbar-form { - border-color: #e7e7e7; -} -.navbar-default .navbar-nav > .open > a, -.navbar-default .navbar-nav > .open > a:hover, -.navbar-default .navbar-nav > .open > a:focus { - color: #555; - background-color: #e7e7e7; -} -@media (max-width: 767px) { - .navbar-default .navbar-nav .open .dropdown-menu > li > a { - color: #777; - } - .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus { - color: #333; - background-color: transparent; - } - .navbar-default .navbar-nav .open .dropdown-menu > .active > a, - .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #555; - background-color: #e7e7e7; - } - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a, - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover, - .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus { - color: #ccc; - background-color: transparent; - } -} -.navbar-default .navbar-link { - color: #777; -} -.navbar-default .navbar-link:hover { - color: #333; -} -.navbar-default .btn-link { - color: #777; -} -.navbar-default .btn-link:hover, -.navbar-default .btn-link:focus { - color: #333; -} -.navbar-default .btn-link[disabled]:hover, -fieldset[disabled] .navbar-default .btn-link:hover, -.navbar-default .btn-link[disabled]:focus, -fieldset[disabled] .navbar-default .btn-link:focus { - color: #ccc; -} -.navbar-inverse { - background-color: #f4b124; - border-color: #ffebc1; - padding-top: 10px; -} -.navbar-inverse .navbar-brand { - color: #333; -} -.navbar-inverse .navbar-brand:hover, -.navbar-inverse .navbar-brand:focus { - color: #fff; - background-color: transparent; -} -.navbar-inverse .navbar-text { - color: #9d9d9d; -} -.navbar-inverse .navbar-nav > li > a { - color: #333; - font-weight: bold; -} -.navbar-inverse .navbar-nav > li > a:hover, -.navbar-inverse .navbar-nav > li > a:focus { - color: #fff; - background-color: transparent; -} -.navbar-inverse .navbar-nav > .active > a, -.navbar-inverse .navbar-nav > .active > a:hover, -.navbar-inverse .navbar-nav > .active > a:focus { - color: #fff; - background-color: #080808; -} -.navbar-inverse .navbar-nav > .disabled > a, -.navbar-inverse .navbar-nav > .disabled > a:hover, -.navbar-inverse .navbar-nav > .disabled > a:focus { - color: #444; - background-color: transparent; -} -.navbar-inverse .navbar-toggle { - border-color: #333; -} -.navbar-inverse .navbar-toggle:hover, -.navbar-inverse .navbar-toggle:focus { - background-color: #333; -} -.navbar-inverse .navbar-toggle .icon-bar { - background-color: #fff; -} -.navbar-inverse .navbar-collapse, -.navbar-inverse .navbar-form { - border-color: #101010; -} -.navbar-inverse .navbar-nav > .open > a, -.navbar-inverse .navbar-nav > .open > a:hover, -.navbar-inverse .navbar-nav > .open > a:focus { - color: #fff; - background-color: #080808; -} -@media (max-width: 767px) { - .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header { - border-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu .divider { - background-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a { - color: #9d9d9d; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus { - color: #fff; - background-color: transparent; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a, - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus { - color: #fff; - background-color: #080808; - } - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a, - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover, - .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus { - color: #444; - background-color: transparent; - } -} -.navbar-inverse .navbar-link { - color: #9d9d9d; -} -.navbar-inverse .navbar-link:hover { - color: #fff; -} -.navbar-inverse .btn-link { - color: #9d9d9d; -} -.navbar-inverse .btn-link:hover, -.navbar-inverse .btn-link:focus { - color: #fff; -} -.navbar-inverse .btn-link[disabled]:hover, -fieldset[disabled] .navbar-inverse .btn-link:hover, -.navbar-inverse .btn-link[disabled]:focus, -fieldset[disabled] .navbar-inverse .btn-link:focus { - color: #444; -} -.breadcrumb { - padding: 8px 15px; - margin-bottom: 20px; - list-style: none; - background-color: #f5f5f5; - border-radius: 4px; -} -.breadcrumb > li { - display: inline-block; -} -.breadcrumb > li + li:before { - padding: 0 5px; - color: #ccc; - content: "/\00a0"; -} -.breadcrumb > .active { - color: #777; -} -.pagination { - display: inline-block; - padding-left: 0; - margin: 20px 0; - border-radius: 4px; -} -.pagination > li { - display: inline; -} -.pagination > li > a, -.pagination > li > span { - position: relative; - float: left; - padding: 6px 12px; - margin-left: -1px; - line-height: 1.42857143; - color: #337ab7; - text-decoration: none; - background-color: #fff; - border: 1px solid #ddd; -} -.pagination > li:first-child > a, -.pagination > li:first-child > span { - margin-left: 0; - border-top-left-radius: 4px; - border-bottom-left-radius: 4px; -} -.pagination > li:last-child > a, -.pagination > li:last-child > span { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} -.pagination > li > a:hover, -.pagination > li > span:hover, -.pagination > li > a:focus, -.pagination > li > span:focus { - z-index: 2; - color: #23527c; - background-color: #eee; - border-color: #ddd; -} -.pagination > .active > a, -.pagination > .active > span, -.pagination > .active > a:hover, -.pagination > .active > span:hover, -.pagination > .active > a:focus, -.pagination > .active > span:focus { - z-index: 3; - color: #fff; - cursor: default; - background-color: #337ab7; - border-color: #337ab7; -} -.pagination > .disabled > span, -.pagination > .disabled > span:hover, -.pagination > .disabled > span:focus, -.pagination > .disabled > a, -.pagination > .disabled > a:hover, -.pagination > .disabled > a:focus { - color: #777; - cursor: not-allowed; - background-color: #fff; - border-color: #ddd; -} -.pagination-lg > li > a, -.pagination-lg > li > span { - padding: 10px 16px; - font-size: 18px; - line-height: 1.3333333; -} -.pagination-lg > li:first-child > a, -.pagination-lg > li:first-child > span { - border-top-left-radius: 6px; - border-bottom-left-radius: 6px; -} -.pagination-lg > li:last-child > a, -.pagination-lg > li:last-child > span { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; -} -.pagination-sm > li > a, -.pagination-sm > li > span { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; -} -.pagination-sm > li:first-child > a, -.pagination-sm > li:first-child > span { - border-top-left-radius: 3px; - border-bottom-left-radius: 3px; -} -.pagination-sm > li:last-child > a, -.pagination-sm > li:last-child > span { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} -.pager { - padding-left: 0; - margin: 20px 0; - text-align: center; - list-style: none; -} -.pager li { - display: inline; -} -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 15px; -} -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #eee; -} -.pager .next > a, -.pager .next > span { - float: right; -} -.pager .previous > a, -.pager .previous > span { - float: left; -} -.pager .disabled > a, -.pager .disabled > a:hover, -.pager .disabled > a:focus, -.pager .disabled > span { - color: #777; - cursor: not-allowed; - background-color: #fff; -} -.label { - display: inline; - padding: .2em .6em .3em; - font-size: 75%; - font-weight: bold; - line-height: 1; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: baseline; - border-radius: .25em; -} -a.label:hover, -a.label:focus { - color: #fff; - text-decoration: none; - cursor: pointer; -} -.label:empty { - display: none; -} -.btn .label { - position: relative; - top: -1px; -} -.label-default { - background-color: #777; -} -.label-default[href]:hover, -.label-default[href]:focus { - background-color: #5e5e5e; -} -.label-primary { - background-color: #337ab7; -} -.label-primary[href]:hover, -.label-primary[href]:focus { - background-color: #286090; -} -.label-success { - background-color: #5cb85c; -} -.label-success[href]:hover, -.label-success[href]:focus { - background-color: #449d44; -} -.label-info { - background-color: #5bc0de; -} -.label-info[href]:hover, -.label-info[href]:focus { - background-color: #31b0d5; -} -.label-warning { - background-color: #f0ad4e; -} -.label-warning[href]:hover, -.label-warning[href]:focus { - background-color: #ec971f; -} -.label-danger { - background-color: #d9534f; -} -.label-danger[href]:hover, -.label-danger[href]:focus { - background-color: #c9302c; -} -.badge { - display: inline-block; - min-width: 10px; - padding: 3px 7px; - font-size: 12px; - font-weight: bold; - line-height: 1; - color: #fff; - text-align: center; - white-space: nowrap; - vertical-align: middle; - background-color: #777; - border-radius: 10px; -} -.badge:empty { - display: none; -} -.btn .badge { - position: relative; - top: -1px; -} -.btn-xs .badge, -.btn-group-xs > .btn .badge { - top: 0; - padding: 1px 5px; -} -a.badge:hover, -a.badge:focus { - color: #fff; - text-decoration: none; - cursor: pointer; -} -.list-group-item.active > .badge, -.nav-pills > .active > a > .badge { - color: #337ab7; - background-color: #fff; -} -.list-group-item > .badge { - float: right; -} -.list-group-item > .badge + .badge { - margin-right: 5px; -} -.nav-pills > li > a > .badge { - margin-left: 3px; -} -.jumbotron { - padding-top: 30px; - padding-bottom: 30px; - margin-bottom: 30px; - color: inherit; - background-color: #eee; -} -.jumbotron h1, -.jumbotron .h1 { - color: inherit; -} -.jumbotron p { - margin-bottom: 15px; - font-size: 21px; - font-weight: 200; -} -.jumbotron > hr { - border-top-color: #d5d5d5; -} -.container .jumbotron, -.container-fluid .jumbotron { - padding-right: 15px; - padding-left: 15px; - border-radius: 6px; -} -.jumbotron .container { - max-width: 100%; -} -@media screen and (min-width: 768px) { - .jumbotron { - padding-top: 48px; - padding-bottom: 48px; - } - .container .jumbotron, - .container-fluid .jumbotron { - padding-right: 60px; - padding-left: 60px; - } - .jumbotron h1, - .jumbotron .h1 { - font-size: 63px; - } -} -.thumbnail { - display: block; - padding: 4px; - margin-bottom: 20px; - line-height: 1.42857143; - background-color: #fff; - border: 1px solid #ddd; - border-radius: 4px; - -webkit-transition: border .2s ease-in-out; - -o-transition: border .2s ease-in-out; - transition: border .2s ease-in-out; -} -.thumbnail > img, -.thumbnail a > img { - margin-right: auto; - margin-left: auto; -} -a.thumbnail:hover, -a.thumbnail:focus, -a.thumbnail.active { - border-color: #337ab7; -} -.thumbnail .caption { - padding: 9px; - color: #333; -} -.alert { - padding: 15px; - margin-bottom: 20px; - border: 1px solid transparent; - border-radius: 4px; -} -.alert h4 { - margin-top: 0; - color: inherit; -} -.alert .alert-link { - font-weight: bold; -} -.alert > p, -.alert > ul { - margin-bottom: 0; -} -.alert > p + p { - margin-top: 5px; -} -.alert-dismissable, -.alert-dismissible { - padding-right: 35px; -} -.alert-dismissable .close, -.alert-dismissible .close { - position: relative; - top: -2px; - right: -21px; - color: inherit; -} -.alert-success { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; -} -.alert-success hr { - border-top-color: #c9e2b3; -} -.alert-success .alert-link { - color: #2b542c; -} -.alert-info { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; -} -.alert-info hr { - border-top-color: #a6e1ec; -} -.alert-info .alert-link { - color: #245269; -} -.alert-warning { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; -} -.alert-warning hr { - border-top-color: #f7e1b5; -} -.alert-warning .alert-link { - color: #66512c; -} -.alert-danger { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; -} -.alert-danger hr { - border-top-color: #e4b9c0; -} -.alert-danger .alert-link { - color: #843534; -} -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@-o-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} -.progress { - height: 20px; - margin-bottom: 20px; - overflow: hidden; - background-color: #f5f5f5; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); -} -.progress-bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - line-height: 20px; - color: #fff; - text-align: center; - background-color: #337ab7; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15); - -webkit-transition: width .6s ease; - -o-transition: width .6s ease; - transition: width .6s ease; -} -.progress-striped .progress-bar, -.progress-bar-striped { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - -webkit-background-size: 40px 40px; - background-size: 40px 40px; -} -.progress.active .progress-bar, -.progress-bar.active { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} -.progress-bar-success { - background-color: #5cb85c; -} -.progress-striped .progress-bar-success { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.progress-bar-info { - background-color: #5bc0de; -} -.progress-striped .progress-bar-info { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.progress-bar-warning { - background-color: #f0ad4e; -} -.progress-striped .progress-bar-warning { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.progress-bar-danger { - background-color: #d9534f; -} -.progress-striped .progress-bar-danger { - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent); -} -.media { - margin-top: 15px; -} -.media:first-child { - margin-top: 0; -} -.media, -.media-body { - overflow: hidden; - zoom: 1; -} -.media-body { - width: 10000px; -} -.media-object { - display: block; -} -.media-object.img-thumbnail { - max-width: none; -} -.media-right, -.media > .pull-right { - padding-left: 10px; -} -.media-left, -.media > .pull-left { - padding-right: 10px; -} -.media-left, -.media-right, -.media-body { - display: table-cell; - vertical-align: top; -} -.media-middle { - vertical-align: middle; -} -.media-bottom { - vertical-align: bottom; -} -.media-heading { - margin-top: 0; - margin-bottom: 5px; -} -.media-list { - padding-left: 0; - list-style: none; -} -.list-group { - padding-left: 0; - margin-bottom: 20px; -} -.list-group-item { - position: relative; - display: block; - padding: 10px 15px; - margin-bottom: -1px; - background-color: #fff; - border: 1px solid #ddd; -} -.list-group-item:first-child { - border-top-left-radius: 4px; - border-top-right-radius: 4px; -} -.list-group-item:last-child { - margin-bottom: 0; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} -a.list-group-item, -button.list-group-item { - color: #555; -} -a.list-group-item .list-group-item-heading, -button.list-group-item .list-group-item-heading { +.btn-default:active:hover, +.btn-default.active:hover, +.open > .dropdown-toggle.btn-default:hover, +.btn-default:active:focus, +.btn-default.active:focus, +.open > .dropdown-toggle.btn-default:focus, +.btn-default:active.focus, +.btn-default.active.focus, +.open > .dropdown-toggle.btn-default.focus { color: #333; + background-color: #d4d4d4; + border-color: #8c8c8c; } -a.list-group-item:hover, -button.list-group-item:hover, -a.list-group-item:focus, -button.list-group-item:focus { - color: #555; - text-decoration: none; - background-color: #f5f5f5; -} -button.list-group-item { - width: 100%; - text-align: left; -} -.list-group-item.disabled, -.list-group-item.disabled:hover, -.list-group-item.disabled:focus { - color: #777; - cursor: not-allowed; - background-color: #eee; +.btn-default:active, +.btn-default.active, +.open > .dropdown-toggle.btn-default { + background-image: none; } -.list-group-item.disabled .list-group-item-heading, -.list-group-item.disabled:hover .list-group-item-heading, -.list-group-item.disabled:focus .list-group-item-heading { - color: inherit; +.btn-default.disabled:hover, +.btn-default[disabled]:hover, +.btn-default.disabled:focus, +.btn-default[disabled]:focus, +.btn-default.disabled.focus, +.btn-default[disabled].focus { + background-color: #fff; + border-color: #ccc; } -.list-group-item.disabled .list-group-item-text, -.list-group-item.disabled:hover .list-group-item-text, -.list-group-item.disabled:focus .list-group-item-text { - color: #777; +.btn-default .badge { + color: #fff; + background-color: #333; } -.list-group-item.active, -.list-group-item.active:hover, -.list-group-item.active:focus { - z-index: 2; +.btn-primary { color: #fff; background-color: #337ab7; - border-color: #337ab7; -} -.list-group-item.active .list-group-item-heading, -.list-group-item.active:hover .list-group-item-heading, -.list-group-item.active:focus .list-group-item-heading, -.list-group-item.active .list-group-item-heading > small, -.list-group-item.active:hover .list-group-item-heading > small, -.list-group-item.active:focus .list-group-item-heading > small, -.list-group-item.active .list-group-item-heading > .small, -.list-group-item.active:hover .list-group-item-heading > .small, -.list-group-item.active:focus .list-group-item-heading > .small { - color: inherit; -} -.list-group-item.active .list-group-item-text, -.list-group-item.active:hover .list-group-item-text, -.list-group-item.active:focus .list-group-item-text { - color: #c7ddef; -} -.list-group-item-success { - color: #3c763d; - background-color: #dff0d8; -} -a.list-group-item-success, -button.list-group-item-success { - color: #3c763d; -} -a.list-group-item-success .list-group-item-heading, -button.list-group-item-success .list-group-item-heading { - color: inherit; + border-color: #2e6da4; } -a.list-group-item-success:hover, -button.list-group-item-success:hover, -a.list-group-item-success:focus, -button.list-group-item-success:focus { - color: #3c763d; - background-color: #d0e9c6; -} -a.list-group-item-success.active, -button.list-group-item-success.active, -a.list-group-item-success.active:hover, -button.list-group-item-success.active:hover, -a.list-group-item-success.active:focus, -button.list-group-item-success.active:focus { +.btn-primary:focus, +.btn-primary.focus { color: #fff; - background-color: #3c763d; - border-color: #3c763d; -} -.list-group-item-info { - color: #31708f; - background-color: #d9edf7; -} -a.list-group-item-info, -button.list-group-item-info { - color: #31708f; -} -a.list-group-item-info .list-group-item-heading, -button.list-group-item-info .list-group-item-heading { - color: inherit; + background-color: #286090; + border-color: #122b40; } -a.list-group-item-info:hover, -button.list-group-item-info:hover, -a.list-group-item-info:focus, -button.list-group-item-info:focus { - color: #31708f; - background-color: #c4e3f3; -} -a.list-group-item-info.active, -button.list-group-item-info.active, -a.list-group-item-info.active:hover, -button.list-group-item-info.active:hover, -a.list-group-item-info.active:focus, -button.list-group-item-info.active:focus { +.btn-primary:hover { color: #fff; - background-color: #31708f; - border-color: #31708f; -} -.list-group-item-warning { - color: #8a6d3b; - background-color: #fcf8e3; -} -a.list-group-item-warning, -button.list-group-item-warning { - color: #8a6d3b; -} -a.list-group-item-warning .list-group-item-heading, -button.list-group-item-warning .list-group-item-heading { - color: inherit; + background-color: #286090; + border-color: #204d74; } -a.list-group-item-warning:hover, -button.list-group-item-warning:hover, -a.list-group-item-warning:focus, -button.list-group-item-warning:focus { - color: #8a6d3b; - background-color: #faf2cc; -} -a.list-group-item-warning.active, -button.list-group-item-warning.active, -a.list-group-item-warning.active:hover, -button.list-group-item-warning.active:hover, -a.list-group-item-warning.active:focus, -button.list-group-item-warning.active:focus { +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { color: #fff; - background-color: #8a6d3b; - border-color: #8a6d3b; -} -.list-group-item-danger { - color: #a94442; - background-color: #f2dede; -} -a.list-group-item-danger, -button.list-group-item-danger { - color: #a94442; -} -a.list-group-item-danger .list-group-item-heading, -button.list-group-item-danger .list-group-item-heading { - color: inherit; + background-color: #286090; + border-color: #204d74; } -a.list-group-item-danger:hover, -button.list-group-item-danger:hover, -a.list-group-item-danger:focus, -button.list-group-item-danger:focus { - color: #a94442; - background-color: #ebcccc; -} -a.list-group-item-danger.active, -button.list-group-item-danger.active, -a.list-group-item-danger.active:hover, -button.list-group-item-danger.active:hover, -a.list-group-item-danger.active:focus, -button.list-group-item-danger.active:focus { +.btn-primary:active:hover, +.btn-primary.active:hover, +.open > .dropdown-toggle.btn-primary:hover, +.btn-primary:active:focus, +.btn-primary.active:focus, +.open > .dropdown-toggle.btn-primary:focus, +.btn-primary:active.focus, +.btn-primary.active.focus, +.open > .dropdown-toggle.btn-primary.focus { color: #fff; - background-color: #a94442; - border-color: #a94442; + background-color: #204d74; + border-color: #122b40; } -.list-group-item-heading { - margin-top: 0; - margin-bottom: 5px; +.btn-primary:active, +.btn-primary.active, +.open > .dropdown-toggle.btn-primary { + background-image: none; } -.list-group-item-text { - margin-bottom: 0; - line-height: 1.3; +.btn-primary.disabled:hover, +.btn-primary[disabled]:hover, +.btn-primary.disabled:focus, +.btn-primary[disabled]:focus, +.btn-primary.disabled.focus, +.btn-primary[disabled].focus { + background-color: #337ab7; + border-color: #2e6da4; } -.panel { - margin-bottom: 20px; +.btn-primary .badge { + color: #337ab7; background-color: #fff; - border: 1px solid transparent; - border-radius: 4px; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05); - box-shadow: 0 1px 1px rgba(0, 0, 0, .05); -} -.panel-body { - padding: 15px; -} -.panel-heading { - padding: 10px 15px; - border-bottom: 1px solid transparent; - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel-heading > .dropdown .dropdown-toggle { - color: inherit; -} -.panel-title { - margin-top: 0; - margin-bottom: 0; - font-size: 16px; - color: inherit; -} -.panel-title > a, -.panel-title > small, -.panel-title > .small, -.panel-title > small > a, -.panel-title > .small > a { - color: inherit; -} -.panel-footer { - padding: 10px 15px; - background-color: #f5f5f5; - border-top: 1px solid #ddd; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .list-group, -.panel > .panel-collapse > .list-group { - margin-bottom: 0; -} -.panel > .list-group .list-group-item, -.panel > .panel-collapse > .list-group .list-group-item { - border-width: 1px 0; - border-radius: 0; } -.panel > .list-group:first-child .list-group-item:first-child, -.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child { - border-top: 0; - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .list-group:last-child .list-group-item:last-child, -.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child { - border-bottom: 0; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child { - border-top-left-radius: 0; - border-top-right-radius: 0; -} -.panel-heading + .list-group .list-group-item:first-child { - border-top-width: 0; -} -.list-group + .panel-footer { - border-top-width: 0; -} -.panel > .table, -.panel > .table-responsive > .table, -.panel > .panel-collapse > .table { - margin-bottom: 0; -} -.panel > .table caption, -.panel > .table-responsive > .table caption, -.panel > .panel-collapse > .table caption { - padding-right: 15px; - padding-left: 15px; -} -.panel > .table:first-child, -.panel > .table-responsive:first-child > .table:first-child { - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child { - border-top-left-radius: 3px; - border-top-right-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child, -.panel > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child, -.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child { - border-top-left-radius: 3px; -} -.panel > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child, -.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child, -.panel > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child, -.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child, -.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child { - border-top-right-radius: 3px; -} -.panel > .table:last-child, -.panel > .table-responsive:last-child > .table:last-child { - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child { - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child, -.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child { - border-bottom-left-radius: 3px; -} -.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child, -.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child, -.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child, -.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child { - border-bottom-right-radius: 3px; -} -.panel > .panel-body + .table, -.panel > .panel-body + .table-responsive, -.panel > .table + .panel-body, -.panel > .table-responsive + .panel-body { - border-top: 1px solid #ddd; -} -.panel > .table > tbody:first-child > tr:first-child th, -.panel > .table > tbody:first-child > tr:first-child td { - border-top: 0; -} -.panel > .table-bordered, -.panel > .table-responsive > .table-bordered { - border: 0; -} -.panel > .table-bordered > thead > tr > th:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:first-child, -.panel > .table-bordered > tbody > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child, -.panel > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child, -.panel > .table-bordered > thead > tr > td:first-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:first-child, -.panel > .table-bordered > tbody > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child, -.panel > .table-bordered > tfoot > tr > td:first-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child { - border-left: 0; -} -.panel > .table-bordered > thead > tr > th:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > th:last-child, -.panel > .table-bordered > tbody > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child, -.panel > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child, -.panel > .table-bordered > thead > tr > td:last-child, -.panel > .table-responsive > .table-bordered > thead > tr > td:last-child, -.panel > .table-bordered > tbody > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child, -.panel > .table-bordered > tfoot > tr > td:last-child, -.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child { - border-right: 0; -} -.panel > .table-bordered > thead > tr:first-child > td, -.panel > .table-responsive > .table-bordered > thead > tr:first-child > td, -.panel > .table-bordered > tbody > tr:first-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td, -.panel > .table-bordered > thead > tr:first-child > th, -.panel > .table-responsive > .table-bordered > thead > tr:first-child > th, -.panel > .table-bordered > tbody > tr:first-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th { - border-bottom: 0; -} -.panel > .table-bordered > tbody > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td, -.panel > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td, -.panel > .table-bordered > tbody > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th, -.panel > .table-bordered > tfoot > tr:last-child > th, -.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th { - border-bottom: 0; -} -.panel > .table-responsive { - margin-bottom: 0; - border: 0; -} -.panel-group { - margin-bottom: 20px; -} -.panel-group .panel { - margin-bottom: 0; - border-radius: 4px; -} -.panel-group .panel + .panel { - margin-top: 5px; -} -.panel-group .panel-heading { - border-bottom: 0; -} -.panel-group .panel-heading + .panel-collapse > .panel-body, -.panel-group .panel-heading + .panel-collapse > .list-group { - border-top: 1px solid #ddd; -} -.panel-group .panel-footer { - border-top: 0; +.btn-success { + color: #fff; + background-color: #5cb85c; + border-color: #4cae4c; } -.panel-group .panel-footer + .panel-collapse .panel-body { - border-bottom: 1px solid #ddd; +.btn-success:focus, +.btn-success.focus { + color: #fff; + background-color: #449d44; + border-color: #255625; } -.panel-default { - border-color: #ddd; +.btn-success:hover { + color: #fff; + background-color: #449d44; + border-color: #398439; } -.panel-default > .panel-heading { - color: #333; - background-color: #f5f5f5; - border-color: #ddd; +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + color: #fff; + background-color: #449d44; + border-color: #398439; } -.panel-default > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #ddd; +.btn-success:active:hover, +.btn-success.active:hover, +.open > .dropdown-toggle.btn-success:hover, +.btn-success:active:focus, +.btn-success.active:focus, +.open > .dropdown-toggle.btn-success:focus, +.btn-success:active.focus, +.btn-success.active.focus, +.open > .dropdown-toggle.btn-success.focus { + color: #fff; + background-color: #398439; + border-color: #255625; } -.panel-default > .panel-heading .badge { - color: #f5f5f5; - background-color: #333; +.btn-success:active, +.btn-success.active, +.open > .dropdown-toggle.btn-success { + background-image: none; } -.panel-default > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #ddd; +.btn-success.disabled:hover, +.btn-success[disabled]:hover, +.btn-success.disabled:focus, +.btn-success[disabled]:focus, +.btn-success.disabled.focus, +.btn-success[disabled].focus { + background-color: #5cb85c; + border-color: #4cae4c; } -.panel-primary { - border-color: #337ab7; +.btn-success .badge { + color: #5cb85c; + background-color: #fff; } -.panel-primary > .panel-heading { +.btn-info { color: #fff; - background-color: #337ab7; - border-color: #337ab7; -} -.panel-primary > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #337ab7; + background-color: #5bc0de; + border-color: #46b8da; } -.panel-primary > .panel-heading .badge { - color: #337ab7; - background-color: #fff; +.btn-info:focus, +.btn-info.focus { + color: #fff; + background-color: #31b0d5; + border-color: #1b6d85; } -.panel-primary > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #337ab7; +.btn-info:hover { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; } -.panel-success { - border-color: #d6e9c6; +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + color: #fff; + background-color: #31b0d5; + border-color: #269abc; } -.panel-success > .panel-heading { - color: #3c763d; - background-color: #dff0d8; - border-color: #d6e9c6; +.btn-info:active:hover, +.btn-info.active:hover, +.open > .dropdown-toggle.btn-info:hover, +.btn-info:active:focus, +.btn-info.active:focus, +.open > .dropdown-toggle.btn-info:focus, +.btn-info:active.focus, +.btn-info.active.focus, +.open > .dropdown-toggle.btn-info.focus { + color: #fff; + background-color: #269abc; + border-color: #1b6d85; } -.panel-success > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #d6e9c6; +.btn-info:active, +.btn-info.active, +.open > .dropdown-toggle.btn-info { + background-image: none; } -.panel-success > .panel-heading .badge { - color: #dff0d8; - background-color: #3c763d; +.btn-info.disabled:hover, +.btn-info[disabled]:hover, +.btn-info.disabled:focus, +.btn-info[disabled]:focus, +.btn-info.disabled.focus, +.btn-info[disabled].focus { + background-color: #5bc0de; + border-color: #46b8da; } -.panel-success > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #d6e9c6; +.btn-info .badge { + color: #5bc0de; + background-color: #fff; } -.panel-info { - border-color: #bce8f1; +.btn-warning { + color: #fff; + background-color: #f0ad4e; + border-color: #eea236; } -.panel-info > .panel-heading { - color: #31708f; - background-color: #d9edf7; - border-color: #bce8f1; +.btn-warning:focus, +.btn-warning.focus { + color: #fff; + background-color: #ec971f; + border-color: #985f0d; } -.panel-info > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #bce8f1; +.btn-warning:hover { + color: #fff; + background-color: #ec971f; + border-color: #d58512; } -.panel-info > .panel-heading .badge { - color: #d9edf7; - background-color: #31708f; +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + color: #fff; + background-color: #ec971f; + border-color: #d58512; } -.panel-info > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #bce8f1; +.btn-warning:active:hover, +.btn-warning.active:hover, +.open > .dropdown-toggle.btn-warning:hover, +.btn-warning:active:focus, +.btn-warning.active:focus, +.open > .dropdown-toggle.btn-warning:focus, +.btn-warning:active.focus, +.btn-warning.active.focus, +.open > .dropdown-toggle.btn-warning.focus { + color: #fff; + background-color: #d58512; + border-color: #985f0d; } -.panel-warning { - border-color: #faebcc; +.btn-warning:active, +.btn-warning.active, +.open > .dropdown-toggle.btn-warning { + background-image: none; } -.panel-warning > .panel-heading { - color: #8a6d3b; - background-color: #fcf8e3; - border-color: #faebcc; +.btn-warning.disabled:hover, +.btn-warning[disabled]:hover, +.btn-warning.disabled:focus, +.btn-warning[disabled]:focus, +.btn-warning.disabled.focus, +.btn-warning[disabled].focus { + background-color: #f0ad4e; + border-color: #eea236; } -.panel-warning > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #faebcc; +.btn-warning .badge { + color: #f0ad4e; + background-color: #fff; } -.panel-warning > .panel-heading .badge { - color: #fcf8e3; - background-color: #8a6d3b; +.btn-danger { + color: #fff; + background-color: #d9534f; + border-color: #d43f3a; } -.panel-warning > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #faebcc; +.btn-danger:focus, +.btn-danger.focus { + color: #fff; + background-color: #c9302c; + border-color: #761c19; } -.panel-danger { - border-color: #ebccd1; +.btn-danger:hover { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; } -.panel-danger > .panel-heading { - color: #a94442; - background-color: #f2dede; - border-color: #ebccd1; +.btn-danger:active, +.btn-danger.active { + color: #fff; + background-color: #c9302c; + border-color: #ac2925; } -.panel-danger > .panel-heading + .panel-collapse > .panel-body { - border-top-color: #ebccd1; +.btn-danger:active:hover, +.btn-danger.active:hover, +.open > .dropdown-toggle.btn-danger:hover, +.btn-danger:active:focus, +.btn-danger.active:focus, +.open > .dropdown-toggle.btn-danger:focus, +.btn-danger:active.focus, +.btn-danger.active.focus, +.open > .dropdown-toggle.btn-danger.focus { + color: #fff; + background-color: #ac2925; + border-color: #761c19; } -.panel-danger > .panel-heading .badge { - color: #f2dede; - background-color: #a94442; +.btn-danger:active, +.btn-danger.active, +.open > .dropdown-toggle.btn-danger { + background-image: none; } -.panel-danger > .panel-footer + .panel-collapse > .panel-body { - border-bottom-color: #ebccd1; +.btn-danger.disabled:hover, +.btn-danger[disabled]:hover, +.btn-danger.disabled:focus, +.btn-danger[disabled]:focus, +.btn-danger.disabled.focus, +.btn-danger[disabled].focus { + background-color: #d9534f; + border-color: #d43f3a; } -.embed-responsive { - position: relative; - display: block; - height: 0; - padding: 0; - overflow: hidden; +.btn-danger .badge { + color: #d9534f; + background-color: #fff; } -.embed-responsive .embed-responsive-item, -.embed-responsive iframe, -.embed-responsive embed, -.embed-responsive object, -.embed-responsive video { - position: absolute; - top: 0; - bottom: 0; - left: 0; - width: 100%; - height: 100%; - border: 0; +.btn-link { + font-weight: normal; + color: #337ab7; + border-radius: 0; } -.embed-responsive-16by9 { - padding-bottom: 56.25%; +.btn-link, +.btn-link:active, +.btn-link.active, +.btn-link[disabled] { + background-color: transparent; + -webkit-box-shadow: none; + box-shadow: none; } -.embed-responsive-4by3 { - padding-bottom: 75%; +.btn-link, +.btn-link:hover, +.btn-link:focus, +.btn-link:active { + border-color: transparent; } -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05); +.btn-link:hover, +.btn-link:focus { + color: #23527c; + text-decoration: underline; + background-color: transparent; } -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, .15); +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { + color: #777; + text-decoration: none; } -.well-lg { - padding: 24px; +.btn-lg, +.btn-group-lg > .btn { + padding: 10px 16px; + font-size: 18px; + line-height: 1.3333333; border-radius: 6px; } -.well-sm { - padding: 9px; +.btn-sm, +.btn-group-sm > .btn { + padding: 5px 10px; + font-size: 12px; + line-height: 1.5; border-radius: 3px; } -.close { - float: right; - font-size: 21px; - font-weight: bold; - line-height: 1; - color: #000; - text-shadow: 0 1px 0 #fff; - filter: alpha(opacity=20); - opacity: .2; -} -.close:hover, -.close:focus { - color: #000; - text-decoration: none; - cursor: pointer; - filter: alpha(opacity=50); - opacity: .5; +.btn-xs, +.btn-group-xs > .btn { + padding: 1px 5px; + font-size: 12px; + line-height: 1.5; + border-radius: 3px; } -button.close { - -webkit-appearance: none; - padding: 0; - cursor: pointer; - background: transparent; - border: 0; +.btn-block { + display: block; + width: 100%; } -.modal-open { - overflow: hidden; +.btn-block + .btn-block { + margin-top: 5px; } -.modal { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1050; +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.collapse { display: none; - overflow: hidden; - -webkit-overflow-scrolling: touch; - outline: 0; } -.modal.fade .modal-dialog { - -webkit-transition: -webkit-transform .3s ease-out; - -o-transition: -o-transform .3s ease-out; - transition: transform .3s ease-out; - -webkit-transform: translate(0, -25%); - -ms-transform: translate(0, -25%); - -o-transform: translate(0, -25%); - transform: translate(0, -25%); -} -.modal.in .modal-dialog { - -webkit-transform: translate(0, 0); - -ms-transform: translate(0, 0); - -o-transform: translate(0, 0); - transform: translate(0, 0); -} -.modal-open .modal { - overflow-x: hidden; - overflow-y: auto; +.nav { + padding-left: 0; + margin-bottom: 0; + list-style: none; } -.modal-dialog { +.nav > li { position: relative; - width: auto; - margin: 10px; + display: block; } -.modal-content { +.nav > li > a { position: relative; - background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid #999; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: 6px; - outline: 0; - -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5); - box-shadow: 0 3px 9px rgba(0, 0, 0, .5); + display: block; + padding: 10px 15px; } -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - background-color: #000; +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eee; } -.modal-backdrop.fade { - filter: alpha(opacity=0); - opacity: 0; +.nav > li.disabled > a { + color: #777; } -.modal-backdrop.in { - filter: alpha(opacity=50); - opacity: .5; +.nav > li.disabled > a:hover, +.nav > li.disabled > a:focus { + color: #777; + text-decoration: none; + cursor: not-allowed; + background-color: transparent; } -.modal-header { - padding: 15px; - border-bottom: 1px solid #e5e5e5; +.nav .open > a, +.nav .open > a:hover, +.nav .open > a:focus { + background-color: #eee; + border-color: #337ab7; } -.modal-header .close { - margin-top: -2px; +.nav .nav-divider { + height: 1px; + margin: 9px 0; + overflow: hidden; + background-color: #e5e5e5; } -.modal-title { - margin: 0; - line-height: 1.42857143; +.nav > li > a > img { + max-width: none; } -.modal-body { +.navbar { position: relative; - padding: 15px; -} -.modal-footer { - padding: 15px; - text-align: right; - border-top: 1px solid #e5e5e5; -} -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; + min-height: 50px; + border: 1px solid transparent; } -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; +@media (min-width: 919px) { + .navbar-header { + float: left; + } } -.modal-footer .btn-block + .btn-block { - margin-left: 0; +.navbar-collapse { + padding-right: 15px; + padding-left: 15px; + overflow-x: visible; + -webkit-overflow-scrolling: touch; + border-top: 1px solid transparent; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); } -.modal-scrollbar-measure { - position: absolute; - top: -9999px; - width: 50px; - height: 50px; - overflow: scroll; +.navbar-collapse.in { + overflow-y: auto; } @media (min-width: 919px) { - .modal-dialog { - width: 600px; - margin: 30px auto; + .navbar-collapse { + width: auto; + border-top: 0; + -webkit-box-shadow: none; + box-shadow: none; } - .modal-content { - -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5); - box-shadow: 0 5px 15px rgba(0, 0, 0, .5); + .navbar-collapse.collapse { + display: block !important; + height: auto !important; + padding-bottom: 0; + overflow: visible !important; } - .modal-sm { - width: 300px; + .navbar-collapse.in { + overflow-y: visible; } -} -@media (min-width: 992px) { - .modal-lg { - width: 900px; + .navbar-collapse { + padding-right: 0; + padding-left: 0; } } -.tooltip { - position: absolute; - z-index: 1070; - display: block; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 12px; - font-style: normal; - font-weight: normal; - line-height: 1.42857143; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-break: normal; - word-spacing: normal; - word-wrap: normal; - white-space: normal; - filter: alpha(opacity=0); - opacity: 0; - - line-break: auto; -} -.tooltip.in { - filter: alpha(opacity=90); - opacity: .9; -} -.tooltip.top { - padding: 5px 0; - margin-top: -3px; -} -.tooltip.right { - padding: 0 5px; - margin-left: 3px; -} -.tooltip.bottom { - padding: 5px 0; - margin-top: 3px; -} -.tooltip.left { - padding: 0 5px; - margin-left: -3px; -} -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #fff; - text-align: center; - background-color: #000; - border-radius: 4px; -} -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.top-left .tooltip-arrow { - right: 5px; - bottom: 0; - margin-bottom: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.top-right .tooltip-arrow { - bottom: 0; - left: 5px; - margin-bottom: -5px; - border-width: 5px 5px 0; - border-top-color: #000; -} -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-width: 5px 5px 5px 0; - border-right-color: #000; -} -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-width: 5px 0 5px 5px; - border-left-color: #000; -} -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; -} -.tooltip.bottom-left .tooltip-arrow { - top: 0; - right: 5px; - margin-top: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; +.navbar-collapse { + max-height: 340px; } -.tooltip.bottom-right .tooltip-arrow { - top: 0; - left: 5px; - margin-top: -5px; - border-width: 0 5px 5px; - border-bottom-color: #000; +@media (max-device-width: 480px) and (orientation: landscape) { + .navbar-collapse { + max-height: 200px; + } } -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1060; - display: none; - max-width: 276px; - padding: 1px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - font-style: normal; - font-weight: normal; - line-height: 1.42857143; - text-align: left; - text-align: start; - text-decoration: none; - text-shadow: none; - text-transform: none; - letter-spacing: normal; - word-break: normal; - word-spacing: normal; - word-wrap: normal; - white-space: normal; - background-color: #fff; - -webkit-background-clip: padding-box; - background-clip: padding-box; - border: 1px solid #ccc; - border: 1px solid rgba(0, 0, 0, .2); - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2); - box-shadow: 0 5px 10px rgba(0, 0, 0, .2); - - line-break: auto; +.container > .navbar-header, +.container-fluid > .navbar-header, +.container > .navbar-collapse, +.container-fluid > .navbar-collapse { + margin-right: -15px; + margin-left: -15px; } -.popover.top { - margin-top: -10px; +.navbar-brand { + float: left; + height: 50px; + padding: 15px 15px; + font-size: 18px; + line-height: 20px; } -.popover.right { - margin-left: 10px; +.navbar-brand:hover, +.navbar-brand:focus { + text-decoration: none; } -.popover.bottom { - margin-top: 10px; +.navbar-brand > img { + display: block; } -.popover.left { - margin-left: -10px; +@media (min-width: 919px) { + .navbar > .container-fluid .navbar-brand { + margin-left: -15px; + } } -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - border-radius: 5px 5px 0 0; +.navbar-toggle { + position: relative; + float: right; + padding: 9px 10px; + margin-top: 8px; + margin-right: 15px; + margin-bottom: 8px; + background-color: transparent; + background-image: none; + border: 1px solid transparent; + border-radius: 4px; } -.popover-content { - padding: 9px 14px; +.navbar-toggle:focus { + outline: 0; } -.popover > .arrow, -.popover > .arrow:after { - position: absolute; +.navbar-toggle .icon-bar { display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} -.popover > .arrow { - border-width: 11px; -} -.popover > .arrow:after { - content: ""; - border-width: 10px; -} -.popover.top > .arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: #999; - border-top-color: rgba(0, 0, 0, .25); - border-bottom-width: 0; -} -.popover.top > .arrow:after { - bottom: 1px; - margin-left: -10px; - content: " "; - border-top-color: #fff; - border-bottom-width: 0; -} -.popover.right > .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: #999; - border-right-color: rgba(0, 0, 0, .25); - border-left-width: 0; -} -.popover.right > .arrow:after { - bottom: -10px; - left: 1px; - content: " "; - border-right-color: #fff; - border-left-width: 0; -} -.popover.bottom > .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-top-width: 0; - border-bottom-color: #999; - border-bottom-color: rgba(0, 0, 0, .25); -} -.popover.bottom > .arrow:after { - top: 1px; - margin-left: -10px; - content: " "; - border-top-width: 0; - border-bottom-color: #fff; -} -.popover.left > .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-right-width: 0; - border-left-color: #999; - border-left-color: rgba(0, 0, 0, .25); -} -.popover.left > .arrow:after { - right: 1px; - bottom: -10px; - content: " "; - border-right-width: 0; - border-left-color: #fff; + width: 22px; + height: 2px; + border-radius: 1px; } -.carousel { - position: relative; +.navbar-toggle .icon-bar + .icon-bar { + margin-top: 4px; } -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; +@media (min-width: 919px) { + .navbar-toggle { + display: none; + } } -.carousel-inner > .item { - position: relative; - display: none; - -webkit-transition: .6s ease-in-out left; - -o-transition: .6s ease-in-out left; - transition: .6s ease-in-out left; +.navbar-nav { + margin: 7.5px -15px; } -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - line-height: 1; +.navbar-nav > li > a { + padding-top: 10px; + padding-bottom: 10px; + line-height: 20px; } -@media all and (transform-3d), (-webkit-transform-3d) { - .carousel-inner > .item { - -webkit-transition: -webkit-transform .6s ease-in-out; - -o-transition: -o-transform .6s ease-in-out; - transition: transform .6s ease-in-out; - - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - -webkit-perspective: 1000px; - perspective: 1000px; - } - .carousel-inner > .item.next, - .carousel-inner > .item.active.right { - left: 0; - -webkit-transform: translate3d(100%, 0, 0); - transform: translate3d(100%, 0, 0); +@media (min-width: 919px) { + .navbar-nav { + float: left; + margin: 0; } - .carousel-inner > .item.prev, - .carousel-inner > .item.active.left { - left: 0; - -webkit-transform: translate3d(-100%, 0, 0); - transform: translate3d(-100%, 0, 0); + .navbar-nav > li { + float: left; } - .carousel-inner > .item.next.left, - .carousel-inner > .item.prev.right, - .carousel-inner > .item.active { - left: 0; - -webkit-transform: translate3d(0, 0, 0); - transform: translate3d(0, 0, 0); + .navbar-nav > li > a { + padding-top: 15px; + padding-bottom: 15px; } } -.carousel-inner > .active, -.carousel-inner > .next, -.carousel-inner > .prev { - display: block; +.navbar-inverse { + background-color: #f4b124; + border-color: #ffebc1; + padding-top: 10px; } -.carousel-inner > .active { - left: 0; +.navbar-inverse .navbar-brand { + color: #333; } -.carousel-inner > .next, -.carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; +.navbar-inverse .navbar-brand:hover, +.navbar-inverse .navbar-brand:focus { + color: #fff; + background-color: transparent; } -.carousel-inner > .next { - left: 100%; +.navbar-inverse .navbar-text { + color: #9d9d9d; } -.carousel-inner > .prev { - left: -100%; +.navbar-inverse .navbar-nav > li > a { + color: #333; + font-weight: bold; } -.carousel-inner > .next.left, -.carousel-inner > .prev.right { - left: 0; +.navbar-inverse .navbar-nav > li > a:hover, +.navbar-inverse .navbar-nav > li > a:focus { + color: #fff; + background-color: transparent; } -.carousel-inner > .active.left { - left: -100%; +.navbar-inverse .navbar-nav > .active > a, +.navbar-inverse .navbar-nav > .active > a:hover, +.navbar-inverse .navbar-nav > .active > a:focus { + color: #fff; + background-color: #080808; } -.carousel-inner > .active.right { - left: 100%; +.navbar-inverse .navbar-nav > .disabled > a, +.navbar-inverse .navbar-nav > .disabled > a:hover, +.navbar-inverse .navbar-nav > .disabled > a:focus { + color: #444; + background-color: transparent; } -.carousel-control { - position: absolute; - top: 0; - bottom: 0; - left: 0; - width: 15%; - font-size: 20px; - color: #fff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, .6); - background-color: rgba(0, 0, 0, 0); - filter: alpha(opacity=50); - opacity: .5; -} -.carousel-control.left { - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001))); - background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); - background-repeat: repeat-x; -} -.carousel-control.right { - right: 0; - left: auto; - background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5))); - background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); - background-repeat: repeat-x; -} -.carousel-control:hover, -.carousel-control:focus { - color: #fff; - text-decoration: none; - filter: alpha(opacity=90); - outline: 0; - opacity: .9; +.navbar-inverse .navbar-toggle { + border-color: #333; } -.carousel-control .icon-prev, -.carousel-control .icon-next, -.carousel-control .glyphicon-chevron-left, -.carousel-control .glyphicon-chevron-right { - position: absolute; - top: 50%; - z-index: 5; - display: inline-block; - margin-top: -10px; -} -.carousel-control .icon-prev, -.carousel-control .glyphicon-chevron-left { - left: 50%; - margin-left: -10px; -} -.carousel-control .icon-next, -.carousel-control .glyphicon-chevron-right { - right: 50%; - margin-right: -10px; -} -.carousel-control .icon-prev, -.carousel-control .icon-next { - width: 20px; - height: 20px; - font-family: serif; - line-height: 1; +.navbar-inverse .navbar-toggle:hover, +.navbar-inverse .navbar-toggle:focus { + background-color: #333; } -.carousel-control .icon-prev:before { - content: '\2039'; +.navbar-inverse .navbar-toggle .icon-bar { + background-color: #fff; } -.carousel-control .icon-next:before { - content: '\203a'; +.navbar-inverse .navbar-collapse, +.navbar-inverse .navbar-form { + border-color: #101010; } -.carousel-indicators { - position: absolute; - bottom: 10px; - left: 50%; - z-index: 15; - width: 60%; - padding-left: 0; - margin-left: -30%; - text-align: center; - list-style: none; +.navbar-inverse .navbar-nav > .open > a, +.navbar-inverse .navbar-nav > .open > a:hover, +.navbar-inverse .navbar-nav > .open > a:focus { + color: #fff; + background-color: #080808; } -.carousel-indicators li { +.badge { display: inline-block; - width: 10px; - height: 10px; - margin: 1px; - text-indent: -999px; - cursor: pointer; - background-color: #000 \9; - background-color: rgba(0, 0, 0, 0); - border: 1px solid #fff; + min-width: 10px; + padding: 3px 7px; + font-size: 12px; + font-weight: bold; + line-height: 1; + color: #fff; + text-align: center; + white-space: nowrap; + vertical-align: middle; + background-color: #777; border-radius: 10px; } -.carousel-indicators .active { - width: 12px; - height: 12px; - margin: 0; - background-color: #fff; +.badge:empty { + display: none; } -.carousel-caption { - position: absolute; - right: 15%; - bottom: 20px; - left: 15%; - z-index: 10; - padding-top: 20px; - padding-bottom: 20px; +.btn .badge { + position: relative; + top: -1px; +} +.btn-xs .badge, +.btn-group-xs > .btn .badge { + top: 0; + padding: 1px 5px; +} +a.badge:hover, +a.badge:focus { color: #fff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, .6); -} -.carousel-caption .btn { - text-shadow: none; -} -@media screen and (min-width: 768px) { - .carousel-control .glyphicon-chevron-left, - .carousel-control .glyphicon-chevron-right, - .carousel-control .icon-prev, - .carousel-control .icon-next { - width: 30px; - height: 30px; - margin-top: -10px; - font-size: 30px; - } - .carousel-control .glyphicon-chevron-left, - .carousel-control .icon-prev { - margin-left: -10px; - } - .carousel-control .glyphicon-chevron-right, - .carousel-control .icon-next { - margin-right: -10px; - } - .carousel-caption { - right: 20%; - left: 20%; - padding-bottom: 30px; - } - .carousel-indicators { - bottom: 20px; - } + text-decoration: none; + cursor: pointer; } -.clearfix:before, -.clearfix:after, -.dl-horizontal dd:before, -.dl-horizontal dd:after, -.container:before, -.container:after, -.container-fluid:before, -.container-fluid:after, -.row:before, -.row:after, -.form-horizontal .form-group:before, -.form-horizontal .form-group:after, -.btn-toolbar:before, -.btn-toolbar:after, -.btn-group-vertical > .btn-group:before, -.btn-group-vertical > .btn-group:after, .nav:before, .nav:after, .navbar:before, @@ -6484,277 +890,16 @@ button.close { .navbar-header:before, .navbar-header:after, .navbar-collapse:before, -.navbar-collapse:after, -.pager:before, -.pager:after, -.panel-body:before, -.panel-body:after, -.modal-header:before, -.modal-header:after, -.modal-footer:before, -.modal-footer:after { +.navbar-collapse:after { display: table; content: " "; } -.clearfix:after, -.dl-horizontal dd:after, -.container:after, -.container-fluid:after, -.row:after, -.form-horizontal .form-group:after, -.btn-toolbar:after, -.btn-group-vertical > .btn-group:after, .nav:after, .navbar:after, .navbar-header:after, -.navbar-collapse:after, -.pager:after, -.panel-body:after, -.modal-header:after, -.modal-footer:after { +.navbar-collapse:after { clear: both; } -.center-block { - display: block; - margin-right: auto; - margin-left: auto; -} -.pull-right { - float: right !important; -} -.pull-left { - float: left !important; -} -.hide { - display: none !important; -} -.show { - display: block !important; -} -.invisible { - visibility: hidden; -} -.text-hide { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} -.hidden { - display: none !important; -} -.affix { - position: fixed; -} @-ms-viewport { width: device-width; -} -.visible-xs, -.visible-sm, -.visible-md, -.visible-lg { - display: none !important; -} -.visible-xs-block, -.visible-xs-inline, -.visible-xs-inline-block, -.visible-sm-block, -.visible-sm-inline, -.visible-sm-inline-block, -.visible-md-block, -.visible-md-inline, -.visible-md-inline-block, -.visible-lg-block, -.visible-lg-inline, -.visible-lg-inline-block { - display: none !important; -} -@media (max-width: 767px) { - .visible-xs { - display: block !important; - } - table.visible-xs { - display: table !important; - } - tr.visible-xs { - display: table-row !important; - } - th.visible-xs, - td.visible-xs { - display: table-cell !important; - } -} -@media (max-width: 767px) { - .visible-xs-block { - display: block !important; - } -} -@media (max-width: 767px) { - .visible-xs-inline { - display: inline !important; - } -} -@media (max-width: 767px) { - .visible-xs-inline-block { - display: inline-block !important; - } -} -@media (min-width: 919px) and (max-width: 991px) { - .visible-sm { - display: block !important; - } - table.visible-sm { - display: table !important; - } - tr.visible-sm { - display: table-row !important; - } - th.visible-sm, - td.visible-sm { - display: table-cell !important; - } -} -@media (min-width: 919px) and (max-width: 991px) { - .visible-sm-block { - display: block !important; - } -} -@media (min-width: 919px) and (max-width: 991px) { - .visible-sm-inline { - display: inline !important; - } -} -@media (min-width: 919px) and (max-width: 991px) { - .visible-sm-inline-block { - display: inline-block !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md { - display: block !important; - } - table.visible-md { - display: table !important; - } - tr.visible-md { - display: table-row !important; - } - th.visible-md, - td.visible-md { - display: table-cell !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-block { - display: block !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-inline { - display: inline !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .visible-md-inline-block { - display: inline-block !important; - } -} -@media (min-width: 1200px) { - .visible-lg { - display: block !important; - } - table.visible-lg { - display: table !important; - } - tr.visible-lg { - display: table-row !important; - } - th.visible-lg, - td.visible-lg { - display: table-cell !important; - } -} -@media (min-width: 1200px) { - .visible-lg-block { - display: block !important; - } -} -@media (min-width: 1200px) { - .visible-lg-inline { - display: inline !important; - } -} -@media (min-width: 1200px) { - .visible-lg-inline-block { - display: inline-block !important; - } -} -@media (max-width: 767px) { - .hidden-xs { - display: none !important; - } -} -@media (min-width: 919px) and (max-width: 991px) { - .hidden-sm { - display: none !important; - } -} -@media (min-width: 992px) and (max-width: 1199px) { - .hidden-md { - display: none !important; - } -} -@media (min-width: 1200px) { - .hidden-lg { - display: none !important; - } -} -.visible-print { - display: none !important; -} -@media print { - .visible-print { - display: block !important; - } - table.visible-print { - display: table !important; - } - tr.visible-print { - display: table-row !important; - } - th.visible-print, - td.visible-print { - display: table-cell !important; - } -} -.visible-print-block { - display: none !important; -} -@media print { - .visible-print-block { - display: block !important; - } -} -.visible-print-inline { - display: none !important; -} -@media print { - .visible-print-inline { - display: inline !important; - } -} -.visible-print-inline-block { - display: none !important; -} -@media print { - .visible-print-inline-block { - display: inline-block !important; - } -} -@media print { - .hidden-print { - display: none !important; - } -} -/*# sourceMappingURL=bootstrap.css.map */ +} \ No newline at end of file From 7428e49e564dd432ee6dc2b9b5d3254e5cbbe13f Mon Sep 17 00:00:00 2001 From: JiHong88 <0125ses@hanmail.net> Date: Fri, 20 Dec 2019 16:05:16 +0900 Subject: [PATCH 3/3] version up: 2.23.3 --- bower.json | 2 +- dist/suneditor.min.js | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bower.json b/bower.json index c68aefc21..b871482a5 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "suneditor", - "version": "2.23.2", + "version": "2.23.3", "description": "Pure JavaScript based WYSIWYG web editor", "main": "src/suneditor.js", "keywords": [ diff --git a/dist/suneditor.min.js b/dist/suneditor.min.js index 31a1424f9..e5397a5a0 100644 --- a/dist/suneditor.min.js +++ b/dist/suneditor.min.js @@ -1 +1 @@ -!function(e){var t={};function i(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,i),l.l=!0,l.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)i.d(n,l,function(t){return e[t]}.bind(null,l));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="XJR1")}({"3FqI":function(e,t,i){},P6u4:function(e,t,i){"use strict";var n,l;n="undefined"!=typeof window?window:this,l=function(e,t){const i={toolbar:{default:"Default",save:"Save",font:"Font",formats:"Formats",fontSize:"Size",bold:"Bold",underline:"Underline",italic:"Italic",strike:"Strike",subscript:"Subscript",superscript:"Superscript",removeFormat:"Remove Format",fontColor:"Font Color",hiliteColor:"Highlight Color",indent:"Indent",outdent:"Outdent",align:"Align",alignLeft:"Align left",alignRight:"Align right",alignCenter:"Align center",alignJustify:"Align justify",list:"List",orderList:"Ordered list",unorderList:"Unordered list",horizontalRule:"Horizontal line",hr_solid:"Solid",hr_dotted:"Dotted",hr_dashed:"Dashed",table:"Table",link:"Link",image:"Image",video:"Video",fullScreen:"Full screen",showBlocks:"Show blocks",codeView:"Code view",undo:"Undo",redo:"Redo",preview:"Preview",print:"print",tag_p:"Paragraph",tag_div:"Normal (DIV)",tag_h:"Header",tag_blockquote:"Quote",tag_pre:"Code",template:"Template",lineHeight:"Line height",paragraphStyle:"Paragraph style",textStyle:"Text style"},dialogBox:{linkBox:{title:"Insert Link",url:"URL to link",text:"Text to display",newWindowCheck:"Open in new window"},imageBox:{title:"Insert image",file:"Select from files",url:"Image URL",altText:"Alternative text"},videoBox:{title:"Insert Video",url:"Media embed URL, YouTube"},caption:"Insert description",close:"Close",submitButton:"Submit",revertButton:"Revert",proportion:"Constrain proportions",basic:"Basic",left:"Left",right:"Right",center:"Center",width:"Width",height:"Height",size:"Size",ratio:"Ratio"},controller:{edit:"Edit",unlink:"Unlink",remove:"Remove",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:"Delete row",insertColumnBefore:"Insert column before",insertColumnAfter:"Insert column after",deleteColumn:"Delete column",resize100:"Resize 100%",resize75:"Resize 75%",resize50:"Resize 50%",resize25:"Resize 25%",autoSize:"Auto size",mirrorHorizontal:"Mirror, Horizontal",mirrorVertical:"Mirror, Vertical",rotateLeft:"Rotate left",rotateRight:"Rotate right",maxSize:"Max size",minSize:"Min size",tableHeader:"Table header",mergeCells:"Merge cells",splitCells:"Split Cells",HorizontalSplit:"Horizontal split",VerticalSplit:"Vertical split"},menu:{spaced:"Spaced",bordered:"Bordered",neon:"Neon",translucent:"Translucent",shadow:"Shadow"}};return void 0===t&&(e.SUNEDITOR_LANG||(e.SUNEDITOR_LANG={}),e.SUNEDITOR_LANG.en=i),i},"object"==typeof e.exports?e.exports=n.document?l(n,!0):function(e){if(!e.document)throw new Error("SUNEDITOR_LANG a window with a document");return l(e)}:l(n)},WUQj:function(e,t,i){},XJR1:function(e,t,i){"use strict";i.r(t);i("3FqI"),i("WUQj");var n={name:"colorPicker",add:function(e){const t=e.context;t.colorPicker={colorListHTML:"",_colorInput:"",_defaultColor:"#000",_styleProperty:"color",_currentColor:"",_colorList:[]};let i=this.createColorList(e.context.option,e.lang,this._makeColorList);t.colorPicker.colorListHTML=i,i=null},createColorList:function(e,t,i){const n=e.colorList&&0!==e.colorList.length?e.colorList:["#ff0000","#ff5e00","#ffe400","#abf200","#00d8ff","#0055ff","#6600ff","#ff00dd","#000000","#ffd8d8","#fae0d4","#faf4c0","#e4f7ba","#d4f4fa","#d9e5ff","#e8d9ff","#ffd9fa","#f1f1f1","#ffa7a7","#ffc19e","#faed7d","#cef279","#b2ebf4","#b2ccff","#d1b2ff","#ffb2f5","#bdbdbd","#f15f5f","#f29661","#e5d85c","#bce55c","#5cd1e5","#6699ff","#a366ff","#f261df","#8c8c8c","#980000","#993800","#998a00","#6b9900","#008299","#003399","#3d0099","#990085","#353535","#670000","#662500","#665c00","#476600","#005766","#002266","#290066","#660058","#222222"];let l=[],o='
';for(let e=0,t=n.length;e0&&(o+='
'+i(l)+"
",l=[]),"object"==typeof n[e]&&(o+='
'+i(n[e])+"
"));return o+='
",o},_makeColorList:function(e){let t="";t+='",t},init:function(e,t){const i=this.plugins.colorPicker;let n=t||(i.getColorInNode.call(this,e)||this.context.colorPicker._defaultColor);n=i.isHexColor(n)?n:i.rgb2hex(n)||n;const l=this.context.colorPicker._colorList;if(l)for(let e=0,t=l.length;e=3&&"#"+((1<<24)+(i[0]<<16)+(i[1]<<8)+i[2]).toString(16).substr(1)}},l={name:"dialog",add:function(e){const t=e.context;t.dialog={};let i=e.util.createElement("DIV");i.className="se-dialog sun-editor-common";let n=e.util.createElement("DIV");n.className="se-dialog-back",n.style.display="none";let l=e.util.createElement("DIV");l.className="se-dialog-inner",l.style.display="none",i.appendChild(n),i.appendChild(l),t.dialog.modalArea=i,t.dialog.back=n,t.dialog.modal=l,t.dialog.modal.addEventListener("click",this.onClick_dialog.bind(e)),t.element.relative.appendChild(i),i=null,n=null,l=null},onClick_dialog:function(e){e.stopPropagation(),(/se-dialog-inner/.test(e.target.className)||/close/.test(e.target.getAttribute("data-command")))&&this.plugins.dialog.close.call(this)},open:function(e,t){if(this.modalForm)return!1;this.plugins.dialog._bindClose&&(this._d.removeEventListener("keydown",this.plugins.dialog._bindClose),this.plugins.dialog._bindClose=null),this.plugins.dialog._bindClose=function(e){/27/.test(e.keyCode)&&this.plugins.dialog.close.call(this)}.bind(this),this._d.addEventListener("keydown",this.plugins.dialog._bindClose),this.context.dialog.updateModal=t,"full"===this.context.option.popupDisplay?this.context.dialog.modalArea.style.position="fixed":this.context.dialog.modalArea.style.position="absolute",this.context.dialog.kind=e,this.modalForm=this.context[e].modal;const i=this.context[e].focusElement;"function"==typeof this.plugins[e].on&&this.plugins[e].on.call(this,t),this.context.dialog.modalArea.style.display="block",this.context.dialog.back.style.display="block",this.context.dialog.modal.style.display="block",this.modalForm.style.display="block",i&&i.focus()},_bindClose:null,close:function(){this.plugins.dialog._bindClose&&(this._d.removeEventListener("keydown",this.plugins.dialog._bindClose),this.plugins.dialog._bindClose=null),this.modalForm.style.display="none",this.context.dialog.back.style.display="none",this.context.dialog.modalArea.style.display="none",this.modalForm=null,this.context.dialog.updateModal=!1,this.plugins[this.context.dialog.kind].init.call(this),this.focus()}},o={name:"resizing",add:function(e){const t=e.context;t.resizing={_resizeClientX:0,_resizeClientY:0,_resize_plugin:"",_resize_w:0,_resize_h:0,_origin_w:0,_origin_h:0,_rotateVertical:!1,_resize_direction:"",_move_path:null,_isChange:!1};let i=this.setController_resize.call(e);t.resizing.resizeContainer=i,t.resizing.resizeDiv=i.querySelector(".se-modal-resize"),t.resizing.resizeDot=i.querySelector(".se-resize-dot"),t.resizing.resizeDisplay=i.querySelector(".se-resize-display");let n=this.setController_button.call(e);t.resizing.resizeButton=n,n.addEventListener("mousedown",(function(e){e.stopPropagation()}),!1);let l=t.resizing.resizeHandles=t.resizing.resizeDot.querySelectorAll("span");t.resizing.resizeButtonGroup=n.querySelector("._se_resizing_btn_group"),t.resizing.rotationButtons=n.querySelectorAll("._se_resizing_btn_group ._se_rotation"),t.resizing.percentageButtons=n.querySelectorAll("._se_resizing_btn_group ._se_percentage"),t.resizing.alignMenu=n.querySelector(".se-resizing-align-list"),t.resizing.alignMenuList=t.resizing.alignMenu.querySelectorAll("button"),t.resizing.alignButton=n.querySelector("._se_resizing_align_button"),t.resizing.alignButtonIcon=t.resizing.alignButton.querySelector("i"),t.resizing.autoSizeButton=n.querySelector("._se_resizing_btn_group ._se_auto_size"),t.resizing.captionButton=n.querySelector("._se_resizing_caption_button"),l[0].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[1].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[2].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[3].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[4].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[5].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[6].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[7].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),n.addEventListener("click",this.onClick_resizeButton.bind(e)),t.element.relative.appendChild(i),t.element.relative.appendChild(n),i=null,n=null,l=null},setController_resize:function(){const e=this.util.createElement("DIV");return e.className="se-resizing-container",e.style.display="none",e.innerHTML='
',e},setController_button:function(){const e=this.lang,t=this.util.createElement("DIV");return t.className="se-controller se-controller-resizing",t.innerHTML='
",t},_module_getSizeX:function(e,t,i,n){return t||(t=e._element),i||(i=e._cover),n||(n=e._container),n&&i&&t?/%$/.test(t.style.width)?(this.util.getNumber(n.style.width,2)||100)+"%":t.style.width:""},_module_getSizeY:function(e,t,i,n){return t||(t=e._element),i||(i=e._cover),n||(n=e._container),n&&i&&t?this.util.getNumber(i.style.paddingBottom)>0&&!this.context.resizing._rotateVertical?i.style.height:/%$/.test(t.style.height)&&/%$/.test(t.style.width)?(this.util.getNumber(n.style.height,2)||100)+"%":t.style.height:""},_module_setModifyInputSize:function(e,t){const i=e._onlyPercentage&&this.context.resizing._rotateVertical;e.proportion.checked=e._proportionChecked="false"!==e._element.getAttribute("data-proportion");let n=i?"":this.plugins.resizing._module_getSizeX.call(this,e);if(n===e._defaultSizeX&&(n=""),e._onlyPercentage&&(n=this.util.getNumber(n,2)),e.inputX.value=n,t.setInputSize.call(this,"x"),!e._onlyPercentage){let t=i?"":this.plugins.resizing._module_getSizeY.call(this,e);t===e._defaultSizeY&&(t=""),e._onlyPercentage&&(t=this.util.getNumber(t,2)),e.inputY.value=t}e.inputX.disabled=!!i,e.inputY.disabled=!!i,e.proportion.disabled=!!i,t.setRatio.call(this)},_module_setInputSize:function(e,t){if(e._onlyPercentage)"x"===t&&e.inputX.value>100&&(e.inputX.value=100);else if(e.proportion.checked&&e._ratio&&/\d/.test(e.inputX.value)&&/\d/.test(e.inputY.value)){const i=e.inputX.value.replace(/\d+|\./g,"")||e.sizeUnit,n=e.inputY.value.replace(/\d+|\./g,"")||e.sizeUnit;if(i!==n)return;const l="%"===i?2:0;"x"===t?e.inputY.value=this.util.getNumber(e._ratioY*this.util.getNumber(e.inputX.value,l),l)+n:e.inputX.value=this.util.getNumber(e._ratioX*this.util.getNumber(e.inputY.value,l),l)+i}},_module_setRatio:function(e){const t=e.inputX.value,i=e.inputY.value;if(e.proportion.checked&&/\d+/.test(t)&&/\d+/.test(i)){if((t.replace(/\d+|\./g,"")||e.sizeUnit)!==(i.replace(/\d+|\./g,"")||e.sizeUnit))e._ratio=!1;else if(!e._ratio){const n=this.util.getNumber(t),l=this.util.getNumber(i);e._ratio=!0,e._ratioX=n/l,e._ratioY=l/n}}else e._ratio=!1},_module_sizeRevert:function(e){e._onlyPercentage?e.inputX.value=e._origin_w>100?100:e._origin_w:(e.inputX.value=e._origin_w,e.inputY.value=e._origin_h)},_module_saveCurrentSize:function(e){const t=this.plugins.resizing._module_getSizeX.call(this,e),i=this.plugins.resizing._module_getSizeY.call(this,e);e._element.setAttribute("data-size",t+","+i),e._videoRatio&&(e._videoRatio=i)},call_controller_resize:function(e,t){const i=this.context.resizing,n=this.context[t];i._resize_plugin=t;const l=i.resizeContainer,o=i.resizeDiv,s=this.util.getOffset(e,this.context.element.wysiwygFrame),a=i._rotateVertical=/^(90|270)$/.test(Math.abs(e.getAttribute("data-rotate")).toString()),r=a?e.offsetHeight:e.offsetWidth,c=a?e.offsetWidth:e.offsetHeight,d=s.top,u=s.left-this.context.element.wysiwygFrame.scrollLeft;l.style.top=d+"px",l.style.left=u+"px",l.style.width=r+"px",l.style.height=c+"px",o.style.top="0px",o.style.left="0px",o.style.width=r+"px",o.style.height=c+"px";let h=e.getAttribute("data-align")||"basic";h="none"===h?"basic":h;const g=this.util.getParentElement(e,this.util.isComponent),p=this.util.getParentElement(e,"FIGURE"),m=this.plugins.resizing._module_getSizeX.call(this,n,e,p,g)||"auto",f=n._onlyPercentage&&"image"===t?"":", "+(this.plugins.resizing._module_getSizeY.call(this,n,e,p,g)||"auto");this.util.changeTxt(i.resizeDisplay,this.lang.dialogBox[h]+" ("+m+f+")"),i.resizeButtonGroup.style.display=n._resizing?"":"none";const _=!n._resizing||n._resizeDotHide||n._onlyPercentage?"none":"flex",b=i.resizeHandles;for(let e=0,t=b.length;e",e},set_cover:function(e){const t=this.util.createElement("FIGURE");return t.appendChild(e),t},set_container:function(e,t){const i=this.util.createElement("DIV");return i.className="se-component "+t,i.setAttribute("contenteditable",!1),i.appendChild(e),i},onClick_resizeButton:function(e){e.stopPropagation();const t=e.target,i=t.getAttribute("data-command")||t.parentNode.getAttribute("data-command");if(!i)return;const n=t.getAttribute("data-value")||t.parentNode.getAttribute("data-value"),l=this.context.resizing._resize_plugin,o=this.context[l],s=o._element,a=this.plugins[l];if(e.preventDefault(),"function"!=typeof this.plugins.resizing._closeAlignMenu||(this.plugins.resizing._closeAlignMenu(),"onalign"!==i)){switch(i){case"auto":a.setAutoSize.call(this),a.onModifyMode.call(this,s,this.plugins.resizing.call_controller_resize.call(this,s,l));break;case"percent":let e=this.plugins.resizing._module_getSizeY.call(this,o);if(this.context.resizing._rotateVertical){const t=s.getAttribute("data-percentage");t&&(e=t.split(",")[1])}this.plugins.resizing.resetTransform.call(this,s),a.setPercentSize.call(this,100*n,e),a.onModifyMode.call(this,s,this.plugins.resizing.call_controller_resize.call(this,s,l));break;case"mirror":const t=s.getAttribute("data-rotate")||"0";let i=s.getAttribute("data-rotateX")||"",r=s.getAttribute("data-rotateY")||"";"h"===n&&!this.context.resizing._rotateVertical||"v"===n&&this.context.resizing._rotateVertical?r=r?"":"180":i=i?"":"180",s.setAttribute("data-rotateX",i),s.setAttribute("data-rotateY",r),this.plugins.resizing._setTransForm(s,t,i,r);break;case"rotate":const c=this.context.resizing,d=1*s.getAttribute("data-rotate")+1*n,u=this._w.Math.abs(d)>=360?0:d;s.setAttribute("data-rotate",u),c._rotateVertical=/^(90|270)$/.test(this._w.Math.abs(u).toString()),this.plugins.resizing.setTransformSize.call(this,s,null,null),a.onModifyMode.call(this,s,this.plugins.resizing.call_controller_resize.call(this,s,l));break;case"onalign":this.plugins.resizing.openAlignMenu.call(this);break;case"align":const h="basic"===n?"none":n;a.setAlign.call(this,h,null,null,null),a.onModifyMode.call(this,s,this.plugins.resizing.call_controller_resize.call(this,s,l));break;case"caption":const g=!o._captionChecked;if(a.openModify.call(this,!0),o._captionChecked=o.captionCheckEl.checked=g,"image"===l?a.update_image.call(this,!1,!1,!1):"video"===l&&(this.context.dialog.updateModal=!0,a.submitAction.call(this)),g){const e=this.util.getChildElement(o._caption,(function(e){return 3===e.nodeType}));e?this.setRange(e,0,e,e.textContent.length):o._caption.focus(),this.controllersOff()}else a.onModifyMode.call(this,s,this.plugins.resizing.call_controller_resize.call(this,s,l)),a.openModify.call(this,!0);break;case"revert":a.setOriginSize.call(this),a.onModifyMode.call(this,s,this.plugins.resizing.call_controller_resize.call(this,s,l));break;case"update":a.openModify.call(this),this.controllersOff();break;case"delete":a.destroy.call(this)}this.history.push(!1)}},resetTransform:function(e){const t=(e.getAttribute("data-size")||e.getAttribute("data-origin")||"").split(",");this.context.resizing._rotateVertical=!1,e.style.maxWidth="",e.style.transform="",e.style.transformOrigin="",e.setAttribute("data-rotate",""),e.setAttribute("data-rotateX",""),e.setAttribute("data-rotateY",""),this.plugins[this.context.resizing._resize_plugin].setSize.call(this,t[0]?t[0]:"auto",t[1]?t[1]:"",!0)},setTransformSize:function(e,t,i){let n=e.getAttribute("data-percentage");const l=this.context.resizing._rotateVertical,o=1*e.getAttribute("data-rotate");let s="";if(n&&!l)n=n.split(","),"auto"===n[0]&&"auto"===n[1]?this.plugins[this.context.resizing._resize_plugin].setAutoSize.call(this):this.plugins[this.context.resizing._resize_plugin].setPercentSize.call(this,n[0],n[1]);else{const n=this.util.getParentElement(e,"FIGURE"),a=t||e.offsetWidth,r=i||e.offsetHeight,c=(l?r:a)+"px",d=(l?a:r)+"px";if(this.plugins[this.context.resizing._resize_plugin].cancelPercentAttr.call(this),this.plugins[this.context.resizing._resize_plugin].setSize.call(this,a+"px",r+"px",!0),n.style.width=c,n.style.height=this.context[this.context.resizing._resize_plugin]._caption?"":d,l){let e=a/2+"px "+a/2+"px 0",t=r/2+"px "+r/2+"px 0";s=90===o||-270===o?t:e}}e.style.transformOrigin=s,this.plugins.resizing._setTransForm(e,o.toString(),e.getAttribute("data-rotateX")||"",e.getAttribute("data-rotateY")||""),e.style.maxWidth=l?"none":"",this.plugins.resizing.setCaptionPosition.call(this,e)},_setTransForm:function(e,t,i,n){let l=(e.offsetWidth-e.offsetHeight)*(/-/.test(t)?1:-1),o="";if(/[1-9]/.test(t)&&(i||n))switch(o=i?"Y":"X",t){case"90":o=i&&n?"X":n?o:"";break;case"270":l*=-1,o=i&&n?"Y":i?o:"";break;case"-90":o=i&&n?"Y":i?o:"";break;case"-270":l*=-1,o=i&&n?"X":n?o:"";break;default:o=""}t%180==0&&(e.style.maxWidth=""),e.style.transform="rotate("+t+"deg)"+(i?" rotateX("+i+"deg)":"")+(n?" rotateY("+n+"deg)":"")+(o?" translate"+o+"("+l+"px)":"")},setCaptionPosition:function(e){const t=this.util.getChildElement(this.util.getParentElement(e,"FIGURE"),"FIGCAPTION");t&&(t.style.marginTop=(this.context.resizing._rotateVertical?e.offsetWidth-e.offsetHeight:0)+"px")},onMouseDown_resize_handle:function(e){const t=this.context.resizing,i=t._resize_direction=e.target.classList[0];e.stopPropagation(),e.preventDefault();const n=this.context.resizing._resize_plugin,l=this.context[n]._element,o=this.plugins[n];t._resizeClientX=e.clientX,t._resizeClientY=e.clientY,this.context.element.resizeBackground.style.display="block",t.resizeButton.style.display="none",t.resizeDiv.style.float=/l/.test(i)?"right":/r/.test(i)?"left":"none";const s=function(e){if("keydown"===e.type&&27!==e.keyCode)return;const i=t._isChange;t._isChange=!1,this.removeDocEvent("mousemove",a),this.removeDocEvent("mouseup",s),this.removeDocEvent("keydown",s),"keydown"===e.type?(this.controllersOff(),this.context.element.resizeBackground.style.display="none",this.plugins[this.context.resizing._resize_plugin].init.call(this)):(this.plugins.resizing.cancel_controller_resize.call(this),i&&this.history.push(!1)),o.onModifyMode.call(this,l,this.plugins.resizing.call_controller_resize.call(this,l,t._resize_plugin))}.bind(this),a=this.plugins.resizing.resizing_element.bind(this,t,i,this.context[t._resize_plugin]);this.addDocEvent("mousemove",a),this.addDocEvent("mouseup",s),this.addDocEvent("keydown",s)},resizing_element:function(e,t,i,n){const l=n.clientX,o=n.clientY;let s=i._element_w,a=i._element_h;const r=i._element_w+(/r/.test(t)?l-e._resizeClientX:e._resizeClientX-l),c=i._element_h+(/b/.test(t)?o-e._resizeClientY:e._resizeClientY-o),d=i._element_h/i._element_w*r;/t/.test(t)&&(e.resizeDiv.style.top=i._element_h-(/h/.test(t)?c:d)+"px"),/l/.test(t)&&(e.resizeDiv.style.left=i._element_w-r+"px"),/r|l/.test(t)&&(e.resizeDiv.style.width=r+"px",s=r),/^(t|b)[^h]$/.test(t)?(e.resizeDiv.style.height=d+"px",a=d):/^(t|b)h$/.test(t)&&(e.resizeDiv.style.height=c+"px",a=c),e._resize_w=s,e._resize_h=a,this.util.changeTxt(e.resizeDisplay,this._w.Math.round(s)+" x "+this._w.Math.round(a)),e._isChange=!0},cancel_controller_resize:function(){const e=this.context.resizing._rotateVertical;this.controllersOff(),this.context.element.resizeBackground.style.display="none";let t=this._w.Math.round(e?this.context.resizing._resize_h:this.context.resizing._resize_w),i=this._w.Math.round(e?this.context.resizing._resize_w:this.context.resizing._resize_h);if(!e&&!/%$/.test(t)){const e=16,n=this.context.element.wysiwygFrame.clientWidth-2*e-2;this.util.getNumber(t)>n&&(i=this._w.Math.round(i/t*n),t=n)}this.plugins[this.context.resizing._resize_plugin].setSize.call(this,t,i,!1),this.plugins[this.context.resizing._resize_plugin].init.call(this)}},s={name:"notice",add:function(e){const t=e.context;t.notice={};let i=e.util.createElement("DIV"),n=e.util.createElement("SPAN"),l=e.util.createElement("BUTTON");i.className="se-notice",l.className="close",l.setAttribute("aria-label","Close"),l.setAttribute("title",e.lang.dialogBox.close),l.innerHTML='',i.appendChild(n),i.appendChild(l),t.notice.modal=i,t.notice.message=n,l.addEventListener("click",this.onClick_cancel.bind(e)),t.element.editorArea.insertBefore(i,t.element.wysiwygFrame),i=null},onClick_cancel:function(e){e.preventDefault(),e.stopPropagation(),this.plugins.notice.close.call(this)},open:function(e){this.context.notice.message.textContent=e,this.context.notice.modal.style.display="block"},close:function(){this.context.notice.modal.style.display="none"}},a={align:{name:"align",add:function(e,t){const i=e.context;i.align={_alignList:null,currentAlign:""};let n=this.setSubmenu.call(e),l=n.querySelector("ul");l.addEventListener("click",this.pickup.bind(e)),i.align._alignList=l.querySelectorAll("li button"),t.parentNode.appendChild(n),n=null,l=null},setSubmenu:function(){const e=this.lang,t=this.util.createElement("DIV");return t.className="se-list-layer",t.innerHTML='
",t},on:function(){const e=this.context.align,t=e._alignList,i=this.commandMap.ALIGN.getAttribute("data-focus")||"left";if(i!==e.currentAlign){for(let e=0,n=t.length;e('+t.toolbar.default+")";for(o=0,s=a.length;o";return r+="",i.innerHTML=r,i},on:function(){const e=this.context.font,t=e._fontList,i=this.commandMap.FONT.textContent;if(i!==e.currentFont){for(let e=0,n=t.length;e('+t.toolbar.default+")";for(let t,i=0,o=e.fontSizeUnit,s=n.length;i";return l+="",i.innerHTML=l,i},on:function(){const e=this.context.fontSize,t=e._sizeList,i=this.commandMap.SIZE.textContent;if(i!==e.currentSize){for(let e=0,n=t.length;e
  • ",t},appendHr:function(e){const t=this.util.createElement("HR");t.className=e,this.focus();let i=this.insertComponent(t,!1);this.setRange(i,0,i,0)},horizontalRulePick:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,i=null;for(;!i&&!/UL/i.test(t.tagName);)i=t.getAttribute("data-value"),t=t.parentNode;i&&(this.plugins.horizontalRule.appendHr.call(this,"__se__"+i),this.submenuOff())}},list:{name:"list",add:function(e,t){const i=e.context;i.list={_list:null,currentList:""};let n=this.setSubmenu.call(e),l=n.querySelector("ul");l.addEventListener("click",this.pickup.bind(e)),i.list._list=l.querySelectorAll("li button"),t.parentNode.appendChild(n),n=null,l=null},setSubmenu:function(){const e=this.lang,t=this.util.createElement("DIV");return t.className="se-submenu se-list-layer",t.innerHTML='
    ",t},on:function(){const e=this.context.list,t=e._list,i=this.commandMap.LI.getAttribute("data-focus")||"";if(i!==e.currentList){for(let e=0,n=t.length;e"),e.innerHTML+=t.outerHTML,i&&(e.innerHTML+="
    ")}else e.innerHTML=t.innerHTML;r.appendChild(e),s||(h=r),s&&d===c&&!this.util.isRangeFormatElement(p)||(u||(u=r),l&&s&&d===c||s&&this.util.isList(c)&&c===a||r.parentNode!==d&&d.insertBefore(r,p)),this.util.removeItem(t),l&&null===g&&(g=r.children.length-1),s&&this.util.getRangeFormatElement(c,m)!==this.util.getRangeFormatElement(a,m)&&(r=this.util.createElement(i)),f&&0===f.children.length&&this.util.removeItem(f)}else this.util.removeItem(t);g&&(u=u.children[g]),a&&(p=r.children.length-1,r.innerHTML+=d.innerHTML,h=r.children[p],this.util.removeItem(d)),o=s=this.util.getEdgeChildNodes(u.firstChild,h.lastChild)}else{const e=this.util.getRangeFormatElement(this.getSelectionNode()),t=e&&e.tagName===i;let l,a;const r=function(e){return!this.isComponent(e)}.bind(this.util);t||(a=this.util.createElement(i));for(let e,c,d=0,u=n.length;d1?this.setRange(o.sc,0,s.ec,s.ec.textContent.length):this.setRange(o.ec,o.ec.textContent.length,s.ec,s.ec.textContent.length),this.submenuOff(),this.history.push(!1)}},table:{name:"table",add:function(e,t){const i=e.context;i.table={_element:null,_tdElement:null,_trElement:null,_trElements:null,_tableXY:[],_maxWidth:!0,resizeIcon:null,resizeText:null,headerButton:null,mergeButton:null,splitButton:null,splitMenu:null,maxText:e.lang.controller.maxSize,minText:e.lang.controller.minSize,_physical_cellCnt:0,_logical_cellCnt:0,_rowCnt:0,_rowIndex:0,_physical_cellIndex:0,_logical_cellIndex:0,_current_colSpan:0,_current_rowSpan:0};let n=this.setSubmenu.call(e),l=n.querySelector(".se-controller-table-picker");i.table.tableHighlight=n.querySelector(".se-table-size-highlighted"),i.table.tableUnHighlight=n.querySelector(".se-table-size-unhighlighted"),i.table.tableDisplay=n.querySelector(".se-table-size-display");let o=this.setController_table.call(e);i.table.tableController=o,i.table.resizeIcon=o.querySelector("._se_table_resize > i"),i.table.resizeText=o.querySelector("._se_table_resize > span > span"),i.table.headerButton=o.querySelector("._se_table_header"),o.addEventListener("mousedown",(function(e){e.stopPropagation()}),!1);let s=this.setController_tableEditor.call(e);i.table.resizeDiv=s,i.table.splitMenu=s.querySelector(".se-btn-group-sub"),i.table.mergeButton=s.querySelector("._se_table_merge_button"),i.table.splitButton=s.querySelector("._se_table_split_button"),s.addEventListener("mousedown",(function(e){e.stopPropagation()}),!1),l.addEventListener("mousemove",this.onMouseMove_tablePicker.bind(e)),l.addEventListener("click",this.appendTable.bind(e)),s.addEventListener("click",this.onClick_tableController.bind(e)),o.addEventListener("click",this.onClick_tableController.bind(e)),t.parentNode.appendChild(n),i.element.relative.appendChild(s),i.element.relative.appendChild(o),n=null,l=null,s=null,o=null},setSubmenu:function(){const e=this.util.createElement("DIV");return e.className="se-submenu se-selector-table",e.innerHTML='
    1 x 1
    ',e},setController_table:function(){const e=this.lang,t=this.util.createElement("DIV");return t.className="se-controller se-controller-table",t.innerHTML='
    ",t},setController_tableEditor:function(){const e=this.lang,t=this.util.createElement("DIV");return t.className="se-controller se-controller-table-cell",t.innerHTML='
    • '+e.controller.VerticalSplit+'
    • '+e.controller.HorizontalSplit+"
    ",t},appendTable:function(){const e=this.util.createElement("TABLE"),t=this.plugins.table.createCells,i=this.context.table._tableXY[0];let n=this.context.table._tableXY[1],l="";for(;n>0;)l+=""+t.call(this,"td",i)+"",--n;l+="",e.innerHTML=l,this.insertComponent(e,!1);const o=e.querySelector("td div");this.setRange(o,0,o,0),this.plugins.table.reset_table_picker.call(this)},createCells:function(e,t,i){if(e=e.toLowerCase(),i){const t=this.util.createElement(e);return t.innerHTML="

    ",t}{let i="";for(;t>0;)i+="<"+e+">

    ",t--;return i}},onMouseMove_tablePicker:function(e){e.stopPropagation();let t=this._w.Math.ceil(e.offsetX/18),i=this._w.Math.ceil(e.offsetY/18);t=t<1?1:t,i=i<1?1:i,this.context.table.tableHighlight.style.width=t+"em",this.context.table.tableHighlight.style.height=i+"em";let n=t<5?5:t>9?10:t+1,l=i<5?5:i>9?10:i+1;this.context.table.tableUnHighlight.style.width=n+"em",this.context.table.tableUnHighlight.style.height=l+"em",this.util.changeTxt(this.context.table.tableDisplay,t+" x "+i),this.context.table._tableXY=[t,i]},reset_table_picker:function(){if(!this.context.table.tableHighlight)return;const e=this.context.table.tableHighlight.style,t=this.context.table.tableUnHighlight.style;e.width="1em",e.height="1em",t.width="5em",t.height="5em",this.util.changeTxt(this.context.table.tableDisplay,"1 x 1"),this.submenuOff()},init:function(){const e=this.context.table,t=this.plugins.table;if(t._removeEvents.call(this),t._selectedTable){const e=t._selectedTable.querySelectorAll(".se-table-selected-cell");for(let t=0,i=e.length;t0)for(let e,t=0;to||(u>=e.index?(n+=e.cs,u+=e.cs,e.rs-=1,e.row=o+1,e.rs<1&&(r.splice(t,1),t--)):h===g-1&&(e.rs-=1,e.row=o+1,e.rs<1&&(r.splice(t,1),t--)));if(o===s&&h===l){i._logical_cellIndex=u;break}d>0&&a.push({index:u,cs:c+1,rs:d,row:-1}),n+=c}r=r.concat(a).sort((function(e,t){return e.index-t.index})),a=[]}a=null,r=null}},editTable:function(e,t){const i=this.plugins.table,n=this.context.table,l=n._element,o="row"===e;if(o){const e=n._trElement.parentNode;if(/^THEAD$/i.test(e.nodeName)){if("up"===t)return;if(!e.nextElementSibling||!/^TBODY$/i.test(e.nextElementSibling.nodeName))return void(l.innerHTML+=""+i.createCells.call(this,"td",n._logical_cellCnt,!1)+"")}}if(i._ref){const e=n._tdElement,l=i._selectedCells;if(o)if(t)i.setCellInfo.call(this,"up"===t?l[0]:l[l.length-1],!0),i.editRow.call(this,t,e);else{let e=l[0].parentNode;const n=[l[0]];for(let t,i=1,o=l.length;is&&s>t&&(e[l].rowSpan=i+a,c-=n)}if(n){const e=r[o+1];if(e){const t=[];let i=r[o].cells,n=0;for(let e,l,o=0,s=i.length;o1&&(e.rowSpan-=1,t.push({cell:e.cloneNode(!1),index:l}));if(t.length>0){let l=t.shift();i=e.cells,n=0;for(let o,s,a=0,r=i.length;a=l.index)||(a--,n--,n+=l.cell.colSpan-1,e.insertBefore(l.cell,o),l=t.shift(),l));a++);if(l){e.appendChild(l.cell);for(let i=0,n=t.length;i0){const e=!o[b+1];for(let t,i=0;i_||(p>=t.index?(f+=t.cs,p=b+f,t.rs-=1,t.row=_+1,t.rs<1&&(d.splice(i,1),i--)):e&&(t.rs-=1,t.row=_+1,t.rs<1&&(d.splice(i,1),i--)))}i>0&&c.push({rs:i,cs:r+1,index:p,row:-1}),p>=t&&p+r<=t+s?h.push(e):p<=t+s&&p+r>=t?e.colSpan-=n.getOverlapRangeAtIndex(a,a+s,p,p+r):i>0&&(pt+s)&&g.push({cell:e,i:_,rs:_+i}),f+=r}else{if(b>=t)break;if(r>0){if(u<1&&r+b>=t){e.colSpan+=1,t=null,u=i+1;break}t-=r}if(!m){for(let e,i=0;i0){u-=1;continue}null!==t&&o.length>0&&(p=this.plugins.table.createCells.call(this,o[0].nodeName,0,!0),p=e.insertBefore(p,o[t]))}}if(l){let e,t;for(let i,l=0,o=h.length;l1)c.colSpan=this._w.Math.floor(e/2),l.colSpan=e-c.colSpan,s.insertBefore(c,l.nextElementSibling);else{let t=[],i=[];for(let s,r,c=0,d=n._rowCnt;c0)for(let e,t=0;tc||(u>=e.index?(r+=e.cs,u+=e.cs,e.rs-=1,e.row=c+1,e.rs<1&&(i.splice(t,1),t--)):h===g-1&&(e.rs-=1,e.row=c+1,e.rs<1&&(i.splice(t,1),t--)));if(u<=a&&d>0&&t.push({index:u,cs:o+1,rs:d,row:-1}),n!==l&&u<=a&&u+o>=a+e-1){n.colSpan+=1;break}if(u>a)break;r+=o}i=i.concat(t).sort((function(e,t){return e.index-t.index})),t=[]}s.insertBefore(c,l.nextElementSibling)}}else{const e=l.rowSpan;if(c.colSpan=l.colSpan,e>1){c.rowSpan=this._w.Math.floor(e/2);const i=e-c.rowSpan,n=[],r=t.getArrayIndex(o,s)+i;for(let e,t,i=0;i=a));c++)l=e[c],o=l.rowSpan-1,o>0&&o+i>=r&&s=h.index&&(r+=h.cs,l+=h.cs,h=n.shift()),l>=a||o===s-1){d.insertBefore(c,e.nextElementSibling);break}r+=t}l.rowSpan=i}else{c.rowSpan=l.rowSpan;const e=t.createElement("TR");e.appendChild(c);for(let e,t=0;t=r&&(e[i].rowSpan+=1)}const i=n._physical_cellIndex,a=s.cells;for(let e=0,t=a.length;e0&&s+o>=n&&(e.rowSpan-=i.getOverlapRangeAtIndex(n,l,s,s+o));else o.push(e[s]);for(let e=0,t=o.length;e"+this.plugins.table.createCells.call(this,"th",this.context.table._logical_cellCnt,!1)+"",n.insertBefore(t,n.firstElementChild)}e.toggleClass(t,"active"),/TH/i.test(this.context.table._tdElement.nodeName)?this.controllersOff():this.plugins.table.setPositionControllerDiv.call(this,this.context.table._tdElement,!1)},resizeTable:function(){const e=this.context.table,t=e.resizeIcon,i=e.resizeText;let n="se-icon-expansion",l="se-icon-reduction",o=e.minText,s="100%";e._maxWidth||(n="se-icon-reduction",l="se-icon-expansion",o=e.maxText,s="auto"),this.util.removeClass(t,n),this.util.addClass(t,l),this.util.changeTxt(i,o),e._element.style.width=s},setActiveButton:function(e,t){const i=this.context.table;t&&e!==t?(i.splitButton.setAttribute("disabled",!0),i.mergeButton.removeAttribute("disabled")):(i.splitButton.removeAttribute("disabled"),i.mergeButton.setAttribute("disabled",!0))},_bindOnSelect:null,_bindOffSelect:null,_bindOffShift:null,_selectedCells:null,_shift:!1,_fixedCell:null,_fixedCellName:null,_selectedCell:null,_selectedTable:null,_ref:null,_toggleEditor:function(e){this.context.element.wysiwyg.setAttribute("contenteditable",e),e?this.util.removeClass(this.context.element.wysiwyg,"se-disabled"):this.util.addClass(this.context.element.wysiwyg,"se-disabled")},_offCellMultiSelect:function(e){e.stopPropagation();const t=this.plugins.table;t._shift?t._initBind&&(this._wd.removeEventListener("touchmove",t._initBind),t._initBind=null):(t._removeEvents.call(this),t._toggleEditor.call(this,!0)),t._fixedCell&&t._selectedTable&&(t.setActiveButton.call(this,t._fixedCell,t._selectedCell),t.call_controller_tableEdit.call(this,t._selectedCell||t._fixedCell),t._selectedCells=t._selectedTable.querySelectorAll(".se-table-selected-cell"),this.focusEdge(t._selectedCell||t._fixedCell),t._shift||(t._fixedCell=null,t._selectedCell=null,t._fixedCellName=null))},_onCellMultiSelect:function(e){const t=this.plugins.table,i=this.util.getParentElement(e.target,this.util.isCell);if(t._shift)i===t._fixedCell?t._toggleEditor.call(this,!0):t._toggleEditor.call(this,!1);else if(!t._ref){if(i===t._fixedCell)return;t._toggleEditor.call(this,!1)}i&&i!==t._selectedCell&&t._fixedCellName===i.nodeName&&t._selectedTable===this.util.getParentElement(i,"TABLE")&&(t._selectedCell=i,t._setMultiCells.call(this,t._fixedCell,i))},_setMultiCells:function(e,t){const i=this.plugins.table,n=i._selectedTable.rows,l=this.util,o=i._selectedTable.querySelectorAll(".se-table-selected-cell");for(let e=0,t=o.length;e0)for(let e,t=0;td||(u>=e.index?(o+=e.cs,u+=e.cs,e.rs-=1,e.row=d+1,e.rs<1&&(a.splice(t,1),t--)):p===m-1&&(e.rs-=1,e.row=d+1,e.rs<1&&(a.splice(t,1),t--)));if(s){if(n!==e&&n!==t||(c.cs=null!==c.cs&&c.csu+h?c.ce:u+h,c.rs=null!==c.rs&&c.rsd+g?c.re:d+g,c._i+=1),2===c._i){s=!1,a=[],r=[],d=-1;break}}else if(l.getOverlapRangeAtIndex(c.cs,c.ce,u,u+h)&&l.getOverlapRangeAtIndex(c.rs,c.re,d,d+g)){const e=c.csu+h?c.ce:u+h,i=c.rsd+g?c.re:d+g;if(c.cs!==e||c.ce!==t||c.rs!==i||c.re!==o){c.cs=e,c.ce=t,c.rs=i,c.re=o,d=-1,a=[],r=[];break}l.addClass(n,"se-table-selected-cell")}g>0&&r.push({index:u,cs:h+1,rs:g,row:-1}),o+=n.colSpan-1}a=a.concat(r).sort((function(e,t){return e.index-t.index})),r=[]}},_removeEvents:function(){const e=this.plugins.table;e._initBind&&(this._wd.removeEventListener("touchmove",e._initBind),e._initBind=null),e._bindOnSelect&&(this._wd.removeEventListener("mousedown",e._bindOnSelect),this._wd.removeEventListener("mousemove",e._bindOnSelect),e._bindOnSelect=null),e._bindOffSelect&&(this._wd.removeEventListener("mouseup",e._bindOffSelect),e._bindOffSelect=null),e._bindOffShift&&(this._wd.removeEventListener("keyup",e._bindOffShift),e._bindOffShift=null)},_initBind:null,onTableCellMultiSelect:function(e,t){const i=this.plugins.table;i._removeEvents.call(this),this.controllersOff(),i._shift=t,i._fixedCell=e,i._fixedCellName=e.nodeName,i._selectedTable=this.util.getParentElement(e,"TABLE");const n=i._selectedTable.querySelectorAll(".se-table-selected-cell");for(let e=0,t=n.length;e-1?(i=e.toLowerCase(),s="pre"===i||"blockquote"===i?"range":"replace",r=/^h/.test(i)?i.match(/\d+/)[0]:"",a=t["tag_"+(r?"h":i)]+r,c=""):(i=e.tag.toLowerCase(),s=e.command,a=e.name||i,c=e.class?' class="'+e.class+'"':""),o+='
  • ";return o+="",i.innerHTML=o,i},on:function(){const e=this.context.formatBlock,t=e._formatList,i=(this.commandMap.FORMAT.getAttribute("data-focus")||"P").toLowerCase();if(i!==e.currentFormat){for(let e=0,n=t.length;e('+t.toolbar.default+")";for(let e,t=0,i=n.length;t";return l+="",i.innerHTML=l,i},on:function(){const e=this.context.lineHeight,t=e._sizeList,i=this.util.getFormatElement(this.getSelectionNode()).style.lineHeight+"";if(i!==e.currentSize){for(let e=0,n=t.length;e";return i+="",t.innerHTML=i,t},pickup:function(e){if(!/^BUTTON$/i.test(e.target.tagName))return!1;e.preventDefault(),e.stopPropagation();const t=this.context.option.templates[e.target.getAttribute("data-value")];if(!t.html)throw this.submenuOff(),Error('[SUNEDITOR.template.fail] cause : "templates[i].html not found"');this.setContents(t.html),this.submenuOff()}},paragraphStyle:{name:"paragraphStyle",add:function(e,t){const i=e.context;i.paragraphStyle={_classList:null};let n=this.setSubmenu.call(e);n.querySelector("ul").addEventListener("click",this.pickUp.bind(e)),i.paragraphStyle._classList=n.querySelectorAll("li button"),t.parentNode.appendChild(n),n=null},setSubmenu:function(){const e=this.context.option,t=this.util.createElement("DIV");t.className="se-submenu se-list-layer";const i=this.lang.menu,n={spaced:{name:i.spaced,class:"__se__p-spaced",_class:""},bordered:{name:i.bordered,class:"__se__p-bordered",_class:""},neon:{name:i.neon,class:"__se__p-neon",_class:""}},l=e.paragraphStyles&&0!==e.paragraphStyles.length?e.paragraphStyles:["spaced","bordered","neon"];let o='
      ';for(let e,t,i,s,a=0,r=l.length;a
    "}return o+="",t.innerHTML=o,t},on:function(){const e=this.context.paragraphStyle._classList,t=this.util.getFormatElement(this.getSelectionNode());for(let i=0,n=e.length;i"}return l+="",t.innerHTML=l,t},on:function(){const e=this.util,t=this.context.textStyle._styleList,i=this.getSelectionNode();for(let n,l,o,s=0,a=t.length;s'+e.dialogBox.linkBox.title+'
    ",t},setController_LinkButton:function(){const e=this.lang,t=this.util.createElement("DIV");return t.className="se-controller se-controller-link",t.innerHTML='
    ",t},submit:function(e){this.showLoading(),e.preventDefault(),e.stopPropagation();const t=function(){if(0===this.context.link.focusElement.value.trim().length)return!1;const e=this.context.link,t=e.focusElement.value,i=e.linkAnchorText,n=0===i.value.length?t:i.value;if(this.context.dialog.updateModal)e._linkAnchor.href=t,e._linkAnchor.textContent=n,e._linkAnchor.target=e.linkNewWindowCheck.checked?"_blank":"",this.setRange(e._linkAnchor.childNodes[0],0,e._linkAnchor.childNodes[0],e._linkAnchor.textContent.length);else{const i=this.util.createElement("A");i.href=t,i.textContent=n,i.target=e.linkNewWindowCheck.checked?"_blank":"",this.insertNode(i),this.setRange(i.childNodes[0],0,i.childNodes[0],i.textContent.length)}this.history.push(!1),e.focusElement.value="",e.linkAnchorText.value=""}.bind(this);try{t()}finally{this.plugins.dialog.close.call(this),this.closeLoading(),this.focus()}return!1},on:function(e){e||(this.context.link.linkAnchorText.value=this.getSelection().toString())},call_controller_linkButton:function(e){this.editLink=this.context.link._linkAnchor=e;const t=this.context.link.linkBtn,i=t.querySelector("a");i.href=e.href,i.title=e.textContent,i.textContent=e.textContent;const n=this.util.getOffset(e,this.context.element.wysiwygFrame);t.style.top=n.top+e.offsetHeight+10+"px",t.style.left=n.left-this.context.element.wysiwygFrame.scrollLeft+"px",t.style.display="block";const l=this.context.element.wysiwygFrame.offsetWidth-(t.offsetLeft+t.offsetWidth);l<0?(t.style.left=t.offsetLeft+l+"px",t.firstElementChild.style.left=20-l+"px"):t.firstElementChild.style.left="20px",this.controllersOn(t)},onClick_linkBtn:function(e){e.stopPropagation();const t=e.target.getAttribute("data-command")||e.target.parentNode.getAttribute("data-command");t&&(e.preventDefault(),/update/.test(t)?(this.context.link.focusElement.value=this.context.link._linkAnchor.href,this.context.link.linkAnchorText.value=this.context.link._linkAnchor.textContent,this.context.link.linkNewWindowCheck.checked=!!/_blank/i.test(this.context.link._linkAnchor.target),this.plugins.dialog.open.call(this,"link",!0)):/unlink/.test(t)?(this.setRange(this.context.link._linkAnchor,0,this.context.link._linkAnchor,1),this.nodeChange(null,null,["A"],!1)):(this.util.removeItem(this.context.link._linkAnchor),this.context.link._linkAnchor=null,this.focus(),this.history.push(!1)),this.controllersOff())},init:function(){const e=this.context.link;e.linkBtn.style.display="none",e._linkAnchor=null,e.focusElement.value="",e.linkAnchorText.value="",e.linkNewWindowCheck.checked=!1}},image:{name:"image",add:function(e){e.addModule([l,o,s]);const t=e.context;t.image={sizeUnit:t.option._imageSizeUnit,_linkElement:null,_container:null,_cover:null,_element:null,_element_w:1,_element_h:1,_element_l:0,_element_t:0,_defaultSizeX:"auto",_defaultSizeY:"auto",_origin_w:"auto"===t.option.imageWidth?"":t.option.imageWidth,_origin_h:"",_altText:"",_caption:null,captionCheckEl:null,_linkValue:"",_align:"none",_captionChecked:!1,_proportionChecked:!0,_floatClassRegExp:"__se__float\\-[a-z]+",_xmlHttp:null,_captionShow:!0,_resizing:t.option.imageResizing,_rotation:t.option.imageRotation,_resizeDotHide:!t.option.imageHeightShow,_uploadFileLength:0,_onlyPercentage:t.option.imageSizeOnlyPercentage,_ratio:!1,_ratioX:1,_ratioY:1};let i=this.setDialog.call(e);t.image.modal=i,t.image.imgUrlFile=i.querySelector("._se_image_url"),t.image.imgInputFile=t.image.focusElement=i.querySelector("._se_image_file"),t.image.altText=i.querySelector("._se_image_alt"),t.image.imgLink=i.querySelector("._se_image_link"),t.image.imgLinkNewWindowCheck=i.querySelector("._se_image_link_check"),t.image.captionCheckEl=i.querySelector("._se_image_check_caption"),t.image.modal.querySelector(".se-dialog-tabs").addEventListener("click",this.openTab.bind(e)),t.image.modal.querySelector(".se-btn-primary").addEventListener("click",this.submit.bind(e)),t.image.proportion={},t.image.inputX={},t.image.inputY={},t.option.imageResizing&&(t.image.proportion=i.querySelector("._se_image_check_proportion"),t.image.inputX=i.querySelector("._se_image_size_x"),t.image.inputY=i.querySelector("._se_image_size_y"),t.image.inputX.value=t.option.imageWidth,t.image.inputX.addEventListener("keyup",this.setInputSize.bind(e,"x")),t.image.inputY.addEventListener("keyup",this.setInputSize.bind(e,"y")),t.image.inputX.addEventListener("change",this.setRatio.bind(e)),t.image.inputY.addEventListener("change",this.setRatio.bind(e)),t.image.proportion.addEventListener("change",this.setRatio.bind(e)),i.querySelector(".se-dialog-btn-revert").addEventListener("click",this.sizeRevert.bind(e))),t.dialog.modal.appendChild(i),i=null},setDialog:function(){const e=this.context.option,t=this.lang,i=this.util.createElement("DIV");i.className="se-dialog-content",i.style.display="none";let n='
    '+t.dialogBox.imageBox.title+'
    ';if(e.imageFileInput&&(n+='
    '),e.imageUrlInput&&(n+='
    '),n+='
    ',e.imageResizing){const i=e.imageSizeOnlyPercentage,l=i?' style="display: none !important;"':"",o=e.imageHeightShow?"":' style="display: none !important;"';n+='
    ',i||!e.imageHeightShow?n+='
    ":n+='
    ",n+=' '+t.dialogBox.proportion+'
    '}return n+='
    ",i.innerHTML=n,i},openTab:function(e){const t=this.context.image.modal,i="init"===e?t.querySelector("._se_tab_link"):e.target;if(!/^BUTTON$/i.test(i.tagName))return!1;const n=i.getAttribute("data-tab-link");let l,o,s;for(o=t.getElementsByClassName("_se_tab_content"),l=0;l0){let t=0;const i=[];for(let n=0,l=e.length;n0){let e=0;const i=this._variable._imagesInfo;for(let t=0,n=i.length;tn){const i="[SUNEDITOR.imageUpload.fail] Size of uploadable total images: "+n/1e3+"KB";return this._imageUploadError(i,{limitSize:n,currentSize:e,uploadSize:t})&&s.open.call(this,i),void this.closeLoading()}}this.context.image._uploadFileLength=i.length;const l=this.context.option.imageUploadUrl,o=this.context.option.imageUploadHeader,a=this.context.dialog.updateModal?1:i.length;if("string"==typeof l&&l.length>0){const e=new FormData;for(let t=0;t0)for(let e in o)this.context.image._xmlHttp.setRequestHeader(e,o[e]);this.context.image._xmlHttp.send(e)}else for(let e=0;e0){const n=this.util.createElement("A");return n.href=/^https?:\/\//.test(t)?t:"http://"+t,n.target=i?"_blank":"",n.setAttribute("data-image-link","image"),e.setAttribute("data-image-link",t),n.appendChild(e),n}return e},setInputSize:function(e,t){t&&32===t.keyCode?t.preventDefault():this.plugins.resizing._module_setInputSize.call(this,this.context.image,e)},setRatio:function(){this.plugins.resizing._module_setRatio.call(this,this.context.image)},submit:function(e){const t=this.context.image,i=this.plugins.image;this.showLoading(),e.preventDefault(),e.stopPropagation(),t._linkValue=t.imgLink.value,t._altText=t.altText.value,t._align=t.modal.querySelector('input[name="suneditor_image_radio"]:checked').value,t._captionChecked=t.captionCheckEl.checked,t._resizing&&(t._proportionChecked=t.proportion.checked);try{this.context.dialog.updateModal&&i.update_image.call(this,!1,!1,!1),t.imgInputFile&&t.imgInputFile.files.length>0?i.onRender_imgInput.call(this):t.imgUrlFile&&t.imgUrlFile.value.trim().length>0?i.onRender_imgUrl.call(this):this.closeLoading()}catch(e){throw this.closeLoading(),Error('[SUNEDITOR.image.submit.fail] cause : "'+e.message+'"')}finally{this.plugins.dialog.close.call(this)}return!1},setImagesInfo:function(e,t){const i=this._variable._imagesInfo;let n=e.getAttribute("data-index"),l=null,o="";if(!n||this._imagesInfoInit)o="create",n=this._variable._imageIndex,this._variable._imageIndex++,e.setAttribute("data-index",n),e.setAttribute("data-file-name",t.name),e.setAttribute("data-file-size",t.size),l={src:e.src,index:1*n,name:t.name,size:t.size},i.push(l);else{o="update",n*=1;for(let e=0,t=i.length;e-1||(i.splice(t,1),this._imageUpload(null,e,"delete",null,0),t--);this.context.resizing._resize_plugin=""},_onload_image:function(e,t){t&&(this.plugins.image.setImagesInfo.call(this,e,t),this.history.push(!0))},create_image:function(e,t,i,n,l,o,s){const a=this.context.image;this.context.resizing._resize_plugin="image";let r=this.util.createElement("IMG");r.addEventListener("load",this.plugins.image._onload_image.bind(this,r,s)),r.src=e,r.alt=a._altText,r=this.plugins.image.onRender_link.call(this,r,t,i),r.setAttribute("data-rotate","0"),a._resizing&&r.setAttribute("data-proportion",a._proportionChecked);const c=this.plugins.resizing.set_cover.call(this,r),d=this.plugins.resizing.set_container.call(this,c,"se-image-container");a._captionChecked&&(a._caption=this.plugins.resizing.create_caption.call(this),a._caption.setAttribute("contenteditable",!1),c.appendChild(a._caption)),a._element=r,a._cover=c,a._container=d,this.plugins.image.applySize.call(this),this.plugins.image.setAlign.call(this,o,r,c,d),this.insertComponent(d,!0),this.context.resizing._resize_plugin=""},update_image:function(e,t,i){const n=this.context.image,l=n._linkValue;let o,s=n._element,a=n._cover,r=n._container,c=!1;null===a&&(c=!0,s=n._element.cloneNode(!0),a=this.plugins.resizing.set_cover.call(this,s)),null===r&&(a=a.cloneNode(!0),c=!0,r=this.plugins.resizing.set_container.call(this,a,"se-image-container")),c&&(r.innerHTML="",r.appendChild(a));const d=this.util.isNumber(n.inputX.value)?n.inputX.value+n.sizeUnit:n.inputX.value,u=this.util.isNumber(n.inputY.value)?n.inputY.value+n.sizeUnit:n.inputY.value;if(o=/%$/.test(s.style.width)?d!==r.style.width||u!==r.style.height:d!==s.style.width||u!==s.style.height,s.alt=n._altText,n._captionChecked?n._caption||(n._caption=this.plugins.resizing.create_caption.call(this),a.appendChild(n._caption)):n._caption&&(this.util.removeItem(n._caption),n._caption=null),l.trim().length>0)if(null!==n._linkElement)n._linkElement.href=l,n._linkElement.target=n.imgLinkNewWindowCheck.checked?"_blank":"",s.setAttribute("data-image-link",l);else{let e=this.plugins.image.onRender_link.call(this,s,l,this.context.image.imgLinkNewWindowCheck.checked);a.insertBefore(e,n._caption)}else if(null!==n._linkElement){const e=s;e.setAttribute("data-image-link","");let t=e.cloneNode(!0);a.removeChild(n._linkElement),a.insertBefore(t,n._caption),s=t}if(c){const e=this.util.isRangeFormatElement(n._element.parentNode)||this.util.isWysiwygDiv(n._element.parentNode)?n._element:/^A$/i.test(n._element.parentNode.nodeName)?n._element.parentNode:this.util.getFormatElement(n._element)||n._element;e.parentNode.insertBefore(r,e),this.util.removeItem(e),s=r.querySelector("img"),n._element=s,n._cover=a,n._container=r}!n._onlyPercentage&&o&&!e&&(/\d+/.test(s.style.height)||this.context.resizing._rotateVertical&&n._captionChecked)&&(/%$/.test(n.inputX.value)||/%$/.test(n.inputY.value)?this.plugins.resizing.resetTransform.call(this,s):this.plugins.resizing.setTransformSize.call(this,s,this.util.getNumber(n.inputX.value,0),this.util.getNumber(n.inputY.value,0)));if(n._resizing&&(s.setAttribute("data-proportion",n._proportionChecked),o&&this.plugins.image.applySize.call(this)),this.plugins.image.setAlign.call(this,null,s,null,null),e&&this.plugins.image.setImagesInfo.call(this,s,{name:s.getAttribute("data-file-name")||s.src.split("/").pop(),size:s.getAttribute("data-file-size")||0}),t){this.plugins.image.init.call(this);const e=this.plugins.resizing.call_controller_resize.call(this,s,"image");this.plugins.image.onModifyMode.call(this,s,e)}i||this.history.push(!1)},update_src:function(e,t,i){t.src=e,this._w.setTimeout(this.plugins.image.setImagesInfo.bind(this,t,i))},onModifyMode:function(e,t){const i=this.context.image;i._linkElement=/^A$/i.test(e.parentNode.nodeName)?e.parentNode:null,i._element=e,i._cover=this.util.getParentElement(e,"FIGURE"),i._container=this.util.getParentElement(e,this.util.isComponent),i._caption=this.util.getChildElement(i._cover,"FIGCAPTION"),i._align=e.getAttribute("data-align")||"none",t&&(i._element_w=t.w,i._element_h=t.h,i._element_t=t.t,i._element_l=t.l);let n=i._element.getAttribute("data-size")||i._element.getAttribute("data-origin");n?(n=n.split(","),i._origin_w=n[0],i._origin_h=n[1]):t&&(i._origin_w=t.w,i._origin_h=t.h)},openModify:function(e){const t=this.context.image;t.imgUrlFile.value=t._element.src,t._altText=t.altText.value=t._element.alt,t._linkValue=t.imgLink.value=null===t._linkElement?"":t._linkElement.href,t.imgLinkNewWindowCheck.checked=t._linkElement&&"_blank"===t._linkElement.target,t.modal.querySelector('input[name="suneditor_image_radio"][value="'+t._align+'"]').checked=!0,t._align=t.modal.querySelector('input[name="suneditor_image_radio"]:checked').value,t._captionChecked=t.captionCheckEl.checked=!!t._caption,t._resizing&&this.plugins.resizing._module_setModifyInputSize.call(this,t,this.plugins.image),e||this.plugins.dialog.open.call(this,"image",!0)},on:function(e){if(!e){const e=this.context.image;e.inputX.value=e._origin_w=this.context.option.imageWidth===e._defaultSizeX?"":this.context.option.imageWidth,e.inputY.value=e._origin_h="",e.inputY.disabled=!0,e.proportion.disabled=!0}},sizeRevert:function(){this.plugins.resizing._module_sizeRevert.call(this,this.context.image)},applySize:function(e,t){const i=this.context.image;return e||(e=i.inputX.value),t||(t=i.inputY.value),i._onlyPercentage&&e||/%$/.test(e)?(this.plugins.image.setPercentSize.call(this,e,t),!0):(e&&"auto"!==e||t&&"auto"!==t?this.plugins.image.setSize.call(this,e,t,!1):this.plugins.image.setAutoSize.call(this),!1)},setSize:function(e,t,i){const n=this.context.image;this.plugins.image.cancelPercentAttr.call(this),n._element.style.width=this.util.isNumber(e)?e+n.sizeUnit:e,n._element.style.height=this.util.isNumber(t)?t+n.sizeUnit:/%$/.test(t)?"":t,"center"===n._align&&this.plugins.image.setAlign.call(this,null,null,null,null),i||n._element.removeAttribute("data-percentage"),this.plugins.resizing._module_saveCurrentSize.call(this,n)},setAutoSize:function(){const e=this.context.image;this.plugins.resizing.resetTransform.call(this,e._element),this.plugins.image.cancelPercentAttr.call(this),e._element.style.maxWidth="",e._element.style.width="",e._element.style.height="",e._cover.style.width="",e._cover.style.height="",this.plugins.image.setAlign.call(this,null,null,null,null),e._element.setAttribute("data-percentage","auto,auto"),this.plugins.resizing._module_saveCurrentSize.call(this,e)},setOriginSize:function(){const e=this.context.image;e._element.removeAttribute("data-percentage"),this.plugins.resizing.resetTransform.call(this,e._element),this.plugins.image.cancelPercentAttr.call(this);const t=(e._element.getAttribute("data-origin")||"").split(","),i=t[0],n=t[1];t&&(e._onlyPercentage||/%$/.test(i)&&(/%$/.test(n)||!/\d/.test(n))?this.plugins.image.setPercentSize.call(this,i,n):this.plugins.image.setSize.call(this,i,n),this.plugins.resizing._module_saveCurrentSize.call(this,e))},setPercentSize:function(e,t){const i=this.context.image;t=!t||/%$/.test(t)||this.util.getNumber(t,0)?this.util.isNumber(t)?t+i.sizeUnit:t||"":this.util.isNumber(t)?t+"%":t;const n=/%$/.test(t);i._container.style.width=this.util.isNumber(e)?e+"%":e,i._container.style.height="",i._cover.style.width="100%",i._cover.style.height=n?t:"",i._element.style.width="100%",i._element.style.height=n?"":t,i._element.style.maxWidth="","center"===i._align&&this.plugins.image.setAlign.call(this,null,null,null,null),i._element.setAttribute("data-percentage",e+","+t),this.plugins.resizing.setCaptionPosition.call(this,i._element),this.plugins.resizing._module_saveCurrentSize.call(this,i)},cancelPercentAttr:function(){const e=this.context.image;e._cover.style.width="",e._cover.style.height="",e._container.style.width="",e._container.style.height="",this.util.removeClass(e._container,this.context.image._floatClassRegExp),this.util.addClass(e._container,"__se__float-"+e._align),"center"===e._align&&this.plugins.image.setAlign.call(this,null,null,null,null)},setAlign:function(e,t,i,n){const l=this.context.image;e||(e=l._align),t||(t=l._element),i||(i=l._cover),n||(n=l._container),i.style.margin=e&&"none"!==e?"auto":"0",/%$/.test(t.style.width)&&"center"===e?(n.style.minWidth="100%",i.style.width=n.style.width):(n.style.minWidth="",i.style.width=this.context.resizing._rotateVertical?t.style.height||t.offsetHeight:t.style.width&&"auto"!==t.style.width?t.style.width||"100%":""),this.util.hasClass(n,"__se__float-"+e)||(this.util.removeClass(n,l._floatClassRegExp),this.util.addClass(n,"__se__float-"+e),t.setAttribute("data-align",e))},resetAlign:function(){const e=this.context.image;e._element.setAttribute("data-align",""),e._align="none",e._cover.style.margin="0",this.util.removeClass(e._container,e._floatClassRegExp)},destroy:function(e){const t=e||this.context.image._element,i=this.util.getParentElement(t,this.util.isComponent)||t,n=1*t.getAttribute("data-index");let l=i.previousElementSibling||i.nextElementSibling;if(this.util.removeItem(i),this.plugins.image.init.call(this),this.controllersOff(),this.focusEdge(l),n>=0){const e=this._variable._imagesInfo;for(let t=0,i=e.length;t'+t.dialogBox.videoBox.title+'
    ';if(e.videoResizing){const i=e.videoRatioList||[{name:"16:9",value:.5625},{name:"4:3",value:.75},{name:"21:9",value:.4285}],l=e.videoRatio,o=e.videoSizeOnlyPercentage,s=o?' style="display: none !important;"':"",a=e.videoHeightShow?"":' style="display: none !important;"',r=e.videoRatioShow?"":' style="display: none !important;"',c=o||e.videoHeightShow||e.videoRatioShow?"":' style="display: none !important;"';n+='
    "}return n+='
    ",i.innerHTML=n,i},setVideoRatio:function(e){const t=this.context.video,i=e.target.options[e.target.selectedIndex].value;t._defaultSizeY=t._videoRatio=i?100*i+"%":t._defaultSizeY,t.inputY.placeholder=i?100*i+"%":"",t.inputY.value=""},setInputSize:function(e,t){if(t&&32===t.keyCode)return void t.preventDefault();const i=this.context.video;this.plugins.resizing._module_setInputSize.call(this,i,e),"y"===e&&this.plugins.video.setVideoRatioSelect.call(this,t.target.value||i._videoRatio)},setRatio:function(){this.plugins.resizing._module_setRatio.call(this,this.context.video)},_onload_video:function(e){this.plugins.video.setVideosInfo.call(this,e)},submitAction:function(){if(0===this.context.video.focusElement.value.trim().length)return!1;this.context.resizing._resize_plugin="video";const e=this.context.video;let t=null,i=null,n=null,l=e.focusElement.value.trim();if(e._align=e.modal.querySelector('input[name="suneditor_video_radio"]:checked').value,/^$/.test(l))t=(new this._w.DOMParser).parseFromString(l,"text/html").querySelector("iframe");else{if(t=this.util.createElement("IFRAME"),/youtu\.?be/.test(l)&&(/^http/.test(l)||(l="https://"+l),l=l.replace("watch?v=",""),/^\/\/.+\/embed\//.test(l)||(l=l.replace(l.match(/\/\/.+\//)[0],"//www.youtube.com/embed/").replace("&","?&")),e._youtubeQuery.length>0))if(/\?/.test(l)){const t=l.split("?");l=t[0]+"?"+e._youtubeQuery+"&"+t[1]}else l+="?"+e._youtubeQuery;t.src=l}this.context.dialog.updateModal?(e._element.src!==t.src&&(e._element.src=t.src),n=e._container,i=this.util.getParentElement(e._element,"FIGURE"),t=e._element):(t.frameBorder="0",t.allowFullscreen=!0,t.addEventListener("load",this.plugins.video._onload_video.bind(this,t)),e._element=t,i=this.plugins.resizing.set_cover.call(this,t),n=this.plugins.resizing.set_container.call(this,i,"se-video-container"),this._variable._videosCnt++),e._cover=i,e._container=n;const o=this.plugins.resizing._module_getSizeX.call(this,e)!==(e.inputX.value||e._defaultSizeX)||this.plugins.resizing._module_getSizeY.call(this,e)!==(e.inputY.value||e._videoRatio),s=!this.context.dialog.updateModal||o;e._resizing&&(this.context.video._proportionChecked=e.proportion.checked,t.setAttribute("data-proportion",e._proportionChecked));let a=!1;s&&(a=this.plugins.video.applySize.call(this)),a&&"center"===e._align||this.plugins.video.setAlign.call(this,null,t,i,n),this.context.dialog.updateModal?e._resizing&&this.context.resizing._rotateVertical&&s&&this.plugins.resizing.setTransformSize.call(this,t,null,null):this.insertComponent(n,!1),this.context.resizing._resize_plugin="",this.context.dialog.updateModal&&this.history.push(!1)},setVideosInfo:function(e){if(!e.getAttribute("data-origin")){const t=this.util.getParentElement(e,this.util.isComponent),i=this.util.getParentElement(e,"FIGURE"),n=this.plugins.resizing._module_getSizeX.call(this,this.context.video,e,i,t),l=this.plugins.resizing._module_getSizeY.call(this,this.context.video,e,i,t);e.setAttribute("data-origin",n+","+l),e.setAttribute("data-size",n+","+l)}},submit:function(e){this.showLoading(),e.preventDefault(),e.stopPropagation();try{this.plugins.video.submitAction.call(this)}finally{this.plugins.dialog.close.call(this),this.closeLoading()}return this.focus(),!1},_update_videoCover:function(e){const t=this.context.video;e.frameBorder="0",e.allowFullscreen=!0,e.onload=e.addEventListener("load",this.plugins.video._onload_video.bind(this,e));const i=this.util.getParentElement(e,this.util.isComponent)||this.util.getParentElement(e,function(e){return this.isWysiwygDiv(e.parentNode)}.bind(this.util));t._element=e=e.cloneNode(!1);const n=t._cover=this.plugins.resizing.set_cover.call(this,e),l=t._container=this.plugins.resizing.set_container.call(this,n,"se-video-container"),o=i.getElementsByTagName("FIGCAPTION")[0];let s=null;o&&(s=this.util.createElement("DIV"),s.innerHTML=o.innerHTML,this.util.removeItem(o));const a=(e.getAttribute("data-size")||e.getAttribute("data-origin")||"").split(",");this.plugins.video.applySize.call(this,a[0]||this.context.option.videoWidth,a[1]||""),i.parentNode.insertBefore(l,i),s&&i.parentNode.insertBefore(s,i),this.util.removeItem(i)},onModifyMode:function(e,t){const i=this.context.video;i._element=e,i._cover=this.util.getParentElement(e,"FIGURE"),i._container=this.util.getParentElement(e,this.util.isComponent),i._align=e.getAttribute("data-align")||"none",i._element_w=t.w,i._element_h=t.h,i._element_t=t.t,i._element_l=t.l;let n=i._element.getAttribute("data-size")||i._element.getAttribute("data-origin");n?(n=n.split(","),i._origin_w=n[0],i._origin_h=n[1]):(i._origin_w=t.w,i._origin_h=t.h)},openModify:function(e){const t=this.context.video;if(t.focusElement.value=t._element.src,t.modal.querySelector('input[name="suneditor_video_radio"][value="'+t._align+'"]').checked=!0,t._resizing){this.plugins.resizing._module_setModifyInputSize.call(this,t,this.plugins.video);const e=t._videoRatio=this.plugins.resizing._module_getSizeY.call(this,t);this.plugins.video.setVideoRatioSelect.call(this,e)||(t.inputY.value=t._onlyPercentage?this.util.getNumber(e,2):e)}e||this.plugins.dialog.open.call(this,"video",!0)},on:function(e){if(!e){const e=this.context.video;e.inputX.value=e._origin_w=this.context.option.videoWidth===e._defaultSizeX?"":this.context.option.videoWidth,e.inputY.value=e._origin_h="",e.proportion.disabled=!0}},setVideoRatioSelect:function(e){let t=!1;const i=this.context.video,n=i.videoRatioOption.options;/%$/.test(e)||i._onlyPercentage?e=this.util.getNumber(e,2)/100+"":(!this.util.isNumber(e)||1*e>=1)&&(e=""),i.inputY.placeholder="";for(let l=0,o=n.length;l0||!i.style.width)&&t._update_videoCover.call(this,i);this.context.resizing._resize_plugin=""},sizeRevert:function(){this.plugins.resizing._module_sizeRevert.call(this,this.context.video)},applySize:function(e,t){const i=this.context.video;return e||(e=i.inputX.value),t||(t=i.inputY.value),i._onlyPercentage||/%$/.test(e)||!e?(this.plugins.video.setPercentSize.call(this,e||"100%",t||i._videoRatio),!0):(e&&"auto"!==e||t&&"auto"!==t?this.plugins.video.setSize.call(this,e,t||i._defaultRatio,!1):this.plugins.video.setAutoSize.call(this),!1)},setSize:function(e,t,i){const n=this.context.video;e=this.util.getNumber(e,0),t=this.util.isNumber(t)?t+n.sizeUnit:t||"",n._element.style.width=e?e+n.sizeUnit:"",n._cover.style.paddingBottom=n._cover.style.height=t,/%$/.test(t)?n._element.style.height="":n._element.style.height=t,i||n._element.removeAttribute("data-percentage"),this.plugins.resizing._module_saveCurrentSize.call(this,n)},setAutoSize:function(){this.plugins.video.setPercentSize.call(this,100,this.context.video._defaultRatio)},setOriginSize:function(e){const t=this.context.video;t._element.removeAttribute("data-percentage"),this.plugins.resizing.resetTransform.call(this,t._element),this.plugins.video.cancelPercentAttr.call(this);const i=((e?t._element.getAttribute("data-size"):"")||t._element.getAttribute("data-origin")||"").split(",");if(i){const e=i[0],n=i[1];t._onlyPercentage||/%$/.test(e)&&(/%$/.test(n)||!/\d/.test(n))?this.plugins.video.setPercentSize.call(this,e,n):this.plugins.video.setSize.call(this,e,n),this.plugins.resizing._module_saveCurrentSize.call(this,t)}},setPercentSize:function(e,t){const i=this.context.video;t=!t||/%$/.test(t)||this.util.getNumber(t,0)?this.util.isNumber(t)?t+i.sizeUnit:t||i._videoRatio:this.util.isNumber(t)?t+"%":t,i._container.style.width=this.util.isNumber(e)?e+"%":e,i._container.style.height="",i._cover.style.width="100%",i._cover.style.height=t,i._cover.style.paddingBottom=t,i._element.style.width="100%",i._element.style.height="100%",i._element.style.maxWidth="","center"===i._align&&this.plugins.video.setAlign.call(this,null,null,null,null),i._element.setAttribute("data-percentage",e+","+t),this.plugins.resizing._module_saveCurrentSize.call(this,i)},cancelPercentAttr:function(){const e=this.context.video;e._cover.style.width="",e._cover.style.height="",e._cover.style.paddingBottom="",e._container.style.width="",e._container.style.height="",this.util.removeClass(e._container,this.context.video._floatClassRegExp),this.util.addClass(e._container,"__se__float-"+e._align),"center"===e._align&&this.plugins.video.setAlign.call(this,null,null,null,null)},setAlign:function(e,t,i,n){const l=this.context.video;e||(e=l._align),t||(t=l._element),i||(i=l._cover),n||(n=l._container),i.style.margin=e&&"none"!==e?"auto":"0",/%$/.test(t.style.width)&&"center"===e?(n.style.minWidth="100%",i.style.width=n.style.width,i.style.height=i.style.paddingBottom,i.style.paddingBottom=this.util.getNumber(this.util.getNumber(i.style.paddingBottom,2)/100*this.util.getNumber(i.style.width,2),2)+"%"):(n.style.minWidth="",i.style.width=this.context.resizing._rotateVertical?t.style.height||t.offsetHeight:t.style.width||"100%",i.style.paddingBottom=i.style.height),this.util.hasClass(n,"__se__float-"+e)||(this.util.removeClass(n,l._floatClassRegExp),this.util.addClass(n,"__se__float-"+e),t.setAttribute("data-align",e))},resetAlign:function(){const e=this.context.video;e._element.setAttribute("data-align",""),e._align="none",e._cover.style.margin="0",this.util.removeClass(e._container,e._floatClassRegExp)},destroy:function(){this._variable._videosCnt--;const e=this.context.video._container;let t=e.previousElementSibling||e.nextElementSibling;this.util.removeItem(e),this.plugins.video.init.call(this),this.controllersOff(),this.focusEdge(t),this.history.push(!1)},init:function(){const e=this.context.video;e.focusElement.value="",e._origin_w=this.context.option.videoWidth,e._origin_h="",e.modal.querySelector('input[name="suneditor_video_radio"][value="none"]').checked=!0,e._resizing&&(e.inputX.value=this.context.option.videoWidth===e._defaultSizeX?"":this.context.option.videoWidth,e.inputY.value="",e.proportion.checked=!0,e.proportion.disabled=!0,this.plugins.video.setVideoRatioSelect.call(this,e._defaultRatio))}}},r=i("P6u4"),c=i.n(r);const d={_d:document,_w:window,_tagConvertor:function(e){const t={b:"strong",i:"em",var:"em",u:"ins",strike:"del",s:"del"};return e.replace(/(<\/?)(b|strong|var|i|em|u|ins|s|strike|del)\b\s*(?:[^>^<]+)?\s*(?=>)/gi,(function(e,i,n){return i+("string"==typeof t[n]?t[n]:n)}))},_HTMLConvertor:function(e){const t={"&":"&"," ":" ","'":""","<":"<",">":">"};return e.replace(/&|\u00A0|'|<|>/g,(function(e){return"string"==typeof t[e]?t[e]:e}))},zeroWidthSpace:"​",zeroWidthRegExp:new RegExp(String.fromCharCode(8203),"g"),onlyZeroWidthRegExp:new RegExp("^"+String.fromCharCode(8203)+"+$"),onlyZeroWidthSpace:function(e){return"string"!=typeof e&&(e=e.textContent),""===e||this.onlyZeroWidthRegExp.test(e)},getXMLHttpRequest:function(){if(!this._w.ActiveXObject)return this._w.XMLHttpRequest?new XMLHttpRequest:null;try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){return null}}},createElement:function(e){return this._d.createElement(e)},createTextNode:function(e){return this._d.createTextNode(e||"")},getIncludePath:function(e,t){let i="";const n=[],l="js"===t?"script":"link",o="js"===t?"src":"href";let s="(?:";for(let t=0,i=e.length;t0?n[0][o]:""),-1===i.indexOf(":/")&&"//"!==i.slice(0,2)&&(i=0===i.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+i:location.href.match(/^[^\?]*\/(?:)/)[0]+i),!i)throw"[SUNEDITOR.util.getIncludePath.fail] The SUNEDITOR installation path could not be automatically detected. (name: +"+name+", extension: "+t+")";return i},getPageStyle:function(e){let t="";const i=(e?this.getIframeDocument(e):this._d).styleSheets;for(let e,n=0,l=i.length;n-1||(n+=i[e].name+'="'+i[e].value+'" ');return n},convertContentsForEditor:function(e){let t="",i=this._d.createRange().createContextualFragment(e).childNodes;for(let e,n=0,l=i.length;n0&&(t+="

    "+n+"

    ")}else t+=e.replace(/(?!>)\s+?(?=<)/g,"");return 0===t.length&&(t="

    "+((e=this._HTMLConvertor(e)).length>0?e:"
    ")+"

    "),this._tagConvertor(t.replace(this._deleteExclusionTags,""))},convertHTMLForCodeView:function(e,t){let i="";const n=this._w.RegExp,l=new n("^(BLOCKQUOTE|PRE|TABLE|THEAD|TBODY|TR|TH|TD|OL|UL|IMG|IFRAME|VIDEO|AUDIO|FIGURE|FIGCAPTION|HR|BR)$","i"),o=this.isFormatElement.bind(this),s="string"==typeof e?this._d.createRange().createContextualFragment(e):e,a=this;return t=(t*=1)>0?new this._w.Array(t+1).join(" "):"",function e(s,r,c){const d=s.childNodes,u=l.test(s.nodeName),h=u?r:"";for(let g,p,m,f=0,_=d.length;f<_;f++){if(g=d[f],m=l.test(g.nodeName),p=m?"\n":"",c=!o(g)||u||/^(TH|TD)$/i.test(s.nodeName)?"":"\n",3===g.nodeType){i+=a._HTMLConvertor(/^\n+$/.test(g.data)?"":g.data);continue}if(0===g.childNodes.length){i+=(/^(HR)$/i.test(g.nodeName)?"\n":"")+h+g.outerHTML+p;continue}g.innerHTML=g.innerHTML;const _=g.nodeName.toLowerCase();i+=(c||(u?"":p))+(h||m?r:"")+g.outerHTML.match(n("<"+_+"[^>]*>","i"))[0]+p,e(g,r+t,""),i+=(m?r:"")+""+(c||p||u?"\n":/^(TH|TD)$/i.test(g.nodeName)?"\n":"")}}(s,"","\n"),i.trim()+"\n"},isWysiwygDiv:function(e){return!(!e||1!==e.nodeType||!this.hasClass(e,"se-wrapper-wysiwyg")&&!/^BODY$/i.test(e.nodeName))},isFormatElement:function(e){return!(!e||1!==e.nodeType||!/^(P|DIV|H[1-6]|LI|TH|TD)$/i.test(e.nodeName)||this.isComponent(e)||this.isWysiwygDiv(e))},isRangeFormatElement:function(e){return!(!e||1!==e.nodeType||!/^(BLOCKQUOTE|OL|UL|PRE|FIGCAPTION|TABLE|THEAD|TBODY|TR|TH|TD)$/i.test(e.nodeName)&&"range"!==e.getAttribute("data-format"))},isComponent:function(e){return e&&(/se-component/.test(e.className)||/^(TABLE|HR)$/.test(e.nodeName))},getFormatElement:function(e,t){if(!e)return null;for(t||(t=function(){return!0});e;){if(this.isWysiwygDiv(e))return null;if(this.isRangeFormatElement(e)&&e.firstElementChild,this.isFormatElement(e)&&t(e))return e;e=e.parentNode}return null},getRangeFormatElement:function(e,t){if(!e)return null;for(t||(t=function(){return!0});e;){if(this.isWysiwygDiv(e))return null;if(this.isRangeFormatElement(e)&&!/^(THEAD|TBODY|TR)$/i.test(e.nodeName)&&t(e))return e;e=e.parentNode}return null},copyTagAttributes:function(e,t){t.style.cssText&&(e.style.cssText+=t.style.cssText);const i=t.classList;for(let t=0,n=i.length;t0&&!this.isBreak(e);)e=e.firstChild;for(;t&&1===t.nodeType&&t.childNodes.length>0&&!this.isBreak(t);)t=t.lastChild;return{sc:e,ec:t||e}}},getOffset:function(e,t){let i=0,n=0,l=3===e.nodeType?e.parentElement:e;const o=this.getParentElement(e,this.isWysiwygDiv.bind(this));for(;l&&!this.hasClass(l,"se-container")&&l!==o;)i+=l.offsetLeft,n+=l.offsetTop,l=l.offsetParent;const s=t&&/iframe/i.test(t.nodeName);return{left:i+(s?t.parentElement.offsetLeft:0),top:n-o.scrollTop+(s?t.parentElement.offsetTop:0)}},getOverlapRangeAtIndex:function(e,t,i,n){if(e<=n?ti)return 0;const l=(e>i?e:i)-(t0?" ":"")+t)},removeClass:function(e,t){if(!e)return;const i=new this._w.RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(i," ").trim()},toggleClass:function(e,t){if(!e)return;const i=new this._w.RegExp("(\\s|^)"+t+"(\\s|$)");i.test(e.className)?e.className=e.className.replace(i," ").trim():e.className+=" "+t},removeItem:function(e){if(e)try{e.remove()}catch(t){e.parentNode.removeChild(e)}},removeItemAllParents:function(e,t){if(!e)return null;let i=null;return t||(t=function(e){const t=e.textContent.trim();return 0===t.length||/^(\n|\u200B)+$/.test(t)}),function e(n){if(!d.isWysiwygDiv(n)){const l=n.parentNode;l&&t(n)&&(i={sc:n.previousElementSibling,ec:n.nextElementSibling},d.removeItem(n),e(l))}}(e),i},removeEmptyNode:function(e){const t=this;!function i(n){if(n===e||!t.onlyZeroWidthSpace(n.textContent)||/^BR$/i.test(n.nodeName)||n.firstChild&&/^BR$/i.test(n.firstChild.nodeName)||t.isComponent(n)){const e=n.children;for(let n=0,l=e.length,o=0;n")},isIgnoreNodeChange:function(e){return 3!==e.nodeType&&!/^(span|font|b|strong|var|i|em|u|ins|s|strike|del|sub|sup|mark|a)$/i.test(e.nodeName)},cleanHTML:function(e){const t=new this._w.RegExp("^(meta|script|link|style|[a-z]+:[a-z]+)$","i"),i=this._d.createRange().createContextualFragment(e).childNodes;let n="";for(let e=0,l=i.length;e(\n|.)*<\/([a-zA-Z]+\:[a-zA-Z]+|script|style)>/g,"").replace(/(<[a-zA-Z0-9]+)[^>]*(?=>)/g,(function(e,t){const i=e.match(/((?:contenteditable|colspan|rowspan|target|href|src|class|data-format|data-size|data-file-size|data-file-name|data-origin|data-align|data-image-link|data-rotate|data-proportion|data-percentage|origin-size)\s*=\s*"[^"]*")/gi);if(i)for(let e=0,n=i.length;e^<]*)>/g,"").replace(this._deleteExclusionTags,""),this._tagConvertor(n||e)},_deleteExclusionTags:function(){const e="br|p|div|pre|blockquote|h[1-6]|ol|ul|dl|li|hr|figure|figcaption|img|iframe|audio|video|table|thead|tbody|tr|th|td|a|b|strong|var|i|em|u|ins|s|span|strike|del|sub|sup|mark".split("|");let t="<\\/?(";for(let i=0,n=e.length;i'}return i}()+("auto"===e.height?"":"");o.allowFullscreen=!0,o.frameBorder=0,o.addEventListener("load",(function(){this.setAttribute("scrolling","auto"),this.contentDocument.head.innerHTML=''+t,this.contentDocument.body.className="sun-editor-editable",this.contentDocument.body.setAttribute("contenteditable",!0),this.contentDocument.body.innerHTML=l}))}else o.setAttribute("contenteditable",!0),o.setAttribute("scrolling","auto"),o.className+=" sun-editor-editable",o.innerHTML=l;o.style.height=e.height,o.style.minHeight=e.minHeight,o.style.maxHeight=e.maxHeight;const s=document.createElement("TEXTAREA");s.className="se-wrapper-inner se-wrapper-code",s.style.display="none",s.style.height=e.height,s.style.minHeight=e.minHeight,s.style.maxHeight=e.maxHeight,"auto"===e.height&&(s.style.overflow="hidden");let a=null,r=null,c=null;if(e.resizingBar&&(a=document.createElement("DIV"),a.className="se-resizing-bar sun-editor-common",r=document.createElement("DIV"),r.className="se-navigation sun-editor-common",a.appendChild(r),e.charCounter)){const t=document.createElement("DIV");if(t.className="se-char-counter-wrapper",c=document.createElement("SPAN"),c.className="se-char-counter",c.textContent="0",t.appendChild(c),e.maxCharCount>0){const i=document.createElement("SPAN");i.textContent=" / "+e.maxCharCount,t.appendChild(i)}a.appendChild(t)}let d=null;return e.placeholder&&(d=document.createElement("SPAN"),d.className="se-placeholder",d.innerText=e.placeholder),{bottomBar:{resizingBar:a,navigation:r,charCounter:c},wysiwygFrame:o,codeView:s,placeholder:d}},_initOptions:function(e,t){t.lang=t.lang||c.a,t.mode=t.mode||"classic",t.toolbarWidth=t.toolbarWidth?u.isNumber(t.toolbarWidth)?t.toolbarWidth+"px":t.toolbarWidth:"auto",t.stickyToolbar=/balloon/i.test(t.mode)?-1:void 0===t.stickyToolbar?0:/^\d+/.test(t.stickyToolbar)?u.getNumber(t.stickyToolbar,0):-1,t.iframe=t.fullPage||t.iframe,t.iframeCSSFileName=t.iframe?"string"==typeof t.iframeCSSFileName?[t.iframeCSSFileName]:t.iframeCSSFileName||["suneditor"]:null,t.codeMirror=t.codeMirror?t.codeMirror.src?t.codeMirror:{src:t.codeMirror}:null,t.display=t.display||("none"!==e.style.display&&e.style.display?e.style.display:"block"),t.popupDisplay=t.popupDisplay||"full",t.resizingBar=void 0===t.resizingBar?!/inline|balloon/i.test(t.mode):t.resizingBar,t.showPathLabel=!!t.resizingBar&&("boolean"!=typeof t.showPathLabel||t.showPathLabel),t.charCounter=t.maxCharCount>0||"boolean"==typeof t.charCounter&&t.charCounter,t.maxCharCount=u.isNumber(t.maxCharCount)&&t.maxCharCount>-1?1*t.maxCharCount:null,t.width=t.width?u.isNumber(t.width)?t.width+"px":t.width:e.clientWidth?e.clientWidth+"px":"100%",t.minWidth=(u.isNumber(t.minWidth)?t.minWidth+"px":t.minWidth)||"",t.maxWidth=(u.isNumber(t.maxWidth)?t.maxWidth+"px":t.maxWidth)||"",t.height=t.height?u.isNumber(t.height)?t.height+"px":t.height:e.clientHeight?e.clientHeight+"px":"auto",t.minHeight=(u.isNumber(t.minHeight)?t.minHeight+"px":t.minHeight)||"",t.maxHeight=(u.isNumber(t.maxHeight)?t.maxHeight+"px":t.maxHeight)||"",t.font=t.font?t.font:null,t.fontSize=t.fontSize?t.fontSize:null,t.formats=t.formats?t.formats:null,t.colorList=t.colorList?t.colorList:null,t.lineHeights=t.lineHeights?t.lineHeights:null,t.paragraphStyles=t.paragraphStyles?t.paragraphStyles:null,t.textStyles=t.textStyles?t.textStyles:null,t.fontSizeUnit="string"==typeof t.fontSizeUnit&&t.fontSizeUnit.trim()||"px",t.imageResizing=void 0===t.imageResizing||t.imageResizing,t.imageHeightShow=void 0===t.imageHeightShow||!!t.imageHeightShow,t.imageWidth=t.imageWidth?u.isNumber(t.imageWidth)?t.imageWidth+"px":t.imageWidth:"auto",t.imageSizeOnlyPercentage=!!t.imageSizeOnlyPercentage,t._imageSizeUnit=t.imageSizeOnlyPercentage?"%":"px",t.imageRotation=void 0!==t.imageRotation?t.imageRotation:!(t.imageSizeOnlyPercentage||!t.imageHeightShow),t.imageFileInput=void 0===t.imageFileInput||t.imageFileInput,t.imageUrlInput=void 0===t.imageUrlInput||!t.imageFileInput||t.imageUrlInput,t.imageUploadHeader=t.imageUploadHeader||null,t.imageUploadUrl=t.imageUploadUrl||null,t.imageUploadSizeLimit=/\d+/.test(t.imageUploadSizeLimit)?u.getNumber(t.imageUploadSizeLimit,0):null,t.videoResizing=void 0===t.videoResizing||t.videoResizing,t.videoHeightShow=void 0===t.videoHeightShow||!!t.videoHeightShow,t.videoRatioShow=void 0===t.videoRatioShow||!!t.videoRatioShow,t.videoWidth=t.videoWidth&&u.getNumber(t.videoWidth)?u.isNumber(t.videoWidth)?t.videoWidth+"px":t.videoWidth:"100%",t.videoSizeOnlyPercentage=!!t.videoSizeOnlyPercentage,t._videoSizeUnit=t.videoSizeOnlyPercentage?"%":"px",t.videoRotation=void 0!==t.videoRotation?t.videoRotation:!(t.videoSizeOnlyPercentage||!t.videoHeightShow),t.videoRatio=u.getNumber(t.videoRatio,4)||.5625,t.videoRatioList=t.videoRatioList?t.videoRatioList:null,t.youtubeQuery=(t.youtubeQuery||"").replace("?",""),t.callBackSave=t.callBackSave?t.callBackSave:null,t.templates=t.templates?t.templates:null,t.placeholder="string"==typeof t.placeholder?t.placeholder:null,t.buttonList=t.buttonList||[["undo","redo"],["bold","underline","italic","strike","subscript","superscript"],["removeFormat"],["outdent","indent"],["fullScreen","showBlocks","codeView"],["preview","print"]]},_defaultButtons:function(e){return{bold:["_se_command_bold",e.toolbar.bold+" (CTRL+B)","STRONG","",''],underline:["_se_command_underline",e.toolbar.underline+" (CTRL+U)","INS","",''],italic:["_se_command_italic",e.toolbar.italic+" (CTRL+I)","EM","",''],strike:["_se_command_strike",e.toolbar.strike+" (CTRL+SHIFT+S)","DEL","",''],subscript:["_se_command_subscript",e.toolbar.subscript,"SUB","",''],superscript:["_se_command_superscript",e.toolbar.superscript,"SUP","",''],removeFormat:["",e.toolbar.removeFormat,"removeFormat","",''],indent:["",e.toolbar.indent+" (CTRL+])","indent","",''],outdent:["_se_command_outdent",e.toolbar.outdent+" (CTRL+[)","outdent","",'',!0],fullScreen:["code-view-enabled",e.toolbar.fullScreen,"fullScreen","",''],showBlocks:["",e.toolbar.showBlocks,"showBlocks","",''],codeView:["code-view-enabled",e.toolbar.codeView,"codeView","",''],undo:["_se_command_undo",e.toolbar.undo+" (CTRL+Z)","undo","",'',!0],redo:["_se_command_redo",e.toolbar.redo+" (CTRL+Y / CTRL+SHIFT+Z)","redo","",'',!0],preview:["",e.toolbar.preview,"preview","",''],print:["",e.toolbar.print,"print","",''],save:["_se_command_save",e.toolbar.save,"save","",'',!0],font:["se-btn-select se-btn-tool-font _se_command_font_family",e.toolbar.font,"font","submenu",''+e.toolbar.font+''],formatBlock:["se-btn-select se-btn-tool-format",e.toolbar.formats,"formatBlock","submenu",''+e.toolbar.formats+''],fontSize:["se-btn-select se-btn-tool-size",e.toolbar.fontSize,"fontSize","submenu",''+e.toolbar.fontSize+''],fontColor:["",e.toolbar.fontColor,"fontColor","submenu",''],hiliteColor:["",e.toolbar.hiliteColor,"hiliteColor","submenu",''],align:["se-btn-align",e.toolbar.align,"align","submenu",''],list:["_se_command_list",e.toolbar.list,"list","submenu",''],horizontalRule:["btn_line",e.toolbar.horizontalRule,"horizontalRule","submenu",''],table:["",e.toolbar.table,"table","submenu",''],lineHeight:["",e.toolbar.lineHeight,"lineHeight","submenu",''],template:["",e.toolbar.template,"template","submenu",''],paragraphStyle:["",e.toolbar.paragraphStyle,"paragraphStyle","submenu",''],textStyle:["",e.toolbar.textStyle,"textStyle","submenu",''],link:["",e.toolbar.link,"link","dialog",''],image:["",e.toolbar.image,"image","dialog",''],video:["",e.toolbar.video,"video","dialog",'']}},_createModuleGroup:function(e){const t=u.createElement("DIV");t.className="se-btn-module"+(e?"":" se-btn-module-border");const i=u.createElement("UL");return i.className="se-menu-list",t.appendChild(i),{div:t,ul:i}},_createButton:function(e,t,i,n,l,o){const s=u.createElement("LI"),a=u.createElement("BUTTON");return a.setAttribute("type","button"),a.setAttribute("class","se-btn"+(e?" "+e:"")+" se-tooltip"),a.setAttribute("data-command",i),a.setAttribute("data-display",n),l+=''+t+"",o&&a.setAttribute("disabled",!0),a.innerHTML=l,s.appendChild(a),{li:s,button:a}},_createToolBar:function(e,t,i,n){const l=e.createElement("DIV");l.className="se-toolbar-separator-vertical";const o=e.createElement("DIV");o.className="se-toolbar sun-editor-common";const s=this._defaultButtons(n),a={},r={};if(i){const e=i.length?i:Object.keys(i).map((function(e){return i[e]}));for(let t,i=0,n=e.length;i0){for(let e=0;e":i),this.history.push(!0)},focus:function(){if("none"!==e.element.wysiwygFrame.style.display){try{const e=this.getRange();this.setRange(e.startContainer,e.startOffset)}catch(t){const i=r.getParentElement(this.getSelectionNode(),"figcaption");i?i.focus():e.element.wysiwyg.focus(),this._editorRange()}d._findButtonEffectTag()}},focusEdge:function(e){if(r.isComponent(e)){const t=e.querySelector("IMG"),i=e.querySelector("IFRAME");t?this.selectComponent(t,"image"):i&&this.selectComponent(i,"video")}else e=r.getChildElement(e,(function(e){return 0===e.childNodes.length||3===e.nodeType}),!0),this.setRange(e,e.textContent.length,e,e.textContent.length)},setRange:function(e,t,i,n){if(!e||!i)return;t>e.textContent.length&&(t=e.textContent.length),n>i.textContent.length&&(n=i.textContent.length);const l=this._wd.createRange();l.setStart(e,t),l.setEnd(i,n);const o=this.getSelection();o.removeAllRanges&&o.removeAllRanges(),o.addRange(l),this._editorRange()},removeRange:function(){this.getSelection().removeAllRanges();const e=this.commandMap;r.changeTxt(e.FORMAT,n.toolbar.formats),r.changeTxt(e.FONT,n.toolbar.font),r.changeTxt(e.FONT_TOOLTIP,n.toolbar.font),r.changeTxt(e.SIZE,n.toolbar.fontSize),r.removeClass(e.LI_ICON,"se-icon-list-bullets"),r.addClass(e.LI_ICON,"se-icon-list-number"),r.removeClass(e.LI,"active"),r.removeClass(e.STRONG,"active"),r.removeClass(e.INS,"active"),r.removeClass(e.EM,"active"),r.removeClass(e.DEL,"active"),r.removeClass(e.SUB,"active"),r.removeClass(e.SUP,"active"),e.OUTDENT&&e.OUTDENT.setAttribute("disabled",!0),e.LI&&e.LI.removeAttribute("data-focus"),e.ALIGN&&(e.ALIGN.className="se-icon-align-left",e.ALIGN.removeAttribute("data-focus"))},getRange:function(){return this._variable._range||this._createDefaultRange()},getSelection:function(){return this._ww.getSelection()},getSelectionNode:function(){return this._variable._selectionNode&&!r.isWysiwygDiv(this._variable._selectionNode)||this._editorRange(),this._variable._selectionNode||e.element.wysiwyg.firstChild},_editorRange:function(){const e=this.getSelection();let t=null,i=null;t=e.rangeCount>0?e.getRangeAt(0):this._createDefaultRange(),this._variable._range=t,i=t.collapsed?t.commonAncestorContainer:e.extentNode||e.anchorNode,this._variable._selectionNode=i},_createDefaultRange:function(){const t=this._wd.createRange();return e.element.wysiwyg.firstChild||this.execCommand("formatBlock",!1,"P"),t.setStart(e.element.wysiwyg.firstChild,0),t.setEnd(e.element.wysiwyg.firstChild,0),t},getSelectedElements:function(t){let i=this.getRange();if(r.isWysiwygDiv(i.startContainer)){const t=e.element.wysiwyg.children;if(0===t.length)return null;this.setRange(t[0],0,t[t.length-1],t[t.length-1].textContent.trim().length),i=this.getRange()}const n=i.startContainer,l=i.endContainer,o=i.commonAncestorContainer,s=r.getListChildren(o,(function(e){return t?t(e):r.isFormatElement(e)}));if(r.isWysiwygDiv(o)||r.isRangeFormatElement(o)||s.unshift(r.getFormatElement(o)),n===l||1===s.length)return s;let a=r.getFormatElement(n),c=r.getFormatElement(l),d=null,u=null;const h=function(e){return!r.isTable(e)||/^TABLE$/i.test(e.nodeName)},g=r.getRangeFormatElement(a,h),p=r.getRangeFormatElement(c,h),m=g===p;for(let e,t=0,i=s.length;t=0;e--)c[e]===n.parentNode&&c[e].firstChild===n&&0===i&&(d=e,n=n.parentNode);for(let e=u-1,t=n;e>d;e--)c[e]===t.parentNode&&1===c[e].nodeType&&(c.splice(e,1),t=t.parentNode,--u);for(let e=d;e<=u;e++){const o=c[e];0===o.length||3===o.nodeType&&void 0===o.data?r.removeItem(o):o!==t?o!==n?(r.removeItem(o),this.history.push(!1)):(a=1===n.nodeType?r.createTextNode(n.textContent):r.createTextNode(n.substringData(l,n.length-l)),a.length>0?n.data=a.data:r.removeItem(n)):(s=1===t.nodeType?r.createTextNode(t.textContent):r.createTextNode(t.substringData(0,i)),s.length>0?t.data=s.data:r.removeItem(t))}},applyRangeFormatElement:function(e){const t=this.getSelectedElementsAndComponents();if(!t||0===t.length)return;let i,n,l,o=t[t.length-1];i=r.isRangeFormatElement(o)||r.isFormatElement(o)?o:r.getRangeFormatElement(o)||r.getFormatElement(o),r.isCell(i)?(n=null,l=i):(n=i.nextSibling,l=i.parentNode);let s=r.getElementDepth(i),a=null;const c=[],d=function(e,t,i){let n=null;return e===t||r.isTable(t)||(n=r.removeItemAllParents(t)),n?n.ec:i};for(let i,o,u,h,g=0,p=t.length;g=u?(s=u,l=t.cc,n=d(l,o,t.ec),n&&(l=n.parentNode)):l===t.cc&&(n=t.ec),l!==t.cc&&(h=d(l,t.cc),void 0!==h&&(n=h)),e.appendChild(a),a=null}}else s>=u&&(s=u,l=o,n=i.nextSibling),e.appendChild(i),l!==o&&(h=d(l,o),void 0!==h&&(n=h));l.insertBefore(e,n),d(e,n),this.history.push(!1);const u=r.getEdgeChildNodes(e.firstElementChild,e.lastElementChild);t.length>1?this.setRange(u.sc,0,u.ec,u.ec.textContent.length):this.setRange(u.ec,u.ec.textContent.length,u.ec,u.ec.textContent.length)},detachRangeFormatElement:function(e,t,i,n,l){const o=this.getRange(),s=o.startOffset,a=o.endOffset,c=e.childNodes,u=e.parentNode;let h=null,g=null,p=e.cloneNode(!1);const m=r.isList(i);let f=!1;function _(e,t,i){if(r.onlyZeroWidthSpace(t)&&(t.innerHTML=r.zeroWidthSpace),3===t.nodeType)return e.insertBefore(t,i),t;const n=t.childNodes;let l=t.cloneNode(!1),o=null,s=null;for(;n[0];)s=n[0],r.isIgnoreNodeChange(s)&&!r.isListCell(l)?(l.childNodes.length>0&&(o||(o=l),e.insertBefore(l,i),l=t.cloneNode(!1)),e.insertBefore(s,i),o||(o=s)):l.appendChild(s);return l.childNodes.length>0&&(e.insertBefore(l,i),o||(o=l)),o}for(let l,o=0,s=c.length;o0&&(u.insertBefore(p,e),p=null),!m&&r.isListCell(l)){const t=l;l=r.isCell(e.parentNode)?r.createElement("DIV"):r.createElement("P"),l.innerHTML=t.innerHTML,r.copyFormatAttributes(l,t)}else l=l.cloneNode(!0);n||(i?(f||(u.insertBefore(i,e),f=!0),l=_(i,l,null)):l=_(u,l,e),t?(g=l,h||(h=l)):h||(h=g=l))}const b=e.parentNode,y=e.nextSibling;p&&p.children.length>0&&b.insertBefore(p,y),r.removeItem(e);const v=n?{cc:b,sc:h,ec:h&&h.parentNode?h.nextSibling:p&&p.children.length>0?p:y||null}:r.getEdgeChildNodes(h,g);if(l)return v;!n&&v&&(t?this.setRange(v.sc,s,v.ec,a):this.setRange(v.sc,0,v.sc,0)),this.history.push(!1),d._findButtonEffectTag()},nodeChange:function(t,i,n,l){const o=this.getRange();i=!!(i&&i.length>0)&&i,n=!!(n&&n.length>0)&&n;const s=!t,c=s&&!n&&!i;let d,u,h,g=o.startContainer,p=o.startOffset,m=o.endContainer,f=o.endOffset;if(c&&o.collapsed&&r.isFormatElement(g.parentNode)&&r.isFormatElement(m.parentNode))return;s&&(t=r.createElement("DIV"));const _=t.nodeName;if(!c&&g===m&&!n&&t){let e=g,i=0;const n=[],l=t.style;for(let e=0,t=l.length;e0){for(;!r.isFormatElement(e)&&!r.isWysiwygDiv(e);){for(let l=0;l=n.length)return}}if(d=r.isWysiwygDiv(g)?e.element.wysiwyg.firstChild:g,u=p,r.isBreak(d)||1===d.nodeType&&d.childNodes.length>0){const e=r.isBreak(d);if(!e){for(;d&&!r.isBreak(d)&&1===d.nodeType;)d=d.childNodes[u]||d.nextElementSibling||d.nextSibling,u=0;let e=r.getFormatElement(d);e===r.getRangeFormatElement(e)&&(e=r.createElement(r.isCell(d)?"DIV":"P"),d.parentNode.insertBefore(e,d),e.appendChild(d))}if(r.isBreak(d)){const t=r.createTextNode(r.zeroWidthSpace);d.parentNode.insertBefore(t,d),d=t,e&&(g===m&&(m=d,f=1),r.removeItem(g))}}if(g=d,p=u,d=r.isWysiwygDiv(m)?e.element.wysiwyg.lastChild:m,u=f,r.isBreak(d)||1===d.nodeType&&d.childNodes.length>0){const e=r.isBreak(d);if(!e){for(;d&&!r.isBreak(d)&&1===d.nodeType;)h=d.childNodes,d=h[u>0?u-1:u]||!/FIGURE/i.test(h[0].nodeName)?h[0]:d.previousElementSibling||d.previousSibling||g,u=u>0?d.textContent.length:u;let e=r.getFormatElement(d);e===r.getRangeFormatElement(e)&&(e=r.createElement(r.isCell(e)?"DIV":"P"),d.parentNode.insertBefore(e,d),e.appendChild(d))}if(r.isBreak(d)){const t=r.createTextNode(r.zeroWidthSpace);d.parentNode.insertBefore(t,d),d=t,u=1,e&&r.removeItem(m)}}m=d,f=u,this.setRange(g,p,m,f);let b,y={},v={},C="",x="",w="";if(i){for(let e,t=0,n=i.length;t0&&(o=n.replace(C,"").trim(),o!==n&&(S.v=!0));const d=t.className;let u="";return x&&d.length>0&&(u=d.replace(x,"").trim(),u!==d&&(S.v=!0)),(!s||!x&&d||!C&&n||o||u||!i)&&(o||u||t.nodeName!==_||a.Boolean(C)!==a.Boolean(n)||a.Boolean(x)!==a.Boolean(d))?(C&&n.length>0&&(t.style.cssText=o),t.style.cssText||t.removeAttribute("style"),x&&d.length>0&&(t.className=u.trim()),t.className.trim()||t.removeAttribute("class"),t.style.cssText||t.className||t.nodeName!==_&&!i?t:(S.v=!0,null)):(S.v=!0,null)},N=this.getSelectedElements();r.getFormatElement(g)||(g=r.getChildElement(N[0],(function(e){return 3===e.nodeType})),p=0),r.getFormatElement(m)||(m=r.getChildElement(N[N.length-1],(function(e){return 3===e.nodeType})),f=m.textContent.length);const k=r.getFormatElement(g)===r.getFormatElement(m),z=N.length-(k?0:1);if(b=t.cloneNode(!1),k){const e=this._nodeChange_oneLine(N[0],b,E,g,p,m,f,c,s,o.collapsed,S);y.container=e.startContainer,y.offset=e.startOffset,v.container=e.endContainer,v.offset=e.endOffset}else y=this._nodeChange_startLine(N[0],b,E,g,p,c,s,S);for(let e=1;e0&&!k?(b=t.cloneNode(!1),v=this._nodeChange_endLine(N[z],b,E,m,f,c,s,S)):k||(v=y),this.setRange(y.container,y.offset,v.container,v.offset),this.history.push(!1)},_stripRemoveNode:function(e,t){if(!t||3===t.nodeType)return;const i=t.childNodes;for(;i[0];)e.insertBefore(i[0],t);e.removeChild(t)},_removeEmptyNode:function(e,t){const i=r.onlyZeroWidthSpace(t.textContent);i&&(t.textContent=" "),r.removeEmptyNode(e),i&&(t.textContent=r.zeroWidthSpace)},_mergeSameTags:function(e,t,i){const n=this,l={a:0,b:0};return function e(o,s){const a=o.childNodes;for(let r,c,d=0,u=a.length;d=d+1&&(t[s]-=1,t[s+1]>=0&&(t[s+1]+=e,u&&(l.a+=r.textContent.length))),i&&i[s]>=d+1&&(i[s]-=1,i[s+1]>=0&&(i[s+1]+=e,u&&(l.b+=r.textContent.length))),3===r.nodeType?r.textContent+=c.textContent:r.innerHTML+=c.innerHTML,n.util.removeItem(c),d--}else 1===r.nodeType&&e(r,s+1)}}(e,0),l},_nodeChange_oneLine:function(e,t,i,n,l,o,s,c,d,u,h){let g=n.parentNode;for(;!(g.nextSibling||g.previousSibling||r.isFormatElement(g.parentNode)||r.isWysiwygDiv(g.parentNode))&&g.nodeName!==t.nodeName;)g=g.parentNode;if(!d&&g===o.parentNode&&g.nodeName===t.nodeName&&r.onlyZeroWidthSpace(n.textContent.slice(0,l))&&r.onlyZeroWidthSpace(o.textContent.slice(s))){const e=g.childNodes;let i=!0;for(let t,l,s,a,c=0,d=e.length;c0&&(i=t.test(e.style.cssText)),!i}if(function e(n,l){const o=n.childNodes;for(let n,s=0,a=o.length;s=S?N-S:w.data.length-S));for(e.data.length>0&&l.appendChild(e),v=a,y=[],x="";v!==_&&v!==p&&null!==v;)n=i(v),n&&1===v.nodeType&&T(v)&&(y.push(n),x+=v.style.cssText.substr(0,v.style.cssText.indexOf(":"))+"|"),v=v.parentNode;const s=y.pop()||o;for(C=v=s;y.length>0;)v=y.pop(),C.appendChild(v),C=v;if(t.appendChild(s),_.appendChild(t),w=o,S=0,k=!0,v!==o&&v.appendChild(w),!b)continue}if(z||a!==E){if(k){if(1===a.nodeType&&!r.isBreak(a)){!u&&r.isIgnoreNodeChange(a)?(t=t.cloneNode(!1),_.appendChild(a),_.appendChild(t),f.push(t),s--):e(a,a);continue}for(v=a,y=[],x="";null!==v.parentNode&&v!==p&&v!==t;)n=z?v.cloneNode(!1):i(v),1===v.nodeType&&!r.isBreak(a)&&n&&T(v)&&(n&&y.push(n),x+=v.style.cssText.substr(0,v.style.cssText.indexOf(":"))+"|"),v=v.parentNode;const o=y.pop()||a;for(C=v=o;y.length>0;)v=y.pop(),C.appendChild(v),C=v;o===a?l=z?_:t:z?(_.appendChild(o),l=v):(t.appendChild(o),l=v)}d=a.cloneNode(!1),l.appendChild(d),1!==a.nodeType||r.isBreak(a)||(h=d),e(a,h)}else{const e=r.createTextNode(1===E.nodeType?"":E.substringData(N,E.length-N)),l=r.createTextNode(b||1===E.nodeType?"":E.substringData(0,N));if(e.data.length>0){for(v=a,x="",y=[];v!==_&&v!==p&&null!==v;)1===v.nodeType&&T(v)&&(y.push(v.cloneNode(!1)),x+=v.style.cssText.substr(0,v.style.cssText.indexOf(":"))+"|"),v=v.parentNode;for(d=C=v=y.pop()||e;y.length>0;)v=y.pop(),C.appendChild(v),C=v;_.appendChild(d),v.textContent=e.data}for(v=a,y=[],x="";v!==_&&v!==p&&null!==v;)n=i(v),n&&1===v.nodeType&&T(v)&&(y.push(n),x+=v.style.cssText.substr(0,v.style.cssText.indexOf(":"))+"|"),v=v.parentNode;const o=y.pop()||l;for(C=v=o;y.length>0;)v=y.pop(),C.appendChild(v),C=v;t.appendChild(o),E=l,N=l.data.length,z=!0,!c&&u&&(t=l,l.textContent=r.zeroWidthSpace),v!==l&&v.appendChild(E)}}}(e,_),d&&!c&&!h.v)return{startContainer:n,startOffset:l,endContainer:o,endOffset:s};if(c=c&&d)for(let e=0;e0){const e=g.pop();for(m=p=e;g.length>0;)p=g.pop(),m.appendChild(p),m=p;t.appendChild(e),l=p}else l=t}if(b||a!==f)n=b?i(a):a.cloneNode(!1),n&&(l.appendChild(n),1!==a.nodeType||r.isBreak(a)||(c=n)),e(a,c);else{const e=r.createTextNode(1===f.nodeType?"":f.substringData(0,_)),o=r.createTextNode(1===f.nodeType?"":f.substringData(_,f.length-_));for(e.data.length>0&&l.appendChild(e),p=l,g=[];p!==h&&null!==p;)n=i(p),1===p.nodeType&&n&&g.push(n),p=p.parentNode;const s=g.pop()||l;for(m=p=s;g.length>0;)p=g.pop(),m.appendChild(p),m=p;s!==l?(t.appendChild(s),l=p):l=t,r.isBreak(a)&&t.appendChild(a.cloneNode(!1)),h.appendChild(t),f=o,_=0,b=!0,l.appendChild(f)}}}(e,h),s&&!o&&!a.v)return{container:n,offset:l};if(o=o&&s)for(let e=0;e0&&c===d)return void(e.innerHTML=i.innerHTML)}o.v=!1;const s=e.cloneNode(!1),a=[t];let c=!0;if(function e(n,l){const o=n.childNodes;for(let n,d=0,u=o.length;d0){const e=g.pop();for(m=p=e;g.length>0;)p=g.pop(),m.appendChild(p),m=p;t.insertBefore(e,t.firstChild),l=p}else l=t}if(b||a!==f)n=b?i(a):a.cloneNode(!1),n&&(l.insertBefore(n,l.firstChild),1!==a.nodeType||r.isBreak(a)||(c=n)),e(a,c);else{const e=r.createTextNode(1===f.nodeType?"":f.substringData(_,f.length-_)),o=r.createTextNode(1===f.nodeType?"":f.substringData(0,_));for(e.data.length>0&&l.insertBefore(e,l.firstChild),p=l,g=[];p!==h&&null!==p;)n=i(p),n&&1===p.nodeType&&g.push(n),p=p.parentNode;const s=g.pop()||l;for(m=p=s;g.length>0;)p=g.pop(),m.appendChild(p),m=p;s!==l?(t.insertBefore(s,t.firstChild),l=p):l=t,r.isBreak(a)&&t.appendChild(a.cloneNode(!1)),h.insertBefore(t,h.firstChild),f=o,_=o.data.length,b=!0,l.insertBefore(f,l.firstChild)}}}(e,h),s&&!o&&!a.v)return{container:n,offset:l};if(o=o&&s)for(let e=0;e0?e.element.code.scrollHeight+"px":"auto"),e.option.codeMirrorEditor&&e.option.codeMirrorEditor.refresh(),this._variable.isCodeView=!0,this._variable.isFullScreen||(this._notHideToolbar=!0,this._isBalloon&&(e.element._arrow.style.display="none",e.element.toolbar.style.left="",this._isInline=!0,this._isBalloon=!1,d._showToolbarInline())),e.element.code.focus()),this._checkPlaceholder()},_setCodeDataToEditor:function(){const t=this._getCodeView();if(e.option.fullPage){const e=(new this._w.DOMParser).parseFromString(t,"text/html"),i=e.head.children;for(let t=0,n=i.length;t0?r.convertContentsForEditor(t):"


    "},_setEditorDataToCodeView:function(){const t=r.convertHTMLForCodeView(e.element.wysiwyg,this._variable.codeIndent);let i="";if(e.option.fullPage){const e=r.getAttributesToString(this._wd.body,null);i="\n\n"+this._wd.head.outerHTML.replace(/>(?!\n)/g,">\n")+"\n"+t+"\n"}else i=t;e.element.code.style.display="block",e.element.wysiwygFrame.style.display="none",this._setCodeView(i)},toggleFullScreen:function(t){const i=e.element.topArea,n=e.element.toolbar,l=e.element.editorArea,s=e.element.wysiwygFrame,c=e.element.code,u=this._variable;u.isFullScreen?(u.isFullScreen=!1,s.style.cssText=u._wysiwygOriginCssText,c.style.cssText=u._codeOriginCssText,n.style.cssText="",l.style.cssText=u._editorAreaOriginCssText,i.style.cssText=u._originCssText,o.body.style.overflow=u._bodyOverflow,e.option.stickyToolbar>-1&&r.removeClass(n,"se-toolbar-sticky"),u._fullScreenAttrs.sticky&&(u._fullScreenAttrs.sticky=!1,e.element._stickyDummy.style.display="block",r.addClass(n,"se-toolbar-sticky")),this._isInline=u._fullScreenAttrs.inline,this._isBalloon=u._fullScreenAttrs.balloon,this._isInline&&d._showToolbarInline(),d.onScroll_window(),r.removeClass(t.firstElementChild,"se-icon-reduction"),r.addClass(t.firstElementChild,"se-icon-expansion")):(u.isFullScreen=!0,u._fullScreenAttrs.inline=this._isInline,u._fullScreenAttrs.balloon=this._isBalloon,(this._isInline||this._isBalloon)&&(this._isInline=!1,this._isBalloon=!1),i.style.position="fixed",i.style.top="0",i.style.left="0",i.style.width="100%",i.style.height="100%",i.style.zIndex="2147483647",""!==e.element._stickyDummy.style.display&&(u._fullScreenAttrs.sticky=!0,e.element._stickyDummy.style.display="none",r.removeClass(n,"se-toolbar-sticky")),u._bodyOverflow=o.body.style.overflow,o.body.style.overflow="hidden",u._editorAreaOriginCssText=l.style.cssText,u._wysiwygOriginCssText=s.style.cssText,u._codeOriginCssText=c.style.cssText,l.style.cssText=n.style.cssText="",s.style.cssText=(s.style.cssText.match(/\s?display(\s+)?:(\s+)?[a-zA-Z]+;/)||[""])[0],c.style.cssText=(c.style.cssText.match(/\s?display(\s+)?:(\s+)?[a-zA-Z]+;/)||[""])[0],n.style.width=s.style.height=c.style.height="100%",n.style.position="relative",n.style.display="block",u.innerHeight_fullScreen=a.innerHeight-n.offsetHeight,l.style.height=u.innerHeight_fullScreen+"px",r.removeClass(t.firstElementChild,"se-icon-expansion"),r.addClass(t.firstElementChild,"se-icon-reduction"),e.option.iframe&&"auto"===e.option.height&&(l.style.overflow="auto",this._iframeAutoHeight()))},print:function(){const t=r.createElement("IFRAME");t.style.display="none",o.body.appendChild(t);const i=r.getIframeDocument(t),n=this.getContents(!0);if(e.option.iframe){const t=r.getIframeDocument(e.element.wysiwygFrame),l=e.option.fullPage?r.getAttributesToString(t.body,["contenteditable"]):'class="sun-editor-editable"';i.write(""+t.head.innerHTML+""+n+"")}else{const e=r.createElement("DIV"),t=r.createElement("STYLE");t.innerHTML=r.getPageStyle(),e.className="sun-editor-editable",e.innerHTML=n,i.head.appendChild(t),i.body.appendChild(e)}try{if(t.focus(),-1!==a.navigator.userAgent.indexOf("MSIE")||o.documentMode||a.StyleMedia)try{t.contentWindow.document.execCommand("print",!1,null)}catch(e){t.contentWindow.print()}else t.contentWindow.print()}catch(e){throw Error("[SUNEDITOR.core.print.fail] error: "+e)}finally{r.removeItem(t)}},preview:function(){const t=this.getContents(!0),i=a.open("","_blank");if(i.mimeType="text/html",e.option.iframe){const n=r.getIframeDocument(e.element.wysiwygFrame),l=e.option.fullPage?r.getAttributesToString(n.body,["contenteditable"]):'class="sun-editor-editable"';i.document.write(""+n.head.innerHTML+""+t+"")}else i.document.write(''+n.toolbar.preview+"'+t+"")},setContents:function(t){const i=r.convertContentsForEditor(t);if(c._variable.isCodeView){const e=r.convertHTMLForCodeView(i,c._variable.codeIndent);c._setCodeView(e)}else e.element.wysiwyg.innerHTML=i,c.history.push(!1)},getContents:function(t){const i=e.element.wysiwyg.innerHTML,n=r.createElement("DIV");n.innerHTML=i;const l=r.getListChildren(n,(function(e){return/FIGCAPTION/i.test(e.nodeName)}));for(let e=0,t=l.length;e"+this._wd.head.outerHTML+""+n.innerHTML+""}return n.innerHTML},addDocEvent:function(t,i,n){o.addEventListener(t,i,n),e.option.iframe&&this._wd.addEventListener(t,i)},removeDocEvent:function(t,i){o.removeEventListener(t,i),e.option.iframe&&this._wd.removeEventListener(t,i)},_charCount:function(t,i){const n=e.element.charCounter;if(!n)return!0;(!t||t<0)&&(t=0);const l=e.option.maxCharCount;if(a.setTimeout((function(){n.textContent=e.element.wysiwyg.textContent.length})),l>0){let o=!1;const s=e.element.wysiwyg.textContent.length;if(s>l){c._editorRange();const e=c.getRange(),t=e.endOffset-1,i=c.getSelectionNode().textContent;c.getSelectionNode().textContent=i.slice(0,e.endOffset-1)+i.slice(e.endOffset,i.length),c.setRange(e.endContainer,t,e.endContainer,t),o=!0}else s+t>l&&(o=!0);if(o)return i&&!r.hasClass(n,"se-blink")&&(r.addClass(n,"se-blink"),a.setTimeout((function(){r.removeClass(n,"se-blink")}),600)),!1}return!0},_checkComponents:function(){this.plugins.image&&(this.initPlugins.image?this.plugins.image.checkImagesInfo.call(this):this.callPlugin("image",this.plugins.image.checkImagesInfo.bind(this))),this.plugins.video&&(this.initPlugins.video?this.plugins.video.checkVideosInfo.call(this):this.callPlugin("video",this.plugins.video.checkVideosInfo.bind(this)))},_setCodeView:function(t){e.option.codeMirrorEditor?e.option.codeMirrorEditor.getDoc().setValue(t):e.element.code.value=t},_getCodeView:function(){return e.option.codeMirrorEditor?e.option.codeMirrorEditor.getDoc().getValue():e.element.code.value},_init:function(){this._ww=e.option.iframe?e.element.wysiwygFrame.contentWindow:a,this._wd=o,a.setTimeout(function(){this._checkComponents(),this._imagesInfoInit=!1,this._imagesInfoReset=!1,this.history.reset(!0),l.iframe&&(this._wd=e.element.wysiwygFrame.contentDocument,e.element.wysiwyg=this._wd.body,"auto"===l.height&&(this._iframeAuto=this._wd.body),this._iframeAutoHeight())}.bind(this)),this.codeViewDisabledButtons=e.element.toolbar.querySelectorAll('.se-toolbar button:not([class~="code-view-enabled"])'),this._isInline=/inline/i.test(e.option.mode),this._isBalloon=/balloon/i.test(e.option.mode),this.commandMap={FORMAT:e.tool.format,FONT:e.tool.font,FONT_TOOLTIP:e.tool.fontTooltip,SIZE:e.tool.fontSize,ALIGN:e.tool.align,LI:e.tool.list,LI_ICON:e.tool.list&&e.tool.list.querySelector("i"),STRONG:e.tool.bold,INS:e.tool.underline,EM:e.tool.italic,DEL:e.tool.strike,SUB:e.tool.subscript,SUP:e.tool.superscript,OUTDENT:e.tool.outdent},this._variable._originCssText=e.element.topArea.style.cssText,this._placeholder=e.element.placeholder,this._checkPlaceholder(),this.history=function(e,t){const i=window,n=e.context.element,l=e.util,o=e.context.tool.undo,s=e.context.tool.redo;let a=null,r=0,c=[];function d(){const i=c[r];n.wysiwyg.innerHTML=i.contents,e.setRange(l.getNodeFromPath(i.s.path,n.wysiwyg),i.s.offset,l.getNodeFromPath(i.e.path,n.wysiwyg),i.e.offset),e.focus(),0===r?(o&&o.setAttribute("disabled",!0),s&&s.removeAttribute("disabled")):r===c.length-1?(o&&o.removeAttribute("disabled"),s&&s.setAttribute("disabled",!0)):(o&&o.removeAttribute("disabled"),s&&s.removeAttribute("disabled")),e._checkComponents(),e._charCount(0,!1),e._resourcesStateChange(),t()}function u(){const i=e.getContents(!0);if(c[r]&&i===c[r].contents)return;r++;const n=e.getRange();c.length>r&&(c=c.slice(0,r),s&&s.setAttribute("disabled",!0)),c[r]={contents:i,s:{path:l.getNodePath(n.startContainer,null),offset:n.startOffset},e:{path:l.getNodePath(n.endContainer,null),offset:n.endOffset}},1===r&&o&&o.removeAttribute("disabled"),e._checkComponents(),e._charCount(0,!1),t()}return{stack:c,push:function(t){i.setTimeout(e._resourcesStateChange),t&&!a||(i.clearTimeout(a),t)?a=i.setTimeout((function(){i.clearTimeout(a),a=null,u()}),500):u()},undo:function(){r>0&&(r--,d())},redo:function(){c.length-1>r&&(r++,d())},go:function(e){r=e<0?c.length-1:e,d()},reset:function(i){o&&o.setAttribute("disabled",!0),s&&s.setAttribute("disabled",!0),e.context.tool.save&&e.context.tool.save.setAttribute("disabled",!0),c.splice(0),r=0,c[r]={contents:e.getContents(!0),s:{path:[0,0],offset:0},e:{path:[0,0],offset:0}},i||t()}}}(this,d._onChange_historyStack)},_resourcesStateChange:function(){c._iframeAutoHeight(),c._checkPlaceholder()},_iframeAutoHeight:function(){this._iframeAuto&&(e.element.wysiwygFrame.style.height=this._iframeAuto.offsetHeight+"px")},_checkPlaceholder:function(){if(this._placeholder){if(this._variable.isCodeView)return void(this._placeholder.style.display="none");const t=e.element.wysiwyg;!r.onlyZeroWidthSpace(t.textContent)||t.querySelector(".se-component, pre, blockquote, hr, li, table, img, iframe, video")||(t.innerText.match(/\n/g)||"").length>1?this._placeholder.style.display="none":this._placeholder.style.display="block"}}},d={_directionKeyKeyCode:new a.RegExp("^(8|13|32|46|3[3-9]|40|46)$"),_historyIgnoreKeycode:new a.RegExp("^(13|1[6-7]|20|27|3[3-9]|40|45|11[2-9]|12[0-3]|144|145)$"),_onButtonsCheck:new a.RegExp("^(STRONG|INS|EM|DEL|SUB|SUP|LI)$"),_frontZeroWidthReg:new a.RegExp("^"+r.zeroWidthSpace+"+",""),_keyCodeShortcut:{65:"A",66:"B",83:"S",85:"U",73:"I",89:"Y",90:"Z",219:"[",221:"]"},_shortcutCommand:function(e,t){let i=null;switch(d._keyCodeShortcut[e]){case"A":i="selectAll";break;case"B":i="STRONG";break;case"S":t&&(i="DEL");break;case"U":i="INS";break;case"I":i="EM";break;case"Z":i=t?"redo":"undo";break;case"Y":i="redo";break;case"[":i="outdent";break;case"]":i="indent"}return!!i&&(c.commandHandler(c.commandMap[i],i),!0)},_findButtonEffectTag:function(){const t=c.commandMap,i=this._onButtonsCheck,l=[],o=[];let s=!0,a=!0,d=!0,u=!0,h=!0,g=!0,p=!0,m="";for(let f=c.getSelectionNode();!r.isWysiwygDiv(f)&&f;f=f.parentNode)if(1===f.nodeType&&!r.isBreak(f))if(m=f.nodeName.toUpperCase(),o.push(m),r.isFormatElement(f)){s&&t.FORMAT&&(l.push("FORMAT"),r.changeTxt(t.FORMAT,m),t.FORMAT.setAttribute("data-focus",m),s=!1);const e=f.style.textAlign;a&&e&&t.ALIGN&&(l.push("ALIGN"),t.ALIGN.className="se-icon-align-"+e,t.ALIGN.setAttribute("data-focus",e),a=!1),g&&f.style.marginLeft&&r.getNumber(f.style.marginLeft,0)>0&&t.OUTDENT&&(l.push("OUTDENT"),t.OUTDENT.removeAttribute("disabled"),g=!1)}else{if(d&&r.isList(m)&&t.LI&&(l.push("LI"),t.LI.setAttribute("data-focus",m),/UL/i.test(m)?(r.removeClass(t.LI_ICON,"se-icon-list-number"),r.addClass(t.LI_ICON,"se-icon-list-bullets")):(r.removeClass(t.LI_ICON,"se-icon-list-bullets"),r.addClass(t.LI_ICON,"se-icon-list-number")),d=!1),u&&f.style.fontFamily.length>0&&t.FONT){l.push("FONT");const e=(f.style.fontFamily||f.face||n.toolbar.font).replace(/["']/g,"");r.changeTxt(t.FONT,e),r.changeTxt(t.FONT_TOOLTIP,e),u=!1}h&&f.style.fontSize.length>0&&t.SIZE&&(l.push("SIZE"),r.changeTxt(t.SIZE,f.style.fontSize),h=!1),p&&/^A$/.test(m)&&null===f.getAttribute("data-image-link")&&c.plugins.link?(e.link&&c.controllerArray[0]===e.link.linkBtn||c.callPlugin("link",(function(){c.plugins.link.call_controller_linkButton.call(c,f)})),p=!1):p&&e.link&&c.controllerArray[0]===e.link.linkBtn&&c.controllersOff(),i.test(m)&&l.push(m)}for(let e=0;e-1||(t.FONT&&/^FONT$/i.test(e)?(r.changeTxt(t.FONT,n.toolbar.font),r.changeTxt(t.FONT_TOOLTIP,n.toolbar.font)):t.SIZE&&/^SIZE$/i.test(e)?r.changeTxt(t.SIZE,n.toolbar.fontSize):t.ALIGN&&/^ALIGN$/i.test(e)?(t.ALIGN.className="se-icon-align-left",t.ALIGN.removeAttribute("data-focus")):t.OUTDENT&&/^OUTDENT$/i.test(e)?t.OUTDENT.setAttribute("disabled",!0):t.LI&&r.isListCell(e)?(t.LI.removeAttribute("data-focus"),r.removeClass(t.LI_ICON,"se-icon-list-bullets"),r.addClass(t.LI_ICON,"se-icon-list-number"),r.removeClass(t.LI,"active")):r.removeClass(t[e],"active"));c._variable.currentNodes=o.reverse(),e.option.showPathLabel&&(e.element.navigation.textContent=c._variable.currentNodes.join(" > "))},_cancelCaptionEdit:function(){this.setAttribute("contenteditable",!1),this.removeEventListener("blur",d._cancelCaptionEdit)},onMouseDown_toolbar:function(e){let t=e.target;if(r.getParentElement(t,".se-submenu"))e.stopPropagation(),c._notHideToolbar=!0;else{e.preventDefault();let i=t.getAttribute("data-command"),n=t.className;for(;!i&&!/se-menu-list/.test(n)&&!/se-toolbar/.test(n);)t=t.parentNode,i=t.getAttribute("data-command"),n=t.className;i===c._submenuName&&e.stopPropagation()}},onClick_toolbar:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,i=t.getAttribute("data-display"),n=t.getAttribute("data-command"),l=t.className;for(;!n&&!/se-menu-list/.test(l)&&!/se-toolbar/.test(l);)t=t.parentNode,n=t.getAttribute("data-command"),i=t.getAttribute("data-display"),l=t.className;if((n||i)&&!t.disabled){if(c.focus(),i)return!/submenu/.test(i)||null!==t.nextElementSibling&&t===c.submenuActiveButton?/dialog/.test(i)?void c.callPlugin(n,(function(){c.plugins.dialog.open.call(c,n,!1)})):void c.submenuOff():void c.callPlugin(n,(function(){c.submenuOn(t)}));n&&c.commandHandler(t,n)}},onMouseDown_wysiwyg:function(e){c._isBalloon&&d._hideToolbar();const t=r.getParentElement(e.target,r.isCell);if(!t)return;const i=c.plugins.table;t===i._fixedCell||i._shift||c.callPlugin("table",(function(){i.onTableCellMultiSelect.call(c,t,!1)}))},onClick_wysiwyg:function(t){const i=t.target;if("false"===e.element.wysiwyg.getAttribute("contenteditable"))return;if(t.stopPropagation(),/^FIGURE$/i.test(i.nodeName)){const e=i.querySelector("IMG"),n=i.querySelector("IFRAME");if(e)return t.preventDefault(),void c.selectComponent(e,"image");if(n)return t.preventDefault(),void c.selectComponent(n,"video")}const n=r.getParentElement(i,"FIGCAPTION");if(n&&(!n.getAttribute("contenteditable")||"false"===n.getAttribute("contenteditable"))&&(t.preventDefault(),n.setAttribute("contenteditable",!0),n.focus(),c._isInline&&!c._inlineToolbarAttr.isShow)){d._showToolbarInline();const e=function(){d._hideToolbar(),n.removeEventListener("blur",e)};n.addEventListener("blur",e)}c._editorRange();const l=c.getSelectionNode(),o=r.getFormatElement(l),s=r.getRangeFormatElement(l);if(c.getRange().collapsed&&(!o||o===s)&&"false"!==i.getAttribute("contenteditable")){if(r.isList(s)){const e=r.createElement("LI"),t=l.nextElementSibling;e.appendChild(l),s.insertBefore(e,t)}else c.execCommand("formatBlock",!1,r.isRangeFormatElement(s)?"DIV":"P");c.focus()}if(d._findButtonEffectTag(),c._isBalloon){const e=c.getRange();e.collapsed?d._hideToolbar():d._showToolbarBalloon(e)}p.onClick&&p.onClick(t)},_showToolbarBalloon:function(t){if(!c._isBalloon)return;const i=t||c.getRange(),n=e.element.toolbar,l=c.getSelection();let s;if(l.focusNode===l.anchorNode)s=l.focusOffsetn.offsetWidth?n.offsetWidth-u:b"),n.parentNode.insertBefore(o,n),c.callPlugin(g,(function(){const e=c.plugins.resizing.call_controller_resize.call(c,i._element,g);c.plugins[g].onModifyMode.call(c,i._element,e)}))}}if(n&&/16/.test(i)){t.preventDefault(),t.stopPropagation();const e=c.plugins.table;if(e&&!e._shift&&!e._ref){const t=r.getParentElement(m,r.isCell);if(t)return void e.onTableCellMultiSelect.call(c,t,!0)}}const _=!l&&!o&&!d._historyIgnoreKeycode.test(i);if(!c._charCount(1,_)&&_)return t.preventDefault(),t.stopPropagation(),!1;p.onKeyDown&&p.onKeyDown(t)},onKeyUp_wysiwyg:function(e){c._editorRange();const t=e.keyCode,i=e.ctrlKey||e.metaKey||91===t||92===t,n=e.altKey;let l=c.getSelectionNode();if(c._isBalloon&&!c.getRange().collapsed)return void d._showToolbarBalloon();if(8===t&&r.isWysiwygDiv(l)&&""===l.textContent){e.preventDefault(),e.stopPropagation(),l.innerHTML="";const t=r.createElement(r.isFormatElement(c._variable.currentNodes[0])?c._variable.currentNodes[0]:"P");return t.innerHTML="
    ",l.appendChild(t),c.setRange(t,0,t,0),d._findButtonEffectTag(),void c._checkComponents()}const o=r.getFormatElement(l),s=r.getRangeFormatElement(l);o&&o!==s||(c.execCommand("formatBlock",!1,r.isRangeFormatElement(s)?"DIV":"P"),c.focus(),l=c.getSelectionNode()),d._directionKeyKeyCode.test(t)&&d._findButtonEffectTag(),c._checkComponents();const a=!i&&!n&&!d._historyIgnoreKeycode.test(t);if(a&&r.zeroWidthRegExp.test(l.textContent)){const e=c.getRange(),t=e.startOffset,i=e.endOffset,n=(l.textContent.match(d._frontZeroWidthReg)||"").length;l.textContent=l.textContent.replace(r.zeroWidthRegExp,""),c.setRange(l,t-n,l,i-n)}if(!c._charCount(1,a)&&1===e.key.length)return e.preventDefault(),e.stopPropagation(),!1;a&&c.history.push(!0),p.onKeyUp&&p.onKeyUp(e)},onScroll_wysiwyg:function(e){c.controllersOff(),c._isBalloon&&d._hideToolbar(),p.onScroll&&p.onScroll(e)},onMouseDown_resizingBar:function(t){t.stopPropagation(),c._variable.resizeClientY=t.clientY,e.element.resizeBackground.style.display="block",o.addEventListener("mousemove",d._resize_editor),o.addEventListener("mouseup",(function t(){e.element.resizeBackground.style.display="none",o.removeEventListener("mousemove",d._resize_editor),o.removeEventListener("mouseup",t)}))},_resize_editor:function(t){const i=e.element.editorArea.offsetHeight+(t.clientY-c._variable.resizeClientY);e.element.wysiwygFrame.style.height=e.element.code.style.height=(i=i+l?(c._sticky||d._onStickyToolbar(),t.toolbar.style.top=i+l+e.option.stickyToolbar-n-c._variable.minResizingSize+"px"):n>=l&&d._onStickyToolbar()},_getStickyOffsetTop:function(){let t=e.element.topArea,i=0;for(;t;)i+=t.offsetTop,t=t.offsetParent;return i},_onStickyToolbar:function(){const t=e.element;c._isInline||(t._stickyDummy.style.height=t.toolbar.offsetHeight+"px",t._stickyDummy.style.display="block"),t.toolbar.style.top=e.option.stickyToolbar+"px",t.toolbar.style.width=c._isInline?c._inlineToolbarAttr.width:t.toolbar.offsetWidth+"px",r.addClass(t.toolbar,"se-toolbar-sticky"),c._sticky=!0},_offStickyToolbar:function(){const t=e.element;t._stickyDummy.style.display="none",t.toolbar.style.top=c._isInline?c._inlineToolbarAttr.top:"",t.toolbar.style.width=c._isInline?c._inlineToolbarAttr.width:"",t.editorArea.style.marginTop="",r.removeClass(t.toolbar,"se-toolbar-sticky"),c._sticky=!1},_codeViewAutoHeight:function(){e.element.code.style.height=e.element.code.scrollHeight+"px"},onPaste_wysiwyg:function(e){const t=e.clipboardData;if(!t)return!0;const i=c._charCount(t.getData("text/plain").length,!0),n=r.cleanHTML(t.getData("text/html"));return("function"!=typeof p.onPaste||p.onPaste(e,n,i))&&i?void(n?(e.stopPropagation(),e.preventDefault(),c.execCommand("insertHTML",!1,n)):c.history.push(!0)):(e.preventDefault(),e.stopPropagation(),!1)},onCut_wysiwyg:function(){a.setTimeout((function(){c._resourcesStateChange(),c._charCount(0,!1),c.history.push(!1)}))},onDragOver_wysiwyg:function(e){e.preventDefault()},onDrop_wysiwyg:function(t){const i=t.dataTransfer;if(!i)return!0;const n=i.files;if(n.length>0&&c.plugins.image)d._setDropLocationSelection(t),c.callPlugin("image",(function(){e.image.imgInputFile.files=n,c.plugins.image.onRender_imgInput.call(c),e.image.imgInputFile.files=null}));else{if(!c._charCount(i.getData("text/plain").length,!0))return t.preventDefault(),t.stopPropagation(),!1;{const e=r.cleanHTML(i.getData("text/html"));e&&(d._setDropLocationSelection(t),c.execCommand("insertHTML",!1,e))}}p.onDrop&&p.onDrop(t)},_setDropLocationSelection:function(e){e.stopPropagation(),e.preventDefault();const t=c.getRange();c.setRange(t.startContainer,t.startOffset,t.endContainer,t.endOffset)},_onChange_historyStack:function(){e.tool.save&&e.tool.save.removeAttribute("disabled"),p.onChange&&p.onChange(c.getContents(!0))},_addEvent:function(){const t=l.iframe?c._ww:e.element.wysiwyg;e.element.toolbar.addEventListener("mousedown",d.onMouseDown_toolbar,!1),e.element.toolbar.addEventListener("click",d.onClick_toolbar,!1),t.addEventListener("click",d.onClick_wysiwyg,!1),t.addEventListener("keydown",d.onKeyDown_wysiwyg,!1),t.addEventListener("keyup",d.onKeyUp_wysiwyg,!1),t.addEventListener("paste",d.onPaste_wysiwyg,!1),t.addEventListener("cut",d.onCut_wysiwyg,!1),t.addEventListener("dragover",d.onDragOver_wysiwyg,!1),t.addEventListener("drop",d.onDrop_wysiwyg,!1),t.addEventListener("scroll",d.onScroll_wysiwyg,!1),(c._isBalloon||c.plugins.table)&&t.addEventListener("mousedown",d.onMouseDown_wysiwyg,!1),c.plugins.table&&t.addEventListener("touchstart",d.onMouseDown_wysiwyg,{passive:!0,useCapture:!1}),"auto"!==e.option.height||e.option.codeMirrorEditor||(e.element.code.addEventListener("keydown",d._codeViewAutoHeight,!1),e.element.code.addEventListener("keyup",d._codeViewAutoHeight,!1),e.element.code.addEventListener("paste",d._codeViewAutoHeight,!1)),e.element.resizingBar&&(/\d+/.test(e.option.height)?e.element.resizingBar.addEventListener("mousedown",d.onMouseDown_resizingBar,!1):r.addClass(e.element.resizingBar,"se-resizing-none")),c._isInline&&t.addEventListener("focus",d._showToolbarInline,!1),(c._isInline||c._isBalloon)&&t.addEventListener("blur",d._hideToolbar,!1),a.removeEventListener("resize",d.onResize_window),a.removeEventListener("scroll",d.onScroll_window),a.addEventListener("resize",d.onResize_window,!1),e.option.stickyToolbar>-1&&a.addEventListener("scroll",d.onScroll_window,!1)},_removeEvent:function(){const t=l.iframe?c._ww:e.element.wysiwyg;e.element.toolbar.removeEventListener("mousedown",d.onMouseDown_toolbar),e.element.toolbar.removeEventListener("click",d.onClick_toolbar),t.removeEventListener("click",d.onClick_wysiwyg),t.removeEventListener("keydown",d.onKeyDown_wysiwyg),t.removeEventListener("keyup",d.onKeyUp_wysiwyg),t.removeEventListener("paste",d.onPaste_wysiwyg),t.removeEventListener("cut",d.onCut_wysiwyg),t.removeEventListener("dragover",d.onDragOver_wysiwyg),t.removeEventListener("drop",d.onDrop_wysiwyg),t.removeEventListener("scroll",d.onScroll_wysiwyg),t.removeEventListener("mousedown",d.onMouseDown_wysiwyg),t.removeEventListener("touchstart",d.onMouseDown_wysiwyg,{passive:!0,useCapture:!1}),t.removeEventListener("focus",d._showToolbarInline),t.removeEventListener("blur",d._hideToolbar),e.element.code.removeEventListener("keydown",d._codeViewAutoHeight),e.element.code.removeEventListener("keyup",d._codeViewAutoHeight),e.element.code.removeEventListener("paste",d._codeViewAutoHeight),e.element.resizingBar&&e.element.resizingBar.removeEventListener("mousedown",d.onMouseDown_resizingBar),a.removeEventListener("resize",d.onResize_window),a.removeEventListener("scroll",d.onScroll_window)}},p={core:c,util:r,onScroll:null,onClick:null,onKeyDown:null,onKeyUp:null,onDrop:null,onChange:null,onPaste:null,showInline:null,onImageUpload:null,onImageUploadError:null,setOptions:function(o){d._removeEvent(),c.plugins=o.plugins||c.plugins;const s=[e.option,o].reduce((function(e,t){return Object.keys(t).forEach((function(i){e[i]=t[i]})),e}),{}),a=h._setOptions(s,e,c.plugins,e.option);a.callButtons&&(t=a.callButtons,c.initPlugins={}),a.plugins&&(c.plugins=i=a.plugins);const r=e.element,u={_top:r.topArea,_relative:r.relative,_toolBar:r.toolbar,_editorArea:r.editorArea,_wysiwygArea:r.wysiwygFrame,_codeArea:r.code,_placeholder:r.placeholder,_resizingBar:r.resizingBar,_navigation:r.navigation,_charCounter:r.charCounter,_loading:r.loading,_resizeBack:r.resizeBackground,_stickyDummy:r._stickyDummy,_arrow:r._arrow};l=s,c.lang=n=l.lang,c.context=e=g(e.element.originElement,u,l),c._imagesInfoReset=!0,c._init(),d._addEvent(),c._charCount(0,!1),d._offStickyToolbar(),d.onResize_window(),c.focus()},noticeOpen:function(e){c.addModule([s]),s.open.call(c,e)},noticeClose:function(){c.addModule([s]),s.close.call(c)},save:function(){e.element.originElement.value=c.getContents(!1)},getContext:function(){return e},getContents:function(e){return c.getContents(e)},getImagesInfo:function(){return c._variable._imagesInfo},insertImage:function(e){c.plugins.image&&e&&(c.initPlugins.image?c.plugins.image.submitAction.call(c,e):c.callPlugin("image",c.plugins.image.submitAction.bind(c,e)),c.focus())},insertHTML:function(e){if(!e.nodeType||1!==e.nodeType){const t=r.createElement("DIV");t.innerHTML=e,e=t.firstChild||t.content.firstChild}let t=null;(r.isFormatElement(e)||/^(IMG|IFRAME)$/i.test(e.nodeName))&&(t=r.getFormatElement(c.getSelectionNode())),r.isComponent(e)?c.insertComponent(e,!1):c.insertNode(e,t),c.focus()},setContents:function(e){c.setContents(e)},appendContents:function(t){const i=r.convertContentsForEditor(t);c._variable.isCodeView?c._setCodeView(c._getCodeView()+"\n"+r.convertHTMLForCodeView(i,c._variable.codeIndent)):e.element.wysiwyg.innerHTML+=i,c.history.push(!1)},disabled:function(){e.tool.cover.style.display="block",e.element.wysiwyg.setAttribute("contenteditable",!1),e.option.codeMirrorEditor?e.option.codeMirrorEditor.setOption("readOnly",!0):e.element.code.setAttribute("disabled","disabled")},enabled:function(){e.tool.cover.style.display="none",e.element.wysiwyg.setAttribute("contenteditable",!0),e.option.codeMirrorEditor?e.option.codeMirrorEditor.setOption("readOnly",!1):e.element.code.removeAttribute("disabled")},show:function(){const t=e.element.topArea.style;"none"===t.display&&(t.display=e.option.display)},hide:function(){e.element.topArea.style.display="none"},destroy:function(){d._removeEvent(),r.removeItem(e.element.topArea),a.Object.keys(c).forEach((function(e){delete c[e]})),a.Object.keys(d).forEach((function(e){delete d[e]})),a.Object.keys(e).forEach((function(t){delete e[t]})),a.Object.keys(t).forEach((function(e){delete t[e]})),a.Object.keys(this).forEach(function(e){delete this[e]}.bind(this))}};return c._init(),d._addEvent(),c._charCount(0,!1),p},m={init:function(e){return{create:function(t,i){return this.create(t,i,e)}.bind(this)}},create:function(e,t,i){"object"!=typeof t&&(t={}),i&&(t=[i,t].reduce((function(e,t){return Object.keys(t).forEach((function(i){if("plugins"===i&&t[i]&&e[i]){let n=e[i],l=t[i];n=n.length?n:Object.keys(n).map((function(e){return n[e]})),l=l.length?l:Object.keys(l).map((function(e){return l[e]})),e[i]=l.filter((function(e){return-1===n.indexOf(e)})).concat(n)}else e[i]=t[i]})),e}),{}));const n="string"==typeof e?document.getElementById(e):e;if(!n){if("string"==typeof e)throw Error('[SUNEDITOR.create.fail] The element for that id was not found (ID:"'+e+'")');throw Error("[SUNEDITOR.create.fail] suneditor requires textarea's element or id value")}const l=h.init(n,t);if(l.constructed._top.id&&document.getElementById(l.constructed._top.id))throw Error('[SUNEDITOR.create.fail] The ID of the suneditor you are trying to create already exists (ID:"'+l.constructed._top.id+'")');return n.style.display="none",l.constructed._top.style.display="block","object"==typeof n.nextElementSibling?n.parentNode.insertBefore(l.constructed._top,n.nextElementSibling):n.parentNode.appendChild(l.constructed._top),p(g(n,l.constructed,l.options),l.pluginCallButtons,l.plugins,l.options.lang,t)}};window.SUNEDITOR=m.init({plugins:a})}}); \ No newline at end of file +!function(e){var t={};function i(n){if(t[n])return t[n].exports;var l=t[n]={i:n,l:!1,exports:{}};return e[n].call(l.exports,l,l.exports,i),l.l=!0,l.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var l in e)i.d(n,l,function(t){return e[t]}.bind(null,l));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s="XJR1")}({"3FqI":function(e,t,i){},P6u4:function(e,t,i){"use strict";var n,l;n="undefined"!=typeof window?window:this,l=function(e,t){const i={toolbar:{default:"Default",save:"Save",font:"Font",formats:"Formats",fontSize:"Size",bold:"Bold",underline:"Underline",italic:"Italic",strike:"Strike",subscript:"Subscript",superscript:"Superscript",removeFormat:"Remove Format",fontColor:"Font Color",hiliteColor:"Highlight Color",indent:"Indent",outdent:"Outdent",align:"Align",alignLeft:"Align left",alignRight:"Align right",alignCenter:"Align center",alignJustify:"Align justify",list:"List",orderList:"Ordered list",unorderList:"Unordered list",horizontalRule:"Horizontal line",hr_solid:"Solid",hr_dotted:"Dotted",hr_dashed:"Dashed",table:"Table",link:"Link",image:"Image",video:"Video",fullScreen:"Full screen",showBlocks:"Show blocks",codeView:"Code view",undo:"Undo",redo:"Redo",preview:"Preview",print:"print",tag_p:"Paragraph",tag_div:"Normal (DIV)",tag_h:"Header",tag_blockquote:"Quote",tag_pre:"Code",template:"Template",lineHeight:"Line height",paragraphStyle:"Paragraph style",textStyle:"Text style"},dialogBox:{linkBox:{title:"Insert Link",url:"URL to link",text:"Text to display",newWindowCheck:"Open in new window"},imageBox:{title:"Insert image",file:"Select from files",url:"Image URL",altText:"Alternative text"},videoBox:{title:"Insert Video",url:"Media embed URL, YouTube"},caption:"Insert description",close:"Close",submitButton:"Submit",revertButton:"Revert",proportion:"Constrain proportions",basic:"Basic",left:"Left",right:"Right",center:"Center",width:"Width",height:"Height",size:"Size",ratio:"Ratio"},controller:{edit:"Edit",unlink:"Unlink",remove:"Remove",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",deleteRow:"Delete row",insertColumnBefore:"Insert column before",insertColumnAfter:"Insert column after",deleteColumn:"Delete column",resize100:"Resize 100%",resize75:"Resize 75%",resize50:"Resize 50%",resize25:"Resize 25%",autoSize:"Auto size",mirrorHorizontal:"Mirror, Horizontal",mirrorVertical:"Mirror, Vertical",rotateLeft:"Rotate left",rotateRight:"Rotate right",maxSize:"Max size",minSize:"Min size",tableHeader:"Table header",mergeCells:"Merge cells",splitCells:"Split Cells",HorizontalSplit:"Horizontal split",VerticalSplit:"Vertical split"},menu:{spaced:"Spaced",bordered:"Bordered",neon:"Neon",translucent:"Translucent",shadow:"Shadow"}};return void 0===t&&(e.SUNEDITOR_LANG||(e.SUNEDITOR_LANG={}),e.SUNEDITOR_LANG.en=i),i},"object"==typeof e.exports?e.exports=n.document?l(n,!0):function(e){if(!e.document)throw new Error("SUNEDITOR_LANG a window with a document");return l(e)}:l(n)},WUQj:function(e,t,i){},XJR1:function(e,t,i){"use strict";i.r(t);i("3FqI"),i("WUQj");var n={name:"colorPicker",add:function(e){const t=e.context;t.colorPicker={colorListHTML:"",_colorInput:"",_defaultColor:"#000",_styleProperty:"color",_currentColor:"",_colorList:[]};let i=this.createColorList(e.context.option,e.lang,this._makeColorList);t.colorPicker.colorListHTML=i,i=null},createColorList:function(e,t,i){const n=e.colorList&&0!==e.colorList.length?e.colorList:["#ff0000","#ff5e00","#ffe400","#abf200","#00d8ff","#0055ff","#6600ff","#ff00dd","#000000","#ffd8d8","#fae0d4","#faf4c0","#e4f7ba","#d4f4fa","#d9e5ff","#e8d9ff","#ffd9fa","#f1f1f1","#ffa7a7","#ffc19e","#faed7d","#cef279","#b2ebf4","#b2ccff","#d1b2ff","#ffb2f5","#bdbdbd","#f15f5f","#f29661","#e5d85c","#bce55c","#5cd1e5","#6699ff","#a366ff","#f261df","#8c8c8c","#980000","#993800","#998a00","#6b9900","#008299","#003399","#3d0099","#990085","#353535","#670000","#662500","#665c00","#476600","#005766","#002266","#290066","#660058","#222222"];let l=[],o='
    ';for(let e=0,t=n.length;e0&&(o+='
    '+i(l)+"
    ",l=[]),"object"==typeof n[e]&&(o+='
    '+i(n[e])+"
    "));return o+='
    ",o},_makeColorList:function(e){let t="";t+='
      ';for(let i,n=0,l=e.length;n');return t+="
    ",t},init:function(e,t){const i=this.plugins.colorPicker;let n=t||(i.getColorInNode.call(this,e)||this.context.colorPicker._defaultColor);n=i.isHexColor(n)?n:i.rgb2hex(n)||n;const l=this.context.colorPicker._colorList;if(l)for(let e=0,t=l.length;e=3&&"#"+((1<<24)+(i[0]<<16)+(i[1]<<8)+i[2]).toString(16).substr(1)}},l={name:"dialog",add:function(e){const t=e.context;t.dialog={};let i=e.util.createElement("DIV");i.className="se-dialog sun-editor-common";let n=e.util.createElement("DIV");n.className="se-dialog-back",n.style.display="none";let l=e.util.createElement("DIV");l.className="se-dialog-inner",l.style.display="none",i.appendChild(n),i.appendChild(l),t.dialog.modalArea=i,t.dialog.back=n,t.dialog.modal=l,t.dialog.modal.addEventListener("click",this.onClick_dialog.bind(e)),t.element.relative.appendChild(i),i=null,n=null,l=null},onClick_dialog:function(e){e.stopPropagation(),(/se-dialog-inner/.test(e.target.className)||/close/.test(e.target.getAttribute("data-command")))&&this.plugins.dialog.close.call(this)},open:function(e,t){if(this.modalForm)return!1;this.plugins.dialog._bindClose&&(this._d.removeEventListener("keydown",this.plugins.dialog._bindClose),this.plugins.dialog._bindClose=null),this.plugins.dialog._bindClose=function(e){/27/.test(e.keyCode)&&this.plugins.dialog.close.call(this)}.bind(this),this._d.addEventListener("keydown",this.plugins.dialog._bindClose),this.context.dialog.updateModal=t,"full"===this.context.option.popupDisplay?this.context.dialog.modalArea.style.position="fixed":this.context.dialog.modalArea.style.position="absolute",this.context.dialog.kind=e,this.modalForm=this.context[e].modal;const i=this.context[e].focusElement;"function"==typeof this.plugins[e].on&&this.plugins[e].on.call(this,t),this.context.dialog.modalArea.style.display="block",this.context.dialog.back.style.display="block",this.context.dialog.modal.style.display="block",this.modalForm.style.display="block",i&&i.focus()},_bindClose:null,close:function(){this.plugins.dialog._bindClose&&(this._d.removeEventListener("keydown",this.plugins.dialog._bindClose),this.plugins.dialog._bindClose=null),this.modalForm.style.display="none",this.context.dialog.back.style.display="none",this.context.dialog.modalArea.style.display="none",this.modalForm=null,this.context.dialog.updateModal=!1,this.plugins[this.context.dialog.kind].init.call(this),this.focus()}},o={name:"resizing",add:function(e){const t=e.context;t.resizing={_resizeClientX:0,_resizeClientY:0,_resize_plugin:"",_resize_w:0,_resize_h:0,_origin_w:0,_origin_h:0,_rotateVertical:!1,_resize_direction:"",_move_path:null,_isChange:!1};let i=this.setController_resize.call(e);t.resizing.resizeContainer=i,t.resizing.resizeDiv=i.querySelector(".se-modal-resize"),t.resizing.resizeDot=i.querySelector(".se-resize-dot"),t.resizing.resizeDisplay=i.querySelector(".se-resize-display");let n=this.setController_button.call(e);t.resizing.resizeButton=n,n.addEventListener("mousedown",(function(e){e.stopPropagation()}),!1);let l=t.resizing.resizeHandles=t.resizing.resizeDot.querySelectorAll("span");t.resizing.resizeButtonGroup=n.querySelector("._se_resizing_btn_group"),t.resizing.rotationButtons=n.querySelectorAll("._se_resizing_btn_group ._se_rotation"),t.resizing.percentageButtons=n.querySelectorAll("._se_resizing_btn_group ._se_percentage"),t.resizing.alignMenu=n.querySelector(".se-resizing-align-list"),t.resizing.alignMenuList=t.resizing.alignMenu.querySelectorAll("button"),t.resizing.alignButton=n.querySelector("._se_resizing_align_button"),t.resizing.alignButtonIcon=t.resizing.alignButton.querySelector("i"),t.resizing.autoSizeButton=n.querySelector("._se_resizing_btn_group ._se_auto_size"),t.resizing.captionButton=n.querySelector("._se_resizing_caption_button"),l[0].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[1].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[2].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[3].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[4].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[5].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[6].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),l[7].addEventListener("mousedown",this.onMouseDown_resize_handle.bind(e)),n.addEventListener("click",this.onClick_resizeButton.bind(e)),t.element.relative.appendChild(i),t.element.relative.appendChild(n),i=null,n=null,l=null},setController_resize:function(){const e=this.util.createElement("DIV");return e.className="se-resizing-container",e.style.display="none",e.innerHTML='
    ',e},setController_button:function(){const e=this.lang,t=this.util.createElement("DIV");return t.className="se-controller se-controller-resizing",t.innerHTML='
    ",t},_module_getSizeX:function(e,t,i,n){return t||(t=e._element),i||(i=e._cover),n||(n=e._container),n&&i&&t?/%$/.test(t.style.width)?(this.util.getNumber(n.style.width,2)||100)+"%":t.style.width:""},_module_getSizeY:function(e,t,i,n){return t||(t=e._element),i||(i=e._cover),n||(n=e._container),n&&i&&t?this.util.getNumber(i.style.paddingBottom)>0&&!this.context.resizing._rotateVertical?i.style.height:/%$/.test(t.style.height)&&/%$/.test(t.style.width)?(this.util.getNumber(n.style.height,2)||100)+"%":t.style.height:""},_module_setModifyInputSize:function(e,t){const i=e._onlyPercentage&&this.context.resizing._rotateVertical;e.proportion.checked=e._proportionChecked="false"!==e._element.getAttribute("data-proportion");let n=i?"":this.plugins.resizing._module_getSizeX.call(this,e);if(n===e._defaultSizeX&&(n=""),e._onlyPercentage&&(n=this.util.getNumber(n,2)),e.inputX.value=n,t.setInputSize.call(this,"x"),!e._onlyPercentage){let t=i?"":this.plugins.resizing._module_getSizeY.call(this,e);t===e._defaultSizeY&&(t=""),e._onlyPercentage&&(t=this.util.getNumber(t,2)),e.inputY.value=t}e.inputX.disabled=!!i,e.inputY.disabled=!!i,e.proportion.disabled=!!i,t.setRatio.call(this)},_module_setInputSize:function(e,t){if(e._onlyPercentage)"x"===t&&e.inputX.value>100&&(e.inputX.value=100);else if(e.proportion.checked&&e._ratio&&/\d/.test(e.inputX.value)&&/\d/.test(e.inputY.value)){const i=e.inputX.value.replace(/\d+|\./g,"")||e.sizeUnit,n=e.inputY.value.replace(/\d+|\./g,"")||e.sizeUnit;if(i!==n)return;const l="%"===i?2:0;"x"===t?e.inputY.value=this.util.getNumber(e._ratioY*this.util.getNumber(e.inputX.value,l),l)+n:e.inputX.value=this.util.getNumber(e._ratioX*this.util.getNumber(e.inputY.value,l),l)+i}},_module_setRatio:function(e){const t=e.inputX.value,i=e.inputY.value;if(e.proportion.checked&&/\d+/.test(t)&&/\d+/.test(i)){if((t.replace(/\d+|\./g,"")||e.sizeUnit)!==(i.replace(/\d+|\./g,"")||e.sizeUnit))e._ratio=!1;else if(!e._ratio){const n=this.util.getNumber(t),l=this.util.getNumber(i);e._ratio=!0,e._ratioX=n/l,e._ratioY=l/n}}else e._ratio=!1},_module_sizeRevert:function(e){e._onlyPercentage?e.inputX.value=e._origin_w>100?100:e._origin_w:(e.inputX.value=e._origin_w,e.inputY.value=e._origin_h)},_module_saveCurrentSize:function(e){const t=this.plugins.resizing._module_getSizeX.call(this,e),i=this.plugins.resizing._module_getSizeY.call(this,e);e._element.setAttribute("data-size",t+","+i),e._videoRatio&&(e._videoRatio=i)},call_controller_resize:function(e,t){const i=this.context.resizing,n=this.context[t];i._resize_plugin=t;const l=i.resizeContainer,o=i.resizeDiv,s=this.util.getOffset(e,this.context.element.wysiwygFrame),a=i._rotateVertical=/^(90|270)$/.test(Math.abs(e.getAttribute("data-rotate")).toString()),r=a?e.offsetHeight:e.offsetWidth,c=a?e.offsetWidth:e.offsetHeight,d=s.top,u=s.left-this.context.element.wysiwygFrame.scrollLeft;l.style.top=d+"px",l.style.left=u+"px",l.style.width=r+"px",l.style.height=c+"px",o.style.top="0px",o.style.left="0px",o.style.width=r+"px",o.style.height=c+"px";let h=e.getAttribute("data-align")||"basic";h="none"===h?"basic":h;const g=this.util.getParentElement(e,this.util.isComponent),p=this.util.getParentElement(e,"FIGURE"),m=this.plugins.resizing._module_getSizeX.call(this,n,e,p,g)||"auto",f=n._onlyPercentage&&"image"===t?"":", "+(this.plugins.resizing._module_getSizeY.call(this,n,e,p,g)||"auto");this.util.changeTxt(i.resizeDisplay,this.lang.dialogBox[h]+" ("+m+f+")"),i.resizeButtonGroup.style.display=n._resizing?"":"none";const _=!n._resizing||n._resizeDotHide||n._onlyPercentage?"none":"flex",b=i.resizeHandles;for(let e=0,t=b.length;e",e},set_cover:function(e){const t=this.util.createElement("FIGURE");return t.appendChild(e),t},set_container:function(e,t){const i=this.util.createElement("DIV");return i.className="se-component "+t,i.setAttribute("contenteditable",!1),i.appendChild(e),i},onClick_resizeButton:function(e){e.stopPropagation();const t=e.target,i=t.getAttribute("data-command")||t.parentNode.getAttribute("data-command");if(!i)return;const n=t.getAttribute("data-value")||t.parentNode.getAttribute("data-value"),l=this.context.resizing._resize_plugin,o=this.context[l],s=o._element,a=this.plugins[l];if(e.preventDefault(),"function"!=typeof this.plugins.resizing._closeAlignMenu||(this.plugins.resizing._closeAlignMenu(),"onalign"!==i)){switch(i){case"auto":a.setAutoSize.call(this),a.onModifyMode.call(this,s,this.plugins.resizing.call_controller_resize.call(this,s,l));break;case"percent":let e=this.plugins.resizing._module_getSizeY.call(this,o);if(this.context.resizing._rotateVertical){const t=s.getAttribute("data-percentage");t&&(e=t.split(",")[1])}this.plugins.resizing.resetTransform.call(this,s),a.setPercentSize.call(this,100*n,e),a.onModifyMode.call(this,s,this.plugins.resizing.call_controller_resize.call(this,s,l));break;case"mirror":const t=s.getAttribute("data-rotate")||"0";let i=s.getAttribute("data-rotateX")||"",r=s.getAttribute("data-rotateY")||"";"h"===n&&!this.context.resizing._rotateVertical||"v"===n&&this.context.resizing._rotateVertical?r=r?"":"180":i=i?"":"180",s.setAttribute("data-rotateX",i),s.setAttribute("data-rotateY",r),this.plugins.resizing._setTransForm(s,t,i,r);break;case"rotate":const c=this.context.resizing,d=1*s.getAttribute("data-rotate")+1*n,u=this._w.Math.abs(d)>=360?0:d;s.setAttribute("data-rotate",u),c._rotateVertical=/^(90|270)$/.test(this._w.Math.abs(u).toString()),this.plugins.resizing.setTransformSize.call(this,s,null,null),a.onModifyMode.call(this,s,this.plugins.resizing.call_controller_resize.call(this,s,l));break;case"onalign":this.plugins.resizing.openAlignMenu.call(this);break;case"align":const h="basic"===n?"none":n;a.setAlign.call(this,h,null,null,null),a.onModifyMode.call(this,s,this.plugins.resizing.call_controller_resize.call(this,s,l));break;case"caption":const g=!o._captionChecked;if(a.openModify.call(this,!0),o._captionChecked=o.captionCheckEl.checked=g,"image"===l?a.update_image.call(this,!1,!1,!1):"video"===l&&(this.context.dialog.updateModal=!0,a.submitAction.call(this)),g){const e=this.util.getChildElement(o._caption,(function(e){return 3===e.nodeType}));e?this.setRange(e,0,e,e.textContent.length):o._caption.focus(),this.controllersOff()}else a.onModifyMode.call(this,s,this.plugins.resizing.call_controller_resize.call(this,s,l)),a.openModify.call(this,!0);break;case"revert":a.setOriginSize.call(this),a.onModifyMode.call(this,s,this.plugins.resizing.call_controller_resize.call(this,s,l));break;case"update":a.openModify.call(this),this.controllersOff();break;case"delete":a.destroy.call(this)}this.history.push(!1)}},resetTransform:function(e){const t=(e.getAttribute("data-size")||e.getAttribute("data-origin")||"").split(",");this.context.resizing._rotateVertical=!1,e.style.maxWidth="",e.style.transform="",e.style.transformOrigin="",e.setAttribute("data-rotate",""),e.setAttribute("data-rotateX",""),e.setAttribute("data-rotateY",""),this.plugins[this.context.resizing._resize_plugin].setSize.call(this,t[0]?t[0]:"auto",t[1]?t[1]:"",!0)},setTransformSize:function(e,t,i){let n=e.getAttribute("data-percentage");const l=this.context.resizing._rotateVertical,o=1*e.getAttribute("data-rotate");let s="";if(n&&!l)n=n.split(","),"auto"===n[0]&&"auto"===n[1]?this.plugins[this.context.resizing._resize_plugin].setAutoSize.call(this):this.plugins[this.context.resizing._resize_plugin].setPercentSize.call(this,n[0],n[1]);else{const n=this.util.getParentElement(e,"FIGURE"),a=t||e.offsetWidth,r=i||e.offsetHeight,c=(l?r:a)+"px",d=(l?a:r)+"px";if(this.plugins[this.context.resizing._resize_plugin].cancelPercentAttr.call(this),this.plugins[this.context.resizing._resize_plugin].setSize.call(this,a+"px",r+"px",!0),n.style.width=c,n.style.height=this.context[this.context.resizing._resize_plugin]._caption?"":d,l){let e=a/2+"px "+a/2+"px 0",t=r/2+"px "+r/2+"px 0";s=90===o||-270===o?t:e}}e.style.transformOrigin=s,this.plugins.resizing._setTransForm(e,o.toString(),e.getAttribute("data-rotateX")||"",e.getAttribute("data-rotateY")||""),e.style.maxWidth=l?"none":"",this.plugins.resizing.setCaptionPosition.call(this,e)},_setTransForm:function(e,t,i,n){let l=(e.offsetWidth-e.offsetHeight)*(/-/.test(t)?1:-1),o="";if(/[1-9]/.test(t)&&(i||n))switch(o=i?"Y":"X",t){case"90":o=i&&n?"X":n?o:"";break;case"270":l*=-1,o=i&&n?"Y":i?o:"";break;case"-90":o=i&&n?"Y":i?o:"";break;case"-270":l*=-1,o=i&&n?"X":n?o:"";break;default:o=""}t%180==0&&(e.style.maxWidth=""),e.style.transform="rotate("+t+"deg)"+(i?" rotateX("+i+"deg)":"")+(n?" rotateY("+n+"deg)":"")+(o?" translate"+o+"("+l+"px)":"")},setCaptionPosition:function(e){const t=this.util.getChildElement(this.util.getParentElement(e,"FIGURE"),"FIGCAPTION");t&&(t.style.marginTop=(this.context.resizing._rotateVertical?e.offsetWidth-e.offsetHeight:0)+"px")},onMouseDown_resize_handle:function(e){const t=this.context.resizing,i=t._resize_direction=e.target.classList[0];e.stopPropagation(),e.preventDefault();const n=this.context.resizing._resize_plugin,l=this.context[n]._element,o=this.plugins[n];t._resizeClientX=e.clientX,t._resizeClientY=e.clientY,this.context.element.resizeBackground.style.display="block",t.resizeButton.style.display="none",t.resizeDiv.style.float=/l/.test(i)?"right":/r/.test(i)?"left":"none";const s=function(e){if("keydown"===e.type&&27!==e.keyCode)return;const i=t._isChange;t._isChange=!1,this.removeDocEvent("mousemove",a),this.removeDocEvent("mouseup",s),this.removeDocEvent("keydown",s),"keydown"===e.type?(this.controllersOff(),this.context.element.resizeBackground.style.display="none",this.plugins[this.context.resizing._resize_plugin].init.call(this)):(this.plugins.resizing.cancel_controller_resize.call(this),i&&this.history.push(!1)),o.onModifyMode.call(this,l,this.plugins.resizing.call_controller_resize.call(this,l,t._resize_plugin))}.bind(this),a=this.plugins.resizing.resizing_element.bind(this,t,i,this.context[t._resize_plugin]);this.addDocEvent("mousemove",a),this.addDocEvent("mouseup",s),this.addDocEvent("keydown",s)},resizing_element:function(e,t,i,n){const l=n.clientX,o=n.clientY;let s=i._element_w,a=i._element_h;const r=i._element_w+(/r/.test(t)?l-e._resizeClientX:e._resizeClientX-l),c=i._element_h+(/b/.test(t)?o-e._resizeClientY:e._resizeClientY-o),d=i._element_h/i._element_w*r;/t/.test(t)&&(e.resizeDiv.style.top=i._element_h-(/h/.test(t)?c:d)+"px"),/l/.test(t)&&(e.resizeDiv.style.left=i._element_w-r+"px"),/r|l/.test(t)&&(e.resizeDiv.style.width=r+"px",s=r),/^(t|b)[^h]$/.test(t)?(e.resizeDiv.style.height=d+"px",a=d):/^(t|b)h$/.test(t)&&(e.resizeDiv.style.height=c+"px",a=c),e._resize_w=s,e._resize_h=a,this.util.changeTxt(e.resizeDisplay,this._w.Math.round(s)+" x "+this._w.Math.round(a)),e._isChange=!0},cancel_controller_resize:function(){const e=this.context.resizing._rotateVertical;this.controllersOff(),this.context.element.resizeBackground.style.display="none";let t=this._w.Math.round(e?this.context.resizing._resize_h:this.context.resizing._resize_w),i=this._w.Math.round(e?this.context.resizing._resize_w:this.context.resizing._resize_h);if(!e&&!/%$/.test(t)){const e=16,n=this.context.element.wysiwygFrame.clientWidth-2*e-2;this.util.getNumber(t)>n&&(i=this._w.Math.round(i/t*n),t=n)}this.plugins[this.context.resizing._resize_plugin].setSize.call(this,t,i,!1),this.plugins[this.context.resizing._resize_plugin].init.call(this)}},s={name:"notice",add:function(e){const t=e.context;t.notice={};let i=e.util.createElement("DIV"),n=e.util.createElement("SPAN"),l=e.util.createElement("BUTTON");i.className="se-notice",l.className="close",l.setAttribute("aria-label","Close"),l.setAttribute("title",e.lang.dialogBox.close),l.innerHTML='',i.appendChild(n),i.appendChild(l),t.notice.modal=i,t.notice.message=n,l.addEventListener("click",this.onClick_cancel.bind(e)),t.element.editorArea.insertBefore(i,t.element.wysiwygFrame),i=null},onClick_cancel:function(e){e.preventDefault(),e.stopPropagation(),this.plugins.notice.close.call(this)},open:function(e){this.context.notice.message.textContent=e,this.context.notice.modal.style.display="block"},close:function(){this.context.notice.modal.style.display="none"}},a={align:{name:"align",add:function(e,t){const i=e.context;i.align={_alignList:null,currentAlign:""};let n=this.setSubmenu.call(e),l=n.querySelector("ul");l.addEventListener("click",this.pickup.bind(e)),i.align._alignList=l.querySelectorAll("li button"),t.parentNode.appendChild(n),n=null,l=null},setSubmenu:function(){const e=this.lang,t=this.util.createElement("DIV");return t.className="se-list-layer",t.innerHTML='
    ",t},on:function(){const e=this.context.align,t=e._alignList,i=this.commandMap.ALIGN.getAttribute("data-focus")||"left";if(i!==e.currentAlign){for(let e=0,n=t.length;e('+t.toolbar.default+")";for(o=0,s=a.length;o";return r+="",i.innerHTML=r,i},on:function(){const e=this.context.font,t=e._fontList,i=this.commandMap.FONT.textContent;if(i!==e.currentFont){for(let e=0,n=t.length;e('+t.toolbar.default+")";for(let t,i=0,o=e.fontSizeUnit,s=n.length;i";return l+="",i.innerHTML=l,i},on:function(){const e=this.context.fontSize,t=e._sizeList,i=this.commandMap.SIZE.textContent;if(i!==e.currentSize){for(let e=0,n=t.length;e
  • ",t},appendHr:function(e){const t=this.util.createElement("HR");t.className=e,this.focus();let i=this.insertComponent(t,!1);this.setRange(i,0,i,0)},horizontalRulePick:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,i=null;for(;!i&&!/UL/i.test(t.tagName);)i=t.getAttribute("data-value"),t=t.parentNode;i&&(this.plugins.horizontalRule.appendHr.call(this,"__se__"+i),this.submenuOff())}},list:{name:"list",add:function(e,t){const i=e.context;i.list={_list:null,currentList:""};let n=this.setSubmenu.call(e),l=n.querySelector("ul");l.addEventListener("click",this.pickup.bind(e)),i.list._list=l.querySelectorAll("li button"),t.parentNode.appendChild(n),n=null,l=null},setSubmenu:function(){const e=this.lang,t=this.util.createElement("DIV");return t.className="se-submenu se-list-layer",t.innerHTML='
    ",t},on:function(){const e=this.context.list,t=e._list,i=this.commandMap.LI.getAttribute("data-focus")||"";if(i!==e.currentList){for(let e=0,n=t.length;e"),e.innerHTML+=t.outerHTML,i&&(e.innerHTML+="
    ")}else e.innerHTML=t.innerHTML;r.appendChild(e),s||(h=r),s&&d===c&&!this.util.isRangeFormatElement(p)||(u||(u=r),l&&s&&d===c||s&&this.util.isList(c)&&c===a||r.parentNode!==d&&d.insertBefore(r,p)),this.util.removeItem(t),l&&null===g&&(g=r.children.length-1),s&&this.util.getRangeFormatElement(c,m)!==this.util.getRangeFormatElement(a,m)&&(r=this.util.createElement(i)),f&&0===f.children.length&&this.util.removeItem(f)}else this.util.removeItem(t);g&&(u=u.children[g]),a&&(p=r.children.length-1,r.innerHTML+=d.innerHTML,h=r.children[p],this.util.removeItem(d)),o=s=this.util.getEdgeChildNodes(u.firstChild,h.lastChild)}else{const e=this.util.getRangeFormatElement(this.getSelectionNode()),t=e&&e.tagName===i;let l,a;const r=function(e){return!this.isComponent(e)}.bind(this.util);t||(a=this.util.createElement(i));for(let e,c,d=0,u=n.length;d1?this.setRange(o.sc,0,s.ec,s.ec.textContent.length):this.setRange(o.ec,o.ec.textContent.length,s.ec,s.ec.textContent.length),this.submenuOff(),this.history.push(!1)}},table:{name:"table",add:function(e,t){const i=e.context;i.table={_element:null,_tdElement:null,_trElement:null,_trElements:null,_tableXY:[],_maxWidth:!0,resizeIcon:null,resizeText:null,headerButton:null,mergeButton:null,splitButton:null,splitMenu:null,maxText:e.lang.controller.maxSize,minText:e.lang.controller.minSize,_physical_cellCnt:0,_logical_cellCnt:0,_rowCnt:0,_rowIndex:0,_physical_cellIndex:0,_logical_cellIndex:0,_current_colSpan:0,_current_rowSpan:0};let n=this.setSubmenu.call(e),l=n.querySelector(".se-controller-table-picker");i.table.tableHighlight=n.querySelector(".se-table-size-highlighted"),i.table.tableUnHighlight=n.querySelector(".se-table-size-unhighlighted"),i.table.tableDisplay=n.querySelector(".se-table-size-display");let o=this.setController_table.call(e);i.table.tableController=o,i.table.resizeIcon=o.querySelector("._se_table_resize > i"),i.table.resizeText=o.querySelector("._se_table_resize > span > span"),i.table.headerButton=o.querySelector("._se_table_header"),o.addEventListener("mousedown",(function(e){e.stopPropagation()}),!1);let s=this.setController_tableEditor.call(e);i.table.resizeDiv=s,i.table.splitMenu=s.querySelector(".se-btn-group-sub"),i.table.mergeButton=s.querySelector("._se_table_merge_button"),i.table.splitButton=s.querySelector("._se_table_split_button"),s.addEventListener("mousedown",(function(e){e.stopPropagation()}),!1),l.addEventListener("mousemove",this.onMouseMove_tablePicker.bind(e)),l.addEventListener("click",this.appendTable.bind(e)),s.addEventListener("click",this.onClick_tableController.bind(e)),o.addEventListener("click",this.onClick_tableController.bind(e)),t.parentNode.appendChild(n),i.element.relative.appendChild(s),i.element.relative.appendChild(o),n=null,l=null,s=null,o=null},setSubmenu:function(){const e=this.util.createElement("DIV");return e.className="se-submenu se-selector-table",e.innerHTML='
    1 x 1
    ',e},setController_table:function(){const e=this.lang,t=this.util.createElement("DIV");return t.className="se-controller se-controller-table",t.innerHTML='
    ",t},setController_tableEditor:function(){const e=this.lang,t=this.util.createElement("DIV");return t.className="se-controller se-controller-table-cell",t.innerHTML='
    • '+e.controller.VerticalSplit+'
    • '+e.controller.HorizontalSplit+"
    ",t},appendTable:function(){const e=this.util.createElement("TABLE"),t=this.plugins.table.createCells,i=this.context.table._tableXY[0];let n=this.context.table._tableXY[1],l="";for(;n>0;)l+=""+t.call(this,"td",i)+"",--n;l+="",e.innerHTML=l,this.insertComponent(e,!1);const o=e.querySelector("td div");this.setRange(o,0,o,0),this.plugins.table.reset_table_picker.call(this)},createCells:function(e,t,i){if(e=e.toLowerCase(),i){const t=this.util.createElement(e);return t.innerHTML="

    ",t}{let i="";for(;t>0;)i+="<"+e+">

    ",t--;return i}},onMouseMove_tablePicker:function(e){e.stopPropagation();let t=this._w.Math.ceil(e.offsetX/18),i=this._w.Math.ceil(e.offsetY/18);t=t<1?1:t,i=i<1?1:i,this.context.table.tableHighlight.style.width=t+"em",this.context.table.tableHighlight.style.height=i+"em";let n=t<5?5:t>9?10:t+1,l=i<5?5:i>9?10:i+1;this.context.table.tableUnHighlight.style.width=n+"em",this.context.table.tableUnHighlight.style.height=l+"em",this.util.changeTxt(this.context.table.tableDisplay,t+" x "+i),this.context.table._tableXY=[t,i]},reset_table_picker:function(){if(!this.context.table.tableHighlight)return;const e=this.context.table.tableHighlight.style,t=this.context.table.tableUnHighlight.style;e.width="1em",e.height="1em",t.width="5em",t.height="5em",this.util.changeTxt(this.context.table.tableDisplay,"1 x 1"),this.submenuOff()},init:function(){const e=this.context.table,t=this.plugins.table;if(t._removeEvents.call(this),t._selectedTable){const e=t._selectedTable.querySelectorAll(".se-table-selected-cell");for(let t=0,i=e.length;t0)for(let e,t=0;to||(u>=e.index?(n+=e.cs,u+=e.cs,e.rs-=1,e.row=o+1,e.rs<1&&(r.splice(t,1),t--)):h===g-1&&(e.rs-=1,e.row=o+1,e.rs<1&&(r.splice(t,1),t--)));if(o===s&&h===l){i._logical_cellIndex=u;break}d>0&&a.push({index:u,cs:c+1,rs:d,row:-1}),n+=c}r=r.concat(a).sort((function(e,t){return e.index-t.index})),a=[]}a=null,r=null}},editTable:function(e,t){const i=this.plugins.table,n=this.context.table,l=n._element,o="row"===e;if(o){const e=n._trElement.parentNode;if(/^THEAD$/i.test(e.nodeName)){if("up"===t)return;if(!e.nextElementSibling||!/^TBODY$/i.test(e.nextElementSibling.nodeName))return void(l.innerHTML+=""+i.createCells.call(this,"td",n._logical_cellCnt,!1)+"")}}if(i._ref){const e=n._tdElement,l=i._selectedCells;if(o)if(t)i.setCellInfo.call(this,"up"===t?l[0]:l[l.length-1],!0),i.editRow.call(this,t,e);else{let e=l[0].parentNode;const n=[l[0]];for(let t,i=1,o=l.length;is&&s>t&&(e[l].rowSpan=i+a,c-=n)}if(n){const e=r[o+1];if(e){const t=[];let i=r[o].cells,n=0;for(let e,l,o=0,s=i.length;o1&&(e.rowSpan-=1,t.push({cell:e.cloneNode(!1),index:l}));if(t.length>0){let l=t.shift();i=e.cells,n=0;for(let o,s,a=0,r=i.length;a=l.index)||(a--,n--,n+=l.cell.colSpan-1,e.insertBefore(l.cell,o),l=t.shift(),l));a++);if(l){e.appendChild(l.cell);for(let i=0,n=t.length;i0){const e=!o[b+1];for(let t,i=0;i_||(p>=t.index?(f+=t.cs,p=b+f,t.rs-=1,t.row=_+1,t.rs<1&&(d.splice(i,1),i--)):e&&(t.rs-=1,t.row=_+1,t.rs<1&&(d.splice(i,1),i--)))}i>0&&c.push({rs:i,cs:r+1,index:p,row:-1}),p>=t&&p+r<=t+s?h.push(e):p<=t+s&&p+r>=t?e.colSpan-=n.getOverlapRangeAtIndex(a,a+s,p,p+r):i>0&&(pt+s)&&g.push({cell:e,i:_,rs:_+i}),f+=r}else{if(b>=t)break;if(r>0){if(u<1&&r+b>=t){e.colSpan+=1,t=null,u=i+1;break}t-=r}if(!m){for(let e,i=0;i0){u-=1;continue}null!==t&&o.length>0&&(p=this.plugins.table.createCells.call(this,o[0].nodeName,0,!0),p=e.insertBefore(p,o[t]))}}if(l){let e,t;for(let i,l=0,o=h.length;l1)c.colSpan=this._w.Math.floor(e/2),l.colSpan=e-c.colSpan,s.insertBefore(c,l.nextElementSibling);else{let t=[],i=[];for(let s,r,c=0,d=n._rowCnt;c0)for(let e,t=0;tc||(u>=e.index?(r+=e.cs,u+=e.cs,e.rs-=1,e.row=c+1,e.rs<1&&(i.splice(t,1),t--)):h===g-1&&(e.rs-=1,e.row=c+1,e.rs<1&&(i.splice(t,1),t--)));if(u<=a&&d>0&&t.push({index:u,cs:o+1,rs:d,row:-1}),n!==l&&u<=a&&u+o>=a+e-1){n.colSpan+=1;break}if(u>a)break;r+=o}i=i.concat(t).sort((function(e,t){return e.index-t.index})),t=[]}s.insertBefore(c,l.nextElementSibling)}}else{const e=l.rowSpan;if(c.colSpan=l.colSpan,e>1){c.rowSpan=this._w.Math.floor(e/2);const i=e-c.rowSpan,n=[],r=t.getArrayIndex(o,s)+i;for(let e,t,i=0;i=a));c++)l=e[c],o=l.rowSpan-1,o>0&&o+i>=r&&s=h.index&&(r+=h.cs,l+=h.cs,h=n.shift()),l>=a||o===s-1){d.insertBefore(c,e.nextElementSibling);break}r+=t}l.rowSpan=i}else{c.rowSpan=l.rowSpan;const e=t.createElement("TR");e.appendChild(c);for(let e,t=0;t=r&&(e[i].rowSpan+=1)}const i=n._physical_cellIndex,a=s.cells;for(let e=0,t=a.length;e0&&s+o>=n&&(e.rowSpan-=i.getOverlapRangeAtIndex(n,l,s,s+o));else o.push(e[s]);for(let e=0,t=o.length;e"+this.plugins.table.createCells.call(this,"th",this.context.table._logical_cellCnt,!1)+"",n.insertBefore(t,n.firstElementChild)}e.toggleClass(t,"active"),/TH/i.test(this.context.table._tdElement.nodeName)?this.controllersOff():this.plugins.table.setPositionControllerDiv.call(this,this.context.table._tdElement,!1)},resizeTable:function(){const e=this.context.table,t=e.resizeIcon,i=e.resizeText;let n="se-icon-expansion",l="se-icon-reduction",o=e.minText,s="100%";e._maxWidth||(n="se-icon-reduction",l="se-icon-expansion",o=e.maxText,s="auto"),this.util.removeClass(t,n),this.util.addClass(t,l),this.util.changeTxt(i,o),e._element.style.width=s},setActiveButton:function(e,t){const i=this.context.table;t&&e!==t?(i.splitButton.setAttribute("disabled",!0),i.mergeButton.removeAttribute("disabled")):(i.splitButton.removeAttribute("disabled"),i.mergeButton.setAttribute("disabled",!0))},_bindOnSelect:null,_bindOffSelect:null,_bindOffShift:null,_selectedCells:null,_shift:!1,_fixedCell:null,_fixedCellName:null,_selectedCell:null,_selectedTable:null,_ref:null,_toggleEditor:function(e){this.context.element.wysiwyg.setAttribute("contenteditable",e),e?this.util.removeClass(this.context.element.wysiwyg,"se-disabled"):this.util.addClass(this.context.element.wysiwyg,"se-disabled")},_offCellMultiSelect:function(e){e.stopPropagation();const t=this.plugins.table;t._shift?t._initBind&&(this._wd.removeEventListener("touchmove",t._initBind),t._initBind=null):(t._removeEvents.call(this),t._toggleEditor.call(this,!0)),t._fixedCell&&t._selectedTable&&(t.setActiveButton.call(this,t._fixedCell,t._selectedCell),t.call_controller_tableEdit.call(this,t._selectedCell||t._fixedCell),t._selectedCells=t._selectedTable.querySelectorAll(".se-table-selected-cell"),this.focusEdge(t._selectedCell||t._fixedCell),t._shift||(t._fixedCell=null,t._selectedCell=null,t._fixedCellName=null))},_onCellMultiSelect:function(e){const t=this.plugins.table,i=this.util.getParentElement(e.target,this.util.isCell);if(t._shift)i===t._fixedCell?t._toggleEditor.call(this,!0):t._toggleEditor.call(this,!1);else if(!t._ref){if(i===t._fixedCell)return;t._toggleEditor.call(this,!1)}i&&i!==t._selectedCell&&t._fixedCellName===i.nodeName&&t._selectedTable===this.util.getParentElement(i,"TABLE")&&(t._selectedCell=i,t._setMultiCells.call(this,t._fixedCell,i))},_setMultiCells:function(e,t){const i=this.plugins.table,n=i._selectedTable.rows,l=this.util,o=i._selectedTable.querySelectorAll(".se-table-selected-cell");for(let e=0,t=o.length;e0)for(let e,t=0;td||(u>=e.index?(o+=e.cs,u+=e.cs,e.rs-=1,e.row=d+1,e.rs<1&&(a.splice(t,1),t--)):p===m-1&&(e.rs-=1,e.row=d+1,e.rs<1&&(a.splice(t,1),t--)));if(s){if(n!==e&&n!==t||(c.cs=null!==c.cs&&c.csu+h?c.ce:u+h,c.rs=null!==c.rs&&c.rsd+g?c.re:d+g,c._i+=1),2===c._i){s=!1,a=[],r=[],d=-1;break}}else if(l.getOverlapRangeAtIndex(c.cs,c.ce,u,u+h)&&l.getOverlapRangeAtIndex(c.rs,c.re,d,d+g)){const e=c.csu+h?c.ce:u+h,i=c.rsd+g?c.re:d+g;if(c.cs!==e||c.ce!==t||c.rs!==i||c.re!==o){c.cs=e,c.ce=t,c.rs=i,c.re=o,d=-1,a=[],r=[];break}l.addClass(n,"se-table-selected-cell")}g>0&&r.push({index:u,cs:h+1,rs:g,row:-1}),o+=n.colSpan-1}a=a.concat(r).sort((function(e,t){return e.index-t.index})),r=[]}},_removeEvents:function(){const e=this.plugins.table;e._initBind&&(this._wd.removeEventListener("touchmove",e._initBind),e._initBind=null),e._bindOnSelect&&(this._wd.removeEventListener("mousedown",e._bindOnSelect),this._wd.removeEventListener("mousemove",e._bindOnSelect),e._bindOnSelect=null),e._bindOffSelect&&(this._wd.removeEventListener("mouseup",e._bindOffSelect),e._bindOffSelect=null),e._bindOffShift&&(this._wd.removeEventListener("keyup",e._bindOffShift),e._bindOffShift=null)},_initBind:null,onTableCellMultiSelect:function(e,t){const i=this.plugins.table;i._removeEvents.call(this),this.controllersOff(),i._shift=t,i._fixedCell=e,i._fixedCellName=e.nodeName,i._selectedTable=this.util.getParentElement(e,"TABLE");const n=i._selectedTable.querySelectorAll(".se-table-selected-cell");for(let e=0,t=n.length;e-1?(i=e.toLowerCase(),s="pre"===i||"blockquote"===i?"range":"replace",r=/^h/.test(i)?i.match(/\d+/)[0]:"",a=t["tag_"+(r?"h":i)]+r,c=""):(i=e.tag.toLowerCase(),s=e.command,a=e.name||i,c=e.class?' class="'+e.class+'"':""),o+='
  • ";return o+="",i.innerHTML=o,i},on:function(){const e=this.context.formatBlock,t=e._formatList,i=(this.commandMap.FORMAT.getAttribute("data-focus")||"P").toLowerCase();if(i!==e.currentFormat){for(let e=0,n=t.length;e('+t.toolbar.default+")";for(let e,t=0,i=n.length;t";return l+="",i.innerHTML=l,i},on:function(){const e=this.context.lineHeight,t=e._sizeList,i=this.util.getFormatElement(this.getSelectionNode()).style.lineHeight+"";if(i!==e.currentSize){for(let e=0,n=t.length;e";return i+="",t.innerHTML=i,t},pickup:function(e){if(!/^BUTTON$/i.test(e.target.tagName))return!1;e.preventDefault(),e.stopPropagation();const t=this.context.option.templates[e.target.getAttribute("data-value")];if(!t.html)throw this.submenuOff(),Error('[SUNEDITOR.template.fail] cause : "templates[i].html not found"');this.setContents(t.html),this.submenuOff()}},paragraphStyle:{name:"paragraphStyle",add:function(e,t){const i=e.context;i.paragraphStyle={_classList:null};let n=this.setSubmenu.call(e);n.querySelector("ul").addEventListener("click",this.pickUp.bind(e)),i.paragraphStyle._classList=n.querySelectorAll("li button"),t.parentNode.appendChild(n),n=null},setSubmenu:function(){const e=this.context.option,t=this.util.createElement("DIV");t.className="se-submenu se-list-layer";const i=this.lang.menu,n={spaced:{name:i.spaced,class:"__se__p-spaced",_class:""},bordered:{name:i.bordered,class:"__se__p-bordered",_class:""},neon:{name:i.neon,class:"__se__p-neon",_class:""}},l=e.paragraphStyles&&0!==e.paragraphStyles.length?e.paragraphStyles:["spaced","bordered","neon"];let o='
      ';for(let e,t,i,s,a=0,r=l.length;a
    "}return o+="",t.innerHTML=o,t},on:function(){const e=this.context.paragraphStyle._classList,t=this.util.getFormatElement(this.getSelectionNode());for(let i=0,n=e.length;i"}return l+="",t.innerHTML=l,t},on:function(){const e=this.util,t=this.context.textStyle._styleList,i=this.getSelectionNode();for(let n,l,o,s=0,a=t.length;s'+e.dialogBox.linkBox.title+'
    ",t},setController_LinkButton:function(){const e=this.lang,t=this.util.createElement("DIV");return t.className="se-controller se-controller-link",t.innerHTML='
    ",t},submit:function(e){this.showLoading(),e.preventDefault(),e.stopPropagation();const t=function(){if(0===this.context.link.focusElement.value.trim().length)return!1;const e=this.context.link,t=e.focusElement.value,i=e.linkAnchorText,n=0===i.value.length?t:i.value;if(this.context.dialog.updateModal)e._linkAnchor.href=t,e._linkAnchor.textContent=n,e._linkAnchor.target=e.linkNewWindowCheck.checked?"_blank":"",this.setRange(e._linkAnchor.childNodes[0],0,e._linkAnchor.childNodes[0],e._linkAnchor.textContent.length);else{const i=this.util.createElement("A");i.href=t,i.textContent=n,i.target=e.linkNewWindowCheck.checked?"_blank":"",this.insertNode(i),this.setRange(i.childNodes[0],0,i.childNodes[0],i.textContent.length)}this.history.push(!1),e.focusElement.value="",e.linkAnchorText.value=""}.bind(this);try{t()}finally{this.plugins.dialog.close.call(this),this.closeLoading(),this.focus()}return!1},on:function(e){e||(this.context.link.linkAnchorText.value=this.getSelection().toString())},call_controller_linkButton:function(e){this.editLink=this.context.link._linkAnchor=e;const t=this.context.link.linkBtn,i=t.querySelector("a");i.href=e.href,i.title=e.textContent,i.textContent=e.textContent;const n=this.util.getOffset(e,this.context.element.wysiwygFrame);t.style.top=n.top+e.offsetHeight+10+"px",t.style.left=n.left-this.context.element.wysiwygFrame.scrollLeft+"px",t.style.display="block";const l=this.context.element.wysiwygFrame.offsetWidth-(t.offsetLeft+t.offsetWidth);l<0?(t.style.left=t.offsetLeft+l+"px",t.firstElementChild.style.left=20-l+"px"):t.firstElementChild.style.left="20px",this.controllersOn(t)},onClick_linkBtn:function(e){e.stopPropagation();const t=e.target.getAttribute("data-command")||e.target.parentNode.getAttribute("data-command");t&&(e.preventDefault(),/update/.test(t)?(this.context.link.focusElement.value=this.context.link._linkAnchor.href,this.context.link.linkAnchorText.value=this.context.link._linkAnchor.textContent,this.context.link.linkNewWindowCheck.checked=!!/_blank/i.test(this.context.link._linkAnchor.target),this.plugins.dialog.open.call(this,"link",!0)):/unlink/.test(t)?(this.setRange(this.context.link._linkAnchor,0,this.context.link._linkAnchor,1),this.nodeChange(null,null,["A"],!1)):(this.util.removeItem(this.context.link._linkAnchor),this.context.link._linkAnchor=null,this.focus(),this.history.push(!1)),this.controllersOff())},init:function(){const e=this.context.link;e.linkBtn.style.display="none",e._linkAnchor=null,e.focusElement.value="",e.linkAnchorText.value="",e.linkNewWindowCheck.checked=!1}},image:{name:"image",add:function(e){e.addModule([l,o,s]);const t=e.context;t.image={sizeUnit:t.option._imageSizeUnit,_linkElement:null,_container:null,_cover:null,_element:null,_element_w:1,_element_h:1,_element_l:0,_element_t:0,_defaultSizeX:"auto",_defaultSizeY:"auto",_origin_w:"auto"===t.option.imageWidth?"":t.option.imageWidth,_origin_h:"",_altText:"",_caption:null,captionCheckEl:null,_linkValue:"",_align:"none",_captionChecked:!1,_proportionChecked:!0,_floatClassRegExp:"__se__float\\-[a-z]+",_xmlHttp:null,_captionShow:!0,_resizing:t.option.imageResizing,_rotation:t.option.imageRotation,_resizeDotHide:!t.option.imageHeightShow,_uploadFileLength:0,_onlyPercentage:t.option.imageSizeOnlyPercentage,_ratio:!1,_ratioX:1,_ratioY:1};let i=this.setDialog.call(e);t.image.modal=i,t.image.imgUrlFile=i.querySelector("._se_image_url"),t.image.imgInputFile=t.image.focusElement=i.querySelector("._se_image_file"),t.image.altText=i.querySelector("._se_image_alt"),t.image.imgLink=i.querySelector("._se_image_link"),t.image.imgLinkNewWindowCheck=i.querySelector("._se_image_link_check"),t.image.captionCheckEl=i.querySelector("._se_image_check_caption"),t.image.modal.querySelector(".se-dialog-tabs").addEventListener("click",this.openTab.bind(e)),t.image.modal.querySelector(".se-btn-primary").addEventListener("click",this.submit.bind(e)),t.image.proportion={},t.image.inputX={},t.image.inputY={},t.option.imageResizing&&(t.image.proportion=i.querySelector("._se_image_check_proportion"),t.image.inputX=i.querySelector("._se_image_size_x"),t.image.inputY=i.querySelector("._se_image_size_y"),t.image.inputX.value=t.option.imageWidth,t.image.inputX.addEventListener("keyup",this.setInputSize.bind(e,"x")),t.image.inputY.addEventListener("keyup",this.setInputSize.bind(e,"y")),t.image.inputX.addEventListener("change",this.setRatio.bind(e)),t.image.inputY.addEventListener("change",this.setRatio.bind(e)),t.image.proportion.addEventListener("change",this.setRatio.bind(e)),i.querySelector(".se-dialog-btn-revert").addEventListener("click",this.sizeRevert.bind(e))),t.dialog.modal.appendChild(i),i=null},setDialog:function(){const e=this.context.option,t=this.lang,i=this.util.createElement("DIV");i.className="se-dialog-content",i.style.display="none";let n='
    '+t.dialogBox.imageBox.title+'
    ';if(e.imageFileInput&&(n+='
    '),e.imageUrlInput&&(n+='
    '),n+='
    ',e.imageResizing){const i=e.imageSizeOnlyPercentage,l=i?' style="display: none !important;"':"",o=e.imageHeightShow?"":' style="display: none !important;"';n+='
    ',i||!e.imageHeightShow?n+='
    ":n+='
    ",n+=' '+t.dialogBox.proportion+'
    '}return n+='
    ",i.innerHTML=n,i},openTab:function(e){const t=this.context.image.modal,i="init"===e?t.querySelector("._se_tab_link"):e.target;if(!/^BUTTON$/i.test(i.tagName))return!1;const n=i.getAttribute("data-tab-link");let l,o,s;for(o=t.getElementsByClassName("_se_tab_content"),l=0;l0){let t=0;const i=[];for(let n=0,l=e.length;n0){let e=0;const i=this._variable._imagesInfo;for(let t=0,n=i.length;tn){const i="[SUNEDITOR.imageUpload.fail] Size of uploadable total images: "+n/1e3+"KB";return this._imageUploadError(i,{limitSize:n,currentSize:e,uploadSize:t})&&s.open.call(this,i),void this.closeLoading()}}this.context.image._uploadFileLength=i.length;const l=this.context.option.imageUploadUrl,o=this.context.option.imageUploadHeader,a=this.context.dialog.updateModal?1:i.length;if("string"==typeof l&&l.length>0){const e=new FormData;for(let t=0;t0)for(let e in o)this.context.image._xmlHttp.setRequestHeader(e,o[e]);this.context.image._xmlHttp.send(e)}else for(let e=0;e0){const n=this.util.createElement("A");return n.href=/^https?:\/\//.test(t)?t:"http://"+t,n.target=i?"_blank":"",n.setAttribute("data-image-link","image"),e.setAttribute("data-image-link",t),n.appendChild(e),n}return e},setInputSize:function(e,t){t&&32===t.keyCode?t.preventDefault():this.plugins.resizing._module_setInputSize.call(this,this.context.image,e)},setRatio:function(){this.plugins.resizing._module_setRatio.call(this,this.context.image)},submit:function(e){const t=this.context.image,i=this.plugins.image;this.showLoading(),e.preventDefault(),e.stopPropagation(),t._linkValue=t.imgLink.value,t._altText=t.altText.value,t._align=t.modal.querySelector('input[name="suneditor_image_radio"]:checked').value,t._captionChecked=t.captionCheckEl.checked,t._resizing&&(t._proportionChecked=t.proportion.checked);try{this.context.dialog.updateModal&&i.update_image.call(this,!1,!1,!1),t.imgInputFile&&t.imgInputFile.files.length>0?i.onRender_imgInput.call(this):t.imgUrlFile&&t.imgUrlFile.value.trim().length>0?i.onRender_imgUrl.call(this):this.closeLoading()}catch(e){throw this.closeLoading(),Error('[SUNEDITOR.image.submit.fail] cause : "'+e.message+'"')}finally{this.plugins.dialog.close.call(this)}return!1},setImagesInfo:function(e,t){const i=this._variable._imagesInfo;let n=e.getAttribute("data-index"),l=null,o="";if(!n||this._imagesInfoInit)o="create",n=this._variable._imageIndex,this._variable._imageIndex++,e.setAttribute("data-index",n),e.setAttribute("data-file-name",t.name),e.setAttribute("data-file-size",t.size),l={src:e.src,index:1*n,name:t.name,size:t.size},i.push(l);else{o="update",n*=1;for(let e=0,t=i.length;e-1||(i.splice(t,1),this._imageUpload(null,e,"delete",null,0),t--);this.context.resizing._resize_plugin=""},_onload_image:function(e,t){t&&(this.plugins.image.setImagesInfo.call(this,e,t),this.history.push(!0))},create_image:function(e,t,i,n,l,o,s){const a=this.context.image;this.context.resizing._resize_plugin="image";let r=this.util.createElement("IMG");r.addEventListener("load",this.plugins.image._onload_image.bind(this,r,s)),r.src=e,r.alt=a._altText,r=this.plugins.image.onRender_link.call(this,r,t,i),r.setAttribute("data-rotate","0"),a._resizing&&r.setAttribute("data-proportion",a._proportionChecked);const c=this.plugins.resizing.set_cover.call(this,r),d=this.plugins.resizing.set_container.call(this,c,"se-image-container");a._captionChecked&&(a._caption=this.plugins.resizing.create_caption.call(this),a._caption.setAttribute("contenteditable",!1),c.appendChild(a._caption)),a._element=r,a._cover=c,a._container=d,this.plugins.image.applySize.call(this),this.plugins.image.setAlign.call(this,o,r,c,d),this.insertComponent(d,!0),this.context.resizing._resize_plugin=""},update_image:function(e,t,i){const n=this.context.image,l=n._linkValue;let o,s=n._element,a=n._cover,r=n._container,c=!1;null===a&&(c=!0,s=n._element.cloneNode(!0),a=this.plugins.resizing.set_cover.call(this,s)),null===r&&(a=a.cloneNode(!0),c=!0,r=this.plugins.resizing.set_container.call(this,a,"se-image-container")),c&&(r.innerHTML="",r.appendChild(a));const d=this.util.isNumber(n.inputX.value)?n.inputX.value+n.sizeUnit:n.inputX.value,u=this.util.isNumber(n.inputY.value)?n.inputY.value+n.sizeUnit:n.inputY.value;if(o=/%$/.test(s.style.width)?d!==r.style.width||u!==r.style.height:d!==s.style.width||u!==s.style.height,s.alt=n._altText,n._captionChecked?n._caption||(n._caption=this.plugins.resizing.create_caption.call(this),a.appendChild(n._caption)):n._caption&&(this.util.removeItem(n._caption),n._caption=null),l.trim().length>0)if(null!==n._linkElement)n._linkElement.href=l,n._linkElement.target=n.imgLinkNewWindowCheck.checked?"_blank":"",s.setAttribute("data-image-link",l);else{let e=this.plugins.image.onRender_link.call(this,s,l,this.context.image.imgLinkNewWindowCheck.checked);a.insertBefore(e,n._caption)}else if(null!==n._linkElement){const e=s;e.setAttribute("data-image-link","");let t=e.cloneNode(!0);a.removeChild(n._linkElement),a.insertBefore(t,n._caption),s=t}if(c){const e=this.util.isRangeFormatElement(n._element.parentNode)||this.util.isWysiwygDiv(n._element.parentNode)?n._element:/^A$/i.test(n._element.parentNode.nodeName)?n._element.parentNode:this.util.getFormatElement(n._element)||n._element;e.parentNode.insertBefore(r,e),this.util.removeItem(e),s=r.querySelector("img"),n._element=s,n._cover=a,n._container=r}!n._onlyPercentage&&o&&!e&&(/\d+/.test(s.style.height)||this.context.resizing._rotateVertical&&n._captionChecked)&&(/%$/.test(n.inputX.value)||/%$/.test(n.inputY.value)?this.plugins.resizing.resetTransform.call(this,s):this.plugins.resizing.setTransformSize.call(this,s,this.util.getNumber(n.inputX.value,0),this.util.getNumber(n.inputY.value,0)));if(n._resizing&&(s.setAttribute("data-proportion",n._proportionChecked),o&&this.plugins.image.applySize.call(this)),this.plugins.image.setAlign.call(this,null,s,null,null),e&&this.plugins.image.setImagesInfo.call(this,s,{name:s.getAttribute("data-file-name")||s.src.split("/").pop(),size:s.getAttribute("data-file-size")||0}),t){this.plugins.image.init.call(this);const e=this.plugins.resizing.call_controller_resize.call(this,s,"image");this.plugins.image.onModifyMode.call(this,s,e)}i||this.history.push(!1)},update_src:function(e,t,i){t.src=e,this._w.setTimeout(this.plugins.image.setImagesInfo.bind(this,t,i))},onModifyMode:function(e,t){const i=this.context.image;i._linkElement=/^A$/i.test(e.parentNode.nodeName)?e.parentNode:null,i._element=e,i._cover=this.util.getParentElement(e,"FIGURE"),i._container=this.util.getParentElement(e,this.util.isComponent),i._caption=this.util.getChildElement(i._cover,"FIGCAPTION"),i._align=e.getAttribute("data-align")||"none",t&&(i._element_w=t.w,i._element_h=t.h,i._element_t=t.t,i._element_l=t.l);let n=i._element.getAttribute("data-size")||i._element.getAttribute("data-origin");n?(n=n.split(","),i._origin_w=n[0],i._origin_h=n[1]):t&&(i._origin_w=t.w,i._origin_h=t.h)},openModify:function(e){const t=this.context.image;t.imgUrlFile.value=t._element.src,t._altText=t.altText.value=t._element.alt,t._linkValue=t.imgLink.value=null===t._linkElement?"":t._linkElement.href,t.imgLinkNewWindowCheck.checked=t._linkElement&&"_blank"===t._linkElement.target,t.modal.querySelector('input[name="suneditor_image_radio"][value="'+t._align+'"]').checked=!0,t._align=t.modal.querySelector('input[name="suneditor_image_radio"]:checked').value,t._captionChecked=t.captionCheckEl.checked=!!t._caption,t._resizing&&this.plugins.resizing._module_setModifyInputSize.call(this,t,this.plugins.image),e||this.plugins.dialog.open.call(this,"image",!0)},on:function(e){if(!e){const e=this.context.image;e.inputX.value=e._origin_w=this.context.option.imageWidth===e._defaultSizeX?"":this.context.option.imageWidth,e.inputY.value=e._origin_h="",e.inputY.disabled=!0,e.proportion.disabled=!0}},sizeRevert:function(){this.plugins.resizing._module_sizeRevert.call(this,this.context.image)},applySize:function(e,t){const i=this.context.image;return e||(e=i.inputX.value),t||(t=i.inputY.value),i._onlyPercentage&&e||/%$/.test(e)?(this.plugins.image.setPercentSize.call(this,e,t),!0):(e&&"auto"!==e||t&&"auto"!==t?this.plugins.image.setSize.call(this,e,t,!1):this.plugins.image.setAutoSize.call(this),!1)},setSize:function(e,t,i){const n=this.context.image;this.plugins.image.cancelPercentAttr.call(this),n._element.style.width=this.util.isNumber(e)?e+n.sizeUnit:e,n._element.style.height=this.util.isNumber(t)?t+n.sizeUnit:/%$/.test(t)?"":t,"center"===n._align&&this.plugins.image.setAlign.call(this,null,null,null,null),i||n._element.removeAttribute("data-percentage"),this.plugins.resizing._module_saveCurrentSize.call(this,n)},setAutoSize:function(){const e=this.context.image;this.plugins.resizing.resetTransform.call(this,e._element),this.plugins.image.cancelPercentAttr.call(this),e._element.style.maxWidth="",e._element.style.width="",e._element.style.height="",e._cover.style.width="",e._cover.style.height="",this.plugins.image.setAlign.call(this,null,null,null,null),e._element.setAttribute("data-percentage","auto,auto"),this.plugins.resizing._module_saveCurrentSize.call(this,e)},setOriginSize:function(){const e=this.context.image;e._element.removeAttribute("data-percentage"),this.plugins.resizing.resetTransform.call(this,e._element),this.plugins.image.cancelPercentAttr.call(this);const t=(e._element.getAttribute("data-origin")||"").split(","),i=t[0],n=t[1];t&&(e._onlyPercentage||/%$/.test(i)&&(/%$/.test(n)||!/\d/.test(n))?this.plugins.image.setPercentSize.call(this,i,n):this.plugins.image.setSize.call(this,i,n),this.plugins.resizing._module_saveCurrentSize.call(this,e))},setPercentSize:function(e,t){const i=this.context.image;t=!t||/%$/.test(t)||this.util.getNumber(t,0)?this.util.isNumber(t)?t+i.sizeUnit:t||"":this.util.isNumber(t)?t+"%":t;const n=/%$/.test(t);i._container.style.width=this.util.isNumber(e)?e+"%":e,i._container.style.height="",i._cover.style.width="100%",i._cover.style.height=n?t:"",i._element.style.width="100%",i._element.style.height=n?"":t,i._element.style.maxWidth="","center"===i._align&&this.plugins.image.setAlign.call(this,null,null,null,null),i._element.setAttribute("data-percentage",e+","+t),this.plugins.resizing.setCaptionPosition.call(this,i._element),this.plugins.resizing._module_saveCurrentSize.call(this,i)},cancelPercentAttr:function(){const e=this.context.image;e._cover.style.width="",e._cover.style.height="",e._container.style.width="",e._container.style.height="",this.util.removeClass(e._container,this.context.image._floatClassRegExp),this.util.addClass(e._container,"__se__float-"+e._align),"center"===e._align&&this.plugins.image.setAlign.call(this,null,null,null,null)},setAlign:function(e,t,i,n){const l=this.context.image;e||(e=l._align),t||(t=l._element),i||(i=l._cover),n||(n=l._container),i.style.margin=e&&"none"!==e?"auto":"0",/%$/.test(t.style.width)&&"center"===e?(n.style.minWidth="100%",i.style.width=n.style.width):(n.style.minWidth="",i.style.width=this.context.resizing._rotateVertical?t.style.height||t.offsetHeight:t.style.width&&"auto"!==t.style.width?t.style.width||"100%":""),this.util.hasClass(n,"__se__float-"+e)||(this.util.removeClass(n,l._floatClassRegExp),this.util.addClass(n,"__se__float-"+e),t.setAttribute("data-align",e))},resetAlign:function(){const e=this.context.image;e._element.setAttribute("data-align",""),e._align="none",e._cover.style.margin="0",this.util.removeClass(e._container,e._floatClassRegExp)},destroy:function(e){const t=e||this.context.image._element,i=this.util.getParentElement(t,this.util.isComponent)||t,n=1*t.getAttribute("data-index");let l=i.previousElementSibling||i.nextElementSibling;if(this.util.removeItem(i),this.plugins.image.init.call(this),this.controllersOff(),this.focusEdge(l),n>=0){const e=this._variable._imagesInfo;for(let t=0,i=e.length;t'+t.dialogBox.videoBox.title+'
    ';if(e.videoResizing){const i=e.videoRatioList||[{name:"16:9",value:.5625},{name:"4:3",value:.75},{name:"21:9",value:.4285}],l=e.videoRatio,o=e.videoSizeOnlyPercentage,s=o?' style="display: none !important;"':"",a=e.videoHeightShow?"":' style="display: none !important;"',r=e.videoRatioShow?"":' style="display: none !important;"',c=o||e.videoHeightShow||e.videoRatioShow?"":' style="display: none !important;"';n+='
    "}return n+='
    ",i.innerHTML=n,i},setVideoRatio:function(e){const t=this.context.video,i=e.target.options[e.target.selectedIndex].value;t._defaultSizeY=t._videoRatio=i?100*i+"%":t._defaultSizeY,t.inputY.placeholder=i?100*i+"%":"",t.inputY.value=""},setInputSize:function(e,t){if(t&&32===t.keyCode)return void t.preventDefault();const i=this.context.video;this.plugins.resizing._module_setInputSize.call(this,i,e),"y"===e&&this.plugins.video.setVideoRatioSelect.call(this,t.target.value||i._videoRatio)},setRatio:function(){this.plugins.resizing._module_setRatio.call(this,this.context.video)},_onload_video:function(e){this.plugins.video.setVideosInfo.call(this,e)},submitAction:function(){if(0===this.context.video.focusElement.value.trim().length)return!1;this.context.resizing._resize_plugin="video";const e=this.context.video;let t=null,i=null,n=null,l=e.focusElement.value.trim();if(e._align=e.modal.querySelector('input[name="suneditor_video_radio"]:checked').value,/^$/.test(l))t=(new this._w.DOMParser).parseFromString(l,"text/html").querySelector("iframe");else{if(t=this.util.createElement("IFRAME"),/youtu\.?be/.test(l)&&(/^http/.test(l)||(l="https://"+l),l=l.replace("watch?v=",""),/^\/\/.+\/embed\//.test(l)||(l=l.replace(l.match(/\/\/.+\//)[0],"//www.youtube.com/embed/").replace("&","?&")),e._youtubeQuery.length>0))if(/\?/.test(l)){const t=l.split("?");l=t[0]+"?"+e._youtubeQuery+"&"+t[1]}else l+="?"+e._youtubeQuery;t.src=l}this.context.dialog.updateModal?(e._element.src!==t.src&&(e._element.src=t.src),n=e._container,i=this.util.getParentElement(e._element,"FIGURE"),t=e._element):(t.frameBorder="0",t.allowFullscreen=!0,t.addEventListener("load",this.plugins.video._onload_video.bind(this,t)),e._element=t,i=this.plugins.resizing.set_cover.call(this,t),n=this.plugins.resizing.set_container.call(this,i,"se-video-container"),this._variable._videosCnt++),e._cover=i,e._container=n;const o=this.plugins.resizing._module_getSizeX.call(this,e)!==(e.inputX.value||e._defaultSizeX)||this.plugins.resizing._module_getSizeY.call(this,e)!==(e.inputY.value||e._videoRatio),s=!this.context.dialog.updateModal||o;e._resizing&&(this.context.video._proportionChecked=e.proportion.checked,t.setAttribute("data-proportion",e._proportionChecked));let a=!1;s&&(a=this.plugins.video.applySize.call(this)),a&&"center"===e._align||this.plugins.video.setAlign.call(this,null,t,i,n),this.context.dialog.updateModal?e._resizing&&this.context.resizing._rotateVertical&&s&&this.plugins.resizing.setTransformSize.call(this,t,null,null):this.insertComponent(n,!1),this.context.resizing._resize_plugin="",this.context.dialog.updateModal&&this.history.push(!1)},setVideosInfo:function(e){if(!e.getAttribute("data-origin")){const t=this.util.getParentElement(e,this.util.isComponent),i=this.util.getParentElement(e,"FIGURE"),n=this.plugins.resizing._module_getSizeX.call(this,this.context.video,e,i,t),l=this.plugins.resizing._module_getSizeY.call(this,this.context.video,e,i,t);e.setAttribute("data-origin",n+","+l),e.setAttribute("data-size",n+","+l)}},submit:function(e){this.showLoading(),e.preventDefault(),e.stopPropagation();try{this.plugins.video.submitAction.call(this)}finally{this.plugins.dialog.close.call(this),this.closeLoading()}return this.focus(),!1},_update_videoCover:function(e){const t=this.context.video;e.frameBorder="0",e.allowFullscreen=!0,e.onload=e.addEventListener("load",this.plugins.video._onload_video.bind(this,e));const i=this.util.getParentElement(e,this.util.isComponent)||this.util.getParentElement(e,function(e){return this.isWysiwygDiv(e.parentNode)}.bind(this.util));t._element=e=e.cloneNode(!1);const n=t._cover=this.plugins.resizing.set_cover.call(this,e),l=t._container=this.plugins.resizing.set_container.call(this,n,"se-video-container"),o=i.getElementsByTagName("FIGCAPTION")[0];let s=null;o&&(s=this.util.createElement("DIV"),s.innerHTML=o.innerHTML,this.util.removeItem(o));const a=(e.getAttribute("data-size")||e.getAttribute("data-origin")||"").split(",");this.plugins.video.applySize.call(this,a[0]||this.context.option.videoWidth,a[1]||""),i.parentNode.insertBefore(l,i),s&&i.parentNode.insertBefore(s,i),this.util.removeItem(i)},onModifyMode:function(e,t){const i=this.context.video;i._element=e,i._cover=this.util.getParentElement(e,"FIGURE"),i._container=this.util.getParentElement(e,this.util.isComponent),i._align=e.getAttribute("data-align")||"none",i._element_w=t.w,i._element_h=t.h,i._element_t=t.t,i._element_l=t.l;let n=i._element.getAttribute("data-size")||i._element.getAttribute("data-origin");n?(n=n.split(","),i._origin_w=n[0],i._origin_h=n[1]):(i._origin_w=t.w,i._origin_h=t.h)},openModify:function(e){const t=this.context.video;if(t.focusElement.value=t._element.src,t.modal.querySelector('input[name="suneditor_video_radio"][value="'+t._align+'"]').checked=!0,t._resizing){this.plugins.resizing._module_setModifyInputSize.call(this,t,this.plugins.video);const e=t._videoRatio=this.plugins.resizing._module_getSizeY.call(this,t);this.plugins.video.setVideoRatioSelect.call(this,e)||(t.inputY.value=t._onlyPercentage?this.util.getNumber(e,2):e)}e||this.plugins.dialog.open.call(this,"video",!0)},on:function(e){if(!e){const e=this.context.video;e.inputX.value=e._origin_w=this.context.option.videoWidth===e._defaultSizeX?"":this.context.option.videoWidth,e.inputY.value=e._origin_h="",e.proportion.disabled=!0}},setVideoRatioSelect:function(e){let t=!1;const i=this.context.video,n=i.videoRatioOption.options;/%$/.test(e)||i._onlyPercentage?e=this.util.getNumber(e,2)/100+"":(!this.util.isNumber(e)||1*e>=1)&&(e=""),i.inputY.placeholder="";for(let l=0,o=n.length;l0||!i.style.width)&&t._update_videoCover.call(this,i);this.context.resizing._resize_plugin=""},sizeRevert:function(){this.plugins.resizing._module_sizeRevert.call(this,this.context.video)},applySize:function(e,t){const i=this.context.video;return e||(e=i.inputX.value),t||(t=i.inputY.value),i._onlyPercentage||/%$/.test(e)||!e?(this.plugins.video.setPercentSize.call(this,e||"100%",t||i._videoRatio),!0):(e&&"auto"!==e||t&&"auto"!==t?this.plugins.video.setSize.call(this,e,t||i._defaultRatio,!1):this.plugins.video.setAutoSize.call(this),!1)},setSize:function(e,t,i){const n=this.context.video;e=this.util.getNumber(e,0),t=this.util.isNumber(t)?t+n.sizeUnit:t||"",n._element.style.width=e?e+n.sizeUnit:"",n._cover.style.paddingBottom=n._cover.style.height=t,/%$/.test(t)?n._element.style.height="":n._element.style.height=t,i||n._element.removeAttribute("data-percentage"),this.plugins.resizing._module_saveCurrentSize.call(this,n)},setAutoSize:function(){this.plugins.video.setPercentSize.call(this,100,this.context.video._defaultRatio)},setOriginSize:function(e){const t=this.context.video;t._element.removeAttribute("data-percentage"),this.plugins.resizing.resetTransform.call(this,t._element),this.plugins.video.cancelPercentAttr.call(this);const i=((e?t._element.getAttribute("data-size"):"")||t._element.getAttribute("data-origin")||"").split(",");if(i){const e=i[0],n=i[1];t._onlyPercentage||/%$/.test(e)&&(/%$/.test(n)||!/\d/.test(n))?this.plugins.video.setPercentSize.call(this,e,n):this.plugins.video.setSize.call(this,e,n),this.plugins.resizing._module_saveCurrentSize.call(this,t)}},setPercentSize:function(e,t){const i=this.context.video;t=!t||/%$/.test(t)||this.util.getNumber(t,0)?this.util.isNumber(t)?t+i.sizeUnit:t||i._videoRatio:this.util.isNumber(t)?t+"%":t,i._container.style.width=this.util.isNumber(e)?e+"%":e,i._container.style.height="",i._cover.style.width="100%",i._cover.style.height=t,i._cover.style.paddingBottom=t,i._element.style.width="100%",i._element.style.height="100%",i._element.style.maxWidth="","center"===i._align&&this.plugins.video.setAlign.call(this,null,null,null,null),i._element.setAttribute("data-percentage",e+","+t),this.plugins.resizing._module_saveCurrentSize.call(this,i)},cancelPercentAttr:function(){const e=this.context.video;e._cover.style.width="",e._cover.style.height="",e._cover.style.paddingBottom="",e._container.style.width="",e._container.style.height="",this.util.removeClass(e._container,this.context.video._floatClassRegExp),this.util.addClass(e._container,"__se__float-"+e._align),"center"===e._align&&this.plugins.video.setAlign.call(this,null,null,null,null)},setAlign:function(e,t,i,n){const l=this.context.video;e||(e=l._align),t||(t=l._element),i||(i=l._cover),n||(n=l._container),i.style.margin=e&&"none"!==e?"auto":"0",/%$/.test(t.style.width)&&"center"===e?(n.style.minWidth="100%",i.style.width=n.style.width,i.style.height=i.style.paddingBottom,i.style.paddingBottom=this.util.getNumber(this.util.getNumber(i.style.paddingBottom,2)/100*this.util.getNumber(i.style.width,2),2)+"%"):(n.style.minWidth="",i.style.width=this.context.resizing._rotateVertical?t.style.height||t.offsetHeight:t.style.width||"100%",i.style.paddingBottom=i.style.height),this.util.hasClass(n,"__se__float-"+e)||(this.util.removeClass(n,l._floatClassRegExp),this.util.addClass(n,"__se__float-"+e),t.setAttribute("data-align",e))},resetAlign:function(){const e=this.context.video;e._element.setAttribute("data-align",""),e._align="none",e._cover.style.margin="0",this.util.removeClass(e._container,e._floatClassRegExp)},destroy:function(){this._variable._videosCnt--;const e=this.context.video._container;let t=e.previousElementSibling||e.nextElementSibling;this.util.removeItem(e),this.plugins.video.init.call(this),this.controllersOff(),this.focusEdge(t),this.history.push(!1)},init:function(){const e=this.context.video;e.focusElement.value="",e._origin_w=this.context.option.videoWidth,e._origin_h="",e.modal.querySelector('input[name="suneditor_video_radio"][value="none"]').checked=!0,e._resizing&&(e.inputX.value=this.context.option.videoWidth===e._defaultSizeX?"":this.context.option.videoWidth,e.inputY.value="",e.proportion.checked=!0,e.proportion.disabled=!0,this.plugins.video.setVideoRatioSelect.call(this,e._defaultRatio))}}},r=i("P6u4"),c=i.n(r);const d={_d:document,_w:window,_tagConvertor:function(e){const t={b:"strong",i:"em",var:"em",u:"ins",strike:"del",s:"del"};return e.replace(/(<\/?)(b|strong|var|i|em|u|ins|s|strike|del)\b\s*(?:[^>^<]+)?\s*(?=>)/gi,(function(e,i,n){return i+("string"==typeof t[n]?t[n]:n)}))},_HTMLConvertor:function(e){const t={"&":"&"," ":" ","'":""","<":"<",">":">"};return e.replace(/&|\u00A0|'|<|>/g,(function(e){return"string"==typeof t[e]?t[e]:e}))},zeroWidthSpace:"​",zeroWidthRegExp:new RegExp(String.fromCharCode(8203),"g"),onlyZeroWidthRegExp:new RegExp("^"+String.fromCharCode(8203)+"+$"),onlyZeroWidthSpace:function(e){return"string"!=typeof e&&(e=e.textContent),""===e||this.onlyZeroWidthRegExp.test(e)},getXMLHttpRequest:function(){if(!this._w.ActiveXObject)return this._w.XMLHttpRequest?new XMLHttpRequest:null;try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){return null}}},createElement:function(e){return this._d.createElement(e)},createTextNode:function(e){return this._d.createTextNode(e||"")},getIncludePath:function(e,t){let i="";const n=[],l="js"===t?"script":"link",o="js"===t?"src":"href";let s="(?:";for(let t=0,i=e.length;t0?n[0][o]:""),-1===i.indexOf(":/")&&"//"!==i.slice(0,2)&&(i=0===i.indexOf("/")?location.href.match(/^.*?:\/\/[^\/]*/)[0]+i:location.href.match(/^[^\?]*\/(?:)/)[0]+i),!i)throw"[SUNEDITOR.util.getIncludePath.fail] The SUNEDITOR installation path could not be automatically detected. (name: +"+name+", extension: "+t+")";return i},getPageStyle:function(e){let t="";const i=(e?this.getIframeDocument(e):this._d).styleSheets;for(let e,n=0,l=i.length;n-1||(n+=i[e].name+'="'+i[e].value+'" ');return n},convertContentsForEditor:function(e){let t="",i=this._d.createRange().createContextualFragment(e).childNodes;for(let e,n=0,l=i.length;n0&&(t+="

    "+n+"

    ")}else t+=e.replace(/(?!>)\s+?(?=<)/g,"");return 0===t.length&&(t="

    "+((e=this._HTMLConvertor(e)).length>0?e:"
    ")+"

    "),this._tagConvertor(t.replace(this._deleteExclusionTags,""))},convertHTMLForCodeView:function(e,t){let i="";const n=this._w.RegExp,l=new n("^(BLOCKQUOTE|PRE|TABLE|THEAD|TBODY|TR|TH|TD|OL|UL|IMG|IFRAME|VIDEO|AUDIO|FIGURE|FIGCAPTION|HR|BR)$","i"),o=this.isFormatElement.bind(this),s="string"==typeof e?this._d.createRange().createContextualFragment(e):e,a=this;return t=(t*=1)>0?new this._w.Array(t+1).join(" "):"",function e(s,r,c){const d=s.childNodes,u=l.test(s.nodeName),h=u?r:"";for(let g,p,m,f=0,_=d.length;f<_;f++){if(g=d[f],m=l.test(g.nodeName),p=m?"\n":"",c=!o(g)||u||/^(TH|TD)$/i.test(s.nodeName)?"":"\n",3===g.nodeType){i+=a._HTMLConvertor(/^\n+$/.test(g.data)?"":g.data);continue}if(0===g.childNodes.length){i+=(/^(HR)$/i.test(g.nodeName)?"\n":"")+h+g.outerHTML+p;continue}g.innerHTML=g.innerHTML;const _=g.nodeName.toLowerCase();i+=(c||(u?"":p))+(h||m?r:"")+g.outerHTML.match(n("<"+_+"[^>]*>","i"))[0]+p,e(g,r+t,""),i+=(m?r:"")+""+(c||p||u?"\n":/^(TH|TD)$/i.test(g.nodeName)?"\n":"")}}(s,"","\n"),i.trim()+"\n"},isWysiwygDiv:function(e){return!(!e||1!==e.nodeType||!this.hasClass(e,"se-wrapper-wysiwyg")&&!/^BODY$/i.test(e.nodeName))},isFormatElement:function(e){return!(!e||1!==e.nodeType||!/^(P|DIV|H[1-6]|LI|TH|TD)$/i.test(e.nodeName)||this.isComponent(e)||this.isWysiwygDiv(e))},isRangeFormatElement:function(e){return!(!e||1!==e.nodeType||!/^(BLOCKQUOTE|OL|UL|PRE|FIGCAPTION|TABLE|THEAD|TBODY|TR|TH|TD)$/i.test(e.nodeName)&&"range"!==e.getAttribute("data-format"))},isComponent:function(e){return e&&(/se-component/.test(e.className)||/^(TABLE|HR)$/.test(e.nodeName))},getFormatElement:function(e,t){if(!e)return null;for(t||(t=function(){return!0});e;){if(this.isWysiwygDiv(e))return null;if(this.isRangeFormatElement(e)&&e.firstElementChild,this.isFormatElement(e)&&t(e))return e;e=e.parentNode}return null},getRangeFormatElement:function(e,t){if(!e)return null;for(t||(t=function(){return!0});e;){if(this.isWysiwygDiv(e))return null;if(this.isRangeFormatElement(e)&&!/^(THEAD|TBODY|TR)$/i.test(e.nodeName)&&t(e))return e;e=e.parentNode}return null},copyTagAttributes:function(e,t){t.style.cssText&&(e.style.cssText+=t.style.cssText);const i=t.classList;for(let t=0,n=i.length;t0&&!this.isBreak(e);)e=e.firstChild;for(;t&&1===t.nodeType&&t.childNodes.length>0&&!this.isBreak(t);)t=t.lastChild;return{sc:e,ec:t||e}}},getOffset:function(e,t){let i=0,n=0,l=3===e.nodeType?e.parentElement:e;const o=this.getParentElement(e,this.isWysiwygDiv.bind(this));for(;l&&!this.hasClass(l,"se-container")&&l!==o;)i+=l.offsetLeft,n+=l.offsetTop,l=l.offsetParent;const s=t&&/iframe/i.test(t.nodeName);return{left:i+(s?t.parentElement.offsetLeft:0),top:n-o.scrollTop+(s?t.parentElement.offsetTop:0)}},getOverlapRangeAtIndex:function(e,t,i,n){if(e<=n?ti)return 0;const l=(e>i?e:i)-(t0?" ":"")+t)},removeClass:function(e,t){if(!e)return;const i=new this._w.RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(i," ").trim()},toggleClass:function(e,t){if(!e)return;const i=new this._w.RegExp("(\\s|^)"+t+"(\\s|$)");i.test(e.className)?e.className=e.className.replace(i," ").trim():e.className+=" "+t},removeItem:function(e){if(e)try{e.remove()}catch(t){e.parentNode.removeChild(e)}},removeItemAllParents:function(e,t){if(!e)return null;let i=null;return t||(t=function(e){const t=e.textContent.trim();return 0===t.length||/^(\n|\u200B)+$/.test(t)}),function e(n){if(!d.isWysiwygDiv(n)){const l=n.parentNode;l&&t(n)&&(i={sc:n.previousElementSibling,ec:n.nextElementSibling},d.removeItem(n),e(l))}}(e),i},removeEmptyNode:function(e){const t=this;!function i(n){if(n===e||!t.onlyZeroWidthSpace(n.textContent)||/^BR$/i.test(n.nodeName)||n.firstChild&&/^BR$/i.test(n.firstChild.nodeName)||t.isComponent(n)){const e=n.children;for(let n=0,l=e.length,o=0;n")},isIgnoreNodeChange:function(e){return 3!==e.nodeType&&!/^(span|font|b|strong|var|i|em|u|ins|s|strike|del|sub|sup|mark|a)$/i.test(e.nodeName)},cleanHTML:function(e){const t=new this._w.RegExp("^(meta|script|link|style|[a-z]+:[a-z]+)$","i"),i=this._d.createRange().createContextualFragment(e).childNodes;let n="";for(let e=0,l=i.length;e(\n|.)*<\/([a-zA-Z]+\:[a-zA-Z]+|script|style)>/g,"").replace(/(<[a-zA-Z0-9]+)[^>]*(?=>)/g,(function(e,t){const i=e.match(/((?:contenteditable|colspan|rowspan|target|href|src|class|data-format|data-size|data-file-size|data-file-name|data-origin|data-align|data-image-link|data-rotate|data-proportion|data-percentage|origin-size)\s*=\s*"[^"]*")/gi);if(i)for(let e=0,n=i.length;e^<]*)>/g,"").replace(this._deleteExclusionTags,""),this._tagConvertor(n||e)},_deleteExclusionTags:function(){const e="br|p|div|pre|blockquote|h[1-6]|ol|ul|dl|li|hr|figure|figcaption|img|iframe|audio|video|table|thead|tbody|tr|th|td|a|b|strong|var|i|em|u|ins|s|span|strike|del|sub|sup|mark".split("|");let t="<\\/?(";for(let i=0,n=e.length;i'}return i}()+("auto"===e.height?"":"");o.allowFullscreen=!0,o.frameBorder=0,o.addEventListener("load",(function(){this.setAttribute("scrolling","auto"),this.contentDocument.head.innerHTML=''+t,this.contentDocument.body.className="sun-editor-editable",this.contentDocument.body.setAttribute("contenteditable",!0),this.contentDocument.body.innerHTML=l}))}else o.setAttribute("contenteditable",!0),o.setAttribute("scrolling","auto"),o.className+=" sun-editor-editable",o.innerHTML=l;o.style.height=e.height,o.style.minHeight=e.minHeight,o.style.maxHeight=e.maxHeight;const s=document.createElement("TEXTAREA");s.className="se-wrapper-inner se-wrapper-code",s.style.display="none",s.style.height=e.height,s.style.minHeight=e.minHeight,s.style.maxHeight=e.maxHeight,"auto"===e.height&&(s.style.overflow="hidden");let a=null,r=null,c=null;if(e.resizingBar&&(a=document.createElement("DIV"),a.className="se-resizing-bar sun-editor-common",r=document.createElement("DIV"),r.className="se-navigation sun-editor-common",a.appendChild(r),e.charCounter)){const t=document.createElement("DIV");if(t.className="se-char-counter-wrapper",c=document.createElement("SPAN"),c.className="se-char-counter",c.textContent="0",t.appendChild(c),e.maxCharCount>0){const i=document.createElement("SPAN");i.textContent=" / "+e.maxCharCount,t.appendChild(i)}a.appendChild(t)}let d=null;return e.placeholder&&(d=document.createElement("SPAN"),d.className="se-placeholder",d.innerText=e.placeholder),{bottomBar:{resizingBar:a,navigation:r,charCounter:c},wysiwygFrame:o,codeView:s,placeholder:d}},_initOptions:function(e,t){t.lang=t.lang||c.a,t.mode=t.mode||"classic",t.toolbarWidth=t.toolbarWidth?u.isNumber(t.toolbarWidth)?t.toolbarWidth+"px":t.toolbarWidth:"auto",t.stickyToolbar=/balloon/i.test(t.mode)?-1:void 0===t.stickyToolbar?0:/^\d+/.test(t.stickyToolbar)?u.getNumber(t.stickyToolbar,0):-1,t.iframe=t.fullPage||t.iframe,t.iframeCSSFileName=t.iframe?"string"==typeof t.iframeCSSFileName?[t.iframeCSSFileName]:t.iframeCSSFileName||["suneditor"]:null,t.codeMirror=t.codeMirror?t.codeMirror.src?t.codeMirror:{src:t.codeMirror}:null,t.display=t.display||("none"!==e.style.display&&e.style.display?e.style.display:"block"),t.popupDisplay=t.popupDisplay||"full",t.resizingBar=void 0===t.resizingBar?!/inline|balloon/i.test(t.mode):t.resizingBar,t.showPathLabel=!!t.resizingBar&&("boolean"!=typeof t.showPathLabel||t.showPathLabel),t.charCounter=t.maxCharCount>0||"boolean"==typeof t.charCounter&&t.charCounter,t.maxCharCount=u.isNumber(t.maxCharCount)&&t.maxCharCount>-1?1*t.maxCharCount:null,t.width=t.width?u.isNumber(t.width)?t.width+"px":t.width:e.clientWidth?e.clientWidth+"px":"100%",t.minWidth=(u.isNumber(t.minWidth)?t.minWidth+"px":t.minWidth)||"",t.maxWidth=(u.isNumber(t.maxWidth)?t.maxWidth+"px":t.maxWidth)||"",t.height=t.height?u.isNumber(t.height)?t.height+"px":t.height:e.clientHeight?e.clientHeight+"px":"auto",t.minHeight=(u.isNumber(t.minHeight)?t.minHeight+"px":t.minHeight)||"",t.maxHeight=(u.isNumber(t.maxHeight)?t.maxHeight+"px":t.maxHeight)||"",t.font=t.font?t.font:null,t.fontSize=t.fontSize?t.fontSize:null,t.formats=t.formats?t.formats:null,t.colorList=t.colorList?t.colorList:null,t.lineHeights=t.lineHeights?t.lineHeights:null,t.paragraphStyles=t.paragraphStyles?t.paragraphStyles:null,t.textStyles=t.textStyles?t.textStyles:null,t.fontSizeUnit="string"==typeof t.fontSizeUnit&&t.fontSizeUnit.trim()||"px",t.imageResizing=void 0===t.imageResizing||t.imageResizing,t.imageHeightShow=void 0===t.imageHeightShow||!!t.imageHeightShow,t.imageWidth=t.imageWidth?u.isNumber(t.imageWidth)?t.imageWidth+"px":t.imageWidth:"auto",t.imageSizeOnlyPercentage=!!t.imageSizeOnlyPercentage,t._imageSizeUnit=t.imageSizeOnlyPercentage?"%":"px",t.imageRotation=void 0!==t.imageRotation?t.imageRotation:!(t.imageSizeOnlyPercentage||!t.imageHeightShow),t.imageFileInput=void 0===t.imageFileInput||t.imageFileInput,t.imageUrlInput=void 0===t.imageUrlInput||!t.imageFileInput||t.imageUrlInput,t.imageUploadHeader=t.imageUploadHeader||null,t.imageUploadUrl=t.imageUploadUrl||null,t.imageUploadSizeLimit=/\d+/.test(t.imageUploadSizeLimit)?u.getNumber(t.imageUploadSizeLimit,0):null,t.videoResizing=void 0===t.videoResizing||t.videoResizing,t.videoHeightShow=void 0===t.videoHeightShow||!!t.videoHeightShow,t.videoRatioShow=void 0===t.videoRatioShow||!!t.videoRatioShow,t.videoWidth=t.videoWidth&&u.getNumber(t.videoWidth)?u.isNumber(t.videoWidth)?t.videoWidth+"px":t.videoWidth:"100%",t.videoSizeOnlyPercentage=!!t.videoSizeOnlyPercentage,t._videoSizeUnit=t.videoSizeOnlyPercentage?"%":"px",t.videoRotation=void 0!==t.videoRotation?t.videoRotation:!(t.videoSizeOnlyPercentage||!t.videoHeightShow),t.videoRatio=u.getNumber(t.videoRatio,4)||.5625,t.videoRatioList=t.videoRatioList?t.videoRatioList:null,t.youtubeQuery=(t.youtubeQuery||"").replace("?",""),t.callBackSave=t.callBackSave?t.callBackSave:null,t.templates=t.templates?t.templates:null,t.placeholder="string"==typeof t.placeholder?t.placeholder:null,t.buttonList=t.buttonList||[["undo","redo"],["bold","underline","italic","strike","subscript","superscript"],["removeFormat"],["outdent","indent"],["fullScreen","showBlocks","codeView"],["preview","print"]]},_defaultButtons:function(e){return{bold:["_se_command_bold",e.toolbar.bold+" (CTRL+B)","STRONG","",''],underline:["_se_command_underline",e.toolbar.underline+" (CTRL+U)","INS","",''],italic:["_se_command_italic",e.toolbar.italic+" (CTRL+I)","EM","",''],strike:["_se_command_strike",e.toolbar.strike+" (CTRL+SHIFT+S)","DEL","",''],subscript:["_se_command_subscript",e.toolbar.subscript,"SUB","",''],superscript:["_se_command_superscript",e.toolbar.superscript,"SUP","",''],removeFormat:["",e.toolbar.removeFormat,"removeFormat","",''],indent:["",e.toolbar.indent+" (CTRL+])","indent","",''],outdent:["_se_command_outdent",e.toolbar.outdent+" (CTRL+[)","outdent","",'',!0],fullScreen:["code-view-enabled",e.toolbar.fullScreen,"fullScreen","",''],showBlocks:["",e.toolbar.showBlocks,"showBlocks","",''],codeView:["code-view-enabled",e.toolbar.codeView,"codeView","",''],undo:["_se_command_undo",e.toolbar.undo+" (CTRL+Z)","undo","",'',!0],redo:["_se_command_redo",e.toolbar.redo+" (CTRL+Y / CTRL+SHIFT+Z)","redo","",'',!0],preview:["",e.toolbar.preview,"preview","",''],print:["",e.toolbar.print,"print","",''],save:["_se_command_save",e.toolbar.save,"save","",'',!0],font:["se-btn-select se-btn-tool-font _se_command_font_family",e.toolbar.font,"font","submenu",''+e.toolbar.font+''],formatBlock:["se-btn-select se-btn-tool-format",e.toolbar.formats,"formatBlock","submenu",''+e.toolbar.formats+''],fontSize:["se-btn-select se-btn-tool-size",e.toolbar.fontSize,"fontSize","submenu",''+e.toolbar.fontSize+''],fontColor:["",e.toolbar.fontColor,"fontColor","submenu",''],hiliteColor:["",e.toolbar.hiliteColor,"hiliteColor","submenu",''],align:["se-btn-align",e.toolbar.align,"align","submenu",''],list:["_se_command_list",e.toolbar.list,"list","submenu",''],horizontalRule:["btn_line",e.toolbar.horizontalRule,"horizontalRule","submenu",''],table:["",e.toolbar.table,"table","submenu",''],lineHeight:["",e.toolbar.lineHeight,"lineHeight","submenu",''],template:["",e.toolbar.template,"template","submenu",''],paragraphStyle:["",e.toolbar.paragraphStyle,"paragraphStyle","submenu",''],textStyle:["",e.toolbar.textStyle,"textStyle","submenu",''],link:["",e.toolbar.link,"link","dialog",''],image:["",e.toolbar.image,"image","dialog",''],video:["",e.toolbar.video,"video","dialog",'']}},_createModuleGroup:function(e){const t=u.createElement("DIV");t.className="se-btn-module"+(e?"":" se-btn-module-border");const i=u.createElement("UL");return i.className="se-menu-list",t.appendChild(i),{div:t,ul:i}},_createButton:function(e,t,i,n,l,o){const s=u.createElement("LI"),a=u.createElement("BUTTON");return a.setAttribute("type","button"),a.setAttribute("class","se-btn"+(e?" "+e:"")+" se-tooltip"),a.setAttribute("data-command",i),a.setAttribute("data-display",n),l+=''+t+"",o&&a.setAttribute("disabled",!0),a.innerHTML=l,s.appendChild(a),{li:s,button:a}},_createToolBar:function(e,t,i,n){const l=e.createElement("DIV");l.className="se-toolbar-separator-vertical";const o=e.createElement("DIV");o.className="se-toolbar sun-editor-common";const s=this._defaultButtons(n),a={},r={};if(i){const e=i.length?i:Object.keys(i).map((function(e){return i[e]}));for(let t,i=0,n=e.length;i0){for(let e=0;e":i),this.history.push(!0)},focus:function(){if("none"!==e.element.wysiwygFrame.style.display){try{const e=this.getRange();this.setRange(e.startContainer,e.startOffset)}catch(t){const i=r.getParentElement(this.getSelectionNode(),"figcaption");i?i.focus():e.element.wysiwyg.focus(),this._editorRange()}d._findButtonEffectTag()}},focusEdge:function(e){if(r.isComponent(e)){const t=e.querySelector("IMG"),i=e.querySelector("IFRAME");t?this.selectComponent(t,"image"):i&&this.selectComponent(i,"video")}else e=r.getChildElement(e,(function(e){return 0===e.childNodes.length||3===e.nodeType}),!0),this.setRange(e,e.textContent.length,e,e.textContent.length)},setRange:function(e,t,i,n){if(!e||!i)return;t>e.textContent.length&&(t=e.textContent.length),n>i.textContent.length&&(n=i.textContent.length);const l=this._wd.createRange();l.setStart(e,t),l.setEnd(i,n);const o=this.getSelection();o.removeAllRanges&&o.removeAllRanges(),o.addRange(l),this._editorRange()},removeRange:function(){this.getSelection().removeAllRanges();const e=this.commandMap;r.changeTxt(e.FORMAT,n.toolbar.formats),r.changeTxt(e.FONT,n.toolbar.font),r.changeTxt(e.FONT_TOOLTIP,n.toolbar.font),r.changeTxt(e.SIZE,n.toolbar.fontSize),r.removeClass(e.LI_ICON,"se-icon-list-bullets"),r.addClass(e.LI_ICON,"se-icon-list-number"),r.removeClass(e.LI,"active"),r.removeClass(e.STRONG,"active"),r.removeClass(e.INS,"active"),r.removeClass(e.EM,"active"),r.removeClass(e.DEL,"active"),r.removeClass(e.SUB,"active"),r.removeClass(e.SUP,"active"),e.OUTDENT&&e.OUTDENT.setAttribute("disabled",!0),e.LI&&e.LI.removeAttribute("data-focus"),e.ALIGN&&(e.ALIGN.className="se-icon-align-left",e.ALIGN.removeAttribute("data-focus"))},getRange:function(){return this._variable._range||this._createDefaultRange()},getSelection:function(){return this._ww.getSelection()},getSelectionNode:function(){return this._variable._selectionNode&&!r.isWysiwygDiv(this._variable._selectionNode)||this._editorRange(),this._variable._selectionNode||e.element.wysiwyg.firstChild},_editorRange:function(){const e=this.getSelection();let t=null,i=null;t=e.rangeCount>0?e.getRangeAt(0):this._createDefaultRange(),this._variable._range=t,i=t.collapsed?t.commonAncestorContainer:e.extentNode||e.anchorNode,this._variable._selectionNode=i},_createDefaultRange:function(){const t=this._wd.createRange();return e.element.wysiwyg.firstChild||this.execCommand("formatBlock",!1,"P"),t.setStart(e.element.wysiwyg.firstChild,0),t.setEnd(e.element.wysiwyg.firstChild,0),t},getSelectedElements:function(t){let i=this.getRange();if(r.isWysiwygDiv(i.startContainer)){const t=e.element.wysiwyg.children;if(0===t.length)return null;this.setRange(t[0],0,t[t.length-1],t[t.length-1].textContent.trim().length),i=this.getRange()}const n=i.startContainer,l=i.endContainer,o=i.commonAncestorContainer,s=r.getListChildren(o,(function(e){return t?t(e):r.isFormatElement(e)}));if(r.isWysiwygDiv(o)||r.isRangeFormatElement(o)||s.unshift(r.getFormatElement(o)),n===l||1===s.length)return s;let a=r.getFormatElement(n),c=r.getFormatElement(l),d=null,u=null;const h=function(e){return!r.isTable(e)||/^TABLE$/i.test(e.nodeName)},g=r.getRangeFormatElement(a,h),p=r.getRangeFormatElement(c,h),m=g===p;for(let e,t=0,i=s.length;t=0;e--)c[e]===n.parentNode&&c[e].firstChild===n&&0===i&&(d=e,n=n.parentNode);for(let e=u-1,t=n;e>d;e--)c[e]===t.parentNode&&1===c[e].nodeType&&(c.splice(e,1),t=t.parentNode,--u);for(let e=d;e<=u;e++){const o=c[e];0===o.length||3===o.nodeType&&void 0===o.data?r.removeItem(o):o!==t?o!==n?(r.removeItem(o),this.history.push(!1)):(a=1===n.nodeType?r.createTextNode(n.textContent):r.createTextNode(n.substringData(l,n.length-l)),a.length>0?n.data=a.data:r.removeItem(n)):(s=1===t.nodeType?r.createTextNode(t.textContent):r.createTextNode(t.substringData(0,i)),s.length>0?t.data=s.data:r.removeItem(t))}},applyRangeFormatElement:function(e){const t=this.getSelectedElementsAndComponents();if(!t||0===t.length)return;let i,n,l,o=t[t.length-1];i=r.isRangeFormatElement(o)||r.isFormatElement(o)?o:r.getRangeFormatElement(o)||r.getFormatElement(o),r.isCell(i)?(n=null,l=i):(n=i.nextSibling,l=i.parentNode);let s=r.getElementDepth(i),a=null;const c=[],d=function(e,t,i){let n=null;return e===t||r.isTable(t)||(n=r.removeItemAllParents(t)),n?n.ec:i};for(let i,o,u,h,g=0,p=t.length;g=u?(s=u,l=t.cc,n=d(l,o,t.ec),n&&(l=n.parentNode)):l===t.cc&&(n=t.ec),l!==t.cc&&(h=d(l,t.cc),void 0!==h&&(n=h)),e.appendChild(a),a=null}}else s>=u&&(s=u,l=o,n=i.nextSibling),e.appendChild(i),l!==o&&(h=d(l,o),void 0!==h&&(n=h));l.insertBefore(e,n),d(e,n),this.history.push(!1);const u=r.getEdgeChildNodes(e.firstElementChild,e.lastElementChild);t.length>1?this.setRange(u.sc,0,u.ec,u.ec.textContent.length):this.setRange(u.ec,u.ec.textContent.length,u.ec,u.ec.textContent.length)},detachRangeFormatElement:function(e,t,i,n,l){const o=this.getRange(),s=o.startOffset,a=o.endOffset,c=e.childNodes,u=e.parentNode;let h=null,g=null,p=e.cloneNode(!1);const m=r.isList(i);let f=!1;function _(e,t,i){if(r.onlyZeroWidthSpace(t)&&(t.innerHTML=r.zeroWidthSpace),3===t.nodeType)return e.insertBefore(t,i),t;const n=t.childNodes;let l=t.cloneNode(!1),o=null,s=null;for(;n[0];)s=n[0],r.isIgnoreNodeChange(s)&&!r.isListCell(l)?(l.childNodes.length>0&&(o||(o=l),e.insertBefore(l,i),l=t.cloneNode(!1)),e.insertBefore(s,i),o||(o=s)):l.appendChild(s);return l.childNodes.length>0&&(e.insertBefore(l,i),o||(o=l)),o}for(let l,o=0,s=c.length;o0&&(u.insertBefore(p,e),p=null),!m&&r.isListCell(l)){const t=l;l=r.isCell(e.parentNode)?r.createElement("DIV"):r.createElement("P"),l.innerHTML=t.innerHTML,r.copyFormatAttributes(l,t)}else l=l.cloneNode(!0);n||(i?(f||(u.insertBefore(i,e),f=!0),l=_(i,l,null)):l=_(u,l,e),t?(g=l,h||(h=l)):h||(h=g=l))}const b=e.parentNode,y=e.nextSibling;p&&p.children.length>0&&b.insertBefore(p,y),r.removeItem(e);const v=n?{cc:b,sc:h,ec:h&&h.parentNode?h.nextSibling:p&&p.children.length>0?p:y||null}:r.getEdgeChildNodes(h,g);if(l)return v;!n&&v&&(t?this.setRange(v.sc,s,v.ec,a):this.setRange(v.sc,0,v.sc,0)),this.history.push(!1),d._findButtonEffectTag()},nodeChange:function(t,i,n,l){const o=this.getRange();i=!!(i&&i.length>0)&&i,n=!!(n&&n.length>0)&&n;const s=!t,c=s&&!n&&!i;let d,u,h,g=o.startContainer,p=o.startOffset,m=o.endContainer,f=o.endOffset;if(c&&o.collapsed&&r.isFormatElement(g.parentNode)&&r.isFormatElement(m.parentNode))return;s&&(t=r.createElement("DIV"));const _=t.nodeName;if(!c&&g===m&&!n&&t){let e=g,i=0;const n=[],l=t.style;for(let e=0,t=l.length;e0){for(;!r.isFormatElement(e)&&!r.isWysiwygDiv(e);){for(let l=0;l=n.length)return}}if(d=r.isWysiwygDiv(g)?e.element.wysiwyg.firstChild:g,u=p,r.isBreak(d)||1===d.nodeType&&d.childNodes.length>0){const e=r.isBreak(d);if(!e){for(;d&&!r.isBreak(d)&&1===d.nodeType;)d=d.childNodes[u]||d.nextElementSibling||d.nextSibling,u=0;let e=r.getFormatElement(d);e===r.getRangeFormatElement(e)&&(e=r.createElement(r.isCell(d)?"DIV":"P"),d.parentNode.insertBefore(e,d),e.appendChild(d))}if(r.isBreak(d)){const t=r.createTextNode(r.zeroWidthSpace);d.parentNode.insertBefore(t,d),d=t,e&&(g===m&&(m=d,f=1),r.removeItem(g))}}if(g=d,p=u,d=r.isWysiwygDiv(m)?e.element.wysiwyg.lastChild:m,u=f,r.isBreak(d)||1===d.nodeType&&d.childNodes.length>0){const e=r.isBreak(d);if(!e){for(;d&&!r.isBreak(d)&&1===d.nodeType;)h=d.childNodes,d=h[u>0?u-1:u]||!/FIGURE/i.test(h[0].nodeName)?h[0]:d.previousElementSibling||d.previousSibling||g,u=u>0?d.textContent.length:u;let e=r.getFormatElement(d);e===r.getRangeFormatElement(e)&&(e=r.createElement(r.isCell(e)?"DIV":"P"),d.parentNode.insertBefore(e,d),e.appendChild(d))}if(r.isBreak(d)){const t=r.createTextNode(r.zeroWidthSpace);d.parentNode.insertBefore(t,d),d=t,u=1,e&&r.removeItem(m)}}m=d,f=u,this.setRange(g,p,m,f);let b,y={},v={},C="",x="",w="";if(i){for(let e,t=0,n=i.length;t0&&(o=n.replace(C,"").trim(),o!==n&&(S.v=!0));const d=t.className;let u="";return x&&d.length>0&&(u=d.replace(x,"").trim(),u!==d&&(S.v=!0)),(!s||!x&&d||!C&&n||o||u||!i)&&(o||u||t.nodeName!==_||a.Boolean(C)!==a.Boolean(n)||a.Boolean(x)!==a.Boolean(d))?(C&&n.length>0&&(t.style.cssText=o),t.style.cssText||t.removeAttribute("style"),x&&d.length>0&&(t.className=u.trim()),t.className.trim()||t.removeAttribute("class"),t.style.cssText||t.className||t.nodeName!==_&&!i?t:(S.v=!0,null)):(S.v=!0,null)},N=this.getSelectedElements();r.getFormatElement(g)||(g=r.getChildElement(N[0],(function(e){return 3===e.nodeType})),p=0),r.getFormatElement(m)||(m=r.getChildElement(N[N.length-1],(function(e){return 3===e.nodeType})),f=m.textContent.length);const k=r.getFormatElement(g)===r.getFormatElement(m),z=N.length-(k?0:1);if(b=t.cloneNode(!1),k){const e=this._nodeChange_oneLine(N[0],b,E,g,p,m,f,c,s,o.collapsed,S);y.container=e.startContainer,y.offset=e.startOffset,v.container=e.endContainer,v.offset=e.endOffset}else y=this._nodeChange_startLine(N[0],b,E,g,p,c,s,S);for(let e=1;e0&&!k?(b=t.cloneNode(!1),v=this._nodeChange_endLine(N[z],b,E,m,f,c,s,S)):k||(v=y),this.setRange(y.container,y.offset,v.container,v.offset),this.history.push(!1)},_stripRemoveNode:function(e,t){if(!t||3===t.nodeType)return;const i=t.childNodes;for(;i[0];)e.insertBefore(i[0],t);e.removeChild(t)},_removeEmptyNode:function(e,t){const i=r.onlyZeroWidthSpace(t.textContent);i&&(t.textContent=" "),r.removeEmptyNode(e),i&&(t.textContent=r.zeroWidthSpace)},_mergeSameTags:function(e,t,i){const n=this,l={a:0,b:0};return function e(o,s){const a=o.childNodes;for(let r,c,d=0,u=a.length;d=d+1&&(t[s]-=1,t[s+1]>=0&&(t[s+1]+=e,u&&(l.a+=r.textContent.length))),i&&i[s]>=d+1&&(i[s]-=1,i[s+1]>=0&&(i[s+1]+=e,u&&(l.b+=r.textContent.length))),3===r.nodeType?r.textContent+=c.textContent:r.innerHTML+=c.innerHTML,n.util.removeItem(c),d--}else 1===r.nodeType&&e(r,s+1)}}(e,0),l},_nodeChange_oneLine:function(e,t,i,n,l,o,s,c,d,u,h){let g=n.parentNode;for(;!(g.nextSibling||g.previousSibling||r.isFormatElement(g.parentNode)||r.isWysiwygDiv(g.parentNode))&&g.nodeName!==t.nodeName;)g=g.parentNode;if(!d&&g===o.parentNode&&g.nodeName===t.nodeName&&r.onlyZeroWidthSpace(n.textContent.slice(0,l))&&r.onlyZeroWidthSpace(o.textContent.slice(s))){const e=g.childNodes;let i=!0;for(let t,l,s,a,c=0,d=e.length;c0&&(i=t.test(e.style.cssText)),!i}if(function e(n,l){const o=n.childNodes;for(let n,s=0,a=o.length;s=S?N-S:w.data.length-S));for(e.data.length>0&&l.appendChild(e),v=a,y=[],x="";v!==_&&v!==p&&null!==v;)n=i(v),n&&1===v.nodeType&&T(v)&&(y.push(n),x+=v.style.cssText.substr(0,v.style.cssText.indexOf(":"))+"|"),v=v.parentNode;const s=y.pop()||o;for(C=v=s;y.length>0;)v=y.pop(),C.appendChild(v),C=v;if(t.appendChild(s),_.appendChild(t),w=o,S=0,k=!0,v!==o&&v.appendChild(w),!b)continue}if(z||a!==E){if(k){if(1===a.nodeType&&!r.isBreak(a)){!u&&r.isIgnoreNodeChange(a)?(t=t.cloneNode(!1),_.appendChild(a),_.appendChild(t),f.push(t),s--):e(a,a);continue}for(v=a,y=[],x="";null!==v.parentNode&&v!==p&&v!==t;)n=z?v.cloneNode(!1):i(v),1===v.nodeType&&!r.isBreak(a)&&n&&T(v)&&(n&&y.push(n),x+=v.style.cssText.substr(0,v.style.cssText.indexOf(":"))+"|"),v=v.parentNode;const o=y.pop()||a;for(C=v=o;y.length>0;)v=y.pop(),C.appendChild(v),C=v;o===a?l=z?_:t:z?(_.appendChild(o),l=v):(t.appendChild(o),l=v)}d=a.cloneNode(!1),l.appendChild(d),1!==a.nodeType||r.isBreak(a)||(h=d),e(a,h)}else{const e=r.createTextNode(1===E.nodeType?"":E.substringData(N,E.length-N)),l=r.createTextNode(b||1===E.nodeType?"":E.substringData(0,N));if(e.data.length>0){for(v=a,x="",y=[];v!==_&&v!==p&&null!==v;)1===v.nodeType&&T(v)&&(y.push(v.cloneNode(!1)),x+=v.style.cssText.substr(0,v.style.cssText.indexOf(":"))+"|"),v=v.parentNode;for(d=C=v=y.pop()||e;y.length>0;)v=y.pop(),C.appendChild(v),C=v;_.appendChild(d),v.textContent=e.data}for(v=a,y=[],x="";v!==_&&v!==p&&null!==v;)n=i(v),n&&1===v.nodeType&&T(v)&&(y.push(n),x+=v.style.cssText.substr(0,v.style.cssText.indexOf(":"))+"|"),v=v.parentNode;const o=y.pop()||l;for(C=v=o;y.length>0;)v=y.pop(),C.appendChild(v),C=v;t.appendChild(o),E=l,N=l.data.length,z=!0,!c&&u&&(t=l,l.textContent=r.zeroWidthSpace),v!==l&&v.appendChild(E)}}}(e,_),d&&!c&&!h.v)return{startContainer:n,startOffset:l,endContainer:o,endOffset:s};if(c=c&&d)for(let e=0;e0){const e=g.pop();for(m=p=e;g.length>0;)p=g.pop(),m.appendChild(p),m=p;t.appendChild(e),l=p}else l=t}if(b||a!==f)n=b?i(a):a.cloneNode(!1),n&&(l.appendChild(n),1!==a.nodeType||r.isBreak(a)||(c=n)),e(a,c);else{const e=r.createTextNode(1===f.nodeType?"":f.substringData(0,_)),o=r.createTextNode(1===f.nodeType?"":f.substringData(_,f.length-_));for(e.data.length>0&&l.appendChild(e),p=l,g=[];p!==h&&null!==p;)n=i(p),1===p.nodeType&&n&&g.push(n),p=p.parentNode;const s=g.pop()||l;for(m=p=s;g.length>0;)p=g.pop(),m.appendChild(p),m=p;s!==l?(t.appendChild(s),l=p):l=t,r.isBreak(a)&&t.appendChild(a.cloneNode(!1)),h.appendChild(t),f=o,_=0,b=!0,l.appendChild(f)}}}(e,h),s&&!o&&!a.v)return{container:n,offset:l};if(o=o&&s)for(let e=0;e0&&c===d)return void(e.innerHTML=i.innerHTML)}o.v=!1;const s=e.cloneNode(!1),a=[t];let c=!0;if(function e(n,l){const o=n.childNodes;for(let n,d=0,u=o.length;d0){const e=g.pop();for(m=p=e;g.length>0;)p=g.pop(),m.appendChild(p),m=p;t.insertBefore(e,t.firstChild),l=p}else l=t}if(b||a!==f)n=b?i(a):a.cloneNode(!1),n&&(l.insertBefore(n,l.firstChild),1!==a.nodeType||r.isBreak(a)||(c=n)),e(a,c);else{const e=r.createTextNode(1===f.nodeType?"":f.substringData(_,f.length-_)),o=r.createTextNode(1===f.nodeType?"":f.substringData(0,_));for(e.data.length>0&&l.insertBefore(e,l.firstChild),p=l,g=[];p!==h&&null!==p;)n=i(p),n&&1===p.nodeType&&g.push(n),p=p.parentNode;const s=g.pop()||l;for(m=p=s;g.length>0;)p=g.pop(),m.appendChild(p),m=p;s!==l?(t.insertBefore(s,t.firstChild),l=p):l=t,r.isBreak(a)&&t.appendChild(a.cloneNode(!1)),h.insertBefore(t,h.firstChild),f=o,_=o.data.length,b=!0,l.insertBefore(f,l.firstChild)}}}(e,h),s&&!o&&!a.v)return{container:n,offset:l};if(o=o&&s)for(let e=0;e0?e.element.code.scrollHeight+"px":"auto"),e.option.codeMirrorEditor&&e.option.codeMirrorEditor.refresh(),this._variable.isCodeView=!0,this._variable.isFullScreen||(this._notHideToolbar=!0,this._isBalloon&&(e.element._arrow.style.display="none",e.element.toolbar.style.left="",this._isInline=!0,this._isBalloon=!1,d._showToolbarInline())),e.element.code.focus()),this._checkPlaceholder()},_setCodeDataToEditor:function(){const t=this._getCodeView();if(e.option.fullPage){const e=(new this._w.DOMParser).parseFromString(t,"text/html"),i=e.head.children;for(let t=0,n=i.length;t0?r.convertContentsForEditor(t):"


    "},_setEditorDataToCodeView:function(){const t=r.convertHTMLForCodeView(e.element.wysiwyg,this._variable.codeIndent);let i="";if(e.option.fullPage){const e=r.getAttributesToString(this._wd.body,null);i="\n\n"+this._wd.head.outerHTML.replace(/>(?!\n)/g,">\n")+"\n"+t+"\n"}else i=t;e.element.code.style.display="block",e.element.wysiwygFrame.style.display="none",this._setCodeView(i)},toggleFullScreen:function(t){const i=e.element.topArea,n=e.element.toolbar,l=e.element.editorArea,s=e.element.wysiwygFrame,c=e.element.code,u=this._variable;u.isFullScreen?(u.isFullScreen=!1,s.style.cssText=u._wysiwygOriginCssText,c.style.cssText=u._codeOriginCssText,n.style.cssText="",l.style.cssText=u._editorAreaOriginCssText,i.style.cssText=u._originCssText,o.body.style.overflow=u._bodyOverflow,e.option.stickyToolbar>-1&&r.removeClass(n,"se-toolbar-sticky"),u._fullScreenAttrs.sticky&&(u._fullScreenAttrs.sticky=!1,e.element._stickyDummy.style.display="block",r.addClass(n,"se-toolbar-sticky")),this._isInline=u._fullScreenAttrs.inline,this._isBalloon=u._fullScreenAttrs.balloon,this._isInline&&d._showToolbarInline(),d.onScroll_window(),r.removeClass(t.firstElementChild,"se-icon-reduction"),r.addClass(t.firstElementChild,"se-icon-expansion")):(u.isFullScreen=!0,u._fullScreenAttrs.inline=this._isInline,u._fullScreenAttrs.balloon=this._isBalloon,(this._isInline||this._isBalloon)&&(this._isInline=!1,this._isBalloon=!1),i.style.position="fixed",i.style.top="0",i.style.left="0",i.style.width="100%",i.style.height="100%",i.style.zIndex="2147483647",""!==e.element._stickyDummy.style.display&&(u._fullScreenAttrs.sticky=!0,e.element._stickyDummy.style.display="none",r.removeClass(n,"se-toolbar-sticky")),u._bodyOverflow=o.body.style.overflow,o.body.style.overflow="hidden",u._editorAreaOriginCssText=l.style.cssText,u._wysiwygOriginCssText=s.style.cssText,u._codeOriginCssText=c.style.cssText,l.style.cssText=n.style.cssText="",s.style.cssText=(s.style.cssText.match(/\s?display(\s+)?:(\s+)?[a-zA-Z]+;/)||[""])[0],c.style.cssText=(c.style.cssText.match(/\s?display(\s+)?:(\s+)?[a-zA-Z]+;/)||[""])[0],n.style.width=s.style.height=c.style.height="100%",n.style.position="relative",n.style.display="block",u.innerHeight_fullScreen=a.innerHeight-n.offsetHeight,l.style.height=u.innerHeight_fullScreen+"px",r.removeClass(t.firstElementChild,"se-icon-expansion"),r.addClass(t.firstElementChild,"se-icon-reduction"),e.option.iframe&&"auto"===e.option.height&&(l.style.overflow="auto",this._iframeAutoHeight()))},print:function(){const t=r.createElement("IFRAME");t.style.display="none",o.body.appendChild(t);const i=r.getIframeDocument(t),n=this.getContents(!0);if(e.option.iframe){const t=r.getIframeDocument(e.element.wysiwygFrame),l=e.option.fullPage?r.getAttributesToString(t.body,["contenteditable"]):'class="sun-editor-editable"';i.write(""+t.head.innerHTML+""+n+"")}else{const e=r.createElement("DIV"),t=r.createElement("STYLE");t.innerHTML=r.getPageStyle(),e.className="sun-editor-editable",e.innerHTML=n,i.head.appendChild(t),i.body.appendChild(e)}try{if(t.focus(),-1!==a.navigator.userAgent.indexOf("MSIE")||o.documentMode||a.StyleMedia)try{t.contentWindow.document.execCommand("print",!1,null)}catch(e){t.contentWindow.print()}else t.contentWindow.print()}catch(e){throw Error("[SUNEDITOR.core.print.fail] error: "+e)}finally{r.removeItem(t)}},preview:function(){const t=this.getContents(!0),i=a.open("","_blank");if(i.mimeType="text/html",e.option.iframe){const n=r.getIframeDocument(e.element.wysiwygFrame),l=e.option.fullPage?r.getAttributesToString(n.body,["contenteditable"]):'class="sun-editor-editable"';i.document.write(""+n.head.innerHTML+""+t+"")}else i.document.write(''+n.toolbar.preview+"'+t+"")},setContents:function(t){const i=r.convertContentsForEditor(t);if(c._variable.isCodeView){const e=r.convertHTMLForCodeView(i,c._variable.codeIndent);c._setCodeView(e)}else e.element.wysiwyg.innerHTML=i,c.history.push(!1)},getContents:function(t){const i=e.element.wysiwyg.innerHTML,n=r.createElement("DIV");n.innerHTML=i;const l=r.getListChildren(n,(function(e){return/FIGCAPTION/i.test(e.nodeName)}));for(let e=0,t=l.length;e"+this._wd.head.outerHTML+""+n.innerHTML+""}return n.innerHTML},addDocEvent:function(t,i,n){o.addEventListener(t,i,n),e.option.iframe&&this._wd.addEventListener(t,i)},removeDocEvent:function(t,i){o.removeEventListener(t,i),e.option.iframe&&this._wd.removeEventListener(t,i)},_charCount:function(t,i){const n=e.element.charCounter;if(!n)return!0;(!t||t<0)&&(t=0);const l=e.option.maxCharCount;if(a.setTimeout((function(){n.textContent=e.element.wysiwyg.textContent.length})),l>0){let o=!1;const s=e.element.wysiwyg.textContent.length;if(s>l){c._editorRange();const e=c.getRange(),t=e.endOffset-1,i=c.getSelectionNode().textContent;c.getSelectionNode().textContent=i.slice(0,e.endOffset-1)+i.slice(e.endOffset,i.length),c.setRange(e.endContainer,t,e.endContainer,t),o=!0}else s+t>l&&(o=!0);if(o)return i&&!r.hasClass(n,"se-blink")&&(r.addClass(n,"se-blink"),a.setTimeout((function(){r.removeClass(n,"se-blink")}),600)),!1}return!0},_checkComponents:function(){this.plugins.image&&(this.initPlugins.image?this.plugins.image.checkImagesInfo.call(this):this.callPlugin("image",this.plugins.image.checkImagesInfo.bind(this))),this.plugins.video&&(this.initPlugins.video?this.plugins.video.checkVideosInfo.call(this):this.callPlugin("video",this.plugins.video.checkVideosInfo.bind(this)))},_setCodeView:function(t){e.option.codeMirrorEditor?e.option.codeMirrorEditor.getDoc().setValue(t):e.element.code.value=t},_getCodeView:function(){return e.option.codeMirrorEditor?e.option.codeMirrorEditor.getDoc().getValue():e.element.code.value},_init:function(){this._ww=e.option.iframe?e.element.wysiwygFrame.contentWindow:a,this._wd=o,a.setTimeout(function(){this._checkComponents(),this._imagesInfoInit=!1,this._imagesInfoReset=!1,this.history.reset(!0),l.iframe&&(this._wd=e.element.wysiwygFrame.contentDocument,e.element.wysiwyg=this._wd.body,"auto"===l.height&&(this._iframeAuto=this._wd.body),this._iframeAutoHeight())}.bind(this)),this.codeViewDisabledButtons=e.element.toolbar.querySelectorAll('.se-toolbar button:not([class~="code-view-enabled"])'),this._isInline=/inline/i.test(e.option.mode),this._isBalloon=/balloon/i.test(e.option.mode),this.commandMap={FORMAT:e.tool.format,FONT:e.tool.font,FONT_TOOLTIP:e.tool.fontTooltip,SIZE:e.tool.fontSize,ALIGN:e.tool.align,LI:e.tool.list,LI_ICON:e.tool.list&&e.tool.list.querySelector("i"),STRONG:e.tool.bold,INS:e.tool.underline,EM:e.tool.italic,DEL:e.tool.strike,SUB:e.tool.subscript,SUP:e.tool.superscript,OUTDENT:e.tool.outdent},this._variable._originCssText=e.element.topArea.style.cssText,this._placeholder=e.element.placeholder,this._checkPlaceholder(),this.history=function(e,t){const i=window,n=e.context.element,l=e.util,o=e.context.tool.undo,s=e.context.tool.redo;let a=null,r=0,c=[];function d(){const i=c[r];n.wysiwyg.innerHTML=i.contents,e.setRange(l.getNodeFromPath(i.s.path,n.wysiwyg),i.s.offset,l.getNodeFromPath(i.e.path,n.wysiwyg),i.e.offset),e.focus(),0===r?(o&&o.setAttribute("disabled",!0),s&&s.removeAttribute("disabled")):r===c.length-1?(o&&o.removeAttribute("disabled"),s&&s.setAttribute("disabled",!0)):(o&&o.removeAttribute("disabled"),s&&s.removeAttribute("disabled")),e._checkComponents(),e._charCount(0,!1),e._resourcesStateChange(),t()}function u(){const i=e.getContents(!0);if(c[r]&&i===c[r].contents)return;r++;const n=e.getRange();c.length>r&&(c=c.slice(0,r),s&&s.setAttribute("disabled",!0)),c[r]={contents:i,s:{path:l.getNodePath(n.startContainer,null),offset:n.startOffset},e:{path:l.getNodePath(n.endContainer,null),offset:n.endOffset}},1===r&&o&&o.removeAttribute("disabled"),e._checkComponents(),e._charCount(0,!1),t()}return{stack:c,push:function(t){i.setTimeout(e._resourcesStateChange),t&&!a||(i.clearTimeout(a),t)?a=i.setTimeout((function(){i.clearTimeout(a),a=null,u()}),500):u()},undo:function(){r>0&&(r--,d())},redo:function(){c.length-1>r&&(r++,d())},go:function(e){r=e<0?c.length-1:e,d()},reset:function(i){o&&o.setAttribute("disabled",!0),s&&s.setAttribute("disabled",!0),e.context.tool.save&&e.context.tool.save.setAttribute("disabled",!0),c.splice(0),r=0,c[r]={contents:e.getContents(!0),s:{path:[0,0],offset:0},e:{path:[0,0],offset:0}},i||t()}}}(this,d._onChange_historyStack)},_resourcesStateChange:function(){c._iframeAutoHeight(),c._checkPlaceholder()},_iframeAutoHeight:function(){this._iframeAuto&&(e.element.wysiwygFrame.style.height=this._iframeAuto.offsetHeight+"px")},_checkPlaceholder:function(){if(this._placeholder){if(this._variable.isCodeView)return void(this._placeholder.style.display="none");const t=e.element.wysiwyg;!r.onlyZeroWidthSpace(t.textContent)||t.querySelector(".se-component, pre, blockquote, hr, li, table, img, iframe, video")||(t.innerText.match(/\n/g)||"").length>1?this._placeholder.style.display="none":this._placeholder.style.display="block"}}},d={_directionKeyCode:new a.RegExp("^(8|13|32|46|3[3-9]|40|46)$"),_nonTextKeyCode:new a.RegExp("^(8|13|1[6-9]|20|27|3[3-9]|40|45|46|11[2-9]|12[0-3]|144|145)$"),_historyIgnoreKeyCode:new a.RegExp("^(1[6-9]|20|27|3[3-9]|40|45|11[2-9]|12[0-3]|144|145)$"),_onButtonsCheck:new a.RegExp("^(STRONG|INS|EM|DEL|SUB|SUP|LI)$"),_frontZeroWidthReg:new a.RegExp("^"+r.zeroWidthSpace+"+",""),_keyCodeShortcut:{65:"A",66:"B",83:"S",85:"U",73:"I",89:"Y",90:"Z",219:"[",221:"]"},_shortcutCommand:function(e,t){let i=null;switch(d._keyCodeShortcut[e]){case"A":i="selectAll";break;case"B":i="STRONG";break;case"S":t&&(i="DEL");break;case"U":i="INS";break;case"I":i="EM";break;case"Z":i=t?"redo":"undo";break;case"Y":i="redo";break;case"[":i="outdent";break;case"]":i="indent"}return!!i&&(c.commandHandler(c.commandMap[i],i),!0)},_findButtonEffectTag:function(){const t=c.commandMap,i=this._onButtonsCheck,l=[],o=[];let s=!0,a=!0,d=!0,u=!0,h=!0,g=!0,p=!0,m="";for(let f=c.getSelectionNode();!r.isWysiwygDiv(f)&&f;f=f.parentNode)if(1===f.nodeType&&!r.isBreak(f))if(m=f.nodeName.toUpperCase(),o.push(m),r.isFormatElement(f)){s&&t.FORMAT&&(l.push("FORMAT"),r.changeTxt(t.FORMAT,m),t.FORMAT.setAttribute("data-focus",m),s=!1);const e=f.style.textAlign;a&&e&&t.ALIGN&&(l.push("ALIGN"),t.ALIGN.className="se-icon-align-"+e,t.ALIGN.setAttribute("data-focus",e),a=!1),g&&f.style.marginLeft&&r.getNumber(f.style.marginLeft,0)>0&&t.OUTDENT&&(l.push("OUTDENT"),t.OUTDENT.removeAttribute("disabled"),g=!1)}else{if(d&&r.isList(m)&&t.LI&&(l.push("LI"),t.LI.setAttribute("data-focus",m),/UL/i.test(m)?(r.removeClass(t.LI_ICON,"se-icon-list-number"),r.addClass(t.LI_ICON,"se-icon-list-bullets")):(r.removeClass(t.LI_ICON,"se-icon-list-bullets"),r.addClass(t.LI_ICON,"se-icon-list-number")),d=!1),u&&f.style.fontFamily.length>0&&t.FONT){l.push("FONT");const e=(f.style.fontFamily||f.face||n.toolbar.font).replace(/["']/g,"");r.changeTxt(t.FONT,e),r.changeTxt(t.FONT_TOOLTIP,e),u=!1}h&&f.style.fontSize.length>0&&t.SIZE&&(l.push("SIZE"),r.changeTxt(t.SIZE,f.style.fontSize),h=!1),p&&/^A$/.test(m)&&null===f.getAttribute("data-image-link")&&c.plugins.link?(e.link&&c.controllerArray[0]===e.link.linkBtn||c.callPlugin("link",(function(){c.plugins.link.call_controller_linkButton.call(c,f)})),p=!1):p&&e.link&&c.controllerArray[0]===e.link.linkBtn&&c.controllersOff(),i.test(m)&&l.push(m)}for(let e=0;e-1||(t.FONT&&/^FONT$/i.test(e)?(r.changeTxt(t.FONT,n.toolbar.font),r.changeTxt(t.FONT_TOOLTIP,n.toolbar.font)):t.SIZE&&/^SIZE$/i.test(e)?r.changeTxt(t.SIZE,n.toolbar.fontSize):t.ALIGN&&/^ALIGN$/i.test(e)?(t.ALIGN.className="se-icon-align-left",t.ALIGN.removeAttribute("data-focus")):t.OUTDENT&&/^OUTDENT$/i.test(e)?t.OUTDENT.setAttribute("disabled",!0):t.LI&&r.isListCell(e)?(t.LI.removeAttribute("data-focus"),r.removeClass(t.LI_ICON,"se-icon-list-bullets"),r.addClass(t.LI_ICON,"se-icon-list-number"),r.removeClass(t.LI,"active")):r.removeClass(t[e],"active"));c._variable.currentNodes=o.reverse(),e.option.showPathLabel&&(e.element.navigation.textContent=c._variable.currentNodes.join(" > "))},_cancelCaptionEdit:function(){this.setAttribute("contenteditable",!1),this.removeEventListener("blur",d._cancelCaptionEdit)},onMouseDown_toolbar:function(e){let t=e.target;if(r.getParentElement(t,".se-submenu"))e.stopPropagation(),c._notHideToolbar=!0;else{e.preventDefault();let i=t.getAttribute("data-command"),n=t.className;for(;!i&&!/se-menu-list/.test(n)&&!/se-toolbar/.test(n);)t=t.parentNode,i=t.getAttribute("data-command"),n=t.className;i===c._submenuName&&e.stopPropagation()}},onClick_toolbar:function(e){e.preventDefault(),e.stopPropagation();let t=e.target,i=t.getAttribute("data-display"),n=t.getAttribute("data-command"),l=t.className;for(;!n&&!/se-menu-list/.test(l)&&!/se-toolbar/.test(l);)t=t.parentNode,n=t.getAttribute("data-command"),i=t.getAttribute("data-display"),l=t.className;if((n||i)&&!t.disabled){if(c.focus(),i)return!/submenu/.test(i)||null!==t.nextElementSibling&&t===c.submenuActiveButton?/dialog/.test(i)?void c.callPlugin(n,(function(){c.plugins.dialog.open.call(c,n,!1)})):void c.submenuOff():void c.callPlugin(n,(function(){c.submenuOn(t)}));n&&c.commandHandler(t,n)}},onMouseDown_wysiwyg:function(e){c._isBalloon&&d._hideToolbar();const t=r.getParentElement(e.target,r.isCell);if(!t)return;const i=c.plugins.table;t===i._fixedCell||i._shift||c.callPlugin("table",(function(){i.onTableCellMultiSelect.call(c,t,!1)}))},onClick_wysiwyg:function(t){const i=t.target;if("false"===e.element.wysiwyg.getAttribute("contenteditable"))return;if(t.stopPropagation(),/^FIGURE$/i.test(i.nodeName)){const e=i.querySelector("IMG"),n=i.querySelector("IFRAME");if(e)return t.preventDefault(),void c.selectComponent(e,"image");if(n)return t.preventDefault(),void c.selectComponent(n,"video")}const n=r.getParentElement(i,"FIGCAPTION");if(n&&(!n.getAttribute("contenteditable")||"false"===n.getAttribute("contenteditable"))&&(t.preventDefault(),n.setAttribute("contenteditable",!0),n.focus(),c._isInline&&!c._inlineToolbarAttr.isShow)){d._showToolbarInline();const e=function(){d._hideToolbar(),n.removeEventListener("blur",e)};n.addEventListener("blur",e)}c._editorRange();const l=c.getSelectionNode(),o=r.getFormatElement(l),s=r.getRangeFormatElement(l);if(c.getRange().collapsed&&(!o||o===s)&&"false"!==i.getAttribute("contenteditable")){if(r.isList(s)){const e=r.createElement("LI"),t=l.nextElementSibling;e.appendChild(l),s.insertBefore(e,t)}else c.execCommand("formatBlock",!1,r.isRangeFormatElement(s)?"DIV":"P");c.focus()}if(d._findButtonEffectTag(),c._isBalloon){const e=c.getRange();e.collapsed?d._hideToolbar():d._showToolbarBalloon(e)}p.onClick&&p.onClick(t)},_showToolbarBalloon:function(t){if(!c._isBalloon)return;const i=t||c.getRange(),n=e.element.toolbar,l=c.getSelection();let s;if(l.focusNode===l.anchorNode)s=l.focusOffsetn.offsetWidth?n.offsetWidth-u:b"),n.parentNode.insertBefore(o,n),c.callPlugin(g,(function(){const e=c.plugins.resizing.call_controller_resize.call(c,i._element,g);c.plugins[g].onModifyMode.call(c,i._element,e)}))}}if(n&&/16/.test(i)){t.preventDefault(),t.stopPropagation();const e=c.plugins.table;if(e&&!e._shift&&!e._ref){const t=r.getParentElement(m,r.isCell);if(t)return void e.onTableCellMultiSelect.call(c,t,!0)}}const _=!(l||o||h||d._nonTextKeyCode.test(i));if(!c._charCount(1,_)&&_)return t.preventDefault(),t.stopPropagation(),!1;p.onKeyDown&&p.onKeyDown(t)},onKeyUp_wysiwyg:function(e){c._editorRange();const t=e.keyCode,i=e.ctrlKey||e.metaKey||91===t||92===t,n=e.altKey;let l=c.getSelectionNode();if(c._isBalloon&&!c.getRange().collapsed)return void d._showToolbarBalloon();if(8===t&&r.isWysiwygDiv(l)&&""===l.textContent){e.preventDefault(),e.stopPropagation(),l.innerHTML="";const t=r.createElement(r.isFormatElement(c._variable.currentNodes[0])?c._variable.currentNodes[0]:"P");return t.innerHTML="
    ",l.appendChild(t),c.setRange(t,0,t,0),d._findButtonEffectTag(),void c._checkComponents()}const o=r.getFormatElement(l),s=r.getRangeFormatElement(l);if(o&&o!==s||(c.execCommand("formatBlock",!1,r.isRangeFormatElement(s)?"DIV":"P"),c.focus(),l=c.getSelectionNode()),d._directionKeyCode.test(t)&&d._findButtonEffectTag(),c._checkComponents(),!i&&!n&&!d._historyIgnoreKeyCode.test(t)&&r.zeroWidthRegExp.test(l.textContent)){const e=c.getRange(),t=e.startOffset,i=e.endOffset,n=(l.textContent.match(d._frontZeroWidthReg)||"").length;l.textContent=l.textContent.replace(r.zeroWidthRegExp,""),c.setRange(l,t-n,l,i-n)}const a=!i&&!n&&!d._nonTextKeyCode.test(t);if(!c._charCount(1,a)&&1===e.key.length)return e.preventDefault(),e.stopPropagation(),!1;a&&c.history.push(!0),p.onKeyUp&&p.onKeyUp(e)},onScroll_wysiwyg:function(e){c.controllersOff(),c._isBalloon&&d._hideToolbar(),p.onScroll&&p.onScroll(e)},onMouseDown_resizingBar:function(t){t.stopPropagation(),c._variable.resizeClientY=t.clientY,e.element.resizeBackground.style.display="block",o.addEventListener("mousemove",d._resize_editor),o.addEventListener("mouseup",(function t(){e.element.resizeBackground.style.display="none",o.removeEventListener("mousemove",d._resize_editor),o.removeEventListener("mouseup",t)}))},_resize_editor:function(t){const i=e.element.editorArea.offsetHeight+(t.clientY-c._variable.resizeClientY);e.element.wysiwygFrame.style.height=e.element.code.style.height=(i=i+l?(c._sticky||d._onStickyToolbar(),t.toolbar.style.top=i+l+e.option.stickyToolbar-n-c._variable.minResizingSize+"px"):n>=l&&d._onStickyToolbar()},_getStickyOffsetTop:function(){let t=e.element.topArea,i=0;for(;t;)i+=t.offsetTop,t=t.offsetParent;return i},_onStickyToolbar:function(){const t=e.element;c._isInline||(t._stickyDummy.style.height=t.toolbar.offsetHeight+"px",t._stickyDummy.style.display="block"),t.toolbar.style.top=e.option.stickyToolbar+"px",t.toolbar.style.width=c._isInline?c._inlineToolbarAttr.width:t.toolbar.offsetWidth+"px",r.addClass(t.toolbar,"se-toolbar-sticky"),c._sticky=!0},_offStickyToolbar:function(){const t=e.element;t._stickyDummy.style.display="none",t.toolbar.style.top=c._isInline?c._inlineToolbarAttr.top:"",t.toolbar.style.width=c._isInline?c._inlineToolbarAttr.width:"",t.editorArea.style.marginTop="",r.removeClass(t.toolbar,"se-toolbar-sticky"),c._sticky=!1},_codeViewAutoHeight:function(){e.element.code.style.height=e.element.code.scrollHeight+"px"},onPaste_wysiwyg:function(e){const t=e.clipboardData;if(!t)return!0;const i=c._charCount(t.getData("text/plain").length,!0),n=r.cleanHTML(t.getData("text/html"));return("function"!=typeof p.onPaste||p.onPaste(e,n,i))&&i?void(n?(e.stopPropagation(),e.preventDefault(),c.execCommand("insertHTML",!1,n)):c.history.push(!0)):(e.preventDefault(),e.stopPropagation(),!1)},onCut_wysiwyg:function(){a.setTimeout((function(){c._resourcesStateChange(),c._charCount(0,!1),c.history.push(!1)}))},onDragOver_wysiwyg:function(e){e.preventDefault()},onDrop_wysiwyg:function(t){const i=t.dataTransfer;if(!i)return!0;const n=i.files;if(n.length>0&&c.plugins.image)d._setDropLocationSelection(t),c.callPlugin("image",(function(){e.image.imgInputFile.files=n,c.plugins.image.onRender_imgInput.call(c),e.image.imgInputFile.files=null}));else{if(!c._charCount(i.getData("text/plain").length,!0))return t.preventDefault(),t.stopPropagation(),!1;{const e=r.cleanHTML(i.getData("text/html"));e&&(d._setDropLocationSelection(t),c.execCommand("insertHTML",!1,e))}}p.onDrop&&p.onDrop(t)},_setDropLocationSelection:function(e){e.stopPropagation(),e.preventDefault();const t=c.getRange();c.setRange(t.startContainer,t.startOffset,t.endContainer,t.endOffset)},_onChange_historyStack:function(){e.tool.save&&e.tool.save.removeAttribute("disabled"),p.onChange&&p.onChange(c.getContents(!0))},_addEvent:function(){const t=l.iframe?c._ww:e.element.wysiwyg;e.element.toolbar.addEventListener("mousedown",d.onMouseDown_toolbar,!1),e.element.toolbar.addEventListener("click",d.onClick_toolbar,!1),t.addEventListener("click",d.onClick_wysiwyg,!1),t.addEventListener("keydown",d.onKeyDown_wysiwyg,!1),t.addEventListener("keyup",d.onKeyUp_wysiwyg,!1),t.addEventListener("paste",d.onPaste_wysiwyg,!1),t.addEventListener("cut",d.onCut_wysiwyg,!1),t.addEventListener("dragover",d.onDragOver_wysiwyg,!1),t.addEventListener("drop",d.onDrop_wysiwyg,!1),t.addEventListener("scroll",d.onScroll_wysiwyg,!1),(c._isBalloon||c.plugins.table)&&t.addEventListener("mousedown",d.onMouseDown_wysiwyg,!1),c.plugins.table&&t.addEventListener("touchstart",d.onMouseDown_wysiwyg,{passive:!0,useCapture:!1}),"auto"!==e.option.height||e.option.codeMirrorEditor||(e.element.code.addEventListener("keydown",d._codeViewAutoHeight,!1),e.element.code.addEventListener("keyup",d._codeViewAutoHeight,!1),e.element.code.addEventListener("paste",d._codeViewAutoHeight,!1)),e.element.resizingBar&&(/\d+/.test(e.option.height)?e.element.resizingBar.addEventListener("mousedown",d.onMouseDown_resizingBar,!1):r.addClass(e.element.resizingBar,"se-resizing-none")),c._isInline&&t.addEventListener("focus",d._showToolbarInline,!1),(c._isInline||c._isBalloon)&&t.addEventListener("blur",d._hideToolbar,!1),a.removeEventListener("resize",d.onResize_window),a.removeEventListener("scroll",d.onScroll_window),a.addEventListener("resize",d.onResize_window,!1),e.option.stickyToolbar>-1&&a.addEventListener("scroll",d.onScroll_window,!1)},_removeEvent:function(){const t=l.iframe?c._ww:e.element.wysiwyg;e.element.toolbar.removeEventListener("mousedown",d.onMouseDown_toolbar),e.element.toolbar.removeEventListener("click",d.onClick_toolbar),t.removeEventListener("click",d.onClick_wysiwyg),t.removeEventListener("keydown",d.onKeyDown_wysiwyg),t.removeEventListener("keyup",d.onKeyUp_wysiwyg),t.removeEventListener("paste",d.onPaste_wysiwyg),t.removeEventListener("cut",d.onCut_wysiwyg),t.removeEventListener("dragover",d.onDragOver_wysiwyg),t.removeEventListener("drop",d.onDrop_wysiwyg),t.removeEventListener("scroll",d.onScroll_wysiwyg),t.removeEventListener("mousedown",d.onMouseDown_wysiwyg),t.removeEventListener("touchstart",d.onMouseDown_wysiwyg,{passive:!0,useCapture:!1}),t.removeEventListener("focus",d._showToolbarInline),t.removeEventListener("blur",d._hideToolbar),e.element.code.removeEventListener("keydown",d._codeViewAutoHeight),e.element.code.removeEventListener("keyup",d._codeViewAutoHeight),e.element.code.removeEventListener("paste",d._codeViewAutoHeight),e.element.resizingBar&&e.element.resizingBar.removeEventListener("mousedown",d.onMouseDown_resizingBar),a.removeEventListener("resize",d.onResize_window),a.removeEventListener("scroll",d.onScroll_window)}},p={core:c,util:r,onScroll:null,onClick:null,onKeyDown:null,onKeyUp:null,onDrop:null,onChange:null,onPaste:null,showInline:null,onImageUpload:null,onImageUploadError:null,setOptions:function(o){d._removeEvent(),c.plugins=o.plugins||c.plugins;const s=[e.option,o].reduce((function(e,t){return Object.keys(t).forEach((function(i){e[i]=t[i]})),e}),{}),a=h._setOptions(s,e,c.plugins,e.option);a.callButtons&&(t=a.callButtons,c.initPlugins={}),a.plugins&&(c.plugins=i=a.plugins);const r=e.element,u={_top:r.topArea,_relative:r.relative,_toolBar:r.toolbar,_editorArea:r.editorArea,_wysiwygArea:r.wysiwygFrame,_codeArea:r.code,_placeholder:r.placeholder,_resizingBar:r.resizingBar,_navigation:r.navigation,_charCounter:r.charCounter,_loading:r.loading,_resizeBack:r.resizeBackground,_stickyDummy:r._stickyDummy,_arrow:r._arrow};l=s,c.lang=n=l.lang,c.context=e=g(e.element.originElement,u,l),c._imagesInfoReset=!0,c._init(),d._addEvent(),c._charCount(0,!1),d._offStickyToolbar(),d.onResize_window(),c.focus()},noticeOpen:function(e){c.addModule([s]),s.open.call(c,e)},noticeClose:function(){c.addModule([s]),s.close.call(c)},save:function(){e.element.originElement.value=c.getContents(!1)},getContext:function(){return e},getContents:function(e){return c.getContents(e)},getImagesInfo:function(){return c._variable._imagesInfo},insertImage:function(e){c.plugins.image&&e&&(c.initPlugins.image?c.plugins.image.submitAction.call(c,e):c.callPlugin("image",c.plugins.image.submitAction.bind(c,e)),c.focus())},insertHTML:function(e){if(!e.nodeType||1!==e.nodeType){const t=r.createElement("DIV");t.innerHTML=e,e=t.firstChild||t.content.firstChild}let t=null;(r.isFormatElement(e)||/^(IMG|IFRAME)$/i.test(e.nodeName))&&(t=r.getFormatElement(c.getSelectionNode())),r.isComponent(e)?c.insertComponent(e,!1):c.insertNode(e,t),c.focus()},setContents:function(e){c.setContents(e)},appendContents:function(t){const i=r.convertContentsForEditor(t);c._variable.isCodeView?c._setCodeView(c._getCodeView()+"\n"+r.convertHTMLForCodeView(i,c._variable.codeIndent)):e.element.wysiwyg.innerHTML+=i,c.history.push(!1)},disabled:function(){e.tool.cover.style.display="block",e.element.wysiwyg.setAttribute("contenteditable",!1),e.option.codeMirrorEditor?e.option.codeMirrorEditor.setOption("readOnly",!0):e.element.code.setAttribute("disabled","disabled")},enabled:function(){e.tool.cover.style.display="none",e.element.wysiwyg.setAttribute("contenteditable",!0),e.option.codeMirrorEditor?e.option.codeMirrorEditor.setOption("readOnly",!1):e.element.code.removeAttribute("disabled")},show:function(){const t=e.element.topArea.style;"none"===t.display&&(t.display=e.option.display)},hide:function(){e.element.topArea.style.display="none"},destroy:function(){d._removeEvent(),r.removeItem(e.element.topArea),a.Object.keys(c).forEach((function(e){delete c[e]})),a.Object.keys(d).forEach((function(e){delete d[e]})),a.Object.keys(e).forEach((function(t){delete e[t]})),a.Object.keys(t).forEach((function(e){delete t[e]})),a.Object.keys(this).forEach(function(e){delete this[e]}.bind(this))}};return c._init(),d._addEvent(),c._charCount(0,!1),p},m={init:function(e){return{create:function(t,i){return this.create(t,i,e)}.bind(this)}},create:function(e,t,i){"object"!=typeof t&&(t={}),i&&(t=[i,t].reduce((function(e,t){return Object.keys(t).forEach((function(i){if("plugins"===i&&t[i]&&e[i]){let n=e[i],l=t[i];n=n.length?n:Object.keys(n).map((function(e){return n[e]})),l=l.length?l:Object.keys(l).map((function(e){return l[e]})),e[i]=l.filter((function(e){return-1===n.indexOf(e)})).concat(n)}else e[i]=t[i]})),e}),{}));const n="string"==typeof e?document.getElementById(e):e;if(!n){if("string"==typeof e)throw Error('[SUNEDITOR.create.fail] The element for that id was not found (ID:"'+e+'")');throw Error("[SUNEDITOR.create.fail] suneditor requires textarea's element or id value")}const l=h.init(n,t);if(l.constructed._top.id&&document.getElementById(l.constructed._top.id))throw Error('[SUNEDITOR.create.fail] The ID of the suneditor you are trying to create already exists (ID:"'+l.constructed._top.id+'")');return n.style.display="none",l.constructed._top.style.display="block","object"==typeof n.nextElementSibling?n.parentNode.insertBefore(l.constructed._top,n.nextElementSibling):n.parentNode.appendChild(l.constructed._top),p(g(n,l.constructed,l.options),l.pluginCallButtons,l.plugins,l.options.lang,t)}};window.SUNEDITOR=m.init({plugins:a})}}); \ No newline at end of file diff --git a/package.json b/package.json index cdefc34a8..83229edd6 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "sideEffects": [ "./src/assets/css/*.css" ], - "version": "2.23.2", + "version": "2.23.3", "description": "Pure JavaScript based WYSIWYG web editor", "main": "src/suneditor.js", "keywords": [