jodit 4.2.25 → 4.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/.nvmrc +1 -1
  2. package/CHANGELOG.md +119 -5
  3. package/es2015/jodit.css +14 -2
  4. package/es2015/jodit.fat.min.css +1 -1
  5. package/es2015/jodit.fat.min.js +2 -2
  6. package/es2015/jodit.js +422 -284
  7. package/es2015/jodit.min.css +1 -1
  8. package/es2015/jodit.min.js +2 -2
  9. package/es2015/plugins/debug/debug.js +1 -1
  10. package/es2015/plugins/debug/debug.min.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  12. package/es2015/plugins/speech-recognize/speech-recognize.js +25 -18
  13. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  14. package/es2018/jodit.css +14 -2
  15. package/es2018/jodit.fat.min.css +1 -1
  16. package/es2018/jodit.fat.min.js +2 -2
  17. package/es2018/jodit.js +416 -278
  18. package/es2018/jodit.min.css +1 -1
  19. package/es2018/jodit.min.js +2 -2
  20. package/es2018/plugins/debug/debug.js +1 -1
  21. package/es2018/plugins/debug/debug.min.js +1 -1
  22. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  23. package/es2018/plugins/speech-recognize/speech-recognize.js +25 -18
  24. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  25. package/es2021/jodit.css +14 -2
  26. package/es2021/jodit.fat.min.css +1 -1
  27. package/es2021/jodit.fat.min.js +2 -2
  28. package/es2021/jodit.js +416 -278
  29. package/es2021/jodit.min.css +1 -1
  30. package/es2021/jodit.min.js +2 -2
  31. package/es2021/plugins/debug/debug.js +1 -1
  32. package/es2021/plugins/debug/debug.min.js +1 -1
  33. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021/plugins/speech-recognize/speech-recognize.js +25 -18
  35. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  36. package/es2021.en/jodit.css +14 -2
  37. package/es2021.en/jodit.fat.min.css +1 -1
  38. package/es2021.en/jodit.fat.min.js +2 -2
  39. package/es2021.en/jodit.js +391 -272
  40. package/es2021.en/jodit.min.css +1 -1
  41. package/es2021.en/jodit.min.js +2 -2
  42. package/es2021.en/plugins/debug/debug.js +1 -1
  43. package/es2021.en/plugins/debug/debug.min.js +1 -1
  44. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es2021.en/plugins/speech-recognize/speech-recognize.js +25 -18
  46. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  47. package/es5/164.fat.min.js +10 -0
  48. package/es5/164.js +4939 -0
  49. package/es5/164.min.js +10 -0
  50. package/es5/5.fat.min.js +10 -0
  51. package/es5/5.js +76 -0
  52. package/es5/5.min.js +10 -0
  53. package/es5/jodit.css +21 -6
  54. package/es5/jodit.fat.min.css +1 -1
  55. package/es5/jodit.fat.min.js +2 -2
  56. package/es5/jodit.js +817 -5709
  57. package/es5/jodit.min.css +3 -3
  58. package/es5/jodit.min.js +2 -2
  59. package/es5/plugins/debug/debug.js +1 -1
  60. package/es5/plugins/debug/debug.min.js +1 -1
  61. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  62. package/es5/plugins/speech-recognize/speech-recognize.js +26 -19
  63. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  64. package/esm/config.js +3 -7
  65. package/esm/core/async/async.js +2 -1
  66. package/esm/core/constants.d.ts +2 -0
  67. package/esm/core/constants.js +12 -8
  68. package/esm/core/decorators/watch/watch.js +0 -1
  69. package/esm/core/dom/dom.d.ts +2 -1
  70. package/esm/core/dom/dom.js +12 -6
  71. package/esm/core/event-emitter/event-emitter.js +3 -3
  72. package/esm/core/global.js +16 -3
  73. package/esm/core/helpers/array/to-array.d.ts +1 -6
  74. package/esm/core/helpers/array/to-array.js +1 -1
  75. package/esm/core/helpers/async/set-timeout.d.ts +0 -3
  76. package/esm/core/helpers/async/set-timeout.js +3 -2
  77. package/esm/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
  78. package/esm/core/helpers/checker/has-browser-color-picker.js +2 -1
  79. package/esm/core/helpers/checker/is-url.d.ts +0 -3
  80. package/esm/core/helpers/checker/is-url.js +2 -1
  81. package/esm/core/helpers/html/apply-styles.js +3 -3
  82. package/esm/core/helpers/html/clean-from-word.js +2 -1
  83. package/esm/core/helpers/html/htmlspecialchars.d.ts +0 -3
  84. package/esm/core/helpers/html/htmlspecialchars.js +2 -1
  85. package/esm/core/helpers/normalize/normalize-key-aliases.js +2 -1
  86. package/esm/core/helpers/normalize/normalize-size.d.ts +1 -1
  87. package/esm/core/helpers/size/get-scroll-parent.js +3 -2
  88. package/esm/core/helpers/utils/complete-url.js +2 -1
  89. package/esm/core/helpers/utils/convert-media-url-to-video-embed.js +2 -1
  90. package/esm/core/helpers/utils/default-language.js +3 -2
  91. package/esm/core/helpers/utils/reset.js +3 -3
  92. package/esm/core/request/ajax.js +2 -1
  93. package/esm/core/selection/selection.js +1 -0
  94. package/esm/core/selection/style/api/has-same-style.js +15 -10
  95. package/esm/core/selection/style/api/toggle-attributes.js +2 -1
  96. package/esm/core/selection/style/commit-style.d.ts +1 -1
  97. package/esm/core/ui/button/tooltip/tooltip.d.ts +1 -0
  98. package/esm/core/ui/button/tooltip/tooltip.js +11 -5
  99. package/esm/core/ui/form/inputs/file/file.d.ts +1 -0
  100. package/esm/core/ui/form/inputs/file/file.js +1 -0
  101. package/esm/core/ui/form/validators/input.d.ts +3 -3
  102. package/esm/core/ui/form/validators/select.d.ts +1 -1
  103. package/esm/jodit.js +3 -0
  104. package/esm/modules/file-browser/config.js +9 -1
  105. package/esm/modules/file-browser/data-provider.js +0 -1
  106. package/esm/modules/file-browser/file-browser.js +0 -1
  107. package/esm/modules/table/table.d.ts +2 -3
  108. package/esm/modules/table/table.js +27 -35
  109. package/esm/modules/toolbar/button/button.d.ts +1 -1
  110. package/esm/plugins/add-new-line/add-new-line.js +4 -1
  111. package/esm/plugins/backspace/cases/check-remove-char.js +1 -0
  112. package/esm/plugins/clean-html/config.d.ts +3 -3
  113. package/esm/plugins/clean-html/helpers/visitor/filters/fill-empty-paragraph.js +9 -1
  114. package/esm/plugins/hotkeys/hotkeys.js +4 -2
  115. package/esm/plugins/iframe/config.d.ts +15 -3
  116. package/esm/plugins/iframe/config.js +1 -0
  117. package/esm/plugins/iframe/iframe.js +3 -0
  118. package/esm/plugins/indent/helpers.d.ts +1 -1
  119. package/esm/plugins/inline-popup/config/items/a.d.ts +2 -2
  120. package/esm/plugins/inline-popup/config/items/cells.d.ts +1 -1
  121. package/esm/plugins/inline-popup/config/items/img.d.ts +1 -1
  122. package/esm/plugins/search/config.js +2 -2
  123. package/esm/plugins/search/helpers/highlight-text-ranges.js +3 -1
  124. package/esm/plugins/select-cells/select-cells.js +1 -1
  125. package/esm/plugins/source/editor/engines/ace.d.ts +0 -1
  126. package/esm/plugins/speech-recognize/config.js +1 -1
  127. package/esm/plugins/speech-recognize/helpers/api.d.ts +1 -1
  128. package/esm/plugins/speech-recognize/helpers/api.js +5 -2
  129. package/esm/plugins/speech-recognize/helpers/sound.js +6 -4
  130. package/esm/plugins/stat/config.d.ts +1 -0
  131. package/esm/plugins/stat/config.js +1 -0
  132. package/esm/plugins/stat/stat.js +14 -3
  133. package/esm/plugins/symbols/langs/index.d.ts +2 -1
  134. package/esm/plugins/symbols/langs/index.js +2 -1
  135. package/esm/plugins/symbols/langs/ua.d.ts +1 -0
  136. package/esm/plugins/symbols/langs/ua.js +9 -0
  137. package/esm/plugins/table/config.js +19 -3
  138. package/esm/polyfills.d.ts +10 -0
  139. package/esm/polyfills.js +54 -0
  140. package/esm/tsconfig.json +1 -1
  141. package/package.json +1 -1
  142. package/types/core/constants.d.ts +2 -0
  143. package/types/core/dom/dom.d.ts +2 -1
  144. package/types/core/helpers/array/to-array.d.ts +1 -6
  145. package/types/core/helpers/async/set-timeout.d.ts +0 -3
  146. package/types/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
  147. package/types/core/helpers/checker/is-url.d.ts +0 -3
  148. package/types/core/helpers/html/htmlspecialchars.d.ts +0 -3
  149. package/types/core/helpers/normalize/normalize-size.d.ts +1 -1
  150. package/types/core/selection/style/commit-style.d.ts +1 -1
  151. package/types/core/ui/button/tooltip/tooltip.d.ts +1 -0
  152. package/types/core/ui/form/inputs/file/file.d.ts +1 -0
  153. package/types/core/ui/form/validators/input.d.ts +3 -3
  154. package/types/core/ui/form/validators/select.d.ts +1 -1
  155. package/types/modules/table/table.d.ts +2 -3
  156. package/types/modules/toolbar/button/button.d.ts +1 -1
  157. package/types/plugins/clean-html/config.d.ts +3 -3
  158. package/types/plugins/iframe/config.d.ts +15 -3
  159. package/types/plugins/indent/helpers.d.ts +1 -1
  160. package/types/plugins/inline-popup/config/items/a.d.ts +2 -2
  161. package/types/plugins/inline-popup/config/items/cells.d.ts +1 -1
  162. package/types/plugins/inline-popup/config/items/img.d.ts +1 -1
  163. package/types/plugins/source/editor/engines/ace.d.ts +0 -1
  164. package/types/plugins/speech-recognize/helpers/api.d.ts +1 -1
  165. package/types/plugins/stat/config.d.ts +1 -0
  166. package/types/plugins/symbols/langs/index.d.ts +2 -1
  167. package/types/plugins/symbols/langs/ua.d.ts +1 -0
  168. package/types/polyfills.d.ts +10 -0
  169. package/types/tsconfig.json +1 -1
package/es2015/jodit.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
3
3
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
4
- * Version: v4.2.25
4
+ * Version: v4.2.32
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -247,16 +247,12 @@ class Config {
247
247
  showPlaceholder: false
248
248
  }
249
249
  };
250
- this.ownerDocument = (typeof document !== 'undefined'
251
- ? document
252
- : null);
250
+ this.ownerDocument = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument;
253
251
  /**
254
252
  * Allows you to specify the window in which the editor will be created. Default - window
255
253
  * This is necessary if you are creating the editor inside an iframe but the code is running in the parent window
256
254
  */
257
- this.ownerWindow = (typeof window !== 'undefined'
258
- ? window
259
- : null);
255
+ this.ownerWindow = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow;
260
256
  /**
261
257
  * Shadow root if Jodit was created in it
262
258
  *
@@ -1030,16 +1026,16 @@ Config.prototype.controls = {};
1030
1026
  /* harmony export */ j: function() { return /* binding */ Async; }
1031
1027
  /* harmony export */ });
1032
1028
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
1033
- /* harmony import */ var jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59146);
1029
+ /* harmony import */ var jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89044);
1034
1030
  /* harmony import */ var jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(99951);
