jodit 4.2.27 → 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 (156) hide show
  1. package/.nvmrc +1 -1
  2. package/CHANGELOG.md +104 -5
  3. package/es2015/jodit.css +11 -1
  4. package/es2015/jodit.fat.min.css +1 -1
  5. package/es2015/jodit.fat.min.js +2 -2
  6. package/es2015/jodit.js +330 -230
  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 +11 -1
  15. package/es2018/jodit.fat.min.css +1 -1
  16. package/es2018/jodit.fat.min.js +2 -2
  17. package/es2018/jodit.js +324 -224
  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 +11 -1
  26. package/es2021/jodit.fat.min.css +1 -1
  27. package/es2021/jodit.fat.min.js +2 -2
  28. package/es2021/jodit.js +324 -224
  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 +11 -1
  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 +299 -218
  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 +12 -2
  54. package/es5/jodit.fat.min.css +1 -1
  55. package/es5/jodit.fat.min.js +2 -2
  56. package/es5/jodit.js +753 -5684
  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 +10 -6
  68. package/esm/core/decorators/watch/watch.js +0 -1
  69. package/esm/core/dom/dom.js +2 -2
  70. package/esm/core/event-emitter/event-emitter.js +3 -3
  71. package/esm/core/global.js +13 -3
  72. package/esm/core/helpers/array/to-array.d.ts +1 -6
  73. package/esm/core/helpers/array/to-array.js +1 -1
  74. package/esm/core/helpers/async/set-timeout.d.ts +0 -3
  75. package/esm/core/helpers/async/set-timeout.js +3 -2
  76. package/esm/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
  77. package/esm/core/helpers/checker/has-browser-color-picker.js +2 -1
  78. package/esm/core/helpers/checker/is-url.d.ts +0 -3
  79. package/esm/core/helpers/checker/is-url.js +2 -1
  80. package/esm/core/helpers/html/apply-styles.js +3 -3
  81. package/esm/core/helpers/html/clean-from-word.js +2 -1
  82. package/esm/core/helpers/html/htmlspecialchars.d.ts +0 -3
  83. package/esm/core/helpers/html/htmlspecialchars.js +2 -1
  84. package/esm/core/helpers/normalize/normalize-size.d.ts +1 -1
  85. package/esm/core/helpers/size/get-scroll-parent.js +3 -2
  86. package/esm/core/helpers/utils/complete-url.js +2 -1
  87. package/esm/core/helpers/utils/convert-media-url-to-video-embed.js +2 -1
  88. package/esm/core/helpers/utils/default-language.js +3 -2
  89. package/esm/core/helpers/utils/reset.js +3 -3
  90. package/esm/core/request/ajax.js +2 -1
  91. package/esm/core/selection/selection.js +1 -0
  92. package/esm/core/selection/style/api/has-same-style.js +15 -10
  93. package/esm/core/selection/style/api/toggle-attributes.js +2 -1
  94. package/esm/core/selection/style/commit-style.d.ts +1 -1
  95. package/esm/core/ui/form/inputs/file/file.d.ts +1 -0
  96. package/esm/core/ui/form/inputs/file/file.js +1 -0
  97. package/esm/core/ui/form/validators/input.d.ts +3 -3
  98. package/esm/core/ui/form/validators/select.d.ts +1 -1
  99. package/esm/jodit.js +3 -0
  100. package/esm/modules/file-browser/config.js +9 -1
  101. package/esm/modules/file-browser/data-provider.js +0 -1
  102. package/esm/modules/file-browser/file-browser.js +0 -1
  103. package/esm/modules/table/table.js +0 -1
  104. package/esm/modules/toolbar/button/button.d.ts +1 -1
  105. package/esm/plugins/backspace/cases/check-remove-char.js +1 -0
  106. package/esm/plugins/clean-html/config.d.ts +3 -3
  107. package/esm/plugins/iframe/config.d.ts +15 -3
  108. package/esm/plugins/iframe/config.js +1 -0
  109. package/esm/plugins/iframe/iframe.js +3 -0
  110. package/esm/plugins/indent/helpers.d.ts +1 -1
  111. package/esm/plugins/inline-popup/config/items/a.d.ts +2 -2
  112. package/esm/plugins/inline-popup/config/items/cells.d.ts +1 -1
  113. package/esm/plugins/inline-popup/config/items/img.d.ts +1 -1
  114. package/esm/plugins/search/config.js +2 -2
  115. package/esm/plugins/search/helpers/highlight-text-ranges.js +3 -1
  116. package/esm/plugins/source/editor/engines/ace.d.ts +0 -1
  117. package/esm/plugins/speech-recognize/config.js +1 -1
  118. package/esm/plugins/speech-recognize/helpers/api.d.ts +1 -1
  119. package/esm/plugins/speech-recognize/helpers/api.js +5 -2
  120. package/esm/plugins/speech-recognize/helpers/sound.js +6 -4
  121. package/esm/plugins/stat/config.d.ts +1 -0
  122. package/esm/plugins/stat/config.js +1 -0
  123. package/esm/plugins/stat/stat.js +14 -3
  124. package/esm/plugins/symbols/langs/index.d.ts +2 -1
  125. package/esm/plugins/symbols/langs/index.js +2 -1
  126. package/esm/plugins/symbols/langs/ua.d.ts +1 -0
  127. package/esm/plugins/symbols/langs/ua.js +9 -0
  128. package/esm/polyfills.d.ts +10 -0
  129. package/esm/polyfills.js +54 -0
  130. package/esm/tsconfig.json +1 -1
  131. package/package.json +1 -1
  132. package/types/core/constants.d.ts +2 -0
  133. package/types/core/helpers/array/to-array.d.ts +1 -6
  134. package/types/core/helpers/async/set-timeout.d.ts +0 -3
  135. package/types/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
  136. package/types/core/helpers/checker/is-url.d.ts +0 -3
  137. package/types/core/helpers/html/htmlspecialchars.d.ts +0 -3
  138. package/types/core/helpers/normalize/normalize-size.d.ts +1 -1
  139. package/types/core/selection/style/commit-style.d.ts +1 -1
  140. package/types/core/ui/form/inputs/file/file.d.ts +1 -0
  141. package/types/core/ui/form/validators/input.d.ts +3 -3
  142. package/types/core/ui/form/validators/select.d.ts +1 -1
  143. package/types/modules/toolbar/button/button.d.ts +1 -1
  144. package/types/plugins/clean-html/config.d.ts +3 -3
  145. package/types/plugins/iframe/config.d.ts +15 -3
  146. package/types/plugins/indent/helpers.d.ts +1 -1
  147. package/types/plugins/inline-popup/config/items/a.d.ts +2 -2
  148. package/types/plugins/inline-popup/config/items/cells.d.ts +1 -1
  149. package/types/plugins/inline-popup/config/items/img.d.ts +1 -1
  150. package/types/plugins/source/editor/engines/ace.d.ts +0 -1
  151. package/types/plugins/speech-recognize/helpers/api.d.ts +1 -1
  152. package/types/plugins/stat/config.d.ts +1 -0
  153. package/types/plugins/symbols/langs/index.d.ts +2 -1
  154. package/types/plugins/symbols/langs/ua.d.ts +1 -0
  155. package/types/polyfills.d.ts +10 -0
  156. package/types/tsconfig.json +1 -1
@@ -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.27
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/)
@@ -1090,17 +1086,18 @@ class Async {
1090
1086
  return 0;
1091
1087
  }
1092
1088
  let options = {};
