From: Alexander Smirnov Date: Fri, 28 Feb 2025 07:48:00 +0000 (+0300) Subject: полные версии summernote X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=0f270e05ada250545a566d831b9a7e197e5384c0;p=erp24_rep%2Fyii-erp24%2F.git полные версии summernote --- diff --git a/erp24/assets/JQueryPluginsAsset.php b/erp24/assets/JQueryPluginsAsset.php index 18d92714..e46d815c 100644 --- a/erp24/assets/JQueryPluginsAsset.php +++ b/erp24/assets/JQueryPluginsAsset.php @@ -17,7 +17,7 @@ class JQueryPluginsAsset extends AssetBundle '/js/correctFontSize.js', '/js/jquery.datetimepicker.full.js', '/js/moment-with-locales.min.js', - '/js/summernote-lite.min.js', + '/js/summernote-lite.js', '/js/datatables.min.js', '/azea/assets/plugins/spectrum-colorpicker/spectrum.js', '/azea/assets/plugins/select2/select2.full.min.js', @@ -46,7 +46,7 @@ class JQueryPluginsAsset extends AssetBundle '/css/pagination.css', '/css/font-awesome.css', '/azea/assets/plugins/notify/css/notifIt.css', - '/css/summernote-lite.min.css', + '/css/summernote-lite.css', '/css/datatables.min.css' ]; public $jsOptions = [ diff --git a/erp24/web/css/summernote-lite.css b/erp24/web/css/summernote-lite.css new file mode 100644 index 00000000..37c60287 --- /dev/null +++ b/erp24/web/css/summernote-lite.css @@ -0,0 +1,1505 @@ +/*! + * + * Super simple WYSIWYG editor v0.9.0 + * https://summernote.org + * + * Copyright 2013~ Hackerwins and contributors + * Summernote may be freely distributed under the MIT license. + * + * Date: 2024-09-30T14:42Z + * + */ +@font-face { + font-family: "summernote"; + font-style: normal; + font-weight: 400; + font-display: auto; + src: url("./font/summernote.eot?#iefix") format("embedded-opentype"), url("./font/summernote.woff2") format("woff2"), url("./font/summernote.woff") format("woff"), url("./font/summernote.ttf") format("truetype"); +} +[class^=note-icon]:before, +[class*=" note-icon"]:before { + display: inline-block; + font-family: "summernote"; + font-style: normal; + font-size: inherit; + text-decoration: inherit; + text-rendering: auto; + text-transform: none; + vertical-align: middle; + -moz-osx-font-smoothing: grayscale; + -webkit-font-smoothing: antialiased; + speak: none; +} + +.note-icon-fw { + text-align: center; + width: 1.25em; +} + +.note-icon-border { + border: solid 0.08em #eee; + border-radius: 0.1em; + padding: 0.2em 0.25em 0.15em; +} + +.note-icon-pull-left { + float: left; +} + +.note-icon-pull-right { + float: right; +} + +.note-icon.note-icon-pull-left { + margin-right: 0.3em; +} +.note-icon.note-icon-pull-right { + margin-left: 0.3em; +} + +.note-icon-align::before { + content: "\ea01"; +} + +.note-icon-align-center::before { + content: "\ea02"; +} + +.note-icon-align-indent::before { + content: "\ea03"; +} + +.note-icon-align-justify::before { + content: "\ea04"; +} + +.note-icon-align-left::before { + content: "\ea05"; +} + +.note-icon-align-outdent::before { + content: "\ea06"; +} + +.note-icon-align-right::before { + content: "\ea07"; +} + +.note-icon-arrow-circle-down::before { + content: "\ea08"; +} + +.note-icon-arrow-circle-left::before { + content: "\ea09"; +} + +.note-icon-arrow-circle-right::before { + content: "\ea0a"; +} + +.note-icon-arrow-circle-up::before { + content: "\ea0b"; +} + +.note-icon-arrows-alt::before { + content: "\ea0c"; +} + +.note-icon-arrows-h::before { + content: "\ea0d"; +} + +.note-icon-arrows-v::before { + content: "\ea0e"; +} + +.note-icon-bold::before { + content: "\ea0f"; +} + +.note-icon-caret::before { + content: "\ea10"; +} + +.note-icon-chain-broken::before { + content: "\ea11"; +} + +.note-icon-circle::before { + content: "\ea12"; +} + +.note-icon-close::before { + content: "\ea13"; +} + +.note-icon-code::before { + content: "\ea14"; +} + +.note-icon-col-after::before { + content: "\ea15"; +} + +.note-icon-col-before::before { + content: "\ea16"; +} + +.note-icon-col-remove::before { + content: "\ea17"; +} + +.note-icon-eraser::before { + content: "\ea18"; +} + +.note-icon-float-left::before { + content: "\ea19"; +} + +.note-icon-float-none::before { + content: "\ea1a"; +} + +.note-icon-float-right::before { + content: "\ea1b"; +} + +.note-icon-font::before { + content: "\ea1c"; +} + +.note-icon-frame::before { + content: "\ea1d"; +} + +.note-icon-italic::before { + content: "\ea1e"; +} + +.note-icon-link::before { + content: "\ea1f"; +} + +.note-icon-magic::before { + content: "\ea20"; +} + +.note-icon-menu-check::before { + content: "\ea21"; +} + +.note-icon-minus::before { + content: "\ea22"; +} + +.note-icon-orderedlist::before { + content: "\ea23"; +} + +.note-icon-pencil::before { + content: "\ea24"; +} + +.note-icon-picture::before { + content: "\ea25"; +} + +.note-icon-question::before { + content: "\ea26"; +} + +.note-icon-redo::before { + content: "\ea27"; +} + +.note-icon-rollback::before { + content: "\ea28"; +} + +.note-icon-row-above::before { + content: "\ea29"; +} + +.note-icon-row-below::before { + content: "\ea2a"; +} + +.note-icon-row-remove::before { + content: "\ea2b"; +} + +.note-icon-special-character::before { + content: "\ea2c"; +} + +.note-icon-square::before { + content: "\ea2d"; +} + +.note-icon-strikethrough::before { + content: "\ea2e"; +} + +.note-icon-subscript::before { + content: "\ea2f"; +} + +.note-icon-summernote::before { + content: "\ea30"; +} + +.note-icon-superscript::before { + content: "\ea31"; +} + +.note-icon-table::before { + content: "\ea32"; +} + +.note-icon-text-height::before { + content: "\ea33"; +} + +.note-icon-trash::before { + content: "\ea34"; +} + +.note-icon-underline::before { + content: "\ea35"; +} + +.note-icon-undo::before { + content: "\ea36"; +} + +.note-icon-unorderedlist::before { + content: "\ea37"; +} + +.note-icon-video::before { + content: "\ea38"; +} + +.note-frame { + -ms-box-sizing: border-box; + box-sizing: border-box; + color: #000; + font-family: sans-serif; + border-radius: 4px; +} + +.note-toolbar { + padding: 10px 5px; + border-bottom: 1px solid #e2e2e2; + color: #333; + background-color: #f5f5f5; + border-color: #ddd; + border-top-left-radius: 3px; + border-top-right-radius: 3px; +} + +.note-btn-group { + position: relative; + display: inline-block; + margin-right: 8px; +} +.note-btn-group > .note-btn-group { + margin-right: 0; +} +.note-btn-group > .note-btn:first-child { + margin-left: 0; +} +.note-btn-group .note-btn + .note-btn, +.note-btn-group .note-btn + .note-btn-group, +.note-btn-group .note-btn-group + .note-btn, +.note-btn-group .note-btn-group + .note-btn-group { + margin-left: -1px; +} +.note-btn-group > .note-btn:not(:first-child), +.note-btn-group > .note-btn-group:not(:first-child) > .note-btn { + border-top-left-radius: 0; + border-bottom-left-radius: 0; +} +.note-btn-group > .note-btn:not(:last-child):not(.dropdown-toggle), +.note-btn-group > .note-btn-group:not(:last-child) > .note-btn { + border-top-right-radius: 0; + border-bottom-right-radius: 0; +} +.note-btn-group.open > .note-dropdown { + display: block; +} + +.note-btn { + display: inline-block; + font-weight: 400; + margin-bottom: 0; + text-align: center; + vertical-align: middle; + touch-action: manipulation; + cursor: pointer; + background-image: none; + border: 1px solid #dae0e5; + white-space: nowrap; + outline: 0; + color: #333; + background-color: #fff; + border-color: #dae0e5; + padding: 5px 10px; + font-size: 14px; + line-height: 1.4; + border-radius: 3px; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none; +} +.note-btn:focus, .note-btn.focus { + color: #333; + background-color: #ebebeb; + border-color: #dae0e5; +} +.note-btn:hover { + color: #333; + background-color: #ebebeb; + border-color: #dae0e5; +} +.note-btn.disabled:focus, .note-btn.disabled.focus, .note-btn[disabled]:focus, .note-btn[disabled].focus, fieldset[disabled] .note-btn:focus, fieldset[disabled] .note-btn.focus { + background-color: #fff; + border-color: #dae0e5; +} +.note-btn:hover, .note-btn:focus, .note-btn.focus { + color: #333; + text-decoration: none; + border: 1px solid #dae0e5; + background-color: #ebebeb; + outline: 0; + border-radius: 1px; +} +.note-btn:active, .note-btn.active { + outline: 0; + background-image: none; + color: #333; + text-decoration: none; + border: 1px solid #dae0e5; + background-color: #ebebeb; + outline: 0; + border-radius: 1px; + box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); +} +.note-btn.disabled, .note-btn[disabled], fieldset[disabled] .note-btn { + cursor: not-allowed; + -webkit-opacity: 0.65; + -khtml-opacity: 0.65; + -moz-opacity: 0.65; + opacity: 0.65; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=65); + filter: alpha(opacity=65); + box-shadow: none; +} +.note-btn > span.note-icon-caret:first-child { + margin-left: -1px; +} +.note-btn > span.note-icon-caret:nth-child(2) { + padding-left: 3px; + margin-right: -5px; +} + +.note-btn-primary { + background: #fa6362; + color: #fff; +} +.note-btn-primary:hover, .note-btn-primary:focus, .note-btn-primary.focus { + color: #fff; + text-decoration: none; + border: 1px solid #dae0e5; + background-color: #fa6362; + border-radius: 1px; +} + +.note-btn-block { + display: block; + width: 100%; +} + +.note-btn-block + .note-btn-block { + margin-top: 5px; +} + +input[type=submit].note-btn-block, +input[type=reset].note-btn-block, +input[type=button].note-btn-block { + width: 100%; +} + +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} + +.close { + float: right; + font-size: 21px; + line-height: 1; + color: #000; + opacity: 0.2; +} + +.close:hover { + -webkit-opacity: 1; + -khtml-opacity: 1; + -moz-opacity: 1; + -ms-filter: alpha(opacity=100); + filter: alpha(opacity=100); + opacity: 1; +} + +.note-dropdown { + position: relative; +} + +.note-color .dropdown-toggle { + width: 30px; + padding-left: 5px; +} + +.note-dropdown-menu { + display: none; + min-width: 100px; + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + float: left; + text-align: left; + background: #fff; + border: 1px solid #e2e2e2; + padding: 5px; + background-clip: padding-box; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06); +} +.note-dropdown-menu > *:last-child { + margin-right: 0; +} + +.note-btn-group.open .note-dropdown-menu { + display: block; +} + +.note-dropdown-item { + display: block; +} +.note-dropdown-item:hover { + background-color: #ebebeb; +} + +a.note-dropdown-item, +a.note-dropdown-item:hover { + margin: 5px 0; + color: #000; + text-decoration: none; +} + +.note-modal { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 1050; + -webkit-opacity: 1; + -khtml-opacity: 1; + -moz-opacity: 1; + opacity: 1; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + filter: alpha(opacity=100); + display: none; +} +.note-modal.open { + display: block; +} + +.note-modal-content { + position: relative; + width: auto; + margin: 30px 20px; + border: 1px solid rgba(0, 0, 0, 0.2); + background: #fff; + background-clip: border-box; + outline: 0; + border-radius: 5px; + box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); +} + +.note-modal-header { + padding: 10px 20px; + border: 1px solid #ededef; +} + +.note-modal-body { + position: relative; + padding: 20px 30px; +} +.note-modal-body kbd { + border-radius: 2px; + background-color: #000; + color: #fff; + padding: 3px 5px; + font-weight: 700; + -ms-box-sizing: border-box; + box-sizing: border-box; +} + +.note-modal-footer { + height: 40px; + padding: 10px; + text-align: center; +} + +.note-modal-footer a { + color: #337ab7; + text-decoration: none; +} + +.note-modal-footer a:hover, +.note-modal-footer a:focus { + color: #23527c; + text-decoration: underline; +} + +.note-modal-footer .note-btn { + float: right; +} + +.note-modal-title { + font-size: 20px; + color: #42515f; + margin: 0; + line-height: 1.4; +} + +.note-modal-backdrop { + position: fixed; + left: 0; + right: 0; + bottom: 0; + top: 0; + z-index: 1040; + background: #000; + -webkit-opacity: 0.5; + -khtml-opacity: 0.5; + -moz-opacity: 0.5; + opacity: 0.5; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=50); + filter: alpha(opacity=50); + display: none; +} +.note-modal-backdrop.open { + display: block; +} + +@media (min-width: 768px) { + .note-modal-content { + width: 600px; + margin: 30px auto; + } +} +@media (min-width: 992px) { + .note-modal-content-large { + width: 900px; + } +} +.note-modal .note-help-block { + display: block; + margin-top: 5px; + margin-bottom: 10px; + color: #737373; +} +.note-modal .note-nav { + display: flex; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.note-modal .note-nav-link { + display: block; + padding: 0.5rem 1rem; + color: #007bff; + text-decoration: none; + background-color: transparent; + -webkit-text-decoration-skip: objects; +} +.note-modal .note-nav-link:focus, +.note-modal .note-nav-link:hover { + color: #0056b3; + text-decoration: none; +} +.note-modal .note-nav-link.disabled { + color: #868e96; +} +.note-modal .note-nav-tabs { + border-bottom: 1px solid #ddd; +} +.note-modal .note-nav-tabs .note-nav-item { + margin-bottom: -1px; +} +.note-modal .note-nav-tabs .note-nav-link { + border: 1px solid transparent; + border-top-left-radius: 0.25rem; + border-top-right-radius: 0.25rem; +} +.note-modal .note-nav-tabs .note-nav-link:focus, +.note-modal .note-nav-tabs .note-nav-link:hover { + border-color: #e9ecef #e9ecef #ddd; +} +.note-modal .note-nav-tabs .note-nav-link.disabled { + color: #868e96; + background-color: transparent; + border-color: transparent; +} +.note-modal .note-nav-tabs .note-nav-item.show .note-nav-link { + color: #495057; + background-color: #fff; + border-color: #ddd #ddd #fff; +} +.note-modal .note-tab-content { + margin: 15px auto; +} +.note-modal .note-tab-content > .note-tab-pane:target ~ .note-tab-pane:last-child, +.note-modal .note-tab-content > .note-tab-pane { + display: none; +} +.note-modal .note-tab-content > :last-child, +.note-modal .note-tab-content > .note-tab-pane:target { + display: block; +} + +.note-form-group { + padding-bottom: 20px; +} + +.note-form-group:last-child { + padding-bottom: 0; +} + +.note-form-label { + display: block; + width: 100%; + font-size: 16px; + color: #42515f; + margin-bottom: 10px; + font-weight: 700; +} + +.note-input { + width: 100%; + display: block; + border: 1px solid #ededef; + background: #fff; + outline: 0; + padding: 6px 4px; + font-size: 14px; + -ms-box-sizing: border-box; + box-sizing: border-box; +} + +.note-input::-webkit-input-placeholder { + color: #eeeeee; +} + +.note-input:-moz-placeholder { /* Firefox 18- */ + color: #eeeeee; +} + +.note-input::-moz-placeholder { /* Firefox 19+ */ + color: #eeeeee; +} + +.note-input:-ms-input-placeholder { + color: #eeeeee; +} + +.note-tooltip { + position: absolute; + z-index: 1070; + display: block; + font-size: 13px; + transition: opacity 0.15s; + -webkit-opacity: 0; + -khtml-opacity: 0; + -moz-opacity: 0; + opacity: 0; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0); + filter: alpha(opacity=0); +} +.note-tooltip.in { + -webkit-opacity: 0.9; + -khtml-opacity: 0.9; + -moz-opacity: 0.9; + opacity: 0.9; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=90); + filter: alpha(opacity=90); +} +.note-tooltip.top { + margin-top: -3px; + padding: 5px 0; +} +.note-tooltip.right { + margin-left: 3px; + padding: 0 5px; +} +.note-tooltip.bottom { + margin-top: 3px; + padding: 5px 0; +} +.note-tooltip.left { + margin-left: -3px; + padding: 0 5px; +} + +.note-tooltip.bottom .note-tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000; +} +.note-tooltip.top .note-tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000; +} +.note-tooltip.right .note-tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000; +} +.note-tooltip.left .note-tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000; +} + +.note-tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.note-tooltip-content { + max-width: 200px; + font-family: sans-serif; + padding: 3px 8px; + color: #fff; + text-align: center; + background-color: #000; +} + +.note-popover { + position: absolute; + z-index: 1060; + display: block; + font-size: 13px; + font-family: sans-serif; + display: none; + background: #ffffff; + border: 1px solid rgba(0, 0, 0, 0.2); + border: 1px solid #ccc; +} +.note-popover.in { + display: block; +} +.note-popover.top { + margin-top: -10px; + padding: 5px 0; +} +.note-popover.right { + margin-left: 10px; + padding: 0 5px; +} +.note-popover.bottom { + margin-top: 10px; + padding: 5px 0; +} +.note-popover.left { + margin-left: -10px; + padding: 0 5px; +} + +.note-popover.bottom .note-popover-arrow { + top: -11px; + left: 20px; + margin-left: -10px; + border-top-width: 0; + border-bottom-color: #999999; + border-bottom-color: rgba(0, 0, 0, 0.25); +} +.note-popover.bottom .note-popover-arrow::after { + top: 1px; + margin-left: -10px; + content: "\0020"; + border-top-width: 0; + border-bottom-color: #fff; +} +.note-popover.top .note-popover-arrow { + bottom: -11px; + left: 20px; + margin-left: -10px; + border-bottom-width: 0; + border-top-color: #999999; + border-top-color: rgba(0, 0, 0, 0.25); +} +.note-popover.top .note-popover-arrow::after { + bottom: 1px; + margin-left: -10px; + content: "\0020"; + border-bottom-width: 0; + border-top-color: #fff; +} +.note-popover.right .note-popover-arrow { + top: 50%; + left: -11px; + margin-top: -10px; + border-left-width: 0; + border-right-color: #999999; + border-right-color: rgba(0, 0, 0, 0.25); +} +.note-popover.right .note-popover-arrow::after { + left: 1px; + margin-top: -10px; + content: "\0020"; + border-left-width: 0; + border-right-color: #fff; +} +.note-popover.left .note-popover-arrow { + top: 50%; + right: -11px; + margin-top: -10px; + border-right-width: 0; + border-left-color: #999999; + border-left-color: rgba(0, 0, 0, 0.25); +} +.note-popover.left .note-popover-arrow::after { + right: 1px; + margin-top: -10px; + content: "\0020"; + border-right-width: 0; + border-left-color: #fff; +} + +.note-popover-arrow { + position: absolute; + width: 0; + height: 0; + border: 11px solid transparent; +} +.note-popover-arrow::after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + content: "\0020"; + border-width: 10px; +} + +.note-popover-content { + /*max-width: $popover-max-width;*/ + padding: 3px 8px; + color: #000; + text-align: center; + background-color: #ffffff; + min-width: 100px; + min-height: 30px; +} + +/* Theme Variables + ------------------------------------------ */ +/* Layout + ------------------------------------------ */ +.note-editor { + position: relative; +} +.note-editor .note-dropzone { + position: absolute; + display: none; + z-index: 100; + color: lightskyblue; + background-color: #fff; + opacity: 0.95; +} +.note-editor .note-dropzone .note-dropzone-message { + display: table-cell; + vertical-align: middle; + text-align: center; + font-size: 28px; + font-weight: 700; +} +.note-editor .note-dropzone.hover { + color: #098ddf; +} +.note-editor.dragover .note-dropzone { + display: table; +} +.note-editor .note-editing-area { + position: relative; +} +.note-editor .note-editing-area .note-editable { + outline: none; +} +.note-editor .note-editing-area .note-editable sup { + vertical-align: super; +} +.note-editor .note-editing-area .note-editable sub { + vertical-align: sub; +} +.note-editor .note-editing-area .note-editable img.note-float-left { + margin-right: 10px; +} +.note-editor .note-editing-area .note-editable img.note-float-right { + margin-left: 10px; +} + +/* Frame mode layout + ------------------------------------------ */ +.note-editor.note-frame, +.note-editor.note-airframe { + border: 1px solid rgba(0, 0, 0, 0.1960784314); +} +.note-editor.note-frame.codeview .note-editing-area .note-editable, +.note-editor.note-airframe.codeview .note-editing-area .note-editable { + display: none; +} +.note-editor.note-frame.codeview .note-editing-area .note-codable, +.note-editor.note-airframe.codeview .note-editing-area .note-codable { + display: block; +} +.note-editor.note-frame .note-editing-area, +.note-editor.note-airframe .note-editing-area { + overflow: hidden; +} +.note-editor.note-frame .note-editing-area .note-editable, +.note-editor.note-airframe .note-editing-area .note-editable { + padding: 10px; + overflow: auto; + word-wrap: break-word; +} +.note-editor.note-frame .note-editing-area .note-editable[contenteditable=false], +.note-editor.note-airframe .note-editing-area .note-editable[contenteditable=false] { + background-color: rgba(128, 128, 128, 0.1137254902); +} +.note-editor.note-frame .note-editing-area .note-codable, +.note-editor.note-airframe .note-editing-area .note-codable { + display: none; + width: 100%; + padding: 10px; + border: none; + box-shadow: none; + font-family: Menlo, Monaco, monospace, sans-serif; + font-size: 14px; + color: #ccc; + background-color: #222; + resize: none; + outline: none; + -ms-box-sizing: border-box; + box-sizing: border-box; + border-radius: 0; + margin-bottom: 0; +} +.note-editor.note-frame.fullscreen, +.note-editor.note-airframe.fullscreen { + position: fixed; + top: 0; + left: 0; + width: 100% !important; + z-index: 1050; +} +.note-editor.note-frame.fullscreen .note-resizebar, +.note-editor.note-airframe.fullscreen .note-resizebar { + display: none; +} +.note-editor.note-frame .note-status-output, +.note-editor.note-airframe .note-status-output { + display: block; + width: 100%; + font-size: 14px; + line-height: 1.42857143; + height: 20px; + margin-bottom: 0; + color: #000; + border: 0; + border-top: 1px solid #e2e2e2; +} +.note-editor.note-frame .note-status-output:empty, +.note-editor.note-airframe .note-status-output:empty { + height: 0; + border-top: 0 solid transparent; +} +.note-editor.note-frame .note-status-output .pull-right, +.note-editor.note-airframe .note-status-output .pull-right { + float: right !important; +} +.note-editor.note-frame .note-status-output .text-muted, +.note-editor.note-airframe .note-status-output .text-muted { + color: #777; +} +.note-editor.note-frame .note-status-output .text-primary, +.note-editor.note-airframe .note-status-output .text-primary { + color: #286090; +} +.note-editor.note-frame .note-status-output .text-success, +.note-editor.note-airframe .note-status-output .text-success { + color: #3c763d; +} +.note-editor.note-frame .note-status-output .text-info, +.note-editor.note-airframe .note-status-output .text-info { + color: #31708f; +} +.note-editor.note-frame .note-status-output .text-warning, +.note-editor.note-airframe .note-status-output .text-warning { + color: #8a6d3b; +} +.note-editor.note-frame .note-status-output .text-danger, +.note-editor.note-airframe .note-status-output .text-danger { + color: #a94442; +} +.note-editor.note-frame .note-status-output .alert, +.note-editor.note-airframe .note-status-output .alert { + margin: -7px 0 0 0; + padding: 7px 10px 2px 10px; + border-radius: 0; + color: #000; + background-color: #f5f5f5; +} +.note-editor.note-frame .note-status-output .alert .note-icon, +.note-editor.note-airframe .note-status-output .alert .note-icon { + margin-right: 5px; +} +.note-editor.note-frame .note-status-output .alert-success, +.note-editor.note-airframe .note-status-output .alert-success { + color: #3c763d !important; + background-color: #dff0d8 !important; +} +.note-editor.note-frame .note-status-output .alert-info, +.note-editor.note-airframe .note-status-output .alert-info { + color: #31708f !important; + background-color: #d9edf7 !important; +} +.note-editor.note-frame .note-status-output .alert-warning, +.note-editor.note-airframe .note-status-output .alert-warning { + color: #8a6d3b !important; + background-color: #fcf8e3 !important; +} +.note-editor.note-frame .note-status-output .alert-danger, +.note-editor.note-airframe .note-status-output .alert-danger { + color: #a94442 !important; + background-color: #f2dede !important; +} +.note-editor.note-frame .note-statusbar, +.note-editor.note-airframe .note-statusbar { + background-color: rgba(128, 128, 128, 0.1137254902); + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + border-top: 1px solid rgba(0, 0, 0, 0.1960784314); +} +.note-editor.note-frame .note-statusbar .note-resizebar, +.note-editor.note-airframe .note-statusbar .note-resizebar { + padding-top: 1px; + height: 9px; + width: 100%; + cursor: ns-resize; +} +.note-editor.note-frame .note-statusbar .note-resizebar .note-icon-bar, +.note-editor.note-airframe .note-statusbar .note-resizebar .note-icon-bar { + width: 20px; + margin: 1px auto; + border-top: 1px solid rgba(0, 0, 0, 0.1960784314); +} +.note-editor.note-frame .note-statusbar.locked .note-resizebar, +.note-editor.note-airframe .note-statusbar.locked .note-resizebar { + cursor: default; +} +.note-editor.note-frame .note-statusbar.locked .note-resizebar .note-icon-bar, +.note-editor.note-airframe .note-statusbar.locked .note-resizebar .note-icon-bar { + display: none; +} +.note-editor.note-frame .note-placeholder, +.note-editor.note-airframe .note-placeholder { + padding: 10px; +} + +.note-editor.note-airframe { + border: 0; +} +.note-editor.note-airframe .note-editing-area .note-editable { + padding: 0; +} + +/* Popover + ------------------------------------------ */ +.note-popover.popover { + display: none; + max-width: none; +} +.note-popover.popover .popover-content a { + display: inline-block; + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + vertical-align: middle; +} +.note-popover.popover .arrow { + left: 20px !important; +} + +/* Popover and Toolbar (Button container) + ------------------------------------------ */ +.note-toolbar { + position: relative; +} + +.note-popover .popover-content, .note-editor .note-toolbar { + margin: 0; + padding: 0 0 5px 5px; +} +.note-popover .popover-content > .note-btn-group, .note-editor .note-toolbar > .note-btn-group { + margin-top: 5px; + margin-left: 0; + margin-right: 5px; +} +.note-popover .popover-content .note-btn-group .note-table, .note-editor .note-toolbar .note-btn-group .note-table { + min-width: 0; + padding: 5px; +} +.note-popover .popover-content .note-btn-group .note-table .note-dimension-picker, .note-editor .note-toolbar .note-btn-group .note-table .note-dimension-picker { + font-size: 18px; +} +.note-popover .popover-content .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-mousecatcher, .note-editor .note-toolbar .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-mousecatcher { + position: absolute !important; + z-index: 3; + width: 10em; + height: 10em; + cursor: pointer; +} +.note-popover .popover-content .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-unhighlighted, .note-editor .note-toolbar .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-unhighlighted { + position: relative !important; + z-index: 1; + width: 5em; + height: 5em; + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIj4+Pjp6ekKlAqjAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKhmnaJzPAAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC") repeat; +} +.note-popover .popover-content .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-highlighted, .note-editor .note-toolbar .note-btn-group .note-table .note-dimension-picker .note-dimension-picker-highlighted { + position: absolute !important; + z-index: 2; + width: 1em; + height: 1em; + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIjd6vvD2f9LKLW+AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKwNDEVT0AAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC") repeat; +} +.note-popover .popover-content .note-style .dropdown-style blockquote, .note-popover .popover-content .note-style .dropdown-style pre, .note-editor .note-toolbar .note-style .dropdown-style blockquote, .note-editor .note-toolbar .note-style .dropdown-style pre { + margin: 0; + padding: 5px 10px; +} +.note-popover .popover-content .note-style .dropdown-style h1, .note-popover .popover-content .note-style .dropdown-style h2, .note-popover .popover-content .note-style .dropdown-style h3, .note-popover .popover-content .note-style .dropdown-style h4, .note-popover .popover-content .note-style .dropdown-style h5, .note-popover .popover-content .note-style .dropdown-style h6, .note-popover .popover-content .note-style .dropdown-style p, .note-editor .note-toolbar .note-style .dropdown-style h1, .note-editor .note-toolbar .note-style .dropdown-style h2, .note-editor .note-toolbar .note-style .dropdown-style h3, .note-editor .note-toolbar .note-style .dropdown-style h4, .note-editor .note-toolbar .note-style .dropdown-style h5, .note-editor .note-toolbar .note-style .dropdown-style h6, .note-editor .note-toolbar .note-style .dropdown-style p { + margin: 0; + padding: 0; +} +.note-popover .popover-content .note-color-all .note-dropdown-menu, .note-editor .note-toolbar .note-color-all .note-dropdown-menu { + min-width: 337px; +} +.note-popover .popover-content .note-color .dropdown-toggle, .note-editor .note-toolbar .note-color .dropdown-toggle { + width: 20px; + padding-left: 5px; +} +.note-popover .popover-content .note-color .note-dropdown-menu .note-palette, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette { + display: inline-block; + margin: 0; + width: 160px; +} +.note-popover .popover-content .note-color .note-dropdown-menu .note-palette:first-child, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette:first-child { + margin: 0 5px; +} +.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-palette-title, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-palette-title { + font-size: 12px; + margin: 2px 7px; + text-align: center; + border-bottom: 1px solid #eee; +} +.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-reset, +.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-select, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-reset, +.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-select { + font-size: 11px; + margin: 3px; + padding: 0 3px; + cursor: pointer; + width: 100%; + border-radius: 5px; +} +.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-reset:hover, +.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-select:hover, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-reset:hover, +.note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-select:hover { + background: #eee; +} +.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-row, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-row { + height: 20px; +} +.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-color-select-btn, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-color-select-btn { + display: none; +} +.note-popover .popover-content .note-color .note-dropdown-menu .note-palette .note-holder-custom .note-color-btn, .note-editor .note-toolbar .note-color .note-dropdown-menu .note-palette .note-holder-custom .note-color-btn { + border: 1px solid #eee; +} +.note-popover .popover-content .note-para .note-dropdown-menu, .note-editor .note-toolbar .note-para .note-dropdown-menu { + min-width: 228px; + padding: 5px; +} +.note-popover .popover-content .note-para .note-dropdown-menu > div + div, .note-editor .note-toolbar .note-para .note-dropdown-menu > div + div { + margin-left: 5px; +} +.note-popover .popover-content .note-dropdown-menu, .note-editor .note-toolbar .note-dropdown-menu { + min-width: 160px; +} +.note-popover .popover-content .note-dropdown-menu.right, .note-editor .note-toolbar .note-dropdown-menu.right { + right: 0; + left: auto; +} +.note-popover .popover-content .note-dropdown-menu.right::before, .note-editor .note-toolbar .note-dropdown-menu.right::before { + right: 9px; + left: auto !important; +} +.note-popover .popover-content .note-dropdown-menu.right::after, .note-editor .note-toolbar .note-dropdown-menu.right::after { + right: 10px; + left: auto !important; +} +.note-popover .popover-content .note-dropdown-menu.note-check a i, .note-editor .note-toolbar .note-dropdown-menu.note-check a i { + color: deepskyblue; + visibility: hidden; +} +.note-popover .popover-content .note-dropdown-menu.note-check a.checked i, .note-editor .note-toolbar .note-dropdown-menu.note-check a.checked i { + visibility: visible; +} +.note-popover .popover-content .note-fontsize-10, .note-editor .note-toolbar .note-fontsize-10 { + font-size: 10px; +} +.note-popover .popover-content .note-color-palette, .note-editor .note-toolbar .note-color-palette { + line-height: 1; +} +.note-popover .popover-content .note-color-palette div .note-color-btn, .note-editor .note-toolbar .note-color-palette div .note-color-btn { + width: 20px; + height: 20px; + padding: 0; + margin: 0; + border: 0; + border-radius: 0; +} +.note-popover .popover-content .note-color-palette div .note-color-btn:hover, .note-editor .note-toolbar .note-color-palette div .note-color-btn:hover { + transform: scale(1.2); + transition: all 0.2s; +} + +/* Dialog + ------------------------------------------ */ +.note-modal .modal-dialog { + outline: 0; + border-radius: 5px; + box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); +} +.note-modal .form-group { + margin-left: 0; + margin-right: 0; +} +.note-modal .note-modal-form { + margin: 0; +} +.note-modal .note-image-dialog .note-dropzone { + min-height: 100px; + font-size: 30px; + line-height: 4; + color: lightgray; + text-align: center; + border: 4px dashed lightgray; + margin-bottom: 10px; +} +@-moz-document url-prefix() { + .note-modal .note-image-input { + height: auto; + } +} + +/* Placeholder + ------------------------------------------ */ +.note-placeholder { + position: absolute; + display: none; + color: gray; +} + +/* Handle + ------------------------------------------ */ +.note-handle .note-control-selection { + position: absolute; + display: none; + border: 1px solid #000; +} +.note-handle .note-control-selection > div { + position: absolute; +} +.note-handle .note-control-selection .note-control-selection-bg { + width: 100%; + height: 100%; + background-color: #000; + -webkit-opacity: 0.3; + -khtml-opacity: 0.3; + -moz-opacity: 0.3; + opacity: 0.3; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=30); + filter: alpha(opacity=30); +} +.note-handle .note-control-selection .note-control-handle, .note-handle .note-control-selection .note-control-sizing, .note-handle .note-control-selection .note-control-holder { + width: 7px; + height: 7px; + border: 1px solid #000; +} +.note-handle .note-control-selection .note-control-sizing { + background-color: #000; +} +.note-handle .note-control-selection .note-control-nw { + top: -5px; + left: -5px; + border-right: none; + border-bottom: none; +} +.note-handle .note-control-selection .note-control-ne { + top: -5px; + right: -5px; + border-bottom: none; + border-left: none; +} +.note-handle .note-control-selection .note-control-sw { + bottom: -5px; + left: -5px; + border-top: none; + border-right: none; +} +.note-handle .note-control-selection .note-control-se { + right: -5px; + bottom: -5px; + cursor: se-resize; +} +.note-handle .note-control-selection .note-control-se.note-control-holder { + cursor: default; + border-top: none; + border-left: none; +} +.note-handle .note-control-selection .note-control-selection-info { + right: 0; + bottom: 0; + padding: 5px; + margin: 5px; + color: #fff; + background-color: #000; + font-size: 12px; + border-radius: 5px; + -webkit-opacity: 0.7; + -khtml-opacity: 0.7; + -moz-opacity: 0.7; + opacity: 0.7; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70); + filter: alpha(opacity=70); +} + +.note-hint-popover { + min-width: 100px; + padding: 2px; +} +.note-hint-popover .popover-content { + padding: 3px; + max-height: 150px; + overflow: auto; +} +.note-hint-popover .popover-content .note-hint-group .note-hint-item { + display: block !important; + padding: 3px; +} +.note-hint-popover .popover-content .note-hint-group .note-hint-item.active, .note-hint-popover .popover-content .note-hint-group .note-hint-item:hover { + display: block; + clear: both; + font-weight: 400; + line-height: 1.4; + color: white; + white-space: nowrap; + text-decoration: none; + background-color: #428bca; + outline: 0; + cursor: pointer; +} + +/* Handle + ------------------------------------------ */ +html .note-fullscreen-body, body .note-fullscreen-body { + overflow: hidden !important; +} + +.note-editable ul li, .note-editable ol li { + list-style-position: inside; +} + +.note-editor .note-editing-area .note-editable table { + width: 100%; + border-collapse: collapse; +} +.note-editor .note-editing-area .note-editable table td, .note-editor .note-editing-area .note-editable table th { + border: 1px solid #ececec; + padding: 5px 3px; +} +.note-editor .note-editing-area .note-editable a { + background-color: inherit; + text-decoration: inherit; + font-family: inherit; + font-weight: inherit; + color: #337ab7; +} +.note-editor .note-editing-area .note-editable a:hover, +.note-editor .note-editing-area .note-editable a:focus { + color: #23527c; + text-decoration: underline; + outline: 0; +} +.note-editor .note-editing-area .note-editable figure { + margin: 0; +} + +/* Dialog + ------------------------------------------*/ +.note-modal .note-modal-body label { + margin-bottom: 2px; + padding: 2px 5px; + display: inline-block; +} +.note-modal .note-modal-body .help-list-item:hover { + background-color: #e0e0e0; +} +@-moz-document url-prefix() { + .note-modal .note-image-input { + height: auto; + } +} + +.help-list-item label { + margin-bottom: 5px; + display: inline-block; +} + +/*# sourceMappingURL=summernote-lite.css.map*/ \ No newline at end of file diff --git a/erp24/web/css/summernote-lite.css.map b/erp24/web/css/summernote-lite.css.map new file mode 100644 index 00000000..3b8bc910 --- /dev/null +++ b/erp24/web/css/summernote-lite.css.map @@ -0,0 +1 @@ +{"version":3,"file":"summernote-lite.css","mappings":";;;;;;;;;;;AAMA;IACE;IACA;IACA;IACA;IACA;ACLF;ADSA;;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;ACPF;;ADYA;IACE;IACA;ACTF;;ADYA;IACE;IACA;IACA;ACTF;;ADYA;IACE;ACTF;;ADYA;IACE;ACTF;;ADaE;IACE;ACVJ;ADYE;IACE;ACVJ;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;ADgCA;IACE;AC7BF;;AC9QA;IC8GE,0BD7GoB;ICgHpB,sBDhHoB;IACpB;IACA,uBEKY;IFJZ;ADoRF;;AIxRA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;AJ2RF;;AKlSA;IACE;IACA;IACA;ALqSF;AKnSE;IACE;ALqSJ;AKlSE;IACE;ALoSJ;AKjSE;;;;IAIE;ALmSJ;AKhSE;;IAEI;IACA;ALkSN;AK/RE;;IAEE;IACA;ALiSJ;AK7RI;IACE;AL+RN;;AMjUA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;ICLA,WJqBmB;IIpBnB,sBJqBe;IIpBf,qBJqBmB;IIMnB;IACA,eJ3BU;II4BV,gBJxBY;IIyBZ,kBJnBmB;IDiGnB,yBItGqB;IJuGrB,sBIvGqB;IJyGrB,iBIzGqB;AN4UvB;AOhVE;IAEE,WJeiB;IIdjB,yBJiBmB;IIhBnB,qBJeiB;AHkUrB;AO/UE;IACE,WJUiB;IITjB,yBJYmB;IIXnB,qBJUiB;AHuUrB;AO3UI;IAEE,sBJCW;IIAX,qBJCe;AH2UrB;AMxVE;IAGE,WHQiB;IGPjB;IACA;IACA,yBHQmB;IGPnB;IJyBF,kBIxBmB;AN0VrB;AMvVE;IAEE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;ANwVJ;AMrVE;IAGE,mBHHc;IDyBhB,qBIrBmB;IJsBnB,oBItBmB;IJuBnB,kBIvBmB;IJwBnB,aIxBmB;IJ0BnB;IACA;IAmCA,gBI7DsB;AN4VxB;AMzVE;IACE;AN2VJ;AMxVE;IACE;IACA;AN0VJ;;AMtVA;IACE;IACA;ANyVF;AMvVE;IAGE;IACA;IACA;IACA;IJrBF,kBIsBmB;ANyVrB;;AMpVA;IACE;IACA;ANuVF;;AMpVA;IACE;ANuVF;;AMhVE;;;IACE;ANqVJ;;AMjVA;IACE;IACA;IACA;IACA;IACA;ANoVF;;AMjVA;IACE;IACA;IACA;IACA;IACA;ANoVF;;AMjVA;IACE;IACC;IACE;IACE;IACI;IACD;ANoVV;;AQvcA;IACE;AR0cF;;AQtcE;IACE;IACA;ARycJ;;AQtcA;IACE;IACA;IACA;IACA;IACA;IACA,aL2ByB;IK1BzB;IACA;IACA,gBL8BkB;IK7BlB;IACA;IACA;INqFA,yCMpFoB;AR2ctB;AQzcE;IACE;AR2cJ;;AQvcA;IACE;AR0cF;;AQvcA;IACE;AR0cF;AQxcE;IACE,yBLRmB;AHkdvB;;AQtcA;;IAEE;IACA;IACA;ARycF;;ASvfA;IACE;IACA;IACA;IACA;IACA;IACA,aNyCc;IDmBd,kBO3DiB;IP4DjB,iBO5DiB;IP6DjB,eO7DiB;IP8DjB,UO9DiB;IPgEjB;IACA;IOhEA;AT+fF;AS7fE;IACE;AT+fJ;;AS3fA;IACE;IACA;IACA;IACA;IACA,gBNuDiB;IMtDjB;IACA;IACA;IPoFA,wCOnFoB;ATggBtB;;AS7fA;IACE;IACA;ATggBF;;AS7fA;IACE;IACA;ATggBF;AS7fE;IACE;IACA;IACA;IACA;IACA;IPoEF,0BADyB;IAIzB,sBAJyB;AFgc3B;;AS9fA;IACE;IACA;IACA;ATigBF;;AS7fA;IACE;IACA;ATggBF;;AS7fA;;IAEE;IACA;ATggBF;;AS7fA;IACE;ATggBF;;AS7fA;IACE;IACA;IACA;IACA;ATggBF;;AS7fA;IACE;IACA;IACA;IACA;IACA;IACA,aNpCyB;IMqCzB,gBNLkB;IDZlB,oBOkBiB;IPjBjB,mBOiBiB;IPhBjB,iBOgBiB;IPfjB,YOeiB;IPbjB;IACA;IOaA;ATqgBF;ASngBE;IACE;ATqgBJ;;AS/fA;IAEE;QACE;QACA;ITigBA;AACJ;AS9fA;IACE;QACE;ITggBA;AACJ;AS3fE;IACE;IACA;IACA;IACA;AT6fJ;AS1fE;IAEE;IAEI;IACJ;IACA;IACA;AT4fJ;ASzfE;IACE;IACA;IACA;IACA;IACA;IACA;AT2fJ;ASxfE;;IAEE;IACA;AT0fJ;ASvfE;IACE;ATyfJ;AStfE;IACE;ATwfJ;ASrfE;IACE;ATufJ;ASpfE;IACE;IACA;IACA;ATsfJ;ASnfE;;IAEE;ATqfJ;ASlfE;IACE;IACA;IACA;ATofJ;ASjfE;IACE;IACA;IACA;ATmfJ;AShfE;IACE;ATkfJ;AS/eE;;IAEE;ATifJ;AS/eE;;IAEE;ATifJ;;AU5qBA;IACE;AV+qBF;;AU5qBA;IACE;AV+qBF;;AU5qBA;IACE;IACA;IACA;IACA;IACA;IACA;AV+qBF;;AU5qBA;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IRsFA,0BADyB;IAIzB,sBAJyB;AF8lB3B;;AU9qBA;IACE,cPxBY;AHysBd;;AU9qBA;IACE,cP5BY;AH6sBd;;AU9qBA;IACE,cPhCY;AHitBd;;AU9qBA;IACE,cPpCY;AHqtBd;;AW3tBA;IACE;IACA,aR2Cc;IQ1Cd;IAGA;IAEA;IT0DA,kBSzDiB;IT0DjB,iBS1DiB;IT2DjB,eS3DiB;IT4DjB,US5DiB;IT8DjB;IACA;AFiqBF;AW9tBE;ITuDA,oBCXiB;IDYjB,mBCZiB;IDajB,iBCbiB;IDcjB,YCdiB;IDgBjB;IACA;AFyqBF;AWruBE;IAAW;IAAmB;AXyuBhC;AWxuBE;IAAW;IAAmB;AX4uBhC;AW3uBE;IAAW;IAAmB;AX+uBhC;AW9uBE;IAAW;IAAmB;AXkvBhC;;AW9uBE;IACE;IACA;IACA;IACA;IACA,yBR8Be;AHmtBnB;AW9uBE;IACE;IACA;IACA;IACA;IACA,sBRsBe;AH0tBnB;AW7uBE;IACE;IACA;IACA;IACA;IACA,wBRce;AHiuBnB;AW7uBE;IACE;IACA;IACA;IACA;IACA,uBROe;AHwuBnB;;AW1uBA;IACE;IACA;IACA;IACA;IACA;AX6uBF;;AW1uBA;IACE,gBRTiB;IQUjB,uBRtDY;IQuDZ;IACA,WRXiB;IQYjB;IACA,sBRZiB;AHyvBnB;;AY/yBA;IACE;IACA,aT0Cc;ISzCd;IAGA;IACA,uBTCY;ISCZ;IACA,mBTiDc;IShDd;IACA;AZ+yBF;AY7yBE;IAAW;AZgzBb;AY/yBE;IAAW;IAAoB;AZmzBjC;AYlzBE;IAAW;IAAoB;AZszBjC;AYrzBE;IAAW;IAAoB;AZyzBjC;AYxzBE;IAAW;IAAoB;AZ4zBjC;;AYxzBE;IACE;IACA;IACA;IACA;IACA,4BT0CkC;ISzClC,wCTwCuB;AHmxB3B;AYzzBI;IACE;IACA;IACA;IACA;IACA;AZ2zBN;AYvzBE;IACE;IACA;IACA;IACA;IACA,yBTyBkC;ISxBlC,qCTuBuB;AHkyB3B;AYvzBI;IACE;IACA;IACA;IACA;IACA;AZyzBN;AYrzBE;IACE;IACA;IACA;IACA;IACA,2BTQkC;ISPlC,uCTMuB;AHizB3B;AYrzBI;IACE;IACA;IACA;IACA;IACA;AZuzBN;AYnzBE;IACE;IACA;IACA;IACA;IACA,0BTTkC;ISUlC,sCTXuB;AHg0B3B;AYnzBI;IACE;IACA;IACA;IACA;IACA;AZqzBN;;AY/yBA;IACE;IACA;IACA;IACA;AZkzBF;AYhzBE;IACE;IACA;IACA;IACA;IACA;IACA;IAGA;IACA;AZgzBJ;;AY3yBA;IACE;IACA;IACA,WTxDc;ISyDd;IACA,yBT3Dc;IS4Dd;IACA;AZ8yBF;;Aap6BA;6CAAA;AAQA;6CAAA;AAEA;IACE;Abi6BF;Aa55BE;IACE;IACA;IACA;IACA,mBANe;IAOf;IACA;Ab85BJ;Aa55BI;IACE;IACA;IACA;IACA;IACA;Ab85BN;Aa35BI;IACE,cAlBoB;Ab+6B1B;Aaz5BE;IACE;Ab25BJ;Aax5BE;IACE;Ab05BJ;Aax5BI;IACE;Ab05BN;Aax5BM;IACE;Ab05BR;Aav5BM;IACE;Aby5BR;Aat5BM;IACE,kBAlDW;Ab08BnB;Aar5BM;IACE,iBAvDU;Ab88BlB;;Aaj5BA;6CAAA;AAEA;;IAEE;Abo5BF;Aa/4BM;;IACE;Abk5BR;Aah5BM;;IACE;Abm5BR;Aa94BE;;IACE;Abi5BJ;Aa94BI;;IACE;IACA;IACA;Abi5BN;Aa/4BM;;IACE,mDA3FW;Ab6+BnB;Aa74BI;;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IXFJ,0BWKwB;IXFxB,sBWEwB;IXnExB,gBWoEqB;IACjB;Abm5BN;Aa94BE;;IACE;IACA;IACA;IACA;IACA;Abi5BJ;Aah5BI;;IACE;Abm5BN;Aa94BE;;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;Abi5BJ;Aa94BE;;IACE;IACA;Abi5BJ;Aa94BE;;IACE;Abi5BJ;Aa94BE;;IACE;Abi5BJ;Aa94BE;;IACE;Abi5BJ;Aa94BE;;IACE;Abi5BJ;Aa94BE;;IACE;Abi5BJ;Aa94BE;;IACE;Abi5BJ;Aa94BE;;IACE;Abi5BJ;Aa94BE;;IACE;IACA;IACA;IACA;IACA;Abi5BJ;Aa94BE;;IACE;Abi5BJ;Aa94BE;;IACE;IACA;Abi5BJ;Aa94BE;;IACE;IACA;Abi5BJ;Aa94BE;;IACE;IACA;Abi5BJ;Aa94BE;;IACE;IACA;Abi5BJ;Aa74BE;;IACE,mDAhNe;IAiNf;IACA;IACA;Abg5BJ;Aa/4BI;;IACE;IACA;IACA;IACA;Abk5BN;Aaj5BM;;IACE;IACA;IACA;Abo5BR;Aa/4BM;;IACE;Abk5BR;Aaj5BQ;;IACE;Abo5BV;Aa/4BE;;IACE;Abk5BJ;;Aa94BA;IACE;Abi5BF;Aa94BI;IACE;Abg5BN;;Aa14BA;6CAAA;AAEA;IACE;IACA;Ab64BF;Aa14BI;IACE;IACA;IACA;IACA;IACA;IACA;Ab44BN;Aaz4BE;IACE;Ab24BJ;;Aav4BA;6CAAA;AAEA;IACE;Ab04BF;;Aav4BA;IACE;IACA;Ab04BF;Aax4BE;IACE;IACA;IACA;Ab04BJ;Aat4BI;IACE;IACA;Abw4BN;Aav4BM;IACE;Aby4BR;Aax4BQ;IACE;IACA;IACA;IACA;IACA;Ab04BV;Aax4BQ;IACE;IACA;IACA;IACA;IACA;Ab04BV;Aax4BQ;IACE;IACA;IACA;IACA;IACA;Ab04BV;Aal4BM;IACE;IACA;Abo4BR;Aal4BM;IACE;IACA;Abo4BR;Aa93BI;IACE;Abg4BN;Aa33BI;IACE;IACA;Ab63BN;Aa13BM;IACE;IACA;IACA;Ab43BR;Aa33BQ;IACE;Ab63BV;Aa13BQ;IACE;IACA;IACA;IACA;Ab43BV;Aaz3BQ;;;IAEE;IACA;IACA;IACA;IACA;IXhUR,kBWiUyB;Ab83B3B;Aa53BU;;;IACE;Abg4BZ;Aa53BQ;IACE;Ab83BV;Aa33BQ;IACE;Ab63BV;Aaz3BU;IACE;Ab23BZ;Aan3BI;IACE;IACA;Abq3BN;Aap3BM;IACE;Abs3BR;Aah3BE;IACE;Abk3BJ;Aa92BI;IACE;IACA;Abg3BN;Aa/2BM;IACE;IACA;Abi3BR;Aa/2BM;IACE;IACA;Abi3BR;Aa52BM;IACE;IACA;Ab82BR;Aa52BM;IACE;Ab82BR;Aaz2BE;IACE;Ab22BJ;Aav2BE;IACE;Aby2BJ;Aav2BM;IACE;IACA;IACA;IACA;IACA;IACA;Aby2BR;Aav2BM;IACE;IACA;Aby2BR;;Aan2BA;6CAAA;AAGE;IACE;IACA;IXnWF,wCWoWsB;Abu2BxB;Aar2BE;IACE;IACA;Abu2BJ;Aar2BE;IACE;Abu2BJ;Aap2BI;IACE;IACA;IACA;IACA;IACA;IACA;IACA;Abs2BN;Aaj2BE;IACE;QACE;Ibm2BF;AACJ;;Aa/1BA;6CAAA;AAEA;IACE;IACA;IACA;Abk2BF;;Aa/1BA;6CAAA;AAIE;IACE;IACA;IACA;Abg2BJ;Aa/1BI;IACE;Abi2BN;Aa91BI;IACE;IACA;IACA;IXjcJ,oBWkcqB;IXjcrB,mBWicqB;IXhcrB,iBWgcqB;IX/brB,YW+bqB;IX7brB;IACA;AFiyCF;Aal2BI;IACE;IACA;IACA;Abo2BN;Aa71BI;IAEE;Ab81BN;Aa31BI;IACE;IACA;IACA;IACA;Ab61BN;Aa11BI;IACE;IACA;IACA;IACA;Ab41BN;Aaz1BI;IACE;IACA;IACA;IACA;Ab21BN;Aax1BI;IACE;IACA;IACA;Ab01BN;Aav1BI;IACE;IACA;IACA;Aby1BN;Aat1BI;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IX9gBJ,kBW+gBqB;IX7frB,oBW8fqB;IX7frB,mBW6fqB;IX5frB,iBW4fqB;IX3frB,YW2fqB;IXzfrB;IACA;AFu1CF;;Aa11BA;IACE;IACA;Ab61BF;Aa31BE;IACE;IACA;IACA;Ab61BJ;Aa11BM;IACE;IACA;Ab41BR;Aa11BQ;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;Ab41BV;;Aar1BA;6CAAA;AAGE;IACE;Abu1BJ;;Aan1BA;IACE;Abs1BF;;AA96CM;IACE;IACA;AAi7CR;AA/6CS;IACC;IACA;AAi7CV;AA76CM;IACE;IACA;IACA;IACA;IACA;AA+6CR;AA56CM;;IAEE;IACA;IACA;AA86CR;AA36CM;IACE;AA66CR;;AAv6CA;4CAAA;AAII;IACE;IACA;IACA;AAw6CN;AAr6CK;IACC;AAu6CN;AAl6CE;IACE;QACE;IAo6CF;AACJ;;AA95CE;IACE;IACA;AAi6CJ","sources":["webpack:///./src/styles/summernote/font.scss","webpack:///./src/styles/lite/summernote-lite.scss","webpack:///./src/styles/lite/scss/common.scss","webpack:///./src/styles/summernote/elements.scss","webpack:///./src/styles/lite/scss/variables.scss","webpack:///./src/styles/lite/scss/toolbar.scss","webpack:///./src/styles/lite/scss/btn-group.scss","webpack:///./src/styles/lite/scss/buttons.scss","webpack:///./src/styles/lite/scss/mixins/buttons.scss","webpack:///./src/styles/lite/scss/dropdown.scss","webpack:///./src/styles/lite/scss/modal.scss","webpack:///./src/styles/lite/scss/form.scss","webpack:///./src/styles/lite/scss/tooltip.scss","webpack:///./src/styles/lite/scss/popover.scss","webpack:///./src/styles/summernote/common.scss"],"sourcesContent":["// Variables\n\n$sni-css-prefix: note-icon !default;\n\n// Path\n\n@font-face {\n font-family: \"summernote\";\n font-style: normal;\n font-weight: 400;\n font-display: auto;\n src: url(\"./font/summernote.eot?#iefix\") format(\"embedded-opentype\"), url(\"./font/summernote.woff2\") format(\"woff2\"), url(\"./font/summernote.woff\") format(\"woff\"), url(\"./font/summernote.ttf\") format(\"truetype\");}\n\n// Core\n\n[class^=\"#{$sni-css-prefix}\"]:before,\n[class*=\" #{$sni-css-prefix}\"]:before {\n display: inline-block;\n font-family: \"summernote\";\n font-style: normal;\n font-size: inherit;\n text-decoration: inherit;\n text-rendering: auto;\n text-transform: none;\n vertical-align: middle;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n speak: none;\n}\n\n// Extras\n\n.#{$sni-css-prefix}-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.#{$sni-css-prefix}-border {\n border: solid 0.08em #eee;\n border-radius: 0.1em;\n padding: 0.2em 0.25em 0.15em;\n}\n\n.#{$sni-css-prefix}-pull-left {\n float: left;\n}\n\n.#{$sni-css-prefix}-pull-right {\n float: right;\n}\n\n.#{$sni-css-prefix} {\n &.#{$sni-css-prefix}-pull-left {\n margin-right: 0.3em;\n }\n &.#{$sni-css-prefix}-pull-right {\n margin-left: 0.3em;\n }\n}\n\n// Functions\n\n@function char($character-code) {\n @if function-exists(\"selector-append\") {\n @return unquote(\"\\\"\\\\#{$character-code}\\\"\");\n }\n\n @if \"\\\\#{'x'}\" == \"\\\\x\" {\n @return str-slice(\"\\x\", 1, 1) + $character-code;\n }\n @else {\n @return #{\"\\\"\\\\\"}#{$character-code + \"\\\"\"};\n }\n}\n\n// Icons\n\n\n.note-icon-align::before {\n content: \"\\ea01\";\n}\n\n.note-icon-align-center::before {\n content: \"\\ea02\";\n}\n\n.note-icon-align-indent::before {\n content: \"\\ea03\";\n}\n\n.note-icon-align-justify::before {\n content: \"\\ea04\";\n}\n\n.note-icon-align-left::before {\n content: \"\\ea05\";\n}\n\n.note-icon-align-outdent::before {\n content: \"\\ea06\";\n}\n\n.note-icon-align-right::before {\n content: \"\\ea07\";\n}\n\n.note-icon-arrow-circle-down::before {\n content: \"\\ea08\";\n}\n\n.note-icon-arrow-circle-left::before {\n content: \"\\ea09\";\n}\n\n.note-icon-arrow-circle-right::before {\n content: \"\\ea0a\";\n}\n\n.note-icon-arrow-circle-up::before {\n content: \"\\ea0b\";\n}\n\n.note-icon-arrows-alt::before {\n content: \"\\ea0c\";\n}\n\n.note-icon-arrows-h::before {\n content: \"\\ea0d\";\n}\n\n.note-icon-arrows-v::before {\n content: \"\\ea0e\";\n}\n\n.note-icon-bold::before {\n content: \"\\ea0f\";\n}\n\n.note-icon-caret::before {\n content: \"\\ea10\";\n}\n\n.note-icon-chain-broken::before {\n content: \"\\ea11\";\n}\n\n.note-icon-circle::before {\n content: \"\\ea12\";\n}\n\n.note-icon-close::before {\n content: \"\\ea13\";\n}\n\n.note-icon-code::before {\n content: \"\\ea14\";\n}\n\n.note-icon-col-after::before {\n content: \"\\ea15\";\n}\n\n.note-icon-col-before::before {\n content: \"\\ea16\";\n}\n\n.note-icon-col-remove::before {\n content: \"\\ea17\";\n}\n\n.note-icon-eraser::before {\n content: \"\\ea18\";\n}\n\n.note-icon-float-left::before {\n content: \"\\ea19\";\n}\n\n.note-icon-float-none::before {\n content: \"\\ea1a\";\n}\n\n.note-icon-float-right::before {\n content: \"\\ea1b\";\n}\n\n.note-icon-font::before {\n content: \"\\ea1c\";\n}\n\n.note-icon-frame::before {\n content: \"\\ea1d\";\n}\n\n.note-icon-italic::before {\n content: \"\\ea1e\";\n}\n\n.note-icon-link::before {\n content: \"\\ea1f\";\n}\n\n.note-icon-magic::before {\n content: \"\\ea20\";\n}\n\n.note-icon-menu-check::before {\n content: \"\\ea21\";\n}\n\n.note-icon-minus::before {\n content: \"\\ea22\";\n}\n\n.note-icon-orderedlist::before {\n content: \"\\ea23\";\n}\n\n.note-icon-pencil::before {\n content: \"\\ea24\";\n}\n\n.note-icon-picture::before {\n content: \"\\ea25\";\n}\n\n.note-icon-question::before {\n content: \"\\ea26\";\n}\n\n.note-icon-redo::before {\n content: \"\\ea27\";\n}\n\n.note-icon-rollback::before {\n content: \"\\ea28\";\n}\n\n.note-icon-row-above::before {\n content: \"\\ea29\";\n}\n\n.note-icon-row-below::before {\n content: \"\\ea2a\";\n}\n\n.note-icon-row-remove::before {\n content: \"\\ea2b\";\n}\n\n.note-icon-special-character::before {\n content: \"\\ea2c\";\n}\n\n.note-icon-square::before {\n content: \"\\ea2d\";\n}\n\n.note-icon-strikethrough::before {\n content: \"\\ea2e\";\n}\n\n.note-icon-subscript::before {\n content: \"\\ea2f\";\n}\n\n.note-icon-summernote::before {\n content: \"\\ea30\";\n}\n\n.note-icon-superscript::before {\n content: \"\\ea31\";\n}\n\n.note-icon-table::before {\n content: \"\\ea32\";\n}\n\n.note-icon-text-height::before {\n content: \"\\ea33\";\n}\n\n.note-icon-trash::before {\n content: \"\\ea34\";\n}\n\n.note-icon-underline::before {\n content: \"\\ea35\";\n}\n\n.note-icon-undo::before {\n content: \"\\ea36\";\n}\n\n.note-icon-unorderedlist::before {\n content: \"\\ea37\";\n}\n\n.note-icon-video::before {\n content: \"\\ea38\";\n}\n\n","// Core variables and mixins\n@import '../summernote/font.scss';\n@import '../summernote/elements.scss';\n@import \"scss/variables.scss\";\n@import \"scss/mixins.scss\";\n\n@import \"scss/common.scss\";\n@import \"scss/toolbar.scss\";\n@import \"scss/btn-group.scss\";\n@import \"scss/buttons.scss\";\n@import \"scss/dropdown.scss\";\n@import \"scss/modal.scss\";\n@import \"scss/form.scss\";\n@import \"scss/tooltip.scss\";\n@import \"scss/popover.scss\";\n\n@import '../summernote/common.scss';\n\n.note-editor {\n .note-editing-area {\n .note-editable {\n table {\n width: 100%;\n border-collapse: collapse;\n\n td, th {\n border: 1px solid #ececec;\n padding: 5px 3px;\n }\n }\n\n a {\n background-color: inherit;\n text-decoration: inherit;\n font-family: inherit;\n font-weight: inherit;\n color: #337ab7;\n }\n\n a:hover,\n a:focus {\n color: #23527c;\n text-decoration: underline;\n outline: 0;\n }\n\n figure {\n margin: 0;\n }\n }\n }\n}\n\n/* Dialog\n ------------------------------------------*/\n.note-modal {\n .note-modal-body {\n label {\n margin-bottom: 2px;\n padding: 2px 5px;\n display: inline-block;\n }\n\n .help-list-item:hover {\n background-color: #e0e0e0;\n }\n }\n\n // [workaround] firefox fileinput\n @-moz-document url-prefix() {\n .note-image-input {\n height: auto;\n }\n }\n}\n\n\n.help-list-item {\n label {\n margin-bottom:5px;\n display:inline-block;\n }\n}\n",".note-frame {\n @include box-sizing(border-box);\n color: #000;\n font-family: $font-family;\n border-radius: 4px;\n}\n","@mixin gradient($color: #F5F5F5, $start: #EEE, $stop: #FFF) {\n background: $color;\n background: -webkit-gradient(linear,\n left bottom,\n left top,\n color-stop(0, $start),\n color-stop(1, $stop));\n background: -ms-linear-gradient(bottom,\n $start,\n $stop);\n background: -moz-linear-gradient(center bottom,\n $start 0%,\n $stop 100%);\n background: -o-linear-gradient($stop,\n $start);\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str($stop)}', endColorstr='#{ie-hex-str($start)}', GradientType=0);\n}\n@mixin bw-gradient($color: #F5F5F5, $start: 0, $stop: 255) {\n background: $color;\n background: -webkit-gradient(linear,\n left bottom,\n left top,\n color-stop(0, rgb($start,$start,$start)),\n color-stop(1, rgb($stop,$stop,$stop)));\n background: -ms-linear-gradient(bottom,\n rgb($start,$start,$start) 0%,\n rgb($stop,$stop,$stop) 100%);\n background: -moz-linear-gradient(center bottom,\n rgb($start,$start,$start) 0%,\n rgb($stop,$stop,$stop) 100%);\n background: -o-linear-gradient(rgb($stop,$stop,$stop),\n rgb($start,$start,$start));\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#{ie-hex-str(rgb($stop,$stop,$stop))}', endColorstr='#{ie-hex-str(rgb($start,$start,$start))}', GradientType=0);\n}\n@mixin bordered($top-color: #EEE, $right-color: #EEE, $bottom-color: #EEE, $left-color: #EEE) {\n border-top: solid 1px $top-color;\n border-left: solid 1px $left-color;\n border-right: solid 1px $right-color;\n border-bottom: solid 1px $bottom-color;\n}\n@mixin drop-shadow($x-axis: 0, $y-axis: 1px, $blur: 2px, $alpha: 0.1) {\n -webkit-box-shadow: $x-axis $y-axis $blur rgba(0, 0, 0, $alpha);\n -moz-box-shadow: $x-axis $y-axis $blur rgba(0, 0, 0, $alpha);\n box-shadow: $x-axis $y-axis $blur rgba(0, 0, 0, $alpha);\n}\n@mixin rounded($radius: 2px) {\n -webkit-border-radius: $radius;\n -moz-border-radius: $radius;\n border-radius: $radius;\n}\n@mixin border-radius($topright: 0, $bottomright: 0, $bottomleft: 0, $topleft: 0) {\n -webkit-border-top-right-radius: $topright;\n -webkit-border-bottom-right-radius: $bottomright;\n -webkit-border-bottom-left-radius: $bottomleft;\n -webkit-border-top-left-radius: $topleft;\n -moz-border-radius-topright: $topright;\n -moz-border-radius-bottomright: $bottomright;\n -moz-border-radius-bottomleft: $bottomleft;\n -moz-border-radius-topleft: $topleft;\n border-top-right-radius: $topright;\n border-bottom-right-radius: $bottomright;\n border-bottom-left-radius: $bottomleft;\n border-top-left-radius: $topleft;\n @include background-clip(padding-box);\n}\n@mixin opacity($opacity: 0.5) {\n -webkit-opacity: $opacity;\n -khtml-opacity: $opacity;\n -moz-opacity: $opacity;\n opacity: $opacity;\n $opperc: $opacity * 100;\n -ms-filter: progid:DXImageTransform.Microsoft.Alpha(opacity=#{$opperc});\n filter: alpha(opacity=$opperc);\n}\n@mixin transition-duration($duration: 0.2s) {\n -moz-transition-duration: $duration;\n -webkit-transition-duration: $duration;\n -o-transition-duration: $duration;\n transition-duration: $duration;\n}\n@mixin transform($arguments...) {\n -webkit-transform: $arguments;\n -moz-transform: $arguments;\n -o-transform: $arguments;\n -ms-transform: $arguments;\n transform: $arguments;\n}\n@mixin rotation($deg:5deg) {\n @include transform(rotate($deg));\n}\n@mixin scale($ratio:1.5) {\n @include transform(scale($ratio));\n}\n@mixin transition($duration:0.2s, $ease:ease-out) {\n -webkit-transition: all $duration $ease;\n -moz-transition: all $duration $ease;\n -o-transition: all $duration $ease;\n transition: all $duration $ease;\n}\n@mixin inner-shadow($horizontal:0, $vertical:1px, $blur:2px, $alpha: 0.4) {\n -webkit-box-shadow: inset $horizontal $vertical $blur rgba(0, 0, 0, $alpha);\n -moz-box-shadow: inset $horizontal $vertical $blur rgba(0, 0, 0, $alpha);\n box-shadow: inset $horizontal $vertical $blur rgba(0, 0, 0, $alpha);\n}\n@mixin box-shadow($arguments) {\n -webkit-box-shadow: $arguments;\n -moz-box-shadow: $arguments;\n box-shadow: $arguments;\n}\n@mixin box-sizing($sizing: border-box) {\n -ms-box-sizing: $sizing;\n -moz-box-sizing: $sizing;\n -webkit-box-sizing: $sizing;\n box-sizing: $sizing;\n}\n@mixin user-select($argument: none) {\n -webkit-user-select: $argument;\n -moz-user-select: $argument;\n -ms-user-select: $argument;\n user-select: $argument;\n}\n@mixin columns($colwidth: 250px, $colcount: 0, $colgap: 50px, $columnRuleColor: #EEE, $columnRuleStyle: solid, $columnRuleWidth: 1px) {\n -moz-column-width: $colwidth;\n -moz-column-count: $colcount;\n -moz-column-gap: $colgap;\n -moz-column-rule-color: $columnRuleColor;\n -moz-column-rule-style: $columnRuleStyle;\n -moz-column-rule-width: $columnRuleWidth;\n -webkit-column-width: $colwidth;\n -webkit-column-count: $colcount;\n -webkit-column-gap: $colgap;\n -webkit-column-rule-color: $columnRuleColor;\n -webkit-column-rule-style: $columnRuleStyle;\n -webkit-column-rule-width: $columnRuleWidth;\n column-width: $colwidth;\n column-count: $colcount;\n column-gap: $colgap;\n column-rule-color: $columnRuleColor;\n column-rule-style: $columnRuleStyle;\n column-rule-width: $columnRuleWidth;\n}\n@mixin translate($x:0, $y:0) {\n @include transform(translate($x, $y));\n}\n@mixin background-clip($argument: padding-box) {\n -moz-background-clip: $argument;\n -webkit-background-clip: $argument;\n background-clip: $argument;\n}\n","\n$gray-base: #000;\n$gray-darker: lighten($gray-base, 13.5%); // #222\n$gray-dark: lighten($gray-base, 20%); // #333\n$gray: lighten($gray-base, 33.5%); // #555\n$gray-light: lighten($gray-base, 46.7%); // #777\n$gray-lighter:lighten($gray-base, 93.5%); // #eee\n\n$font-family: sans-serif;\n$font-size: 14px;\n$font-size-large: ceil(($font-size * 1.25));\n$font-size-small: ceil(($font-size * 0.85));\n\n$line-height: 1.4;\n$line-height-computed: floor(($line-height * $font-size));\n\n$padding-base-vertical: 5px;\n$padding-base-horizontal: 10px;\n\n$border-radius-base: 3px;\n$btn-border-radius-base: $border-radius-base;\n\n$icon-font-path: \"../fonts/\";\n$icon-font-name: \"summernote\";\n$icon-font-svg-id: \"summernote\";\n\n$btn-font-weight: normal;\n$btn-default-color : #333;\n$btn-default-bg: #fff;\n$btn-default-border: #dae0e5;\n$btn-default-hover-bg: #ebebeb;\n$btn-default-active-bg: #f0f0f0;\n\n$input-bg: #fff;\n$input-bg-disabled: $gray-lighter;\n$input-color: $gray;\n$input-border: #ccc;\n\n$input-border-focus: #66afe9;\n$input-color-placeholder: #999;\n\n$cursor-disabled: not-allowed;\n\n$zindex-dropdown: 1000;\n$zindex-popover:1060;\n$zindex-tooltip:1070;\n$zindex-modal-background: 1040;\n$zindex-modal: 1050;\n\n$dropdown-color-bg: #fff;\n$dropdown-color-border: #e2e2e2;\n\n$tooltip-max-width:200px;\n$tooltip-color: #fff;\n$tooltip-bg: #000;\n$tooltip-opacity: .9;\n$tooltip-arrow-width: 5px;\n$tooltip-arrow-color: $tooltip-bg;\n\n$popover-bg: #ffffff;\n$popover-color: #000;\n$popover-max-width: 276px;\n$popover-border-color: rgba(0,0,0,.2);\n$popover-fallback-border-color: #ccc;\n$popover-title-bg: darken($popover-bg, 3%);\n$popover-arrow-width: 10px;\n$popover-arrow-color: $popover-bg;\n$popover-arrow-outer-width:($popover-arrow-width + 1);\n$popover-arrow-outer-color:fade-in($popover-border-color, .05);\n$popover-arrow-outer-fallback-color: darken($popover-fallback-border-color, 20%);\n\n\n$modal-inner-padding: 15px;\n$modal-title-padding: 15px;\n$modal-title-line-height: $line-height;\n$modal-content-bg: #fff;\n$modal-content-border-color: rgba(0,0,0,.2);\n$modal-content-fallback-border-color: #999;\n$modal-backdrop-bg: #000;\n$modal-backdrop-opacity: .5;\n$modal-header-border-color: #e5e5e5;\n$modal-footer-border-color: $modal-header-border-color;\n",".note-toolbar {\n padding: 10px 5px;\n border-bottom: 1px solid #e2e2e2;\n color: #333;\n background-color: #f5f5f5;\n border-color: #ddd;\n border-top-left-radius: 3px;\n border-top-right-radius: 3px;\n}\n",".note-btn-group {\n position: relative;\n display: inline-block;\n margin-right: 8px;\n\n > .note-btn-group {\n margin-right: 0;\n }\n\n > .note-btn:first-child {\n margin-left: 0;\n }\n\n .note-btn + .note-btn,\n .note-btn + .note-btn-group,\n .note-btn-group + .note-btn,\n .note-btn-group + .note-btn-group {\n margin-left: -1px;\n }\n\n > .note-btn:not(:first-child),\n > .note-btn-group:not(:first-child) > .note-btn {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n > .note-btn:not(:last-child):not(.dropdown-toggle),\n > .note-btn-group:not(:last-child) > .note-btn {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n &.open {\n > .note-dropdown {\n display: block;\n }\n }\n}\n",".note-btn {\n display: inline-block;\n font-weight: 400;\n margin-bottom: 0;\n text-align: center;\n vertical-align: middle;\n touch-action: manipulation;\n cursor: pointer;\n background-image: none;\n border: 1px solid $btn-default-border;\n white-space: nowrap;\n outline: 0;\n @include button-maker($btn-default-color, $btn-default-bg, $btn-default-hover-bg, $btn-default-active-bg, $btn-default-border);\n @include button-size($padding-base-vertical, $padding-base-horizontal, $font-size, $line-height, $btn-border-radius-base);\n @include user-select(none);\n\n &:hover,\n &:focus,\n &.focus {\n color: $btn-default-color;\n text-decoration: none;\n border: 1px solid $btn-default-border;\n background-color: $btn-default-hover-bg;\n outline: 0;\n @include rounded(1px);\n }\n\n &:active,\n &.active {\n outline: 0;\n background-image: none;\n color: #333;\n text-decoration: none;\n border: 1px solid #dae0e5;\n background-color: #ebebeb;\n outline: 0;\n border-radius: 1px;\n -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n cursor: $cursor-disabled;\n @include opacity(.65);\n @include box-shadow(none);\n }\n\n & > span.note-icon-caret:first-child {\n margin-left: -1px;\n }\n\n & > span.note-icon-caret:nth-child(2) {\n padding-left: 3px;\n margin-right: -5px;\n }\n}\n\n.note-btn-primary {\n background: #fa6362;\n color: #fff;\n\n &:hover,\n &:focus,\n &.focus {\n color: #fff;\n text-decoration: none;\n border: 1px solid $btn-default-border;\n background-color: #fa6362;\n @include rounded(1px);\n }\n\n}\n\n.note-btn-block {\n display: block;\n width: 100%;\n}\n\n.note-btn-block + .note-btn-block {\n margin-top:5px;\n}\n\n// Specificity overrides\ninput[type=\"submit\"],\ninput[type=\"reset\"],\ninput[type=\"button\"] {\n &.note-btn-block {\n width: 100%;\n }\n}\n\nbutton.close {\n padding: 0;\n cursor: pointer;\n background: transparent;\n border: 0;\n -webkit-appearance: none;\n}\n\n.close {\n float: right;\n font-size: 21px;\n line-height: 1;\n color: #000;\n opacity: .2;\n}\n\n.close:hover {\n -webkit-opacity: 1;\n -khtml-opacity: 1;\n -moz-opacity: 1;\n -ms-filter: alpha(opacity=100);\n filter: alpha(opacity=100);\n opacity: 1\n}\n","// Button variants\n//\n// Easily pump out default styles, as well as :hover, :focus, :active,\n// and disabled options for all buttons\n\n@mixin button-maker($color, $background, $focusBackground, $activeBackground, $border) {\n color: $color;\n background-color: $background;\n border-color: $border;\n\n &:focus,\n &.focus {\n color: $color;\n background-color: $focusBackground;\n border-color: $border;\n }\n &:hover {\n color: $color;\n background-color: $focusBackground;\n border-color: $border;\n }\n\n &.disabled,\n &[disabled],\n fieldset[disabled] & {\n &:focus,\n &.focus {\n background-color: $background;\n border-color: $border;\n }\n }\n}\n\n// Button sizes\n@mixin button-size($padding-vertical, $padding-horizontal, $font-size, $line-height, $border-radius) {\n padding: $padding-vertical $padding-horizontal;\n font-size: $font-size;\n line-height: $line-height;\n border-radius: $border-radius;\n}\n",".note-dropdown {\n position: relative;\n\n}\n.note-color {\n .dropdown-toggle {\n width: 30px;\n padding-left: 5px;\n }\n}\n.note-dropdown-menu {\n display: none;\n min-width: 100px;\n position: absolute;\n top: 100%;\n left: 0;\n z-index : $zindex-dropdown;\n float: left;\n text-align:left;\n background: $dropdown-color-bg;\n border: 1px solid $dropdown-color-border;\n padding: 5px;\n background-clip: padding-box;\n @include box-shadow(0 1px 1px rgba(0,0,0,.06));\n\n > *:last-child {\n margin-right: 0;\n }\n}\n\n.note-btn-group.open .note-dropdown-menu {\n display: block;\n}\n\n.note-dropdown-item {\n display: block;\n\n &:hover {\n background-color: $btn-default-hover-bg;\n }\n}\n\na.note-dropdown-item,\na.note-dropdown-item:hover {\n margin: 5px 0;\n color: #000;\n text-decoration: none;\n}\n",".note-modal {\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: $zindex-modal;\n @include opacity(1);\n display: none;\n\n &.open {\n display:block;\n }\n}\n\n.note-modal-content {\n position: relative;\n width: auto;\n margin: 30px 20px;\n border: 1px solid $modal-content-border-color;\n background: $modal-content-bg;\n background-clip: border-box;\n outline: 0;\n border-radius: 5px;\n @include box-shadow(0 3px 9px rgba(0,0,0,.5));\n}\n\n.note-modal-header {\n padding: 10px 20px;\n border: 1px solid #ededef;\n}\n\n.note-modal-body {\n position: relative;\n padding: 20px 30px;\n\n // shortcut text style\n kbd {\n border-radius: 2px;\n background-color: #000;\n color: #fff;\n padding: 3px 5px;\n font-weight: 700;\n @include box-sizing();\n }\n}\n\n.note-modal-footer {\n height: 40px;\n padding: 10px;\n text-align: center;\n\n}\n\n.note-modal-footer a {\n color: #337ab7;\n text-decoration: none\n}\n\n.note-modal-footer a:hover,\n.note-modal-footer a:focus {\n color: #23527c;\n text-decoration: underline\n}\n\n.note-modal-footer .note-btn {\n float: right\n}\n\n.note-modal-title {\n font-size: 20px;\n color: #42515f;\n margin: 0;\n line-height: 1.4;\n}\n\n.note-modal-backdrop {\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n top: 0;\n z-index: $zindex-modal-background;\n background: $modal-backdrop-bg;\n @include opacity(0.5);\n display: none;\n\n &.open {\n display: block;\n }\n}\n\n\n// Scale up the modal\n@media (min-width: 768px) {\n // Automatically set modal's width for larger viewports\n .note-modal-content {\n width: 600px;\n margin: 30px auto;\n }\n}\n\n@media (min-width: 992px) {\n .note-modal-content-large {\n width: 900px;\n }\n}\n\n.note-modal {\n\n .note-help-block {\n display: block;\n margin-top: 5px;\n margin-bottom: 10px;\n color: #737373;\n }\n\n .note-nav {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n padding-left: 0;\n margin-bottom: 0;\n list-style: none;\n }\n\n .note-nav-link {\n display: block;\n padding: 0.5rem 1rem;\n color: #007bff;\n text-decoration: none;\n background-color: transparent;\n -webkit-text-decoration-skip: objects;\n }\n\n .note-nav-link:focus,\n .note-nav-link:hover {\n color: #0056b3;\n text-decoration: none;\n }\n\n .note-nav-link.disabled {\n color: #868e96;\n }\n\n .note-nav-tabs {\n border-bottom: 1px solid #ddd;\n }\n\n .note-nav-tabs .note-nav-item {\n margin-bottom: -1px;\n }\n\n .note-nav-tabs .note-nav-link {\n border: 1px solid transparent;\n border-top-left-radius: 0.25rem;\n border-top-right-radius: 0.25rem;\n }\n\n .note-nav-tabs .note-nav-link:focus,\n .note-nav-tabs .note-nav-link:hover {\n border-color: #e9ecef #e9ecef #ddd;\n }\n\n .note-nav-tabs .note-nav-link.disabled {\n color: #868e96;\n background-color: transparent;\n border-color: transparent;\n }\n\n .note-nav-tabs .note-nav-item.show .note-nav-link {\n color: #495057;\n background-color: #fff;\n border-color: #ddd #ddd #fff;\n }\n\n .note-tab-content {\n margin: 15px auto;\n }\n\n .note-tab-content > .note-tab-pane:target ~ .note-tab-pane:last-child,\n .note-tab-content > .note-tab-pane {\n display: none;\n }\n .note-tab-content > :last-child,\n .note-tab-content > .note-tab-pane:target {\n display: block;\n }\n}\n",".note-form-group {\n padding-bottom: 20px;\n}\n\n.note-form-group:last-child {\n padding-bottom: 0;\n}\n\n.note-form-label {\n display: block;\n width: 100%;\n font-size: 16px;\n color: #42515f;\n margin-bottom: 10px;\n font-weight: 700;\n}\n\n.note-input {\n width: 100%;\n display: block;\n border: 1px solid #ededef;\n background: #fff;\n outline: 0;\n padding: 6px 4px;\n font-size: 14px;\n @include box-sizing();\n}\n\n\n.note-input::-webkit-input-placeholder {\n color: $gray-lighter;\n}\n\n.note-input:-moz-placeholder { /* Firefox 18- */\n color: $gray-lighter;\n}\n\n.note-input::-moz-placeholder { /* Firefox 19+ */\n color: $gray-lighter;\n}\n\n.note-input:-ms-input-placeholder {\n color: $gray-lighter;\n}\n",".note-tooltip {\n position: absolute;\n z-index: $zindex-tooltip;\n display: block;\n // Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.\n // So reset our font and text properties to avoid inheriting weird values.\n font-size: 13px;\n\n transition: opacity .15s;\n @include opacity(0);\n\n &.in { @include opacity($tooltip-opacity); }\n &.top { margin-top: -3px; padding: $tooltip-arrow-width 0; }\n &.right { margin-left: 3px; padding: 0 $tooltip-arrow-width; }\n &.bottom { margin-top: 3px; padding: $tooltip-arrow-width 0; }\n &.left { margin-left: -3px; padding: 0 $tooltip-arrow-width; }\n}\n\n.note-tooltip {\n &.bottom .note-tooltip-arrow {\n top: 0;\n left: 50%;\n margin-left: -$tooltip-arrow-width;\n border-width: 0 $tooltip-arrow-width $tooltip-arrow-width;\n border-bottom-color: $tooltip-arrow-color;\n }\n\n &.top .note-tooltip-arrow {\n bottom: 0;\n left: 50%;\n margin-left: -$tooltip-arrow-width;\n border-width: $tooltip-arrow-width $tooltip-arrow-width 0;\n border-top-color: $tooltip-arrow-color;\n }\n\n &.right .note-tooltip-arrow {\n top: 50%;\n left: 0;\n margin-top: -$tooltip-arrow-width;\n border-width: $tooltip-arrow-width $tooltip-arrow-width $tooltip-arrow-width 0;\n border-right-color: $tooltip-arrow-color;\n }\n &.left .note-tooltip-arrow {\n top: 50%;\n right: 0;\n margin-top: -$tooltip-arrow-width;\n border-width: $tooltip-arrow-width 0 $tooltip-arrow-width $tooltip-arrow-width;\n border-left-color: $tooltip-arrow-color;\n }\n}\n\n\n.note-tooltip-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n}\n\n.note-tooltip-content {\n max-width: $tooltip-max-width;\n font-family: $font-family;\n padding: 3px 8px;\n color: $tooltip-color;\n text-align: center;\n background-color: $tooltip-bg;\n}\n",".note-popover {\n position: absolute;\n z-index: $zindex-popover;\n display: block;\n // Our parent element can be arbitrary since popovers are by default inserted as a sibling of their target element.\n // So reset our font and text properties to avoid inheriting weird values.\n font-size: 13px;\n font-family: $font-family;\n\n display: none;\n background: $popover-bg;\n border: 1px solid $popover-border-color;\n border: 1px solid $popover-fallback-border-color;\n\n &.in { display: block; }\n &.top { margin-top: -10px; padding: $tooltip-arrow-width 0; }\n &.right { margin-left: 10px; padding: 0 $tooltip-arrow-width; }\n &.bottom { margin-top: 10px; padding: $tooltip-arrow-width 0; }\n &.left { margin-left: -10px; padding: 0 $tooltip-arrow-width; }\n}\n\n.note-popover {\n &.bottom .note-popover-arrow {\n top: -11px;\n left: 20px;\n margin-left: -$popover-arrow-width;\n border-top-width: 0;\n border-bottom-color: $popover-arrow-outer-fallback-color;\n border-bottom-color: $popover-arrow-outer-color;\n\n &::after {\n top: 1px;\n margin-left: -10px;\n content: \" \";\n border-top-width: 0;\n border-bottom-color: #fff;\n }\n }\n\n &.top .note-popover-arrow {\n bottom: -11px;\n left: 20px;\n margin-left: -$popover-arrow-width;\n border-bottom-width: 0;\n border-top-color: $popover-arrow-outer-fallback-color;\n border-top-color: $popover-arrow-outer-color;\n\n &::after {\n bottom: 1px;\n margin-left: -10px;\n content: \" \";\n border-bottom-width: 0;\n border-top-color: #fff;\n }\n }\n\n &.right .note-popover-arrow {\n top: 50%;\n left: -11px;\n margin-top: -$popover-arrow-width;\n border-left-width: 0;\n border-right-color: $popover-arrow-outer-fallback-color;\n border-right-color: $popover-arrow-outer-color;\n\n &::after {\n left: 1px;\n margin-top: -10px;\n content: \" \";\n border-left-width: 0;\n border-right-color: #fff;\n }\n\n }\n &.left .note-popover-arrow {\n top: 50%;\n right: -11px;\n margin-top: -$popover-arrow-width;\n border-right-width: 0;\n border-left-color: $popover-arrow-outer-fallback-color;\n border-left-color: $popover-arrow-outer-color;\n\n &::after {\n right: 1px;\n margin-top: -10px;\n content: \" \";\n border-right-width: 0;\n border-left-color: #fff;\n }\n }\n}\n\n\n.note-popover-arrow {\n position: absolute;\n width: 0;\n height: 0;\n border: 11px solid transparent;\n\n &::after {\n position: absolute;\n display: block;\n width: 0;\n height: 0;\n border-color: transparent;\n border-style: solid;\n\n\n content : \" \";\n border-width: 10px;\n }\n\n}\n\n.note-popover-content {\n /*max-width: $popover-max-width;*/\n padding: 3px 8px;\n color: $popover-color;\n text-align: center;\n background-color: $popover-bg;\n min-width: 100px;\n min-height: 30px;\n}\n","@import \"elements.scss\";\n\n/* Theme Variables\n ------------------------------------------ */\n$border-color: #00000032;\n$background-color: #8080801d;\n\n$img-margin-left: 10px;\n$img-margin-right: 10px;\n\n/* Layout\n ------------------------------------------ */\n.note-editor {\n position: relative;\n\n // dropzone\n $dropzone-color: lightskyblue;\n $dropzone-active-color: darken($dropzone-color, 30);\n .note-dropzone {\n position: absolute;\n display: none;\n z-index: 100;\n color: $dropzone-color;\n background-color: #fff;\n opacity: 0.95;\n\n .note-dropzone-message {\n display: table-cell;\n vertical-align: middle;\n text-align: center;\n font-size: 28px;\n font-weight: 700;\n }\n\n &.hover {\n color: $dropzone-active-color;\n }\n }\n\n &.dragover .note-dropzone {\n display: table;\n }\n\n .note-editing-area {\n position: relative;\n\n .note-editable {\n outline: none;\n\n sup {\n vertical-align: super;\n }\n\n sub {\n vertical-align: sub;\n }\n\n img.note-float-left {\n margin-right: $img-margin-right;\n }\n\n img.note-float-right {\n margin-left: $img-margin-left;\n }\n }\n }\n}\n\n/* Frame mode layout\n ------------------------------------------ */\n.note-editor.note-frame,\n.note-editor.note-airframe {\n border: 1px solid $border-color;\n\n // codeview mode\n &.codeview {\n .note-editing-area {\n .note-editable {\n display: none;\n }\n .note-codable {\n display: block;\n }\n }\n }\n\n .note-editing-area {\n overflow: hidden;\n\n // editable\n .note-editable {\n padding: 10px;\n overflow: auto;\n word-wrap: break-word;\n\n &[contenteditable=\"false\"] {\n background-color: $background-color;\n }\n }\n\n // codeable\n .note-codable {\n display: none;\n width: 100%;\n padding: 10px;\n border: none;\n box-shadow: none;\n font-family: Menlo, Monaco, monospace, sans-serif;\n font-size: 14px;\n color: #ccc;\n background-color: #222;\n resize: none;\n outline: none;\n\n // override BS2 default style\n @include box-sizing(border-box);\n @include rounded(0);\n margin-bottom: 0;\n }\n }\n\n // fullscreen mode\n &.fullscreen {\n position: fixed;\n top: 0;\n left: 0;\n width: 100% !important;\n z-index: 1050; // bs3 modal-backdrop: 1030, bs2: 1040\n .note-resizebar {\n display: none;\n }\n }\n\n // Notifications\n .note-status-output {\n display: block;\n width: 100%;\n font-size: 14px;\n line-height: 1.42857143;\n height: 20px;\n margin-bottom: 0;\n color: #000;\n border: 0;\n border-top: 1px solid #e2e2e2;\n }\n\n .note-status-output:empty {\n height: 0;\n border-top: 0 solid transparent;\n }\n\n .note-status-output .pull-right {\n float: right !important;\n }\n\n .note-status-output .text-muted {\n color: #777;\n }\n\n .note-status-output .text-primary {\n color: #286090;\n }\n\n .note-status-output .text-success {\n color: #3c763d;\n }\n\n .note-status-output .text-info {\n color: #31708f;\n }\n\n .note-status-output .text-warning {\n color: #8a6d3b;\n }\n\n .note-status-output .text-danger {\n color: #a94442;\n }\n\n .note-status-output .alert {\n margin: -7px 0 0 0;\n padding: 7px 10px 2px 10px;\n border-radius: 0;\n color: #000;\n background-color: #f5f5f5;\n }\n\n .note-status-output .alert .note-icon {\n margin-right: 5px;\n }\n\n .note-status-output .alert-success {\n color: #3c763d !important;\n background-color: #dff0d8 !important;\n }\n\n .note-status-output .alert-info {\n color: #31708f !important;\n background-color: #d9edf7 !important;\n }\n\n .note-status-output .alert-warning {\n color: #8a6d3b !important;\n background-color: #fcf8e3 !important;\n }\n\n .note-status-output .alert-danger {\n color: #a94442 !important;\n background-color: #f2dede !important;\n }\n\n // statusbar\n .note-statusbar {\n background-color: $background-color;\n border-bottom-left-radius: 4px;\n border-bottom-right-radius: 4px;\n border-top: 1px solid $border-color;\n .note-resizebar {\n padding-top: 1px;\n height: 9px;\n width: 100%;\n cursor: ns-resize;\n .note-icon-bar {\n width: 20px;\n margin: 1px auto;\n border-top: 1px solid $border-color;\n }\n }\n\n &.locked {\n .note-resizebar {\n cursor: default;\n .note-icon-bar {\n display: none;\n }\n }\n }\n }\n .note-placeholder {\n padding: 10px;\n }\n}\n\n.note-editor.note-airframe {\n border: 0;\n\n .note-editing-area {\n .note-editable {\n padding: 0;\n }\n }\n}\n\n\n/* Popover\n ------------------------------------------ */\n.note-popover.popover {\n display: none;\n max-width: none;\n\n .popover-content {\n a {\n display: inline-block;\n max-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap; // for FF\n vertical-align: middle; // for FF\n }\n }\n .arrow {\n left: 20px !important;\n }\n}\n\n/* Popover and Toolbar (Button container)\n ------------------------------------------ */\n.note-toolbar {\n position: relative;\n}\n\n.note-popover .popover-content, .note-editor .note-toolbar {\n margin: 0;\n padding: 0 0 5px 5px;\n\n & > .note-btn-group {\n margin-top: 5px;\n margin-left: 0;\n margin-right: 5px;\n }\n\n .note-btn-group {\n .note-table {\n min-width: 0;\n padding: 5px;\n .note-dimension-picker {\n font-size: 18px;\n .note-dimension-picker-mousecatcher {\n position: absolute !important;\n z-index: 3;\n width: 10em;\n height: 10em;\n cursor: pointer;\n }\n .note-dimension-picker-unhighlighted {\n position: relative !important;\n z-index: 1;\n width: 5em;\n height: 5em;\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIj4+Pjp6ekKlAqjAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKhmnaJzPAAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC\") repeat;\n }\n .note-dimension-picker-highlighted {\n position: absolute !important;\n z-index: 2;\n width: 1em;\n height: 1em;\n background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASAgMAAAAroGbEAAAACVBMVEUAAIjd6vvD2f9LKLW+AAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAACxMAAAsTAQCanBgAAAAHdElNRQfYAR0BKwNDEVT0AAAAG0lEQVQI12NgAAOtVatWMTCohoaGUY+EmIkEAEruEzK2J7tvAAAAAElFTkSuQmCC\") repeat;\n }\n }\n }\n }\n\n .note-style {\n .dropdown-style {\n blockquote, pre {\n margin: 0;\n padding: 5px 10px;\n }\n h1, h2, h3, h4, h5, h6, p {\n margin: 0;\n padding: 0;\n }\n }\n }\n\n .note-color-all {\n .note-dropdown-menu {\n min-width: 337px;\n }\n }\n\n .note-color {\n .dropdown-toggle {\n width: 20px;\n padding-left: 5px;\n }\n .note-dropdown-menu {\n .note-palette {\n display: inline-block;\n margin: 0;\n width: 160px;\n &:first-child {\n margin: 0 5px;\n }\n\n .note-palette-title {\n font-size: 12px;\n margin: 2px 7px;\n text-align: center;\n border-bottom: 1px solid #eee;\n }\n\n .note-color-reset,\n .note-color-select {\n font-size: 11px;\n margin: 3px;\n padding: 0 3px;\n cursor: pointer;\n width: 100%;\n @include rounded(5px);\n\n &:hover {\n background: #eee;\n }\n }\n\n .note-color-row {\n height: 20px;\n }\n\n .note-color-select-btn {\n display: none;\n }\n\n .note-holder-custom {\n .note-color-btn {\n border: 1px solid #eee;\n }\n }\n }\n }\n }\n\n .note-para {\n .note-dropdown-menu {\n min-width: 228px;\n padding: 5px;\n & > div + div {\n margin-left: 5px;\n }\n }\n }\n\n // dropdown-menu for toolbar and popover\n .note-dropdown-menu {\n min-width: 160px;\n\n // dropdown-menu right position\n // http://forrst.com/posts/Bootstrap_right_positioned_dropdown-2KB\n &.right {\n right: 0;\n left: auto;\n &::before {\n right: 9px;\n left: auto !important;\n }\n &::after {\n right: 10px;\n left: auto !important;\n }\n }\n // dropdown-menu for selectbox\n &.note-check {\n a i {\n color: deepskyblue;\n visibility: hidden;\n }\n a.checked i {\n visibility: visible;\n }\n }\n }\n\n .note-fontsize-10 {\n font-size: 10px;\n }\n\n // color palette for toolbar and popover\n .note-color-palette {\n line-height: 1;\n div {\n .note-color-btn {\n width: 20px;\n height: 20px;\n padding: 0;\n margin: 0;\n border: 0;\n border-radius: 0;\n }\n .note-color-btn:hover {\n transform: scale(1.2);\n transition: all 0.2s;\n }\n }\n }\n}\n\n/* Dialog\n ------------------------------------------ */\n.note-modal {\n .modal-dialog {\n outline: 0;\n border-radius: 5px;\n @include box-shadow(0 3px 9px rgba(0,0,0,.5));\n }\n .form-group { // overwrite BS's form-horizontal minus margins\n margin-left: 0;\n margin-right: 0;\n }\n .note-modal-form {\n margin: 0; // overwrite BS2's form margin bottom\n }\n .note-image-dialog {\n .note-dropzone {\n min-height: 100px;\n font-size: 30px;\n line-height: 4; // vertical-align\n color: lightgray;\n text-align: center;\n border: 4px dashed lightgray;\n margin-bottom: 10px;\n }\n }\n\n // [workaround] firefox fileinput\n @-moz-document url-prefix() {\n .note-image-input {\n height: auto;\n }\n }\n}\n\n/* Placeholder\n ------------------------------------------ */\n.note-placeholder {\n position: absolute;\n display: none;\n color: gray;\n}\n\n/* Handle\n ------------------------------------------ */\n.note-handle {\n // control selection\n .note-control-selection {\n position: absolute;\n display: none;\n border: 1px solid #000;\n & > div {\n position: absolute;\n }\n\n .note-control-selection-bg {\n width: 100%;\n height: 100%;\n background-color: #000;\n @include opacity(0.3);\n }\n\n .note-control-handle {\n width: 7px;\n height: 7px;\n border: 1px solid #000;\n }\n\n .note-control-holder {\n @extend .note-control-handle;\n }\n\n .note-control-sizing {\n @extend .note-control-handle;\n background-color: #000;\n }\n\n .note-control-nw {\n top: -5px;\n left: -5px;\n border-right: none;\n border-bottom: none;\n }\n\n .note-control-ne {\n top: -5px;\n right: -5px;\n border-bottom: none;\n border-left: none;\n }\n\n .note-control-sw {\n bottom: -5px;\n left: -5px;\n border-top: none;\n border-right: none;\n }\n\n .note-control-se {\n right: -5px;\n bottom: -5px;\n cursor: se-resize;\n }\n\n .note-control-se.note-control-holder {\n cursor: default;\n border-top: none;\n border-left: none;\n }\n\n .note-control-selection-info {\n right: 0;\n bottom: 0;\n padding: 5px;\n margin: 5px;\n color: #fff;\n background-color: #000;\n font-size: 12px;\n @include rounded(5px);\n @include opacity(0.7);\n }\n }\n}\n\n.note-hint-popover {\n min-width: 100px;\n padding: 2px;\n\n .popover-content {\n padding: 3px;\n max-height: 150px;\n overflow: auto;\n\n .note-hint-group {\n .note-hint-item {\n display: block !important;\n padding: 3px;\n\n &.active, &:hover {\n display: block;\n clear: both;\n font-weight: 400;\n line-height: 1.4;\n color: white;\n white-space: nowrap;\n text-decoration: none;\n background-color: #428bca;\n outline: 0;\n cursor: pointer;\n }\n }\n }\n }\n}\n\n/* Handle\n ------------------------------------------ */\nhtml, body {\n .note-fullscreen-body {\n overflow: hidden !important;\n }\n}\n//Alignment does not work with or without sequences\n.note-editable ul li,.note-editable ol li{\n list-style-position: inside;\n}"],"names":[],"sourceRoot":""} \ No newline at end of file diff --git a/erp24/web/js/summernote-lite.js b/erp24/web/js/summernote-lite.js new file mode 100644 index 00000000..736f4a91 --- /dev/null +++ b/erp24/web/js/summernote-lite.js @@ -0,0 +1,9891 @@ +/*! + * + * Super simple WYSIWYG editor v0.9.0 + * https://summernote.org + * + * Copyright 2013~ Hackerwins and contributors + * Summernote may be freely distributed under the MIT license. + * + * Date: 2024-09-30T14:42Z + * + */ +(function webpackUniversalModuleDefinition(root, factory) { + if(typeof exports === 'object' && typeof module === 'object') + module.exports = factory(require("jquery")); + else if(typeof define === 'function' && define.amd) + define(["jquery"], factory); + else { + var a = typeof exports === 'object' ? factory(require("jquery")) : factory(root["jQuery"]); + for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; + } +})(self, (__WEBPACK_EXTERNAL_MODULE__8938__) => { +return /******/ (() => { // webpackBootstrap +/******/ "use strict"; +/******/ var __webpack_modules__ = ({ + +/***/ 7000: +/***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => { + +/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8938); +/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); + +(jquery__WEBPACK_IMPORTED_MODULE_0___default().summernote) = (jquery__WEBPACK_IMPORTED_MODULE_0___default().summernote) || { + lang: {} +}; +jquery__WEBPACK_IMPORTED_MODULE_0___default().extend(true, (jquery__WEBPACK_IMPORTED_MODULE_0___default().summernote).lang, { + 'en-US': { + font: { + bold: 'Bold', + italic: 'Italic', + underline: 'Underline', + clear: 'Remove Font Style', + height: 'Line Height', + name: 'Font Family', + strikethrough: 'Strikethrough', + subscript: 'Subscript', + superscript: 'Superscript', + size: 'Font Size', + sizeunit: 'Font Size Unit' + }, + image: { + image: 'Picture', + insert: 'Insert Image', + resizeFull: 'Resize full', + resizeHalf: 'Resize half', + resizeQuarter: 'Resize quarter', + resizeNone: 'Original size', + floatLeft: 'Float Left', + floatRight: 'Float Right', + floatNone: 'Remove float', + shapeRounded: 'Shape: Rounded', + shapeCircle: 'Shape: Circle', + shapeThumbnail: 'Shape: Thumbnail', + shapeNone: 'Shape: None', + dragImageHere: 'Drag image or text here', + dropImage: 'Drop image or Text', + selectFromFiles: 'Select from files', + maximumFileSize: 'Maximum file size', + maximumFileSizeError: 'Maximum file size exceeded.', + url: 'Image URL', + remove: 'Remove Image', + original: 'Original' + }, + video: { + video: 'Video', + videoLink: 'Video Link', + insert: 'Insert Video', + url: 'Video URL', + providers: '(YouTube, Google Drive, Vimeo, Vine, Instagram, DailyMotion, Youku, Peertube)' + }, + link: { + link: 'Link', + insert: 'Insert Link', + unlink: 'Unlink', + edit: 'Edit', + textToDisplay: 'Text to display', + url: 'To what URL should this link go?', + openInNewWindow: 'Open in new window' + }, + table: { + table: 'Table', + addRowAbove: 'Add row above', + addRowBelow: 'Add row below', + addColLeft: 'Add column left', + addColRight: 'Add column right', + delRow: 'Delete row', + delCol: 'Delete column', + delTable: 'Delete table' + }, + hr: { + insert: 'Insert Horizontal Rule' + }, + style: { + style: 'Style', + p: 'Normal', + blockquote: 'Quote', + pre: 'Code', + h1: 'Header 1', + h2: 'Header 2', + h3: 'Header 3', + h4: 'Header 4', + h5: 'Header 5', + h6: 'Header 6' + }, + lists: { + unordered: 'Unordered list', + ordered: 'Ordered list' + }, + options: { + help: 'Help', + fullscreen: 'Full Screen', + codeview: 'Code View' + }, + paragraph: { + paragraph: 'Paragraph', + outdent: 'Outdent', + indent: 'Indent', + left: 'Align left', + center: 'Align center', + right: 'Align right', + justify: 'Justify full' + }, + color: { + recent: 'Recent Color', + more: 'More Color', + background: 'Background Color', + foreground: 'Text Color', + transparent: 'Transparent', + setTransparent: 'Set transparent', + reset: 'Reset', + resetToDefault: 'Reset to default', + cpSelect: 'Select' + }, + shortcut: { + shortcuts: 'Keyboard shortcuts', + close: 'Close', + textFormatting: 'Text formatting', + action: 'Action', + paragraphFormatting: 'Paragraph formatting', + documentStyle: 'Document Style', + extraKeys: 'Extra keys' + }, + help: { + 'escape': 'Escape', + 'insertParagraph': 'Insert Paragraph', + 'undo': 'Undo the last command', + 'redo': 'Redo the last command', + 'tab': 'Tab', + 'untab': 'Untab', + 'bold': 'Set a bold style', + 'italic': 'Set a italic style', + 'underline': 'Set a underline style', + 'strikethrough': 'Set a strikethrough style', + 'removeFormat': 'Clean a style', + 'justifyLeft': 'Set left align', + 'justifyCenter': 'Set center align', + 'justifyRight': 'Set right align', + 'justifyFull': 'Set full align', + 'insertUnorderedList': 'Toggle unordered list', + 'insertOrderedList': 'Toggle ordered list', + 'outdent': 'Outdent on current paragraph', + 'indent': 'Indent on current paragraph', + 'formatPara': 'Change current block\'s format as a paragraph(P tag)', + 'formatH1': 'Change current block\'s format as H1', + 'formatH2': 'Change current block\'s format as H2', + 'formatH3': 'Change current block\'s format as H3', + 'formatH4': 'Change current block\'s format as H4', + 'formatH5': 'Change current block\'s format as H5', + 'formatH6': 'Change current block\'s format as H6', + 'insertHorizontalRule': 'Insert horizontal rule', + 'linkDialog.show': 'Show Link Dialog' + }, + history: { + undo: 'Undo', + redo: 'Redo' + }, + specialChar: { + specialChar: 'SPECIAL CHARACTERS', + select: 'Select Special characters' + }, + output: { + noSelection: 'No Selection Made!' + } + } +}); + +/***/ }), + +/***/ 8938: +/***/ ((module) => { + +module.exports = __WEBPACK_EXTERNAL_MODULE__8938__; + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__); +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/compat get default export */ +/******/ (() => { +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = (module) => { +/******/ var getter = module && module.__esModule ? +/******/ () => (module['default']) : +/******/ () => (module); +/******/ __webpack_require__.d(getter, { a: getter }); +/******/ return getter; +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/define property getters */ +/******/ (() => { +/******/ // define getter functions for harmony exports +/******/ __webpack_require__.d = (exports, definition) => { +/******/ for(var key in definition) { +/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { +/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); +/******/ } +/******/ } +/******/ }; +/******/ })(); +/******/ +/******/ /* webpack/runtime/hasOwnProperty shorthand */ +/******/ (() => { +/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) +/******/ })(); +/******/ +/************************************************************************/ +var __webpack_exports__ = {}; + +// EXTERNAL MODULE: external {"root":"jQuery","commonjs":"jquery","commonjs2":"jquery","amd":"jquery"} +var external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_ = __webpack_require__(8938); +var external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default = /*#__PURE__*/__webpack_require__.n(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_); +// EXTERNAL MODULE: ./src/lang/summernote-en-US.js +var summernote_en_US = __webpack_require__(7000); +;// CONCATENATED MODULE: ./src/js/core/env.js + + +/** + * returns whether font is installed or not. + * + * @param {String} fontName + * @return {Boolean} + */ +var genericFontFamilies = ['sans-serif', 'serif', 'monospace', 'cursive', 'fantasy']; +function validFontName(fontName) { + return external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().inArray(fontName.toLowerCase(), genericFontFamilies) === -1 ? "'".concat(fontName, "'") : fontName; +} +function createIsFontInstalledFunc() { + var testText = "mw"; + var fontSize = "20px"; + var canvasWidth = 40; + var canvasHeight = 20; + var canvas = document.createElement("canvas"); + var context = canvas.getContext("2d", { + willReadFrequently: true + }); + canvas.width = canvasWidth; + canvas.height = canvasHeight; + context.textAlign = "center"; + context.fillStyle = "black"; + context.textBaseline = "middle"; + function getPxInfo(font, testFontName) { + context.clearRect(0, 0, canvasWidth, canvasHeight); + context.font = fontSize + ' ' + validFontName(font) + ', "' + testFontName + '"'; + context.fillText(testText, canvasWidth / 2, canvasHeight / 2); + // Get pixel information + var pxInfo = context.getImageData(0, 0, canvasWidth, canvasHeight).data; + return pxInfo.join(""); + } + return function (fontName) { + var testFontName = fontName === 'Comic Sans MS' ? 'Courier New' : 'Comic Sans MS'; + var testInfo = getPxInfo(testFontName, testFontName); + var fontInfo = getPxInfo(fontName, testFontName); + return testInfo !== fontInfo; + }; +} +var userAgent = navigator.userAgent; +var isMSIE = /MSIE|Trident/i.test(userAgent); +var browserVersion; +if (isMSIE) { + var matches = /MSIE (\d+[.]\d+)/.exec(userAgent); + if (matches) { + browserVersion = parseFloat(matches[1]); + } + matches = /Trident\/.*rv:([0-9]{1,}[.0-9]{0,})/.exec(userAgent); + if (matches) { + browserVersion = parseFloat(matches[1]); + } +} +var isEdge = /Edge\/\d+/.test(userAgent); +var isSupportTouch = 'ontouchstart' in window || navigator.MaxTouchPoints > 0 || navigator.msMaxTouchPoints > 0; + +// [workaround] IE doesn't have input events for contentEditable +// - see: https://goo.gl/4bfIvA +var inputEventName = isMSIE ? 'DOMCharacterDataModified DOMSubtreeModified DOMNodeInserted' : 'input'; + +/** + * @class core.env + * + * Object which check platform and agent + * + * @singleton + * @alternateClassName env + */ +/* harmony default export */ const env = ({ + isMac: navigator.appVersion.indexOf('Mac') > -1, + isMSIE: isMSIE, + isEdge: isEdge, + isFF: !isEdge && /firefox/i.test(userAgent), + isPhantom: /PhantomJS/i.test(userAgent), + isWebkit: !isEdge && /webkit/i.test(userAgent), + isChrome: !isEdge && /chrome/i.test(userAgent), + isSafari: !isEdge && /safari/i.test(userAgent) && !/chrome/i.test(userAgent), + browserVersion: browserVersion, + isSupportTouch: isSupportTouch, + isFontInstalled: createIsFontInstalledFunc(), + isW3CRangeSupport: !!document.createRange, + inputEventName: inputEventName, + genericFontFamilies: genericFontFamilies, + validFontName: validFontName +}); +;// CONCATENATED MODULE: ./src/js/core/func.js + + +/** + * @class core.func + * + * func utils (for high-order func's arg) + * + * @singleton + * @alternateClassName func + */ +function eq(itemA) { + return function (itemB) { + return itemA === itemB; + }; +} +function eq2(itemA, itemB) { + return itemA === itemB; +} +function peq2(propName) { + return function (itemA, itemB) { + return itemA[propName] === itemB[propName]; + }; +} +function ok() { + return true; +} +function fail() { + return false; +} +function not(f) { + return function () { + return !f.apply(f, arguments); + }; +} +function and(fA, fB) { + return function (item) { + return fA(item) && fB(item); + }; +} +function func_self(a) { + return a; +} +function invoke(obj, method) { + return function () { + return obj[method].apply(obj, arguments); + }; +} +var idCounter = 0; + +/** + * reset globally-unique id + * + */ +function resetUniqueId() { + idCounter = 0; +} + +/** + * generate a globally-unique id + * + * @param {String} [prefix] + */ +function uniqueId(prefix) { + var id = ++idCounter + ''; + return prefix ? prefix + id : id; +} + +/** + * returns bnd (bounds) from rect + * + * - IE Compatibility Issue: http://goo.gl/sRLOAo + * - Scroll Issue: http://goo.gl/sNjUc + * + * @param {Rect} rect + * @return {Object} bounds + * @return {Number} bounds.top + * @return {Number} bounds.left + * @return {Number} bounds.width + * @return {Number} bounds.height + */ +function rect2bnd(rect) { + var $document = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(document); + return { + top: rect.top + $document.scrollTop(), + left: rect.left + $document.scrollLeft(), + width: rect.right - rect.left, + height: rect.bottom - rect.top + }; +} + +/** + * returns a copy of the object where the keys have become the values and the values the keys. + * @param {Object} obj + * @return {Object} + */ +function invertObject(obj) { + var inverted = {}; + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + inverted[obj[key]] = key; + } + } + return inverted; +} + +/** + * @param {String} namespace + * @param {String} [prefix] + * @return {String} + */ +function namespaceToCamel(namespace, prefix) { + prefix = prefix || ''; + return prefix + namespace.split('.').map(function (name) { + return name.substring(0, 1).toUpperCase() + name.substring(1); + }).join(''); +} + +/** + * Returns a function, that, as long as it continues to be invoked, will not + * be triggered. The function will be called after it stops being called for + * N milliseconds. If `immediate` is passed, trigger the function on the + * leading edge, instead of the trailing. + * @param {Function} func + * @param {Number} wait + * @param {Boolean} immediate + * @return {Function} + */ +function debounce(func, wait, immediate) { + var timeout; + return function () { + var context = this; + var args = arguments; + var later = function later() { + timeout = null; + if (!immediate) { + func.apply(context, args); + } + }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); + if (callNow) { + func.apply(context, args); + } + }; +} + +/** + * + * @param {String} url + * @return {Boolean} + */ +function isValidUrl(url) { + var expression = /[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/gi; + return expression.test(url); +} +/* harmony default export */ const func = ({ + eq: eq, + eq2: eq2, + peq2: peq2, + ok: ok, + fail: fail, + self: func_self, + not: not, + and: and, + invoke: invoke, + resetUniqueId: resetUniqueId, + uniqueId: uniqueId, + rect2bnd: rect2bnd, + invertObject: invertObject, + namespaceToCamel: namespaceToCamel, + debounce: debounce, + isValidUrl: isValidUrl +}); +;// CONCATENATED MODULE: ./src/js/core/lists.js + + +/** + * returns the first item of an array. + * + * @param {Array} array + */ +function head(array) { + return array[0]; +} + +/** + * returns the last item of an array. + * + * @param {Array} array + */ +function last(array) { + return array[array.length - 1]; +} + +/** + * returns everything but the last entry of the array. + * + * @param {Array} array + */ +function initial(array) { + return array.slice(0, array.length - 1); +} + +/** + * returns the rest of the items in an array. + * + * @param {Array} array + */ +function tail(array) { + return array.slice(1); +} + +/** + * returns item of array + */ +function find(array, pred) { + for (var idx = 0, len = array.length; idx < len; idx++) { + var item = array[idx]; + if (pred(item)) { + return item; + } + } +} + +/** + * returns true if all of the values in the array pass the predicate truth test. + */ +function lists_all(array, pred) { + for (var idx = 0, len = array.length; idx < len; idx++) { + if (!pred(array[idx])) { + return false; + } + } + return true; +} + +/** + * returns true if the value is present in the list. + */ +function contains(array, item) { + if (array && array.length && item) { + if (array.indexOf) { + return array.indexOf(item) !== -1; + } else if (array.contains) { + // `DOMTokenList` doesn't implement `.indexOf`, but it implements `.contains` + return array.contains(item); + } + } + return false; +} + +/** + * get sum from a list + * + * @param {Array} array - array + * @param {Function} fn - iterator + */ +function sum(array, fn) { + fn = fn || func.self; + return array.reduce(function (memo, v) { + return memo + fn(v); + }, 0); +} + +/** + * returns a copy of the collection with array type. + * @param {Collection} collection - collection eg) node.childNodes, ... + */ +function from(collection) { + var result = []; + var length = collection.length; + var idx = -1; + while (++idx < length) { + result[idx] = collection[idx]; + } + return result; +} + +/** + * returns whether list is empty or not + */ +function isEmpty(array) { + return !array || !array.length; +} + +/** + * cluster elements by predicate function. + * + * @param {Array} array - array + * @param {Function} fn - predicate function for cluster rule + * @param {Array[]} + */ +function clusterBy(array, fn) { + if (!array.length) { + return []; + } + var aTail = tail(array); + return aTail.reduce(function (memo, v) { + var aLast = last(memo); + if (fn(last(aLast), v)) { + aLast[aLast.length] = v; + } else { + memo[memo.length] = [v]; + } + return memo; + }, [[head(array)]]); +} + +/** + * returns a copy of the array with all false values removed + * + * @param {Array} array - array + * @param {Function} fn - predicate function for cluster rule + */ +function compact(array) { + var aResult = []; + for (var idx = 0, len = array.length; idx < len; idx++) { + if (array[idx]) { + aResult.push(array[idx]); + } + } + return aResult; +} + +/** + * produces a duplicate-free version of the array + * + * @param {Array} array + */ +function unique(array) { + var results = []; + for (var idx = 0, len = array.length; idx < len; idx++) { + if (!contains(results, array[idx])) { + results.push(array[idx]); + } + } + return results; +} + +/** + * returns next item. + * @param {Array} array + */ +function next(array, item) { + if (array && array.length && item) { + var idx = array.indexOf(item); + return idx === -1 ? null : array[idx + 1]; + } + return null; +} + +/** + * returns prev item. + * @param {Array} array + */ +function prev(array, item) { + if (array && array.length && item) { + var idx = array.indexOf(item); + return idx === -1 ? null : array[idx - 1]; + } + return null; +} + +/** + * @class core.list + * + * list utils + * + * @singleton + * @alternateClassName list + */ +/* harmony default export */ const lists = ({ + head: head, + last: last, + initial: initial, + tail: tail, + prev: prev, + next: next, + find: find, + contains: contains, + all: lists_all, + sum: sum, + from: from, + isEmpty: isEmpty, + clusterBy: clusterBy, + compact: compact, + unique: unique +}); +;// CONCATENATED MODULE: ./src/js/core/dom.js + + + + +var NBSP_CHAR = String.fromCharCode(160); +var ZERO_WIDTH_NBSP_CHAR = "\uFEFF"; + +/** + * @method isEditable + * + * returns whether node is `note-editable` or not. + * + * @param {Node} node + * @return {Boolean} + */ +function isEditable(node) { + return node && external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(node).hasClass('note-editable'); +} + +/** + * @method isControlSizing + * + * returns whether node is `note-control-sizing` or not. + * + * @param {Node} node + * @return {Boolean} + */ +function isControlSizing(node) { + return node && external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(node).hasClass('note-control-sizing'); +} + +/** + * @method makePredByNodeName + * + * returns predicate which judge whether nodeName is same + * + * @param {String} nodeName + * @return {Function} + */ +function makePredByNodeName(nodeName) { + nodeName = nodeName.toUpperCase(); + return function (node) { + return node && node.nodeName.toUpperCase() === nodeName; + }; +} + +/** + * @method isText + * + * + * + * @param {Node} node + * @return {Boolean} true if node's type is text(3) + */ +function isText(node) { + return node && node.nodeType === 3; +} + +/** + * @method isElement + * + * + * + * @param {Node} node + * @return {Boolean} true if node's type is element(1) + */ +function isElement(node) { + return node && node.nodeType === 1; +} + +/** + * ex) br, col, embed, hr, img, input, ... + * @see http://www.w3.org/html/wg/drafts/html/master/syntax.html#void-elements + */ +function isVoid(node) { + return node && /^BR|^IMG|^HR|^IFRAME|^BUTTON|^INPUT|^AUDIO|^VIDEO|^EMBED/.test(node.nodeName.toUpperCase()); +} +function isPara(node) { + if (isEditable(node)) { + return false; + } + + // Chrome(v31.0), FF(v25.0.1) use DIV for paragraph + return node && /^DIV|^P|^LI|^H[1-7]/.test(node.nodeName.toUpperCase()); +} +function isHeading(node) { + return node && /^H[1-7]/.test(node.nodeName.toUpperCase()); +} +var isPre = makePredByNodeName('PRE'); +var isLi = makePredByNodeName('LI'); +function isPurePara(node) { + return isPara(node) && !isLi(node); +} +var isTable = makePredByNodeName('TABLE'); +var isData = makePredByNodeName('DATA'); +function isInline(node) { + return !isBodyContainer(node) && !isList(node) && !isHr(node) && !isPara(node) && !isTable(node) && !isBlockquote(node) && !isData(node); +} +function isList(node) { + return node && /^UL|^OL/.test(node.nodeName.toUpperCase()); +} +var isHr = makePredByNodeName('HR'); +function isCell(node) { + return node && /^TD|^TH/.test(node.nodeName.toUpperCase()); +} +var isBlockquote = makePredByNodeName('BLOCKQUOTE'); +function isBodyContainer(node) { + return isCell(node) || isBlockquote(node) || isEditable(node); +} +var isAnchor = makePredByNodeName('A'); +function isParaInline(node) { + return isInline(node) && !!ancestor(node, isPara); +} +function isBodyInline(node) { + return isInline(node) && !ancestor(node, isPara); +} +var isBody = makePredByNodeName('BODY'); + +/** + * returns whether nodeB is closest sibling of nodeA + * + * @param {Node} nodeA + * @param {Node} nodeB + * @return {Boolean} + */ +function isClosestSibling(nodeA, nodeB) { + return nodeA.nextSibling === nodeB || nodeA.previousSibling === nodeB; +} + +/** + * returns array of closest siblings with node + * + * @param {Node} node + * @param {function} [pred] - predicate function + * @return {Node[]} + */ +function withClosestSiblings(node, pred) { + pred = pred || func.ok; + var siblings = []; + if (node.previousSibling && pred(node.previousSibling)) { + siblings.push(node.previousSibling); + } + siblings.push(node); + if (node.nextSibling && pred(node.nextSibling)) { + siblings.push(node.nextSibling); + } + return siblings; +} + +/** + * blank HTML for cursor position + * - [workaround] old IE only works with   + * - [workaround] IE11 and other browser works with bogus br + */ +var blankHTML = env.isMSIE && env.browserVersion < 11 ? ' ' : '
'; + +/** + * @method nodeLength + * + * returns #text's text size or element's childNodes size + * + * @param {Node} node + */ +function nodeLength(node) { + if (isText(node)) { + return node.nodeValue.length; + } + if (node) { + return node.childNodes.length; + } + return 0; +} + +/** + * returns whether deepest child node is empty or not. + * + * @param {Node} node + * @return {Boolean} + */ +function deepestChildIsEmpty(node) { + do { + if (node.firstElementChild === null || node.firstElementChild.innerHTML === '') break; + } while (node = node.firstElementChild); + return dom_isEmpty(node); +} + +/** + * returns whether node is empty or not. + * + * @param {Node} node + * @return {Boolean} + */ +function dom_isEmpty(node) { + var len = nodeLength(node); + if (len === 0) { + return true; + } else if (!isText(node) && len === 1 && node.innerHTML === blankHTML) { + // ex)


,
+ return true; + } else if (lists.all(node.childNodes, isText) && node.innerHTML === '') { + // ex)

, + return true; + } + return false; +} + +/** + * padding blankHTML if node is empty (for cursor position) + */ +function paddingBlankHTML(node) { + if (!isVoid(node) && !nodeLength(node)) { + node.innerHTML = blankHTML; + } +} + +/** + * find nearest ancestor predicate hit + * + * @param {Node} node + * @param {Function} pred - predicate function + */ +function ancestor(node, pred) { + while (node) { + if (pred(node)) { + return node; + } + if (isEditable(node)) { + break; + } + node = node.parentNode; + } + return null; +} + +/** + * find nearest ancestor only single child blood line and predicate hit + * + * @param {Node} node + * @param {Function} pred - predicate function + */ +function singleChildAncestor(node, pred) { + node = node.parentNode; + while (node) { + if (nodeLength(node) !== 1) { + break; + } + if (pred(node)) { + return node; + } + if (isEditable(node)) { + break; + } + node = node.parentNode; + } + return null; +} + +/** + * returns new array of ancestor nodes (until predicate hit). + * + * @param {Node} node + * @param {Function} [optional] pred - predicate function + */ +function listAncestor(node, pred) { + pred = pred || func.fail; + var ancestors = []; + ancestor(node, function (el) { + if (!isEditable(el)) { + ancestors.push(el); + } + return pred(el); + }); + return ancestors; +} + +/** + * find farthest ancestor predicate hit + */ +function lastAncestor(node, pred) { + var ancestors = listAncestor(node); + return lists.last(ancestors.filter(pred)); +} + +/** + * returns common ancestor node between two nodes. + * + * @param {Node} nodeA + * @param {Node} nodeB + */ +function commonAncestor(nodeA, nodeB) { + var ancestors = listAncestor(nodeA); + for (var n = nodeB; n; n = n.parentNode) { + if (ancestors.indexOf(n) > -1) return n; + } + return null; // difference document area +} + +/** + * listing all previous siblings (until predicate hit). + * + * @param {Node} node + * @param {Function} [optional] pred - predicate function + */ +function listPrev(node, pred) { + pred = pred || func.fail; + var nodes = []; + while (node) { + if (pred(node)) { + break; + } + nodes.push(node); + node = node.previousSibling; + } + return nodes; +} + +/** + * listing next siblings (until predicate hit). + * + * @param {Node} node + * @param {Function} [pred] - predicate function + */ +function listNext(node, pred) { + pred = pred || func.fail; + var nodes = []; + while (node) { + if (pred(node)) { + break; + } + nodes.push(node); + node = node.nextSibling; + } + return nodes; +} + +/** + * listing descendant nodes + * + * @param {Node} node + * @param {Function} [pred] - predicate function + */ +function listDescendant(node, pred) { + var descendants = []; + pred = pred || func.ok; + + // start DFS(depth first search) with node + (function fnWalk(current) { + if (node !== current && pred(current)) { + descendants.push(current); + } + for (var idx = 0, len = current.childNodes.length; idx < len; idx++) { + fnWalk(current.childNodes[idx]); + } + })(node); + return descendants; +} + +/** + * wrap node with new tag. + * + * @param {Node} node + * @param {Node} tagName of wrapper + * @return {Node} - wrapper + */ +function wrap(node, wrapperName) { + var parent = node.parentNode; + var wrapper = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()('<' + wrapperName + '>')[0]; + parent.insertBefore(wrapper, node); + wrapper.appendChild(node); + return wrapper; +} + +/** + * insert node after preceding + * + * @param {Node} node + * @param {Node} preceding - predicate function + */ +function insertAfter(node, preceding) { + var next = preceding.nextSibling; + var parent = preceding.parentNode; + if (next) { + parent.insertBefore(node, next); + } else { + parent.appendChild(node); + } + return node; +} + +/** + * append elements. + * + * @param {Node} node + * @param {Collection} aChild + */ +function appendChildNodes(node, aChild, isSkipPaddingBlankHTML) { + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(aChild, function (idx, child) { + // special case: appending a pure UL/OL to a LI element creates inaccessible LI element + // e.g. press enter in last LI which has UL/OL-subelements + // Therefore, if current node is LI element with no child nodes (text-node) and appending a list, add a br before + if (!isSkipPaddingBlankHTML && isLi(node) && node.firstChild === null && isList(child)) { + node.appendChild(create("br")); + } + node.appendChild(child); + }); + return node; +} + +/** + * returns whether boundaryPoint is left edge or not. + * + * @param {BoundaryPoint} point + * @return {Boolean} + */ +function isLeftEdgePoint(point) { + return point.offset === 0; +} + +/** + * returns whether boundaryPoint is right edge or not. + * + * @param {BoundaryPoint} point + * @return {Boolean} + */ +function isRightEdgePoint(point) { + return point.offset === nodeLength(point.node); +} + +/** + * returns whether boundaryPoint is edge or not. + * + * @param {BoundaryPoint} point + * @return {Boolean} + */ +function isEdgePoint(point) { + return isLeftEdgePoint(point) || isRightEdgePoint(point); +} + +/** + * returns whether node is left edge of ancestor or not. + * + * @param {Node} node + * @param {Node} ancestor + * @return {Boolean} + */ +function isLeftEdgeOf(node, ancestor) { + while (node && node !== ancestor) { + if (position(node) !== 0) { + return false; + } + node = node.parentNode; + } + return true; +} + +/** + * returns whether node is right edge of ancestor or not. + * + * @param {Node} node + * @param {Node} ancestor + * @return {Boolean} + */ +function isRightEdgeOf(node, ancestor) { + if (!ancestor) { + return false; + } + while (node && node !== ancestor) { + if (position(node) !== nodeLength(node.parentNode) - 1) { + return false; + } + node = node.parentNode; + } + return true; +} + +/** + * returns whether point is left edge of ancestor or not. + * @param {BoundaryPoint} point + * @param {Node} ancestor + * @return {Boolean} + */ +function isLeftEdgePointOf(point, ancestor) { + return isLeftEdgePoint(point) && isLeftEdgeOf(point.node, ancestor); +} + +/** + * returns whether point is right edge of ancestor or not. + * @param {BoundaryPoint} point + * @param {Node} ancestor + * @return {Boolean} + */ +function isRightEdgePointOf(point, ancestor) { + return isRightEdgePoint(point) && isRightEdgeOf(point.node, ancestor); +} + +/** + * returns offset from parent. + * + * @param {Node} node + */ +function position(node) { + var offset = 0; + while (node = node.previousSibling) { + offset += 1; + } + return offset; +} +function hasChildren(node) { + return !!(node && node.childNodes && node.childNodes.length); +} + +/** + * returns previous boundaryPoint + * + * @param {BoundaryPoint} point + * @param {Boolean} isSkipInnerOffset + * @return {BoundaryPoint} + */ +function prevPoint(point, isSkipInnerOffset) { + var node; + var offset; + if (point.offset === 0) { + if (isEditable(point.node)) { + return null; + } + node = point.node.parentNode; + offset = position(point.node); + } else if (hasChildren(point.node)) { + node = point.node.childNodes[point.offset - 1]; + offset = nodeLength(node); + } else { + node = point.node; + offset = isSkipInnerOffset ? 0 : point.offset - 1; + } + return { + node: node, + offset: offset + }; +} + +/** + * returns next boundaryPoint + * + * @param {BoundaryPoint} point + * @param {Boolean} isSkipInnerOffset + * @return {BoundaryPoint} + */ +function nextPoint(point, isSkipInnerOffset) { + var node, offset; + if (nodeLength(point.node) === point.offset) { + if (isEditable(point.node)) { + return null; + } + var nextTextNode = getNextTextNode(point.node); + if (nextTextNode) { + node = nextTextNode; + offset = 0; + } else { + node = point.node.parentNode; + offset = position(point.node) + 1; + } + } else if (hasChildren(point.node)) { + node = point.node.childNodes[point.offset]; + offset = 0; + } else { + node = point.node; + offset = isSkipInnerOffset ? nodeLength(point.node) : point.offset + 1; + } + return { + node: node, + offset: offset + }; +} + +/** + * Find next boundaryPoint for preorder / depth first traversal of the DOM + * returns next boundaryPoint with empty node + * + * @param {BoundaryPoint} point + * @param {Boolean} isSkipInnerOffset + * @return {BoundaryPoint} + */ +function nextPointWithEmptyNode(point, isSkipInnerOffset) { + var node, + offset = 0; + if (nodeLength(point.node) === point.offset) { + if (isEditable(point.node)) { + return null; + } + node = point.node.parentNode; + offset = position(point.node) + 1; + + // if parent node is editable, return current node's sibling node. + if (isEditable(node)) { + node = point.node.nextSibling; + offset = 0; + } + } else if (hasChildren(point.node)) { + node = point.node.childNodes[point.offset]; + offset = 0; + } else { + node = point.node; + offset = isSkipInnerOffset ? nodeLength(point.node) : point.offset + 1; + } + return { + node: node, + offset: offset + }; +} + +/* +* returns the next Text node index or 0 if not found. +*/ +function getNextTextNode(actual) { + if (!actual.nextSibling) return undefined; + if (actual.parent !== actual.nextSibling.parent) return undefined; + if (isText(actual.nextSibling)) return actual.nextSibling;else return getNextTextNode(actual.nextSibling); +} + +/** + * returns whether pointA and pointB is same or not. + * + * @param {BoundaryPoint} pointA + * @param {BoundaryPoint} pointB + * @return {Boolean} + */ +function isSamePoint(pointA, pointB) { + return pointA.node === pointB.node && pointA.offset === pointB.offset; +} + +/** + * returns whether point is visible (can set cursor) or not. + * + * @param {BoundaryPoint} point + * @return {Boolean} + */ +function isVisiblePoint(point) { + if (isText(point.node) || !hasChildren(point.node) || dom_isEmpty(point.node)) { + return true; + } + var leftNode = point.node.childNodes[point.offset - 1]; + var rightNode = point.node.childNodes[point.offset]; + if ((!leftNode || isVoid(leftNode)) && (!rightNode || isVoid(rightNode)) || isTable(rightNode)) { + return true; + } + return false; +} + +/** + * @method prevPointUtil + * + * @param {BoundaryPoint} point + * @param {Function} pred + * @return {BoundaryPoint} + */ +function prevPointUntil(point, pred) { + while (point) { + if (pred(point)) { + return point; + } + point = prevPoint(point); + } + return null; +} + +/** + * @method nextPointUntil + * + * @param {BoundaryPoint} point + * @param {Function} pred + * @return {BoundaryPoint} + */ +function nextPointUntil(point, pred) { + while (point) { + if (pred(point)) { + return point; + } + point = nextPoint(point); + } + return null; +} + +/** + * returns whether point has character or not. + * + * @param {Point} point + * @return {Boolean} + */ +function isCharPoint(point) { + if (!isText(point.node)) { + return false; + } + var ch = point.node.nodeValue.charAt(point.offset - 1); + return ch && ch !== ' ' && ch !== NBSP_CHAR; +} + +/** + * returns whether point has space or not. + * + * @param {Point} point + * @return {Boolean} + */ +function isSpacePoint(point) { + if (!isText(point.node)) { + return false; + } + var ch = point.node.nodeValue.charAt(point.offset - 1); + return ch === ' ' || ch === NBSP_CHAR; +} + +/** + * @method walkPoint - preorder / depth first traversal of the DOM + * + * @param {BoundaryPoint} startPoint + * @param {BoundaryPoint} endPoint + * @param {Function} handler + * @param {Boolean} isSkipInnerOffset + */ +function walkPoint(startPoint, endPoint, handler, isSkipInnerOffset) { + var point = startPoint; + while (point && point.node) { + handler(point); + if (isSamePoint(point, endPoint)) { + break; + } + var isSkipOffset = isSkipInnerOffset && startPoint.node !== point.node && endPoint.node !== point.node; + point = nextPointWithEmptyNode(point, isSkipOffset); + } +} + +/** + * @method makeOffsetPath + * + * return offsetPath(array of offset) from ancestor + * + * @param {Node} ancestor - ancestor node + * @param {Node} node + */ +function makeOffsetPath(ancestor, node) { + var ancestors = listAncestor(node, func.eq(ancestor)); + return ancestors.map(position).reverse(); +} + +/** + * @method fromOffsetPath + * + * return element from offsetPath(array of offset) + * + * @param {Node} ancestor - ancestor node + * @param {array} offsets - offsetPath + */ +function fromOffsetPath(ancestor, offsets) { + var current = ancestor; + for (var i = 0, len = offsets.length; i < len; i++) { + if (current.childNodes.length <= offsets[i]) { + current = current.childNodes[current.childNodes.length - 1]; + } else { + current = current.childNodes[offsets[i]]; + } + } + return current; +} + +/** + * @method splitNode + * + * split element or #text + * + * @param {BoundaryPoint} point + * @param {Object} [options] + * @param {Boolean} [options.isSkipPaddingBlankHTML] - default: false + * @param {Boolean} [options.isNotSplitEdgePoint] - default: false + * @param {Boolean} [options.isDiscardEmptySplits] - default: false + * @return {Node} right node of boundaryPoint + */ +function splitNode(point, options) { + var isSkipPaddingBlankHTML = options && options.isSkipPaddingBlankHTML; + var isNotSplitEdgePoint = options && options.isNotSplitEdgePoint; + var isDiscardEmptySplits = options && options.isDiscardEmptySplits; + if (isDiscardEmptySplits) { + isSkipPaddingBlankHTML = true; + } + + // edge case + if (isEdgePoint(point) && (isText(point.node) || isNotSplitEdgePoint)) { + if (isLeftEdgePoint(point)) { + return point.node; + } else if (isRightEdgePoint(point)) { + return point.node.nextSibling; + } + } + + // split #text + if (isText(point.node)) { + return point.node.splitText(point.offset); + } else { + var childNode = point.node.childNodes[point.offset]; + var childNodes = listNext(childNode); + var clone = insertAfter(point.node.cloneNode(false), point.node); + appendChildNodes(clone, childNodes); + if (!isSkipPaddingBlankHTML) { + paddingBlankHTML(point.node); + paddingBlankHTML(clone); + } + if (isDiscardEmptySplits) { + if (dom_isEmpty(point.node)) { + remove(point.node); + } + if (dom_isEmpty(clone)) { + remove(clone); + return point.node.nextSibling; + } + } + return clone; + } +} + +/** + * @method splitTree + * + * split tree by point + * + * @param {Node} root - split root + * @param {BoundaryPoint} point + * @param {Object} [options] + * @param {Boolean} [options.isSkipPaddingBlankHTML] - default: false + * @param {Boolean} [options.isNotSplitEdgePoint] - default: false + * @return {Node} right node of boundaryPoint + */ +function splitTree(root, point, options) { + // ex) [#text, ,

] + var ancestors = listAncestor(point.node, func.eq(root)); + if (!ancestors.length) { + return null; + } else if (ancestors.length === 1) { + return splitNode(point, options); + } + // Filter elements with sibling elements + if (ancestors.length > 2) { + var domList = ancestors.slice(0, ancestors.length - 1); + var ifHasNextSibling = domList.find(function (item) { + return item.nextSibling; + }); + if (ifHasNextSibling && point.offset != 0 && isRightEdgePoint(point)) { + var nestSibling = ifHasNextSibling.nextSibling; + var textNode; + if (nestSibling.nodeType == 1) { + textNode = nestSibling.childNodes[0]; + ancestors = listAncestor(textNode, func.eq(root)); + point = { + node: textNode, + offset: 0 + }; + } else if (nestSibling.nodeType == 3 && !nestSibling.data.match(/[\n\r]/g)) { + textNode = nestSibling; + ancestors = listAncestor(textNode, func.eq(root)); + point = { + node: textNode, + offset: 0 + }; + } + } + } + return ancestors.reduce(function (node, parent) { + if (node === point.node) { + node = splitNode(point, options); + } + return splitNode({ + node: parent, + offset: node ? position(node) : nodeLength(parent) + }, options); + }); +} + +/** + * split point + * + * @param {Point} point + * @param {Boolean} isInline + * @return {Object} + */ +function splitPoint(point, isInline) { + // find splitRoot, container + // - inline: splitRoot is a child of paragraph + // - block: splitRoot is a child of bodyContainer + var pred = isInline ? isPara : isBodyContainer; + var ancestors = listAncestor(point.node, pred); + var topAncestor = lists.last(ancestors) || point.node; + var splitRoot, container; + if (pred(topAncestor)) { + splitRoot = ancestors[ancestors.length - 2]; + container = topAncestor; + } else { + splitRoot = topAncestor; + container = splitRoot.parentNode; + } + + // if splitRoot is exists, split with splitTree + var pivot = splitRoot && splitTree(splitRoot, point, { + isSkipPaddingBlankHTML: isInline, + isNotSplitEdgePoint: isInline + }); + + // if container is point.node, find pivot with point.offset + if (!pivot && container === point.node) { + pivot = point.node.childNodes[point.offset]; + } + return { + rightNode: pivot, + container: container + }; +} +function create(nodeName) { + return document.createElement(nodeName); +} +function createText(text) { + return document.createTextNode(text); +} + +/** + * @method remove + * + * remove node, (isRemoveChild: remove child or not) + * + * @param {Node} node + * @param {Boolean} isRemoveChild + */ +function remove(node, isRemoveChild) { + if (!node || !node.parentNode) { + return; + } + if (node.removeNode) { + return node.removeNode(isRemoveChild); + } + var parent = node.parentNode; + if (!isRemoveChild) { + var nodes = []; + for (var i = 0, len = node.childNodes.length; i < len; i++) { + nodes.push(node.childNodes[i]); + } + for (var _i = 0, _len = nodes.length; _i < _len; _i++) { + parent.insertBefore(nodes[_i], node); + } + } + parent.removeChild(node); +} + +/** + * @method removeWhile + * + * @param {Node} node + * @param {Function} pred + */ +function removeWhile(node, pred) { + while (node) { + if (isEditable(node) || !pred(node)) { + break; + } + var parent = node.parentNode; + remove(node); + node = parent; + } +} + +/** + * @method replace + * + * replace node with provided nodeName + * + * @param {Node} node + * @param {String} nodeName + * @return {Node} - new node + */ +function replace(node, nodeName) { + if (node.nodeName.toUpperCase() === nodeName.toUpperCase()) { + return node; + } + var newNode = create(nodeName); + if (node.style.cssText) { + newNode.style.cssText = node.style.cssText; + } + appendChildNodes(newNode, lists.from(node.childNodes)); + insertAfter(newNode, node); + remove(node); + return newNode; +} +var isTextarea = makePredByNodeName('TEXTAREA'); + +/** + * @param {jQuery} $node + * @param {Boolean} [stripLinebreaks] - default: false + */ +function value($node, stripLinebreaks) { + var val = isTextarea($node[0]) ? $node.val() : $node.html(); + if (stripLinebreaks) { + return val.replace(/[\n\r]/g, ''); + } + return val; +} + +/** + * @method html + * + * get the HTML contents of node + * + * @param {jQuery} $node + * @param {Boolean} [isNewlineOnBlock] + */ +function html($node, isNewlineOnBlock) { + var markup = value($node); + if (isNewlineOnBlock) { + var regexTag = /<(\/?)(\b(?!!)[^>\s]*)(.*?)(\s*\/?>)/g; + markup = markup.replace(regexTag, function (match, endSlash, name) { + name = name.toUpperCase(); + var isEndOfInlineContainer = /^DIV|^TD|^TH|^P|^LI|^H[1-7]/.test(name) && !!endSlash; + var isBlockNode = /^BLOCKQUOTE|^TABLE|^TBODY|^TR|^HR|^UL|^OL/.test(name); + return match + (isEndOfInlineContainer || isBlockNode ? '\n' : ''); + }); + markup = markup.trim(); + } + return markup; +} +function posFromPlaceholder(placeholder) { + var $placeholder = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(placeholder); + var pos = $placeholder.offset(); + var height = $placeholder.outerHeight(true); // include margin + + return { + left: pos.left, + top: pos.top + height + }; +} +function attachEvents($node, events) { + Object.keys(events).forEach(function (key) { + $node.on(key, events[key]); + }); +} +function detachEvents($node, events) { + Object.keys(events).forEach(function (key) { + $node.off(key, events[key]); + }); +} + +/** + * @method isCustomStyleTag + * + * assert if a node contains a "note-styletag" class, + * which implies that's a custom-made style tag node + * + * @param {Node} an HTML DOM node + */ +function isCustomStyleTag(node) { + return node && !isText(node) && lists.contains(node.classList, 'note-styletag'); +} +/* harmony default export */ const dom = ({ + /** @property {String} NBSP_CHAR */ + NBSP_CHAR: NBSP_CHAR, + /** @property {String} ZERO_WIDTH_NBSP_CHAR */ + ZERO_WIDTH_NBSP_CHAR: ZERO_WIDTH_NBSP_CHAR, + /** @property {String} blank */ + blank: blankHTML, + /** @property {String} emptyPara */ + emptyPara: "

