card-mod-tinymce_editor 0.15.5 → 0.15.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/assets/script/nest_editor.js.coffee +76 -63
  3. data/assets/script/script_tinymce.js +2 -2
  4. data/assets/script/tinymce_config.js.coffee +6 -0
  5. data/data/files/mod_tinymce_editor_script_asset_output/file.js +15 -17
  6. data/public/icons/default/icons.min.js +1 -0
  7. data/public/jquery.tinymce.min.js +40 -41
  8. data/public/langs/{readme.md → README.md} +0 -0
  9. data/public/license.txt +0 -0
  10. data/public/plugins/advlist/plugin.min.js +2 -2
  11. data/public/plugins/anchor/plugin.min.js +2 -2
  12. data/public/plugins/autolink/plugin.min.js +2 -2
  13. data/public/plugins/autoresize/plugin.min.js +2 -2
  14. data/public/plugins/autosave/plugin.min.js +2 -2
  15. data/public/plugins/bbcode/plugin.min.js +2 -2
  16. data/public/plugins/charmap/plugin.min.js +2 -2
  17. data/public/plugins/code/plugin.min.js +2 -2
  18. data/public/plugins/codesample/plugin.min.js +2 -2
  19. data/public/plugins/colorpicker/plugin.min.js +2 -2
  20. data/public/plugins/contextmenu/plugin.min.js +2 -2
  21. data/public/plugins/directionality/plugin.min.js +2 -2
  22. data/public/plugins/emoticons/js/emojiimages.js +9424 -0
  23. data/public/plugins/emoticons/js/emojiimages.min.js +3 -0
  24. data/public/plugins/emoticons/js/emojis.js +1916 -1508
  25. data/public/plugins/emoticons/js/emojis.min.js +2 -2
  26. data/public/plugins/emoticons/plugin.min.js +2 -2
  27. data/public/plugins/fullpage/plugin.min.js +2 -2
  28. data/public/plugins/fullscreen/plugin.min.js +2 -2
  29. data/public/plugins/help/plugin.min.js +2 -2
  30. data/public/plugins/hr/plugin.min.js +2 -2
  31. data/public/plugins/image/plugin.min.js +2 -2
  32. data/public/plugins/imagetools/plugin.min.js +2 -2
  33. data/public/plugins/importcss/plugin.min.js +2 -2
  34. data/public/plugins/insertdatetime/plugin.min.js +2 -2
  35. data/public/plugins/legacyoutput/plugin.min.js +2 -2
  36. data/public/plugins/link/plugin.min.js +2 -2
  37. data/public/plugins/lists/plugin.min.js +2 -2
  38. data/public/plugins/media/plugin.min.js +2 -2
  39. data/public/plugins/nonbreaking/plugin.min.js +2 -2
  40. data/public/plugins/noneditable/plugin.min.js +2 -2
  41. data/public/plugins/pagebreak/plugin.min.js +2 -2
  42. data/public/plugins/paste/plugin.min.js +2 -2
  43. data/public/plugins/preview/plugin.min.js +2 -2
  44. data/public/plugins/print/plugin.min.js +2 -2
  45. data/public/plugins/quickbars/plugin.min.js +2 -2
  46. data/public/plugins/save/plugin.min.js +2 -2
  47. data/public/plugins/searchreplace/plugin.min.js +2 -2
  48. data/public/plugins/spellchecker/plugin.min.js +2 -2
  49. data/public/plugins/tabfocus/plugin.min.js +2 -2
  50. data/public/plugins/table/plugin.min.js +2 -2
  51. data/public/plugins/template/plugin.min.js +2 -2
  52. data/public/plugins/textcolor/plugin.min.js +2 -2
  53. data/public/plugins/textpattern/plugin.min.js +2 -2
  54. data/public/plugins/toc/plugin.min.js +2 -2
  55. data/public/plugins/visualblocks/plugin.min.js +2 -2
  56. data/public/plugins/visualchars/plugin.min.js +2 -2
  57. data/public/plugins/wordcount/plugin.min.js +2 -2
  58. data/public/skins/content/dark/content.min.css +7 -0
  59. data/public/skins/content/default/content.min.css +1 -1
  60. data/public/skins/content/document/content.min.css +1 -1
  61. data/public/skins/content/writer/content.min.css +1 -1
  62. data/public/skins/ui/oxide/content.inline.min.css +1 -1
  63. data/public/skins/ui/oxide/content.min.css +1 -1
  64. data/public/skins/ui/oxide/content.mobile.min.css +0 -0
  65. data/public/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  66. data/public/skins/ui/oxide/skin.min.css +1 -1
  67. data/public/skins/ui/oxide/skin.mobile.min.css +1 -1
  68. data/public/skins/ui/oxide/skin.shadowdom.min.css +7 -0
  69. data/public/skins/ui/oxide-dark/content.inline.min.css +1 -1
  70. data/public/skins/ui/oxide-dark/content.min.css +1 -1
  71. data/public/skins/ui/oxide-dark/content.mobile.min.css +0 -0
  72. data/public/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  73. data/public/skins/ui/oxide-dark/skin.min.css +1 -1
  74. data/public/skins/ui/oxide-dark/skin.mobile.min.css +1 -1
  75. data/public/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
  76. data/public/themes/mobile/theme.min.js +2 -2
  77. data/public/themes/silver/theme.min.js +2 -2
  78. data/public/tinymce.d.ts +3039 -0
  79. data/public/tinymce.min.js +2 -2
  80. data/set/all/reference_editor/link_editor.rb +1 -1
  81. metadata +15 -8
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(v){"use strict";var t,e,n,r,o,i=function(t){var e=t,n=function(){return e};return{get:n,set:function(t){e=t},clone:function(){return i(n())}}},a=tinymce.util.Tools.resolve("tinymce.PluginManager"),s=function(t){return!(!/(^|[ ,])powerpaste([, ]|$)/.test(t.settings.plugins)||!a.get("powerpaste")||("undefined"!=typeof v.window.console&&v.window.console.log&&v.window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),0))},u=function(t,e){return{clipboard:t,quirks:e}},f=function(t,e,n,r){return t.fire("PastePreProcess",{content:e,internal:n,wordContent:r})},d=function(t,e,n,r){return t.fire("PastePostProcess",{node:e,internal:n,wordContent:r})},c=function(t,e){return t.fire("PastePlainTextToggle",{state:e})},g=function(t,e){return t.fire("paste",{ieFake:e})},l=function(t,e){"text"===e.pasteFormat.get()?(e.pasteFormat.set("html"),c(t,!1)):(e.pasteFormat.set("text"),c(t,!0)),t.focus()},m=function(t,n){t.addCommand("mceTogglePlainTextPaste",function(){l(t,n)}),t.addCommand("mceInsertClipboardContent",function(t,e){e.content&&n.pasteHtml(e.content,e.internal),e.text&&n.pasteText(e.text)})},p=function(t){return function(){return t}},h=p(!1),y=p(!0),b=h,x=y,P=function(){return w},w=(r={fold:function(t,e){return t()},is:b,isSome:b,isNone:x,getOr:n=function(t){return t},getOrThunk:e=function(t){return t()},getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:n,orThunk:e,map:P,ap:P,each:function(){},bind:P,flatten:P,exists:b,forall:x,filter:P,equals:t=function(t){return t.isNone()},equals_:t,toArray:function(){return[]},toString:p("none()")},Object.freeze&&Object.freeze(r),r),_=function(n){var t=function(){return n},e=function(){return o},r=function(t){return t(n)},o={fold:function(t,e){return e(n)},is:function(t){return n===t},isSome:x,isNone:b,getOr:t,getOrThunk:t,getOrDie:t,getOrNull:t,getOrUndefined:t,or:e,orThunk:e,map:function(t){return _(t(n))},ap:function(t){return t.fold(P,function(t){return _(t(n))})},each:function(t){t(n)},bind:r,flatten:t,exists:r,forall:r,filter:function(t){return t(n)?o:w},equals:function(t){return t.is(n)},equals_:function(t,e){return t.fold(b,function(t){return e(n,t)})},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},T={some:_,none:P,from:function(t){return null===t||t===undefined?w:_(t)}},D=(o="function",function(t){return function(t){if(null===t)return"null";var e=typeof t;return"object"===e&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"===e&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":e}(t)===o}),C=Array.prototype.slice,k=function(t,e){for(var n=t.length,r=new Array(n),o=0;o<n;o++){var i=t[o];r[o]=e(i,o,t)}return r},S=function(t,e){for(var n=0,r=t.length;n<r;n++){e(t[n],n,t)}},O=D(Array.from)?Array.from:function(t){return C.call(t)},A=function(t){var n=T.none(),e=[],r=function(t){o()?a(t):e.push(t)},o=function(){return n.isSome()},i=function(t){S(t,a)},a=function(e){n.each(function(t){v.setTimeout(function(){e(t)},0)})};return t(function(t){n=T.some(t),i(e),e=[]}),{get:r,map:function(n){return A(function(e){r(function(t){e(n(t))})})},isReady:o}},R={nu:A,pure:function(e){return A(function(t){t(e)})}},E=function(e){var t=function(t){var r;e((r=t,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this;v.setTimeout(function(){r.apply(n,t)},0)}))},n=function(){return R.nu(t)};return{map:function(r){return E(function(n){t(function(t){var e=r(t);n(e)})})},bind:function(n){return E(function(e){t(function(t){n(t).get(e)})})},anonBind:function(n){return E(function(e){t(function(t){n.get(e)})})},toLazy:n,toCached:function(){var e=null;return E(function(t){null===e&&(e=n()),e.get(t)})},get:t}},F={nu:E,pure:function(e){return E(function(t){t(e)})}},I=function(a,t){return t(function(r){var o=[],i=0;0===a.length?r([]):S(a,function(t,e){var n;t.get((n=e,function(t){o[n]=t,++i>=a.length&&r(o)}))})})},M=function(t,e){var n=k(t,e);return I(n,F.nu)},B=tinymce.util.Tools.resolve("tinymce.Env"),H=tinymce.util.Tools.resolve("tinymce.util.Delay"),j=tinymce.util.Tools.resolve("tinymce.util.Tools"),L=tinymce.util.Tools.resolve("tinymce.util.VK"),N="x-tinymce/html",$="\x3c!-- "+N+" --\x3e",W=function(t){return $+t},z=function(t){return t.replace($,"")},U=function(t){return-1!==t.indexOf($)},V=function(){return N},q=tinymce.util.Tools.resolve("tinymce.html.Entities"),K=function(t){return t.replace(/\r?\n/g,"<br>")},G=function(t,e,n){var r=t.split(/\n\n/),o=function(t,e){var n,r=[],o="<"+t;if("object"==typeof e){for(n in e)e.hasOwnProperty(n)&&r.push(n+'="'+q.encodeAllRaw(e[n])+'"');r.length&&(o+=" "+r.join(" "))}return o+">"}(e,n),i="</"+e+">",a=j.map(r,function(t){return t.split(/\n/).join("<br />")});return 1===a.length?a[0]:j.map(a,function(t){return o+t+i}).join("")},X=function(t){return!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(t)},Y=function(t,e,n){return e?G(t,!0===e?"p":e,n):K(t)},Z=tinymce.util.Tools.resolve("tinymce.html.DomParser"),J=tinymce.util.Tools.resolve("tinymce.html.Node"),Q=tinymce.util.Tools.resolve("tinymce.html.Schema"),tt=tinymce.util.Tools.resolve("tinymce.html.Serializer"),et={shouldBlockDrop:function(t){return t.getParam("paste_block_drop",!1)},shouldPasteDataImages:function(t){return t.getParam("paste_data_images",!1)},shouldFilterDrop:function(t){return t.getParam("paste_filter_drop",!0)},getPreProcess:function(t){return t.getParam("paste_preprocess")},getPostProcess:function(t){return t.getParam("paste_postprocess")},getWebkitStyles:function(t){return t.getParam("paste_webkit_styles")},shouldRemoveWebKitStyles:function(t){return t.getParam("paste_remove_styles_if_webkit",!0)},shouldMergeFormats:function(t){return t.getParam("paste_merge_formats",!0)},isSmartPasteEnabled:function(t){return t.getParam("smart_paste",!0)},isPasteAsTextEnabled:function(t){return t.getParam("paste_as_text",!1)},getRetainStyleProps:function(t){return t.getParam("paste_retain_style_properties")},getWordValidElements:function(t){return t.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody")},shouldConvertWordFakeLists:function(t){return t.getParam("paste_convert_word_fake_lists",!0)},shouldUseDefaultFilters:function(t){return t.getParam("paste_enable_default_filters",!0)}};function nt(e,t){return j.each(t,function(t){e=t.constructor===RegExp?e.replace(t,""):e.replace(t[0],t[1])}),e}var rt={filter:nt,innerText:function te(t){var e=Q(),n=Z({},e),r="",o=e.getShortEndedElements(),i=j.makeMap("script noscript style textarea video audio iframe object"," "),a=e.getBlockElements();return t=nt(t,[/<!\[[^\]]+\]>/g]),function s(t){var e=t.name,n=t;if("br"!==e){if("wbr"!==e)if(o[e]&&(r+=" "),i[e])r+=" ";else{if(3===t.type&&(r+=t.value),!t.shortEnded&&(t=t.firstChild))for(;s(t),t=t.next;);a[e]&&n.next&&(r+="\n","p"===e&&(r+="\n"))}}else r+="\n"}(n.parse(t)),r},trimHtml:function ee(t){return t=nt(t,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function r(t,e,n){return e||n?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])},createIdGenerator:function ne(t){var e=0;return function(){return t+e++}},isMsEdge:function(){return-1!==v.navigator.userAgent.indexOf(" Edge/")}};function ot(e){var n,t;return t=[/^[IVXLMCD]{1,2}\.[ \u00a0]/,/^[ivxlmcd]{1,2}\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],e=e.replace(/^[\u00a0 ]+/,""),j.each(t,function(t){if(t.test(e))return!(n=!0)}),n}function it(t){var i,a,s=1;function n(t){var e="";if(3===t.type)return t.value;if(t=t.firstChild)for(;e+=n(t),t=t.next;);return e}function u(t,e){if(3===t.type&&e.test(t.value))return t.value=t.value.replace(e,""),!1;if(t=t.firstChild)do{if(!u(t,e))return!1}while(t=t.next);return!0}function e(t,e,n){var r=t._listLevel||s;r!==s&&(r<s?i&&(i=i.parent.parent):(a=i,i=null)),i&&i.name===e?i.append(t):(a=a||i,i=new J(e,1),1<n&&i.attr("start",""+n),t.wrap(i)),t.name="li",s<r&&a&&a.lastChild.append(i),s=r,function o(t){if(t._listIgnore)t.remove();else if(t=t.firstChild)for(;o(t),t=t.next;);}(t),u(t,/^\u00a0+/),u(t,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),u(t,/^\u00a0+/)}for(var r=[],o=t.firstChild;null!=o;)if(r.push(o),null!==(o=o.walk()))for(;void 0!==o&&o.parent!==t;)o=o.walk();for(var c=0;c<r.length;c++)if("p"===(t=r[c]).name&&t.firstChild){var l=n(t);if(/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(l)){e(t,"ul");continue}if(ot(l)){var f=/([0-9]+)\./.exec(l),d=1;f&&(d=parseInt(f[1],10)),e(t,"ol",d);continue}if(t._listLevel){e(t,"ul",1);continue}i=null}else a=i,i=null}function at(n,r,o,i){var a,s={},t=n.dom.parseStyle(i);return j.each(t,function(t,e){switch(e){case"mso-list":(a=/\w+ \w+([0-9]+)/i.exec(i))&&(o._listLevel=parseInt(a[1],10)),/Ignore/i.test(t)&&o.firstChild&&(o._listIgnore=!0,o.firstChild._listIgnore=!0);break;case"horiz-align":e="text-align";break;case"vert-align":e="vertical-align";break;case"font-color":case"mso-foreground":e="color";break;case"mso-background":case"mso-highlight":e="background";break;case"font-weight":case"font-style":return void("normal"!==t&&(s[e]=t));case"mso-element":if(/^(comment|comment-list)$/i.test(t))return void o.remove()}0!==e.indexOf("mso-comment")?0!==e.indexOf("mso-")&&("all"===et.getRetainStyleProps(n)||r&&r[e])&&(s[e]=t):o.remove()}),/(bold)/i.test(s["font-weight"])&&(delete s["font-weight"],o.wrap(new J("b",1))),/(italic)/i.test(s["font-style"])&&(delete s["font-style"],o.wrap(new J("i",1))),(s=n.dom.serializeStyle(s,o.name))||null}var st={preProcess:function(t,e){return et.shouldUseDefaultFilters(t)?function(r,t){var e,o;(e=et.getRetainStyleProps(r))&&(o=j.makeMap(e.split(/[, ]/))),t=rt.filter(t,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(t,e){return 0<e.length?e.replace(/./," ").slice(Math.floor(e.length/2)).split("").join("\xa0"):""}]]);var n=et.getWordValidElements(r),i=Q({valid_elements:n,valid_children:"-li[p]"});j.each(i.elements,function(t){t.attributes["class"]||(t.attributes["class"]={},t.attributesOrder.push("class")),t.attributes.style||(t.attributes.style={},t.attributesOrder.push("style"))});var a=Z({},i);a.addAttributeFilter("style",function(t){for(var e,n=t.length;n--;)(e=t[n]).attr("style",at(r,o,e,e.attr("style"))),"span"===e.name&&e.parent&&!e.attributes.length&&e.unwrap()}),a.addAttributeFilter("class",function(t){for(var e,n,r=t.length;r--;)n=(e=t[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&e.remove(),e.attr("class",null)}),a.addNodeFilter("del",function(t){for(var e=t.length;e--;)t[e].remove()}),a.addNodeFilter("a",function(t){for(var e,n,r,o=t.length;o--;)if(n=(e=t[o]).attr("href"),r=e.attr("name"),n&&-1!==n.indexOf("#_msocom_"))e.remove();else if(n&&0===n.indexOf("file://")&&(n=n.split("#")[1])&&(n="#"+n),n||r){if(r&&!/^_?(?:toc|edn|ftn)/i.test(r)){e.unwrap();continue}e.attr({href:n,name:r})}else e.unwrap()});var s=a.parse(t);return et.shouldConvertWordFakeLists(r)&&it(s),t=tt({validate:r.settings.validate},i).serialize(s)}(t,e):e},isWordContent:function re(t){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(t)||/class="OutlineElement/.test(t)||/id="?docs\-internal\-guid\-/.test(t)}},ut=function(t,e){return{content:t,cancelled:e}},ct=function(t,e,n,r){var o,i,a,s,u,c,l=f(t,e,n,r);return t.hasEventListeners("PastePostProcess")&&!l.isDefaultPrevented()?(o=t,i=l.content,a=n,s=r,u=o.dom.create("div",{style:"display:none"},i),c=d(o,u,a,s),ut(c.node.innerHTML,c.isDefaultPrevented())):ut(l.content,l.isDefaultPrevented())},lt=function(t,e,n){var r=st.isWordContent(e),o=r?st.preProcess(t,e):e;return ct(t,o,n,r)},ft=function(t,e){var n,r;return t.insertContent((n=e,r=t.dom.create("body",{},n),j.each(r.querySelectorAll("meta"),function(t){return t.parentNode.removeChild(t)}),r.innerHTML),{merge:et.shouldMergeFormats(t),paste:!0}),!0},dt=function(t){return/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(t)},mt=function(t){return dt(t)&&/.(gif|jpe?g|png)$/.test(t)},gt=function(t,e,n){return!(!1!==t.selection.isCollapsed()||!dt(e))&&(o=e,i=n,(r=t).undoManager.extra(function(){i(r,o)},function(){r.execCommand("mceInsertLink",!1,o)}),!0);var r,o,i},pt=function(t,e,n){return!!mt(e)&&(o=e,i=n,(r=t).undoManager.extra(function(){i(r,o)},function(){r.insertContent('<img src="'+o+'">')}),!0);var r,o,i},vt=function(t,e){var n,r;!1===et.isSmartPasteEnabled(t)?ft(t,e):(n=t,r=e,j.each([gt,pt,ft],function(t){return!0!==t(n,r,ft)}))},ht=function(t){return"\n"===t||"\r"===t},yt=function(o){var e,n;return(n={pcIsSpace:!(e=function(t,e){return-1!==" \f\t\x0B".indexOf(e)||"\xa0"===e?t.pcIsSpace||""===t.str||t.str.length===o.length-1||(n=o,(r=t.str.length+1)<n.length&&0<=r&&ht(n[r]))?{pcIsSpace:!1,str:t.str+"\xa0"}:{pcIsSpace:!0,str:t.str+" "}:{pcIsSpace:ht(e),str:t.str+e};var n,r}),str:""},S(o,function(t){n=e(n,t)}),n).str},bt=function(t,e,n){var r=n||U(e),o=lt(t,z(e),r);!1===o.cancelled&&vt(t,o.content)},xt=function(t,e){var n=t.dom.encode(e).replace(/\r\n/g,"\n"),r=yt(n),o=Y(r,t.settings.forced_root_block,t.settings.forced_root_block_attrs);bt(t,o,!1)},Pt=function(t){var e={};if(t){if(t.getData){var n=t.getData("Text");n&&0<n.length&&-1===n.indexOf("data:text/mce-internal,")&&(e["text/plain"]=n)}if(t.types)for(var r=0;r<t.types.length;r++){var o=t.types[r];try{e[o]=t.getData(o)}catch(i){e[o]=""}}}return e},wt=function(t,e){return e in t&&0<t[e].length},_t=function(t){return wt(t,"text/html")||wt(t,"text/plain")},Tt=rt.createIdGenerator("mceclip"),Dt=function(e,t,n){var r,o,i,a,s="paste"===t.type?t.clipboardData:t.dataTransfer;if(e.settings.paste_data_images&&s){var u=(i=(o=s).items?k(O(o.items),function(t){return t.getAsFile()}):[],a=o.files?O(o.files):[],function(t,e){for(var n=[],r=0,o=t.length;r<o;r++){var i=t[r];e(i,r,t)&&n.push(i)}return n}(0<i.length?i:a,function(t){return/^image\/(jpeg|png|gif|bmp)$/.test(t.type)}));if(0<u.length)return t.preventDefault(),(r=u,M(r,function(r){return F.nu(function(t){var e=r.getAsFile?r.getAsFile():r,n=new window.FileReader;n.onload=function(){t({blob:e,uri:n.result})},n.readAsDataURL(e)})})).get(function(t){n&&e.selection.setRng(n),S(t,function(t){!function(t,e){var n,r,o,i,a,s,u,c=(n=e.uri,-1!==(r=n.indexOf(","))?n.substr(r+1):null),l=Tt(),f=t.settings.images_reuse_filename&&e.blob.name?(o=t,i=e.blob.name,(a=i.match(/([\s\S]+?)\.(?:jpeg|jpg|png|gif)$/i))?o.dom.encode(a[1]):null):l,d=new v.Image;if(d.src=e.uri,s=t.settings,u=d,!s.images_dataimg_filter||s.images_dataimg_filter(u)){var m,g=t.editorUpload.blobCache,p=void 0;(m=g.findFirst(function(t){return t.base64()===c}))?p=m:(p=g.create(l,e.blob,c,f),g.add(p)),bt(t,'<img src="'+p.blobUri()+'">',!1)}else bt(t,'<img src="'+e.uri+'">',!1)}(e,t)})}),!0}return!1},Ct=function(t){return L.metaKeyPressed(t)&&86===t.keyCode||t.shiftKey&&45===t.keyCode},kt=function(u,c,l){var e,f,d=(e=i(T.none()),{clear:function(){e.set(T.none())},set:function(t){e.set(T.some(t))},isSet:function(){return e.get().isSome()},on:function(t){e.get().each(t)}});function m(t,e,n,r){var o,i;wt(t,"text/html")?o=t["text/html"]:(o=c.getHtml(),r=r||U(o),c.isDefaultContent(o)&&(n=!0)),o=rt.trimHtml(o),c.remove(),i=!1===r&&X(o),o.length&&!i||(n=!0),n&&(o=wt(t,"text/plain")&&i?t["text/plain"]:rt.innerText(o)),c.isDefaultContent(o)?e||u.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):n?xt(u,o):bt(u,o,r)}u.on("keydown",function(t){function e(t){Ct(t)&&!t.isDefaultPrevented()&&c.remove()}if(Ct(t)&&!t.isDefaultPrevented()){if((f=t.shiftKey&&86===t.keyCode)&&B.webkit&&-1!==v.navigator.userAgent.indexOf("Version/"))return;if(t.stopImmediatePropagation(),d.set(t),window.setTimeout(function(){d.clear()},100),B.ie&&f)return t.preventDefault(),void g(u,!0);c.remove(),c.create(),u.once("keyup",e),u.once("paste",function(){u.off("keyup",e)})}});u.on("paste",function(t){var e,n,r,o=d.isSet(),i=(e=u,n=Pt(t.clipboardData||e.getDoc().dataTransfer),rt.isMsEdge()?j.extend(n,{"text/html":""}):n),a="text"===l.get()||f,s=wt(i,V());(f=!1,t.isDefaultPrevented()||(r=t.clipboardData,-1!==v.navigator.userAgent.indexOf("Android")&&r&&r.items&&0===r.items.length))?c.remove():_t(i)||!Dt(u,t,c.getLastRng()||u.selection.getRng())?(o||t.preventDefault(),!B.ie||o&&!t.ieFake||wt(i,"text/html")||(c.create(),u.dom.bind(c.getEl(),"paste",function(t){t.stopPropagation()}),u.getDoc().execCommand("Paste",!1,null),i["text/html"]=c.getHtml()),wt(i,"text/html")?(t.preventDefault(),s||(s=U(i["text/html"])),m(i,o,a,s)):H.setEditorTimeout(u,function(){m(i,o,a,s)},0)):c.remove()})},St=function(t){return B.ie&&t.inline?v.document.body:t.getBody()},Ot=function(e,t,n){var r;St(r=e)!==r.getBody()&&e.dom.bind(t,"paste keyup",function(t){Et(e,n)||e.fire("paste")})},At=function(t){return t.dom.get("mcepastebin")},Rt=function(t,e){return e===t},Et=function(t,e){var n,r=At(t);return(n=r)&&"mcepastebin"===n.id&&Rt(e,r.innerHTML)},Ft=function(a){var s=i(null),u="%MCEPASTEBIN%";return{create:function(){return e=s,n=u,o=(t=a).dom,i=t.getBody(),e.set(t.selection.getRng()),r=t.dom.add(St(t),"div",{id:"mcepastebin","class":"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n),(B.ie||B.gecko)&&o.setStyle(r,"left","rtl"===o.getStyle(i,"direction",!0)?65535:-65535),o.bind(r,"beforedeactivate focusin focusout",function(t){t.stopPropagation()}),Ot(t,r,n),r.focus(),void t.selection.select(r,!0);var t,e,n,r,o,i},remove:function(){return function(t,e){if(At(t)){for(var n=void 0,r=e.get();n=t.dom.get("mcepastebin");)t.dom.remove(n),t.dom.unbind(n);r&&t.selection.setRng(r)}e.set(null)}(a,s)},getEl:function(){return At(a)},getHtml:function(){return function(n){var e,t,r,o,i,a=function(t,e){t.appendChild(e),n.dom.remove(e,!0)};for(t=j.grep(St(n).childNodes,function(t){return"mcepastebin"===t.id}),e=t.shift(),j.each(t,function(t){a(e,t)}),r=(o=n.dom.select("div[id=mcepastebin]",e)).length-1;0<=r;r--)i=n.dom.create("div"),e.insertBefore(i,o[r]),a(i,o[r]);return e?e.innerHTML:""}(a)},getLastRng:function(){return s.get()},isDefault:function(){return Et(a,u)},isDefaultContent:function(t){return Rt(u,t)}}},It=function(n,t){var e=Ft(n);return n.on("PreInit",function(){return kt(a=n,e,t),void a.parser.addNodeFilter("img",function(t,e,n){var r,o=function(t){t.attr("data-mce-object")||s===B.transparentSrc||t.remove()};if(!a.settings.paste_data_images&&(r=n).data&&!0===r.data.paste)for(var i=t.length;i--;)(s=t[i].attr("src"))&&(0===s.indexOf("webkit-fake-url")?o(t[i]):a.settings.allow_html_data_urls||0!==s.indexOf("data:")||o(t[i]))});var a,s}),{pasteFormat:t,pasteHtml:function(t,e){return bt(n,t,e)},pasteText:function(t){return xt(n,t)},pasteImageData:function(t,e){return Dt(n,t,e)},getDataTransferItems:Pt,hasHtmlOrText:_t,hasContentType:wt}},Mt=function(){},Bt=function(t,e,n){if(r=t,!1!==B.iOS||r===undefined||"function"!=typeof r.setData||!0===rt.isMsEdge())return!1;try{return t.clearData(),t.setData("text/html",e),t.setData("text/plain",n),t.setData(V(),e),!0}catch(o){return!1}var r},Ht=function(t,e,n,r){Bt(t.clipboardData,e.html,e.text)?(t.preventDefault(),r()):n(e.html,r)},jt=function(s){return function(t,e){var n=W(t),r=s.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),o=s.dom.create("div",{contenteditable:"true"},n);s.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(o),s.dom.add(s.getBody(),r);var i=s.selection.getRng();o.focus();var a=s.dom.createRng();a.selectNodeContents(o),s.selection.setRng(a),H.setTimeout(function(){s.selection.setRng(i),r.parentNode.removeChild(r),e()},0)}},Lt=function(t){return{html:t.selection.getContent({contextual:!0}),text:t.selection.getContent({format:"text"})}},Nt=function(t){return!t.selection.isCollapsed()||!!(e=t).dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody());var e},$t=function(t){var e,n;t.on("cut",(e=t,function(t){Nt(e)&&Ht(t,Lt(e),jt(e),function(){H.setTimeout(function(){e.execCommand("Delete")},0)})})),t.on("copy",(n=t,function(t){Nt(n)&&Ht(t,Lt(n),jt(n),Mt)}))},Wt=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),zt=function(t,e){return Wt.getCaretRangeFromPoint(e.clientX,e.clientY,t.getDoc())},Ut=function(t,e){t.focus(),t.selection.setRng(e)},Vt=function(a,s,u){et.shouldBlockDrop(a)&&a.on("dragend dragover draggesture dragdrop drop drag",function(t){t.preventDefault(),t.stopPropagation()}),et.shouldPasteDataImages(a)||a.on("drop",function(t){var e=t.dataTransfer;e&&e.files&&0<e.files.length&&t.preventDefault()}),a.on("drop",function(t){var e,n;if(n=zt(a,t),!t.isDefaultPrevented()&&!u.get()){e=s.getDataTransferItems(t.dataTransfer);var r,o=s.hasContentType(e,V());if((s.hasHtmlOrText(e)&&(!(r=e["text/plain"])||0!==r.indexOf("file://"))||!s.pasteImageData(t,n))&&n&&et.shouldFilterDrop(a)){var i=e["mce-internal"]||e["text/html"]||e["text/plain"];i&&(t.preventDefault(),H.setEditorTimeout(a,function(){a.undoManager.transact(function(){e["mce-internal"]&&a.execCommand("Delete"),Ut(a,n),i=rt.trimHtml(i),e["text/html"]?s.pasteHtml(i,o):s.pasteText(i)})}))}}}),a.on("dragstart",function(t){u.set(!0)}),a.on("dragover dragend",function(t){et.shouldPasteDataImages(a)&&!1===u.get()&&(t.preventDefault(),Ut(a,zt(a,t))),"dragend"===t.type&&u.set(!1)})},qt=function(t){var e=t.plugins.paste,n=et.getPreProcess(t);n&&t.on("PastePreProcess",function(t){n.call(e,e,t)});var r=et.getPostProcess(t);r&&t.on("PastePostProcess",function(t){r.call(e,e,t)})};function Kt(e,n){e.on("PastePreProcess",function(t){t.content=n(e,t.content,t.internal,t.wordContent)})}function Gt(t,e){if(!st.isWordContent(e))return e;var n=[];j.each(t.schema.getBlockElements(),function(t,e){n.push(e)});var r=new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g");return e=rt.filter(e,[[r,"$1"]]),e=rt.filter(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function Xt(t,e,n,r){if(r||n)return e;var c,o=et.getWebkitStyles(t);if(!1===et.shouldRemoveWebKitStyles(t)||"all"===o)return e;if(o&&(c=o.split(/[, ]/)),c){var l=t.dom,f=t.selection.getNode();e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(t,e,n,r){var o=l.parseStyle(l.decode(n)),i={};if("none"===c)return e+r;for(var a=0;a<c.length;a++){var s=o[c[a]],u=l.getStyle(f,c[a],!0);/color/.test(c[a])&&(s=l.toHex(s),u=l.toHex(u)),u!==s&&(i[c[a]]=s)}return(i=l.serializeStyle(i,"span"))?e+' style="'+i+'"'+r:e+r})}else e=e.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return e=e.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(t,e,n,r){return e+' style="'+n+'"'+r})}function Yt(n,t){n.$("a",t).find("font,u").each(function(t,e){n.dom.remove(e,!0)})}var Zt=function(t){B.webkit&&Kt(t,Xt),B.ie&&(Kt(t,Gt),function r(e,n){e.on("PastePostProcess",function(t){n(e,t.node)})}(t,Yt))},Jt=function(n,r){return function(e){e.setActive("text"===r.pasteFormat.get());var t=function(t){return e.setActive(t.state)};return n.on("PastePlainTextToggle",t),function(){return n.off("PastePlainTextToggle",t)}}},Qt=function(t,e){t.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:function(){return t.execCommand("mceTogglePlainTextPaste")},onSetup:Jt(t,e)}),t.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",onAction:function(){return t.execCommand("mceTogglePlainTextPaste")},onSetup:Jt(t,e)})};!function oe(){a.add("paste",function(t){if(!1===s(t)){var e=i(!1),n=i(et.isPasteAsTextEnabled(t)?"text":"html"),r=It(t,n),o=Zt(t);return Qt(t,r),m(t,r),qt(t),$t(t),Vt(t,r,e),u(r,o)}})}()}(window);
9
+ !function(){"use strict";function w(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function P(e){return!(null==e)}function _(){}function o(e){return function(){return e}}function e(e){return e}function t(){return l}var n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(e){return n=typeof(t=e),"array"==(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n);var t,n},i=o(!(n="function")),s=o(!0),l={fold:function(e,t){return e()},isSome:i,isNone:s,getOr:e,getOrThunk:a,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:e,orThunk:a,map:t,each:_,bind:t,exists:i,forall:s,filter:function(){return l},toArray:function(){return[]},toString:o("none()")};function a(e){return e()}function c(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1}function f(e,t){for(var n=e.length,r=new Array(n),a=0;a<n;a++){var o=e[a];r[a]=t(o,a)}return r}function d(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function p(){var e,t,n=(e=_,t=w(le.none()),{clear:function(){r(),t.set(le.none())},isSet:function(){return t.get().isSome()},get:function(){return t.get()},set:function(e){r(),t.set(le.some(e))}});function r(){return t.get().each(e)}return de(de({},n),{on:function(e){return n.get().each(e)}})}function m(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t}function C(e,t){return e.fire("PastePlainTextToggle",{state:t})}function T(e){return e.getParam("paste_data_images",!1)}function g(e){return e.getParam("paste_retain_style_properties")}function h(e){return e.getParam("validate")}function y(e){return e.getParam("paste_data_images",!1,"boolean")}function v(e){return he.explode(e.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))}function b(e){return-1!==e.indexOf(be)}function x(e,t,n){return t?(r=!0===t?"p":t,a=n,o=e.split(/\n\n/),i=function(e,t){var n,r=[],a="<"+e;if("object"==typeof t){for(var o in t)n=o,we.call(t,n)&&r.push(o+'="'+Pe.encodeAllRaw(t[o])+'"');r.length&&(a+=" "+r.join(" "))}return a+">"}(r,a),s="</"+r+">",1===(l=he.map(o,function(e){return e.split(/\n/).join("<br />")})).length?l[0]:he.map(l,function(e){return i+e+s}).join("")):e.replace(/\r?\n/g,"<br>");var r,a,o,i,s,l}function D(t,e){return he.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function k(e){return D(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])}function O(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function S(r,e){var a,t=g(r);t&&(a=he.makeMap(t.split(/[, ]/))),e=D(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var n=r.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody"),o=De({valid_elements:n,valid_children:"-li[p]"});he.each(o.elements,function(e){e.attributes.class||(e.attributes.class={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var i=_e({},o);i.addAttributeFilter("style",function(e){for(var t,n=e.length;n--;)(t=e[n]).attr("style",function(r,a,o,i){var s={},e=r.dom.parseStyle(i);return he.each(e,function(e,t){switch(t){case"mso-list":var n=/\w+ \w+([0-9]+)/i.exec(i);n&&(o._listLevel=parseInt(n[1],10)),/Ignore/i.test(e)&&o.firstChild&&(o._listIgnore=!0,o.firstChild._listIgnore=!0);break;case"horiz-align":t="text-align";break;case"vert-align":t="vertical-align";break;case"font-color":case"mso-foreground":t="color";break;case"mso-background":case"mso-highlight":t="background";break;case"font-weight":case"font-style":return void("normal"!==e&&(s[t]=e));case"mso-element":if(/^(comment|comment-list)$/i.test(e))return void o.remove()}0!==t.indexOf("mso-comment")?0!==t.indexOf("mso-")&&("all"===g(r)||a&&a[t])&&(s[t]=e):o.remove()}),/(bold)/i.test(s["font-weight"])&&(delete s["font-weight"],o.wrap(new Te("b",1))),/(italic)/i.test(s["font-style"])&&(delete s["font-style"],o.wrap(new Te("i",1))),r.dom.serializeStyle(s,o.name)||null}(r,a,t,t.attr("style"))),"span"===t.name&&t.parent&&!t.attributes.length&&t.unwrap()}),i.addAttributeFilter("class",function(e){for(var t,n,r=e.length;r--;)n=(t=e[r]).attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(n)&&t.remove(),t.attr("class",null)}),i.addNodeFilter("del",function(e){for(var t=e.length;t--;)e[t].remove()}),i.addNodeFilter("a",function(e){for(var t,n,r,a=e.length;a--;)n=(t=e[a]).attr("href"),r=t.attr("name"),n&&-1!==n.indexOf("#_msocom_")?t.remove():!(n=n&&0===n.indexOf("file://")?(n=n.split("#")[1])&&"#"+n:n)&&!r||r&&!/^_?(?:toc|edn|ftn)/i.test(r)?t.unwrap():t.attr({href:n,name:r})});var s=i.parse(e);return r.getParam("paste_convert_word_fake_lists",!0)&&function(e){for(var a,o,i=1,n=function(e){var t="";if(3===e.type)return e.value;if(e=e.firstChild)for(;t+=n(e),e=e.next;);return t},s=function(e,t){if(3===e.type&&t.test(e.value))return e.value=e.value.replace(t,""),!1;if(e=e.firstChild)do{if(!s(e,t))return!1}while(e=e.next);return!0},l=function(e){if(e._listIgnore)e.remove();else if(e=e.firstChild)for(;l(e),e=e.next;);},t=function(e,t,n){var r=e._listLevel||i;(a=r!==i?r<i?a&&a.parent.parent:(o=a,null):a)&&a.name===t?a.append(e):(o=o||a,a=new Te(t,1),1<n&&a.attr("start",""+n),e.wrap(a)),e.name="li",i<r&&o&&o.lastChild.append(a),i=r,l(e),s(e,/^\u00a0+/),s(e,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),s(e,/^\u00a0+/)},r=[],u=e.firstChild;null!=u;)if(r.push(u),null!==(u=u.walk()))for(;void 0!==u&&u.parent!==e;)u=u.walk();for(var c,f,d,p=0;p<r.length;p++)"p"===(e=r[p]).name&&e.firstChild?(c=n(e),/^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(c)?t(e,"ul"):function(t){var n=!1;return t=c.replace(/^[\u00a0 ]+/,""),he.each([/^[IVXLMCD]+\.[ \u00a0]/,/^[ivxlmcd]+\.[ \u00a0]/,/^[a-z]{1,2}[\.\)][ \u00a0]/,/^[A-Z]{1,2}[\.\)][ \u00a0]/,/^[0-9]+\.[ \u00a0]/,/^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,/^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/],function(e){if(e.test(t))return!(n=!0)}),n}(c)?(d=1,t(e,"ol",d=(f=/([0-9]+)\./.exec(c))?parseInt(f[1],10):d)):e._listLevel?t(e,"ul",1):a=null):(o=a,a=null)}(s),Ce({validate:h(r)},o).serialize(s)}function j(e,t){return{content:e,cancelled:t}}function A(e,t,n){var r,a,o,i,s,l,u,c,f,d,p,m,g=O(t),v=g?(a=t,(r=e).getParam("paste_enable_default_filters",!0)?S(r,a):a):t;return i=n,s=g,p=(o=e).fire("PastePreProcess",{content:v,internal:i,wordContent:s}),m=function(e,t){var n=_e({},e.schema);n.addNodeFilter("meta",function(e){he.each(e,function(e){e.remove()})});var r=n.parse(t,{forced_root_block:!1,isRootContent:!0});return Ce({validate:h(e)},e.schema).serialize(r)}(o,p.content),o.hasEventListeners("PastePostProcess")&&!p.isDefaultPrevented()?(u=i,c=s,f=(l=o).dom.create("div",{style:"display:none"},m),j((d=l.fire("PastePostProcess",{node:f,internal:u,wordContent:c})).node.innerHTML,d.isDefaultPrevented())):j(m,p.isDefaultPrevented())}function R(e,t){return e.insertContent(t,{merge:e.getParam("paste_merge_formats",!0),paste:!0}),!0}function I(e){return/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(e)}function F(e,t,n){return!(!1!==e.selection.isCollapsed()||!I(t)||(a=t,o=n,(r=e).undoManager.extra(function(){o(r,a)},function(){r.execCommand("mceInsertLink",!1,a)}),0));var r,a,o}function E(e,t,n){return r=e,!(!I(a=t)||!c(v(r),function(e){return m(t=a.toLowerCase(),n="."+e.toLowerCase(),t.length-n.length);var t,n})||(i=t,s=n,(o=e).undoManager.extra(function(){s(o,i)},function(){o.insertContent('<img src="'+i+'">')}),0));var r,a,o,i,s}function M(e){return"\n"===e||"\r"===e}function B(e,t,n,r){var a,o,i,s,l=A(e,t,n);!1===l.cancelled&&(a=e,o=l.content,r||!1===a.getParam("smart_paste",!0)?R(a,o):(i=a,s=o,he.each([F,E,R],function(e){return!0!==e(i,s,R)})))}function L(e,t,n){var r=n||b(t);B(e,t.replace(be,""),r,!1)}function N(e,t){var n,r,a,o,i,s,l=e.dom.encode(t).replace(/\r\n/g,"\n"),u=x((n=l,o=(r=e.getParam("paste_tab_spaces",4,"number"))<=0?"":new Array(r+1).join(" "),i=n.replace(/\t/g,o),s={pcIsSpace:!(a=function(e,t){return-1!==" \f\t\v".indexOf(t)||"\xa0"===t?e.pcIsSpace||""===e.str||e.str.length===i.length-1||(n=e.str.length+1)<i.length&&0<=n&&M(i[n])?{pcIsSpace:!1,str:e.str+"\xa0"}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:M(t),str:e.str+t};var n}),str:""},d(i,function(e,t){s=a(s,e)}),s.str),e.getParam("forced_root_block"),e.getParam("forced_root_block_attrs"));B(e,u,!1,!0)}function H(e){var t,n={};if(e&&(!e.getData||(t=e.getData("Text"))&&0<t.length&&-1===t.indexOf("data:text/mce-internal,")&&(n["text/plain"]=t),e.types))for(var r=0;r<e.types.length;r++){var a=e.types[r];try{n[a]=e.getData(a)}catch(e){n[a]=""}}return n}function $(e,t){return t in e&&0<e[t].length}function z(e){return $(e,"text/html")||$(e,"text/plain")}function U(w,e,t){var n,r,a,o,i,s="paste"===e.type?e.clipboardData:e.dataTransfer;if(y(w)&&s){var l=(n=w,a=(r=s).items?function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!u(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);ce.apply(t,e[n])}return t}(f(fe(r.items),function(e){return"file"===e.kind?[e.getAsFile()]:[]})):[],o=r.files?fe(r.files):[],function(e,t){for(var n=[],r=0,a=e.length;r<a;r++){var o=e[r];t(o,r)&&n.push(o)}return n}(0<a.length?a:o,(i=v(n),function(r){return m(r.type,"image/",0)&&c(i,function(e){return t=e.toLowerCase(),(he.hasOwn(n={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"},t)?"image/"+n[t]:"image/"+t)===r.type;var t,n})})));if(0<l.length)return e.preventDefault(),ge.all(f(l,function(r){return new ge(function(e){var t=P(r.getAsFile)?r.getAsFile():r,n=new window.FileReader;n.onload=function(){e({blob:t,uri:n.result})},n.readAsDataURL(t)})})).then(function(e){t&&w.selection.setRng(t),d(e,function(e){var t,n,r,a,o,i,s,l,u,c,f,d,p,m,g,v,h,y,b,x;t=w,r=(n=e).uri,g=(a=/data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(r))?{type:a[1],data:decodeURIComponent(a[2])}:{type:null,data:null},v=g.data,h=g.type,y=ke(),b=n.blob,(x=new Image).src=n.uri,p=x,!(m=t.getParam("images_dataimg_filter"))||m(p)?(c=void 0,(i=(o=t.editorUpload.blobCache).getByData(v,h))?c=i:(l=(s=t.getParam("images_reuse_filename")&&P(b.name))?(f=t,P(d=b.name.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i))?f.dom.encode(d[1]):null):y,u=s?b.name:void 0,c=o.create(y,b,v,l,u),o.add(c)),L(t,'<img src="'+c.blobUri()+'">',!1)):L(t,'<img src="'+n.uri+'">',!1)})}),!0}return!1}function V(e){return ve.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode}function K(o,e,t){var i,s,v,l,u,c,f;function d(e,t,n,r,a){var o;$(t,"text/html")?o=t["text/html"]:(o=v.getHtml(),a=a||b(o),v.isDefaultContent(o)&&(r=!0)),o=k(o),v.remove();var i,s,l,u,c,f,d,p,m=!1===a&&!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(o),g=I(o);((r=!o.length||m&&!g||r)||g)&&(o=$(t,"text/plain")&&m?t["text/plain"]:(i=o,s=De(),l=_e({},s),u="",c=s.getShortEndedElements(),f=he.makeMap("script noscript style textarea video audio iframe object"," "),d=s.getBlockElements(),p=function(e){var t=e.name,n=e;if("br"!==t){if("wbr"!==t)if(c[t]&&(u+=" "),f[t])u+=" ";else{if(3===e.type&&(u+=e.value),!e.shortEnded&&(e=e.firstChild))for(;p(e),e=e.next;);d[t]&&n.next&&(u+="\n","p"===t&&(u+="\n"))}}else u+="\n"},i=D(i,[/<!\[[^\]]+\]>/g]),p(l.parse(i)),u)),v.isDefaultContent(o)?n||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents."):r?N(e,o):L(e,o,a)}s=o,v=e,l=t,c=p(),f=p(),s.on("keyup",f.clear),s.on("keydown",function(e){function t(e){V(e)&&!e.isDefaultPrevented()&&v.remove()}if(V(e)&&!e.isDefaultPrevented()&&(!(u=e.shiftKey&&86===e.keyCode)||!pe.webkit||-1===navigator.userAgent.indexOf("Version/"))){if(e.stopImmediatePropagation(),c.set(e),f.set(!0),pe.ie&&u)return e.preventDefault(),void s.fire("paste",{ieFake:!0});v.remove(),v.create(),s.once("keyup",t),s.once("paste",function(){s.off("keyup",t)})}}),s.on("paste",function(e){var t=c.isSet()||f.isSet();t&&c.clear();var n,r=H(e.clipboardData||s.getDoc().dataTransfer),a="text"===l.get()||u,o=$(r,xe());u=!1,e.isDefaultPrevented()||(n=e.clipboardData,-1!==navigator.userAgent.indexOf("Android")&&n&&n.items&&0===n.items.length)||!z(r)&&U(s,e,v.getLastRng()||s.selection.getRng())?v.remove():(t||e.preventDefault(),!pe.ie||t&&!e.ieFake||$(r,"text/html")||(v.create(),s.dom.bind(v.getEl(),"paste",function(e){e.stopPropagation()}),s.getDoc().execCommand("Paste",!1,null),r["text/html"]=v.getHtml()),$(r,"text/html")?(e.preventDefault(),o=o||b(r["text/html"]),d(s,r,t,a,o)):me.setEditorTimeout(s,function(){d(s,r,t,a,o)},0))}),o.parser.addNodeFilter("img",function(e,t,n){var r;if(!y(o)&&n.data&&!0===n.data.paste)for(var a=e.length;a--;)(i=e[a].attr("src"))&&(0!==i.indexOf("webkit-fake-url")&&(o.getParam("allow_html_data_urls",!1,"boolean")||0!==i.indexOf("data:"))||((r=e[a]).attr("data-mce-object")||i===pe.transparentSrc||r.remove()))})}function X(e){return pe.ie&&e.inline?document.body:e.getBody()}function W(e){var t=w(null),n="%MCEPASTEBIN%";return{create:function(){return function(e,t,n){var r=e.dom,a=e.getBody();t.set(e.selection.getRng());var o,i,s,l,u=e.dom.add(X(e),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},n);(pe.ie||pe.gecko)&&r.setStyle(u,"left","rtl"===r.getStyle(a,"direction",!0)?65535:-65535),r.bind(u,"beforedeactivate focusin focusout",function(e){e.stopPropagation()}),i=u,s=n,X(l=o=e)!==l.getBody()&&o.dom.bind(i,"paste keyup",function(e){Oe(o,s)||o.fire("paste")}),u.focus(),e.selection.select(u,!0)}(e,t,n)},remove:function(){return function(e,t){if(oe(e)){for(var n,r=t.get();n=e.dom.get("mcepastebin");)e.dom.remove(n),e.dom.unbind(n);r&&e.selection.setRng(r)}t.set(null)}(e,t)},getEl:function(){return oe(e)},getHtml:function(){return function(n){function t(e,t){e.appendChild(t),n.dom.remove(t,!0)}var e=he.grep(X(n).childNodes,function(e){return"mcepastebin"===e.id}),r=e.shift();he.each(e,function(e){t(r,e)});for(var a=n.dom.select("div[id=mcepastebin]",r),o=a.length-1;0<=o;o--){var i=n.dom.create("div");r.insertBefore(i,a[o]),t(i,a[o])}return r?r.innerHTML:""}(e)},getLastRng:t.get,isDefault:function(){return Oe(e,n)},isDefaultContent:function(e){return e===n}}}function Y(e,t,n,r){!function(e,t,n){if(!1===pe.iOS&&"function"==typeof(null==e?void 0:e.setData))try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",n),e.setData(xe(),t),1}catch(e){return}}(e.clipboardData,t.html,t.text)?n(t.html,r):(e.preventDefault(),r())}function Z(s){return function(e,t){var n=be+e,r=s.dom.create("div",{contenteditable:"false","data-mce-bogus":"all"}),a=s.dom.create("div",{contenteditable:"true"},n);s.dom.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),r.appendChild(a),s.dom.add(s.getBody(),r);var o=s.selection.getRng();a.focus();var i=s.dom.createRng();i.selectNodeContents(a),s.selection.setRng(i),me.setTimeout(function(){s.selection.setRng(o),r.parentNode.removeChild(r),t()},0)}}function q(e){return{html:e.selection.getContent({contextual:!0}),text:e.selection.getContent({format:"text"})}}function G(e){return!e.selection.isCollapsed()||(t=e).dom.getParent(t.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",t.getBody());var t}function J(e,t){return Se.getCaretRangeFromPoint(t.clientX,t.clientY,e.getDoc())}function Q(e,t){e.focus(),e.selection.setRng(t)}function ee(t,n){t.on("PastePreProcess",function(e){e.content=n(t,e.content,e.internal,e.wordContent)})}function te(e,t){if(!O(t))return t;var n=[];return he.each(e.schema.getBlockElements(),function(e,t){n.push(t)}),t=D(t,[[new RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?("+n.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g"),"$1"]]),D(t,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}function ne(e,t,n,r){if(r||n)return t;var c,f,d,a=e.getParam("paste_webkit_styles");return!1===e.getParam("paste_remove_styles_if_webkit",!0)||"all"===a?t:(t=(c=a?a.split(/[, ]/):c)?(f=e.dom,d=e.selection.getNode(),t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(e,t,n,r){var a=f.parseStyle(f.decode(n)),o={};if("none"===c)return t+r;for(var i=0;i<c.length;i++){var s=a[c[i]],l=f.getStyle(d,c[i],!0);/color/.test(c[i])&&(s=f.toHex(s),l=f.toHex(l)),l!==s&&(o[c[i]]=s)}var u=f.serializeStyle(o,"span");return u?t+' style="'+u+'"'+r:t+r})):t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3")).replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(e,t,n,r){return t+' style="'+n+'"'+r})}function re(n,e){n.$("a",e).find("font,u").each(function(e,t){n.dom.remove(t,!0)})}function ae(n,r){return function(t){function e(e){return t.setActive(e.state)}return t.setActive("text"===r.pasteFormat.get()),n.on("PastePlainTextToggle",e),function(){return n.off("PastePlainTextToggle",e)}}}function oe(e){return e.dom.get("mcepastebin")}var ie,se=function(n){function e(){return a}function t(e){return e(n)}var r=o(n),a={fold:function(e,t){return t(n)},isSome:s,isNone:i,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return se(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?a:l},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return a},le={some:se,none:t,from:function(e){return null==e?l:se(e)}},ue=Array.prototype.slice,ce=Array.prototype.push,fe=typeof Array.from===n?Array.from:function(e){return ue.call(e)},de=function(){return(de=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},pe=tinymce.util.Tools.resolve("tinymce.Env"),me=tinymce.util.Tools.resolve("tinymce.util.Delay"),ge=tinymce.util.Tools.resolve("tinymce.util.Promise"),ve=tinymce.util.Tools.resolve("tinymce.util.VK"),he=tinymce.util.Tools.resolve("tinymce.util.Tools"),ye="x-tinymce/html",be="\x3c!-- "+ye+" --\x3e",xe=o(ye),we=Object.hasOwnProperty,Pe=tinymce.util.Tools.resolve("tinymce.html.Entities"),_e=tinymce.util.Tools.resolve("tinymce.html.DomParser"),Ce=tinymce.util.Tools.resolve("tinymce.html.Serializer"),Te=tinymce.util.Tools.resolve("tinymce.html.Node"),De=tinymce.util.Tools.resolve("tinymce.html.Schema"),ke=(ie=0,function(){return"mceclip"+ie++}),Oe=function(e,t){var n=oe(e);return n&&"mcepastebin"===n.id&&n.innerHTML===t},Se=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils");r.add("paste",function(e){if(0==(!!e.hasPlugin("powerpaste",!0)&&(void 0!==window.console&&window.console.log&&window.console.log("PowerPaste is incompatible with Paste plugin! Remove 'paste' from the 'plugins' option."),!0))){var t=w(!1),n=w(e.getParam("paste_as_text",!1)?"text":"html"),r=(y=n,b=W(h=e),h.on("PreInit",function(){return K(h,b,y)}),{pasteFormat:y,pasteHtml:function(e,t){return L(h,e,t)},pasteText:function(e){return N(h,e)},pasteImageData:function(e,t){return U(h,e,t)},getDataTransferItems:H,hasHtmlOrText:z,hasContentType:$}),a=e;return pe.webkit&&ee(a,ne),pe.ie&&(ee(a,te),v=re,(g=a).on("PastePostProcess",function(e){v(g,e.node)})),(p=e).ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:x,onSetup:ae(p,m=r)}),p.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:x,onSetup:ae(p,m)}),d=r,(f=e).addCommand("mceTogglePlainTextPaste",function(){var e,t=f;"text"===(e=d).pasteFormat.get()?(e.pasteFormat.set("html"),C(t,!1)):(e.pasteFormat.set("text"),C(t,!0)),t.focus()}),f.addCommand("mceInsertClipboardContent",function(e,t){t.content&&d.pasteHtml(t.content,t.internal),t.text&&d.pasteText(t.text)}),function(e){var t=e.plugins.paste,n=e.getParam("paste_preprocess");n&&e.on("PastePreProcess",function(e){n.call(t,t,e)});var r=e.getParam("paste_postprocess");r&&e.on("PastePostProcess",function(e){r.call(t,t,e)})}(e),(o=e).on("cut",(u=o,function(e){G(u)&&Y(e,q(u),Z(u),function(){var e;pe.browser.isChrome()||pe.browser.isFirefox()?(e=u.selection.getRng(),me.setEditorTimeout(u,function(){u.selection.setRng(e),u.execCommand("Delete")},0)):u.execCommand("Delete")})})),o.on("copy",(c=o,function(e){G(c)&&Y(e,q(c),Z(c),_)})),s=r,l=t,(i=e).getParam("paste_block_drop",!1)&&i.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),T(i)||i.on("drop",function(e){var t=e.dataTransfer;t&&t.files&&0<t.files.length&&e.preventDefault()}),i.on("drop",function(e){var t,n,r,a,o=J(i,e);e.isDefaultPrevented()||l.get()||(t=s.getDataTransferItems(e.dataTransfer),n=s.hasContentType(t,xe()),(!s.hasHtmlOrText(t)||(r=t["text/plain"])&&0===r.indexOf("file://"))&&s.pasteImageData(e,o)||!o||!i.getParam("paste_filter_drop",!0)||(a=t["mce-internal"]||t["text/html"]||t["text/plain"])&&(e.preventDefault(),me.setEditorTimeout(i,function(){i.undoManager.transact(function(){t["mce-internal"]&&i.execCommand("Delete"),Q(i,o),a=k(a),t["text/html"]?s.pasteHtml(a,n):s.pasteText(a)})})))}),i.on("dragstart",function(e){l.set(!0)}),i.on("dragover dragend",function(e){T(i)&&!1===l.get()&&(e.preventDefault(),Q(i,J(i,e))),"dragend"===e.type&&l.set(!1)}),{clipboard:r}}var i,s,l,o,u,c,f,d,p,m,a,g,v,h,y,b;function x(){return p.execCommand("mceTogglePlainTextPaste")}})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=tinymce.util.Tools.resolve("tinymce.util.Tools"),l=function(e){return e.getParam("content_style","")},m=function(e){return e.getParam("content_css_cors",!1,"boolean")},i=function(t){var n="",i=t.dom.encode,e=l(t);n+='<base href="'+i(t.documentBaseURI.getURI())+'">',e&&(n+='<style type="text/css">'+e+"</style>");var o=m(t)?' crossorigin="anonymous"':"";d.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+i(t.documentBaseURI.toAbsolute(e))+'"'+o+">"});var r=t.settings.body_id||"tinymce";-1!==r.indexOf("=")&&(r=(r=t.getParam("body_id","","hash"))[t.id]||r);var a=t.settings.body_class||"";-1!==a.indexOf("=")&&(a=(a=t.getParam("body_class","","hash"))[t.id]||"");var c=t.getBody().dir,s=c?' dir="'+i(c)+'"':"";return"<!DOCTYPE html><html><head>"+n+'</head><body id="'+i(r)+'" class="mce-content-body '+i(a)+'"'+s+">"+t.getContent()+'<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A") {e.preventDefault();}}}, false);<\/script> </body></html>'},t=function(n){n.addCommand("mcePreview",function(){var e,t;t=i(e=n),e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:t}}).focus("close")})},n=function(e){e.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:function(){return e.execCommand("mcePreview")}}),e.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:function(){return e.execCommand("mcePreview")}})};!function o(){e.add("preview",function(e){t(e),n(e)})}()}();
9
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),f=tinymce.util.Tools.resolve("tinymce.Env"),w=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("preview",function(e){var n,t;function i(){return t.execCommand("mcePreview")}(n=e).addCommand("mcePreview",function(){var e,t;t=function(t){var n="",i=t.dom.encode,e=t.getParam("content_style","","string");n+='<base href="'+i(t.documentBaseURI.getURI())+'">';var o=t.getParam("content_css_cors",!1,"boolean")?' crossorigin="anonymous"':"";w.each(t.contentCSS,function(e){n+='<link type="text/css" rel="stylesheet" href="'+i(t.documentBaseURI.toAbsolute(e))+'"'+o+">"}),e&&(n+='<style type="text/css">'+e+"</style>");var a,r,s,c,d,l,m,y=-1===(c=(a=t).getParam("body_id","tinymce","string")).indexOf("=")?c:(s=(r=a).getParam("body_id","","hash"))[r.id]||s,u=-1===(m=(d=t).getParam("body_class","","string")).indexOf("=")?m:(l=d).getParam("body_class","","hash")[l.id]||"",v='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(f.mac?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",g=t.getBody().dir,p=g?' dir="'+i(g)+'"':"";return"<!DOCTYPE html><html><head>"+n+'</head><body id="'+i(y)+'" class="mce-content-body '+i(u)+'"'+p+">"+t.getContent()+v+"</body></html>"}(e=n),e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:t}}).focus("close")}),(t=e).ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:i}),t.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:i})})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),i=function(n){n.addCommand("mcePrint",function(){t.ie&&t.ie<=11?n.getDoc().execCommand("print",!1,null):n.getWin().print()})},e=function(n){n.ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:function(){return n.execCommand("mcePrint")}}),n.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:function(){return n.execCommand("mcePrint")}})};!function o(){n.add("print",function(n){i(n),e(n),n.addShortcut("Meta+P","","mcePrint")})}()}();
9
+ !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),r=tinymce.util.Tools.resolve("tinymce.Env");n.add("print",function(n){var t,i;function e(){return i.execCommand("mcePrint")}(t=n).addCommand("mcePrint",function(){r.browser.isIE()?t.getDoc().execCommand("print",!1,null):t.getWin().print()}),(i=n).ui.registry.addButton("print",{icon:"print",tooltip:"Print",onAction:e}),i.ui.registry.addMenuItem("print",{text:"Print...",icon:"print",onAction:e}),n.addShortcut("Meta+P","","mcePrint")})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(t){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),a=0,n=function(e,n,r){var t,o,i;e.plugins.table?e.plugins.table.insertTable(n,r):(o=n,i=r,(t=e).undoManager.transact(function(){var e,n;t.insertContent(function(e,n){var r,t,o;for(o='<table data-mce-id="mce" style="width: 100%">',o+="<tbody>",t=0;t<n;t++){for(o+="<tr>",r=0;r<e;r++)o+="<td><br></td>";o+="</tr>"}return o+="</tbody>",o+="</table>"}(o,i)),(e=t.dom.select("*[data-mce-id]")[0]).removeAttribute("data-mce-id"),n=t.dom.select("td,th",e),t.selection.setCursorLocation(n[0],0)}))},o=function(e,n,r){var t,o,i,u;o=(t=e.editorUpload.blobCache).create((i="mceu",u=(new Date).getTime(),i+"_"+Math.floor(1e9*Math.random())+ ++a+String(u)),r,n),t.add(o),e.insertContent(e.dom.createHTML("img",{src:o.blobUri()}))},i="undefined"!=typeof t.window?t.window:Function("return this;")(),u=function(e,n){return function(e,n){for(var r=n!==undefined&&null!==n?n:i,t=0;t<e.length&&r!==undefined&&null!==r;++t)r=r[e[t]];return r}(e.split("."),n)},s=function(e,n){var r=u(e,n);if(r===undefined||null===r)throw e+" not available on this browser";return r};var r,c,f,d,l=tinymce.util.Tools.resolve("tinymce.util.Promise"),m=function(t){return new l(function(e){var n=function r(){return new(s("FileReader"))}();n.onloadend=function(){e(n.result.split(",")[1])},n.readAsDataURL(t)})},g=function(){return new l(function(n){var e;(e=t.document.createElement("input")).type="file",e.style.position="fixed",e.style.left=0,e.style.top=0,e.style.opacity=.001,t.document.body.appendChild(e),e.onchange=function(e){n(Array.prototype.slice.call(e.target.files))},e.click(),e.parentNode.removeChild(e)})},h=function(r){r.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:function(){g().then(function(e){var n=e[0];m(n).then(function(e){o(r,e,n)})})}}),r.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:function(){n(r,2,2)}})},v=function(e){return function(){return e}},p=v(!1),N=v(!0),O=p,b=N,E=function(){return w},w=(d={fold:function(e,n){return e()},is:O,isSome:O,isNone:b,getOr:f=function(e){return e},getOrThunk:c=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:f,orThunk:c,map:E,ap:E,each:function(){},bind:E,flatten:E,exists:O,forall:b,filter:E,equals:r=function(e){return e.isNone()},equals_:r,toArray:function(){return[]},toString:v("none()")},Object.freeze&&Object.freeze(d),d),T=function(r){var e=function(){return r},n=function(){return o},t=function(e){return e(r)},o={fold:function(e,n){return n(r)},is:function(e){return r===e},isSome:b,isNone:O,getOr:e,getOrThunk:e,getOrDie:e,getOrNull:e,getOrUndefined:e,or:n,orThunk:n,map:function(e){return T(e(r))},ap:function(e){return e.fold(E,function(e){return T(e(r))})},each:function(e){e(r)},bind:t,flatten:e,exists:t,forall:t,filter:function(e){return e(r)?o:w},equals:function(e){return e.is(r)},equals_:function(e,n){return e.fold(O,function(e){return n(r,e)})},toArray:function(){return[r]},toString:function(){return"some("+r+")"}};return o},S={some:T,none:E,from:function(e){return null===e||e===undefined?w:T(e)}},y=function(e){if(null===e||e===undefined)throw new Error("Node cannot be null or undefined");return{dom:v(e)}},x={fromHtml:function(e,n){var r=(n||t.document).createElement("div");if(r.innerHTML=e,!r.hasChildNodes()||1<r.childNodes.length)throw t.console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return y(r.childNodes[0])},fromTag:function(e,n){var r=(n||t.document).createElement(e);return y(r)},fromText:function(e,n){var r=(n||t.document).createTextNode(e);return y(r)},fromDom:y,fromPoint:function(e,n,r){var t=e.dom();return S.from(t.elementFromPoint(n,r)).map(y)}},k=(t.Node.ATTRIBUTE_NODE,t.Node.CDATA_SECTION_NODE,t.Node.COMMENT_NODE,t.Node.DOCUMENT_NODE,t.Node.DOCUMENT_TYPE_NODE,t.Node.DOCUMENT_FRAGMENT_NODE,t.Node.ELEMENT_NODE),D=(t.Node.TEXT_NODE,t.Node.PROCESSING_INSTRUCTION_NODE,t.Node.ENTITY_REFERENCE_NODE,t.Node.ENTITY_NODE,t.Node.NOTATION_NODE,function(n){return function(e){return function(e){if(null===e)return"null";var n=typeof e;return"object"===n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n}(e)===n}}),_=D("string"),C=D("object"),A=D("array"),R=D("boolean"),I=D("undefined"),M=D("function"),q=Array.prototype.slice;M(Array.from)&&Array.from;function L(e,n,r,t,o){return e(r,t)?S.some(r):M(o)&&o(r)?S.none():n(r,t,o)}var P,F,U,B,j=function(){return s("Node")},H=function(e,n,r){return 0!=(e.compareDocumentPosition(n)&r)},X=function(e,n){return H(e,n,j().DOCUMENT_POSITION_CONTAINED_BY)},z=function(e,n){var r=function(e,n){for(var r=0;r<e.length;r++){var t=e[r];if(t.test(n))return t}return undefined}(e,n);if(!r)return{major:0,minor:0};var t=function(e){return Number(n.replace(r,"$"+e))};return W(t(1),t(2))},G=function(){return W(0,0)},W=function(e,n){return{major:e,minor:n}},Y={nu:W,detect:function(e,n){var r=String(n).toLowerCase();return 0===e.length?G():z(e,r)},unknown:G},$="Firefox",V=function(e,n){return function(){return n===e}},J=function(e){var n=e.current;return{current:n,version:e.version,isEdge:V("Edge",n),isChrome:V("Chrome",n),isIE:V("IE",n),isOpera:V("Opera",n),isFirefox:V($,n),isSafari:V("Safari",n)}},K={unknown:function(){return J({current:undefined,version:Y.unknown()})},nu:J,edge:v("Edge"),chrome:v("Chrome"),ie:v("IE"),opera:v("Opera"),firefox:v($),safari:v("Safari")},Q="Windows",Z="Android",ee="Solaris",ne="FreeBSD",re=function(e,n){return function(){return n===e}},te=function(e){var n=e.current;return{current:n,version:e.version,isWindows:re(Q,n),isiOS:re("iOS",n),isAndroid:re(Z,n),isOSX:re("OSX",n),isLinux:re("Linux",n),isSolaris:re(ee,n),isFreeBSD:re(ne,n)}},oe={unknown:function(){return te({current:undefined,version:Y.unknown()})},nu:te,windows:v(Q),ios:v("iOS"),android:v(Z),linux:v("Linux"),osx:v("OSX"),solaris:v(ee),freebsd:v(ne)},ie=function(e,n){var r=String(n).toLowerCase();return function(e,n){for(var r=0,t=e.length;r<t;r++){var o=e[r];if(n(o,r,e))return S.some(o)}return S.none()}(e,function(e){return e.search(r)})},ue=function(e,r){return ie(e,r).map(function(e){var n=Y.detect(e.versionRegexes,r);return{current:e.name,version:n}})},ae=function(e,r){return ie(e,r).map(function(e){var n=Y.detect(e.versionRegexes,r);return{current:e.name,version:n}})},se=function(e,n){return-1!==e.indexOf(n)},ce=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,fe=function(n){return function(e){return se(e,n)}},de=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:function(e){return se(e,"edge/")&&se(e,"chrome")&&se(e,"safari")&&se(e,"applewebkit")}},{name:"Chrome",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ce],search:function(e){return se(e,"chrome")&&!se(e,"chromeframe")}},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:function(e){return se(e,"msie")||se(e,"trident")}},{name:"Opera",versionRegexes:[ce,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:fe("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:fe("firefox")},{name:"Safari",versionRegexes:[ce,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:function(e){return(se(e,"safari")||se(e,"mobile/"))&&se(e,"applewebkit")}}],le=[{name:"Windows",search:fe("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:function(e){return se(e,"iphone")||se(e,"ipad")},versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:fe("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"OSX",search:fe("os x"),versionRegexes:[/.*?os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:fe("linux"),versionRegexes:[]},{name:"Solaris",search:fe("sunos"),versionRegexes:[]},{name:"FreeBSD",search:fe("freebsd"),versionRegexes:[]}],me={browsers:v(de),oses:v(le)},ge=function(e){var n,r,t,o,i,u,a,s,c,f,d,l=me.browsers(),m=me.oses(),g=ue(l,e).fold(K.unknown,K.nu),h=ae(m,e).fold(oe.unknown,oe.nu);return{browser:g,os:h,deviceType:(r=g,t=e,o=(n=h).isiOS()&&!0===/ipad/i.test(t),i=n.isiOS()&&!o,u=n.isAndroid()&&3===n.version.major,a=n.isAndroid()&&4===n.version.major,s=o||u||a&&!0===/mobile/i.test(t),c=n.isiOS()||n.isAndroid(),f=c&&!s,d=r.isSafari()&&n.isiOS()&&!1===/safari/i.test(t),{isiPad:v(o),isiPhone:v(i),isTablet:v(s),isPhone:v(f),isTouch:v(c),isAndroid:n.isAndroid,isiOS:n.isiOS,isWebView:v(d)})}},he=(U=!(P=function(){var e=t.navigator.userAgent;return ge(e)}),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return U||(U=!0,F=P.apply(null,e)),F}),ve=k,pe=function(e,n){var r=e.dom();if(r.nodeType!==ve)return!1;if(r.matches!==undefined)return r.matches(n);if(r.msMatchesSelector!==undefined)return r.msMatchesSelector(n);if(r.webkitMatchesSelector!==undefined)return r.webkitMatchesSelector(n);if(r.mozMatchesSelector!==undefined)return r.mozMatchesSelector(n);throw new Error("Browser lacks native selectors")},Ne=({detect:he}.detect().browser.isIE(),function(e,n,r){for(var t=e.dom(),o=M(r)?r:v(!1);t.parentNode;){t=t.parentNode;var i=x.fromDom(t);if(n(i))return S.some(i);if(o(i))break}return S.none()}),Oe=function(e,n,r){return Ne(e,function(e){return pe(e,n)},r)},be={getToolbarItemsOr:(B=_,function(e,n,r){return function(e,n){if(!n(e))throw new Error("Default value doesn't match requested type.")}(r,B),function(e,n){if(A(e)||C(e))throw new Error("expected a string but found: "+e);return I(e)?n:R(e)?!1===e?"":n:e}(e.getParam(n,r),r)})},Ee=function(e){return be.getToolbarItemsOr(e,"quickbars_selection_toolbar","bold italic | quicklink h2 h3 blockquote")},we=function(e){return be.getToolbarItemsOr(e,"quickbars_insert_toolbar","quickimage quicktable")},Te=function(a){var e=we(a);0<e.trim().length&&a.ui.registry.addContextToolbar("quickblock",{predicate:function(e){var n,r,t,o=x.fromDom(e),i=a.schema.getTextBlockElements(),u=function(e){return e.dom()===a.getBody()};return(n=o,r="table",t=u,L(pe,Oe,n,r,t)).fold(function(){return(e=o,n=function(e){return e.dom().nodeName.toLowerCase()in i&&a.dom.isEmpty(e.dom())},r=u,L(function(e){return n(e)},Ne,e,n,r)).isSome();var e,n,r},function(){return!1})},items:e,position:"line",scope:"editor"})},Se=function(n){n.ui.registry.addContextToolbar("imageselection",{predicate:function(e){return"IMG"===e.nodeName||"FIGURE"===e.nodeName&&/image/i.test(e.className)},items:"alignleft aligncenter alignright",position:"node"});var e=Ee(n);0<e.trim().length&&n.ui.registry.addContextToolbar("textselection",{predicate:function(e){return!n.selection.isCollapsed()},items:e,position:"selection"})};!function ye(){e.add("quickbars",function(e){h(e),Te(e),Se(e)})}()}(window);
9
+ !function(){"use strict";function n(a){a.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:function(){var i=a;new s(function(n){var r=document.createElement("input");r.type="file",r.accept="image/*",r.style.position="fixed",r.style.left="0",r.style.top="0",r.style.opacity="0.001",document.body.appendChild(r),r.addEventListener("change",function(t){n(Array.prototype.slice.call(t.target.files))});var o=function(t){function e(){n([]),r.parentNode.removeChild(r)}d.os.isAndroid()&&"remove"!==t.type?f.setEditorTimeout(i,e,0):e(),i.off("focusin remove",o)};i.on("focusin remove",o),r.click()}).then(function(t){var c,n;0<t.length&&(c=t[0],n=c,new s(function(t){var e=new FileReader;e.onloadend=function(){t(e.result.split(",")[1])},e.readAsDataURL(n)}).then(function(t){var e,n,r,o,i,u;n=t,r=c,i=(e=a).editorUpload.blobCache,u=i.create((o=(new Date).getTime(),"mceu_"+Math.floor(1e9*Math.random())+ ++l+String(o)),r,n),i.add(u),e.insertContent(e.dom.createHTML("img",{src:u.blobUri()}))}))})}}),a.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:function(){var t,n;(t=a).plugins.table?t.plugins.table.insertTable(2,2):(n=t).undoManager.transact(function(){n.insertContent(function(){var t='<table data-mce-id="mce" style="width: 100%">';t+="<tbody>";for(var e=0;e<2;e++){t+="<tr>";for(var n=0;n<2;n++)t+="<td><br></td>";t+="</tr>"}return(t+="</tbody>")+"</table>"}());var t=n.dom.select("*[data-mce-id]")[0];t.removeAttribute("data-mce-id");var e=n.dom.select("td,th",t);n.selection.setCursorLocation(e[0],0)})}})}function t(r){return function(t){return n=typeof(e=t),(null===e?"null":"object"==n&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":n)===r;var e,n}}function e(e){return function(t){return typeof t===e}}function i(t){return function(){return t}}function r(t){return t}function o(){return y}var u,c=tinymce.util.Tools.resolve("tinymce.PluginManager"),l=0,s=tinymce.util.Tools.resolve("tinymce.util.Promise"),d=tinymce.util.Tools.resolve("tinymce.Env"),f=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=t("string"),m=t("object"),g=t("array"),v=e("boolean"),h=e("function"),p=i(!1),b=i(!(u=void 0)),y={fold:function(t,e){return t()},isSome:p,isNone:b,getOr:r,getOrThunk:k,getOrDie:function(t){throw new Error(t||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:r,orThunk:k,map:o,each:function(){},bind:o,exists:p,forall:b,filter:function(){return y},toArray:function(){return[]},toString:i("none()")};function k(t){return t()}var w=function(n){function t(){return o}function e(t){return t(n)}var r=i(n),o={fold:function(t,e){return e(n)},isSome:b,isNone:p,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:t,orThunk:t,map:function(t){return w(t(n))},each:function(t){t(n)},bind:e,exists:e,forall:e,filter:function(t){return t(n)?o:y},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},T={some:w,none:o,from:function(t){return null==t?y:w(t)}};function E(t,e,n,r,o){return t(n,r)?T.some(n):h(o)&&o(n)?T.none():e(n,r,o)}function N(t,e){var n=t.dom;if(1!==n.nodeType)return!1;var r=n;if(void 0!==r.matches)return r.matches(e);if(void 0!==r.msMatchesSelector)return r.msMatchesSelector(e);if(void 0!==r.webkitMatchesSelector)return r.webkitMatchesSelector(e);if(void 0!==r.mozMatchesSelector)return r.mozMatchesSelector(e);throw new Error("Browser lacks native selectors")}function M(t){if(null==t)throw new Error("Node cannot be null or undefined");return{dom:t}}var S={fromHtml:function(t,e){var n=(e||document).createElement("div");if(n.innerHTML=t,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",t),new Error("HTML must have a single root node");return M(n.childNodes[0])},fromTag:function(t,e){var n=(e||document).createElement(t);return M(n)},fromText:function(t,e){var n=(e||document).createTextNode(t);return M(n)},fromDom:M,fromPoint:function(t,e,n){return T.from(t.dom.elementFromPoint(e,n)).map(M)}};function C(t,e,n){for(var r=t.dom,o=h(n)?n:p;r.parentNode;){var r=r.parentNode,i=S.fromDom(r);if(e(i))return T.some(i);if(o(i))break}return T.none()}function O(t,e,n){return C(t,function(t){return N(t,e)},n)}"undefined"!=typeof window||Function("return this;")();var q,x=(q=a,function(t,e,n){return function(){if(!q(n))throw new Error("Default value doesn't match requested type.")}(),function(t,e){if(g(t)||m(t))throw new Error("expected a string but found: "+t);return u===t?e:v(t)?!1===t?"":e:t}(t.getParam(e,n),n)});c.add("quickbars",function(t){var o,e;n(t),0<(e=x(o=t,"quickbars_insert_toolbar","quickimage quicktable")).trim().length&&o.ui.registry.addContextToolbar("quickblock",{predicate:function(t){function e(t){return t.dom===o.getBody()}var n=S.fromDom(t),r=o.schema.getTextBlockElements();return E(N,O,n,"table",e).fold(function(){return E(function(t,e){return e(t)},C,n,function(t){return t.dom.nodeName.toLowerCase()in r&&o.dom.isEmpty(t.dom)},e).isSome()},p)},items:e,position:"line",scope:"editor"}),function(e){function n(t){return"IMG"===t.nodeName||"FIGURE"===t.nodeName&&/image/i.test(t.className)}var t=x(e,"quickbars_image_toolbar","alignleft aligncenter alignright");0<t.trim().length&&e.ui.registry.addContextToolbar("imageselection",{predicate:n,items:t,position:"node"});var r=x(e,"quickbars_selection_toolbar","bold italic | quicklink h2 h3 blockquote");0<r.trim().length&&e.ui.registry.addContextToolbar("textselection",{predicate:function(t){return!n(t)&&!e.selection.isCollapsed()&&"false"!==e.dom.getContentEditableParent(t)},items:r,position:"selection",scope:"editor"})}(t)})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(){"use strict";var n=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),a=function(n){return n.getParam("save_enablewhendirty",!0)},i=function(n){return!!n.getParam("save_onsavecallback")},c=function(n){return!!n.getParam("save_oncancelcallback")},r=function(n,e){n.notificationManager.open({text:e,type:"error"})},e=function(n){var e;if(e=t.DOM.getParent(n.id,"form"),!a(n)||n.isDirty()){if(n.save(),i(n))return n.execCallback("save_onsavecallback",n),void n.nodeChanged();e?(n.setDirty(!1),e.onsubmit&&!e.onsubmit()||("function"==typeof e.submit?e.submit():r(n,"Error: Form submit field collision.")),n.nodeChanged()):r(n,"Error: No form element found.")}},u=function(n){var e=o.trim(n.startContent);c(n)?n.execCallback("save_oncancelcallback",n):n.resetContent(e)},l=function(n){n.addCommand("mceSave",function(){e(n)}),n.addCommand("mceCancel",function(){u(n)})},s=function(t){return function(n){var e=function(){n.setDisabled(a(t)&&!t.isDirty())};return t.on("NodeChange dirty",e),function(){return t.off("NodeChange dirty",e)}}},d=function(n){n.ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return n.execCommand("mceSave")},onSetup:s(n)}),n.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return n.execCommand("mceCancel")},onSetup:s(n)}),n.addShortcut("Meta+S","","mceSave")};!function m(){n.add("save",function(n){d(n),l(n)})}()}();
9
+ !function(){"use strict";function o(e){return e.getParam("save_enablewhendirty",!0)}function a(e,n){e.notificationManager.open({text:n,type:"error"})}function t(t){t.addCommand("mceSave",function(){!function(e){var n=c.DOM.getParent(e.id,"form");if(!o(e)||e.isDirty()){if(e.save(),e.getParam("save_onsavecallback"))return e.execCallback("save_onsavecallback",e),e.nodeChanged();n?(e.setDirty(!1),n.onsubmit&&!n.onsubmit()||("function"==typeof n.submit?n.submit():a(e,"Error: Form submit field collision.")),e.nodeChanged()):a(e,"Error: No form element found.")}}(t)}),t.addCommand("mceCancel",function(){var e=t,n=r.trim(e.startContent);e.getParam("save_oncancelcallback")?e.execCallback("save_oncancelcallback",e):e.resetContent(n)})}function i(t){return function(e){function n(){e.setDisabled(o(t)&&!t.isDirty())}return n(),t.on("NodeChange dirty",n),function(){return t.off("NodeChange dirty",n)}}}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),r=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("save",function(e){var n;(n=e).ui.registry.addButton("save",{icon:"save",tooltip:"Save",disabled:!0,onAction:function(){return n.execCommand("mceSave")},onSetup:i(n)}),n.ui.registry.addButton("cancel",{icon:"cancel",tooltip:"Cancel",disabled:!0,onAction:function(){return n.execCommand("mceCancel")},onSetup:i(n)}),n.addShortcut("Meta+S","","mceSave"),t(e)})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(){"use strict";var r=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return r(n())}}},e=tinymce.util.Tools.resolve("tinymce.PluginManager"),m=function(){return(m=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)},p=tinymce.util.Tools.resolve("tinymce.util.Tools");function x(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var t,n,a,o,i,f={findAndReplaceDOMText:function F(e,t,n,r,a){var o,i,h,f,g,m,c=[],d=0;function l(e,t){if(t=t||0,!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");var n=e.index;if(0<t){var r=e[t];if(!r)throw new Error("Invalid capture group");n+=e[0].indexOf(r),e[0]=r}return[n,n+e[0].length,[e[0]]]}if(h=t.ownerDocument,f=a.getBlockElements(),g=a.getWhiteSpaceElements(),m=a.getShortEndedElements(),i=function u(e){var t;if(3===e.nodeType)return e.data;if(g[e.nodeName]&&!f[e.nodeName])return"";if(t="",x(e))return"\n";if((f[e.nodeName]||m[e.nodeName])&&(t+="\n"),e=e.firstChild)for(;t+=u(e),e=e.nextSibling;);return t}(t)){if(e.global)for(;o=e.exec(i);)c.push(l(o,r));else o=i.match(e),c.push(l(o,r));return c.length&&(d=c.length,function p(e,t,n){var r,a,o,i,c=[],d=0,l=e,u=t.shift(),s=0;e:for(;;){if((f[l.nodeName]||m[l.nodeName]||x(l))&&d++,3===l.nodeType&&(!a&&l.length+d>=u[1]?(a=l,i=u[1]-d):r&&c.push(l),!r&&l.length+d>u[0]&&(r=l,o=u[0]-d),d+=l.length),r&&a){if(l=n({startNode:r,startNodeIndex:o,endNode:a,endNodeIndex:i,innerNodes:c,match:u[2],matchIndex:s}),d-=a.length-i,a=r=null,c=[],s++,!(u=t.shift()))break}else if(g[l.nodeName]&&!f[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!x(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===e)break e;l=l.parentNode}}}(t,c,function s(e){var p;if("function"!=typeof e){var r=e.nodeType?e:h.createElement(e);p=function(e,t){var n=r.cloneNode(!1);return n.setAttribute("data-mce-index",t),e&&n.appendChild(h.createTextNode(e)),n}}else p=e;return function(e){var t,n,r,a=e.startNode,o=e.endNode,i=e.matchIndex;if(a===o){var c=a;r=c.parentNode,0<e.startNodeIndex&&(t=h.createTextNode(c.data.substring(0,e.startNodeIndex)),r.insertBefore(t,c));var d=p(e.match[0],i);return r.insertBefore(d,c),e.endNodeIndex<c.length&&(n=h.createTextNode(c.data.substring(e.endNodeIndex)),r.insertBefore(n,c)),c.parentNode.removeChild(c),d}t=h.createTextNode(a.data.substring(0,e.startNodeIndex)),n=h.createTextNode(o.data.substring(e.endNodeIndex));for(var l=p(a.data.substring(e.startNodeIndex),i),u=0,s=e.innerNodes.length;u<s;++u){var f=e.innerNodes[u],g=p(f.data,i);f.parentNode.replaceChild(g,f)}var m=p(o.data.substring(0,e.endNodeIndex),i);return(r=a.parentNode).insertBefore(t,a),r.insertBefore(l,a),r.removeChild(a),(r=o.parentNode).insertBefore(m,o),r.insertBefore(n,o),r.removeChild(o),m}}(n))),d}}},h=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},v=function(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)},c=function(e,t){var n,r=[];if((n=p.toArray(e.getBody().getElementsByTagName("span"))).length)for(var a=0;a<n.length;a++){var o=h(n[a]);null!==o&&o.length&&(o===t.toString()&&r.push(n[a]))}return r},g=function(e,t,n){var r=t.get(),a=r.index,o=e.dom;(n=!1!==n)?a+1===r.count?a=0:a++:a-1==-1?a=r.count-1:a--,o.removeClass(c(e,r.index),"mce-match-marker-selected");var i=c(e,a);return i.length?(o.addClass(c(e,a),"mce-match-marker-selected"),e.selection.scrollIntoView(i[0]),a):-1},y=function(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)},u=function(e,t,n,r,a){n=(n=n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")).replace(/\s/g,"[^\\S\\r\\n]"),n=a?"\\b"+n+"\\b":n;var o,i,c,d,l,u=(o=e,i=t,c=new RegExp(n,r?"g":"gi"),(l=o.dom.create("span",{"data-mce-bogus":1})).className="mce-match-marker",d=o.getBody(),C(o,i,!1),f.findAndReplaceDOMText(c,d,l,!1,o.schema));if(u){var s=g(e,t,!0);t.set({index:s,count:u,text:n,matchCase:r,wholeWord:a})}return u},b=function(e,t){var n=g(e,t,!0);t.set(m({},t.get(),{index:n}))},N=function(e,t){var n=g(e,t,!1);t.set(m({},t.get(),{index:n}))},w=function(e){var t=h(e);return null!==t&&0<t.length},s=function(e,t,n,r,a){var o,i,c,d,l,u=t.get(),s=u.index,f=s;for(r=!1!==r,c=e.getBody(),i=p.grep(p.toArray(c.getElementsByTagName("span")),w),o=0;o<i.length;o++){var g=h(i[o]);if(d=l=parseInt(g,10),a||d===u.index){for(n.length?(i[o].firstChild.nodeValue=n,v(i[o])):y(e.dom,i[o]);i[++o];){if((d=parseInt(h(i[o]),10))!==l){o--;break}y(e.dom,i[o])}r&&f--}else s<l&&i[o].setAttribute("data-mce-index",String(l-1))}return t.set(m({},u,{count:a?0:u.count-1,index:f})),r?b(e,t):N(e,t),!a&&0<t.get().count},C=function(e,t,n){var r,a,o,i,c=t.get();for(a=p.toArray(e.getBody().getElementsByTagName("span")),r=0;r<a.length;r++){var d=h(a[r]);null!==d&&d.length&&(d===c.index.toString()&&(o||(o=a[r].firstChild),i=a[r].firstChild),v(a[r]))}if(o&&i){var l=e.dom.createRng();return l.setStart(o,0),l.setEnd(i,i.data.length),!1!==n&&e.selection.setRng(l),l}t.set({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1})},d=function(r,a){return{done:function(e){return C(r,a,e)},find:function(e,t,n){return u(r,a,e,t,n)},next:function(){return b(r,a)},prev:function(){return N(r,a)},replace:function(e,t,n){return s(r,a,e,t,n)}}},l=function(e){return function(){return e}},T=l(!1),A=l(!0),I=function(){return S},S=(o={fold:function(e,t){return e()},is:T,isSome:T,isNone:A,getOr:a=function(e){return e},getOrThunk:n=function(e){return e()},getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:function(){return null},getOrUndefined:function(){return undefined},or:a,orThunk:n,map:I,ap:I,each:function(){},bind:I,flatten:I,exists:T,forall:A,filter:I,equals:t=function(e){return e.isNone()},equals_:t,toArray:function(){return[]},toString:l("none()")},Object.freeze&&Object.freeze(o),o),B=(i="function",function(e){return function(e){if(null===e)return"null";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t}(e)===i}),O=Array.prototype.slice,k=(B(Array.from)&&Array.from,tinymce.util.Tools.resolve("tinymce.util.I18n")),E=function(o,i){o.undoManager.add();var e=p.trim(o.selection.getContent({format:"text"}));function c(e){(1<i.get().count?e.enable:e.disable)("next"),(1<i.get().count?e.enable:e.disable)("prev")}var d=function(e,t){!function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n,e)}(["replace","replaceall","prev","next"],t?e.disable:e.enable)};var l=function(e){C(o,i,!1),d(e,!0),c(e)},r=function(e){var t=e.getData(),n=i.get();if(t.findtext.length){if(n.text===t.findtext&&n.matchCase===t.matchcase&&n.wholeWord===t.wholewords)b(o,i);else{var r=u(o,i,t.findtext,t.matchcase,t.wholewords);r<=0&&function a(e){o.windowManager.alert("Could not find the specified string.",function(){e.focus("findtext")})}(e),d(e,0===r)}c(e)}else l(e)},t={findtext:e,replacetext:"",matchcase:!1,wholewords:!1};o.windowManager.open({title:"Find and Replace",size:"normal",body:{type:"panel",items:[{type:"input",name:"findtext",label:"Find"},{type:"input",name:"replacetext",label:"Replace with"},{type:"grid",columns:2,items:[{type:"checkbox",name:"matchcase",label:"Match case"},{type:"checkbox",name:"wholewords",label:"Find whole words only"}]}]},buttons:[{type:"custom",name:"find",text:"Find",align:"start",primary:!0},{type:"custom",name:"replace",text:"Replace",align:"start",disabled:!0},{type:"custom",name:"replaceall",text:"Replace All",align:"start",disabled:!0},{type:"custom",name:"prev",text:"Previous",align:"end",icon:k.isRtl()?"arrow-right":"arrow-left",disabled:!0},{type:"custom",name:"next",text:"Next",align:"end",icon:k.isRtl()?"arrow-left":"arrow-right",disabled:!0}],initialData:t,onChange:function(e,t){"findtext"===t.name&&0<i.get().count&&l(e)},onAction:function(e,t){var n=e.getData();switch(t.name){case"find":r(e);break;case"replace":s(o,i,n.replacetext)?c(e):l(e);break;case"replaceall":s(o,i,n.replacetext,!0,!0),l(e);break;case"prev":N(o,i),c(e);break;case"next":b(o,i),c(e)}},onSubmit:r,onClose:function(){o.focus(),C(o,i),o.undoManager.add()}})},R=function(e,t){e.addCommand("SearchReplace",function(){E(e,t)})},M=function(e,t){return function(){E(e,t)}},D=function(e,t){e.ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:M(e,t),icon:"search"}),e.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:M(e,t),icon:"search"}),e.shortcuts.add("Meta+F","",M(e,t))};!function j(){e.add("searchreplace",function(e){var t=r({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1});return R(e,t),D(e,t),d(e,t)})}()}();
9
+ !function(){"use strict";function g(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function e(r){return function(e){return n=typeof(t=e),(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n)===r;var t,n}}function t(t){return function(e){return typeof e===t}}function p(){}function i(e){return function(){return e}}function n(e){return e}function r(){return m}var o=tinymce.util.Tools.resolve("tinymce.PluginManager"),v=function(){return(v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},a=e("string"),c=e("array"),u=t("boolean"),l=t("number"),s=i(!1),f=i(!0),d=i("[!-#%-*,-\\/:;?@\\[-\\]_{}\xa1\xab\xb7\xbb\xbf;\xb7\u055a-\u055f\u0589\u058a\u05be\u05c0\u05c3\u05c6\u05f3\u05f4\u0609\u060a\u060c\u060d\u061b\u061e\u061f\u066a-\u066d\u06d4\u0700-\u070d\u07f7-\u07f9\u0830-\u083e\u085e\u0964\u0965\u0970\u0df4\u0e4f\u0e5a\u0e5b\u0f04-\u0f12\u0f3a-\u0f3d\u0f85\u0fd0-\u0fd4\u0fd9\u0fda\u104a-\u104f\u10fb\u1361-\u1368\u1400\u166d\u166e\u169b\u169c\u16eb-\u16ed\u1735\u1736\u17d4-\u17d6\u17d8-\u17da\u1800-\u180a\u1944\u1945\u1a1e\u1a1f\u1aa0-\u1aa6\u1aa8-\u1aad\u1b5a-\u1b60\u1bfc-\u1bff\u1c3b-\u1c3f\u1c7e\u1c7f\u1cd3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205e\u207d\u207e\u208d\u208e\u3008\u3009\u2768-\u2775\u27c5\u27c6\u27e6-\u27ef\u2983-\u2998\u29d8-\u29db\u29fc\u29fd\u2cf9-\u2cfc\u2cfe\u2cff\u2d70\u2e00-\u2e2e\u2e30\u2e31\u3001-\u3003\u3008-\u3011\u3014-\u301f\u3030\u303d\u30a0\u30fb\ua4fe\ua4ff\ua60d-\ua60f\ua673\ua67e\ua6f2-\ua6f7\ua874-\ua877\ua8ce\ua8cf\ua8f8-\ua8fa\ua92e\ua92f\ua95f\ua9c1-\ua9cd\ua9de\ua9df\uaa5c-\uaa5f\uaade\uaadf\uabeb\ufd3e\ufd3f\ufe10-\ufe19\ufe30-\ufe52\ufe54-\ufe61\ufe63\ufe68\ufe6a\ufe6b\uff01-\uff03\uff05-\uff0a\uff0c-\uff0f\uff1a\uff1b\uff1f\uff20\uff3b-\uff3d\uff3f\uff5b\uff5d\uff5f-\uff65]"),m={fold:function(e,t){return e()},isSome:s,isNone:f,getOr:n,getOrThunk:h,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:i(null),getOrUndefined:i(void 0),or:n,orThunk:h,map:r,each:p,bind:r,exists:s,forall:f,filter:function(){return m},toArray:function(){return[]},toString:i("none()")};function h(e){return e()}function y(e,t){for(var n=e.length,r=new Array(n),o=0;o<n;o++){var i=e[o];r[o]=t(i,o)}return r}function x(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function b(e,t){for(var n=e.length-1;0<=n;n--)t(e[n],n)}function w(e,t){return function(e){for(var t=[],n=0,r=e.length;n<r;++n){if(!c(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);A.apply(t,e[n])}return t}(y(e,t))}function O(e,t){return D.call(e,t)}var C=function(n){function e(){return o}function t(e){return e(n)}var r=i(n),o={fold:function(e,t){return t(n)},isSome:f,isNone:s,getOr:r,getOrThunk:r,getOrDie:r,getOrNull:r,getOrUndefined:r,or:e,orThunk:e,map:function(e){return C(e(n))},each:function(e){e(n)},bind:t,exists:t,forall:t,filter:function(e){return e(n)?o:m},toArray:function(){return[n]},toString:function(){return"some("+n+")"}};return o},T={some:C,none:r,from:function(e){return null==e?m:C(e)}},E=d,N=tinymce.util.Tools.resolve("tinymce.Env"),k=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=Array.prototype.slice,A=Array.prototype.push,D=Object.hasOwnProperty;function M(e,t,n){!function(e,t,n){if(!(a(n)||u(n)||l(n)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,n+"")}(e.dom,t,n)}function B(e,t){return{element:e,offset:t}}function F(e,t){var n,r;n=e,r=t,T.from(n.dom.parentNode).map(fe.fromDom).each(function(e){e.dom.insertBefore(r.dom,n.dom)}),t.dom.appendChild(e.dom)}function I(e){return de.get(e)}function P(e,t){return e.isBlock(t)||O(e.schema.getShortEndedElements(),t.nodeName)}function R(e,t){return"false"===e.getContentEditable(t)}function W(e,t){return!e.isBlock(t)&&O(e.schema.getWhiteSpaceElements(),t.nodeName)}function j(){return{sOffset:0,fOffset:0,elements:[]}}function V(e,t){return n=fe.fromDom(e),r=t,0<(o=y(n.dom.childNodes,fe.fromDom)).length&&r<o.length?B(o[r],0):B(n,r);var n,r,o}function H(e,t,n,r,o,i){for(var a=(i=void 0===i||i)?t(!1):n;a;){var c=R(e,a);if(c||W(e,a)){if(c?r.cef(a):r.boundary(a))break;a=t(!0)}else{if(P(e,a)){if(r.boundary(a))break}else 3===a.nodeType&&r.text(a);if(a===o)break;a=t(!1)}}}function L(e,t,n,r,o){var i,a,c,u,l,s;P(i=e,a=n)||R(i,a)||W(i,a)||"true"===(c=i).getContentEditable(u=a)&&"false"===c.getContentEditableParent(u.parentNode)||(l=e.getParent(r,e.isBlock),s=new me(n,l),H(e,(o?s.next:s.prev).bind(s),n,{boundary:f,cef:f,text:function(e){o?t.fOffset+=e.length:t.sOffset+=e.length,t.elements.push(fe.fromDom(e))}}))}function U(e,t,n,r,o,i){void 0===i&&(i=!0);var a=new me(n,t),c=[],u=j();function l(){return 0<u.elements.length&&(c.push(u),u=j()),!1}return L(e,u,n,t,!1),H(e,a.next.bind(a),n,{boundary:l,cef:function(e){return l(),o&&c.push.apply(c,o.cef(e)),!1},text:function(e){u.elements.push(fe.fromDom(e)),o&&o.text(e,u)}},r,i),r&&L(e,u,r,t,!0),l(),c}function $(u,e){var n=V(e.startContainer,e.startOffset),r=n.element.dom,o=V(e.endContainer,e.endOffset),i=o.element.dom;return U(u,e.commonAncestorContainer,r,i,{text:function(e,t){e===i?t.fOffset+=e.length-o.offset:e===r&&(t.sOffset+=n.offset)},cef:function(e){var t,n,r,o,i,a=w((n=fe.fromDom(e),r="*[contenteditable=true]",1!==(o=i=void 0===n?document:n.dom).nodeType&&9!==o.nodeType&&11!==o.nodeType||0===o.childElementCount?[]:y(i.querySelectorAll(r),fe.fromDom)),function(e){var t=e.dom;return U(u,t,t)}),c=function(e,t){return n=e.elements[0].dom,r=t.elements[0].dom,o=Node.DOCUMENT_POSITION_PRECEDING,0!=(n.compareDocumentPosition(r)&o)?1:-1;var n,r,o};return(t=S.call(a,0)).sort(c),t}},!1)}function _(e,t){return t.collapsed?[]:$(e,t)}function z(e,t){var n=e.createRng();return n.selectNode(t),_(e,n)}function q(c,e){return w(e,function(e){var a,n,r,t=e.elements,o=y(t,I).join(""),i=function(e,t,n,r){void 0===r&&(r=e.length);var o=t.regex;o.lastIndex=n=void 0===n?0:n;for(var i,a=[];i=o.exec(e);){var c=i[t.matchIndex],u=i.index+i[0].indexOf(c),l=u+c.length;if(r<l)break;a.push({start:u,finish:l}),o.lastIndex=l}return a}(o,c,e.sOffset,o.length-e.fOffset);return a=i,function(e,t){if(0===e.length)return[];for(var n=t(e[0]),r=[],o=[],i=0,a=e.length;i<a;i++){var c=e[i],u=t(c);u!==n&&(r.push(o),o=[]),n=u,o.push(c)}return 0!==o.length&&r.push(o),r}((n=function(e,n){var t=I(n),r=e.last,o=r+t.length,i=w(a,function(e,t){return e.start<o&&e.finish>r?[{element:n,start:Math.max(r,e.start)-r,finish:Math.min(o,e.finish)-r,matchId:t}]:[]});return{results:e.results.concat(i),last:o}},r={results:[],last:0},x(t,function(e,t){r=n(r,e)}),r.results),function(e){return e.matchId})})}function G(e,i){b(e,function(e,o){b(e,function(e){var t=fe.fromDom(i.cloneNode(!1));M(t,"data-mce-index",o);var n,r=e.element.dom;r.length===e.finish&&0===e.start?F(e.element,t):(r.length!==e.finish&&r.splitText(e.finish),n=r.splitText(e.start),F(fe.fromDom(n),t))})})}function K(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function J(e,t,n,r){var o=e.dom.create("span",{"data-mce-bogus":1});o.className="mce-match-marker";var i,a,c,u,l,s,f,d,m,h,g=e.getBody();return he(e,t,!1),r?(c=e.dom,u=n,l=e.selection,s=o,d=l.getBookmark(),m=c.select("td[data-mce-selected],th[data-mce-selected]"),G(h=q(u,0<m.length?(f=c,w(m,function(e){return z(f,e)})):_(c,l.getRng())),s),l.moveToBookmark(d),h.length):(i=o,G(a=q(n,z(e.dom,g)),i),a.length)}function Q(e){var t=e.parentNode;e.firstChild&&t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function X(e,t){var n=[],r=k.toArray(e.getBody().getElementsByTagName("span"));if(r.length)for(var o=0;o<r.length;o++){var i=K(r[o]);null!==i&&i.length&&i===t.toString()&&n.push(r[o])}return n}function Y(e,t,n){var r=t.get(),o=r.index,i=e.dom;(n=!1!==n)?o+1===r.count?o=0:o++:o-1==-1?o=r.count-1:o--,i.removeClass(X(e,r.index),"mce-match-marker-selected");var a=X(e,o);return a.length?(i.addClass(X(e,o),"mce-match-marker-selected"),e.selection.scrollIntoView(a[0]),o):-1}function Z(e,t){var n=t.parentNode;e.remove(t),e.isEmpty(n)&&e.remove(n)}function ee(e,t,n,r,o,i){var a,c,u,l=e.selection,s=(a=o,c="("+n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n\\uFEFF]")+")",a?"(?:^|\\s|"+E()+")"+c+"(?=$|\\s|"+E()+")":c),f=l.isForward(),d=J(e,t,{regex:new RegExp(s,r?"g":"gi"),matchIndex:1},i);return N.browser.isSafari()&&l.setRng(l.getRng(),f),d&&(u=Y(e,t,!0),t.set({index:u,count:d,text:n,matchCase:r,wholeWord:o,inSelection:i})),d}function te(e,t){var n=Y(e,t,!0);t.set(v(v({},t.get()),{index:n}))}function ne(e,t){var n=Y(e,t,!1);t.set(v(v({},t.get()),{index:n}))}function re(e){var t=K(e);return null!==t&&0<t.length}function oe(e,t,n,r,o){var i,a=t.get(),c=a.index,u=c;r=!1!==r;for(var l=e.getBody(),s=k.grep(k.toArray(l.getElementsByTagName("span")),re),f=0;f<s.length;f++){var d=K(s[f]),m=i=parseInt(d,10);if(o||m===a.index){for(n.length?(s[f].firstChild.nodeValue=n,Q(s[f])):Z(e.dom,s[f]);s[++f];){if((m=parseInt(K(s[f]),10))!==i){f--;break}Z(e.dom,s[f])}r&&u--}else c<i&&s[f].setAttribute("data-mce-index",String(i-1))}return t.set(v(v({},a),{count:o?0:a.count-1,index:u})),(r?te:ne)(e,t),!o&&0<t.get().count}function ie(i,a){var e,t,n,r=(e=p,t=g(T.none()),v(v({},n={clear:function(){o(),t.set(T.none())},isSet:function(){return t.get().isSome()},get:function(){return t.get()},set:function(e){o(),t.set(T.some(e))}}),{on:function(e){return n.get().each(e)}}));function o(){return t.get().each(e)}function c(e){(1<a.get().count?e.enable:e.disable)("next"),(1<a.get().count?e.enable:e.disable)("prev")}function u(e,t){x(["replace","replaceall","prev","next"],t?e.disable:e.enable)}function l(e,t){N.browser.isSafari()&&N.deviceType.isTouch()&&("find"===t||"replace"===t||"replaceall"===t)&&e.focus(t)}function s(e){he(i,a,!1),u(e,!0),c(e)}function f(e){var t,n,r=e.getData(),o=a.get();r.findtext.length?(o.text===r.findtext&&o.matchCase===r.matchcase&&o.wholeWord===r.wholewords?te(i,a):((t=ee(i,a,r.findtext,r.matchcase,r.wholewords,r.inselection))<=0&&(n=e,i.windowManager.alert("Could not find the specified string.",function(){n.focus("findtext")})),u(e,0===t)),c(e)):s(e)}i.undoManager.add();var d=k.trim(i.selection.getContent({format:"text"})),m=a.get(),h={title:"Find and Replace",size:"normal",body:{type:"panel",items:[{type:"bar",items:[{type:"input",name:"findtext",placeholder:"Find",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",disabled:!0,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",disabled:!0,borderless:!0}]},{type:"input",name:"replacetext",placeholder:"Replace with",inputMode:"search"}]},buttons:[{type:"menu",name:"options",icon:"preferences",tooltip:"Preferences",align:"start",items:[{type:"togglemenuitem",name:"matchcase",text:"Match case"},{type:"togglemenuitem",name:"wholewords",text:"Find whole words only"},{type:"togglemenuitem",name:"inselection",text:"Find in selection"}]},{type:"custom",name:"find",text:"Find",primary:!0},{type:"custom",name:"replace",text:"Replace",disabled:!0},{type:"custom",name:"replaceall",text:"Replace all",disabled:!0}],initialData:{findtext:d,replacetext:"",wholewords:m.wholeWord,matchcase:m.matchCase,inselection:m.inSelection},onChange:function(e,t){"findtext"===t.name&&0<a.get().count&&s(e)},onAction:function(e,t){var n,r,o=e.getData();switch(t.name){case"find":f(e);break;case"replace":(oe(i,a,o.replacetext)?c:s)(e);break;case"replaceall":oe(i,a,o.replacetext,!0,!0),s(e);break;case"prev":ne(i,a),c(e);break;case"next":te(i,a),c(e);break;case"matchcase":case"wholewords":case"inselection":n=e.getData(),r=a.get(),a.set(v(v({},r),{matchCase:n.matchcase,wholeWord:n.wholewords,inSelection:n.inselection})),s(e)}l(e,t.name)},onSubmit:function(e){f(e),l(e,"find")},onClose:function(){i.focus(),he(i,a),i.undoManager.add()}};r.set(i.windowManager.open(h,{inline:"toolbar"}))}function ae(e,t){return function(){ie(e,t)}}"undefined"!=typeof window||Function("return this;")();function ce(e){return 3===e.dom.nodeType}function ue(e){if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}}var le,se,fe={fromHtml:function(e,t){var n=(t||document).createElement("div");if(n.innerHTML=e,!n.hasChildNodes()||1<n.childNodes.length)throw console.error("HTML does not have a single root node",e),new Error("HTML must have a single root node");return ue(n.childNodes[0])},fromTag:function(e,t){var n=(t||document).createElement(e);return ue(n)},fromText:function(e,t){var n=(t||document).createTextNode(e);return ue(n)},fromDom:ue,fromPoint:function(e,t,n){return T.from(e.dom.elementFromPoint(t,n)).map(ue)}},de=(le=ce,{get:function(e){if(!le(e))throw new Error("Can only get text value of a text node");return se(e).getOr("")},getOption:se=function(e){return le(e)?T.from(e.dom.nodeValue):T.none()},set:function(e,t){if(!le(e))throw new Error("Can only set raw text value of a text node");e.dom.nodeValue=t}}),me=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),he=function(e,t,n){for(var r,o,i=t.get(),a=k.toArray(e.getBody().getElementsByTagName("span")),c=0;c<a.length;c++){var u=K(a[c]);null!==u&&u.length&&(u===i.index.toString()&&(r=r||a[c].firstChild,o=a[c].firstChild),Q(a[c]))}if(t.set(v(v({},i),{index:-1,count:0,text:""})),r&&o){var l=e.dom.createRng();return l.setStart(r,0),l.setEnd(o,o.data.length),!1!==n&&e.selection.setRng(l),l}};o.add("searchreplace",function(e){var t,n,r,o,i,a=g({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1}),c=a;return(t=e).addCommand("SearchReplace",function(){ie(t,c)}),(n=e).ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:ae(n,r=a),icon:"search"}),n.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:ae(n,r),icon:"search"}),n.shortcuts.add("Meta+F","",ae(n,r)),o=e,i=a,{done:function(e){return he(o,i,e)},find:function(e,t,n,r){return ee(o,i,e,t,n,r=void 0!==r&&r)},next:function(){return te(o,i)},prev:function(){return ne(o,i)},replace:function(e,t,n){return oe(o,i,e,t,n)}}})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(t){"use strict";var a=function(e){var t=e,n=function(){return t};return{get:n,set:function(e){t=e},clone:function(){return a(n())}}},n=tinymce.util.Tools.resolve("tinymce.PluginManager"),c=function(e){return!(!/(^|[ ,])tinymcespellchecker([, ]|$)/.test(e.settings.plugins)||!n.get("tinymcespellchecker")||("undefined"!=typeof t.window.console&&t.window.console.log&&t.window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),0))},N=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=tinymce.util.Tools.resolve("tinymce.util.URI"),f=tinymce.util.Tools.resolve("tinymce.util.XHR"),l=function(e){return e.fire("SpellcheckStart")},o=function(e){return e.fire("SpellcheckEnd")},g=function(e){return e.getParam("spellchecker_languages","English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv")},s=function(e){var t=e.getParam("language","en");return e.getParam("spellchecker_language",t)},h=function(e){return e.getParam("spellchecker_rpc_url")},p=function(e){return e.getParam("spellchecker_callback")},u=function(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)};function b(e){return e&&1===e.nodeType&&"false"===e.contentEditable}var m,r=function(a,r){var n,o,g,h,p,i=[],v=r.dom;function c(e,t){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}function s(e){var t=a.getElementsByTagName("*"),n=[];e="number"==typeof e?""+e:null;for(var r=0;r<t.length;r++){var o=t[r],i=o.getAttribute("data-mce-index");null!==i&&i.length&&-1!==o.className.indexOf("mce-spellchecker-word")&&(i!==e&&null!==e||n.push(o))}return n}function l(e){for(var t=i.length;t--;)if(i[t]===e)return t;return-1}function e(e){for(var t=0,n=i.length;t<n&&!1!==e(i[t],t);t++);return this}function t(e){var t,n,r=s(e?l(e):null);for(t=r.length;t--;)(n=r[t]).parentNode.insertBefore(n.firstChild,n),n.parentNode.removeChild(n);return this}function u(e){var t=s(l(e)),n=r.dom.createRng();return n.setStartBefore(t[0]),n.setEndAfter(t[t.length-1]),n}return g=r.schema.getBlockElements(),h=r.schema.getWhiteSpaceElements(),p=r.schema.getShortEndedElements(),{text:o=function d(e){var t;if(3===e.nodeType)return e.data;if(h[e.nodeName]&&!g[e.nodeName])return"";if(b(e))return"\n";if(t="",(g[e.nodeName]||p[e.nodeName])&&(t+="\n"),e=e.firstChild)for(;t+=d(e),e=e.nextSibling;);return t}(a),matches:i,each:e,filter:function f(n){var r=[];return e(function(e,t){n(e,t)&&r.push(e)}),i=r,this},reset:function m(){return i.splice(0,i.length),t(),this},matchFromElement:function x(e){return i[e.getAttribute("data-mce-index")]},elementFromMatch:function k(e){return s(l(e))[0]},find:function N(e,t){if(o&&e.global)for(;n=e.exec(o);)i.push(c(n,t));return this},add:function y(e,t,n){return i.push({start:e,end:e+t,text:o.substr(e,t),data:n}),this},wrap:function S(e){return i.length&&function f(e,t,n){var r,o,i,a,c,s=[],l=0,u=e,d=0;(t=t.slice(0)).sort(function(e,t){return e.start-t.start}),c=t.shift();e:for(;;){if((g[u.nodeName]||p[u.nodeName]||b(u))&&l++,3===u.nodeType&&(!o&&u.length+l>=c.end?(o=u,a=c.end-l):r&&s.push(u),!r&&u.length+l>c.start&&(r=u,i=c.start-l),l+=u.length),r&&o){if(u=n({startNode:r,startNodeIndex:i,endNode:o,endNodeIndex:a,innerNodes:s,match:c.text,matchIndex:d}),l-=o.length-a,o=r=null,s=[],d++,!(c=t.shift()))break}else if(h[u.nodeName]&&!g[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!b(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===e)break e;u=u.parentNode}}}(a,i,function t(o){function m(e,t){var n=i[t];n.stencil||(n.stencil=o(n));var r=n.stencil.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(v.doc.createTextNode(e)),r}return function(e){var t,n,r,o=e.startNode,i=e.endNode,a=e.matchIndex,c=v.doc;if(o===i){var s=o;r=s.parentNode,0<e.startNodeIndex&&(t=c.createTextNode(s.data.substring(0,e.startNodeIndex)),r.insertBefore(t,s));var l=m(e.match,a);return r.insertBefore(l,s),e.endNodeIndex<s.length&&(n=c.createTextNode(s.data.substring(e.endNodeIndex)),r.insertBefore(n,s)),s.parentNode.removeChild(s),l}t=c.createTextNode(o.data.substring(0,e.startNodeIndex)),n=c.createTextNode(i.data.substring(e.endNodeIndex));for(var u=m(o.data.substring(e.startNodeIndex),a),d=0,f=e.innerNodes.length;d<f;++d){var g=e.innerNodes[d],h=m(g.data,a);g.parentNode.replaceChild(h,g)}var p=m(i.data.substring(0,e.endNodeIndex),a);return(r=o.parentNode).insertBefore(t,o),r.insertBefore(u,o),r.removeChild(o),(r=i.parentNode).insertBefore(p,i),r.insertBefore(n,i),r.removeChild(i),p}}(e)),this},unwrap:t,replace:function w(e,t){var n=u(e);return n.deleteContents(),0<t.length&&n.insertNode(r.dom.doc.createTextNode(t)),n},rangeFromMatch:u,indexOf:l}},v=function(e,t){if(!t.get()){var n=r(e.getBody(),e);t.set(n)}return t.get()},x=function(e,t,n,r,o,i,a){var c,s,l,u=p(e);(u||(c=e,s=t,l=n,function(e,t,r,o){var n={method:e,lang:l.get()},i="";n["addToDictionary"===e?"word":"text"]=t,N.each(n,function(e,t){i&&(i+="&"),i+=t+"="+encodeURIComponent(e)}),f.send({url:new d(s).toAbsolute(h(c)),type:"post",content_type:"application/x-www-form-urlencoded",data:i,success:function(e){var t=JSON.parse(e);if(t)t.error?o(t.error):r(t);else{var n=c.translate("Server response wasn't proper JSON.");o(n)}},error:function(){var e=c.translate("The spelling service was not found: (")+h(c)+c.translate(")");o(e)}})})).call(e.plugins.spellchecker,r,o,i,a)},k=function(e,t,n){e.dom.select("span.mce-spellchecker-word").length||y(e,t,n)},y=function(e,t,n){var r=e.selection.getBookmark();if(v(e,n).reset(),e.selection.moveToBookmark(r),n.set(null),t.get())return t.set(!1),o(e),!0},S=function(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t},w=function(t,e,n,r,o){var i=!!o.dictionary,a=o.words;if(t.setProgressState(!1),function(e){for(var t in e)return!1;return!0}(a)){var c=t.translate("No misspellings found.");return t.notificationManager.open({text:c,type:"info"}),void e.set(!1)}r.set({suggestions:a,hasDictionarySupport:i});var s=t.selection.getBookmark();v(t,n).find(u(t)).filter(function(e){return!!a[e.text]}).wrap(function(e){return t.dom.create("span",{"class":"mce-spellchecker-word","aria-invalid":"spelling","data-mce-bogus":1,"data-mce-word":e.text})}),t.selection.moveToBookmark(s),e.set(!0),l(t)},T={spellcheck:function(t,e,n,r,o,i){y(t,n,r)||(t.setProgressState(!0),x(t,e,i,"spellcheck",v(t,r).text,function(e){w(t,n,r,o,e)},function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1),y(t,n,r)}),t.focus())},checkIfFinished:k,addToDictionary:function(t,e,n,r,o,i,a){t.setProgressState(!0),x(t,e,o,"addToDictionary",i,function(){t.setProgressState(!1),t.dom.remove(a,!0),k(t,n,r)},function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1)})},ignoreWord:function(t,e,n,r,o,i){t.selection.collapse(),i?N.each(t.dom.select("span.mce-spellchecker-word"),function(e){e.getAttribute("data-mce-word")===r&&t.dom.remove(e,!0)}):t.dom.remove(o,!0),k(t,e,n)},findSpansByIndex:function(e,t){var n,r=[];if((n=N.toArray(e.getBody().getElementsByTagName("span"))).length)for(var o=0;o<n.length;o++){var i=S(n[o]);null!==i&&i.length&&i===t.toString()&&r.push(n[o])}return r},getElmIndex:S,markErrors:w},I=function(t,n,r,o,e,i){return{getTextMatcher:function(){return o.get()},getWordCharPattern:function(){return u(t)},markErrors:function(e){T.markErrors(t,n,o,r,e)},getLanguage:function(){return e.get()}}},A=function(e,t,n,r,o,i){e.addCommand("mceSpellCheck",function(){T.spellcheck(e,t,n,r,o,i)})},B=Object.prototype.hasOwnProperty,E=(m=function(e,t){return t},function(){for(var e=new Array(arguments.length),t=0;t<e.length;t++)e[t]=arguments[t];if(0===e.length)throw new Error("Can't merge zero objects");for(var n={},r=0;r<e.length;r++){var o=e[r];for(var i in o)B.call(o,i)&&(n[i]=m(n[i],o[i]))}return n}),C="SpellcheckStart SpellcheckEnd",P=function(n,e,r,t,o,i){var a,c,s,l=(s=n,a=N.map(g(s).split(","),function(e){return{name:(e=e.split("="))[0],value:e[1]}}),c=[],N.each(a,function(e){c.push({selectable:!0,text:e.name,data:e.value})}),c),u=function(){T.spellcheck(n,e,r,t,i,o)},d={tooltip:"Spellcheck",onAction:u,icon:"spell-check",onSetup:function(e){var t=function(){e.setActive(r.get())};return n.on(C,t),function(){n.off(C,t)}}};n.ui.registry.addButton("spellchecker",E(d,1<l.length?{type:"splitbutton",menu:l,select:function(e){return e===o.get()},fetch:function(e){e(N.map(l,function(e){return{type:"choiceitem",value:e.data,text:e.text}}))},onItemAction:function(e,t){o.set(t)}}:{type:"togglebutton"})),n.ui.registry.addToggleMenuItem("spellchecker",{text:"Spellcheck",onSetup:function(e){e.setActive(r.get());var t=function(){e.setActive(r.get())};return n.on(C,t),function(){n.off(C,t)}},onAction:u})},R=function(h,p,m,v,x,k){h.ui.registry.addContextMenu("spellchecker",{update:function(e){var t=e;if("mce-spellchecker-word"!==t.className)return[];var n,r,o,i,a,c,s,l,u,d,f=T.findSpansByIndex(h,T.getElmIndex(t));if(0<f.length){var g=h.dom.createRng();return g.setStartBefore(f[0]),g.setEndAfter(f[f.length-1]),h.selection.setRng(g),n=h,r=p,o=m,i=v,a=x,c=k,s=t.getAttribute("data-mce-word"),l=f,u=[],d=o.get().suggestions[s],N.each(d,function(e){u.push({text:e,onAction:function(){n.insertContent(n.dom.encode(e)),n.dom.remove(l),T.checkIfFinished(n,i,a)}})}),o.get().hasDictionarySupport&&(u.push({type:"separator"}),u.push({text:"Add to dictionary",onAction:function(){T.addToDictionary(n,r,i,a,c,s,l)}})),u.push.apply(u,[{type:"separator"},{text:"Ignore",onAction:function(){T.ignoreWord(n,i,a,s,l)}},{text:"Ignore all",onAction:function(){T.ignoreWord(n,i,a,s,l,!0)}}]),u}}})};!function e(){n.add("spellchecker",function(e,t){if(!1===c(e)){var n=a(!1),r=a(s(e)),o=a(null),i=a(null);return P(e,t,n,o,r,i),R(e,t,i,n,o,r),A(e,t,n,o,i,r),I(e,n,i,o,r,t)}})}()}(window);
9
+ !function(){"use strict";function C(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function u(e){return e.getParam("spellchecker_rpc_url")}function E(e){var t=new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g");return e.getParam("spellchecker_wordchar_pattern",t)}function p(e){return e&&1===e.nodeType&&"false"===e.contentEditable}function r(i,r){function o(e){var t=i.getElementsByTagName("*"),n=[];e="number"==typeof e?""+e:null;for(var r=0;r<t.length;r++){var o=t[r],a=o.getAttribute("data-mce-index");null!==a&&a.length&&-1!==o.className.indexOf("mce-spellchecker-word")&&(a!==e&&null!==e||n.push(o))}return n}function a(e){for(var t=c.length;t--;)if(c[t]===e)return t;return-1}var n,c=[],v=r.dom,f=r.schema.getBlockElements(),h=r.schema.getWhiteSpaceElements(),g=r.schema.getShortEndedElements(),s=function(e){if(3===e.nodeType)return e.data;if(h[e.nodeName]&&!f[e.nodeName])return"";if(p(e))return"\n";var t="";if((f[e.nodeName]||g[e.nodeName])&&(t+="\n"),e=e.firstChild)for(;t+=s(e),e=e.nextSibling;);return t};function e(e){for(var t=0,n=c.length;t<n&&!1!==e(c[t],t);t++);return this}function t(e){for(var t=o(e?a(e):null),n=t.length;n--;)!function(e){for(var t=e.parentNode;0<e.childNodes.length;)t.insertBefore(e.childNodes[0],e);t.removeChild(e)}(t[n]);return this}function l(e){var t=o(a(e)),n=r.dom.createRng();return n.setStartBefore(t[0]),n.setEndAfter(t[t.length-1]),n}var u=s(i);return{text:u,matches:c,each:e,filter:function(n){var r=[];return e(function(e,t){n(e,t)&&r.push(e)}),c=r,this},reset:function(){return c.splice(0,c.length),t(),this},matchFromElement:function(e){return c[e.getAttribute("data-mce-index")]},elementFromMatch:function(e){return o(a(e))[0]},find:function(e,t){if(u&&e.global)for(;n=e.exec(u);)c.push(function(e,t){if(!e[0])throw new Error("findAndReplaceDOMText cannot handle zero-length matches");return{start:e.index,end:e.index+e[0].length,text:e[0],data:t}}(n,t));return this},add:function(e,t,n){return c.push({start:e,end:e+t,text:u.substr(e,t),data:n}),this},wrap:function(e){return c.length&&function(e,t,n){var r,o,a,i,c,s=[],l=0,u=e,d=0;(t=t.slice(0)).sort(function(e,t){return e.start-t.start}),c=t.shift();e:for(;;){if((f[u.nodeName]||g[u.nodeName]||p(u))&&l++,3===u.nodeType&&(!o&&u.length+l>=c.end?(o=u,i=c.end-l):r&&s.push(u),!r&&u.length+l>c.start&&(r=u,a=c.start-l),l+=u.length),r&&o){if(u=n({startNode:r,startNodeIndex:a,endNode:o,endNodeIndex:i,innerNodes:s,match:c.text,matchIndex:d}),l-=o.length-i,o=r=null,s=[],d++,!(c=t.shift()))break}else if(h[u.nodeName]&&!f[u.nodeName]||!u.firstChild){if(u.nextSibling){u=u.nextSibling;continue}}else if(!p(u)){u=u.firstChild;continue}for(;;){if(u.nextSibling){u=u.nextSibling;break}if(u.parentNode===e)break e;u=u.parentNode}}}(i,c,(o=e,function(e){var t=e.startNode,n=e.endNode,r=e.matchIndex,o=v.doc;if(t===n){var a=t,i=a.parentNode;0<e.startNodeIndex&&(s=o.createTextNode(a.data.substring(0,e.startNodeIndex)),i.insertBefore(s,a));var c=m(e.match,r);return i.insertBefore(c,a),e.endNodeIndex<a.length&&(l=o.createTextNode(a.data.substring(e.endNodeIndex)),i.insertBefore(l,a)),a.parentNode.removeChild(a),c}for(var s=o.createTextNode(t.data.substring(0,e.startNodeIndex)),l=o.createTextNode(n.data.substring(e.endNodeIndex)),u=m(t.data.substring(e.startNodeIndex),r),d=0,f=e.innerNodes.length;d<f;++d){var h=e.innerNodes[d],g=m(h.data,r);h.parentNode.replaceChild(g,h)}var p=m(n.data.substring(0,e.endNodeIndex),r);return(i=t.parentNode).insertBefore(s,t),i.insertBefore(u,t),i.removeChild(t),(i=n.parentNode).insertBefore(p,n),i.insertBefore(l,n),i.removeChild(n),p})),this;function m(e,t){var n=c[t];n.stencil||(n.stencil=o(n));var r=n.stencil.cloneNode(!1);return r.setAttribute("data-mce-index",""+t),e&&r.appendChild(v.doc.createTextNode(e)),r}var o},unwrap:t,replace:function(e,t){var n=l(e);return n.deleteContents(),0<t.length&&n.insertNode(r.dom.doc.createTextNode(t)),n},rangeFromMatch:l,indexOf:a}}function l(e,t){var n;return t.get()||(n=r(e.getBody(),e),t.set(n)),t.get()}function k(e,t,n,r,o,a,i){var c,s,l;(e.getParam("spellchecker_callback")||(c=e,s=t,l=n,function(e,t,r,o){var n={method:e,lang:l.get()},a="";n["addToDictionary"===e?"word":"text"]=t,M.each(n,function(e,t){a&&(a+="&"),a+=t+"="+encodeURIComponent(e)}),h.send({url:new f(s).toAbsolute(u(c)),type:"post",content_type:"application/x-www-form-urlencoded",data:a,success:function(e){var t,n=JSON.parse(e);n?n.error?o(n.error):r(n):(t=c.translate("Server response wasn't proper JSON."),o(t))},error:function(){var e=c.translate("The spelling service was not found: (")+u(c)+c.translate(")");o(e)}})})).call(e.plugins.spellchecker,r,o,a,i)}function R(t,e,n,r,o,a){i(t,n,r)||(t.setProgressState(!0),k(t,e,a,"spellcheck",l(t,r).text,function(e){O(t,n,r,o,e)},function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1),i(t,n,r)}),t.focus())}function y(e,t,n){e.dom.select("span.mce-spellchecker-word").length||i(e,t,n)}function S(t,e,n,r,o,a){t.selection.collapse(),a?M.each(t.dom.select("span.mce-spellchecker-word"),function(e){e.getAttribute("data-mce-word")===r&&t.dom.remove(e,!0)}):t.dom.remove(o,!0),y(t,e,n)}function b(e){var t=e.getAttribute("data-mce-index");return"number"==typeof t?""+t:t}function _(g,p,m,v,x,N){g.ui.registry.addContextMenu("spellchecker",{update:function(e){var t=e;if("mce-spellchecker-word"!==t.className)return[];var c,s,n,l,u,d,f,h,r,o,a=function(e,t){var n=[],r=M.toArray(e.getBody().getElementsByTagName("span"));if(r.length)for(var o=0;o<r.length;o++){var a=b(r[o]);null!==a&&a.length&&a===t.toString()&&n.push(r[o])}return n}(g,b(t));if(0<a.length){var i=g.dom.createRng();return i.setStartBefore(a[0]),i.setEndAfter(a[a.length-1]),g.selection.setRng(i),c=g,s=p,n=m,l=v,u=x,d=N,f=t.getAttribute("data-mce-word"),h=a,r=[],o=n.get().suggestions[f],M.each(o,function(e){r.push({text:e,onAction:function(){c.insertContent(c.dom.encode(e)),c.dom.remove(h),y(c,l,u)}})}),n.get().hasDictionarySupport&&(r.push({type:"separator"}),r.push({text:"Add to dictionary",onAction:function(){var t,e=s,n=l,r=u,o=d,a=f,i=h;(t=c).setProgressState(!0),k(t,e,o,"addToDictionary",a,function(){t.setProgressState(!1),t.dom.remove(i,!0),y(t,n,r)},function(e){t.notificationManager.open({text:e,type:"error"}),t.setProgressState(!1)})}})),r.push.apply(r,[{type:"separator"},{text:"Ignore",onAction:function(){S(c,l,u,f,h)}},{text:"Ignore all",onAction:function(){S(c,l,u,f,h,!0)}}]),r}}})}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),d=Object.hasOwnProperty,M=tinymce.util.Tools.resolve("tinymce.util.Tools"),f=tinymce.util.Tools.resolve("tinymce.util.URI"),h=tinymce.util.Tools.resolve("tinymce.util.XHR"),i=function(e,t,n){var r=e.selection.getBookmark();if(l(e,n).reset(),e.selection.moveToBookmark(r),n.set(null),t.get())return t.set(!1),e.fire("SpellcheckEnd"),!0},O=function(t,e,n,r,o){var a=!!o.dictionary,i=o.words;if(t.setProgressState(!1),function(e){for(var t in e)if(d.call(e,t))return;return 1}(i)){var c=t.translate("No misspellings found.");return t.notificationManager.open({text:c,type:"info"}),void e.set(!1)}r.set({suggestions:i,hasDictionarySupport:a});var s=t.selection.getBookmark();l(t,n).find(E(t)).filter(function(e){return!!i[e.text]}).wrap(function(e){return t.dom.create("span",{class:"mce-spellchecker-word","aria-invalid":"spelling","data-mce-bogus":1,"data-mce-word":e.text})}),t.selection.moveToBookmark(s),e.set(!0),t.fire("SpellcheckStart")},D=function(){return(D=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},F="SpellcheckStart SpellcheckEnd";e.add("spellchecker",function(e,t){if(0==(!!e.hasPlugin("tinymcespellchecker",!0)&&(void 0!==window.console&&window.console.log&&window.console.log("Spell Checker Pro is incompatible with Spell Checker plugin! Remove 'spellchecker' from the 'plugins' option."),!0))){var n=C(!1),r=C((I=(P=e).getParam("language","en"),P.getParam("spellchecker_language",I))),o=C(null),a=C(null);return c=e,s=t,l=n,u=o,d=r,f=a,h=M.map(c.getParam("spellchecker_languages","English=en,Danish=da,Dutch=nl,Finnish=fi,French=fr_FR,German=de,Italian=it,Polish=pl,Portuguese=pt_BR,Spanish=es,Swedish=sv").split(","),function(e){var t=e.split("=");return{name:t[0],value:t[1]}}),g=[],M.each(h,function(e){g.push({selectable:!0,text:e.name,data:e.value})}),p=g,v=D(D({},m={tooltip:"Spellcheck",onAction:i,icon:"spell-check",onSetup:function(e){function t(){e.setActive(l.get())}return c.on(F,t),function(){c.off(F,t)}}}),{type:"splitbutton",select:function(e){return e===d.get()},fetch:function(e){e(M.map(p,function(e){return{type:"choiceitem",value:e.data,text:e.text}}))},onItemAction:function(e,t){d.set(t)}}),1<p.length?c.ui.registry.addSplitButton("spellchecker",v):c.ui.registry.addToggleButton("spellchecker",m),c.ui.registry.addToggleMenuItem("spellchecker",{text:"Spellcheck",icon:"spell-check",onSetup:function(e){function t(){e.setActive(l.get())}return e.setActive(l.get()),c.on(F,t),function(){c.off(F,t)}},onAction:i}),_(e,t,a,n,o,r),b=t,w=n,T=o,A=a,B=r,(S=e).addCommand("mceSpellCheck",function(){R(S,b,w,T,A,B)}),x=e,N=n,k=a,{getTextMatcher:(y=o).get,getWordCharPattern:function(){return E(x)},markErrors:function(e){O(x,N,y,k,e)},getLanguage:r.get}}function i(){R(c,s,l,u,f,d)}var c,s,l,u,d,f,h,g,p,m,v,x,N,k,y,S,b,w,T,A,B,P,I})}();
@@ -4,6 +4,6 @@
4
4
  * For LGPL see License.txt in the project root for license information.
5
5
  * For commercial licenses see https://www.tiny.cloud/
6
6
  *
7
- * Version: 5.0.11 (2019-07-04)
7
+ * Version: 5.10.7 (2022-12-06)
8
8
  */
9
- !function(c){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),y=tinymce.util.Tools.resolve("tinymce.util.Delay"),f=tinymce.util.Tools.resolve("tinymce.util.Tools"),d=tinymce.util.Tools.resolve("tinymce.util.VK"),m=function(e){return e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))},v=t.DOM,n=function(e){e.keyCode!==d.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()},i=function(r){function e(n){var i,o,e,l;if(!(n.keyCode!==d.TAB||n.ctrlKey||n.altKey||n.metaKey||n.isDefaultPrevented())&&(1===(e=f.explode(m(r))).length&&(e[1]=e[0],e[0]=":prev"),o=n.shiftKey?":prev"===e[0]?u(-1):v.get(e[0]):":next"===e[1]?u(1):v.get(e[1]))){var t=s.get(o.id||o.name);o.id&&t?t.focus():y.setTimeout(function(){a.webkit||c.window.focus(),o.focus()},10),n.preventDefault()}function u(e){function t(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&s.get(n.id)&&-1!==e.tabIndex&&function t(e){return"BODY"===e.nodeName||"hidden"!==e.type&&"none"!==e.style.display&&"hidden"!==e.style.visibility&&t(e.parentNode)}(e)}if(o=v.select(":input:enabled,*[tabindex]:not(iframe)"),f.each(o,function(e,t){if(e.id===r.id)return i=t,!1}),0<e){for(l=i+1;l<o.length;l++)if(t(o[l]))return o[l]}else for(l=i-1;0<=l;l--)if(t(o[l]))return o[l];return null}}r.on("init",function(){r.inline&&v.setAttrib(r.getBody(),"tabIndex",null),r.on("keyup",n),a.gecko?r.on("keypress keydown",e):r.on("keydown",e)})};!function o(){e.add("tabfocus",function(e){i(e)})}()}(window);
9
+ !function(){"use strict";function n(e){e.keyCode!==y.TAB||e.ctrlKey||e.altKey||e.metaKey||e.preventDefault()}var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),s=tinymce.util.Tools.resolve("tinymce.EditorManager"),o=tinymce.util.Tools.resolve("tinymce.Env"),a=tinymce.util.Tools.resolve("tinymce.util.Delay"),c=tinymce.util.Tools.resolve("tinymce.util.Tools"),y=tinymce.util.Tools.resolve("tinymce.util.VK"),d=t.DOM;e.add("tabfocus",function(e){function t(l){var r,e,t,n,i;l.keyCode!==y.TAB||l.ctrlKey||l.altKey||l.metaKey||l.isDefaultPrevented()||(e=function(e){function t(e){return/INPUT|TEXTAREA|BUTTON/.test(e.tagName)&&s.get(l.id)&&-1!==e.tabIndex&&i(e)}var n=d.select(":input:enabled,*[tabindex]:not(iframe)"),i=function(e){return"BODY"===e.nodeName||"hidden"!==e.type&&"none"!==e.style.display&&"hidden"!==e.style.visibility&&i(e.parentNode)};if(c.each(n,function(e,t){if(e.id===u.id)return r=t,!1}),0<e){for(var o=r+1;o<n.length;o++)if(t(n[o]))return n[o]}else for(o=r-1;0<=o;o--)if(t(n[o]))return n[o];return null},1===(t=c.explode(u.getParam("tab_focus",u.getParam("tabfocus_elements",":prev,:next")))).length&&(t[1]=t[0],t[0]=":prev"),(n=l.shiftKey?":prev"===t[0]?e(-1):d.get(t[0]):":next"===t[1]?e(1):d.get(t[1]))&&(i=s.get(n.id||n.name),n.id&&i?i.focus():a.setTimeout(function(){o.webkit||window.focus(),n.focus()},10),l.preventDefault()))}var u;(u=e).on("init",function(){u.inline&&d.setAttrib(u.getBody(),"tabIndex",null),u.on("keyup",n),o.gecko?u.on("keypress keydown",t):u.on("keydown",t)})})}();