1093
- if ((0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_2__/* .isVoid */ .R)(timeout)) {
1089
+ if ((0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(timeout)) {
1094
1090
  timeout = 0;
1095
1091
  }
1096
- if (!(0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_3__/* .isNumber */ .E)(timeout)) {
1092
+ if (!(0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_4__/* .isNumber */ .E)(timeout)) {
1097
1093
  options = timeout;
1098
1094
  timeout = options.timeout || 0;
1099
1095
  }
1100
1096
  if (options.label) {
1101
1097
  this.clearLabel(options.label);
1102
1098
  }
1103
- const timer = (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .setTimeout */ .w)(callback, timeout, ...args), key = options.label || timer;
1099
+ const timer = (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .setTimeout */ .w)(callback, timeout, ...args);
1100
+ const key = options.label || timer;
1104
1101
  this.timers.set(key, timer);
1105
1102
  this.__callbacks.set(key, callback);
1106
1103
  return timer;
@@ -1116,7 +1113,7 @@ class Async {
1116
1113
  }
1117
1114
  clearLabel(label) {
1118
1115
  if (label && this.timers.has(label)) {
1119
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(this.timers.get(label));
1116
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(this.timers.get(label));
1120
1117
  this.timers.delete(label);
1121
1118
  this.__callbacks.delete(label);
1122
1119
  }
@@ -1125,7 +1122,7 @@ class Async {
1125
1122
  if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__/* .isString */ .K)(timerOrLabel)) {
1126
1123
  return this.clearLabel(timerOrLabel);
1127
1124
  }
1128
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(timerOrLabel);
1125
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(timerOrLabel);
1129
1126
  this.timers.delete(timerOrLabel);
1130
1127
  this.__callbacks.delete(timerOrLabel);
1131
1128
  }
@@ -1167,7 +1164,7 @@ class Async {
1167
1164
  if (!timer && firstCallImmediately) {
1168
1165
  callFn(...args);
1169
1166
  }
1170
- (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(timer);
1167
+ (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(timer);
1171
1168
  timer = this.setTimeout(() => callFn(...args), (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__/* .isFunction */ .T)(timeout) ? timeout() : timeout);
1172
1169
  this.timers.set(fn, timer);
1173
1170
  }
@@ -1321,7 +1318,7 @@ class Async {
1321
1318
  clear() {
1322
1319
  this.requestsIdle.forEach(key => this.cancelIdleCallback(key));
1323
1320
  this.requestsRaf.forEach(key => this.cancelAnimationFrame(key));
1324
- this.timers.forEach(key => (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_4__/* .clearTimeout */ .D)(this.timers.get(key)));
1321
+ this.timers.forEach(key => (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(this.timers.get(key)));
1325
1322
  this.timers.clear();
1326
1323
  this.promisesRejections.forEach(reject => reject());
1327
1324
  this.promisesRejections.clear();
@@ -1730,6 +1727,8 @@ __webpack_require__.r(__webpack_exports__);
1730
1727
  /* harmony export */ TEXT_PLAIN: function() { return /* binding */ TEXT_PLAIN; },
1731
1728
  /* harmony export */ TEXT_RTF: function() { return /* binding */ TEXT_RTF; },
1732
1729
  /* harmony export */ TOKENS: function() { return /* binding */ TOKENS; },
1730
+ /* harmony export */ globalDocument: function() { return /* binding */ globalDocument; },
1731
+ /* harmony export */ globalWindow: function() { return /* binding */ globalWindow; },
1733
1732
  /* harmony export */ lang: function() { return /* binding */ lang; }
1734
1733
  /* harmony export */ });
1735
1734
  /*!
@@ -1737,7 +1736,7 @@ __webpack_require__.r(__webpack_exports__);
1737
1736
  * Released under MIT see LICENSE.txt in the project root for license information.
1738
1737
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1739
1738
  */
1740
- const APP_VERSION = "4.2.27";
1739
+ const APP_VERSION = "4.2.32";
1741
1740
  // prettier-ignore
1742
1741
  const ES = "es2021";
1743
1742
  const IS_ES_MODERN = true;
@@ -1756,6 +1755,10 @@ const INVISIBLE_SPACE_REG_EXP_START = () => /^[\uFEFF]+/g;
1756
1755
  const SPACE_REG_EXP = () => /[\s\n\t\r\uFEFF\u200b]+/g;
1757
1756
  const SPACE_REG_EXP_START = () => /^[\s\n\t\r\uFEFF\u200b]+/g;
1758
1757
  const SPACE_REG_EXP_END = () => /[\s\n\t\r\uFEFF\u200b]+$/g;
1758
+ const globalWindow = typeof window !== 'undefined' ? window : undefined;
1759
+ const globalDocument = typeof document !== 'undefined'
1760
+ ? document
1761
+ : undefined;
1759
1762
  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;
1760
1763
  const IS_INLINE = /^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i;
1761
1764
  const LIST_TAGS = new Set(['ul', 'ol']);
@@ -1880,8 +1883,8 @@ const INSERT_AS_TEXT = 'insert_as_text';
1880
1883
  */
1881
1884
  const INSERT_ONLY_TEXT = 'insert_only_text';
1882
1885
  const SAFE_COUNT_CHANGE_CALL = 10;
1883
- const IS_MAC = typeof window !== 'undefined' &&
1884
- /Mac|iPod|iPhone|iPad/.test(window.navigator.platform);
1886
+ const IS_MAC = typeof globalWindow !== 'undefined' &&
1887
+ /Mac|iPod|iPhone|iPad/.test(globalWindow.navigator.platform);
1885
1888
  const KEY_ALIASES = {
1886
1889
  add: '+',
1887
1890
  break: 'pause',
@@ -1909,7 +1912,7 @@ const BASE_PATH = (() => {
1909
1912
  if (typeof document === 'undefined') {
1910
1913
  return '';
1911
1914
  }
1912
- const script = document.currentScript, removeScriptName = (s) => {
1915
+ const script = globalDocument.currentScript, removeScriptName = (s) => {
1913
1916
  const parts = s.split('/');
1914
1917
  if (/\.js/.test(parts[parts.length - 1])) {
1915
1918
  return parts.slice(0, parts.length - 1).join('/') + '/';
@@ -1919,11 +1922,11 @@ const BASE_PATH = (() => {
1919
1922
  if (script) {
1920
1923
  return removeScriptName(script.src);
1921
1924
  }
1922
- const scripts = document.querySelectorAll('script[src]');
1925
+ const scripts = globalDocument.querySelectorAll('script[src]');
1923
1926
  if (scripts && scripts.length) {
1924
1927
  return removeScriptName(scripts[scripts.length - 1].src);
1925
1928
  }
1926
- return window.location.href;
1929
+ return globalWindow.location.href;
1927
1930
  })();
1928
1931
  const TEMP_ATTR = 'data-jodit-temp';
1929
1932
  const lang = {};
@@ -2667,7 +2670,6 @@ function watch(observeFields, opts) {
2667
2670
  const [objectPath, eventName] = field.split(':');
2668
2671
  let ctx = context;
2669
2672
  if (objectPath.length) {
2670
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
2671
2673
  ctx = component.get(objectPath);
2672
2674
  }
2673
2675
  if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_3__/* .isFunction */ .T)(ctx)) {
@@ -3328,7 +3330,7 @@ class Dom {
3328
3330
  * Move all content to another element
3329
3331
  */
3330
3332
  static moveContent(from, to, inStart = false, filter = () => true) {
3331
- const fragment = (from.ownerDocument || document).createDocumentFragment();
3333
+ const fragment = (from.ownerDocument || jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument).createDocumentFragment();
3332
3334
  (0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__/* .toArray */ .$)(from.childNodes)
3333
3335
  .filter(elm => {
3334
3336
  if (filter(elm)) {
@@ -3785,7 +3787,7 @@ class EventEmitter {
3785
3787
  passive: true,
3786
3788
  capture: options?.capture ?? false
3787
3789
  }
3788
- : options?.capture ?? false;
3790
+ : (options?.capture ?? false);
3789
3791
  syntheticCallback.options = eOpts;
3790
3792
  subject.addEventListener(event, syntheticCallback, eOpts);
3791
3793
  this.__memoryDOMSubjectToHandler(subject, syntheticCallback);
@@ -4016,7 +4018,7 @@ class EventEmitter {
4016
4018
  this.__domEventsMap = new Map();
4017
4019
  this.__mutedEvents = new Set();
4018
4020
  this.__key = '__JoditEventEmitterNamespaces';
4019
- this.__doc = document;
4021
+ this.__doc = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument;
4020
4022
  this.__prepareEvent = (e) => {
4021
4023
  if (e.cancelBubble) {
4022
4024
  return;
@@ -4510,9 +4512,19 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
4510
4512
  const view = (0,jodit_core_helpers_checker_is_view_object__WEBPACK_IMPORTED_MODULE_6__/* .isViewObject */ .h)(jodit) ? jodit : jodit.j;
4511
4513
  if (!data[key]) {
4512
4514
  let c = view.c;
4513
- let body = (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot
4514
- ? jodit.o.shadowRoot
4515
- : jodit.od.body;
4515
+ let body;
4516
+ if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot) {
4517
+ body = jodit.o.shadowRoot;
4518
+ }
4519
+ else {
4520
+ body = jodit.od.body;
4521
+ if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit)) {
4522
+ const dialog = _dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.closest(jodit.container, 'dialog', jodit.od.body);
4523
+ if (dialog) {
4524
+ body = dialog;
4525
+ }
4526
+ }
4527
+ }
4516
4528
  if (createInsideEditor &&
4517
4529
  (0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) &&
4518
4530
  jodit.od !== jodit.ed) {
@@ -4666,7 +4678,7 @@ function splitArray(a) {
4666
4678
  const toArray = function toArray(...args) {
4667
4679
  const func = (0,jodit_core_helpers_checker_is_native_function__WEBPACK_IMPORTED_MODULE_1__/* .isNativeFunction */ .a)(Array.from)
4668
4680
  ? Array.from
4669
- : (0,jodit_core_helpers_utils_reset__WEBPACK_IMPORTED_MODULE_0__/* .reset */ .c)('Array.from') ?? Array.from;
4681
+ : ((0,jodit_core_helpers_utils_reset__WEBPACK_IMPORTED_MODULE_0__/* .reset */ .c)('Array.from') ?? Array.from);
4670
4682
  return func.apply(Array, args);
4671
4683
  };
4672
4684
 
@@ -4703,6 +4715,7 @@ const toArray = function toArray(...args) {
4703
4715
  /* harmony export */ D: function() { return /* binding */ clearTimeout; },
4704
4716
  /* harmony export */ w: function() { return /* binding */ setTimeout; }
4705
4717
  /* harmony export */ });
4718
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
4706
4719
  /*!
4707
4720
  * Jodit Editor (https://xdsoft.net/jodit/)
4708
4721
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -4711,6 +4724,7 @@ const toArray = function toArray(...args) {
4711
4724
  /**
4712
4725
  * @module helpers/async
4713
4726
  */
4727
+
4714
4728
  /**
4715
4729
  * Create async callback if set timeout value - else call function immediately
4716
4730
  */
@@ -4719,7 +4733,7 @@ function setTimeout(callback, timeout, ...args) {
4719
4733
  callback.call(null, ...args);
4720
4734
  }
4721
4735
  else {
4722
- return window.setTimeout(callback, timeout, ...args);
4736
+ return jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.setTimeout(callback, timeout, ...args);
4723
4737
  }
4724
4738
  return 0;
4725
4739
  }
@@ -4727,7 +4741,7 @@ function setTimeout(callback, timeout, ...args) {
4727
4741
  * Clear timeout
4728
4742
  */
4729
4743
  function clearTimeout(timer) {
4730
- window.clearTimeout(timer);
4744
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.clearTimeout(timer);
4731
4745
  }
4732
4746
 
4733
4747
 
@@ -4740,6 +4754,7 @@ function clearTimeout(timer) {
4740
4754
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4741
4755
  /* harmony export */ k: function() { return /* binding */ hasBrowserColorPicker; }
4742
4756
  /* harmony export */ });
4757
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
4743
4758
  /*!
4744
4759
  * Jodit Editor (https://xdsoft.net/jodit/)
4745
4760
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -4748,13 +4763,14 @@ function clearTimeout(timer) {
4748
4763
  /**
4749
4764
  * @module helpers/checker
4750
4765
  */
4766
+
4751
4767
  /**
4752
4768
  * Check if browser has a color picker (a new HTML5 attribute for input tag)
4753
4769
  */
4754
4770
  function hasBrowserColorPicker() {
4755
4771
  let supportsColor = true;
4756
4772
  try {
4757
- const a = document.createElement('input');
4773
+ const a = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('input');
4758
4774
  a.type = 'color';
4759
4775
  a.value = '!';
4760
4776
  supportsColor = a.type === 'color' && a.value !== '!';
@@ -5404,6 +5420,7 @@ function isStringArray(value) {
5404
5420
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5405
5421
  /* harmony export */ m: function() { return /* binding */ isURL; }
5406
5422
  /* harmony export */ });
5423
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
5407
5424
  /*!
5408
5425
  * Jodit Editor (https://xdsoft.net/jodit/)
5409
5426
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -5412,6 +5429,7 @@ function isStringArray(value) {
5412
5429
  /**
5413
5430
  * @module helpers/checker
5414
5431
  */
5432
+
5415
5433
  /**
5416
5434
  * Check if a string is an url
5417
5435
  */
@@ -5428,7 +5446,7 @@ function isURL(str) {
5428
5446
  return false;
5429
5447
  }
5430
5448
  }
5431
- const a = document.createElement('a');
5449
+ const a = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
5432
5450
  a.href = str;
5433
5451
  return Boolean(a.hostname);
5434
5452
  }
@@ -5663,9 +5681,9 @@ function applyStyles(html) {
5663
5681
  }
5664
5682
  html = html.substring(html.indexOf('<html '), html.length);
5665
5683
  html = html.substring(0, html.lastIndexOf('</html>') + '</html>'.length);
5666
- const iframe = document.createElement('iframe');
5684
+ const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
5667
5685
  iframe.style.display = 'none';
5668
- document.body.appendChild(iframe);
5686
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body.appendChild(iframe);
5669
5687
  let convertedString = '', collection = [];
5670
5688
  try {
5671
5689
  const iframeDoc = iframe.contentDocument ||
@@ -5736,9 +5754,10 @@ function applyStyles(html) {
5736
5754
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5737
5755
  /* harmony export */ w: function() { return /* binding */ cleanFromWord; }
5738
5756
  /* harmony export */ });
5739
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
5740
- /* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(42448);
5741
- /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(59101);
5757
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
5758
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
5759
+ /* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42448);
5760
+ /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59101);
5742
5761
  /*!
5743
5762
  * Jodit Editor (https://xdsoft.net/jodit/)
5744
5763
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -5750,6 +5769,7 @@ function applyStyles(html) {
5750
5769
 
5751
5770
 
5752
5771
 
5772
+
5753
5773
  /**
5754
5774
  * The method automatically cleans up content from Microsoft Word and other HTML sources to ensure clean, compliant
5755
5775
  * content that matches the look and feel of the site.
@@ -5761,11 +5781,11 @@ function cleanFromWord(html) {
5761
5781
  }
5762
5782
  let convertedString = '';
5763
5783
  try {
5764
- const div = document.createElement('div');
5784
+ const div = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
5765
5785
  div.innerHTML = html;
5766
5786
  const marks = [];
5767
5787
  if (div.firstChild) {
5768
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.each(div, node => {
5788
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.each(div, node => {
5769
5789
  if (!node) {
5770
5790
  return;
5771
5791
  }
@@ -5780,10 +5800,10 @@ function cleanFromWord(html) {
5780
5800
  case 'W:SDT':
5781
5801
  case 'W:SDTPR':
5782
5802
  case 'FONT':
5783
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(node);
5803
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(node);
5784
5804
  break;
5785
5805
  default:
5786
- (0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__/* .toArray */ .$)(node.attributes).forEach((attr) => {
5806
+ (0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__/* .toArray */ .$)(node.attributes).forEach((attr) => {
5787
5807
  if ([
5788
5808
  'src',
5789
5809
  'href',
@@ -5802,14 +5822,14 @@ function cleanFromWord(html) {
5802
5822
  }
5803
5823
  });
5804
5824
  }
5805
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove.apply(null, marks);
5825
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove.apply(null, marks);
5806
5826
  convertedString = div.innerHTML;
5807
5827
  }
5808
5828
  catch (e) { }
5809
5829
  if (convertedString) {
5810
5830
  html = convertedString;
5811
5831
  }
5812
- html = html.split(/(\n)/).filter(jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_2__/* .trim */ .Bq).join('\n');
5832
+ html = html.split(/(\n)/).filter(jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_3__/* .trim */ .Bq).join('\n');
5813
5833
  return html
5814
5834
  .replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g, '')
5815
5835
  .replace(/<!--[^>]*>/g, '');
@@ -5825,6 +5845,7 @@ function cleanFromWord(html) {
5825
5845
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5826
5846
  /* harmony export */ G: function() { return /* binding */ htmlspecialchars; }
5827
5847
  /* harmony export */ });
5848
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
5828
5849
  /*!
5829
5850
  * Jodit Editor (https://xdsoft.net/jodit/)
5830
5851
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -5833,11 +5854,12 @@ function cleanFromWord(html) {
5833
5854
  /**
5834
5855
  * @module helpers/html
5835
5856
  */
5857
+
5836
5858
  /**
5837
5859
  * Convert special characters to HTML entities
5838
5860
  */
5839
5861
  function htmlspecialchars(html) {
5840
- const tmp = document.createElement('div');
5862
+ const tmp = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
5841
5863
  tmp.textContent = html;
5842
5864
  return tmp.innerHTML;
5843
5865
  }
@@ -6558,8 +6580,9 @@ const getContentWidth = (element, win) => {
6558
6580
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6559
6581
  /* harmony export */ m: function() { return /* binding */ getScrollParent; }
6560
6582
  /* harmony export */ });
6561
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
6562
- /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97369);
6583
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
6584
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
6585
+ /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97369);
6563
6586
  /*!
6564
6587
  * Jodit Editor (https://xdsoft.net/jodit/)
6565
6588
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -6567,19 +6590,20 @@ const getContentWidth = (element, win) => {
6567
6590
  */
6568
6591
 
6569
6592
 
6593
+
6570
6594
  function getScrollParent(node) {
6571
6595
  if (!node) {
6572
6596
  return null;
6573
6597
  }
6574
- const isElement = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isHTMLElement(node);
6575
- const overflowY = isElement && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_1__.css)(node, 'overflowY');
6598
+ const isElement = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(node);
6599
+ const overflowY = isElement && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_2__.css)(node, 'overflowY');
6576
6600
  const isScrollable = isElement && overflowY !== 'visible' && overflowY !== 'hidden';
6577
6601
  if (isScrollable && node.scrollHeight >= node.clientHeight) {
6578
6602
  return node;
6579
6603
  }
6580
6604
  return (getScrollParent(node.parentNode) ||
6581
- document.scrollingElement ||
6582
- document.body);
6605
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.scrollingElement ||
6606
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body);
6583
6607
  }
6584
6608
 
6585
6609
 
@@ -7503,16 +7527,18 @@ const buildQuery = (data, prefix) => {
7503
7527
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7504
7528
  /* harmony export */ X: function() { return /* binding */ completeUrl; }
7505
7529
  /* harmony export */ });
7530
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
7506
7531
  /*!
7507
7532
  * Jodit Editor (https://xdsoft.net/jodit/)
7508
7533
  * Released under MIT see LICENSE.txt in the project root for license information.
7509
7534
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
7510
7535
  */
7536
+
7511
7537
  /**
7512
7538
  * @module helpers/utils
7513
7539
  */
7514
7540
  const completeUrl = (url) => {
7515
- if (window.location.protocol === 'file:' && /^\/\//.test(url)) {
7541
+ if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.location.protocol === 'file:' && /^\/\//.test(url)) {
7516
7542
  url = 'https:' + url;
7517
7543
  }
7518
7544
  return url;
@@ -7629,8 +7655,9 @@ function ConfigFlatten(obj) {
7629
7655
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7630
7656
  /* harmony export */ m: function() { return /* binding */ convertMediaUrlToVideoEmbed; }
7631
7657
  /* harmony export */ });
7632
- /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6939);
7633
- /* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70807);
7658
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
7659
+ /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6939);
7660
+ /* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70807);
7634
7661
  /*!
7635
7662
  * Jodit Editor (https://xdsoft.net/jodit/)
7636
7663
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -7641,14 +7668,15 @@ function ConfigFlatten(obj) {
7641
7668
  */
7642
7669
 
7643
7670
 
7671
+
7644
7672
  /**
7645
7673
  * Javascript url pattern converter replace youtube/vimeo url in embed code.
7646
7674
  */
7647
7675
  const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
7648
- if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__/* .isURL */ .m)(url)) {
7676
+ if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)(url)) {
7649
7677
  return url;
7650
7678
  }
7651
- const parser = document.createElement('a'), pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
7679
+ const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a'), pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
7652
7680
  parser.href = url;
7653
7681
  if (!width) {
7654
7682
  width = 400;
@@ -7674,7 +7702,7 @@ const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
7674
7702
  case 'youtu.be':
7675
7703
  case 'www.youtu.be': {
7676
7704
  const query = parser.search
7677
- ? (0,_parse_query__WEBPACK_IMPORTED_MODULE_1__/* .parseQuery */ .m)(parser.search)
7705
+ ? (0,_parse_query__WEBPACK_IMPORTED_MODULE_2__/* .parseQuery */ .m)(parser.search)
7678
7706
  : { v: parser.pathname.substr(1) };
7679
7707
  return query.v
7680
7708
  ? '<iframe width="' +
@@ -7868,7 +7896,8 @@ const dataBind = (elm, key, value) => {
7868
7896
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7869
7897
  /* harmony export */ e: function() { return /* binding */ defaultLanguage; }
7870
7898
  /* harmony export */ });
7871
- /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(98253);
7899
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
7900
+ /* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98253);
7872
7901
  /*!
7873
7902
  * Jodit Editor (https://xdsoft.net/jodit/)
7874
7903
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -7878,15 +7907,16 @@ const dataBind = (elm, key, value) => {
7878
7907
  * @module helpers/utils
7879
7908
  */
7880
7909
 
7910
+
7881
7911
  /**
7882
7912
  * Try define user language
7883
7913
  */
7884
7914
  const defaultLanguage = (language, defaultLanguage = 'en') => {
7885
- if (language !== 'auto' && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .K)(language)) {
7915
+ if (language !== 'auto' && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .K)(language)) {
7886
7916
  return language;
7887
7917
  }
7888
- if (document.documentElement && document.documentElement.lang) {
7889
- return document.documentElement.lang;
7918
+ if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement && jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement.lang) {
7919
+ return jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement.lang;
7890
7920
  }
7891
7921
  if (navigator.language) {
7892
7922
  return navigator.language.substring(0, 2);
@@ -8637,10 +8667,10 @@ const map = {};
8637
8667
  */
8638
8668
  function reset(key) {
8639
8669
  if (!(key in map)) {
8640
- const iframe = document.createElement('iframe');
8670
+ const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
8641
8671
  try {
8642
8672
  iframe.src = 'about:blank';
8643
- document.body.appendChild(iframe);
8673
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body.appendChild(iframe);
8644
8674
  if (!iframe.contentWindow) {
8645
8675
  return null;
8646
8676
  }
@@ -9567,14 +9597,15 @@ Plugin.requires = [];
9567
9597
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9568
9598
  /* harmony export */ d: function() { return /* binding */ Ajax; }
9569
9599
  /* harmony export */ });
9570
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635);
9600
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
9571
9601
  /* harmony import */ var jodit_core_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64890);
9572
- /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(26318);
9573
- /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65147);
9574
- /* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50156);
9575
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36115);
9576
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27337);
9577
- /* harmony import */ var _response__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(91672);
9602
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
9603
+ /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(26318);
9604
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65147);
9605
+ /* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50156);
9606
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36115);
9607
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27337);
9608
+ /* harmony import */ var _response__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(91672);
9578
9609
  /*!
9579
9610
  * Jodit Editor (https://xdsoft.net/jodit/)
9580
9611
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -9588,33 +9619,34 @@ Plugin.requires = [];
9588
9619
 
9589
9620
 
9590
9621
 
9622
+
9591
9623
  class Ajax {
9592
9624
  className() {
9593
9625
  return 'Ajax';
9594
9626
  }
9595
- constructor(options, defaultAjaxOptions = jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.defaultAjaxOptions) {
9627
+ constructor(options, defaultAjaxOptions = jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.defaultAjaxOptions) {
9596
9628
  this.__async = new jodit_core_async__WEBPACK_IMPORTED_MODULE_0__/* .Async */ .j();
9597
9629
  this.__isFulfilled = false;
9598
9630
  this.__activated = false;
9599
9631
  this.__isDestructed = false;
9600
- this.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.ConfigProto)(options || {}, defaultAjaxOptions);
9632
+ this.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(options || {}, defaultAjaxOptions);
9601
9633
  this.xhr = this.o.xhr ? this.o.xhr() : new XMLHttpRequest();
9602
9634
  }
9603
9635
  __buildParams(obj, prefix) {
9604
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(obj) &&
9636
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(obj) &&
9605
9637
  this.options.contentType &&
9606
9638
  this.options.contentType.includes('application/json')) {
9607
9639
  return JSON.stringify(obj);
9608
9640
  }
9609
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(this.o.queryBuild)) {
9641
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(this.o.queryBuild)) {
9610
9642
  return this.o.queryBuild.call(this, obj, prefix);
9611
9643
  }
9612
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isString)(obj) ||
9613
- obj instanceof window.FormData ||
9614
- (typeof obj === 'object' && obj != null && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(obj.append))) {
9644
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isString)(obj) ||
9645
+ obj instanceof jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.globalWindow.FormData ||
9646
+ (typeof obj === 'object' && obj != null && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(obj.append))) {
9615
9647
  return obj;
9616
9648
  }