".concat(blankHTML, "

"), + makePredByNodeName: makePredByNodeName, + isEditable: isEditable, + isControlSizing: isControlSizing, + isText: isText, + isElement: isElement, + isVoid: isVoid, + isPara: isPara, + isPurePara: isPurePara, + isHeading: isHeading, + isInline: isInline, + isBlock: func.not(isInline), + isBodyInline: isBodyInline, + isBody: isBody, + isParaInline: isParaInline, + isPre: isPre, + isList: isList, + isTable: isTable, + isData: isData, + isCell: isCell, + isBlockquote: isBlockquote, + isBodyContainer: isBodyContainer, + isAnchor: isAnchor, + isDiv: makePredByNodeName('DIV'), + isLi: isLi, + isBR: makePredByNodeName('BR'), + isSpan: makePredByNodeName('SPAN'), + isB: makePredByNodeName('B'), + isU: makePredByNodeName('U'), + isS: makePredByNodeName('S'), + isI: makePredByNodeName('I'), + isImg: makePredByNodeName('IMG'), + isTextarea: isTextarea, + deepestChildIsEmpty: deepestChildIsEmpty, + isEmpty: dom_isEmpty, + isEmptyAnchor: func.and(isAnchor, dom_isEmpty), + isClosestSibling: isClosestSibling, + withClosestSiblings: withClosestSiblings, + nodeLength: nodeLength, + isLeftEdgePoint: isLeftEdgePoint, + isRightEdgePoint: isRightEdgePoint, + isEdgePoint: isEdgePoint, + isLeftEdgeOf: isLeftEdgeOf, + isRightEdgeOf: isRightEdgeOf, + isLeftEdgePointOf: isLeftEdgePointOf, + isRightEdgePointOf: isRightEdgePointOf, + prevPoint: prevPoint, + nextPoint: nextPoint, + nextPointWithEmptyNode: nextPointWithEmptyNode, + isSamePoint: isSamePoint, + isVisiblePoint: isVisiblePoint, + prevPointUntil: prevPointUntil, + nextPointUntil: nextPointUntil, + isCharPoint: isCharPoint, + isSpacePoint: isSpacePoint, + walkPoint: walkPoint, + ancestor: ancestor, + singleChildAncestor: singleChildAncestor, + listAncestor: listAncestor, + lastAncestor: lastAncestor, + listNext: listNext, + listPrev: listPrev, + listDescendant: listDescendant, + commonAncestor: commonAncestor, + wrap: wrap, + insertAfter: insertAfter, + appendChildNodes: appendChildNodes, + position: position, + hasChildren: hasChildren, + makeOffsetPath: makeOffsetPath, + fromOffsetPath: fromOffsetPath, + splitTree: splitTree, + splitPoint: splitPoint, + create: create, + createText: createText, + remove: remove, + removeWhile: removeWhile, + replace: replace, + html: html, + value: value, + posFromPlaceholder: posFromPlaceholder, + attachEvents: attachEvents, + detachEvents: detachEvents, + isCustomStyleTag: isCustomStyleTag +}); +;// CONCATENATED MODULE: ./src/js/Context.js +function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } +function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } +function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } +function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } + + + + +var Context = /*#__PURE__*/function () { + /** + * @param {jQuery} $note + * @param {Object} options + */ + function Context($note, options) { + _classCallCheck(this, Context); + this.$note = $note; + this.memos = {}; + this.modules = {}; + this.layoutInfo = {}; + this.options = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend(true, {}, options); + + // init ui with options + (external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()).summernote.ui = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().summernote.ui_template(this.options); + this.ui = (external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()).summernote.ui; + this.initialize(); + } + + /** + * create layout and initialize modules and other resources + */ + return _createClass(Context, [{ + key: "initialize", + value: function initialize() { + this.layoutInfo = this.ui.createLayout(this.$note); + this._initialize(); + this.$note.hide(); + return this; + } + + /** + * destroy modules and other resources and remove layout + */ + }, { + key: "destroy", + value: function destroy() { + this._destroy(); + this.$note.removeData('summernote'); + this.ui.removeLayout(this.$note, this.layoutInfo); + } + + /** + * destory modules and other resources and initialize it again + */ + }, { + key: "reset", + value: function reset() { + var disabled = this.isDisabled(); + this.code(dom.emptyPara); + this._destroy(); + this._initialize(); + if (disabled) { + this.disable(); + } + } + }, { + key: "_initialize", + value: function _initialize() { + var _this = this; + // set own id + this.options.id = func.uniqueId(external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().now()); + // set default container for tooltips, popovers, and dialogs + this.options.container = this.options.container || this.layoutInfo.editor; + + // add optional buttons + var buttons = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend({}, this.options.buttons); + Object.keys(buttons).forEach(function (key) { + _this.memo('button.' + key, buttons[key]); + }); + var modules = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend({}, this.options.modules, (external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()).summernote.plugins || {}); + + // add and initialize modules + Object.keys(modules).forEach(function (key) { + _this.module(key, modules[key], true); + }); + Object.keys(this.modules).forEach(function (key) { + _this.initializeModule(key); + }); + } + }, { + key: "_destroy", + value: function _destroy() { + var _this2 = this; + // destroy modules with reversed order + Object.keys(this.modules).reverse().forEach(function (key) { + _this2.removeModule(key); + }); + Object.keys(this.memos).forEach(function (key) { + _this2.removeMemo(key); + }); + // trigger custom onDestroy callback + this.triggerEvent('destroy', this); + } + }, { + key: "code", + value: function code(html) { + var isActivated = this.invoke('codeview.isActivated'); + if (html === undefined) { + this.invoke('codeview.sync'); + return isActivated ? this.layoutInfo.codable.val() : this.layoutInfo.editable.html(); + } else { + if (isActivated) { + this.invoke('codeview.sync', html); + } else { + this.layoutInfo.editable.html(html); + } + this.$note.val(html); + this.triggerEvent('change', html, this.layoutInfo.editable); + } + } + }, { + key: "isDisabled", + value: function isDisabled() { + return this.layoutInfo.editable.attr('contenteditable') === 'false'; + } + }, { + key: "enable", + value: function enable() { + this.layoutInfo.editable.attr('contenteditable', true); + this.invoke('toolbar.activate', true); + this.triggerEvent('disable', false); + this.options.editing = true; + } + }, { + key: "disable", + value: function disable() { + // close codeview if codeview is opend + if (this.invoke('codeview.isActivated')) { + this.invoke('codeview.deactivate'); + } + this.layoutInfo.editable.attr('contenteditable', false); + this.options.editing = false; + this.invoke('toolbar.deactivate', true); + this.triggerEvent('disable', true); + } + }, { + key: "triggerEvent", + value: function triggerEvent() { + var namespace = lists.head(arguments); + var args = lists.tail(lists.from(arguments)); + var callback = this.options.callbacks[func.namespaceToCamel(namespace, 'on')]; + if (callback) { + callback.apply(this.$note[0], args); + } + this.$note.trigger('summernote.' + namespace, args); + } + }, { + key: "initializeModule", + value: function initializeModule(key) { + var module = this.modules[key]; + module.shouldInitialize = module.shouldInitialize || func.ok; + if (!module.shouldInitialize()) { + return; + } + + // initialize module + if (module.initialize) { + module.initialize(); + } + + // attach events + if (module.events) { + dom.attachEvents(this.$note, module.events); + } + } + }, { + key: "module", + value: function module(key, ModuleClass, withoutIntialize) { + if (arguments.length === 1) { + return this.modules[key]; + } + this.modules[key] = new ModuleClass(this); + if (!withoutIntialize) { + this.initializeModule(key); + } + } + }, { + key: "removeModule", + value: function removeModule(key) { + var module = this.modules[key]; + if (module.shouldInitialize()) { + if (module.events) { + dom.detachEvents(this.$note, module.events); + } + if (module.destroy) { + module.destroy(); + } + } + delete this.modules[key]; + } + }, { + key: "memo", + value: function memo(key, obj) { + if (arguments.length === 1) { + return this.memos[key]; + } + this.memos[key] = obj; + } + }, { + key: "removeMemo", + value: function removeMemo(key) { + if (this.memos[key] && this.memos[key].destroy) { + this.memos[key].destroy(); + } + delete this.memos[key]; + } + + /** + * Some buttons need to change their visual style immediately once they get pressed + */ + }, { + key: "createInvokeHandlerAndUpdateState", + value: function createInvokeHandlerAndUpdateState(namespace, value) { + var _this3 = this; + return function (event) { + _this3.createInvokeHandler(namespace, value)(event); + _this3.invoke('buttons.updateCurrentStyle'); + }; + } + }, { + key: "createInvokeHandler", + value: function createInvokeHandler(namespace, value) { + var _this4 = this; + return function (event) { + event.preventDefault(); + var $target = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(event.target); + _this4.invoke(namespace, value || $target.closest('[data-value]').data('value'), $target); + }; + } + }, { + key: "invoke", + value: function invoke() { + var namespace = lists.head(arguments); + var args = lists.tail(lists.from(arguments)); + var splits = namespace.split('.'); + var hasSeparator = splits.length > 1; + var moduleName = hasSeparator && lists.head(splits); + var methodName = hasSeparator ? lists.last(splits) : lists.head(splits); + var module = this.modules[moduleName || 'editor']; + if (!moduleName && this[methodName]) { + return this[methodName].apply(this, args); + } else if (module && module[methodName] && module.shouldInitialize()) { + return module[methodName].apply(module, args); + } + } + }]); +}(); + +;// CONCATENATED MODULE: ./src/js/summernote.js +function summernote_typeof(o) { "@babel/helpers - typeof"; return summernote_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, summernote_typeof(o); } + + + + +external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().fn.extend({ + /** + * Summernote API + * + * @param {Object|String} + * @return {this} + */ + summernote: function summernote() { + var type = summernote_typeof(lists.head(arguments)); + var isExternalAPICalled = type === 'string'; + var hasInitOptions = type === 'object'; + var options = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend({}, (external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()).summernote.options, hasInitOptions ? lists.head(arguments) : {}); + + // Update options + options.langInfo = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend(true, {}, (external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()).summernote.lang['en-US'], (external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()).summernote.lang[options.lang]); + options.icons = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend(true, {}, (external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()).summernote.options.icons, options.icons); + options.tooltip = options.tooltip === 'auto' ? !env.isSupportTouch : options.tooltip; + this.each(function (idx, note) { + var $note = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(note); + if (!$note.data('summernote')) { + var context = new Context($note, options); + $note.data('summernote', context); + $note.data('summernote').triggerEvent('init', context.layoutInfo); + } + }); + var $note = this.first(); + if ($note.length) { + var context = $note.data('summernote'); + if (isExternalAPICalled) { + return context.invoke.apply(context, lists.from(arguments)); + } else if (options.focus) { + context.invoke('editor.focus'); + } + } + return this; + } +}); +;// CONCATENATED MODULE: ./src/js/core/range.js +function range_typeof(o) { "@babel/helpers - typeof"; return range_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, range_typeof(o); } +function range_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function range_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, range_toPropertyKey(o.key), o); } } +function range_createClass(e, r, t) { return r && range_defineProperties(e.prototype, r), t && range_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function range_toPropertyKey(t) { var i = range_toPrimitive(t, "string"); return "symbol" == range_typeof(i) ? i : i + ""; } +function range_toPrimitive(t, r) { if ("object" != range_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != range_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } + + + + + + +/** + * return boundaryPoint from TextRange, inspired by Andy Na's HuskyRange.js + * + * @param {TextRange} textRange + * @param {Boolean} isStart + * @return {BoundaryPoint} + * + * @see http://msdn.microsoft.com/en-us/library/ie/ms535872(v=vs.85).aspx + */ +function textRangeToPoint(textRange, isStart) { + var container = textRange.parentElement(); + var offset; + var tester = document.body.createTextRange(); + var prevContainer; + var childNodes = lists.from(container.childNodes); + for (offset = 0; offset < childNodes.length; offset++) { + if (dom.isText(childNodes[offset])) { + continue; + } + tester.moveToElementText(childNodes[offset]); + if (tester.compareEndPoints('StartToStart', textRange) >= 0) { + break; + } + prevContainer = childNodes[offset]; + } + if (offset !== 0 && dom.isText(childNodes[offset - 1])) { + var textRangeStart = document.body.createTextRange(); + var curTextNode = null; + textRangeStart.moveToElementText(prevContainer || container); + textRangeStart.collapse(!prevContainer); + curTextNode = prevContainer ? prevContainer.nextSibling : container.firstChild; + var pointTester = textRange.duplicate(); + pointTester.setEndPoint('StartToStart', textRangeStart); + var textCount = pointTester.text.replace(/[\r\n]/g, '').length; + while (textCount > curTextNode.nodeValue.length && curTextNode.nextSibling) { + textCount -= curTextNode.nodeValue.length; + curTextNode = curTextNode.nextSibling; + } + + // [workaround] enforce IE to re-reference curTextNode, hack + var dummy = curTextNode.nodeValue; // eslint-disable-line + + if (isStart && curTextNode.nextSibling && dom.isText(curTextNode.nextSibling) && textCount === curTextNode.nodeValue.length) { + textCount -= curTextNode.nodeValue.length; + curTextNode = curTextNode.nextSibling; + } + container = curTextNode; + offset = textCount; + } + return { + cont: container, + offset: offset + }; +} + +/** + * return TextRange from boundary point (inspired by google closure-library) + * @param {BoundaryPoint} point + * @return {TextRange} + */ +function pointToTextRange(point) { + var textRangeInfo = function textRangeInfo(container, offset) { + var node, isCollapseToStart; + if (dom.isText(container)) { + var prevTextNodes = dom.listPrev(container, func.not(dom.isText)); + var prevContainer = lists.last(prevTextNodes).previousSibling; + node = prevContainer || container.parentNode; + offset += lists.sum(lists.tail(prevTextNodes), dom.nodeLength); + isCollapseToStart = !prevContainer; + } else { + node = container.childNodes[offset] || container; + if (dom.isText(node)) { + return textRangeInfo(node, 0); + } + offset = 0; + isCollapseToStart = false; + } + return { + node: node, + collapseToStart: isCollapseToStart, + offset: offset + }; + }; + var textRange = document.body.createTextRange(); + var info = textRangeInfo(point.node, point.offset); + textRange.moveToElementText(info.node); + textRange.collapse(info.collapseToStart); + textRange.moveStart('character', info.offset); + return textRange; +} + +/** + * Wrapped Range + * + * @constructor + * @param {Node} sc - start container + * @param {Number} so - start offset + * @param {Node} ec - end container + * @param {Number} eo - end offset + */ +var WrappedRange = /*#__PURE__*/function () { + function WrappedRange(sc, so, ec, eo) { + range_classCallCheck(this, WrappedRange); + this.sc = sc; + this.so = so; + this.ec = ec; + this.eo = eo; + + // isOnEditable: judge whether range is on editable or not + this.isOnEditable = this.makeIsOn(dom.isEditable); + // isOnList: judge whether range is on list node or not + this.isOnList = this.makeIsOn(dom.isList); + // isOnAnchor: judge whether range is on anchor node or not + this.isOnAnchor = this.makeIsOn(dom.isAnchor); + // isOnCell: judge whether range is on cell node or not + this.isOnCell = this.makeIsOn(dom.isCell); + // isOnData: judge whether range is on data node or not + this.isOnData = this.makeIsOn(dom.isData); + } + + // nativeRange: get nativeRange from sc, so, ec, eo + return range_createClass(WrappedRange, [{ + key: "nativeRange", + value: function nativeRange() { + if (env.isW3CRangeSupport) { + var w3cRange = document.createRange(); + w3cRange.setStart(this.sc, this.so); + w3cRange.setEnd(this.ec, this.eo); + return w3cRange; + } else { + var textRange = pointToTextRange({ + node: this.sc, + offset: this.so + }); + textRange.setEndPoint('EndToEnd', pointToTextRange({ + node: this.ec, + offset: this.eo + })); + return textRange; + } + } + }, { + key: "getPoints", + value: function getPoints() { + return { + sc: this.sc, + so: this.so, + ec: this.ec, + eo: this.eo + }; + } + }, { + key: "getStartPoint", + value: function getStartPoint() { + return { + node: this.sc, + offset: this.so + }; + } + }, { + key: "getEndPoint", + value: function getEndPoint() { + return { + node: this.ec, + offset: this.eo + }; + } + + /** + * select update visible range + */ + }, { + key: "select", + value: function select() { + var nativeRng = this.nativeRange(); + if (env.isW3CRangeSupport) { + var selection = document.getSelection(); + if (selection.rangeCount > 0) { + selection.removeAllRanges(); + } + selection.addRange(nativeRng); + } else { + nativeRng.select(); + } + return this; + } + + /** + * Moves the scrollbar to start container(sc) of current range + * + * @return {WrappedRange} + */ + }, { + key: "scrollIntoView", + value: function scrollIntoView(container) { + var height = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(container).height(); + if (container.scrollTop + height < this.sc.offsetTop) { + container.scrollTop += Math.abs(container.scrollTop + height - this.sc.offsetTop); + } + return this; + } + + /** + * @return {WrappedRange} + */ + }, { + key: "normalize", + value: function normalize() { + /** + * @param {BoundaryPoint} point + * @param {Boolean} isLeftToRight - true: prefer to choose right node + * - false: prefer to choose left node + * @return {BoundaryPoint} + */ + var getVisiblePoint = function getVisiblePoint(point, isLeftToRight) { + if (!point) { + return point; + } + + // Just use the given point [XXX:Adhoc] + // - case 01. if the point is on the middle of the node + // - case 02. if the point is on the right edge and prefer to choose left node + // - case 03. if the point is on the left edge and prefer to choose right node + // - case 04. if the point is on the right edge and prefer to choose right node but the node is void + // - case 05. if the point is on the left edge and prefer to choose left node but the node is void + // - case 06. if the point is on the block node and there is no children + if (dom.isVisiblePoint(point)) { + if (!dom.isEdgePoint(point) || dom.isRightEdgePoint(point) && !isLeftToRight || dom.isLeftEdgePoint(point) && isLeftToRight || dom.isRightEdgePoint(point) && isLeftToRight && dom.isVoid(point.node.nextSibling) || dom.isLeftEdgePoint(point) && !isLeftToRight && dom.isVoid(point.node.previousSibling) || dom.isBlock(point.node) && dom.isEmpty(point.node)) { + return point; + } + } + + // point on block's edge + var block = dom.ancestor(point.node, dom.isBlock); + var hasRightNode = false; + if (!hasRightNode) { + var prevPoint = dom.prevPoint(point) || { + node: null + }; + hasRightNode = (dom.isLeftEdgePointOf(point, block) || dom.isVoid(prevPoint.node)) && !isLeftToRight; + } + var hasLeftNode = false; + if (!hasLeftNode) { + var _nextPoint = dom.nextPoint(point) || { + node: null + }; + hasLeftNode = (dom.isRightEdgePointOf(point, block) || dom.isVoid(_nextPoint.node)) && isLeftToRight; + } + if (hasRightNode || hasLeftNode) { + // returns point already on visible point + if (dom.isVisiblePoint(point)) { + return point; + } + // reverse direction + isLeftToRight = !isLeftToRight; + } + var nextPoint = isLeftToRight ? dom.nextPointUntil(dom.nextPoint(point), dom.isVisiblePoint) : dom.prevPointUntil(dom.prevPoint(point), dom.isVisiblePoint); + return nextPoint || point; + }; + var endPoint = getVisiblePoint(this.getEndPoint(), false); + var startPoint = this.isCollapsed() ? endPoint : getVisiblePoint(this.getStartPoint(), true); + return new WrappedRange(startPoint.node, startPoint.offset, endPoint.node, endPoint.offset); + } + + /** + * returns matched nodes on range + * + * @param {Function} [pred] - predicate function + * @param {Object} [options] + * @param {Boolean} [options.includeAncestor] + * @param {Boolean} [options.fullyContains] + * @return {Node[]} + */ + }, { + key: "nodes", + value: function nodes(pred, options) { + pred = pred || func.ok; + var includeAncestor = options && options.includeAncestor; + var fullyContains = options && options.fullyContains; + + // TODO compare points and sort + var startPoint = this.getStartPoint(); + var endPoint = this.getEndPoint(); + var nodes = []; + var leftEdgeNodes = []; + dom.walkPoint(startPoint, endPoint, function (point) { + if (dom.isEditable(point.node)) { + return; + } + var node; + if (fullyContains) { + if (dom.isLeftEdgePoint(point)) { + leftEdgeNodes.push(point.node); + } + if (dom.isRightEdgePoint(point) && lists.contains(leftEdgeNodes, point.node)) { + node = point.node; + } + } else if (includeAncestor) { + node = dom.ancestor(point.node, pred); + } else { + node = point.node; + } + if (node && pred(node)) { + nodes.push(node); + } + }, true); + return lists.unique(nodes); + } + + /** + * returns commonAncestor of range + * @return {Element} - commonAncestor + */ + }, { + key: "commonAncestor", + value: function commonAncestor() { + return dom.commonAncestor(this.sc, this.ec); + } + + /** + * returns expanded range by pred + * + * @param {Function} pred - predicate function + * @return {WrappedRange} + */ + }, { + key: "expand", + value: function expand(pred) { + var startAncestor = dom.ancestor(this.sc, pred); + var endAncestor = dom.ancestor(this.ec, pred); + if (!startAncestor && !endAncestor) { + return new WrappedRange(this.sc, this.so, this.ec, this.eo); + } + var boundaryPoints = this.getPoints(); + if (startAncestor) { + boundaryPoints.sc = startAncestor; + boundaryPoints.so = 0; + } + if (endAncestor) { + boundaryPoints.ec = endAncestor; + boundaryPoints.eo = dom.nodeLength(endAncestor); + } + return new WrappedRange(boundaryPoints.sc, boundaryPoints.so, boundaryPoints.ec, boundaryPoints.eo); + } + + /** + * @param {Boolean} isCollapseToStart + * @return {WrappedRange} + */ + }, { + key: "collapse", + value: function collapse(isCollapseToStart) { + if (isCollapseToStart) { + return new WrappedRange(this.sc, this.so, this.sc, this.so); + } else { + return new WrappedRange(this.ec, this.eo, this.ec, this.eo); + } + } + + /** + * splitText on range + */ + }, { + key: "splitText", + value: function splitText() { + var isSameContainer = this.sc === this.ec; + var boundaryPoints = this.getPoints(); + if (dom.isText(this.ec) && !dom.isEdgePoint(this.getEndPoint())) { + this.ec.splitText(this.eo); + } + if (dom.isText(this.sc) && !dom.isEdgePoint(this.getStartPoint())) { + boundaryPoints.sc = this.sc.splitText(this.so); + boundaryPoints.so = 0; + if (isSameContainer) { + boundaryPoints.ec = boundaryPoints.sc; + boundaryPoints.eo = this.eo - this.so; + } + } + return new WrappedRange(boundaryPoints.sc, boundaryPoints.so, boundaryPoints.ec, boundaryPoints.eo); + } + + /** + * delete contents on range + * @return {WrappedRange} + */ + }, { + key: "deleteContents", + value: function deleteContents() { + if (this.isCollapsed()) { + return this; + } + var rng = this.splitText(); + var nodes = rng.nodes(null, { + fullyContains: true + }); + + // find new cursor point + var point = dom.prevPointUntil(rng.getStartPoint(), function (point) { + return !lists.contains(nodes, point.node); + }); + var emptyParents = []; + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(nodes, function (idx, node) { + // find empty parents + var parent = node.parentNode; + if (point.node !== parent && dom.nodeLength(parent) === 1) { + emptyParents.push(parent); + } + dom.remove(node, false); + }); + + // remove empty parents + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(emptyParents, function (idx, node) { + dom.remove(node, false); + }); + return new WrappedRange(point.node, point.offset, point.node, point.offset).normalize(); + } + + /** + * makeIsOn: return isOn(pred) function + */ + }, { + key: "makeIsOn", + value: function makeIsOn(pred) { + return function () { + var ancestor = dom.ancestor(this.sc, pred); + return !!ancestor && ancestor === dom.ancestor(this.ec, pred); + }; + } + + /** + * @param {Function} pred + * @return {Boolean} + */ + }, { + key: "isLeftEdgeOf", + value: function isLeftEdgeOf(pred) { + if (!dom.isLeftEdgePoint(this.getStartPoint())) { + return false; + } + var node = dom.ancestor(this.sc, pred); + return node && dom.isLeftEdgeOf(this.sc, node); + } + + /** + * returns whether range was collapsed or not + */ + }, { + key: "isCollapsed", + value: function isCollapsed() { + return this.sc === this.ec && this.so === this.eo; + } + + /** + * wrap inline nodes which children of body with paragraph + * + * @return {WrappedRange} + */ + }, { + key: "wrapBodyInlineWithPara", + value: function wrapBodyInlineWithPara() { + if (dom.isBodyContainer(this.sc) && dom.isEmpty(this.sc)) { + this.sc.innerHTML = dom.emptyPara; + return new WrappedRange(this.sc.firstChild, 0, this.sc.firstChild, 0); + } + + /** + * [workaround] firefox often create range on not visible point. so normalize here. + * - firefox: |