1035
1031
  /* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(69052);
1036
- /* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2461);
1032
+ /* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2461);
1037
1033
  /* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25376);
1038
1034
  /* harmony import */ var jodit_core_helpers_checker_is_promise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(92039);
1039
1035
  /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(98253);
1040
- /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(35642);
1041
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28712);
1042
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__);
1036
+ /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35642);
1037
+ /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28712);
1038
+ /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__);
1043
1039
  /* harmony import */ var jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21567);
1044
1040
  /*!
1045
1041
  * Jodit Editor (https://xdsoft.net/jodit/)
@@ -1089,17 +1085,18 @@ class Async {
1089
1085
  return 0;
1090
1086
  }
1091
1087
  let options = {};
1092
- if ((0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__/* .isVoid */ .R)(timeout)) {
1088
+ if ((0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(timeout)) {
1093
1089
  timeout = 0;
1094
1090
  }
1095
- if (!(0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__/* .isNumber */ .E)(timeout)) {
1091
+ if (!(0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_4__/* .isNumber */ .E)(timeout)) {
1096
1092
  options = timeout;
1097
1093
  timeout = options.timeout || 0;
1098
1094
  }
1099
1095
  if (options.label) {
1100
1096
  this.clearLabel(options.label);
1101
1097
  }
1102
- const timer = (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .setTimeout */ .w)(callback, timeout, ...args), key = options.label || timer;
1098
+ const timer = (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .setTimeout */ .w)(callback, timeout, ...args);
1099
+ const key = options.label || timer;
1103
1100
  this.timers.set(key, timer);
1104
1101
  this.__callbacks.set(key, callback);
1105
1102
  return timer;
@@ -1115,7 +1112,7 @@ class Async {
1115
1112
  }
1116
1113
  clearLabel(label) {
1117
1114
  if (label && this.timers.has(label)) {
1118
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(this.timers.get(label));
1115
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(this.timers.get(label));
1119
1116
  this.timers.delete(label);
1120
1117
  this.__callbacks.delete(label);
1121
1118
  }
@@ -1124,7 +1121,7 @@ class Async {
1124
1121
  if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__/* .isString */ .K)(timerOrLabel)) {
1125
1122
  return this.clearLabel(timerOrLabel);
1126
1123
  }
1127
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(timerOrLabel);
1124
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(timerOrLabel);
1128
1125
  this.timers.delete(timerOrLabel);
1129
1126
  this.__callbacks.delete(timerOrLabel);
1130
1127
  }
@@ -1166,7 +1163,7 @@ class Async {
1166
1163
  if (!timer && firstCallImmediately) {
1167
1164
  callFn(...args);
1168
1165
  }
1169
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(timer);
1166
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(timer);
1170
1167
  timer = this.setTimeout(() => callFn(...args), (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__/* .isFunction */ .T)(timeout) ? timeout() : timeout);
1171
1168
  this.timers.set(fn, timer);
1172
1169
  }
@@ -1320,7 +1317,7 @@ class Async {
1320
1317
  clear() {
1321
1318
  this.requestsIdle.forEach(key => this.cancelIdleCallback(key));
1322
1319
  this.requestsRaf.forEach(key => this.cancelAnimationFrame(key));
1323
- this.timers.forEach(key => (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(this.timers.get(key)));
1320
+ this.timers.forEach(key => (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(this.timers.get(key)));
1324
1321
  this.timers.clear();
1325
1322
  this.promisesRejections.forEach(reject => reject());
1326
1323
  this.promisesRejections.clear();
@@ -1729,6 +1726,8 @@ __webpack_require__.r(__webpack_exports__);
1729
1726
  /* harmony export */ TEXT_PLAIN: function() { return /* binding */ TEXT_PLAIN; },
1730
1727
  /* harmony export */ TEXT_RTF: function() { return /* binding */ TEXT_RTF; },
1731
1728
  /* harmony export */ TOKENS: function() { return /* binding */ TOKENS; },
1729
+ /* harmony export */ globalDocument: function() { return /* binding */ globalDocument; },
1730
+ /* harmony export */ globalWindow: function() { return /* binding */ globalWindow; },
1732
1731
  /* harmony export */ lang: function() { return /* binding */ lang; }
1733
1732
  /* harmony export */ });
1734
1733
  /*!
@@ -1736,7 +1735,7 @@ __webpack_require__.r(__webpack_exports__);
1736
1735
  * Released under MIT see LICENSE.txt in the project root for license information.
1737
1736
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1738
1737
  */
1739
- const APP_VERSION = "4.2.25";
1738
+ const APP_VERSION = "4.2.32";
1740
1739
  // prettier-ignore
1741
1740
  const ES = "es2015";
1742
1741
  const IS_ES_MODERN = true;
@@ -1755,6 +1754,10 @@ const INVISIBLE_SPACE_REG_EXP_START = () => /^[\uFEFF]+/g;
1755
1754
  const SPACE_REG_EXP = () => /[\s\n\t\r\uFEFF\u200b]+/g;
1756
1755
  const SPACE_REG_EXP_START = () => /^[\s\n\t\r\uFEFF\u200b]+/g;
1757
1756
  const SPACE_REG_EXP_END = () => /[\s\n\t\r\uFEFF\u200b]+$/g;
1757
+ const globalWindow = typeof window !== 'undefined' ? window : undefined;
1758
+ const globalDocument = typeof document !== 'undefined'
1759
+ ? document
1760
+ : undefined;
1758
1761
  const IS_BLOCK = /^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i;
1759
1762
  const IS_INLINE = /^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i;
1760
1763
  const LIST_TAGS = new Set(['ul', 'ol']);
@@ -1879,8 +1882,8 @@ const INSERT_AS_TEXT = 'insert_as_text';
1879
1882
  */
1880
1883
  const INSERT_ONLY_TEXT = 'insert_only_text';
1881
1884
  const SAFE_COUNT_CHANGE_CALL = 10;
1882
- const IS_MAC = typeof window !== 'undefined' &&
1883
- /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
1885
+ const IS_MAC = typeof globalWindow !== 'undefined' &&
1886
+ /Mac|iPod|iPhone|iPad/.test(globalWindow.navigator.platform);
1884
1887
  const KEY_ALIASES = {
1885
1888
  add: '+',
1886
1889
  break: 'pause',
@@ -1898,8 +1901,8 @@ const KEY_ALIASES = {
1898
1901
  option: 'alt',
1899
1902
  return: 'enter',
1900
1903
  right: 'arrowright',
1901
- space: ' ',
1902
- spacebar: ' ',
1904
+ space: 'space',
1905
+ spacebar: 'space',
1903
1906
  up: 'arrowup',
1904
1907
  win: 'meta',
1905
1908
  windows: 'meta'
@@ -1908,7 +1911,7 @@ const BASE_PATH = (() => {
1908
1911
  if (typeof document === 'undefined') {
1909
1912
  return '';
1910
1913
  }
1911
- const script = document.currentScript, removeScriptName = (s) => {
1914
+ const script = globalDocument.currentScript, removeScriptName = (s) => {
1912
1915
  const parts = s.split('/');
1913
1916
  if (/\.js/.test(parts[parts.length - 1])) {
1914
1917
  return parts.slice(0, parts.length - 1).join('/') + '/';
@@ -1918,11 +1921,11 @@ const BASE_PATH = (() => {
1918
1921
  if (script) {
1919
1922
  return removeScriptName(script.src);
1920
1923
  }
1921
- const scripts = document.querySelectorAll('script[src]');
1924
+ const scripts = globalDocument.querySelectorAll('script[src]');
1922
1925
  if (scripts && scripts.length) {
1923
1926
  return removeScriptName(scripts[scripts.length - 1].src);
1924
1927
  }
1925
- return window.location.href;
1928
+ return globalWindow.location.href;
1926
1929
  })();
1927
1930
  const TEMP_ATTR = 'data-jodit-temp';
1928
1931
  const lang = {};
@@ -2670,7 +2673,6 @@ function watch(observeFields, opts) {
2670
2673
  const [objectPath, eventName] = field.split(':');
2671
2674
  let ctx = context;
2672
2675
  if (objectPath.length) {
2673
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2674
2676
  ctx = component.get(objectPath);
2675
2677
  }
2676
2678
  if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_3__/* .isFunction */ .T)(ctx)) {
@@ -2861,11 +2863,17 @@ class Dom {
2861
2863
  }
2862
2864
  static replace(elm, newTagName, create, withAttributes = false, notMoveContent = false) {
2863
2865
  if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isHTML */ .AH)(newTagName)) {
2866
+ void 0;
2864
2867
  newTagName = create.fromHTML(newTagName);
2865
2868
  }
2866
- const tag = (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .Kg)(newTagName)
2867
- ? create.element(newTagName)
2868
- : newTagName;
2869
+ let tag;
2870
+ if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .Kg)(newTagName)) {
2871
+ void 0;
2872
+ tag = create.element(newTagName);
2873
+ }
2874
+ else {
2875
+ tag = newTagName;
2876
+ }
2869
2877
  if (!notMoveContent) {
2870
2878
  while (elm.firstChild) {
2871
2879
  tag.appendChild(elm.firstChild);
@@ -3329,7 +3337,7 @@ class Dom {
3329
3337
  * Move all content to another element
3330
3338
  */
3331
3339
  static moveContent(from, to, inStart = false, filter = () => true) {
3332
- const fragment = (from.ownerDocument || document).createDocumentFragment();
3340
+ const fragment = (from.ownerDocument || jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument).createDocumentFragment();
3333
3341
  (0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__/* .toArray */ .$)(from.childNodes)
3334
3342
  .filter(elm => {
3335
3343
  if (filter(elm)) {
@@ -3790,7 +3798,7 @@ class EventEmitter {
3790
3798
  passive: true,
3791
3799
  capture: (_a = options === null || options === void 0 ? void 0 : options.capture) !== null && _a !== void 0 ? _a : false
3792
3800
  }
3793
- : (_b = options === null || options === void 0 ? void 0 : options.capture) !== null && _b !== void 0 ? _b : false;
3801
+ : ((_b = options === null || options === void 0 ? void 0 : options.capture) !== null && _b !== void 0 ? _b : false);
3794
3802
  syntheticCallback.options = eOpts;
3795
3803
  subject.addEventListener(event, syntheticCallback, eOpts);
3796
3804
  this.__memoryDOMSubjectToHandler(subject, syntheticCallback);
@@ -4022,7 +4030,7 @@ class EventEmitter {
4022
4030
  this.__domEventsMap = new Map();
4023
4031
  this.__mutedEvents = new Set();
4024
4032
  this.__key = '__JoditEventEmitterNamespaces';
4025
- this.__doc = document;
4033
+ this.__doc = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument;
4026
4034
  this.__prepareEvent = (e) => {
4027
4035
  if (e.cancelBubble) {
4028
4036
  return;
@@ -4518,9 +4526,20 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
4518
4526
  const data = boxes.get(jodit) || {}, key = name + tag;
4519
4527
  const view = (0,jodit_core_helpers_checker_is_view_object__WEBPACK_IMPORTED_MODULE_6__/* .isViewObject */ .h)(jodit) ? jodit : jodit.j;
4520
4528
  if (!data[key]) {
4521
- let c = view.c, body = (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot
4522
- ? jodit.o.shadowRoot
4523
- : jodit.od.body;
4529
+ let c = view.c;
4530
+ let body;
4531
+ if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot) {
4532
+ body = jodit.o.shadowRoot;
4533
+ }
4534
+ else {
4535
+ body = jodit.od.body;
4536
+ if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit)) {
4537
+ const dialog = _dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.closest(jodit.container, 'dialog', jodit.od.body);
4538
+ if (dialog) {
4539
+ body = dialog;
4540
+ }
4541
+ }
4542
+ }
4524
4543
  if (createInsideEditor &&
4525
4544
  (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) &&
4526
4545
  jodit.od !== jodit.ed) {
@@ -4538,6 +4557,7 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
4538
4557
  body.appendChild(box);
4539
4558
  data[key] = box;
4540
4559
  jodit.hookStatus('beforeDestruct', () => {
4560
+ view.events.off(box);
4541
4561
  _dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(box);
4542
4562
  delete data[key];
4543
4563
  if (Object.keys(data).length) {
@@ -4545,6 +4565,7 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
4545
4565
  }
4546
4566
  });
4547
4567
  boxes.set(jodit, data);
4568
+ view.events.fire('getContainer', box);
4548
4569
  }
4549
4570
  data[key].classList.remove('jodit_theme_default', 'jodit_theme_dark');
4550
4571
  data[key].classList.add(`jodit_theme_${view.o.theme || 'default'}`);
@@ -4673,7 +4694,7 @@ const toArray = function toArray(...args) {
4673
4694
  var _a;
4674
4695
  const func = (0,jodit_core_helpers_checker_is_native_function__WEBPACK_IMPORTED_MODULE_1__/* .isNativeFunction */ .a)(Array.from)
4675
4696
  ? Array.from
4676
- : (_a = (0,jodit_core_helpers_utils_reset__WEBPACK_IMPORTED_MODULE_0__/* .reset */ .c)('Array.from')) !== null && _a !== void 0 ? _a : Array.from;
4697
+ : ((_a = (0,jodit_core_helpers_utils_reset__WEBPACK_IMPORTED_MODULE_0__/* .reset */ .c)('Array.from')) !== null && _a !== void 0 ? _a : Array.from);
4677
4698
  return func.apply(Array, args);
4678
4699
  };
4679
4700
 
@@ -4710,6 +4731,7 @@ const toArray = function toArray(...args) {
4710
4731
  /* harmony export */ D: function() { return /* binding */ clearTimeout; },
4711
4732
  /* harmony export */ w: function() { return /* binding */ setTimeout; }
4712
4733
  /* harmony export */ });
4734
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
4713
4735
  /*!
4714
4736
  * Jodit Editor (https://xdsoft.net/jodit/)
4715
4737
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -4718,6 +4740,7 @@ const toArray = function toArray(...args) {
4718
4740
  /**
4719
4741
  * @module helpers/async
4720
4742
  */
4743
+
4721
4744
  /**
4722
4745
  * Create async callback if set timeout value - else call function immediately
4723
4746
  */
@@ -4726,7 +4749,7 @@ function setTimeout(callback, timeout, ...args) {
4726
4749
  callback.call(null, ...args);
4727
4750
  }
4728
4751
  else {
4729
- return window.setTimeout(callback, timeout, ...args);
4752
+ return jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.setTimeout(callback, timeout, ...args);
4730
4753
  }
4731
4754
  return 0;
4732
4755
  }
@@ -4734,7 +4757,7 @@ function setTimeout(callback, timeout, ...args) {
4734
4757
  * Clear timeout
4735
4758
  */
4736
4759
  function clearTimeout(timer) {
4737
- window.clearTimeout(timer);
4760
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.clearTimeout(timer);
4738
4761
  }
4739
4762
 
4740
4763
 
@@ -4747,6 +4770,7 @@ function clearTimeout(timer) {
4747
4770
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4748
4771
  /* harmony export */ k: function() { return /* binding */ hasBrowserColorPicker; }
4749
4772
  /* harmony export */ });
4773
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
4750
4774
  /*!
4751
4775
  * Jodit Editor (https://xdsoft.net/jodit/)
4752
4776
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -4755,13 +4779,14 @@ function clearTimeout(timer) {
4755
4779
  /**
4756
4780
  * @module helpers/checker
4757
4781
  */
4782
+
4758
4783
  /**
4759
4784
  * Check if browser has a color picker (a new HTML5 attribute for input tag)
4760
4785
  */
4761
4786
  function hasBrowserColorPicker() {
4762
4787
  let supportsColor = true;
4763
4788
  try {
4764
- const a = document.createElement('input');
4789
+ const a = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('input');
4765
4790
  a.type = 'color';
4766
4791
  a.value = '!';
4767
4792
  supportsColor = a.type === 'color' && a.value !== '!';
@@ -5411,6 +5436,7 @@ function isStringArray(value) {
5411
5436
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5412
5437
  /* harmony export */ m: function() { return /* binding */ isURL; }
5413
5438
  /* harmony export */ });
5439
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
5414
5440
  /*!
5415
5441
  * Jodit Editor (https://xdsoft.net/jodit/)
5416
5442
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -5419,6 +5445,7 @@ function isStringArray(value) {
5419
5445
  /**
5420
5446
  * @module helpers/checker
5421
5447
  */
5448
+
5422
5449
  /**
5423
5450
  * Check if a string is an url
5424
5451
  */
@@ -5435,7 +5462,7 @@ function isURL(str) {
5435
5462
  return false;
5436
5463
  }
5437
5464
  }
5438
- const a = document.createElement('a');
5465
+ const a = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
5439
5466
  a.href = str;
5440
5467
  return Boolean(a.hostname);
5441
5468
  }
@@ -5670,9 +5697,9 @@ function applyStyles(html) {
5670
5697
  }
5671
5698
  html = html.substring(html.indexOf('<html '), html.length);
5672
5699
  html = html.substring(0, html.lastIndexOf('</html>') + '</html>'.length);
5673
- const iframe = document.createElement('iframe');
5700
+ const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
5674
5701
  iframe.style.display = 'none';
5675
- document.body.appendChild(iframe);
5702
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body.appendChild(iframe);
5676
5703
  let convertedString = '', collection = [];
5677
5704
  try {
5678
5705
  const iframeDoc = iframe.contentDocument ||
@@ -5743,9 +5770,10 @@ function applyStyles(html) {
5743
5770
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5744
5771
  /* harmony export */ w: function() { return /* binding */ cleanFromWord; }
5745
5772
  /* harmony export */ });
5746
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
5747
- /* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42448);
5748
- /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59101);
5773
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
5774
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
5775
+ /* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42448);
5776
+ /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59101);
5749
5777
  /*!
5750
5778
  * Jodit Editor (https://xdsoft.net/jodit/)
5751
5779
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -5757,6 +5785,7 @@ function applyStyles(html) {
5757
5785
 
5758
5786
 
5759
5787
 
5788
+
5760
5789
  /**
5761
5790
  * The method automatically cleans up content from Microsoft Word and other HTML sources to ensure clean, compliant
5762
5791
  * content that matches the look and feel of the site.
@@ -5768,11 +5797,11 @@ function cleanFromWord(html) {
5768
5797
  }
5769
5798
  let convertedString = '';
5770
5799
  try {
5771
- const div = document.createElement('div');
5800
+ const div = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
5772
5801
  div.innerHTML = html;
5773
5802
  const marks = [];
5774
5803
  if (div.firstChild) {
5775
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.each(div, node => {
5804
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.each(div, node => {
5776
5805
  if (!node) {
5777
5806
  return;
5778
5807
  }
@@ -5787,10 +5816,10 @@ function cleanFromWord(html) {
5787
5816
  case 'W:SDT':
5788
5817
  case 'W:SDTPR':
5789
5818
  case 'FONT':
5790
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(node);
5819
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(node);
5791
5820
  break;
5792
5821
  default:
5793
- (0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__/* .toArray */ .$)(node.attributes).forEach((attr) => {
5822
+ (0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__/* .toArray */ .$)(node.attributes).forEach((attr) => {
5794
5823
  if ([
5795
5824
  'src',
5796
5825
  'href',
@@ -5809,14 +5838,14 @@ function cleanFromWord(html) {
5809
5838
  }
5810
5839
  });
5811
5840
  }
5812
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove.apply(null, marks);
5841
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove.apply(null, marks);
5813
5842
  convertedString = div.innerHTML;
5814
5843
  }
5815
5844
  catch (e) { }
5816
5845
  if (convertedString) {
5817
5846
  html = convertedString;
5818
5847
  }
5819
- html = html.split(/(\n)/).filter(jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__/* .trim */ .Bq).join('\n');
5848
+ html = html.split(/(\n)/).filter(jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_3__/* .trim */ .Bq).join('\n');
5820
5849
  return html
5821
5850
  .replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g, '')
5822
5851
  .replace(/<!--[^>]*>/g, '');
@@ -5832,6 +5861,7 @@ function cleanFromWord(html) {
5832
5861
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5833
5862
  /* harmony export */ G: function() { return /* binding */ htmlspecialchars; }
5834
5863
  /* harmony export */ });
5864
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
5835
5865
  /*!
5836
5866
  * Jodit Editor (https://xdsoft.net/jodit/)
5837
5867
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -5840,11 +5870,12 @@ function cleanFromWord(html) {
5840
5870
  /**
5841
5871
  * @module helpers/html
5842
5872
  */
5873
+
5843
5874
  /**
5844
5875
  * Convert special characters to HTML entities
5845
5876
  */
5846
5877
  function htmlspecialchars(html) {
5847
- const tmp = document.createElement('div');
5878
+ const tmp = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
5848
5879
  tmp.textContent = html;
5849
5880
  return tmp.innerHTML;
5850
5881
  }
@@ -6345,7 +6376,8 @@ function normalizeKeyAliases(keys) {
6345
6376
  ctrl: 2,
6346
6377
  control: 2,
6347
6378
  alt: 3,
6348
- shift: 4
6379
+ shift: 4,
6380
+ space: 5
6349
6381
  };
6350
6382
  return keys
6351
6383
  .replace(/\+\+/g, '+add')
@@ -6564,8 +6596,9 @@ const getContentWidth = (element, win) => {
6564
6596
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6565
6597
  /* harmony export */ m: function() { return /* binding */ getScrollParent; }
6566
6598
  /* harmony export */ });
6567
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
6568
- /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97369);
6599
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
6600
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
6601
+ /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97369);
6569
6602
  /*!
6570
6603
  * Jodit Editor (https://xdsoft.net/jodit/)
6571
6604
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -6573,19 +6606,20 @@ const getContentWidth = (element, win) => {
6573
6606
  */
6574
6607
 
6575
6608
 
6609
+
6576
6610
  function getScrollParent(node) {
6577
6611
  if (!node) {
6578
6612
  return null;
6579
6613
  }
6580
- const isElement = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isHTMLElement(node);
6581
- const overflowY = isElement && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.css)(node, 'overflowY');
6614
+ const isElement = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(node);
6615
+ const overflowY = isElement && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_2__.css)(node, 'overflowY');
6582
6616
  const isScrollable = isElement && overflowY !== 'visible' && overflowY !== 'hidden';
6583
6617
  if (isScrollable && node.scrollHeight >= node.clientHeight) {
6584
6618
  return node;
6585
6619
  }
6586
6620
  return (getScrollParent(node.parentNode) ||
6587
- document.scrollingElement ||
6588
- document.body);
6621
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.scrollingElement ||
6622
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body);
6589
6623
  }
6590
6624
 
6591
6625
 
@@ -7268,9 +7302,9 @@ function alignElement(command, box) {
7268
7302
  /* harmony export */ w4: function() { return /* binding */ appendScriptAsync; },
7269
7303
  /* harmony export */ x_: function() { return /* binding */ loadNextStyle; }
7270
7304
  /* harmony export */ });
7271
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(31635);
7305
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
7272
7306
  /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(98253);
7273
- /* harmony import */ var _complete_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60346);
7307
+ /* harmony import */ var _complete_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60346);
7274
7308
  /*!
7275
7309
  * Jodit Editor (https://xdsoft.net/jodit/)
7276
7310
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -7281,7 +7315,7 @@ function alignElement(command, box) {
7281
7315
 
7282
7316
  const alreadyLoadedList = new Map();
7283
7317
  const cacheLoaders = (loader) => {
7284
- return (jodit, url) => (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__awaiter */ .sH)(void 0, void 0, void 0, function* () {
7318
+ return (jodit, url) => (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__awaiter */ .sH)(void 0, void 0, void 0, function* () {
7285
7319
  if (alreadyLoadedList.has(url)) {
7286
7320
  return alreadyLoadedList.get(url);
7287
7321
  }
@@ -7303,7 +7337,7 @@ const appendScriptAsync = cacheLoaders((jodit, url) => {
7303
7337
  crossorigin: 'anonymous',
7304
7338
  referrerpolicy: 'no-referrer',
7305
7339
  async: true,
7306
- src: (0,_complete_url__WEBPACK_IMPORTED_MODULE_1__/* .completeUrl */ .X)(url)
7340
+ src: (0,_complete_url__WEBPACK_IMPORTED_MODULE_0__/* .completeUrl */ .X)(url)
7307
7341
  });
7308
7342
  jodit.od.body.appendChild(script);
7309
7343
  jodit.e.on(script, 'error', reject).on(script, 'load', resolve);
@@ -7324,7 +7358,7 @@ const appendStyleAsync = cacheLoaders((jodit, url) => {
7324
7358
  const callback = () => resolve(link);
7325
7359
  !jodit.isInDestruct &&
7326
7360
  jodit.e.on(link, 'load', callback).on(link, 'error', reject);
7327
- link.href = (0,_complete_url__WEBPACK_IMPORTED_MODULE_1__/* .completeUrl */ .X)(url);
7361
+ link.href = (0,_complete_url__WEBPACK_IMPORTED_MODULE_0__/* .completeUrl */ .X)(url);
7328
7362
  if (jodit.o.shadowRoot) {
7329
7363
  jodit.o.shadowRoot.appendChild(link);
7330
7364
  }
@@ -7512,16 +7546,18 @@ const buildQuery = (data, prefix) => {
7512
7546
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7513
7547
  /* harmony export */ X: function() { return /* binding */ completeUrl; }
7514
7548
  /* harmony export */ });
7549
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
7515
7550
  /*!
7516
7551
  * Jodit Editor (https://xdsoft.net/jodit/)
7517
7552
  * Released under MIT see LICENSE.txt in the project root for license information.
7518
7553
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
7519
7554
  */
7555
+
7520
7556
  /**
7521
7557
  * @module helpers/utils
7522
7558
  */
7523
7559
  const completeUrl = (url) => {
7524
- if (window.location.protocol === 'file:' && /^\/\//.test(url)) {
7560
+ if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.location.protocol === 'file:' && /^\/\//.test(url)) {
7525
7561
  url = 'https:' + url;
7526
7562
  }
7527
7563
  return url;
@@ -7638,8 +7674,9 @@ function ConfigFlatten(obj) {
7638
7674
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7639
7675
  /* harmony export */ m: function() { return /* binding */ convertMediaUrlToVideoEmbed; }
7640
7676
  /* harmony export */ });
7641
- /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6939);
7642
- /* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70807);
7677
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
7678
+ /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6939);
7679
+ /* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70807);
7643
7680
  /*!
7644
7681
  * Jodit Editor (https://xdsoft.net/jodit/)
7645
7682
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -7650,14 +7687,15 @@ function ConfigFlatten(obj) {
7650
7687
  */
7651
7688
 
7652
7689
 
7690
+
7653
7691
  /**
7654
7692
  * Javascript url pattern converter replace youtube/vimeo url in embed code.
7655
7693
  */
7656
7694
  const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
7657
- if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__/* .isURL */ .m)(url)) {
7695
+ if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)(url)) {
7658
7696
  return url;
7659
7697
  }
7660
- const parser = document.createElement('a'), pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
7698
+ const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a'), pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
7661
7699
  parser.href = url;
7662
7700
  if (!width) {
7663
7701
  width = 400;
@@ -7683,7 +7721,7 @@ const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
7683
7721
  case 'youtu.be':
7684
7722
  case 'www.youtu.be': {
7685
7723
  const query = parser.search
7686
- ? (0,_parse_query__WEBPACK_IMPORTED_MODULE_1__/* .parseQuery */ .m)(parser.search)
7724
+ ? (0,_parse_query__WEBPACK_IMPORTED_MODULE_2__/* .parseQuery */ .m)(parser.search)
7687
7725
  : { v: parser.pathname.substr(1) };
7688
7726
  return query.v
7689
7727
  ? '<iframe width="' +
@@ -7877,7 +7915,8 @@ const dataBind = (elm, key, value) => {
7877
7915
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7878
7916
  /* harmony export */ e: function() { return /* binding */ defaultLanguage; }
7879
7917
  /* harmony export */ });
7880
- /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(98253);
7918
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
7919
+ /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98253);
7881
7920
  /*!
7882
7921
  * Jodit Editor (https://xdsoft.net/jodit/)
7883
7922
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -7887,15 +7926,16 @@ const dataBind = (elm, key, value) => {
7887
7926
  * @module helpers/utils
7888
7927
  */
7889
7928
 
7929
+
7890
7930
  /**
7891
7931
  * Try define user language
7892
7932
  */
7893
7933
  const defaultLanguage = (language, defaultLanguage = 'en') => {
7894
- if (language !== 'auto' && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .K)(language)) {
7934
+ if (language !== 'auto' && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .K)(language)) {
7895
7935
  return language;
7896
7936
  }
7897
- if (document.documentElement && document.documentElement.lang) {
7898
- return document.documentElement.lang;
7937
+ if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement && jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement.lang) {
7938
+ return jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement.lang;
7899
7939
  }
7900
7940
  if (navigator.language) {
7901
7941
  return navigator.language.substring(0, 2);
@@ -8649,10 +8689,10 @@ const map = {};
8649
8689
  function reset(key) {
8650
8690
  var _a, _b;
8651
8691
  if (!(key in map)) {
8652
- const iframe = document.createElement('iframe');
8692
+ const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
8653
8693
  try {
8654
8694
  iframe.src = 'about:blank';
8655
- document.body.appendChild(iframe);
8695
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body.appendChild(iframe);
8656
8696
  if (!iframe.contentWindow) {
8657
8697
  return null;
8658
8698
  }
@@ -9585,14 +9625,15 @@ Plugin.requires = [];
9585
9625
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9586
9626
  /* harmony export */ d: function() { return /* binding */ Ajax; }
9587
9627
  /* harmony export */ });
9588
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(31635);
9628
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635);
9589
9629
  /* harmony import */ var jodit_core_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64890);
9590
- /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(26318);
9591
- /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65147);
9592
- /* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50156);
9593
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36115);
9594
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27337);
9595
- /* harmony import */ var _response__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91672);
9630
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
9631
+ /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(26318);
9632
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65147);
9633
+ /* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50156);
9634
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36115);
9635
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27337);
9636
+ /* harmony import */ var _response__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91672);
9596
9637
  /*!
9597
9638
  * Jodit Editor (https://xdsoft.net/jodit/)
9598
9639
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -9606,33 +9647,34 @@ Plugin.requires = [];
9606
9647
 
9607
9648
 
9608
9649
 
9650
+
9609
9651
  class Ajax {
9610
9652
  className() {
9611
9653
  return 'Ajax';
9612
9654
  }
9613
- constructor(options, defaultAjaxOptions = jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.defaultAjaxOptions) {
9655
+ constructor(options, defaultAjaxOptions = jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.defaultAjaxOptions) {
9614
9656
  this.__async = new jodit_core_async__WEBPACK_IMPORTED_MODULE_0__/* .Async */ .j();
