tinymce_plugins_wordcount.js 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. import {
  2. __commonJS
  3. } from "./chunk-2LSFTFF7.js";
  4. // node_modules/.pnpm/tinymce@5.10.7/node_modules/tinymce/plugins/wordcount/plugin.js
  5. var require_plugin = __commonJS({
  6. "node_modules/.pnpm/tinymce@5.10.7/node_modules/tinymce/plugins/wordcount/plugin.js"() {
  7. (function() {
  8. "use strict";
  9. var global$2 = tinymce.util.Tools.resolve("tinymce.PluginManager");
  10. var identity = function(x) {
  11. return x;
  12. };
  13. var __assign = function() {
  14. __assign = Object.assign || function __assign2(t) {
  15. for (var s, i = 1, n = arguments.length; i < n; i++) {
  16. s = arguments[i];
  17. for (var p in s)
  18. if (Object.prototype.hasOwnProperty.call(s, p))
  19. t[p] = s[p];
  20. }
  21. return t;
  22. };
  23. return __assign.apply(this, arguments);
  24. };
  25. var zeroWidth = "\uFEFF";
  26. var removeZwsp$1 = function(s) {
  27. return s.replace(/\uFEFF/g, "");
  28. };
  29. var map = function(xs, f) {
  30. var len = xs.length;
  31. var r = new Array(len);
  32. for (var i = 0; i < len; i++) {
  33. var x = xs[i];
  34. r[i] = f(x, i);
  35. }
  36. return r;
  37. };
  38. var punctuationStr = "[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]";
  39. var regExps = {
  40. aletter: "[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]",
  41. midnumlet: "[-'\\.‘’․﹒'.]",
  42. midletter: "[:··״‧︓﹕:]",
  43. midnum: "[±+*/,;;։،؍٬߸⁄︐︔﹐﹔,;]",
  44. numeric: "[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",
  45. cr: "\\r",
  46. lf: "\\n",
  47. newline: "[\v\f…\u2028\u2029]",
  48. extend: "[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ऀ-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣஂா-ூெ-ைொ-்ௗఁ-ఃా-ౄె-ైొ-్ౕౖౢౣಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣംഃാ-ൄെ-ൈൊ-്ൗൢൣංඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ູົຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳា-៓៝᠋-᠍ᢩᤠ-ᤫᤰ-᤻ᦰ-ᧀᧈᧉᨗ-ᨛᩕ-ᩞ᩠-᩿᩼ᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-᯦᮪-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭ᳲ᷀-ᷦ᷼-᷿‌‍⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲꙼꙽꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣠-꣱ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꨩ-ꨶꩃꩌꩍꩻꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꯣ-ꯪ꯬꯭ﬞ︀-️︠-゙゚︦]",
  49. format: "[­؀-؃۝܏឴឵‎‏‪-‮⁠-⁤-\uFEFF-]",
  50. katakana: "[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]",
  51. extendnumlet: "[=_‿⁀⁔︳︴﹍-﹏_∀-⋿<>]",
  52. punctuation: punctuationStr
  53. };
  54. var characterIndices = {
  55. ALETTER: 0,
  56. MIDNUMLET: 1,
  57. MIDLETTER: 2,
  58. MIDNUM: 3,
  59. NUMERIC: 4,
  60. CR: 5,
  61. LF: 6,
  62. NEWLINE: 7,
  63. EXTEND: 8,
  64. FORMAT: 9,
  65. KATAKANA: 10,
  66. EXTENDNUMLET: 11,
  67. AT: 12,
  68. OTHER: 13
  69. };
  70. var SETS$1 = [
  71. new RegExp(regExps.aletter),
  72. new RegExp(regExps.midnumlet),
  73. new RegExp(regExps.midletter),
  74. new RegExp(regExps.midnum),
  75. new RegExp(regExps.numeric),
  76. new RegExp(regExps.cr),
  77. new RegExp(regExps.lf),
  78. new RegExp(regExps.newline),
  79. new RegExp(regExps.extend),
  80. new RegExp(regExps.format),
  81. new RegExp(regExps.katakana),
  82. new RegExp(regExps.extendnumlet),
  83. new RegExp("@")
  84. ];
  85. var EMPTY_STRING$1 = "";
  86. var PUNCTUATION$1 = new RegExp("^" + regExps.punctuation + "$");
  87. var WHITESPACE$1 = /^\s+$/;
  88. var SETS = SETS$1;
  89. var OTHER = characterIndices.OTHER;
  90. var getType = function(char) {
  91. var type = OTHER;
  92. var setsLength = SETS.length;
  93. for (var j = 0; j < setsLength; ++j) {
  94. var set = SETS[j];
  95. if (set && set.test(char)) {
  96. type = j;
  97. break;
  98. }
  99. }
  100. return type;
  101. };
  102. var memoize = function(func) {
  103. var cache = {};
  104. return function(char) {
  105. if (cache[char]) {
  106. return cache[char];
  107. } else {
  108. var result = func(char);
  109. cache[char] = result;
  110. return result;
  111. }
  112. };
  113. };
  114. var classify = function(characters) {
  115. var memoized = memoize(getType);
  116. return map(characters, memoized);
  117. };
  118. var isWordBoundary = function(map2, index) {
  119. var type = map2[index];
  120. var nextType = map2[index + 1];
  121. if (index < 0 || index > map2.length - 1 && index !== 0) {
  122. return false;
  123. }
  124. if (type === characterIndices.ALETTER && nextType === characterIndices.ALETTER) {
  125. return false;
  126. }
  127. var nextNextType = map2[index + 2];
  128. if (type === characterIndices.ALETTER && (nextType === characterIndices.MIDLETTER || nextType === characterIndices.MIDNUMLET || nextType === characterIndices.AT) && nextNextType === characterIndices.ALETTER) {
  129. return false;
  130. }
  131. var prevType = map2[index - 1];
  132. if ((type === characterIndices.MIDLETTER || type === characterIndices.MIDNUMLET || nextType === characterIndices.AT) && nextType === characterIndices.ALETTER && prevType === characterIndices.ALETTER) {
  133. return false;
  134. }
  135. if ((type === characterIndices.NUMERIC || type === characterIndices.ALETTER) && (nextType === characterIndices.NUMERIC || nextType === characterIndices.ALETTER)) {
  136. return false;
  137. }
  138. if ((type === characterIndices.MIDNUM || type === characterIndices.MIDNUMLET) && nextType === characterIndices.NUMERIC && prevType === characterIndices.NUMERIC) {
  139. return false;
  140. }
  141. if (type === characterIndices.NUMERIC && (nextType === characterIndices.MIDNUM || nextType === characterIndices.MIDNUMLET) && nextNextType === characterIndices.NUMERIC) {
  142. return false;
  143. }
  144. if (type === characterIndices.EXTEND || type === characterIndices.FORMAT || prevType === characterIndices.EXTEND || prevType === characterIndices.FORMAT || nextType === characterIndices.EXTEND || nextType === characterIndices.FORMAT) {
  145. return false;
  146. }
  147. if (type === characterIndices.CR && nextType === characterIndices.LF) {
  148. return false;
  149. }
  150. if (type === characterIndices.NEWLINE || type === characterIndices.CR || type === characterIndices.LF) {
  151. return true;
  152. }
  153. if (nextType === characterIndices.NEWLINE || nextType === characterIndices.CR || nextType === characterIndices.LF) {
  154. return true;
  155. }
  156. if (type === characterIndices.KATAKANA && nextType === characterIndices.KATAKANA) {
  157. return false;
  158. }
  159. if (nextType === characterIndices.EXTENDNUMLET && (type === characterIndices.ALETTER || type === characterIndices.NUMERIC || type === characterIndices.KATAKANA || type === characterIndices.EXTENDNUMLET)) {
  160. return false;
  161. }
  162. if (type === characterIndices.EXTENDNUMLET && (nextType === characterIndices.ALETTER || nextType === characterIndices.NUMERIC || nextType === characterIndices.KATAKANA)) {
  163. return false;
  164. }
  165. if (type === characterIndices.AT) {
  166. return false;
  167. }
  168. return true;
  169. };
  170. var EMPTY_STRING = EMPTY_STRING$1;
  171. var WHITESPACE = WHITESPACE$1;
  172. var PUNCTUATION = PUNCTUATION$1;
  173. var isProtocol = function(str) {
  174. return str === "http" || str === "https";
  175. };
  176. var findWordEnd = function(characters, startIndex) {
  177. var i;
  178. for (i = startIndex; i < characters.length; i++) {
  179. if (WHITESPACE.test(characters[i])) {
  180. break;
  181. }
  182. }
  183. return i;
  184. };
  185. var findUrlEnd = function(characters, startIndex) {
  186. var endIndex = findWordEnd(characters, startIndex + 1);
  187. var peakedWord = characters.slice(startIndex + 1, endIndex).join(EMPTY_STRING);
  188. return peakedWord.substr(0, 3) === "://" ? endIndex : startIndex;
  189. };
  190. var findWords = function(chars, sChars, characterMap, options) {
  191. var words = [];
  192. var word = [];
  193. for (var i = 0; i < characterMap.length; ++i) {
  194. word.push(chars[i]);
  195. if (isWordBoundary(characterMap, i)) {
  196. var ch = sChars[i];
  197. if ((options.includeWhitespace || !WHITESPACE.test(ch)) && (options.includePunctuation || !PUNCTUATION.test(ch))) {
  198. var startOfWord = i - word.length + 1;
  199. var endOfWord = i + 1;
  200. var str = sChars.slice(startOfWord, endOfWord).join(EMPTY_STRING);
  201. if (isProtocol(str)) {
  202. var endOfUrl = findUrlEnd(sChars, i);
  203. var url = chars.slice(endOfWord, endOfUrl);
  204. Array.prototype.push.apply(word, url);
  205. i = endOfUrl;
  206. }
  207. words.push(word);
  208. }
  209. word = [];
  210. }
  211. }
  212. return words;
  213. };
  214. var getDefaultOptions = function() {
  215. return {
  216. includeWhitespace: false,
  217. includePunctuation: false
  218. };
  219. };
  220. var getWords$1 = function(chars, extract, options) {
  221. options = __assign(__assign({}, getDefaultOptions()), options);
  222. var filteredChars = [];
  223. var extractedChars = [];
  224. for (var i = 0; i < chars.length; i++) {
  225. var ch = extract(chars[i]);
  226. if (ch !== zeroWidth) {
  227. filteredChars.push(chars[i]);
  228. extractedChars.push(ch);
  229. }
  230. }
  231. var characterMap = classify(extractedChars);
  232. return findWords(filteredChars, extractedChars, characterMap, options);
  233. };
  234. var getWords = getWords$1;
  235. var global$1 = tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");
  236. var getText = function(node, schema) {
  237. var blockElements = schema.getBlockElements();
  238. var shortEndedElements = schema.getShortEndedElements();
  239. var isNewline = function(node2) {
  240. return blockElements[node2.nodeName] || shortEndedElements[node2.nodeName];
  241. };
  242. var textBlocks = [];
  243. var txt = "";
  244. var treeWalker = new global$1(node, node);
  245. while (node = treeWalker.next()) {
  246. if (node.nodeType === 3) {
  247. txt += removeZwsp$1(node.data);
  248. } else if (isNewline(node) && txt.length) {
  249. textBlocks.push(txt);
  250. txt = "";
  251. }
  252. }
  253. if (txt.length) {
  254. textBlocks.push(txt);
  255. }
  256. return textBlocks;
  257. };
  258. var removeZwsp = function(text) {
  259. return text.replace(/\u200B/g, "");
  260. };
  261. var strLen = function(str) {
  262. return str.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "_").length;
  263. };
  264. var countWords = function(node, schema) {
  265. var text = removeZwsp(getText(node, schema).join("\n"));
  266. return getWords(text.split(""), identity).length;
  267. };
  268. var countCharacters = function(node, schema) {
  269. var text = getText(node, schema).join("");
  270. return strLen(text);
  271. };
  272. var countCharactersWithoutSpaces = function(node, schema) {
  273. var text = getText(node, schema).join("").replace(/\s/g, "");
  274. return strLen(text);
  275. };
  276. var createBodyCounter = function(editor, count) {
  277. return function() {
  278. return count(editor.getBody(), editor.schema);
  279. };
  280. };
  281. var createSelectionCounter = function(editor, count) {
  282. return function() {
  283. return count(editor.selection.getRng().cloneContents(), editor.schema);
  284. };
  285. };
  286. var createBodyWordCounter = function(editor) {
  287. return createBodyCounter(editor, countWords);
  288. };
  289. var get = function(editor) {
  290. return {
  291. body: {
  292. getWordCount: createBodyWordCounter(editor),
  293. getCharacterCount: createBodyCounter(editor, countCharacters),
  294. getCharacterCountWithoutSpaces: createBodyCounter(editor, countCharactersWithoutSpaces)
  295. },
  296. selection: {
  297. getWordCount: createSelectionCounter(editor, countWords),
  298. getCharacterCount: createSelectionCounter(editor, countCharacters),
  299. getCharacterCountWithoutSpaces: createSelectionCounter(editor, countCharactersWithoutSpaces)
  300. },
  301. getCount: createBodyWordCounter(editor)
  302. };
  303. };
  304. var open = function(editor, api) {
  305. editor.windowManager.open({
  306. title: "Word Count",
  307. body: {
  308. type: "panel",
  309. items: [{
  310. type: "table",
  311. header: [
  312. "Count",
  313. "Document",
  314. "Selection"
  315. ],
  316. cells: [
  317. [
  318. "Words",
  319. String(api.body.getWordCount()),
  320. String(api.selection.getWordCount())
  321. ],
  322. [
  323. "Characters (no spaces)",
  324. String(api.body.getCharacterCountWithoutSpaces()),
  325. String(api.selection.getCharacterCountWithoutSpaces())
  326. ],
  327. [
  328. "Characters",
  329. String(api.body.getCharacterCount()),
  330. String(api.selection.getCharacterCount())
  331. ]
  332. ]
  333. }]
  334. },
  335. buttons: [{
  336. type: "cancel",
  337. name: "close",
  338. text: "Close",
  339. primary: true
  340. }]
  341. });
  342. };
  343. var register$1 = function(editor, api) {
  344. editor.addCommand("mceWordCount", function() {
  345. return open(editor, api);
  346. });
  347. };
  348. var global = tinymce.util.Tools.resolve("tinymce.util.Delay");
  349. var fireWordCountUpdate = function(editor, api) {
  350. editor.fire("wordCountUpdate", {
  351. wordCount: {
  352. words: api.body.getWordCount(),
  353. characters: api.body.getCharacterCount(),
  354. charactersWithoutSpaces: api.body.getCharacterCountWithoutSpaces()
  355. }
  356. });
  357. };
  358. var updateCount = function(editor, api) {
  359. fireWordCountUpdate(editor, api);
  360. };
  361. var setup = function(editor, api, delay) {
  362. var debouncedUpdate = global.debounce(function() {
  363. return updateCount(editor, api);
  364. }, delay);
  365. editor.on("init", function() {
  366. updateCount(editor, api);
  367. global.setEditorTimeout(editor, function() {
  368. editor.on("SetContent BeforeAddUndo Undo Redo ViewUpdate keyup", debouncedUpdate);
  369. }, 0);
  370. });
  371. };
  372. var register = function(editor) {
  373. var onAction = function() {
  374. return editor.execCommand("mceWordCount");
  375. };
  376. editor.ui.registry.addButton("wordcount", {
  377. tooltip: "Word count",
  378. icon: "character-count",
  379. onAction
  380. });
  381. editor.ui.registry.addMenuItem("wordcount", {
  382. text: "Word count",
  383. icon: "character-count",
  384. onAction
  385. });
  386. };
  387. function Plugin(delay) {
  388. if (delay === void 0) {
  389. delay = 300;
  390. }
  391. global$2.add("wordcount", function(editor) {
  392. var api = get(editor);
  393. register$1(editor, api);
  394. register(editor);
  395. setup(editor, api, delay);
  396. return api;
  397. });
  398. }
  399. Plugin();
  400. })();
  401. }
  402. });
  403. // node_modules/.pnpm/tinymce@5.10.7/node_modules/tinymce/plugins/wordcount/index.js
  404. require_plugin();
  405. //# sourceMappingURL=tinymce_plugins_wordcount.js.map