text

| + * - chrome:

|text|

+ */ + var rng = this.normalize(); + if (dom.isParaInline(this.sc) || dom.isPara(this.sc)) { + return rng; + } + + // find inline top ancestor + var topAncestor; + if (dom.isInline(rng.sc)) { + var ancestors = dom.listAncestor(rng.sc, func.not(dom.isInline)); + topAncestor = lists.last(ancestors); + if (!dom.isInline(topAncestor)) { + topAncestor = ancestors[ancestors.length - 2] || rng.sc.childNodes[rng.so]; + } + } else { + topAncestor = rng.sc.childNodes[rng.so > 0 ? rng.so - 1 : 0]; + } + if (topAncestor) { + // siblings not in paragraph + var inlineSiblings = dom.listPrev(topAncestor, dom.isParaInline).reverse(); + inlineSiblings = inlineSiblings.concat(dom.listNext(topAncestor.nextSibling, dom.isParaInline)); + + // wrap with paragraph + if (inlineSiblings.length) { + var para = dom.wrap(lists.head(inlineSiblings), 'p'); + dom.appendChildNodes(para, lists.tail(inlineSiblings)); + } + } + return this.normalize(); + } + + /** + * insert node at current cursor + * + * @param {Node} node + * @param {Boolean} doNotInsertPara - default is false, removes added