9617
- return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.buildQuery)(obj);
9649
+ return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)(obj);
9618
9650
  }
9619
9651
  get o() {
9620
9652
  return this.options;
@@ -9637,16 +9669,16 @@ class Ajax {
9637
9669
  return this.__async.promise(async (resolve, reject) => {
9638
9670
  const onReject = () => {
9639
9671
  this.__isFulfilled = true;
9640
- reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .connection */ .FI('Connection error'));
9672
+ reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI('Connection error'));
9641
9673
  };
9642
9674
  const onResolve = () => {
9643
9675
  this.__isFulfilled = true;
9644
- resolve(new _response__WEBPACK_IMPORTED_MODULE_5__/* .Response */ .Y(request, xhr.status, xhr.statusText, !xhr.responseType ? xhr.responseText : xhr.response));
9676
+ resolve(new _response__WEBPACK_IMPORTED_MODULE_6__/* .Response */ .Y(request, xhr.status, xhr.statusText, !xhr.responseType ? xhr.responseText : xhr.response));
9645
9677
  };
9646
9678
  xhr.onload = onResolve;
9647
9679
  xhr.onabort = () => {
9648
9680
  this.__isFulfilled = true;
9649
- reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .abort */ .h2('Abort connection'));
9681
+ reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .abort */ .h2('Abort connection'));
9650
9682
  };