9615
9657
  this.__isFulfilled = false;
9616
9658
  this.__activated = false;
9617
9659
  this.__isDestructed = false;
9618
- this.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.ConfigProto)(options || {}, defaultAjaxOptions);
9660
+ this.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(options || {}, defaultAjaxOptions);
9619
9661
  this.xhr = this.o.xhr ? this.o.xhr() : new XMLHttpRequest();
9620
9662
  }
9621
9663
  __buildParams(obj, prefix) {
9622
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(obj) &&
9664
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(obj) &&
9623
9665
  this.options.contentType &&
9624
9666
  this.options.contentType.includes('application/json')) {
9625
9667
  return JSON.stringify(obj);
9626
9668
  }
9627
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(this.o.queryBuild)) {
9669
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(this.o.queryBuild)) {
9628
9670
  return this.o.queryBuild.call(this, obj, prefix);
9629
9671
  }
9630
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isString)(obj) ||
9631
- obj instanceof window.FormData ||
9632
- (typeof obj === 'object' && obj != null && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(obj.append))) {
9672
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isString)(obj) ||
9673
+ obj instanceof jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.globalWindow.FormData ||
9674
+ (typeof obj === 'object' && obj != null && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(obj.append))) {
9633
9675
  return obj;
9634
9676
  }