that's added if true + * @return {Node} + */ + }, { + key: "insertNode", + value: function insertNode(node) { + var doNotInsertPara = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var rng = this; + if (dom.isText(node) || dom.isInline(node)) { + rng = this.wrapBodyInlineWithPara().deleteContents(); + } + var info = dom.splitPoint(rng.getStartPoint(), dom.isInline(node)); + if (info.rightNode) { + info.rightNode.parentNode.insertBefore(node, info.rightNode); + if (dom.isEmpty(info.rightNode) && (doNotInsertPara || dom.isPara(node))) { + info.rightNode.parentNode.removeChild(info.rightNode); + } + } else { + info.container.appendChild(node); + } + return node; + } + + /** + * insert html at current cursor + */ + }, { + key: "pasteHTML", + value: function pasteHTML(markup) { + markup = ((markup || '') + '').trim(markup); + var contentsContainer = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()('

').html(markup)[0]; + var childNodes = lists.from(contentsContainer.childNodes); + + // const rng = this.wrapBodyInlineWithPara().deleteContents(); + var rng = this; + var reversed = false; + if (rng.so >= 0) { + childNodes = childNodes.reverse(); + reversed = true; + } + childNodes = childNodes.map(function (childNode) { + return rng.insertNode(childNode, !dom.isInline(childNode)); + }); + if (reversed) { + childNodes = childNodes.reverse(); + } + return childNodes; + } + + /** + * returns text in range + * + * @return {String} + */ + }, { + key: "toString", + value: function toString() { + var nativeRng = this.nativeRange(); + return env.isW3CRangeSupport ? nativeRng.toString() : nativeRng.text; + } + + /** + * returns range for word before cursor + * + * @param {Boolean} [findAfter] - find after cursor, default: false + * @return {WrappedRange} + */ + }, { + key: "getWordRange", + value: function getWordRange(findAfter) { + var endPoint = this.getEndPoint(); + if (!dom.isCharPoint(endPoint)) { + return this; + } + var startPoint = dom.prevPointUntil(endPoint, function (point) { + return !dom.isCharPoint(point); + }); + if (findAfter) { + endPoint = dom.nextPointUntil(endPoint, function (point) { + return !dom.isCharPoint(point); + }); + } + return new WrappedRange(startPoint.node, startPoint.offset, endPoint.node, endPoint.offset); + } + + /** + * returns range for words before cursor + * + * @param {Boolean} [findAfter] - find after cursor, default: false + * @return {WrappedRange} + */ + }, { + key: "getWordsRange", + value: function getWordsRange(findAfter) { + var endPoint = this.getEndPoint(); + var isNotTextPoint = function isNotTextPoint(point) { + return !dom.isCharPoint(point) && !dom.isSpacePoint(point); + }; + if (isNotTextPoint(endPoint)) { + return this; + } + var startPoint = dom.prevPointUntil(endPoint, isNotTextPoint); + if (findAfter) { + endPoint = dom.nextPointUntil(endPoint, isNotTextPoint); + } + return new WrappedRange(startPoint.node, startPoint.offset, endPoint.node, endPoint.offset); + } + + /** + * returns range for words before cursor that match with a Regex + * + * example: + * range: 'hi @Peter Pan' + * regex: '/@[a-z ]+/i' + * return range: '@Peter Pan' + * + * @param {RegExp} [regex] + * @return {WrappedRange|null} + */ + }, { + key: "getWordsMatchRange", + value: function getWordsMatchRange(regex) { + var endPoint = this.getEndPoint(); + var startPoint = dom.prevPointUntil(endPoint, function (point) { + if (!dom.isCharPoint(point) && !dom.isSpacePoint(point)) { + return true; + } + var rng = new WrappedRange(point.node, point.offset, endPoint.node, endPoint.offset); + var result = regex.exec(rng.toString()); + return result && result.index === 0; + }); + var rng = new WrappedRange(startPoint.node, startPoint.offset, endPoint.node, endPoint.offset); + var text = rng.toString(); + var result = regex.exec(text); + if (result && result[0].length === text.length) { + return rng; + } else { + return null; + } + } + + /** + * create offsetPath bookmark + * + * @param {Node} editable + */ + }, { + key: "bookmark", + value: function bookmark(editable) { + return { + s: { + path: dom.makeOffsetPath(editable, this.sc), + offset: this.so + }, + e: { + path: dom.makeOffsetPath(editable, this.ec), + offset: this.eo + } + }; + } + + /** + * create offsetPath bookmark base on paragraph + * + * @param {Node[]} paras + */ + }, { + key: "paraBookmark", + value: function paraBookmark(paras) { + return { + s: { + path: lists.tail(dom.makeOffsetPath(lists.head(paras), this.sc)), + offset: this.so + }, + e: { + path: lists.tail(dom.makeOffsetPath(lists.last(paras), this.ec)), + offset: this.eo + } + }; + } + + /** + * getClientRects + * @return {Rect[]} + */ + }, { + key: "getClientRects", + value: function getClientRects() { + var nativeRng = this.nativeRange(); + return nativeRng.getClientRects(); + } + }]); +}(); +/** + * Data structure + * * BoundaryPoint: a point of dom tree + * * BoundaryPoints: two boundaryPoints corresponding to the start and the end of the Range + * + * See to http://www.w3.org/TR/DOM-Level-2-Traversal-Range/ranges.html#Level-2-Range-Position + */ +/* harmony default export */ const range = ({ + /** + * create Range Object From arguments or Browser Selection + * + * @param {Node} sc - start container + * @param {Number} so - start offset + * @param {Node} ec - end container + * @param {Number} eo - end offset + * @return {WrappedRange} + */ + create: function create(sc, so, ec, eo) { + if (arguments.length === 4) { + return new WrappedRange(sc, so, ec, eo); + } else if (arguments.length === 2) { + // collapsed + ec = sc; + eo = so; + return new WrappedRange(sc, so, ec, eo); + } else { + var wrappedRange = this.createFromSelection(); + if (!wrappedRange && arguments.length === 1) { + var bodyElement = arguments[0]; + if (dom.isEditable(bodyElement)) { + bodyElement = bodyElement.lastChild; + } + return this.createFromBodyElement(bodyElement, dom.emptyPara === arguments[0].innerHTML); + } + return wrappedRange; + } + }, + createFromBodyElement: function createFromBodyElement(bodyElement) { + var isCollapseToStart = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; + var wrappedRange = this.createFromNode(bodyElement); + return wrappedRange.collapse(isCollapseToStart); + }, + createFromSelection: function createFromSelection() { + var sc, so, ec, eo; + if (env.isW3CRangeSupport) { + var selection = document.getSelection(); + if (!selection || selection.rangeCount === 0) { + return null; + } else if (dom.isBody(selection.anchorNode)) { + // Firefox: returns entire body as range on initialization. + // We won't never need it. + return null; + } + var nativeRng = selection.getRangeAt(0); + sc = nativeRng.startContainer; + so = nativeRng.startOffset; + ec = nativeRng.endContainer; + eo = nativeRng.endOffset; + } else { + // IE8: TextRange + var textRange = document.selection.createRange(); + var textRangeEnd = textRange.duplicate(); + textRangeEnd.collapse(false); + var textRangeStart = textRange; + textRangeStart.collapse(true); + var startPoint = textRangeToPoint(textRangeStart, true); + var endPoint = textRangeToPoint(textRangeEnd, false); + + // same visible point case: range was collapsed. + if (dom.isText(startPoint.node) && dom.isLeftEdgePoint(startPoint) && dom.isTextNode(endPoint.node) && dom.isRightEdgePoint(endPoint) && endPoint.node.nextSibling === startPoint.node) { + startPoint = endPoint; + } + sc = startPoint.cont; + so = startPoint.offset; + ec = endPoint.cont; + eo = endPoint.offset; + } + return new WrappedRange(sc, so, ec, eo); + }, + /** + * @method + * + * create WrappedRange from node + * + * @param {Node} node + * @return {WrappedRange} + */ + createFromNode: function createFromNode(node) { + var sc = node; + var so = 0; + var ec = node; + var eo = dom.nodeLength(ec); + + // browsers can't target a picture or void node + if (dom.isVoid(sc)) { + so = dom.listPrev(sc).length - 1; + sc = sc.parentNode; + } + if (dom.isBR(ec)) { + eo = dom.listPrev(ec).length - 1; + ec = ec.parentNode; + } else if (dom.isVoid(ec)) { + eo = dom.listPrev(ec).length; + ec = ec.parentNode; + } + return this.create(sc, so, ec, eo); + }, + /** + * create WrappedRange from node after position + * + * @param {Node} node + * @return {WrappedRange} + */ + createFromNodeBefore: function createFromNodeBefore(node) { + return this.createFromNode(node).collapse(true); + }, + /** + * create WrappedRange from node after position + * + * @param {Node} node + * @return {WrappedRange} + */ + createFromNodeAfter: function createFromNodeAfter(node) { + return this.createFromNode(node).collapse(); + }, + /** + * @method + * + * create WrappedRange from bookmark + * + * @param {Node} editable + * @param {Object} bookmark + * @return {WrappedRange} + */ + createFromBookmark: function createFromBookmark(editable, bookmark) { + var sc = dom.fromOffsetPath(editable, bookmark.s.path); + var so = bookmark.s.offset; + var ec = dom.fromOffsetPath(editable, bookmark.e.path); + var eo = bookmark.e.offset; + return new WrappedRange(sc, so, ec, eo); + }, + /** + * @method + * + * create WrappedRange from paraBookmark + * + * @param {Object} bookmark + * @param {Node[]} paras + * @return {WrappedRange} + */ + createFromParaBookmark: function createFromParaBookmark(bookmark, paras) { + var so = bookmark.s.offset; + var eo = bookmark.e.offset; + var sc = dom.fromOffsetPath(lists.head(paras), bookmark.s.path); + var ec = dom.fromOffsetPath(lists.last(paras), bookmark.e.path); + return new WrappedRange(sc, so, ec, eo); + } +}); +;// CONCATENATED MODULE: ./src/js/core/key.js + + +var KEY_MAP = { + 'BACKSPACE': 8, + 'TAB': 9, + 'ENTER': 13, + 'ESCAPE': 27, + 'SPACE': 32, + 'DELETE': 46, + // Arrow + 'LEFT': 37, + 'UP': 38, + 'RIGHT': 39, + 'DOWN': 40, + // Number: 0-9 + 'NUM0': 48, + 'NUM1': 49, + 'NUM2': 50, + 'NUM3': 51, + 'NUM4': 52, + 'NUM5': 53, + 'NUM6': 54, + 'NUM7': 55, + 'NUM8': 56, + // Alphabet: a-z + 'B': 66, + 'E': 69, + 'I': 73, + 'J': 74, + 'K': 75, + 'L': 76, + 'R': 82, + 'S': 83, + 'U': 85, + 'V': 86, + 'Y': 89, + 'Z': 90, + 'SLASH': 191, + 'LEFTBRACKET': 219, + 'BACKSLASH': 220, + 'RIGHTBRACKET': 221, + // Navigation + 'HOME': 36, + 'END': 35, + 'PAGEUP': 33, + 'PAGEDOWN': 34 +}; + +/** + * @class core.key + * + * Object for keycodes. + * + * @singleton + * @alternateClassName key + */ +/* harmony default export */ const key = ({ + /** + * @method isEdit + * + * @param {Number} keyCode + * @return {Boolean} + */ + isEdit: function isEdit(keyCode) { + return lists.contains([KEY_MAP.BACKSPACE, KEY_MAP.TAB, KEY_MAP.ENTER, KEY_MAP.SPACE, KEY_MAP.DELETE], keyCode); + }, + /** + * @method isRemove + * + * @param {Number} keyCode + * @return {Boolean} + */ + isRemove: function isRemove(keyCode) { + // LB + return lists.contains([KEY_MAP.BACKSPACE, KEY_MAP.DELETE], keyCode); + }, + /** + * @method isMove + * + * @param {Number} keyCode + * @return {Boolean} + */ + isMove: function isMove(keyCode) { + return lists.contains([KEY_MAP.LEFT, KEY_MAP.UP, KEY_MAP.RIGHT, KEY_MAP.DOWN], keyCode); + }, + /** + * @method isNavigation + * + * @param {Number} keyCode + * @return {Boolean} + */ + isNavigation: function isNavigation(keyCode) { + return lists.contains([KEY_MAP.HOME, KEY_MAP.END, KEY_MAP.PAGEUP, KEY_MAP.PAGEDOWN], keyCode); + }, + /** + * @property {Object} nameFromCode + * @property {String} nameFromCode.8 "BACKSPACE" + */ + nameFromCode: func.invertObject(KEY_MAP), + code: KEY_MAP +}); +;// CONCATENATED MODULE: ./src/js/core/async.js + + +/** + * @method readFileAsDataURL + * + * read contents of file as representing URL + * + * @param {File} file + * @return {Promise} - then: dataUrl + */ +function readFileAsDataURL(file) { + return external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().Deferred(function (deferred) { + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend(new FileReader(), { + onload: function onload(event) { + var dataURL = event.target.result; + deferred.resolve(dataURL); + }, + onerror: function onerror(err) { + deferred.reject(err); + } + }).readAsDataURL(file); + }).promise(); +} + +/** + * @method createImage + * + * create `` from url string + * + * @param {String} url + * @return {Promise} - then: $image + */ +function createImage(url) { + return external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().Deferred(function (deferred) { + var $img = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(''); + $img.one('load', function () { + $img.off('error abort'); + deferred.resolve($img); + }).one('error abort', function () { + $img.off('load').detach(); + deferred.reject($img); + }).css({ + display: 'none' + }).appendTo(document.body).attr('src', url); + }).promise(); +} +;// CONCATENATED MODULE: ./src/js/editing/History.js +function History_typeof(o) { "@babel/helpers - typeof"; return History_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, History_typeof(o); } +function History_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function History_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, History_toPropertyKey(o.key), o); } } +function History_createClass(e, r, t) { return r && History_defineProperties(e.prototype, r), t && History_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function History_toPropertyKey(t) { var i = History_toPrimitive(t, "string"); return "symbol" == History_typeof(i) ? i : i + ""; } +function History_toPrimitive(t, r) { if ("object" != History_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != History_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } + +var History = /*#__PURE__*/function () { + function History(context) { + History_classCallCheck(this, History); + this.stack = []; + this.stackOffset = -1; + this.context = context; + this.$editable = context.layoutInfo.editable; + this.editable = this.$editable[0]; + } + return History_createClass(History, [{ + key: "makeSnapshot", + value: function makeSnapshot() { + var rng = range.create(this.editable); + var emptyBookmark = { + s: { + path: [], + offset: 0 + }, + e: { + path: [], + offset: 0 + } + }; + return { + contents: this.$editable.html(), + bookmark: rng && rng.isOnEditable() ? rng.bookmark(this.editable) : emptyBookmark + }; + } + }, { + key: "applySnapshot", + value: function applySnapshot(snapshot) { + if (snapshot.contents !== null) { + this.$editable.html(snapshot.contents); + } + if (snapshot.bookmark !== null) { + range.createFromBookmark(this.editable, snapshot.bookmark).select(); + } + } + + /** + * @method rewind + * Rewinds the history stack back to the first snapshot taken. + * Leaves the stack intact, so that "Redo" can still be used. + */ + }, { + key: "rewind", + value: function rewind() { + // Create snap shot if not yet recorded + if (this.$editable.html() !== this.stack[this.stackOffset].contents) { + this.recordUndo(); + } + + // Return to the first available snapshot. + this.stackOffset = 0; + + // Apply that snapshot. + this.applySnapshot(this.stack[this.stackOffset]); + } + + /** + * @method commit + * Resets history stack, but keeps current editor's content. + */ + }, { + key: "commit", + value: function commit() { + // Clear the stack. + this.stack = []; + + // Restore stackOffset to its original value. + this.stackOffset = -1; + + // Record our first snapshot (of nothing). + this.recordUndo(); + } + + /** + * @method reset + * Resets the history stack completely; reverting to an empty editor. + */ + }, { + key: "reset", + value: function reset() { + // Clear the stack. + this.stack = []; + + // Restore stackOffset to its original value. + this.stackOffset = -1; + + // Clear the editable area. + this.$editable.html(''); + + // Record our first snapshot (of nothing). + this.recordUndo(); + } + + /** + * undo + */ + }, { + key: "undo", + value: function undo() { + // Create snap shot if not yet recorded + if (this.$editable.html() !== this.stack[this.stackOffset].contents) { + this.recordUndo(); + } + if (this.stackOffset > 0) { + this.stackOffset--; + this.applySnapshot(this.stack[this.stackOffset]); + } + } + + /** + * redo + */ + }, { + key: "redo", + value: function redo() { + if (this.stack.length - 1 > this.stackOffset) { + this.stackOffset++; + this.applySnapshot(this.stack[this.stackOffset]); + } + } + + /** + * recorded undo + */ + }, { + key: "recordUndo", + value: function recordUndo() { + this.stackOffset++; + + // Wash out stack after stackOffset + if (this.stack.length > this.stackOffset) { + this.stack = this.stack.slice(0, this.stackOffset); + } + + // Create new snapshot and push it to the end + this.stack.push(this.makeSnapshot()); + + // If the stack size reachs to the limit, then slice it + if (this.stack.length > this.context.options.historyLimit) { + this.stack.shift(); + this.stackOffset -= 1; + } + } + }]); +}(); + +;// CONCATENATED MODULE: ./src/js/editing/Style.js +function Style_typeof(o) { "@babel/helpers - typeof"; return Style_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, Style_typeof(o); } +function Style_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function Style_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, Style_toPropertyKey(o.key), o); } } +function Style_createClass(e, r, t) { return r && Style_defineProperties(e.prototype, r), t && Style_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function Style_toPropertyKey(t) { var i = Style_toPrimitive(t, "string"); return "symbol" == Style_typeof(i) ? i : i + ""; } +function Style_toPrimitive(t, r) { if ("object" != Style_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != Style_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } + + + + +var Style = /*#__PURE__*/function () { + function Style() { + Style_classCallCheck(this, Style); + } + return Style_createClass(Style, [{ + key: "jQueryCSS", + value: + /** + * @method jQueryCSS + * + * [workaround] for old jQuery + * passing an array of style properties to .css() + * will result in an object of property-value pairs. + * (compability with version < 1.9) + * + * @private + * @param {jQuery} $obj + * @param {Array} propertyNames - An array of one or more CSS properties. + * @return {Object} + */ + function jQueryCSS($obj, propertyNames) { + var result = {}; + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(propertyNames, function (idx, propertyName) { + result[propertyName] = $obj.css(propertyName); + }); + return result; + } + + /** + * returns style object from node + * + * @param {jQuery} $node + * @return {Object} + */ + }, { + key: "fromNode", + value: function fromNode($node) { + var properties = ['font-family', 'font-size', 'text-align', 'list-style-type', 'line-height']; + var styleInfo = this.jQueryCSS($node, properties) || {}; + var fontSize = $node[0].style.fontSize || styleInfo['font-size']; + styleInfo['font-size'] = parseInt(fontSize, 10); + styleInfo['font-size-unit'] = fontSize.match(/[a-z%]+$/); + return styleInfo; + } + + /** + * paragraph level style + * + * @param {WrappedRange} rng + * @param {Object} styleInfo + */ + }, { + key: "stylePara", + value: function stylePara(rng, styleInfo) { + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(rng.nodes(dom.isPara, { + includeAncestor: true + }), function (idx, para) { + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(para).css(styleInfo); + }); + } + + /** + * insert and returns styleNodes on range. + * + * @param {WrappedRange} rng + * @param {Object} [options] - options for styleNodes + * @param {String} [options.nodeName] - default: `SPAN` + * @param {Boolean} [options.expandClosestSibling] - default: `false` + * @param {Boolean} [options.onlyPartialContains] - default: `false` + * @return {Node[]} + */ + }, { + key: "styleNodes", + value: function styleNodes(rng, options) { + rng = rng.splitText(); + var nodeName = options && options.nodeName || 'SPAN'; + var expandClosestSibling = !!(options && options.expandClosestSibling); + var onlyPartialContains = !!(options && options.onlyPartialContains); + if (rng.isCollapsed()) { + return [rng.insertNode(dom.create(nodeName))]; + } + var pred = dom.makePredByNodeName(nodeName); + var nodes = rng.nodes(dom.isText, { + fullyContains: true + }).map(function (text) { + return dom.singleChildAncestor(text, pred) || dom.wrap(text, nodeName); + }); + if (expandClosestSibling) { + if (onlyPartialContains) { + var nodesInRange = rng.nodes(); + // compose with partial contains predication + pred = func.and(pred, function (node) { + return lists.contains(nodesInRange, node); + }); + } + return nodes.map(function (node) { + var siblings = dom.withClosestSiblings(node, pred); + var head = lists.head(siblings); + var tails = lists.tail(siblings); + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(tails, function (idx, elem) { + dom.appendChildNodes(head, elem.childNodes); + dom.remove(elem); + }); + return lists.head(siblings); + }); + } else { + return nodes; + } + } + + /** + * get current style on cursor + * + * @param {WrappedRange} rng + * @return {Object} - object contains style properties. + */ + }, { + key: "current", + value: function current(rng) { + var $cont = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(!dom.isElement(rng.sc) ? rng.sc.parentNode : rng.sc); + var styleInfo = this.fromNode($cont); + + // document.queryCommandState for toggle state + // [workaround] prevent Firefox nsresult: "0x80004005 (NS_ERROR_FAILURE)" + try { + styleInfo = external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().extend(styleInfo, { + 'font-bold': document.queryCommandState('bold') ? 'bold' : 'normal', + 'font-italic': document.queryCommandState('italic') ? 'italic' : 'normal', + 'font-underline': document.queryCommandState('underline') ? 'underline' : 'normal', + 'font-subscript': document.queryCommandState('subscript') ? 'subscript' : 'normal', + 'font-superscript': document.queryCommandState('superscript') ? 'superscript' : 'normal', + 'font-strikethrough': document.queryCommandState('strikethrough') ? 'strikethrough' : 'normal', + 'font-family': document.queryCommandValue('fontname') || styleInfo['font-family'] + }); + } catch (e) { + // eslint-disable-next-line + } + + // list-style-type to list-style(unordered, ordered) + if (!rng.isOnList()) { + styleInfo['list-style'] = 'none'; + } else { + var orderedTypes = ['circle', 'disc', 'disc-leading-zero', 'square']; + var isUnordered = orderedTypes.indexOf(styleInfo['list-style-type']) > -1; + styleInfo['list-style'] = isUnordered ? 'unordered' : 'ordered'; + } + var para = dom.ancestor(rng.sc, dom.isPara); + if (para && para.style['line-height']) { + styleInfo['line-height'] = para.style.lineHeight; + } else { + var lineHeight = parseInt(styleInfo['line-height'], 10) / parseInt(styleInfo['font-size'], 10); + styleInfo['line-height'] = lineHeight.toFixed(1); + } + styleInfo.anchor = rng.isOnAnchor() && dom.ancestor(rng.sc, dom.isAnchor); + styleInfo.ancestors = dom.listAncestor(rng.sc, dom.isEditable); + styleInfo.range = rng; + return styleInfo; + } + }]); +}(); + +;// CONCATENATED MODULE: ./src/js/editing/Bullet.js +function Bullet_typeof(o) { "@babel/helpers - typeof"; return Bullet_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, Bullet_typeof(o); } +function Bullet_classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } +function Bullet_defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, Bullet_toPropertyKey(o.key), o); } } +function Bullet_createClass(e, r, t) { return r && Bullet_defineProperties(e.prototype, r), t && Bullet_defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } +function Bullet_toPropertyKey(t) { var i = Bullet_toPrimitive(t, "string"); return "symbol" == Bullet_typeof(i) ? i : i + ""; } +function Bullet_toPrimitive(t, r) { if ("object" != Bullet_typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != Bullet_typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } + + + + + +var Bullet = /*#__PURE__*/function () { + function Bullet() { + Bullet_classCallCheck(this, Bullet); + } + return Bullet_createClass(Bullet, [{ + key: "insertOrderedList", + value: + /** + * toggle ordered list + */ + function insertOrderedList(editable) { + this.toggleList('OL', editable); + } + + /** + * toggle unordered list + */ + }, { + key: "insertUnorderedList", + value: function insertUnorderedList(editable) { + this.toggleList('UL', editable); + } + + /** + * indent + */ + }, { + key: "indent", + value: function indent(editable) { + var _this = this; + var rng = range.create(editable).wrapBodyInlineWithPara(); + var paras = rng.nodes(dom.isPara, { + includeAncestor: true + }); + var clustereds = lists.clusterBy(paras, func.peq2('parentNode')); + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(clustereds, function (idx, paras) { + var head = lists.head(paras); + if (dom.isLi(head)) { + var previousList = _this.findList(head.previousSibling); + if (previousList) { + paras.map(function (para) { + return previousList.appendChild(para); + }); + } else { + _this.wrapList(paras, head.parentNode.nodeName); + paras.map(function (para) { + return para.parentNode; + }).map(function (para) { + return _this.appendToPrevious(para); + }); + } + } else { + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(paras, function (idx, para) { + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(para).css('marginLeft', function (idx, val) { + return (parseInt(val, 10) || 0) + 25; + }); + }); + } + }); + rng.select(); + } + + /** + * outdent + */ + }, { + key: "outdent", + value: function outdent(editable) { + var _this2 = this; + var rng = range.create(editable).wrapBodyInlineWithPara(); + var paras = rng.nodes(dom.isPara, { + includeAncestor: true + }); + var clustereds = lists.clusterBy(paras, func.peq2('parentNode')); + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(clustereds, function (idx, paras) { + var head = lists.head(paras); + if (dom.isLi(head)) { + _this2.releaseList([paras]); + } else { + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(paras, function (idx, para) { + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default()(para).css('marginLeft', function (idx, val) { + val = parseInt(val, 10) || 0; + return val > 25 ? val - 25 : ''; + }); + }); + } + }); + rng.select(); + } + + /** + * toggle list + * + * @param {String} listName - OL or UL + */ + }, { + key: "toggleList", + value: function toggleList(listName, editable) { + var _this3 = this; + var rng = range.create(editable).wrapBodyInlineWithPara(); + var paras = rng.nodes(dom.isPara, { + includeAncestor: true + }); + var bookmark = rng.paraBookmark(paras); + var clustereds = lists.clusterBy(paras, func.peq2('parentNode')); + + // paragraph to list + if (lists.find(paras, dom.isPurePara)) { + var wrappedParas = []; + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(clustereds, function (idx, paras) { + wrappedParas = wrappedParas.concat(_this3.wrapList(paras, listName)); + }); + paras = wrappedParas; + // list to paragraph or change list style + } else { + var diffLists = rng.nodes(dom.isList, { + includeAncestor: true + }).filter(function (listNode) { + return !external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().nodeName(listNode, listName); + }); + if (diffLists.length) { + external_root_jQuery_commonjs_jquery_commonjs2_jquery_amd_jquery_default().each(diffLists, function (idx, listNode) { + dom.replace(listNode, listName); + }); + } else { + paras = this.releaseList(clustereds, true); + } + } + range.createFromParaBookmark(bookmark, paras).select(); + } + + /** + * @param {Node[]} paras + * @param {String} listName + * @return {Node[]} + */ + }, { + key: "wrapList", + value: function wrapList(paras, listName) { + var head = lists.head(paras); + var last = lists.last(paras); + var prevList = dom.isList(head.previousSibling) && head.previousSibling; + var nextList = dom.isList(last.nextSibling) && last.nextSibling; + var listNode = prevList || dom.insertAfter(dom.create(listName || 'UL'), last); + + // P to LI + paras = paras.map(function (para) { + return dom.isPurePara(para) ? dom.replace(para, 'LI') : para; + }); + + // append to list(