9651
9683
  xhr.onerror = onReject;
9652
9684
  xhr.ontimeout = onReject;
@@ -9668,7 +9700,7 @@ class Ajax {
9668
9700
  }
9669
9701
  else if (xhr.statusText) {
9670
9702
  this.__isFulfilled = true;
9671
- reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .connection */ .FI(xhr.statusText));
9703
+ reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI(xhr.statusText));
9672
9704
  }
9673
9705
  }
9674
9706
  };
@@ -9679,7 +9711,7 @@ class Ajax {
9679
9711
  xhr.setRequestHeader('Content-type', o.contentType);
9680
9712
  }
9681
9713
  let { headers } = o;
9682
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(headers)) {
9714
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(headers)) {
9683
9715
  headers = await headers.call(this);
9684
9716
  }
9685
9717
  if (headers && xhr.setRequestHeader) {
@@ -9695,22 +9727,22 @@ class Ajax {
9695
9727
  }
9696
9728
  prepareRequest() {
9697
9729
  if (!this.o.url) {
9698
- throw jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_2__/* .error */ .z3('Need URL for AJAX request');
9730
+ throw jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .error */ .z3('Need URL for AJAX request');
9699
9731
  }
9700
9732
  let url = this.o.url;
9701
9733
  const data = this.o.data;
9702
9734
  const method = (this.o.method || 'get').toLowerCase();
9703
- if (method === 'get' && data && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isPlainObject)(data)) {
9735
+ if (method === 'get' && data && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(data)) {
9704
9736
  const qIndex = url.indexOf('?');
9705
9737
  if (qIndex !== -1) {
9706
- const urlData = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.parseQuery)(url);
9738
+ const urlData = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.parseQuery)(url);
9707
9739
  url =
9708
9740
  url.substring(0, qIndex) +
9709
9741
  '?' +
9710
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.buildQuery)({ ...urlData, ...data });
9742
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)({ ...urlData, ...data });
9711
9743
  }