9635
- return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.buildQuery)(obj);
9677
+ return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)(obj);
9636
9678
  }
9637
9679
  get o() {
9638
9680
  return this.options;
@@ -9652,20 +9694,20 @@ class Ajax {
9652
9694
  this.__activated = true;
9653
9695
  const { xhr, o } = this;
9654
9696
  const request = this.prepareRequest();
9655
- return this.__async.promise((resolve, reject) => (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__awaiter */ .sH)(this, void 0, void 0, function* () {
9697
+ return this.__async.promise((resolve, reject) => (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__awaiter */ .sH)(this, void 0, void 0, function* () {
9656
9698
  var _a;
9657
9699
  const onReject = () => {
9658
9700
  this.__isFulfilled = true;
9659
- reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .connection */ .FI('Connection error'));
9701
+ reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI('Connection error'));
9660
9702
  };
9661
9703
  const onResolve = () => {
9662
9704
  this.__isFulfilled = true;
9663
- resolve(new _response__WEBPACK_IMPORTED_MODULE_6__/* .Response */ .Y(request, xhr.status, xhr.statusText, !xhr.responseType ? xhr.responseText : xhr.response));
9705
+ resolve(new _response__WEBPACK_IMPORTED_MODULE_7__/* .Response */ .Y(request, xhr.status, xhr.statusText, !xhr.responseType ? xhr.responseText : xhr.response));
9664
9706
  };
9665
9707
  xhr.onload = onResolve;
9666
9708
  xhr.onabort = () => {
9667
9709
  this.__isFulfilled = true;
9668
- reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .abort */ .h2('Abort connection'));
9710
+ reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .abort */ .h2('Abort connection'));
9669
9711
  };
9670
9712
  xhr.onerror = onReject;
9671
9713
  xhr.ontimeout = onReject;
@@ -9689,7 +9731,7 @@ class Ajax {
9689
9731
  }
9690
9732
  else if (xhr.statusText) {
9691
9733
  this.__isFulfilled = true;
9692
- reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .connection */ .FI(xhr.statusText));
9734
+ reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI(xhr.statusText));
9693
9735
  }
9694
9736
  }
9695
9737
  };
@@ -9700,7 +9742,7 @@ class Ajax {
9700
9742
  xhr.setRequestHeader('Content-type', o.contentType);
9701
9743
  }
9702
9744
  let { headers } = o;
9703
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(headers)) {
9745
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(headers)) {
9704
9746
  headers = yield headers.call(this);
9705
9747
  }