9712
9744
  else {
9713
- url += '?' + (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.buildQuery)(this.o.data);
9745
+ url += '?' + (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)(this.o.data);
9714
9746
  }
9715
9747
  }
9716
9748
  const request = {
@@ -9734,8 +9766,8 @@ class Ajax {
9734
9766
  }
9735
9767
  }
9736
9768
  Ajax.log = [];
9737
- (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
9738
- jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Ay
9769
+ (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
9770
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Ay
9739
9771
  ], Ajax.prototype, "destruct", null);
9740
9772
 
9741
9773
 
@@ -10620,6 +10652,7 @@ class Selection {
10620
10652
  /**
10621
10653
  * Call callback for all selection node
10622
10654
  */
10655
+ // eslint-disable-next-line complexity
10623
10656
  eachSelection(callback) {
10624
10657
  const sel = this.sel;
10625
10658
  if (!sel || !sel.rangeCount) {
@@ -11400,12 +11433,13 @@ function getSuitParent(style, node, root) {
11400
11433
  /* harmony export */ Y: function() { return /* binding */ hasSameStyleKeys; },
11401
11434
  /* harmony export */ g: function() { return /* binding */ hasSameStyle; }
11402
11435
  /* harmony export */ });
11403
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
11404
- /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35642);
11405
- /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(59678);
11406
- /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28712);
11407
- /* 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__);
11408
- /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38322);
11436
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
11437
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
11438
+ /* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35642);
11439
+ /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(59678);
11440
+ /* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28712);
11441
+ /* 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__);
11442
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38322);
11409
11443
  /*!
11410
11444
  * Jodit Editor (https://xdsoft.net/jodit/)
11411
11445
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -11416,48 +11450,53 @@ function getSuitParent(style, node, root) {
11416
11450
 
11417
11451
 
11418
11452
 
11453
+
11419
11454
  /**
11420
11455
  * Element has the same styles as in the commit
11421
11456
  * @private
11422
11457
  */
11423
11458
  function hasSameStyle(elm, rules) {
11424
- return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isTag(elm, 'font') &&
11425
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isHTMLElement(elm) &&
11459
+ return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'font') &&
11460
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(elm) &&
11426
11461
  Object.keys(rules).every(property => {
11427
- const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(elm, property, true);
11462
+ const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__/* .css */ .A)(elm, property, true);
11428
11463
  if (value === '' &&
11429
11464
  (rules[property] === '' || rules[property] == null)) {
11430
11465
  return true;
11431
11466
  }
11432
- return (!(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(value) &&
11467
+ return (!(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__/* .isVoid */ .R)(value) &&
11433
11468
  value !== '' &&
11434
- !(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(rules[property]) &&
11435
- (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_4__/* .normalizeCssValue */ .iy)(property, rules[property])
11469
+ !(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__/* .isVoid */ .R)(rules[property]) &&
11470
+ (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_5__/* .normalizeCssValue */ .iy)(property, rules[property])
11436
11471
  .toString()
11437
11472
  .toLowerCase() === value.toString().toLowerCase());
11438
11473
  }));
11439
11474
  }
11440
- const elm = document.createElement('div');
11441
- elm.style.color = 'red';
11442
- void 0;
11443
- void 0;
11444
- void 0;
11475
+ if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument) {
11476
+ const elm = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
11477
+ elm.style.color = 'red';
11478
+ void 0;
11479
+ void 0;
11480
+ void 0;
11481
+ }
11445
11482
  /**
11446
11483
  * Element has the similar styles keys
11447
11484
  */
11448
11485
  function hasSameStyleKeys(elm, rules) {
11449
- return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isTag(elm, 'font') &&
11450
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isHTMLElement(elm) &&
11486
+ return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'font') &&
11487
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(elm) &&
11451
11488
  Object.keys(rules).every(property => {
11452
- const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(elm, property, true);
11489
+ const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__/* .css */ .A)(elm, property, true);
11453
11490
  return value !== '';
11454
11491
  }));
11455
11492
  }
11456
- const elm2 = document.createElement('div');
11457
- elm2.style.color = 'red';
11458
- void 0;
11459
- void 0;
11460
- void 0;
11493
+ if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument) {
11494
+ const elm2 = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
11495
+ elm2.style.color = 'red';
11496
+ void 0;
11497
+ void 0;
11498
+ void 0;
11499
+ }
11461
11500
 
11462
11501
 
11463
11502
  /***/ }),
@@ -11838,16 +11877,17 @@ function wrapList(commitStyle, wrapper, jodit) {
11838
11877
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
11839
11878
  /* harmony export */ Y: function() { return /* binding */ toggleAttributes; }
11840
11879
  /* harmony export */ });