9706
9748
  if (headers && xhr.setRequestHeader) {
@@ -9716,22 +9758,22 @@ class Ajax {
9716
9758
  }
9717
9759
  prepareRequest() {
9718
9760
  if (!this.o.url) {
9719
- throw jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .error */ .z3('Need URL for AJAX request');
9761
+ throw jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .error */ .z3('Need URL for AJAX request');
9720
9762
  }
9721
9763
  let url = this.o.url;
9722
9764
  const data = this.o.data;
9723
9765
  const method = (this.o.method || 'get').toLowerCase();
9724
- if (method === 'get' && data && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(data)) {
9766
+ if (method === 'get' && data && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(data)) {
9725
9767
  const qIndex = url.indexOf('?');
9726
9768
  if (qIndex !== -1) {
9727
- const urlData = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.parseQuery)(url);
9769
+ const urlData = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.parseQuery)(url);
9728
9770
  url =
9729
9771
  url.substring(0, qIndex) +
9730
9772
  '?' +
9731
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.buildQuery)(Object.assign(Object.assign({}, urlData), data));
9773
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)(Object.assign(Object.assign({}, urlData), data));
9732
9774
  }
9733
9775
  else {
9734
- url += '?' + (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.buildQuery)(this.o.data);
9776
+ url += '?' + (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)(this.o.data);
9735
9777
  }
9736
9778
  }
9737
9779
  const request = {
@@ -9755,8 +9797,8 @@ class Ajax {
9755
9797
  }
9756
9798
  }
9757
9799
  Ajax.log = [];
9758
- (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
9759
- jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay
9800
+ (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
9801
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Ay
9760
9802
  ], Ajax.prototype, "destruct", null);
9761
9803
 
9762
9804
 
@@ -10651,6 +10693,7 @@ class Selection {
10651
10693
  /**
10652
10694
  * Call callback for all selection node
10653
10695
  */
10696
+ // eslint-disable-next-line complexity
10654
10697
  eachSelection(callback) {
10655
10698
  var _a;
10656
10699
  const sel = this.sel;
@@ -11435,12 +11478,13 @@ function getSuitParent(style, node, root) {
11435
11478
  /* harmony export */ Y: function() { return /* binding */ hasSameStyleKeys; },
11436
11479
  /* harmony export */ g: function() { return /* binding */ hasSameStyle; }
11437
11480
  /* harmony export */ });
11438
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
11439
- /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35642);
11440
- /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59678);
11441
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28712);
11442
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__);
11443
- /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38322);
11481
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
11482
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
11483
+ /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35642);
11484
+ /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(59678);
11485
+ /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28712);
11486
+ /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__);
11487
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38322);
11444
11488
  /*!
11445
11489
  * Jodit Editor (https://xdsoft.net/jodit/)
11446
11490
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -11451,48 +11495,53 @@ function getSuitParent(style, node, root) {
11451
11495
 
11452
11496
 
11453
11497
 
11498
+
11454
11499
  /**
11455
11500
  * Element has the same styles as in the commit
11456
11501
  * @private
11457
11502
  */
11458
11503
  function hasSameStyle(elm, rules) {
11459
- return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isTag(elm, 'font') &&
11460
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isHTMLElement(elm) &&
11504
+ return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'font') &&
11505
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(elm) &&
11461
11506
  Object.keys(rules).every(property => {
11462
- const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(elm, property, true);
11507
+ const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__/* .css */ .A)(elm, property, true);
11463
11508
  if (value === '' &&
11464
11509
  (rules[property] === '' || rules[property] == null)) {
11465
11510
  return true;
11466
11511
  }
11467
- return (!(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(value) &&
11512
+ return (!(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__/* .isVoid */ .R)(value) &&
11468
11513
  value !== '' &&
11469
- !(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(rules[property]) &&
11470
- (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_4__/* .normalizeCssValue */ .iy)(property, rules[property])
11514
+ !(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__/* .isVoid */ .R)(rules[property]) &&
11515
+ (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_5__/* .normalizeCssValue */ .iy)(property, rules[property])
11471
11516
  .toString()
11472
11517
  .toLowerCase() === value.toString().toLowerCase());
11473
11518
  }));
11474
11519
  }
11475
- const elm = document.createElement('div');
11476
- elm.style.color = 'red';
11477
- void 0;
11478
- void 0;
11479
- void 0;
11520
+ if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument) {
11521
+ const elm = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
11522
+ elm.style.color = 'red';
11523
+ void 0;
11524
+ void 0;
11525
+ void 0;
11526
+ }
11480
11527
  /**
11481
11528
  * Element has the similar styles keys
11482
11529
  */
11483
11530
  function hasSameStyleKeys(elm, rules) {
11484
- return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isTag(elm, 'font') &&
11485
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isHTMLElement(elm) &&
11531
+ return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'font') &&
11532
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(elm) &&
11486
11533
  Object.keys(rules).every(property => {
11487
- const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(elm, property, true);
11534
+ const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__/* .css */ .A)(elm, property, true);
11488
11535
  return value !== '';
11489
11536
  }));
11490
11537
  }
11491
- const elm2 = document.createElement('div');
11492
- elm2.style.color = 'red';
11493
- void 0;
11494
- void 0;
11495
- void 0;
11538
+ if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument) {
11539
+ const elm2 = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
11540
+ elm2.style.color = 'red';
11541
+ void 0;
11542
+ void 0;
11543
+ void 0;
11544
+ }
11496
11545
 
11497
11546
 
11498
11547
  /***/ }),
@@ -11875,16 +11924,17 @@ function wrapList(commitStyle, wrapper, jodit) {
11875
11924
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11876
11925
  /* harmony export */ Y: function() { return /* binding */ toggleAttributes; }
11877
11926
  /* harmony export */ });
11878
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
11879
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56298);
11880
- /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9823);
11881
- /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59678);
11882
- /* harmony import */ var jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95350);
11883
- /* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(449);
11884
- /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97369);
11885
- /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(38322);
11886
- /* harmony import */ var jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(72197);
11887
- /* harmony import */ var jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(12043);
11927
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
11928
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
11929
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
11930
+ /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9823);
11931
+ /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59678);
11932
+ /* harmony import */ var jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95350);
11933
+ /* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(449);
11934
+ /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97369);
11935
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(38322);
11936
+ /* harmony import */ var jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(72197);
11937
+ /* harmony import */ var jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(12043);
11888
11938
  /*!
11889
11939
  * Jodit Editor (https://xdsoft.net/jodit/)
11890
11940
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -11900,6 +11950,7 @@ function wrapList(commitStyle, wrapper, jodit) {
11900
11950
 
11901
11951
 
11902
11952
 
11953
+
11903
11954
  const tak = 'toggleAttributes';
11904
11955
  /**
11905
11956
  * Toggles attributes
@@ -11911,7 +11962,7 @@ function toggleAttributes(commitStyle, elm, jodit, mode, dry = false) {
11911
11962
  }
11912
11963
  !dry && commitStyle.setApplied(elm, tak);
11913
11964
  const { attributes } = commitStyle.options;
11914
- if (attributes && (0,jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_3__/* .size */ .E)(attributes) > 0) {
11965
+ if (attributes && (0,jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_4__/* .size */ .E)(attributes) > 0) {
11915
11966
  Object.keys(attributes).forEach((key) => {
11916
11967
  const value = attributes[key];
11917
11968
  switch (key) {
@@ -11933,24 +11984,24 @@ function toggleAttributes(commitStyle, elm, jodit, mode, dry = false) {
11933
11984
  function toggleStyle(commitStyle, jodit, style, elm, dry, mode) {
11934
11985
  void 0;
11935
11986
  Object.keys(style).forEach((rule) => {
11936
- const inlineValue = elm.style.getPropertyValue((0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_6__/* .kebabCase */ .k)(rule));
11987
+ const inlineValue = elm.style.getPropertyValue((0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_7__/* .kebabCase */ .k)(rule));
11937
11988
  const newValue = style[rule];
11938
11989
  if (inlineValue === '' && newValue == null) {
11939
11990
  return;
11940
11991
  }
11941
11992
  if (getNativeCSSValue(jodit, elm, rule) ===
11942
- (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_7__/* .normalizeCssValue */ .iy)(rule, newValue)) {
11993
+ (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_8__/* .normalizeCssValue */ .iy)(rule, newValue)) {
11943
11994
  if (!inlineValue) {
11944
11995
  return;
11945
11996
  }
11946
- !dry && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(elm, rule, null);
11947
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNSET */ .Ag;
11997
+ !dry && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(elm, rule, null);
11998
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
11948
11999
  mode = removeExtraStyleAttribute(commitStyle, elm, mode);
11949
12000
  return;
11950
12001
  }
11951
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .CHANGE */ .PL;
12002
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
11952
12003
  if (!dry) {
11953
- (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(elm, rule, newValue);
12004
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(elm, rule, newValue);
11954
12005
  mode = removeExtraStyleAttribute(commitStyle, elm, mode);
11955
12006
  }
11956
12007
  });
@@ -11958,19 +12009,19 @@ function toggleStyle(commitStyle, jodit, style, elm, dry, mode) {
11958
12009
  }
11959
12010
  function toggleClass(jodit, value, elm, mode, dry) {
11960
12011
  void 0;
11961
- const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* ._PREFIX */ .ar}AfterToggleAttribute`);
12012
+ const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* ._PREFIX */ .ar}AfterToggleAttribute`);
11962
12013
  if (elm.classList.contains(value.toString())) {
11963
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNSET */ .Ag;
12014
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
11964
12015
  if (!dry) {
11965
12016
  elm.classList.remove(value);
11966
12017
  if (elm.classList.length === 0) {
11967
- (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'class', null);
12018
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'class', null);
11968
12019
  hook(mode, elm, 'class', null);
11969
12020
  }
11970
12021
  }
11971
12022
  }
11972
12023
  else {
11973
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .CHANGE */ .PL;
12024
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
11974
12025
  if (!dry) {
11975
12026
  elm.classList.add(value);
11976
12027
  hook(mode, elm, 'class', value);
@@ -11980,16 +12031,16 @@ function toggleClass(jodit, value, elm, mode, dry) {
11980
12031
  }
11981
12032
  function toggleAttribute(jodit, value, elm, key, dry, mode) {
11982
12033
  void 0;
11983
- const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* ._PREFIX */ .ar}AfterToggleAttribute`);
11984
- if ((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, key) === value) {
11985
- !dry && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, key, null);
11986
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNSET */ .Ag;
12034
+ const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* ._PREFIX */ .ar}AfterToggleAttribute`);
12035
+ if ((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key) === value) {
12036
+ !dry && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key, null);
12037
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
11987
12038
  !dry && hook(mode, elm, key, value);
11988
12039
  return mode;
11989
12040
  }
11990
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .CHANGE */ .PL;
12041
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
11991
12042
  if (!dry) {
11992
- (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, key, value);
12043
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key, value);
11993
12044
  hook(mode, elm, key, value);
11994
12045
  }
11995
12046
  return mode;
@@ -11999,11 +12050,11 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
11999
12050
  * and if it is default, it removes the element itself
12000
12051
  */
12001
12052
  function removeExtraStyleAttribute(commitStyle, elm, mode) {
12002
- if (!(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style')) {
12003
- (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', null);
12053
+ if (!(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'style')) {
12054
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'style', null);
12004
12055
  if (elm.tagName.toLowerCase() === commitStyle.defaultTag) {
12005
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(elm);
12006
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNWRAP */ .OJ;
12056
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(elm);
12057
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNWRAP */ .OJ;
12007
12058
  }
12008
12059
  }
12009
12060
  return mode;
@@ -12013,12 +12064,12 @@ function removeExtraStyleAttribute(commitStyle, elm, mode) {
12013
12064
  */
12014
12065
  function getShadowRoot(jodit) {
12015
12066
  var _a;
12016
- if ((0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__/* .dataBind */ .m)(jodit, 'shadowRoot') !== undefined) {
12017
- return (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__/* .dataBind */ .m)(jodit, 'shadowRoot');
12067
+ if ((0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot') !== undefined) {
12068
+ return (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot');
12018
12069
  }
12019
- const container = (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .getContainer */ .My)(jodit);
12020
- const iframe = document.createElement('iframe');
12021
- (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(iframe, {
12070
+ const container = (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(jodit);
12071
+ const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
12072
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(iframe, {
12022
12073
  width: 0,
12023
12074
  height: 0,
12024
12075
  position: 'absolute',
@@ -12028,7 +12079,7 @@ function getShadowRoot(jodit) {
12028
12079
  container.appendChild(iframe);
12029
12080
  const doc = (_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document;
12030
12081
  const shadowRoot = !doc ? jodit.od.body : doc.body;
12031
- (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__/* .dataBind */ .m)(jodit, 'shadowRoot', shadowRoot);
12082
+ (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot', shadowRoot);
12032
12083
  return shadowRoot;
12033
12084
  }
12034
12085
  /**
@@ -12039,8 +12090,8 @@ function getNativeCSSValue(jodit, elm, key) {
12039
12090
  newElm.style.cssText = elm.style.cssText;
12040
12091
  const root = getShadowRoot(jodit);
12041
12092
  root.appendChild(newElm);
12042
- const result = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(newElm, key);
12043
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(newElm);
12093
+ const result = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(newElm, key);
12094
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(newElm);
12044
12095
  return result;
12045
12096
  }
12046
12097
 
@@ -13397,15 +13448,21 @@ let UITooltip = UITooltip_1 = class UITooltip extends jodit_core_ui_element__WEB
13397
13448
  if (!view.o.textIcons &&
13398
13449
  view.o.showTooltip &&
13399
13450
  !view.o.useNativeTooltip) {
13451
+ this.j.e.on('getContainer', (box) => {
13452
+ this.__onAttach(box);
13453
+ });
13400
13454
  view.hookStatus(jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.ready, () => {
13401
- // TODO Move it inside __show method. Now it is here because testcase failed with capturing
13402
- (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
13403
- view.e.on(view.container, 'mouseenter.tooltip', this.__onMouseEnter, {
13404
- capture: true
13405
- });
13455
+ this.__onAttach(this.j.container);
13406
13456
  });
13407
13457
  }
13408
13458
  }
13459
+ __onAttach(container) {
13460
+ // TODO Move it inside __show method. Now it is here because testcase failed with capturing
13461
+ (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .getContainer */ .My)(this.j, UITooltip_1).appendChild(this.container);
13462
+ this.j.e.on(container, 'mouseenter.tooltip', this.__onMouseEnter, {
13463
+ capture: true
13464
+ });
13465
+ }
13409
13466
  __addListenersOnEnter() {
13410
13467
  if (this.__listenClose) {
13411
13468
  return;
@@ -14025,6 +14082,7 @@ let UIFileInput = class UIFileInput extends jodit_core_ui_form_inputs_input_inpu
14025
14082
  }
14026
14083
  createContainer(options) {
14027
14084
  this.button = new jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_0__/* .UIButton */ .lD(this.j, {
14085
+ tooltip: options.tooltip,
14028
14086
  icon: {
14029
14087
  name: 'plus'
14030
14088
  }
@@ -14452,8 +14510,8 @@ __webpack_require__.r(__webpack_exports__);
14452
14510
  /* harmony export */ required: function() { return /* binding */ required; },
14453
14511
  /* harmony export */ url: function() { return /* binding */ url; }
14454
14512
  /* harmony export */ });
14455
- /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6939);
14456
- /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59101);
14513
+ /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6939);
14514
+ /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59101);
14457
14515
  /*!
14458
14516
  * Jodit Editor (https://xdsoft.net/jodit/)
14459
14517
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -14465,7 +14523,7 @@ __webpack_require__.r(__webpack_exports__);
14465
14523
  * Input is required
14466
14524
  */
14467
14525
  const required = function (input) {
14468
- if (!(0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__/* .trim */ .Bq)(input.value).length) {
14526
+ if (!(0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__/* .trim */ .Bq)(input.value).length) {
14469
14527
  input.error = 'Please fill out this field';
14470
14528
  return false;
14471
14529
  }
@@ -14475,7 +14533,7 @@ const required = function (input) {
14475
14533
  * Input value should be valid URL
14476
14534
  */
14477
14535
  const url = function (input) {
14478
- if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)((0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__/* .trim */ .Bq)(input.value))) {
14536
+ if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__/* .isURL */ .m)((0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__/* .trim */ .Bq)(input.value))) {
14479
14537
  input.error = 'Please enter a web address';
14480
14538
  return false;
14481
14539
  }
@@ -17025,6 +17083,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
17025
17083
  }
17026
17084
  }
17027
17085
  catch (e) {
17086
+ if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_PROD) {
17087
+ throw e;
17088
+ }
17028
17089
  this.destruct();
17029
17090
  throw e;
17030
17091
  }
@@ -19003,10 +19064,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.filebrowser
19003
19064
  jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.filebrowser = {
19004
19065
  upload: {
19005
19066
  icon: 'plus',
19067
+ tooltip: 'Upload file',
19006
19068
  isInput: true,
19007
19069
  isDisabled: (browser) => !browser.dataProvider.canI('FileUpload'),
19008
- getContent: (filebrowser) => {
19070
+ getContent: (filebrowser, btnInt) => {
19009
19071
  const btn = new jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__/* .UIFileInput */ .n(filebrowser, {
19072
+ tooltip: btnInt.control.tooltip,
19010
19073
  onlyImages: filebrowser.state.onlyImages
19011
19074
  });
19012
19075
  filebrowser.e.fire('bindUploader.filebrowser', btn.container);
@@ -19015,6 +19078,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19015
19078
  },
19016
19079
  remove: {
19017
19080
  icon: 'bin',
19081
+ tooltip: 'Remove file',
19018
19082
  isDisabled: (browser) => {
19019
19083
  return (!browser.state.activeElements.length ||
19020
19084
  !browser.dataProvider.canI('FileRemove'));
@@ -19024,11 +19088,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19024
19088
  }
19025
19089
  },
19026
19090
  update: {
19091
+ tooltip: 'Update file list',
19027
19092
  exec: (editor) => {
19028
19093
  editor.e.fire('update.filebrowser');
19029
19094
  }
19030
19095
  },
19031
19096
  select: {
19097
+ tooltip: 'Select file',
19032
19098
  icon: 'check',
19033
19099
  isDisabled: (browser) => !browser.state.activeElements.length,
19034
19100
  exec: (editor) => {
@@ -19036,6 +19102,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19036
19102
  }
19037
19103
  },
19038
19104
  edit: {
19105
+ tooltip: 'Edit image',
19039
19106
  icon: 'pencil',
19040
19107
  isDisabled: (browser) => {
19041
19108
  const selected = browser.state.activeElements;
@@ -19049,6 +19116,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19049
19116
  }
19050
19117
  },
19051
19118
  tiles: {
19119
+ tooltip: 'Tiles view',
19052
19120
  icon: 'th',
19053
19121
  isActive: (filebrowser) => filebrowser.state.view === 'tiles',
19054
19122
  exec: (filebrowser) => {
@@ -19056,6 +19124,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19056
19124
  }
19057
19125
  },
19058
19126
  list: {
19127
+ tooltip: 'List view',
19059
19128
  icon: 'th-list',
19060
19129
  isActive: (filebrowser) => filebrowser.state.view === 'list',
19061
19130
  exec: (filebrowser) => {
@@ -19472,7 +19541,6 @@ let DataProvider = class DataProvider {
19472
19541
  data: {}
19473
19542
  };
19474
19543
  }
19475
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
19476
19544
  const query = this.o[type];
19477
19545
  if (query.data === undefined) {
19478
19546
  query.data = {
@@ -19722,7 +19790,6 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19722
19790
  get dataProvider() {
19723
19791
  return (0,_factories__WEBPACK_IMPORTED_MODULE_16__/* .makeDataProvider */ .S)(this, this.options);
19724
19792
  }
19725
- // eslint-disable-next-line no-unused-vars
19726
19793
  onSelect(callback) {
19727
19794
  return () => {
19728
19795
  if (this.state.activeElements.length) {
@@ -22244,7 +22311,6 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22244
22311
  const selector = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.cssPath)(td);
22245
22312
  selector && selectors.push(selector);
22246
22313
  });
22247
- // eslint-disable-next-line no-prototype-builtins
22248
22314
  style.innerHTML = selectors.length
22249
22315
  ? selectors.join(',') +
22250
22316
  `{${this.jodit.options.table.selectionCellStyle}}`
@@ -22463,46 +22529,39 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22463
22529
  removeRow(table, rowIndex) {
22464
22530
  return Table.__removeRow(table, rowIndex);
22465
22531
  }
22466
- static __appendColumn(table, j, after, create) {
22532
+ /**
22533
+ * Insert column before / after all the columns containing the selected cells
22534
+ */
22535
+ appendColumn(table, selectedCell, insertAfter = true) {
22467
22536
  const box = Table.__formalMatrix(table);
22468
- let i;
22469
- if (j === undefined || j < 0) {
22470
- j = Table.__getColumnsCount(table) - 1;
22471
- }
22472
- for (i = 0; i < box.length; i += 1) {
22473
- const cell = create.element('td');
22474
- const td = box[i][j];
22475
- let added = false;
22476
- if (after) {
22477
- if ((box[i] && td && j + 1 >= box[i].length) ||
22478
- td !== box[i][j + 1]) {
22479
- if (td.nextSibling) {
22480
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(td.nextSibling, cell);
22481
- }
22482
- else {
22483
- td.parentNode && td.parentNode.appendChild(cell);
22484
- }
22485
- added = true;
22537
+ if (!insertAfter && jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.isCell(selectedCell.previousElementSibling)) {
22538
+ return this.appendColumn(table, selectedCell.previousElementSibling, true);
22539
+ }
22540
+ const columnIndex = insertAfter
22541
+ ? selectedCell.cellIndex + ((selectedCell.colSpan || 1) - 1)
22542
+ : selectedCell.cellIndex;
22543
+ const newColumnIndex = insertAfter ? columnIndex + 1 : columnIndex;
22544
+ for (let i = 0; i < box.length;) {
22545
+ const cells = box[i];
22546
+ if (cells[columnIndex] !== cells[newColumnIndex] ||
22547
+ columnIndex === newColumnIndex) {
22548
+ const cell = this.j.createInside.element('td');
22549
+ if (insertAfter) {
22550
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.after(cells[columnIndex], cell);
22486
22551
  }
22487
- }
22488
- else {
22489
- if (j - 1 < 0 ||
22490
- (box[i][j] !== box[i][j - 1] && box[i][j].parentNode)) {
22491
- jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(box[i][j], cell);
22492
- added = true;
22552
+ else {
22553
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.before(cells[columnIndex], cell);
22554
+ }
22555
+ if (cells[columnIndex].rowSpan > 1) {
22556
+ cell.rowSpan = cells[columnIndex].rowSpan;
22493
22557
  }
22494
22558
  }
22495
- if (!added) {
22496
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan', parseInt((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.attr)(box[i][j], 'colspan') || '1', 10) + 1);
22559
+ else {
22560
+ cells[columnIndex].colSpan += 1;
22497
22561
  }
22562
+ i += cells[columnIndex].rowSpan || 1;
22498
22563
  }
22499
22564
  }
22500
- /**
22501
- * Insert column before / after all the columns containing the selected cells
22502
- */
22503
- appendColumn(table, j, after) {
22504
- return Table.__appendColumn(table, j, after, this.j.createInside);
22505
- }
22506
22565
  static __removeColumn(table, j) {
22507
22566
  const box = Table.__formalMatrix(table);
22508
22567
  let dec;
@@ -22720,7 +22779,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22720
22779
  alreadyMerged.delete(first);
22721
22780
  Table.__unmark(__marked);
22722
22781
  Table.__normalizeTable(table);
22723
- (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.toArray)(table.rows).forEach((tr, index) => {
22782
+ (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.toArray)(table.rows).forEach(tr => {
22724
22783
  if (!tr.cells.length) {
22725
22784
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.safeRemove(tr);
22726
22785
  }
@@ -22729,7 +22788,7 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22729
22788
  }
22730
22789
  }
22731
22790
  /**
22732
- * It combines all of the selected cells into one. The contents of the cells will also be combined
22791
+ * It combines all the selected cells into one. The contents of the cells will also be combined
22733
22792
  */
22734
22793
  mergeSelected(table) {
22735
22794
  return Table.__mergeSelected(table, this.j);
@@ -25070,7 +25129,9 @@ class addNewLine extends jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Plugin {
25070
25129
  editor.e
25071
25130
  .off(editor.editor, '.' + ns)
25072
25131
  .off(editor.container, '.' + ns)
25132
+ .off('.' + ns)
25073
25133
  .on([editor.ow, editor.ew, editor.editor], 'scroll' + '.' + ns, this.__hideForce)
25134
+ .on('finishedCleanHTMLWorker' + '.' + ns, this.__hideForce)
25074
25135
  .on(editor.editor, 'click' + '.' + ns, this.__hide)
25075
25136
  .on(editor.container, 'mouseleave' + '.' + ns, this.__hide)
25076
25137
  .on(editor.editor, 'mousemove' + '.' + ns, this.__onMouseMove);
@@ -25158,7 +25219,8 @@ class addNewLine extends jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Plugin {
25158
25219
  jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(this.__line);
25159
25220
  this.j.e
25160
25221
  .off([this.j.ow, this.j.ew, this.j.editor], '.' + ns)
25161
- .off(this.j.container, '.' + ns);
25222
+ .off(this.j.container, '.' + ns)
25223
+ .off('.' + ns);
25162
25224
  }
25163
25225
  }
25164
25226
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
@@ -26049,6 +26111,7 @@ function checkNotCollapsed(jodit) {
26049
26111
  * ```
26050
26112
  * @private
26051
26113
  */
26114
+ // eslint-disable-next-line complexity
26052
26115
  function checkRemoveChar(jodit, fakeNode, backspace, mode) {
26053
26116
  var _a, _b;
26054
26117
  const step = backspace ? -1 : 1;
@@ -27343,13 +27406,21 @@ function allowAttributes(jodit, nodeElm, hadEffect, allow) {
27343
27406
  */
27344
27407
 
27345
27408
 
27409
+ const TABLE_CONTAINER_TAGS = new Set([
27410
+ 'table',
27411
+ 'tbody',
27412
+ 'thead',
27413
+ 'tfoot',
27414
+ 'tr'
27415
+ ]);
27346
27416
  /**
27347
27417
  * @private
27348
27418
  */
27349
27419
  function fillEmptyParagraph(jodit, nodeElm, hadEffect) {
27350
27420
  if (jodit.o.cleanHTML.fillEmptyParagraph &&
27351
27421
  jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isBlock(nodeElm) &&
27352
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isEmpty(nodeElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
27422
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isEmpty(nodeElm, jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS) &&
27423
+ !jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(nodeElm, TABLE_CONTAINER_TAGS)) {
27353
27424
  const br = jodit.createInside.element('br');
27354
27425
  nodeElm.appendChild(br);
27355
27426
  return true;
@@ -30572,7 +30643,8 @@ class hotkeys extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin *
30572
30643
  constructor() {
30573
30644
  super(...arguments);
30574
30645
  this.onKeyPress = (event) => {
30575
- const special = this.specialKeys[event.which], character = (event.key || String.fromCharCode(event.which)).toLowerCase();
30646
+ const special = this.specialKeys[event.which];
30647
+ const character = (event.key || String.fromCharCode(event.which)).toLowerCase();
30576
30648
  const modif = [special || character];
30577
30649
  ['alt', 'ctrl', 'shift', 'meta'].forEach(specialKey => {
30578
30650
  if (event[specialKey + 'Key'] && special !== specialKey) {
@@ -30666,7 +30738,8 @@ class hotkeys extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin *
30666
30738
  }
30667
30739
  })
30668
30740
  .on('keydown.hotkeys', (event) => {
30669
- const shortcut = this.onKeyPress(event), stop = {
30741
+ const shortcut = this.onKeyPress(event);
30742
+ const stop = {
30670
30743
  shouldStop: true
30671
30744
  };
30672
30745
  const resultOfFire = this.j.e.fire(shortcut + '.hotkey', event.type, stop);
@@ -30840,6 +30913,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeStyle
30840
30913
  '-ms-user-select: none' +
30841
30914
  '}';
30842
30915
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeCSSLinks = [];
30916
+ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeSandbox = null;
30843
30917
 
30844
30918
 
30845
30919
  /***/ }),
@@ -30916,6 +30990,9 @@ function iframe(editor) {
30916
30990
  iframe.setAttribute('allowtransparency', 'true');
30917
30991
  iframe.setAttribute('tabindex', opt.tabIndex.toString());
30918
30992
  iframe.setAttribute('frameborder', '0');
30993
+ if (opt.iframeSandbox != null) {
30994
+ iframe.setAttribute('sandbox', opt.iframeSandbox);
30995
+ }
30919
30996
  editor.workplace.appendChild(iframe);
30920
30997
  editor.iframe = iframe;
30921
30998
  const result = editor.e.fire('generateDocumentStructure.iframe', null, editor);
@@ -36716,13 +36793,13 @@ function generateCriticalCSS(jodit) {
36716
36793
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
36717
36794
  /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71842);
36718
36795
  /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
36719
- /* harmony import */ var jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17527);
36720
- /* harmony import */ var jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(98434);
36721
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(931);
36722
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(36115);
36723
- /* harmony import */ var _lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11131);
36724
- /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59827);
36725
- /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_print_svg__WEBPACK_IMPORTED_MODULE_7__);
36796
+ /* harmony import */ var jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17527);
36797
+ /* harmony import */ var jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98434);
36798
+ /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(931);
36799
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(36115);
36800
+ /* harmony import */ var _lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11131);
36801
+ /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59827);
36802
+ /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_print_svg__WEBPACK_IMPORTED_MODULE_8__);
36726
36803
  /*!
36727
36804
  * Jodit Editor (https://xdsoft.net/jodit/)
36728
36805
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -36737,8 +36814,8 @@ function generateCriticalCSS(jodit) {
36737
36814
 
36738
36815
 
36739
36816
 
36740
- jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__/* .Icon */ .I.set('print', (_print_svg__WEBPACK_IMPORTED_MODULE_7___default()));
36741
- jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.print = {
36817
+ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__/* .Icon */ .I.set('print', (_print_svg__WEBPACK_IMPORTED_MODULE_8___default()));
36818
+ jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T.prototype.controls.print = {
36742
36819
  exec: (editor) => {
36743
36820
  const iframe = editor.create.element('iframe');
36744
36821
  Object.assign(iframe.style, {
@@ -36749,7 +36826,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.pri
36749
36826
  height: 0,
36750
36827
  border: 0
36751
36828
  });
36752
- (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(editor, jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T).appendChild(iframe);
36829
+ (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(editor, jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T).appendChild(iframe);
36753
36830
  const afterFinishPrint = () => {
36754
36831
  editor.e.off(editor.ow, 'mousemove', afterFinishPrint);
36755
36832
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(iframe);
@@ -36765,12 +36842,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.pri
36765
36842
  }
36766
36843
  else {
36767
36844
  myWindow.document.write('<!doctype html><html lang="' +
36768
- (0,jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_8__/* .defaultLanguage */ .e)(editor.o.language) +
36845
+ (0,jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_3__/* .defaultLanguage */ .e)(editor.o.language) +
36769
36846
  '"><head><title></title></head><style>' +
36770
- (0,_lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_6__/* .generateCriticalCSS */ .Y)(editor) +
36847
+ (0,_lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_7__/* .generateCriticalCSS */ .Y)(editor) +
36771
36848
  '</style><body></body></html>');
36772
36849
  myWindow.document.close();
36773
- (0,jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_3__/* .previewBox */ .u)(editor, undefined, 'px', myWindow.document.body);
36850
+ (0,jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_4__/* .previewBox */ .u)(editor, undefined, 'px', myWindow.document.body);
36774
36851
  }
36775
36852
  const style = myWindow.document.createElement('style');
36776
36853
  style.innerHTML = `@media print {
@@ -37846,10 +37923,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('resiz
37846
37923
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
37847
37924
 
37848
37925
  "use strict";
37849
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(931);
37850
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36115);
37851
- /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21917);
37852
- /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_search_svg__WEBPACK_IMPORTED_MODULE_2__);
37926
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
37927
+ /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(931);
37928
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36115);
37929
+ /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21917);
37930
+ /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_search_svg__WEBPACK_IMPORTED_MODULE_3__);
37853
37931
  /*!
37854
37932
  * Jodit Editor (https://xdsoft.net/jodit/)
37855
37933
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -37859,14 +37937,14 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('resiz
37859
37937
 
37860
37938
 
37861
37939
 
37862
- jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.useSearch = true;
37863
- jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.search = {
37940
+
37941
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.useSearch = true;
37942
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.search = {
37864
37943
  lazyIdleTimeout: 0,
37865
- // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
37866
- useCustomHighlightAPI: typeof window.Highlight !== 'undefined'
37944
+ useCustomHighlightAPI: jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow && typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined'
37867
37945
  };
37868
- jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('search', (_search_svg__WEBPACK_IMPORTED_MODULE_2___default()));
37869
- jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.find = {
37946
+ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('search', (_search_svg__WEBPACK_IMPORTED_MODULE_3___default()));
37947
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.find = {
37870
37948
  tooltip: 'Find',
37871
37949
  icon: 'search',
37872
37950
  exec(jodit, _, { control }) {
@@ -37907,8 +37985,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.fin
37907
37985
  /* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
37908
37986
  /* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
37909
37987
  /* harmony export */ });
37910
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
37911
- /* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58720);
37988
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
37989
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
37990
+ /* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58720);
37912
37991
  /*!
37913
37992
  * Jodit Editor (https://xdsoft.net/jodit/)
37914
37993
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -37916,6 +37995,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.fin
37916
37995
  */
37917
37996
 
37918
37997
 
37998
+
37919
37999
  /**
37920
38000
  * @private
37921
38001
  */
@@ -37934,15 +38014,15 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
37934
38014
  const span = ci.element('span', {
37935
38015
  [TMP_ATTR]: true
37936
38016
  });
37937
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.markTemporary(span);
38017
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.markTemporary(span);
37938
38018
  normalizeRanges(rng, restRanges, ci);
37939
38019
  let next = rng.startContainer;
37940
38020
  do {
37941
38021
  if (!next) {
37942
38022
  break;
37943
38023
  }
37944
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isText(next) && !isSelectionWrapper(next.parentNode)) {
37945
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.wrap(next, span.cloneNode(), ci);
38024
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(next) && !isSelectionWrapper(next.parentNode)) {
38025
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.wrap(next, span.cloneNode(), ci);
37946
38026
  }
37947
38027
  if (next === rng.endContainer) {
37948
38028
  break;
@@ -37961,13 +38041,13 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
37961
38041
  * @private
37962
38042
  */
37963
38043
  function getSelectionWrappers(root) {
37964
- return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__.$$)(`[${TMP_ATTR}]`, root);
38044
+ return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__.$$)(`[${TMP_ATTR}]`, root);
37965
38045
  }
37966
38046
  /**
37967
38047
  * @private
37968
38048
  */
37969
38049
  function clearSelectionWrappers(root) {
37970
- getSelectionWrappers(root).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(span));
38050
+ getSelectionWrappers(root).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(span));
37971
38051
  }
37972
38052
  /**
37973
38053
  * @private
@@ -37979,12 +38059,13 @@ function clearSelectionWrappersFromHTML(root) {
37979
38059
  * @private
37980
38060
  */
37981
38061
  function isSelectionWrapper(node) {
37982
- return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
38062
+ return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
37983
38063
  }
37984
38064
  function checkNativeSelectionMethod(jodit, rng, restRanges) {
37985
38065
  if (jodit.o.search.useCustomHighlightAPI &&
37986
38066
  // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
37987
- typeof window.Highlight !== 'undefined') {
38067
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow &&
38068
+ typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined') {
37988
38069
  const ranges = [rng, ...restRanges].map(rng => {
37989
38070
  const range = jodit.selection.createRange();
37990
38071
  range.setStart(rng.startContainer, rng.startOffset);
@@ -38008,7 +38089,7 @@ function normalizeRanges(rng, restRanges, ci) {
38008
38089
  if (rng.startOffset !== 0) {
38009
38090
  const text = ci.text(startText.substring(0, rng.startOffset));
38010
38091
  rng.startContainer.nodeValue = startText.substring(rng.startOffset);
38011
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before(rng.startContainer, text);
38092
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.before(rng.startContainer, text);
38012
38093
  if (rng.startContainer === rng.endContainer) {
38013
38094
  diff = rng.startOffset;
38014
38095
  rng.endOffset -= diff;
@@ -38019,7 +38100,7 @@ function normalizeRanges(rng, restRanges, ci) {
38019
38100
  if (rng.endOffset !== endText.length) {
38020
38101
  const text = ci.text(endText.substring(rng.endOffset));
38021
38102
  rng.endContainer.nodeValue = endText.substring(0, rng.endOffset);
38022
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(rng.endContainer, text);
38103
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after(rng.endContainer, text);
38023
38104
  for (const range of restRanges) {
38024
38105
  if (range.startContainer === rng.endContainer) {
38025
38106
  range.startContainer = text;
@@ -39050,7 +39131,7 @@ class selectCells extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plug
39050
39131
  break;
39051
39132
  case 'addcolumnafter':
39052
39133
  case 'addcolumnbefore':
39053
- this.__tableModule.appendColumn(table, cell.cellIndex, command === 'addcolumnafter');
39134
+ this.__tableModule.appendColumn(table, cell, command === 'addcolumnafter');
39054
39135
  break;
39055
39136
  case 'addrowafter':
39056
39137
  case 'addrowbefore':
@@ -40930,6 +41011,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('spell
40930
41011
 
40931
41012
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showCharsCounter = true;
40932
41013
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.countHTMLChars = false;
41014
+ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.countTextSpaces = false;
40933
41015
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showWordsCounter = true;
40934
41016
 
40935
41017
 
@@ -40976,9 +41058,20 @@ class stat extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plug
40976
41058
  this.calc = this.j.async.throttle(() => {
40977
41059
  const text = this.j.text;
40978
41060
  if (this.j.o.showCharsCounter && this.charCounter) {
40979
- const chars = this.j.o.countHTMLChars
40980
- ? this.j.value
40981
- : text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.SPACE_REG_EXP)(), '');
41061
+ let chars;
41062
+ if (this.j.o.countHTMLChars) {
41063
+ chars = this.j.value;
41064
+ }
41065
+ else {
41066
+ if (this.j.o.countTextSpaces) {
41067
+ chars = text
41068
+ .replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP)(), '')
41069
+ .replace(/[\r\n]/g, '');
41070
+ }
41071
+ else {
41072
+ chars = text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.SPACE_REG_EXP)(), '');
41073
+ }
41074
+ }
40982
41075
  this.charCounter.textContent = this.j.i18n('Chars: %d', chars.length);
40983
41076
  }
40984
41077
  if (this.j.o.showWordsCounter && this.wordCounter) {
@@ -41612,8 +41705,9 @@ __webpack_require__.r(__webpack_exports__);
41612
41705
  /* harmony export */ pt_br: function() { return /* reexport module object */ _pt_br_js__WEBPACK_IMPORTED_MODULE_16__; },
41613
41706
  /* harmony export */ ru: function() { return /* reexport module object */ _ru_js__WEBPACK_IMPORTED_MODULE_17__; },
41614
41707
  /* harmony export */ tr: function() { return /* reexport module object */ _tr_js__WEBPACK_IMPORTED_MODULE_18__; },
41615
- /* harmony export */ zh_cn: function() { return /* reexport module object */ _zh_cn_js__WEBPACK_IMPORTED_MODULE_19__; },
41616
- /* harmony export */ zh_tw: function() { return /* reexport module object */ _zh_tw_js__WEBPACK_IMPORTED_MODULE_20__; }
41708
+ /* harmony export */ ua: function() { return /* reexport module object */ _ua_js__WEBPACK_IMPORTED_MODULE_19__; },
41709
+ /* harmony export */ zh_cn: function() { return /* reexport module object */ _zh_cn_js__WEBPACK_IMPORTED_MODULE_20__; },
41710
+ /* harmony export */ zh_tw: function() { return /* reexport module object */ _zh_tw_js__WEBPACK_IMPORTED_MODULE_21__; }
41617
41711
  /* harmony export */ });
41618
41712
  /* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37605);
41619
41713
  /* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ar_js__WEBPACK_IMPORTED_MODULE_0__);
@@ -41653,10 +41747,12 @@ __webpack_require__.r(__webpack_exports__);
41653
41747
  /* harmony import */ var _ru_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_ru_js__WEBPACK_IMPORTED_MODULE_17__);
41654
41748
  /* harmony import */ var _tr_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(98376);
41655
41749
  /* harmony import */ var _tr_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_tr_js__WEBPACK_IMPORTED_MODULE_18__);
41656
- /* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(47238);
41657
- /* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_zh_cn_js__WEBPACK_IMPORTED_MODULE_19__);
41658
- /* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(72386);
41659
- /* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_zh_tw_js__WEBPACK_IMPORTED_MODULE_20__);
41750
+ /* harmony import */ var _ua_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(28776);
41751
+ /* harmony import */ var _ua_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_ua_js__WEBPACK_IMPORTED_MODULE_19__);
41752
+ /* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(47238);
41753
+ /* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_zh_cn_js__WEBPACK_IMPORTED_MODULE_20__);
41754
+ /* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(72386);
41755
+ /* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_zh_tw_js__WEBPACK_IMPORTED_MODULE_21__);
41660
41756
  /*!
41661
41757
  * Jodit Editor (https://xdsoft.net/jodit/)
41662
41758
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -41684,6 +41780,7 @@ __webpack_require__.r(__webpack_exports__);
41684
41780
 
41685
41781
 
41686
41782
 
41783
+
41687
41784
 
41688
41785
 
41689
41786
  /***/ }),
@@ -41839,6 +41936,23 @@ module.exports = {
41839
41936
  };
41840
41937
 
41841
41938
 
41939
+ /***/ }),
41940
+
41941
+ /***/ 28776:
41942
+ /***/ (function(module) {
41943
+
41944
+ "use strict";
41945
+
41946
+ /*!
41947
+ * Jodit Editor (https://xdsoft.net/jodit/)
41948
+ * Released under MIT see LICENSE.txt in the project root for license information.
41949
+ * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
41950
+ */
41951
+ module.exports = {
41952
+ symbols: 'символ'
41953
+ };
41954
+
41955
+
41842
41956
  /***/ }),
41843
41957
 
41844
41958
  /***/ 47238:
@@ -42409,6 +42523,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.tab
42409
42523
  }
42410
42524
  },
42411
42525
  popup: (editor, current, close, button) => {
42526
+ editor.editor.normalize();
42527
+ const snapshot = editor.history.snapshot.make();
42412
42528
  const control = button.control;
42413
42529
  const default_rows_count = control.data && control.data.rows ? control.data.rows : 10, default_cols_count = control.data && control.data.cols ? control.data.cols : 10;
42414
42530
  const generateExtraClasses = () => {
@@ -42501,10 +42617,24 @@ jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.tab
42501
42617
  table.classList.add(className);
42502
42618
  });
42503
42619
  });
42504
- if (editor.editor.firstChild) {
42505
- editor.s.insertNode(crt.text('\n'), false, false);
42620
+ editor.s.restore();
42621
+ editor.s.removeMarkers();
42622
+ editor.editor.normalize();
42623
+ editor.history.snapshot.restore(snapshot);
42624
+ const block = jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.furthest(editor.s.current(), jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isBlock, editor.editor);
42625
+ if (block && jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isEmpty(block)) {
42626
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.replace(block, table, undefined, false, true);
42627
+ }
42628
+ else {
42629
+ if (block) {
42630
+ const fake = crt.text('\n');
42631
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(block, fake);
42632
+ jodit_core_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(fake, table);
42633
+ }
42634
+ else {
42635
+ editor.s.insertNode(table, false);
42636
+ }
42506
42637
  }
42507
- editor.s.insertNode(table, false);
42508
42638
  if (first_td) {
42509
42639
  editor.s.setCursorIn(first_td);
42510
42640
  (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.scrollIntoViewIfNeeded)(first_td, editor.editor, editor.ed);
@@ -43895,7 +44025,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
43895
44025
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
43896
44026
  PERFORMANCE OF THIS SOFTWARE.
43897
44027
  ***************************************************************************** */
43898
- /* global Reflect, Promise, SuppressedError, Symbol */
44028
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
43899
44029
 
43900
44030
  var extendStatics = function(d, b) {
43901
44031
  extendStatics = Object.setPrototypeOf ||
@@ -44006,8 +44136,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
44006
44136
  }
44007
44137
 
44008
44138
  function __generator(thisArg, body) {
44009
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44010
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
44139
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44140
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
44011
44141
  function verb(n) { return function (v) { return step([n, v]); }; }
44012
44142
  function step(op) {
44013
44143
  if (f) throw new TypeError("Generator is already executing.");
@@ -44111,8 +44241,9 @@ function __await(v) {
44111
44241
  function __asyncGenerator(thisArg, _arguments, generator) {
44112
44242
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
44113
44243
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
44114
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
44115
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
44244
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
44245
+ function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
44246
+ function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
44116
44247
  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
44117
44248
  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
44118
44249
  function fulfill(value) { resume("next", value); }
@@ -44178,16 +44309,18 @@ function __classPrivateFieldIn(state, receiver) {
44178
44309
  function __addDisposableResource(env, value, async) {
44179
44310
  if (value !== null && value !== void 0) {
44180
44311
  if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
44181
- var dispose;
44312
+ var dispose, inner;
44182
44313
  if (async) {
44183
- if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
44184
- dispose = value[Symbol.asyncDispose];
44314
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
44315
+ dispose = value[Symbol.asyncDispose];
44185
44316
  }
44186
44317
  if (dispose === void 0) {
44187
- if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
44188
- dispose = value[Symbol.dispose];
44318
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
44319
+ dispose = value[Symbol.dispose];
44320
+ if (async) inner = dispose;
44189
44321
  }
44190
44322
  if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
44323
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
44191
44324
  env.stack.push({ value: value, dispose: dispose, async: async });
44192
44325
  }
44193
44326
  else if (async) {
@@ -44206,17 +44339,22 @@ function __disposeResources(env) {
44206
44339
  env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
44207
44340
  env.hasError = true;
44208
44341
  }
44342
+ var r, s = 0;
44209
44343
  function next() {
44210
- while (env.stack.length) {
44211
- var rec = env.stack.pop();
44344
+ while (r = env.stack.pop()) {
44212
44345
  try {
44213
- var result = rec.dispose && rec.dispose.call(rec.value);
44214
- if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
44346
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
44347
+ if (r.dispose) {
44348
+ var result = r.dispose.call(r.value);
44349
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
44350
+ }
44351
+ else s |= 1;
44215
44352
  }
44216
44353
  catch (e) {
44217
- fail(e);
44354
+ fail(e);
44218
44355
  }
44219
44356
  }
44357
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
44220
44358
  if (env.hasError) throw env.error;
44221
44359
  }
44222
44360
  return next();