11841
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
11842
- /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56298);
11843
- /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9823);
11844
- /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59678);
11845
- /* harmony import */ var jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95350);
11846
- /* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(449);
11847
- /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97369);
11848
- /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(38322);
11849
- /* harmony import */ var jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(72197);
11850
- /* harmony import */ var jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(12043);
11880
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
11881
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
11882
+ /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
11883
+ /* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9823);
11884
+ /* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59678);
11885
+ /* harmony import */ var jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95350);
11886
+ /* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(449);
11887
+ /* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97369);
11888
+ /* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(38322);
11889
+ /* harmony import */ var jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(72197);
11890
+ /* harmony import */ var jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(12043);
11851
11891
  /*!
11852
11892
  * Jodit Editor (https://xdsoft.net/jodit/)
11853
11893
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -11863,6 +11903,7 @@ function wrapList(commitStyle, wrapper, jodit) {
11863
11903
 
11864
11904
 
11865
11905
 
11906
+
11866
11907
  const tak = 'toggleAttributes';
11867
11908
  /**
11868
11909
  * Toggles attributes
@@ -11874,7 +11915,7 @@ function toggleAttributes(commitStyle, elm, jodit, mode, dry = false) {
11874
11915
  }
11875
11916
  !dry && commitStyle.setApplied(elm, tak);
11876
11917
  const { attributes } = commitStyle.options;
11877
- if (attributes && (0,jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_3__/* .size */ .E)(attributes) > 0) {
11918
+ if (attributes && (0,jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_4__/* .size */ .E)(attributes) > 0) {
11878
11919
  Object.keys(attributes).forEach((key) => {
11879
11920
  const value = attributes[key];
11880
11921
  switch (key) {
@@ -11896,24 +11937,24 @@ function toggleAttributes(commitStyle, elm, jodit, mode, dry = false) {
11896
11937
  function toggleStyle(commitStyle, jodit, style, elm, dry, mode) {
11897
11938
  void 0;
11898
11939
  Object.keys(style).forEach((rule) => {
11899
- const inlineValue = elm.style.getPropertyValue((0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_6__/* .kebabCase */ .k)(rule));
11940
+ const inlineValue = elm.style.getPropertyValue((0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_7__/* .kebabCase */ .k)(rule));
11900
11941
  const newValue = style[rule];
11901
11942
  if (inlineValue === '' && newValue == null) {
11902
11943
  return;
11903
11944
  }
11904
11945
  if (getNativeCSSValue(jodit, elm, rule) ===
11905
- (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_7__/* .normalizeCssValue */ .iy)(rule, newValue)) {
11946
+ (0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_8__/* .normalizeCssValue */ .iy)(rule, newValue)) {
11906
11947
  if (!inlineValue) {
11907
11948
  return;
11908
11949
  }
11909
- !dry && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(elm, rule, null);
11910
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNSET */ .Ag;
11950
+ !dry && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(elm, rule, null);
11951
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
11911
11952
  mode = removeExtraStyleAttribute(commitStyle, elm, mode);
11912
11953
  return;
11913
11954
  }
11914
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .CHANGE */ .PL;
11955
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
11915
11956
  if (!dry) {
11916
- (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(elm, rule, newValue);
11957
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(elm, rule, newValue);
11917
11958
  mode = removeExtraStyleAttribute(commitStyle, elm, mode);
11918
11959
  }
11919
11960
  });
@@ -11921,19 +11962,19 @@ function toggleStyle(commitStyle, jodit, style, elm, dry, mode) {
11921
11962
  }
11922
11963
  function toggleClass(jodit, value, elm, mode, dry) {
11923
11964
  void 0;
11924
- const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* ._PREFIX */ .ar}AfterToggleAttribute`);
11965
+ const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* ._PREFIX */ .ar}AfterToggleAttribute`);
11925
11966
  if (elm.classList.contains(value.toString())) {
11926
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNSET */ .Ag;
11967
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
11927
11968
  if (!dry) {
11928
11969
  elm.classList.remove(value);
11929
11970
  if (elm.classList.length === 0) {
11930
- (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'class', null);
11971
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'class', null);
11931
11972
  hook(mode, elm, 'class', null);
11932
11973
  }
11933
11974
  }
11934
11975
  }
11935
11976
  else {
11936
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .CHANGE */ .PL;
11977
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
11937
11978
  if (!dry) {
11938
11979
  elm.classList.add(value);
11939
11980
  hook(mode, elm, 'class', value);
@@ -11943,16 +11984,16 @@ function toggleClass(jodit, value, elm, mode, dry) {
11943
11984
  }
11944
11985
  function toggleAttribute(jodit, value, elm, key, dry, mode) {
11945
11986
  void 0;
11946
- const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* ._PREFIX */ .ar}AfterToggleAttribute`);
11947
- if ((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, key) === value) {
11948
- !dry && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, key, null);
11949
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNSET */ .Ag;
11987
+ const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* ._PREFIX */ .ar}AfterToggleAttribute`);
11988
+ if ((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key) === value) {
11989
+ !dry && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key, null);
11990
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
11950
11991
  !dry && hook(mode, elm, key, value);
11951
11992
  return mode;
11952
11993
  }
11953
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .CHANGE */ .PL;
11994
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
11954
11995
  if (!dry) {
11955
- (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, key, value);
11996
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key, value);
11956
11997
  hook(mode, elm, key, value);
11957
11998
  }
11958
11999
  return mode;
@@ -11962,11 +12003,11 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
11962
12003
  * and if it is default, it removes the element itself
11963
12004
  */
11964
12005
  function removeExtraStyleAttribute(commitStyle, elm, mode) {
11965
- if (!(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style')) {
11966
- (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.attr)(elm, 'style', null);
12006
+ if (!(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'style')) {
12007
+ (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'style', null);
11967
12008
  if (elm.tagName.toLowerCase() === commitStyle.defaultTag) {
11968
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(elm);
11969
- mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_9__/* .UNWRAP */ .OJ;
12009
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(elm);
12010
+ mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNWRAP */ .OJ;
11970
12011
  }
11971
12012
  }
11972
12013
  return mode;
@@ -11975,12 +12016,12 @@ function removeExtraStyleAttribute(commitStyle, elm, mode) {
11975
12016
  * Creates an iframe into which elements will be inserted to test their default styles in the browser
11976
12017
  */
11977
12018
  function getShadowRoot(jodit) {
11978
- if ((0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__/* .dataBind */ .m)(jodit, 'shadowRoot') !== undefined) {
11979
- return (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__/* .dataBind */ .m)(jodit, 'shadowRoot');
12019
+ if ((0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot') !== undefined) {
12020
+ return (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot');
11980
12021
  }
11981
- const container = (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .getContainer */ .My)(jodit);
11982
- const iframe = document.createElement('iframe');
11983
- (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(iframe, {
12022
+ const container = (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(jodit);
12023
+ const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
12024
+ (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(iframe, {
11984
12025
  width: 0,
11985
12026
  height: 0,
11986
12027
  position: 'absolute',
@@ -11990,7 +12031,7 @@ function getShadowRoot(jodit) {
11990
12031
  container.appendChild(iframe);
11991
12032
  const doc = iframe.contentWindow?.document;
11992
12033
  const shadowRoot = !doc ? jodit.od.body : doc.body;
11993
- (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_5__/* .dataBind */ .m)(jodit, 'shadowRoot', shadowRoot);
12034
+ (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot', shadowRoot);
11994
12035
  return shadowRoot;
11995
12036
  }
11996
12037
  /**
@@ -12001,8 +12042,8 @@ function getNativeCSSValue(jodit, elm, key) {
12001
12042
  newElm.style.cssText = elm.style.cssText;
12002
12043
  const root = getShadowRoot(jodit);
12003
12044
  root.appendChild(newElm);
12004
- const result = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_8__/* .css */ .A)(newElm, key);
12005
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(newElm);
12045
+ const result = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(newElm, key);
12046
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(newElm);
12006
12047
  return result;
12007
12048
  }
12008
12049
 
@@ -14030,6 +14071,7 @@ let UIFileInput = class UIFileInput extends jodit_core_ui_form_inputs_input_inpu
14030
14071
  }
14031
14072
  createContainer(options) {
14032
14073
  this.button = new jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_0__/* .UIButton */ .lD(this.j, {
14074
+ tooltip: options.tooltip,
14033
14075
  icon: {
14034
14076
  name: 'plus'
14035
14077
  }
@@ -14466,8 +14508,8 @@ __webpack_require__.r(__webpack_exports__);
14466
14508
  /* harmony export */ required: function() { return /* binding */ required; },
14467
14509
  /* harmony export */ url: function() { return /* binding */ url; }
14468
14510
  /* harmony export */ });
14469
- /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6939);
14470
- /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(59101);
14511
+ /* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6939);
14512
+ /* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59101);
14471
14513
  /*!
14472
14514
  * Jodit Editor (https://xdsoft.net/jodit/)
14473
14515
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -14479,7 +14521,7 @@ __webpack_require__.r(__webpack_exports__);
14479
14521
  * Input is required
14480
14522
  */
14481
14523
  const required = function (input) {
14482
- if (!(0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_0__/* .trim */ .Bq)(input.value).length) {
14524
+ if (!(0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__/* .trim */ .Bq)(input.value).length) {
14483
14525
  input.error = 'Please fill out this field';
14484
14526
  return false;
14485
14527
  }
@@ -14489,7 +14531,7 @@ const required = function (input) {
14489
14531
  * Input value should be valid URL
14490
14532
  */
14491
14533
  const url = function (input) {
14492
- 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))) {
14534
+ 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))) {
14493
14535
  input.error = 'Please enter a web address';
14494
14536
  return false;
14495
14537
  }
@@ -17043,6 +17085,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
17043
17085
  }
17044
17086
  }
17045
17087
  catch (e) {
17088
+ if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_PROD) {
17089
+ throw e;
17090
+ }
17046
17091
  this.destruct();
17047
17092
  throw e;
17048
17093
  }
@@ -19014,10 +19059,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.filebrowser
19014
19059
  jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.filebrowser = {
19015
19060
  upload: {
19016
19061
  icon: 'plus',
19062
+ tooltip: 'Upload file',
19017
19063
  isInput: true,
19018
19064
  isDisabled: (browser) => !browser.dataProvider.canI('FileUpload'),
19019
- getContent: (filebrowser) => {
19065
+ getContent: (filebrowser, btnInt) => {
19020
19066
  const btn = new jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__/* .UIFileInput */ .n(filebrowser, {
19067
+ tooltip: btnInt.control.tooltip,
19021
19068
  onlyImages: filebrowser.state.onlyImages
19022
19069
  });
19023
19070
  filebrowser.e.fire('bindUploader.filebrowser', btn.container);
@@ -19026,6 +19073,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19026
19073
  },
19027
19074
  remove: {
19028
19075
  icon: 'bin',
19076
+ tooltip: 'Remove file',
19029
19077
  isDisabled: (browser) => {
19030
19078
  return (!browser.state.activeElements.length ||
19031
19079
  !browser.dataProvider.canI('FileRemove'));
@@ -19035,11 +19083,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19035
19083
  }
19036
19084
  },
19037
19085
  update: {
19086
+ tooltip: 'Update file list',
19038
19087
  exec: (editor) => {
19039
19088
  editor.e.fire('update.filebrowser');
19040
19089
  }
19041
19090
  },
19042
19091
  select: {
19092
+ tooltip: 'Select file',
19043
19093
  icon: 'check',
19044
19094
  isDisabled: (browser) => !browser.state.activeElements.length,
19045
19095
  exec: (editor) => {
@@ -19047,6 +19097,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19047
19097
  }
19048
19098
  },
19049
19099
  edit: {
19100
+ tooltip: 'Edit image',
19050
19101
  icon: 'pencil',
19051
19102
  isDisabled: (browser) => {
19052
19103
  const selected = browser.state.activeElements;
@@ -19060,6 +19111,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19060
19111
  }
19061
19112
  },
19062
19113
  tiles: {
19114
+ tooltip: 'Tiles view',
19063
19115
  icon: 'th',
19064
19116
  isActive: (filebrowser) => filebrowser.state.view === 'tiles',
19065
19117
  exec: (filebrowser) => {
@@ -19067,6 +19119,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
19067
19119
  }
19068
19120
  },
19069
19121
  list: {
19122
+ tooltip: 'List view',
19070
19123
  icon: 'th-list',
19071
19124
  isActive: (filebrowser) => filebrowser.state.view === 'list',
19072
19125
  exec: (filebrowser) => {
@@ -19480,7 +19533,6 @@ let DataProvider = class DataProvider {
19480
19533
  data: {}
19481
19534
  };
19482
19535
  }
19483
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
19484
19536
  const query = this.o[type];
19485
19537
  if (query.data === undefined) {
19486
19538
  query.data = {
@@ -19726,7 +19778,6 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19726
19778
  get dataProvider() {
19727
19779
  return (0,_factories__WEBPACK_IMPORTED_MODULE_16__/* .makeDataProvider */ .S)(this, this.options);
19728
19780
  }
19729
- // eslint-disable-next-line no-unused-vars
19730
19781
  onSelect(callback) {
19731
19782
  return () => {
19732
19783
  if (this.state.activeElements.length) {
@@ -22239,7 +22290,6 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
22239
22290
  const selector = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.cssPath)(td);
22240
22291
  selector && selectors.push(selector);
22241
22292
  });
22242
- // eslint-disable-next-line no-prototype-builtins
22243
22293
  style.innerHTML = selectors.length
22244
22294
  ? selectors.join(',') +
22245
22295
  `{${this.jodit.options.table.selectionCellStyle}}`
@@ -25985,6 +26035,7 @@ function checkNotCollapsed(jodit) {
25985
26035
  * ```
25986
26036
  * @private
25987
26037
  */
26038
+ // eslint-disable-next-line complexity
25988
26039
  function checkRemoveChar(jodit, fakeNode, backspace, mode) {
25989
26040
  const step = backspace ? -1 : 1;
25990
26041
  const anotherSibling = jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, !backspace);
@@ -30384,6 +30435,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeStyle
30384
30435
  '-ms-user-select: none' +
30385
30436
  '}';
30386
30437
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeCSSLinks = [];
30438
+ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeSandbox = null;
30387
30439
 
30388
30440
 
30389
30441
  /***/ }),
@@ -30460,6 +30512,9 @@ function iframe(editor) {
30460
30512
  iframe.setAttribute('allowtransparency', 'true');
30461
30513
  iframe.setAttribute('tabindex', opt.tabIndex.toString());
30462
30514
  iframe.setAttribute('frameborder', '0');
30515
+ if (opt.iframeSandbox != null) {
30516
+ iframe.setAttribute('sandbox', opt.iframeSandbox);
30517
+ }
30463
30518
  editor.workplace.appendChild(iframe);
30464
30519
  editor.iframe = iframe;
30465
30520
  const result = editor.e.fire('generateDocumentStructure.iframe', null, editor);
@@ -35815,13 +35870,13 @@ function generateCriticalCSS(jodit) {
35815
35870
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
35816
35871
  /* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71842);
35817
35872
  /* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
35818
- /* harmony import */ var jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(17527);
35819
- /* harmony import */ var jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(98434);
35820
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(931);
35821
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(36115);
35822
- /* harmony import */ var _lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11131);
35823
- /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(59827);
35824
- /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_print_svg__WEBPACK_IMPORTED_MODULE_7__);
35873
+ /* harmony import */ var jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17527);
35874
+ /* harmony import */ var jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98434);
35875
+ /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(931);
35876
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(36115);
35877
+ /* harmony import */ var _lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11131);
35878
+ /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59827);
35879
+ /* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_print_svg__WEBPACK_IMPORTED_MODULE_8__);
35825
35880
  /*!
35826
35881
  * Jodit Editor (https://xdsoft.net/jodit/)
35827
35882
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -35836,8 +35891,8 @@ function generateCriticalCSS(jodit) {
35836
35891
 
35837
35892
 
35838
35893
 
35839
- jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_4__/* .Icon */ .I.set('print', (_print_svg__WEBPACK_IMPORTED_MODULE_7___default()));
35840
- jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.print = {
35894
+ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__/* .Icon */ .I.set('print', (_print_svg__WEBPACK_IMPORTED_MODULE_8___default()));
35895
+ jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T.prototype.controls.print = {
35841
35896
  exec: (editor) => {
35842
35897
  const iframe = editor.create.element('iframe');
35843
35898
  Object.assign(iframe.style, {
@@ -35848,7 +35903,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.pri
35848
35903
  height: 0,
35849
35904
  border: 0
35850
35905
  });
35851
- (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(editor, jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T).appendChild(iframe);
35906
+ (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(editor, jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T).appendChild(iframe);
35852
35907
  const afterFinishPrint = () => {
35853
35908
  editor.e.off(editor.ow, 'mousemove', afterFinishPrint);
35854
35909
  jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(iframe);
@@ -35864,12 +35919,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.pri
35864
35919
  }
35865
35920
  else {
35866
35921
  myWindow.document.write('<!doctype html><html lang="' +
35867
- (0,jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_8__/* .defaultLanguage */ .e)(editor.o.language) +
35922
+ (0,jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_3__/* .defaultLanguage */ .e)(editor.o.language) +
35868
35923
  '"><head><title></title></head><style>' +
35869
- (0,_lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_6__/* .generateCriticalCSS */ .Y)(editor) +
35924
+ (0,_lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_7__/* .generateCriticalCSS */ .Y)(editor) +
35870
35925
  '</style><body></body></html>');
35871
35926
  myWindow.document.close();
35872
- (0,jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_3__/* .previewBox */ .u)(editor, undefined, 'px', myWindow.document.body);
35927
+ (0,jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_4__/* .previewBox */ .u)(editor, undefined, 'px', myWindow.document.body);
35873
35928
  }
35874
35929
  const style = myWindow.document.createElement('style');
35875
35930
  style.innerHTML = `@media print {
@@ -36945,10 +37000,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('resiz
36945
37000
  /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
36946
37001
 
36947
37002
  "use strict";
36948
- /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(931);
36949
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36115);
36950
- /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21917);
36951
- /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_search_svg__WEBPACK_IMPORTED_MODULE_2__);
37003
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
37004
+ /* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(931);
37005
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36115);
37006
+ /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21917);
37007
+ /* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_search_svg__WEBPACK_IMPORTED_MODULE_3__);
36952
37008
  /*!
36953
37009
  * Jodit Editor (https://xdsoft.net/jodit/)
36954
37010
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -36958,14 +37014,14 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('resiz
36958
37014
 
36959
37015
 
36960
37016
 
36961
- jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.useSearch = true;
36962
- jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.search = {
37017
+
37018
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.useSearch = true;
37019
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.search = {
36963
37020
  lazyIdleTimeout: 0,
36964
- // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
36965
- useCustomHighlightAPI: typeof window.Highlight !== 'undefined'
37021
+ useCustomHighlightAPI: jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow && typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined'
36966
37022
  };
36967
- jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('search', (_search_svg__WEBPACK_IMPORTED_MODULE_2___default()));
36968
- jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.find = {
37023
+ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('search', (_search_svg__WEBPACK_IMPORTED_MODULE_3___default()));
37024
+ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.find = {
36969
37025
  tooltip: 'Find',
36970
37026
  icon: 'search',
36971
37027
  exec(jodit, _, { control }) {
@@ -37006,8 +37062,9 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.fin
37006
37062
  /* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
37007
37063
  /* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
37008
37064
  /* harmony export */ });
37009
- /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55186);
37010
- /* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(58720);
37065
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
37066
+ /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
37067
+ /* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58720);
37011
37068
  /*!
37012
37069
  * Jodit Editor (https://xdsoft.net/jodit/)
37013
37070
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -37015,6 +37072,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.fin
37015
37072
  */
37016
37073
 
37017
37074
 
37075
+
37018
37076
  /**
37019
37077
  * @private
37020
37078
  */
@@ -37033,15 +37091,15 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
37033
37091
  const span = ci.element('span', {
37034
37092
  [TMP_ATTR]: true
37035
37093
  });
37036
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.markTemporary(span);
37094
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.markTemporary(span);
37037
37095
  normalizeRanges(rng, restRanges, ci);
37038
37096
  let next = rng.startContainer;
37039
37097
  do {
37040
37098
  if (!next) {
37041
37099
  break;
37042
37100
  }
37043
- if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isText(next) && !isSelectionWrapper(next.parentNode)) {
37044
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.wrap(next, span.cloneNode(), ci);
37101
+ if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(next) && !isSelectionWrapper(next.parentNode)) {
37102
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.wrap(next, span.cloneNode(), ci);
37045
37103
  }
37046
37104
  if (next === rng.endContainer) {
37047
37105
  break;
@@ -37060,13 +37118,13 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
37060
37118
  * @private
37061
37119
  */
37062
37120
  function getSelectionWrappers(root) {
37063
- return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_1__.$$)(`[${TMP_ATTR}]`, root);
37121
+ return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__.$$)(`[${TMP_ATTR}]`, root);
37064
37122
  }
37065
37123
  /**
37066
37124
  * @private
37067
37125
  */
37068
37126
  function clearSelectionWrappers(root) {
37069
- getSelectionWrappers(root).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.unwrap(span));
37127
+ getSelectionWrappers(root).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(span));
37070
37128
  }
37071
37129
  /**
37072
37130
  * @private
@@ -37078,12 +37136,13 @@ function clearSelectionWrappersFromHTML(root) {
37078
37136
  * @private
37079
37137
  */
37080
37138
  function isSelectionWrapper(node) {
37081
- return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
37139
+ return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
37082
37140
  }
37083
37141
  function checkNativeSelectionMethod(jodit, rng, restRanges) {
37084
37142
  if (jodit.o.search.useCustomHighlightAPI &&
37085
37143
  // @ts-ignore Because Highlight is not defined in the types TS 5.3.3
37086
- typeof window.Highlight !== 'undefined') {
37144
+ jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow &&
37145
+ typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined') {
37087
37146
  const ranges = [rng, ...restRanges].map(rng => {
37088
37147
  const range = jodit.selection.createRange();
37089
37148
  range.setStart(rng.startContainer, rng.startOffset);
@@ -37107,7 +37166,7 @@ function normalizeRanges(rng, restRanges, ci) {
37107
37166
  if (rng.startOffset !== 0) {
37108
37167
  const text = ci.text(startText.substring(0, rng.startOffset));
37109
37168
  rng.startContainer.nodeValue = startText.substring(rng.startOffset);
37110
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before(rng.startContainer, text);
37169
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.before(rng.startContainer, text);
37111
37170
  if (rng.startContainer === rng.endContainer) {
37112
37171
  diff = rng.startOffset;
37113
37172
  rng.endOffset -= diff;
@@ -37118,7 +37177,7 @@ function normalizeRanges(rng, restRanges, ci) {
37118
37177
  if (rng.endOffset !== endText.length) {
37119
37178
  const text = ci.text(endText.substring(rng.endOffset));
37120
37179
  rng.endContainer.nodeValue = endText.substring(0, rng.endOffset);
37121
- jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after(rng.endContainer, text);
37180
+ jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after(rng.endContainer, text);
37122
37181
  for (const range of restRanges) {
37123
37182
  if (range.startContainer === rng.endContainer) {
37124
37183
  range.startContainer = text;
@@ -39573,6 +39632,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('spell
39573
39632
 
39574
39633
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showCharsCounter = true;
39575
39634
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.countHTMLChars = false;
39635
+ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.countTextSpaces = false;
39576
39636
  jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showWordsCounter = true;
39577
39637
 
39578
39638
 
@@ -39619,9 +39679,20 @@ class stat extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plug
39619
39679
  this.calc = this.j.async.throttle(() => {
39620
39680
  const text = this.j.text;
39621
39681
  if (this.j.o.showCharsCounter && this.charCounter) {
39622
- const chars = this.j.o.countHTMLChars
39623
- ? this.j.value
39624
- : text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.SPACE_REG_EXP)(), '');
39682
+ let chars;
39683
+ if (this.j.o.countHTMLChars) {
39684
+ chars = this.j.value;
39685
+ }
39686
+ else {
39687
+ if (this.j.o.countTextSpaces) {
39688
+ chars = text
39689
+ .replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP)(), '')
39690
+ .replace(/[\r\n]/g, '');
39691
+ }
39692
+ else {
39693
+ chars = text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.SPACE_REG_EXP)(), '');
39694
+ }
39695
+ }
39625
39696
  this.charCounter.textContent = this.j.i18n('Chars: %d', chars.length);
39626
39697
  }
39627
39698
  if (this.j.o.showWordsCounter && this.wordCounter) {
@@ -40085,6 +40156,7 @@ __webpack_require__.r(__webpack_exports__);
40085
40156
  /* harmony export */ pt_br: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
40086
40157
  /* harmony export */ ru: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
40087
40158
  /* harmony export */ tr: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
40159
+ /* harmony export */ ua: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
40088
40160
  /* harmony export */ zh_cn: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; },
40089
40161
  /* harmony export */ zh_tw: function() { return /* reexport module object */ _ar_js__WEBPACK_IMPORTED_MODULE_0__; }
40090
40162
  /* harmony export */ });
@@ -40117,6 +40189,7 @@ __webpack_require__.r(__webpack_exports__);
40117
40189
 
40118
40190
 
40119
40191
 
40192
+
40120
40193
 
40121
40194
 
40122
40195
  /***/ }),
@@ -42017,7 +42090,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
42017
42090
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
42018
42091
  PERFORMANCE OF THIS SOFTWARE.
42019
42092
  ***************************************************************************** */
42020
- /* global Reflect, Promise, SuppressedError, Symbol */
42093
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
42021
42094
 
42022
42095
  var extendStatics = function(d, b) {
42023
42096
  extendStatics = Object.setPrototypeOf ||
@@ -42128,8 +42201,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
42128
42201
  }
42129
42202
 
42130
42203
  function __generator(thisArg, body) {
42131
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
42132
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
42204
+ 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);
42205
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
42133
42206
  function verb(n) { return function (v) { return step([n, v]); }; }
42134
42207
  function step(op) {
42135
42208
  if (f) throw new TypeError("Generator is already executing.");
@@ -42233,8 +42306,9 @@ function __await(v) {
42233
42306
  function __asyncGenerator(thisArg, _arguments, generator) {
42234
42307
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
42235
42308
  var g = generator.apply(thisArg, _arguments || []), i, q = [];
42236
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
42237
- 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); }); }; }
42309
+ return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
42310
+ function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
42311
+ 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]); } }
42238
42312
  function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
42239
42313
  function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
42240
42314
  function fulfill(value) { resume("next", value); }
@@ -42300,16 +42374,18 @@ function __classPrivateFieldIn(state, receiver) {
42300
42374
  function __addDisposableResource(env, value, async) {
42301
42375
  if (value !== null && value !== void 0) {
42302
42376
  if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
42303
- var dispose;
42377
+ var dispose, inner;
42304
42378
  if (async) {
42305
- if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
42306
- dispose = value[Symbol.asyncDispose];
42379
+ if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
42380
+ dispose = value[Symbol.asyncDispose];
42307
42381
  }
42308
42382
  if (dispose === void 0) {
42309
- if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
42310
- dispose = value[Symbol.dispose];
42383
+ if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
42384
+ dispose = value[Symbol.dispose];
42385
+ if (async) inner = dispose;
42311
42386
  }
42312
42387
  if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
42388
+ if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
42313
42389
  env.stack.push({ value: value, dispose: dispose, async: async });
42314
42390
  }
42315
42391
  else if (async) {
@@ -42328,17 +42404,22 @@ function __disposeResources(env) {
42328
42404
  env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
42329
42405
  env.hasError = true;
42330
42406
  }
42407
+ var r, s = 0;
42331
42408
  function next() {
42332
- while (env.stack.length) {
42333
- var rec = env.stack.pop();
42409
+ while (r = env.stack.pop()) {
42334
42410
  try {
42335
- var result = rec.dispose && rec.dispose.call(rec.value);
42336
- if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
42411
+ if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
42412
+ if (r.dispose) {
42413
+ var result = r.dispose.call(r.value);
42414
+ if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
42415
+ }
42416
+ else s |= 1;
42337
42417
  }
42338
42418
  catch (e) {
42339
- fail(e);
42419
+ fail(e);
42340
42420
  }
42341
42421
  }
42422
+ if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
42342
42423
  if (env.hasError) throw env.error;
42343
42424
  }
42344
42425
  return next();