@ntlab/ntjs-assets 2.116.0 → 2.118.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/assets/js/cdn.json +2 -2
  2. package/assets/js/tinymce/CHANGELOG.md +24 -0
  3. package/assets/js/tinymce/models/dom/model.js +32 -37
  4. package/assets/js/tinymce/models/dom/model.min.js +1 -1
  5. package/assets/js/tinymce/plugins/accordion/plugin.js +27 -14
  6. package/assets/js/tinymce/plugins/accordion/plugin.min.js +1 -1
  7. package/assets/js/tinymce/plugins/advlist/plugin.js +7 -5
  8. package/assets/js/tinymce/plugins/advlist/plugin.min.js +1 -1
  9. package/assets/js/tinymce/plugins/anchor/plugin.js +1 -1
  10. package/assets/js/tinymce/plugins/autolink/plugin.js +3 -5
  11. package/assets/js/tinymce/plugins/autolink/plugin.min.js +1 -1
  12. package/assets/js/tinymce/plugins/autoresize/plugin.js +4 -6
  13. package/assets/js/tinymce/plugins/autoresize/plugin.min.js +1 -1
  14. package/assets/js/tinymce/plugins/autosave/plugin.js +4 -7
  15. package/assets/js/tinymce/plugins/autosave/plugin.min.js +1 -1
  16. package/assets/js/tinymce/plugins/charmap/plugin.js +8 -7
  17. package/assets/js/tinymce/plugins/charmap/plugin.min.js +1 -1
  18. package/assets/js/tinymce/plugins/code/plugin.js +1 -1
  19. package/assets/js/tinymce/plugins/codesample/plugin.js +9 -9
  20. package/assets/js/tinymce/plugins/codesample/plugin.min.js +2 -2
  21. package/assets/js/tinymce/plugins/directionality/plugin.js +8 -7
  22. package/assets/js/tinymce/plugins/directionality/plugin.min.js +1 -1
  23. package/assets/js/tinymce/plugins/emoticons/plugin.js +7 -5
  24. package/assets/js/tinymce/plugins/emoticons/plugin.min.js +1 -1
  25. package/assets/js/tinymce/plugins/fullscreen/plugin.js +10 -9
  26. package/assets/js/tinymce/plugins/fullscreen/plugin.min.js +1 -1
  27. package/assets/js/tinymce/plugins/help/plugin.js +10 -11
  28. package/assets/js/tinymce/plugins/help/plugin.min.js +1 -1
  29. package/assets/js/tinymce/plugins/image/plugin.js +21 -28
  30. package/assets/js/tinymce/plugins/image/plugin.min.js +1 -1
  31. package/assets/js/tinymce/plugins/importcss/plugin.js +4 -5
  32. package/assets/js/tinymce/plugins/importcss/plugin.min.js +1 -1
  33. package/assets/js/tinymce/plugins/insertdatetime/plugin.js +3 -3
  34. package/assets/js/tinymce/plugins/insertdatetime/plugin.min.js +1 -1
  35. package/assets/js/tinymce/plugins/langs8/it.js +1 -1
  36. package/assets/js/tinymce/plugins/langs8/zh-CN.js +4 -4
  37. package/assets/js/tinymce/plugins/link/plugin.js +15 -17
  38. package/assets/js/tinymce/plugins/link/plugin.min.js +1 -1
  39. package/assets/js/tinymce/plugins/lists/plugin.js +7 -5
  40. package/assets/js/tinymce/plugins/lists/plugin.min.js +1 -1
  41. package/assets/js/tinymce/plugins/media/plugin.js +15 -21
  42. package/assets/js/tinymce/plugins/media/plugin.min.js +1 -1
  43. package/assets/js/tinymce/plugins/nonbreaking/plugin.js +1 -1
  44. package/assets/js/tinymce/plugins/pagebreak/plugin.js +1 -1
  45. package/assets/js/tinymce/plugins/preview/plugin.js +88 -10
  46. package/assets/js/tinymce/plugins/preview/plugin.min.js +1 -1
  47. package/assets/js/tinymce/plugins/quickbars/plugin.js +9 -9
  48. package/assets/js/tinymce/plugins/quickbars/plugin.min.js +1 -1
  49. package/assets/js/tinymce/plugins/save/plugin.js +1 -1
  50. package/assets/js/tinymce/plugins/searchreplace/plugin.js +10 -11
  51. package/assets/js/tinymce/plugins/searchreplace/plugin.min.js +1 -1
  52. package/assets/js/tinymce/plugins/table/plugin.js +12 -13
  53. package/assets/js/tinymce/plugins/table/plugin.min.js +1 -1
  54. package/assets/js/tinymce/plugins/visualblocks/plugin.js +1 -1
  55. package/assets/js/tinymce/plugins/visualchars/plugin.js +9 -9
  56. package/assets/js/tinymce/plugins/visualchars/plugin.min.js +1 -1
  57. package/assets/js/tinymce/plugins/wordcount/plugin.js +1 -1
  58. package/assets/js/tinymce/skins/ui/oxide/content.css +32 -0
  59. package/assets/js/tinymce/skins/ui/oxide/content.inline.css +32 -0
  60. package/assets/js/tinymce/skins/ui/oxide/content.inline.js +1 -1
  61. package/assets/js/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
  62. package/assets/js/tinymce/skins/ui/oxide/content.js +1 -1
  63. package/assets/js/tinymce/skins/ui/oxide/content.min.css +1 -1
  64. package/assets/js/tinymce/skins/ui/oxide/skin.css +52 -3
  65. package/assets/js/tinymce/skins/ui/oxide/skin.js +1 -1
  66. package/assets/js/tinymce/skins/ui/oxide/skin.min.css +1 -1
  67. package/assets/js/tinymce/skins/ui/oxide-dark/content.css +32 -0
  68. package/assets/js/tinymce/skins/ui/oxide-dark/content.inline.css +32 -0
  69. package/assets/js/tinymce/skins/ui/oxide-dark/content.inline.js +1 -1
  70. package/assets/js/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
  71. package/assets/js/tinymce/skins/ui/oxide-dark/content.js +1 -1
  72. package/assets/js/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
  73. package/assets/js/tinymce/skins/ui/oxide-dark/skin.css +52 -3
  74. package/assets/js/tinymce/skins/ui/oxide-dark/skin.js +1 -1
  75. package/assets/js/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
  76. package/assets/js/tinymce/skins/ui/tinymce-5/content.css +32 -0
  77. package/assets/js/tinymce/skins/ui/tinymce-5/content.inline.css +32 -0
  78. package/assets/js/tinymce/skins/ui/tinymce-5/content.inline.js +1 -1
  79. package/assets/js/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -1
  80. package/assets/js/tinymce/skins/ui/tinymce-5/content.js +1 -1
  81. package/assets/js/tinymce/skins/ui/tinymce-5/content.min.css +1 -1
  82. package/assets/js/tinymce/skins/ui/tinymce-5/skin.css +52 -3
  83. package/assets/js/tinymce/skins/ui/tinymce-5/skin.js +1 -1
  84. package/assets/js/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
  85. package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.css +32 -0
  86. package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.inline.css +32 -0
  87. package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.inline.js +1 -1
  88. package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
  89. package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.js +1 -1
  90. package/assets/js/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -1
  91. package/assets/js/tinymce/skins/ui/tinymce-5-dark/skin.css +52 -3
  92. package/assets/js/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -1
  93. package/assets/js/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  94. package/assets/js/tinymce/themes/silver/theme.js +73 -88
  95. package/assets/js/tinymce/themes/silver/theme.min.js +1 -1
  96. package/assets/js/tinymce/tinymce.js +671 -449
  97. package/assets/js/tinymce/tinymce.min.js +2 -2
  98. package/package.json +1 -1
@@ -1 +1 @@
1
- !function(){"use strict";const e=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,(o=String).prototype.isPrototypeOf(n)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===o.name)?"string":t;var n,r,o,s})(t)===e,t=e=>t=>typeof t===e,n=e=>t=>e===t,r=e("string"),o=e("object"),s=e("array"),i=n(null),l=t("boolean"),a=n(void 0),c=e=>!(e=>null==e)(e),u=t("function"),d=t("number"),m=()=>{},h=e=>()=>e;function g(e,...t){return(...n)=>{const r=t.concat(n);return e.apply(null,r)}}const p=h(!1),f=h(!0);class v{constructor(e,t){this.tag=e,this.value=t}static some(e){return new v(!0,e)}static none(){return v.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?v.some(e(this.value)):v.none()}bind(e){return this.tag?e(this.value):v.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:v.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return c(e)?v.some(e):v.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}v.singletonNone=new v(!1);const w=Array.prototype.push,y=(e,t)=>{const n=e.length,r=new Array(n);for(let o=0;o<n;o++){const n=e[o];r[o]=t(n,o)}return r},b=(e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)},S=(e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=e[r];t(o,r)&&n.push(o)}return n},x=(e,t)=>((e,t,n)=>{for(let r=0,o=e.length;r<o;r++){const o=e[r];if(t(o,r))return v.some(o);if(n(o,r))break}return v.none()})(e,t,p),E=Object.keys,F=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},O="undefined"!=typeof window?window:Function("return this;")(),k=(e,t)=>((e,t)=>{let n=null!=t?t:O;for(let t=0;t<e.length&&null!=n;++t)n=n[e[t]];return n})(e.split("."),t),T=e=>{const t=F(v.none()),n=()=>t.get().each(e);return{clear:()=>{n(),t.set(v.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{n(),t.set(v.some(e))}}},C=()=>T((e=>e.unbind())),A=(e,t,n=0,r)=>{const o=e.indexOf(t,n);return-1!==o&&(!!a(r)||o+t.length<=r)};var R=tinymce.util.Tools.resolve("tinymce.PluginManager");const L=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},M=L,P=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},D=()=>N(0,0),N=(e,t)=>({major:e,minor:t}),H={nu:N,detect:(e,t)=>{const n=String(t).toLowerCase();return 0===e.length?D():((e,t)=>{const n=((e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.test(t))return r}})(e,t);if(!n)return{major:0,minor:0};const r=e=>Number(t.replace(n,"$"+e));return N(r(1),r(2))})(e,n)},unknown:D},V=(e,t)=>{const n=String(t).toLowerCase();return x(e,(e=>e.search(n)))},W=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,q=e=>t=>A(t,e),B=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>A(e,"edge/")&&A(e,"chrome")&&A(e,"safari")&&A(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,W],search:e=>A(e,"chrome")&&!A(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>A(e,"msie")||A(e,"trident")},{name:"Opera",versionRegexes:[W,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:q("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:q("firefox")},{name:"Safari",versionRegexes:[W,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(A(e,"safari")||A(e,"mobile/"))&&A(e,"applewebkit")}],I=[{name:"Windows",search:q("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>A(e,"iphone")||A(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:q("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:q("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:q("linux"),versionRegexes:[]},{name:"Solaris",search:q("sunos"),versionRegexes:[]},{name:"FreeBSD",search:q("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:q("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],j={browsers:h(B),oses:h(I)},_="Edge",z="Chromium",K="Opera",$="Firefox",U="Safari",X=e=>{const t=e.current,n=e.version,r=e=>()=>t===e;return{current:t,version:n,isEdge:r(_),isChromium:r(z),isIE:r("IE"),isOpera:r(K),isFirefox:r($),isSafari:r(U)}},Y=()=>X({current:void 0,version:H.unknown()}),G=X,J=(h(_),h(z),h("IE"),h(K),h($),h(U),"Windows"),Q="Android",Z="Linux",ee="macOS",te="Solaris",ne="FreeBSD",re="ChromeOS",oe=e=>{const t=e.current,n=e.version,r=e=>()=>t===e;return{current:t,version:n,isWindows:r(J),isiOS:r("iOS"),isAndroid:r(Q),isMacOS:r(ee),isLinux:r(Z),isSolaris:r(te),isFreeBSD:r(ne),isChromeOS:r(re)}},se=()=>oe({current:void 0,version:H.unknown()}),ie=oe,le=(h(J),h("iOS"),h(Q),h(Z),h(ee),h(te),h(ne),h(re),(e,t,n)=>{const r=j.browsers(),o=j.oses(),s=t.bind((e=>((e,t)=>((e,t)=>{for(let n=0;n<e.length;n++){const r=t(e[n]);if(r.isSome())return r}return v.none()})(t.brands,(t=>{const n=t.brand.toLowerCase();return x(e,(e=>{var t;return n===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:H.nu(parseInt(t.version,10),0)})))})))(r,e))).orThunk((()=>((e,t)=>V(e,t).map((e=>{const n=H.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(r,e))).fold(Y,G),i=((e,t)=>V(e,t).map((e=>{const n=H.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(o,e).fold(se,ie),l=((e,t,n,r)=>{const o=e.isiOS()&&!0===/ipad/i.test(n),s=e.isiOS()&&!o,i=e.isiOS()||e.isAndroid(),l=i||r("(pointer:coarse)"),a=o||!s&&i&&r("(min-device-width:768px)"),c=s||i&&!a,u=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),d=!c&&!a&&!u;return{isiPad:h(o),isiPhone:h(s),isTablet:h(a),isPhone:h(c),isTouch:h(l),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:h(u),isDesktop:h(d)}})(i,s,e,n);return{browser:s,os:i,deviceType:l}}),ae=e=>window.matchMedia(e).matches;let ce=(e=>{let t,n=!1;return(...r)=>(n||(n=!0,t=e.apply(null,r)),t)})((()=>le(window.navigator.userAgent,v.from(window.navigator.userAgentData),ae)));const ue=Object.getPrototypeOf,de=e=>{const t=k("ownerDocument.defaultView",e);return o(e)&&((e=>((e,t)=>{const n=((e,t)=>k(e,t))(e,t);if(null==n)throw new Error(e+" not available on this browser");return n})("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(ue(e).constructor.name))},me=e=>t=>(e=>e.dom.nodeType)(t)===e,he=me(1),ge=me(3),pe=me(11),fe=e=>M(e.dom.ownerDocument),ve=e=>y(e.dom.childNodes,M),we=e=>{const t=(e=>M(e.dom.getRootNode()))(e);return pe(n=t)&&c(n.dom.host)?v.some(t):v.none();var n},ye=e=>M(e.dom.host),be=e=>{const t=M((e=>{if(c(e.target)){const t=M(e.target);if(he(t)&&c(t.dom.shadowRoot)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return(e=>0<e.length?v.some(e[0]):v.none())(t)}}return v.from(e.target)})(e).getOr(e.target)),n=()=>e.stopPropagation(),r=()=>e.preventDefault(),o=(s=r,i=n,(...e)=>s(i.apply(null,e)));var s,i;return((e,t,n,r,o,s,i)=>({target:e,x:t,y:n,stop:r,prevent:o,kill:s,raw:i}))(t,e.clientX,e.clientY,n,r,o,e)},Se=(e,t,n,r)=>{e.dom.removeEventListener(t,n,r)},xe=f,Ee=(e,t,n)=>((e,t,n,r)=>((e,t,n,r,o)=>{const s=((e,t)=>n=>{e(n)&&t(be(n))})(n,r);return e.dom.addEventListener(t,s,o),{unbind:g(Se,e,t,s,o)}})(e,t,n,r,!1))(e,t,xe,n),Fe=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},Oe=(e,t)=>{e.dom.removeAttribute(t)},ke=e=>void 0!==e.style&&u(e.style.getPropertyValue),Te=e=>{const t=ge(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return we(M(t)).fold((()=>n.body.contains(t)),(r=Te,o=ye,e=>r(o(e))));var r,o},Ce=(e,t,n)=>{if(!r(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);ke(e)&&e.style.setProperty(t,n)},Ae=(e,t,n)=>{const r=e.dom;Ce(r,t,n)},Re=(e,t)=>{const n=e.dom;((e,t)=>{const n=E(e);for(let r=0,o=n.length;r<o;r++){const o=n[r];t(e[o],o)}})(t,((e,t)=>{Ce(n,t,e)}))},Le=(e,t)=>{const n=e.dom,r=window.getComputedStyle(n).getPropertyValue(t);return""!==r||Te(e)?r:Me(n,t)},Me=(e,t)=>ke(e)?e.style.getPropertyValue(t):"",Pe=(e,t)=>({left:e,top:t,translate:(n,r)=>Pe(e+n,t+r)}),De=Pe,Ne=(e,t,n)=>((e,t,n)=>S(((e,t)=>{const n=u(t)?t:p;let r=e.dom;const o=[];for(;null!==r.parentNode&&void 0!==r.parentNode;){const e=r.parentNode,t=M(e);if(o.push(t),!0===n(t))break;r=e}return o})(e,n),t))(e,(e=>P(e,t)),n),He=(e,t)=>(e=>{return S((e=>v.from(e.dom.parentNode).map(M))(n=e).map(ve).map((e=>S(e,(e=>{return t=e,!(n.dom===t.dom);var t})))).getOr([]),(e=>P(e,t)));var n})(e),Ve=e=>{const t=void 0===e?window:e;return ce().browser.isFirefox()?v.none():v.from(t.visualViewport)},We=(e,t,n,r)=>({x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}),qe=e=>{const t=void 0===e?window:e,n=t.document,r=(e=>{const t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return De(n,r)})(M(n));return Ve(t).fold((()=>{const e=t.document.documentElement,n=e.clientWidth,o=e.clientHeight;return We(r.left,r.top,n,o)}),(e=>We(Math.max(e.pageLeft,r.left),Math.max(e.pageTop,r.top),e.width,e.height)))},Be=(e,t,n)=>Ve(n).map((n=>{const r=e=>t(be(e));return n.addEventListener(e,r),{unbind:()=>n.removeEventListener(e,r)}})).getOrThunk((()=>({unbind:m})));var Ie=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),je=tinymce.util.Tools.resolve("tinymce.Env");const _e=(e,t)=>{e.dispatch("FullscreenStateChanged",{state:t}),e.dispatch("ResizeEditor")},ze=e=>e.options.get("fullscreen_native");const Ke=e=>{return e.dom===(void 0!==(t=fe(e).dom).fullscreenElement?t.fullscreenElement:void 0!==t.msFullscreenElement?t.msFullscreenElement:void 0!==t.webkitFullscreenElement?t.webkitFullscreenElement:null);var t},$e="data-ephox-mobile-fullscreen-style",Ue="position:absolute!important;",Xe="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",Ye=je.os.isAndroid(),Ge=(e,t,n)=>{const o=t=>n=>{const o=Fe(n,"style"),s=void 0===o?"no-styles":o.trim();s!==t&&(((e,t,n)=>{((e,t,n)=>{if(!(r(n)||l(n)||d(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)})(n,$e,s),Re(n,e.parseStyle(t)))},i=Ne(t,"*"),a=(e=>{const t=[];for(let n=0,r=e.length;n<r;++n){if(!s(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);w.apply(t,e[n])}return t})(y(i,(e=>He(e,"*:not(.tox-silver-sink)")))),c=(e=>{const t=Le(e,"background-color");return void 0!==t&&""!==t?"background-color:"+t+"!important":"background-color:rgb(255,255,255)!important;"})(n);b(a,o("display:none!important;")),b(i,o(Ue+Xe+c)),o((!0===Ye?"":Ue)+Xe+c)(t)},Je=Ie.DOM,Qe=Ve().fold((()=>({bind:m,unbind:m})),(e=>{const t=(()=>{const e=T(m);return{...e,on:t=>e.get().each(t)}})(),n=C(),r=C(),o=(e=>{let t=null;return{cancel:()=>{i(t)||(clearTimeout(t),t=null)},throttle:(...n)=>{i(t)&&(t=setTimeout((()=>{t=null,e.apply(null,n)}),50))}}})((()=>{document.body.scrollTop=0,document.documentElement.scrollTop=0,window.requestAnimationFrame((()=>{t.on((t=>Re(t,{top:e.offsetTop+"px",left:e.offsetLeft+"px",height:e.height+"px",width:e.width+"px"})))}))}));return{bind:e=>{t.set(e),o.throttle(),n.set(Be("resize",o.throttle)),r.set(Be("scroll",o.throttle))},unbind:()=>{t.on((()=>{n.clear(),r.clear()})),t.clear()}}})),Ze=(e,t)=>{const n=document.body,r=document.documentElement,o=e.getContainer(),s=M(o),i=(l=s,v.from(l.dom.nextSibling).map(M)).filter((e=>(e=>he(e)&&de(e.dom))(e)&&(e=>(e=>void 0!==e.dom.classList)(e)&&e.dom.classList.contains("tox-silver-sink"))(e)));var l;const a=(e=>{const t=M(e.getElement());return we(t).map(ye).getOrThunk((()=>(e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return M(t)})(fe(t))))})(e),c=t.get(),u=M(e.getBody()),d=je.deviceType.isTouch(),m=o.style,h=e.iframeElement,g=null==h?void 0:h.style,p=e=>{e(n,"tox-fullscreen"),e(r,"tox-fullscreen"),e(o,"tox-fullscreen"),we(s).map((e=>ye(e).dom)).each((t=>{e(t,"tox-fullscreen"),e(t,"tox-shadowhost")}))},f=()=>{d&&(e=>{const t=(e=>{const t=document;return 1!==(n=t).nodeType&&9!==n.nodeType&&11!==n.nodeType||0===n.childElementCount?[]:y(t.querySelectorAll(e),M);var n})("["+$e+"]");b(t,(t=>{const n=Fe(t,$e);n&&"no-styles"!==n?Re(t,e.parseStyle(n)):Oe(t,"style"),Oe(t,$e)}))})(e.dom),p(Je.removeClass),Qe.unbind(),v.from(t.get()).each((e=>e.fullscreenChangeHandler.unbind()))};if(c)c.fullscreenChangeHandler.unbind(),ze(e)&&Ke(a)&&(e=>{const t=e.dom;t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitCancelFullScreen&&t.webkitCancelFullScreen()})(fe(a)),g.width=c.iframeWidth,g.height=c.iframeHeight,m.width=c.containerWidth,m.height=c.containerHeight,m.top=c.containerTop,m.left=c.containerLeft,S=i,x=c.sinkCssPosition,E=(e,t)=>{Ae(e,"position",t)},S.isSome()&&x.isSome()?v.some(E(S.getOrDie(),x.getOrDie())):v.none(),f(),w=c.scrollPos,window.scrollTo(w.x,w.y),t.set(null),_e(e,!1),e.off("remove",f);else{const n=Ee(fe(a),void 0!==document.fullscreenElement?"fullscreenchange":void 0!==document.msFullscreenElement?"MSFullscreenChange":void 0!==document.webkitFullscreenElement?"webkitfullscreenchange":"fullscreenchange",(n=>{ze(e)&&(Ke(a)||null===t.get()||Ze(e,t))})),r={scrollPos:qe(window),containerWidth:m.width,containerHeight:m.height,containerTop:m.top,containerLeft:m.left,iframeWidth:g.width,iframeHeight:g.height,fullscreenChangeHandler:n,sinkCssPosition:i.map((e=>Le(e,"position")))};d&&Ge(e.dom,s,u),g.width=g.height="100%",m.width=m.height="",p(Je.addClass),i.each((e=>{Ae(e,"position","fixed")})),Qe.bind(s),e.on("remove",f),t.set(r),ze(e)&&(e=>{const t=e.dom;t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()})(a),_e(e,!0)}var w,S,x,E};var et=tinymce.util.Tools.resolve("tinymce.util.VK");const tt=(e,t)=>n=>{n.setActive(null!==t.get());const r=e=>n.setActive(e.state);return e.on("FullscreenStateChanged",r),()=>e.off("FullscreenStateChanged",r)};R.add("fullscreen",(e=>{const t=F(null);return e.inline||((e=>{(0,e.options.register)("fullscreen_native",{processor:"boolean",default:!1})})(e),((e,t)=>{e.addCommand("mceFullScreen",(()=>{Ze(e,t)}))})(e,t),((e,t)=>{const n=()=>e.execCommand("mceFullScreen");e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:n,onSetup:tt(e,t),context:"any"}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:n,onSetup:tt(e,t),shortcut:"Meta+Shift+F",context:"any"})})(e,t),((e,t)=>{e.on("init",(()=>{e.on("keydown",(e=>{e.keyCode!==et.TAB||e.metaKey||e.ctrlKey||!t.get()||e.preventDefault()}))}))})(e,t),e.addShortcut("Meta+Shift+F","","mceFullScreen")),(e=>({isFullscreen:()=>null!==e.get()}))(t)}))}();
1
+ !function(){"use strict";const e=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=r=e,(o=String).prototype.isPrototypeOf(n)||r.constructor?.name===o.name)?"string":t;var n,r,o})(t)===e,t=e=>t=>typeof t===e,n=e=>t=>e===t,r=e("string"),o=e("object"),s=e("array"),i=n(null),l=t("boolean"),a=n(void 0),c=e=>!(e=>null==e)(e),u=t("function"),d=t("number"),m=()=>{},h=e=>()=>e;function g(e,...t){return(...n)=>{const r=t.concat(n);return e.apply(null,r)}}const p=h(!1),f=h(!0);class v{tag;value;static singletonNone=new v(!1);constructor(e,t){this.tag=e,this.value=t}static some(e){return new v(!0,e)}static none(){return v.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?v.some(e(this.value)):v.none()}bind(e){return this.tag?e(this.value):v.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:v.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(e??"Called getOrDie on None")}static from(e){return c(e)?v.some(e):v.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}const w=Array.prototype.push,y=(e,t)=>{const n=e.length,r=new Array(n);for(let o=0;o<n;o++){const n=e[o];r[o]=t(n,o)}return r},b=(e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)},S=(e,t)=>{const n=[];for(let r=0,o=e.length;r<o;r++){const o=e[r];t(o,r)&&n.push(o)}return n},x=(e,t)=>((e,t,n)=>{for(let r=0,o=e.length;r<o;r++){const o=e[r];if(t(o,r))return v.some(o);if(n(o,r))break}return v.none()})(e,t,p),E=Object.keys,F=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},O="undefined"!=typeof window?window:Function("return this;")(),k=(e,t)=>((e,t)=>{let n=null!=t?t:O;for(let t=0;t<e.length&&null!=n;++t)n=n[e[t]];return n})(e.split("."),t),T=e=>{const t=F(v.none()),n=()=>t.get().each(e);return{clear:()=>{n(),t.set(v.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{n(),t.set(v.some(e))}}},C=()=>T((e=>e.unbind())),A=(e,t,n=0,r)=>{const o=e.indexOf(t,n);return-1!==o&&(!!a(r)||o+t.length<=r)};var R=tinymce.util.Tools.resolve("tinymce.PluginManager");const L=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},M=L,P=(e,t)=>{const n=e.dom;if(1!==n.nodeType)return!1;{const e=n;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},D=()=>N(0,0),N=(e,t)=>({major:e,minor:t}),H={nu:N,detect:(e,t)=>{const n=String(t).toLowerCase();return 0===e.length?D():((e,t)=>{const n=((e,t)=>{for(let n=0;n<e.length;n++){const r=e[n];if(r.test(t))return r}})(e,t);if(!n)return{major:0,minor:0};const r=e=>Number(t.replace(n,"$"+e));return N(r(1),r(2))})(e,n)},unknown:D},V=(e,t)=>{const n=String(t).toLowerCase();return x(e,(e=>e.search(n)))},W=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,q=e=>t=>A(t,e),B=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>A(e,"edge/")&&A(e,"chrome")&&A(e,"safari")&&A(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,W],search:e=>A(e,"chrome")&&!A(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>A(e,"msie")||A(e,"trident")},{name:"Opera",versionRegexes:[W,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:q("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:q("firefox")},{name:"Safari",versionRegexes:[W,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(A(e,"safari")||A(e,"mobile/"))&&A(e,"applewebkit")}],I=[{name:"Windows",search:q("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>A(e,"iphone")||A(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:q("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:q("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:q("linux"),versionRegexes:[]},{name:"Solaris",search:q("sunos"),versionRegexes:[]},{name:"FreeBSD",search:q("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:q("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],j={browsers:h(B),oses:h(I)},_="Edge",z="Chromium",K="Opera",$="Firefox",U="Safari",X=e=>{const t=e.current,n=e.version,r=e=>()=>t===e;return{current:t,version:n,isEdge:r(_),isChromium:r(z),isIE:r("IE"),isOpera:r(K),isFirefox:r($),isSafari:r(U)}},Y=()=>X({current:void 0,version:H.unknown()}),G=X,J=(h(_),h(z),h("IE"),h(K),h($),h(U),"Windows"),Q="Android",Z="Linux",ee="macOS",te="Solaris",ne="FreeBSD",re="ChromeOS",oe=e=>{const t=e.current,n=e.version,r=e=>()=>t===e;return{current:t,version:n,isWindows:r(J),isiOS:r("iOS"),isAndroid:r(Q),isMacOS:r(ee),isLinux:r(Z),isSolaris:r(te),isFreeBSD:r(ne),isChromeOS:r(re)}},se=()=>oe({current:void 0,version:H.unknown()}),ie=oe,le=(h(J),h("iOS"),h(Q),h(Z),h(ee),h(te),h(ne),h(re),(e,t,n)=>{const r=j.browsers(),o=j.oses(),s=t.bind((e=>((e,t)=>((e,t)=>{for(let n=0;n<e.length;n++){const r=t(e[n]);if(r.isSome())return r}return v.none()})(t.brands,(t=>{const n=t.brand.toLowerCase();return x(e,(e=>n===e.brand?.toLowerCase())).map((e=>({current:e.name,version:H.nu(parseInt(t.version,10),0)})))})))(r,e))).orThunk((()=>((e,t)=>V(e,t).map((e=>{const n=H.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(r,e))).fold(Y,G),i=((e,t)=>V(e,t).map((e=>{const n=H.detect(e.versionRegexes,t);return{current:e.name,version:n}})))(o,e).fold(se,ie),l=((e,t,n,r)=>{const o=e.isiOS()&&!0===/ipad/i.test(n),s=e.isiOS()&&!o,i=e.isiOS()||e.isAndroid(),l=i||r("(pointer:coarse)"),a=o||!s&&i&&r("(min-device-width:768px)"),c=s||i&&!a,u=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(n),d=!c&&!a&&!u;return{isiPad:h(o),isiPhone:h(s),isTablet:h(a),isPhone:h(c),isTouch:h(l),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:h(u),isDesktop:h(d)}})(i,s,e,n);return{browser:s,os:i,deviceType:l}}),ae=e=>window.matchMedia(e).matches;let ce=(e=>{let t,n=!1;return(...r)=>(n||(n=!0,t=e.apply(null,r)),t)})((()=>le(window.navigator.userAgent,v.from(window.navigator.userAgentData),ae)));const ue=Object.getPrototypeOf,de=e=>{const t=k("ownerDocument.defaultView",e);return o(e)&&((e=>((e,t)=>{const n=((e,t)=>k(e,t))(e,t);if(null==n)throw new Error(e+" not available on this browser");return n})("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(ue(e).constructor.name))},me=e=>t=>(e=>e.dom.nodeType)(t)===e,he=me(1),ge=me(3),pe=me(11),fe=e=>M(e.dom.ownerDocument),ve=e=>y(e.dom.childNodes,M),we=e=>{const t=(e=>M(e.dom.getRootNode()))(e);return pe(n=t)&&c(n.dom.host)?v.some(t):v.none();var n},ye=e=>M(e.dom.host),be=e=>{const t=M((e=>{if(c(e.target)){const t=M(e.target);if(he(t)&&c(t.dom.shadowRoot)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return(e=>0<e.length?v.some(e[0]):v.none())(t)}}return v.from(e.target)})(e).getOr(e.target)),n=()=>e.stopPropagation(),r=()=>e.preventDefault(),o=(s=r,i=n,(...e)=>s(i.apply(null,e)));var s,i;return((e,t,n,r,o,s,i)=>({target:e,x:t,y:n,stop:r,prevent:o,kill:s,raw:i}))(t,e.clientX,e.clientY,n,r,o,e)},Se=(e,t,n,r)=>{e.dom.removeEventListener(t,n,r)},xe=f,Ee=(e,t,n)=>((e,t,n,r)=>((e,t,n,r,o)=>{const s=((e,t)=>n=>{e(n)&&t(be(n))})(n,r);return e.dom.addEventListener(t,s,o),{unbind:g(Se,e,t,s,o)}})(e,t,n,r,!1))(e,t,xe,n),Fe=(e,t)=>{const n=e.dom.getAttribute(t);return null===n?void 0:n},Oe=(e,t)=>{e.dom.removeAttribute(t)},ke=e=>void 0!==e.style&&u(e.style.getPropertyValue),Te=e=>{const t=ge(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const n=t.ownerDocument;return we(M(t)).fold((()=>n.body.contains(t)),(r=Te,o=ye,e=>r(o(e))));var r,o},Ce=(e,t,n)=>{if(!r(n))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",n,":: Element ",e),new Error("CSS value must be a string: "+n);ke(e)&&e.style.setProperty(t,n)},Ae=(e,t,n)=>{const r=e.dom;Ce(r,t,n)},Re=(e,t)=>{const n=e.dom;((e,t)=>{const n=E(e);for(let r=0,o=n.length;r<o;r++){const o=n[r];t(e[o],o)}})(t,((e,t)=>{Ce(n,t,e)}))},Le=(e,t)=>{const n=e.dom,r=window.getComputedStyle(n).getPropertyValue(t);return""!==r||Te(e)?r:Me(n,t)},Me=(e,t)=>ke(e)?e.style.getPropertyValue(t):"",Pe=(e,t)=>({left:e,top:t,translate:(n,r)=>Pe(e+n,t+r)}),De=Pe,Ne=(e,t,n)=>((e,t,n)=>S(((e,t)=>{const n=u(t)?t:p;let r=e.dom;const o=[];for(;null!==r.parentNode&&void 0!==r.parentNode;){const e=r.parentNode,t=M(e);if(o.push(t),!0===n(t))break;r=e}return o})(e,n),t))(e,(e=>P(e,t)),n),He=(e,t)=>(e=>{return S((e=>v.from(e.dom.parentNode).map(M))(n=e).map(ve).map((e=>S(e,(e=>{return t=e,!(n.dom===t.dom);var t})))).getOr([]),(e=>P(e,t)));var n})(e),Ve=e=>{const t=void 0===e?window:e;return ce().browser.isFirefox()?v.none():v.from(t.visualViewport)},We=(e,t,n,r)=>({x:e,y:t,width:n,height:r,right:e+n,bottom:t+r}),qe=e=>{const t=void 0===e?window:e,n=t.document,r=(e=>{const t=void 0!==e?e.dom:document,n=t.body.scrollLeft||t.documentElement.scrollLeft,r=t.body.scrollTop||t.documentElement.scrollTop;return De(n,r)})(M(n));return Ve(t).fold((()=>{const e=t.document.documentElement,n=e.clientWidth,o=e.clientHeight;return We(r.left,r.top,n,o)}),(e=>We(Math.max(e.pageLeft,r.left),Math.max(e.pageTop,r.top),e.width,e.height)))},Be=(e,t,n)=>Ve(n).map((n=>{const r=e=>t(be(e));return n.addEventListener(e,r),{unbind:()=>n.removeEventListener(e,r)}})).getOrThunk((()=>({unbind:m})));var Ie=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),je=tinymce.util.Tools.resolve("tinymce.Env");const _e=(e,t)=>{e.dispatch("FullscreenStateChanged",{state:t}),e.dispatch("ResizeEditor")},ze=e=>e.options.get("fullscreen_native");const Ke=e=>{return e.dom===(void 0!==(t=fe(e).dom).fullscreenElement?t.fullscreenElement:void 0!==t.msFullscreenElement?t.msFullscreenElement:void 0!==t.webkitFullscreenElement?t.webkitFullscreenElement:null);var t},$e="data-ephox-mobile-fullscreen-style",Ue="position:absolute!important;",Xe="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",Ye=je.os.isAndroid(),Ge=(e,t,n)=>{const o=t=>n=>{const o=Fe(n,"style"),s=void 0===o?"no-styles":o.trim();s!==t&&(((e,t,n)=>{((e,t,n)=>{if(!(r(n)||l(n)||d(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)})(n,$e,s),Re(n,e.parseStyle(t)))},i=Ne(t,"*"),a=(e=>{const t=[];for(let n=0,r=e.length;n<r;++n){if(!s(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);w.apply(t,e[n])}return t})(y(i,(e=>He(e,"*:not(.tox-silver-sink)")))),c=(e=>{const t=Le(e,"background-color");return void 0!==t&&""!==t?"background-color:"+t+"!important":"background-color:rgb(255,255,255)!important;"})(n);b(a,o("display:none!important;")),b(i,o(Ue+Xe+c)),o((!0===Ye?"":Ue)+Xe+c)(t)},Je=Ie.DOM,Qe=Ve().fold((()=>({bind:m,unbind:m})),(e=>{const t=(()=>{const e=T(m);return{...e,on:t=>e.get().each(t)}})(),n=C(),r=C(),o=(e=>{let t=null;return{cancel:()=>{i(t)||(clearTimeout(t),t=null)},throttle:(...n)=>{i(t)&&(t=setTimeout((()=>{t=null,e.apply(null,n)}),50))}}})((()=>{document.body.scrollTop=0,document.documentElement.scrollTop=0,window.requestAnimationFrame((()=>{t.on((t=>Re(t,{top:e.offsetTop+"px",left:e.offsetLeft+"px",height:e.height+"px",width:e.width+"px"})))}))}));return{bind:e=>{t.set(e),o.throttle(),n.set(Be("resize",o.throttle)),r.set(Be("scroll",o.throttle))},unbind:()=>{t.on((()=>{n.clear(),r.clear()})),t.clear()}}})),Ze=(e,t)=>{const n=document.body,r=document.documentElement,o=e.getContainer(),s=M(o),i=(l=s,v.from(l.dom.nextSibling).map(M)).filter((e=>(e=>he(e)&&de(e.dom))(e)&&(e=>(e=>void 0!==e.dom.classList)(e)&&e.dom.classList.contains("tox-silver-sink"))(e)));var l;const a=(e=>{const t=M(e.getElement());return we(t).map(ye).getOrThunk((()=>(e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return M(t)})(fe(t))))})(e),c=t.get(),u=M(e.getBody()),d=je.deviceType.isTouch(),m=o.style,h=e.iframeElement,g=h?.style,p=e=>{e(n,"tox-fullscreen"),e(r,"tox-fullscreen"),e(o,"tox-fullscreen"),we(s).map((e=>ye(e).dom)).each((t=>{e(t,"tox-fullscreen"),e(t,"tox-shadowhost")}))},f=()=>{d&&(e=>{const t=(e=>{const t=document;return 1!==(n=t).nodeType&&9!==n.nodeType&&11!==n.nodeType||0===n.childElementCount?[]:y(t.querySelectorAll(e),M);var n})("["+$e+"]");b(t,(t=>{const n=Fe(t,$e);n&&"no-styles"!==n?Re(t,e.parseStyle(n)):Oe(t,"style"),Oe(t,$e)}))})(e.dom),p(Je.removeClass),Qe.unbind(),v.from(t.get()).each((e=>e.fullscreenChangeHandler.unbind()))};if(c)c.fullscreenChangeHandler.unbind(),ze(e)&&Ke(a)&&(e=>{const t=e.dom;t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitCancelFullScreen&&t.webkitCancelFullScreen()})(fe(a)),g.width=c.iframeWidth,g.height=c.iframeHeight,m.width=c.containerWidth,m.height=c.containerHeight,m.top=c.containerTop,m.left=c.containerLeft,S=i,x=c.sinkCssPosition,E=(e,t)=>{Ae(e,"position",t)},S.isSome()&&x.isSome()?v.some(E(S.getOrDie(),x.getOrDie())):v.none(),f(),w=c.scrollPos,window.scrollTo(w.x,w.y),t.set(null),_e(e,!1),e.off("remove",f);else{const n=Ee(fe(a),void 0!==document.fullscreenElement?"fullscreenchange":void 0!==document.msFullscreenElement?"MSFullscreenChange":void 0!==document.webkitFullscreenElement?"webkitfullscreenchange":"fullscreenchange",(n=>{ze(e)&&(Ke(a)||null===t.get()||Ze(e,t))})),r={scrollPos:qe(window),containerWidth:m.width,containerHeight:m.height,containerTop:m.top,containerLeft:m.left,iframeWidth:g.width,iframeHeight:g.height,fullscreenChangeHandler:n,sinkCssPosition:i.map((e=>Le(e,"position")))};d&&Ge(e.dom,s,u),g.width=g.height="100%",m.width=m.height="",p(Je.addClass),i.each((e=>{Ae(e,"position","fixed")})),Qe.bind(s),e.on("remove",f),t.set(r),ze(e)&&(e=>{const t=e.dom;t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()})(a),_e(e,!0)}var w,S,x,E};var et=tinymce.util.Tools.resolve("tinymce.util.VK");const tt=(e,t)=>n=>{n.setActive(null!==t.get());const r=e=>n.setActive(e.state);return e.on("FullscreenStateChanged",r),()=>e.off("FullscreenStateChanged",r)};R.add("fullscreen",(e=>{const t=F(null);return e.inline||((e=>{(0,e.options.register)("fullscreen_native",{processor:"boolean",default:!1})})(e),((e,t)=>{e.addCommand("mceFullScreen",(()=>{Ze(e,t)}))})(e,t),((e,t)=>{const n=()=>e.execCommand("mceFullScreen");e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:n,onSetup:tt(e,t),context:"any"}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:n,onSetup:tt(e,t),shortcut:"Meta+Shift+F",context:"any"})})(e,t),((e,t)=>{e.on("init",(()=>{e.on("keydown",(e=>{e.keyCode!==et.TAB||e.metaKey||e.ctrlKey||!t.get()||e.preventDefault()}))}))})(e,t),e.addShortcut("Meta+Shift+F","","mceFullScreen")),(e=>({isFullscreen:()=>null!==e.get()}))(t)}))}();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TinyMCE version 8.1.2 (TBD)
2
+ * TinyMCE version 8.2.0 (2025-10-23)
3
3
  */
4
4
 
5
5
  (function () {
@@ -7,13 +7,12 @@
7
7
 
8
8
  /* eslint-disable @typescript-eslint/no-wrapper-object-types */
9
9
  const hasProto = (v, constructor, predicate) => {
10
- var _a;
11
10
  if (predicate(v, constructor.prototype)) {
12
11
  return true;
13
12
  }
14
13
  else {
15
14
  // String-based fallback time
16
- return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
15
+ return v.constructor?.name === constructor.name;
17
16
  }
18
17
  };
19
18
  const typeOf = (x) => {
@@ -63,6 +62,11 @@
63
62
  * strict-null-checks
64
63
  */
65
64
  class Optional {
65
+ tag;
66
+ value;
67
+ // Sneaky optimisation: every instance of Optional.none is identical, so just
68
+ // reuse the same object
69
+ static singletonNone = new Optional(false);
66
70
  // The internal representation has a `tag` and a `value`, but both are
67
71
  // private: able to be console.logged, but not able to be accessed by code
68
72
  constructor(tag, value) {
@@ -230,7 +234,7 @@
230
234
  */
231
235
  getOrDie(message) {
232
236
  if (!this.tag) {
233
- throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
237
+ throw new Error(message ?? 'Called getOrDie on None');
234
238
  }
235
239
  else {
236
240
  return this.value;
@@ -294,9 +298,6 @@
294
298
  return this.tag ? `some(${this.value})` : 'none()';
295
299
  }
296
300
  }
297
- // Sneaky optimisation: every instance of Optional.none is identical, so just
298
- // reuse the same object
299
- Optional.singletonNone = new Optional(false);
300
301
 
301
302
  const nativeSlice = Array.prototype.slice;
302
303
  const nativeIndexOf = Array.prototype.indexOf;
@@ -413,8 +414,7 @@
413
414
 
414
415
  const get = (customTabs) => {
415
416
  const addTab = (spec) => {
416
- var _a;
417
- const name = (_a = spec.name) !== null && _a !== void 0 ? _a : generate('tab-name');
417
+ const name = spec.name ?? generate('tab-name');
418
418
  const currentCustomTabs = customTabs.get();
419
419
  currentCustomTabs[name] = spec;
420
420
  customTabs.set(currentCustomTabs);
@@ -734,7 +734,6 @@
734
734
  const parseHelpTabsSetting = (tabsFromSettings, tabs) => {
735
735
  const newTabs = {};
736
736
  const names = map(tabsFromSettings, (t) => {
737
- var _a;
738
737
  if (isString(t)) {
739
738
  // Code below shouldn't care if a tab name doesn't have a spec.
740
739
  // If we find it does, we'll need to make this smarter.
@@ -745,7 +744,7 @@
745
744
  return t;
746
745
  }
747
746
  else {
748
- const name = (_a = t.name) !== null && _a !== void 0 ? _a : generate('tab-name');
747
+ const name = t.name ?? generate('tab-name');
749
748
  newTabs[name] = t;
750
749
  return name;
751
750
  }
@@ -1 +1 @@
1
- !function(){"use strict";const e=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=a=e,(r=String).prototype.isPrototypeOf(n)||(null===(o=a.constructor)||void 0===o?void 0:o.name)===r.name)?"string":t;var n,a,r,o})(e);const t=e=>undefined===e;const n=e=>"function"==typeof e,a=()=>false;class r{constructor(e,t){this.tag=e,this.value=t}static some(e){return new r(!0,e)}static none(){return r.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?r.some(e(this.value)):r.none()}bind(e){return this.tag?e(this.value):r.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:r.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?r.none():r.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}r.singletonNone=new r(!1);const o=Array.prototype.slice,i=Array.prototype.indexOf,s=(e,t)=>{const n=e.length,a=new Array(n);for(let r=0;r<n;r++){const n=e[r];a[r]=t(n,r)}return a},m=(e,t)=>{const n=[];for(let a=0,r=e.length;a<r;a++){const r=e[a];t(r,a)&&n.push(r)}return n},c=(e,t)=>{const n=o.call(e,0);return n.sort(t),n};n(Array.from)&&Array.from;const l=Object.keys,u=Object.hasOwnProperty,p=(e,t)=>u.call(e,t);let y=0;const h=e=>{const t=(new Date).getTime(),n=Math.floor(window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295*1e9);return y++,e+"_"+n+y+String(t)};var d=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=e=>t=>t.options.get(e),k=g("help_tabs"),v=g("forced_plugins");var b=tinymce.util.Tools.resolve("tinymce.Resource"),f=tinymce.util.Tools.resolve("tinymce.util.I18n");const A=(e,t)=>b.load(`tinymce.html-i18n.help-keynav.${t}`,`${e}/js/i18n/keynav/${t}.js`),w=e=>A(e,f.getCode()).catch((()=>A(e,"en")));var C=tinymce.util.Tools.resolve("tinymce.Env");const S=e=>{const t=C.os.isMacOS()||C.os.isiOS(),n=t?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl ",access:"Shift + Alt "},a=e.split("+"),r=s(a,(e=>{const t=e.toLowerCase().trim();return p(n,t)?n[t]:e}));return t?r.join("").replace(/\s/,""):r.join("+")},M=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Heading 1"},{shortcuts:["Access + 2"],action:"Heading 2"},{shortcuts:["Access + 3"],action:"Heading 3"},{shortcuts:["Access + 4"],action:"Heading 4"},{shortcuts:["Access + 5"],action:"Heading 5"},{shortcuts:["Access + 6"],action:"Heading 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Alt + F12"],action:"Focus to notification"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],_=()=>({name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:s(M,(e=>{const t=s(e.shortcuts,S).join(" or ");return[e.action,t]}))}]}),x=s([{key:"accordion",name:"Accordion"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"image",name:"Image"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"advlist",name:"List Styles"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"pagebreak",name:"Page Break"},{key:"preview",name:"Preview"},{key:"quickbars",name:"Quick Toolbars"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"table",name:"Table"},{key:"textcolor",name:"Text Color"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"a11ychecker",name:"Accessibility Checker",type:"premium"},{key:"typography",name:"Advanced Typography",type:"premium",slug:"advanced-typography"},{key:"ai",name:"AI Assistant",type:"premium"},{key:"casechange",name:"Case Change",type:"premium"},{key:"checklist",name:"Checklist",type:"premium"},{key:"advcode",name:"Enhanced Code Editor",type:"premium"},{key:"mediaembed",name:"Enhanced Media Embed",type:"premium",slug:"introduction-to-mediaembed"},{key:"advtable",name:"Enhanced Tables",type:"premium"},{key:"exportpdf",name:"Export to PDF",type:"premium"},{key:"exportword",name:"Export to Word",type:"premium"},{key:"footnotes",name:"Footnotes",type:"premium"},{key:"formatpainter",name:"Format Painter",type:"premium"},{key:"editimage",name:"Image Editing",type:"premium"},{key:"uploadcare",name:"Image Optimizer Powered by Uploadcare",type:"premium"},{key:"importword",name:"Import from Word",type:"premium"},{key:"inlinecss",name:"Inline CSS",type:"premium",slug:"inline-css"},{key:"linkchecker",name:"Link Checker",type:"premium"},{key:"math",name:"Math",type:"premium"},{key:"markdown",name:"Markdown",type:"premium"},{key:"mentions",name:"Mentions",type:"premium"},{key:"mergetags",name:"Merge Tags",type:"premium"},{key:"pageembed",name:"Page Embed",type:"premium"},{key:"permanentpen",name:"Permanent Pen",type:"premium"},{key:"powerpaste",name:"PowerPaste",type:"premium",slug:"introduction-to-powerpaste"},{key:"revisionhistory",name:"Revision History",type:"premium"},{key:"tinymcespellchecker",name:"Spell Checker",type:"premium",slug:"introduction-to-tiny-spellchecker"},{key:"suggestededits",name:"Suggested Edits",type:"premium"},{key:"autocorrect",name:"Spelling Autocorrect",type:"premium"},{key:"tableofcontents",name:"Table of Contents",type:"premium"},{key:"advtemplate",name:"Templates",type:"premium",slug:"advanced-templates"},{key:"tinycomments",name:"Tiny Comments",type:"premium",slug:"introduction-to-tiny-comments"},{key:"tinydrive",name:"Tiny Drive",type:"premium",slug:"tinydrive-introduction"}],(e=>({...e,type:e.type||"opensource",slug:e.slug||e.key}))),T=e=>{const o=e=>`<a data-alloy-tabstop="true" tabindex="-1" href="${e.url}" target="_blank" rel="noopener">${e.name}</a>`,u=(e,t)=>{return(i=x,s=e=>e.key===t,((e,t,n)=>{for(let a=0,o=e.length;a<o;a++){const o=e[a];if(t(o,a))return r.some(o);if(n(o,a))break}return r.none()})(i,s,a)).fold((()=>((e,t)=>{const a=e.plugins[t].getMetadata;if(n(a)){const e=a();return{name:e.name,html:o(e)}}return{name:t,html:t}})(e,t)),(e=>{const t="premium"===e.type?`${e.name}*`:e.name;return{name:t,html:o({name:t,url:`https://www.tiny.cloud/docs/tinymce/${tinymce.majorVersion}/${e.slug}/`})}}));var i,s},p=e=>{const n=(e=>{const n=l(e.plugins),a=v(e),r=t(a)?["onboarding"]:a.concat(["onboarding"]);return m(n,(e=>!(((e,t)=>i.call(e,t))(r,e)>-1)))})(e),a=c(s(n,(t=>u(e,t))),((e,t)=>e.name.localeCompare(t.name))),r=s(a,(e=>"<li>"+e.html+"</li>")),o=r.length,p=r.join("");return"<p><b>"+f.translate(["Plugins installed ({0}):",o])+"</b></p><ul>"+p+"</ul>"},y={type:"htmlpanel",presets:"document",html:[(e=>null==e?"":"<div>"+p(e)+"</div>")(e),(()=>{const e=m(x,(({type:e})=>"premium"===e)),t=c(s(e,(e=>e.name)),((e,t)=>e.localeCompare(t))),n=s(t,(e=>`<li>${e}</li>`)).join("");return"<div><p><b>"+f.translate("Premium plugins:")+"</b></p><ul>"+n+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=help_dialog_plugin_tab&utm_source=tiny&utm_medium=referral&utm_term=read_more&utm_content=premium_plugin_heading" rel="noopener" target="_blank" data-alloy-tabstop="true" tabindex="-1">'+f.translate("Learn more...")+"</a></li></ul></div>"})()].join("")};return{name:"plugins",title:"Plugins",items:[y]}};var O=tinymce.util.Tools.resolve("tinymce.EditorManager");const P=(t,n,a)=>()=>{(async(t,n,a)=>{const o=_(),i=await(async e=>({name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:await w(e)}]}))(a),m=T(t),c=(()=>{var e,t;const n='<a data-alloy-tabstop="true" tabindex="-1" href="https://www.tiny.cloud/docs/tinymce/8/changelog/?utm_campaign=help_dialog_version_tab&utm_source=tiny&utm_medium=referral" rel="noopener" target="_blank">TinyMCE '+(e=O.majorVersion,t=O.minorVersion,(0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>");return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+f.translate(["You are using {0}",n])+"</p>",presets:"document"}]}})(),u={[o.name]:o,[i.name]:i,[m.name]:m,[c.name]:c,...n.get()};return r.from(k(t)).fold((()=>(e=>{const t=l(e),n=t.indexOf("versions");return-1!==n&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t}})(u)),(t=>((t,n)=>{const a={},r=s(t,(t=>{var r;if(e(t))return p(n,t)&&(a[t]=n[t]),t;{const e=null!==(r=t.name)&&void 0!==r?r:h("tab-name");return a[e]=t,e}}));return{tabs:a,names:r}})(t,u)))})(t,n,a).then((({tabs:e,names:n})=>{const a={type:"tabpanel",tabs:(e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t})(s(n,(t=>{return p(n=e,a=t)?r.from(n[a]):r.none();var n,a})))};t.windowManager.open({title:"Help",size:"medium",body:a,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}))};d.add("help",((e,t)=>{const n=(()=>{let e={};return{get:()=>e,set:t=>{e=t}}})(),a=(e=>({addTab:t=>{var n;const a=null!==(n=t.name)&&void 0!==n?n:h("tab-name"),r=e.get();r[a]=t,e.set(r)}}))(n);(e=>{(0,e.options.register)("help_tabs",{processor:"array"})})(e);const r=P(e,n,t);return((e,t)=>{e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t,context:"any"}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t,context:"any"})})(e,r),((e,t)=>{e.addCommand("mceHelp",t)})(e,r),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),((e,t)=>{e.on("init",(()=>{w(t)}))})(e,t),a}))}();
1
+ !function(){"use strict";const e=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=a=e,(r=String).prototype.isPrototypeOf(n)||a.constructor?.name===r.name)?"string":t;var n,a,r})(e);const t=e=>undefined===e;const n=e=>"function"==typeof e,a=()=>false;class r{tag;value;static singletonNone=new r(!1);constructor(e,t){this.tag=e,this.value=t}static some(e){return new r(!0,e)}static none(){return r.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?r.some(e(this.value)):r.none()}bind(e){return this.tag?e(this.value):r.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:r.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(e??"Called getOrDie on None")}static from(e){return null==e?r.none():r.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}const o=Array.prototype.slice,i=Array.prototype.indexOf,s=(e,t)=>{const n=e.length,a=new Array(n);for(let r=0;r<n;r++){const n=e[r];a[r]=t(n,r)}return a},m=(e,t)=>{const n=[];for(let a=0,r=e.length;a<r;a++){const r=e[a];t(r,a)&&n.push(r)}return n},c=(e,t)=>{const n=o.call(e,0);return n.sort(t),n};n(Array.from)&&Array.from;const l=Object.keys,u=Object.hasOwnProperty,p=(e,t)=>u.call(e,t);let y=0;const h=e=>{const t=(new Date).getTime(),n=Math.floor(window.crypto.getRandomValues(new Uint32Array(1))[0]/4294967295*1e9);return y++,e+"_"+n+y+String(t)};var d=tinymce.util.Tools.resolve("tinymce.PluginManager");const g=e=>t=>t.options.get(e),k=g("help_tabs"),v=g("forced_plugins");var b=tinymce.util.Tools.resolve("tinymce.Resource"),f=tinymce.util.Tools.resolve("tinymce.util.I18n");const A=(e,t)=>b.load(`tinymce.html-i18n.help-keynav.${t}`,`${e}/js/i18n/keynav/${t}.js`),w=e=>A(e,f.getCode()).catch((()=>A(e,"en")));var C=tinymce.util.Tools.resolve("tinymce.Env");const S=e=>{const t=C.os.isMacOS()||C.os.isiOS(),n=t?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl ",access:"Shift + Alt "},a=e.split("+"),r=s(a,(e=>{const t=e.toLowerCase().trim();return p(n,t)?n[t]:e}));return t?r.join("").replace(/\s/,""):r.join("+")},M=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Heading 1"},{shortcuts:["Access + 2"],action:"Heading 2"},{shortcuts:["Access + 3"],action:"Heading 3"},{shortcuts:["Access + 4"],action:"Heading 4"},{shortcuts:["Access + 5"],action:"Heading 5"},{shortcuts:["Access + 6"],action:"Heading 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Alt + F12"],action:"Focus to notification"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],_=()=>({name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:s(M,(e=>{const t=s(e.shortcuts,S).join(" or ");return[e.action,t]}))}]}),x=s([{key:"accordion",name:"Accordion"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"image",name:"Image"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"advlist",name:"List Styles"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"pagebreak",name:"Page Break"},{key:"preview",name:"Preview"},{key:"quickbars",name:"Quick Toolbars"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"table",name:"Table"},{key:"textcolor",name:"Text Color"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"a11ychecker",name:"Accessibility Checker",type:"premium"},{key:"typography",name:"Advanced Typography",type:"premium",slug:"advanced-typography"},{key:"ai",name:"AI Assistant",type:"premium"},{key:"casechange",name:"Case Change",type:"premium"},{key:"checklist",name:"Checklist",type:"premium"},{key:"advcode",name:"Enhanced Code Editor",type:"premium"},{key:"mediaembed",name:"Enhanced Media Embed",type:"premium",slug:"introduction-to-mediaembed"},{key:"advtable",name:"Enhanced Tables",type:"premium"},{key:"exportpdf",name:"Export to PDF",type:"premium"},{key:"exportword",name:"Export to Word",type:"premium"},{key:"footnotes",name:"Footnotes",type:"premium"},{key:"formatpainter",name:"Format Painter",type:"premium"},{key:"editimage",name:"Image Editing",type:"premium"},{key:"uploadcare",name:"Image Optimizer Powered by Uploadcare",type:"premium"},{key:"importword",name:"Import from Word",type:"premium"},{key:"inlinecss",name:"Inline CSS",type:"premium",slug:"inline-css"},{key:"linkchecker",name:"Link Checker",type:"premium"},{key:"math",name:"Math",type:"premium"},{key:"markdown",name:"Markdown",type:"premium"},{key:"mentions",name:"Mentions",type:"premium"},{key:"mergetags",name:"Merge Tags",type:"premium"},{key:"pageembed",name:"Page Embed",type:"premium"},{key:"permanentpen",name:"Permanent Pen",type:"premium"},{key:"powerpaste",name:"PowerPaste",type:"premium",slug:"introduction-to-powerpaste"},{key:"revisionhistory",name:"Revision History",type:"premium"},{key:"tinymcespellchecker",name:"Spell Checker",type:"premium",slug:"introduction-to-tiny-spellchecker"},{key:"suggestededits",name:"Suggested Edits",type:"premium"},{key:"autocorrect",name:"Spelling Autocorrect",type:"premium"},{key:"tableofcontents",name:"Table of Contents",type:"premium"},{key:"advtemplate",name:"Templates",type:"premium",slug:"advanced-templates"},{key:"tinycomments",name:"Tiny Comments",type:"premium",slug:"introduction-to-tiny-comments"},{key:"tinydrive",name:"Tiny Drive",type:"premium",slug:"tinydrive-introduction"}],(e=>({...e,type:e.type||"opensource",slug:e.slug||e.key}))),T=e=>{const o=e=>`<a data-alloy-tabstop="true" tabindex="-1" href="${e.url}" target="_blank" rel="noopener">${e.name}</a>`,u=(e,t)=>{return(i=x,s=e=>e.key===t,((e,t,n)=>{for(let a=0,o=e.length;a<o;a++){const o=e[a];if(t(o,a))return r.some(o);if(n(o,a))break}return r.none()})(i,s,a)).fold((()=>((e,t)=>{const a=e.plugins[t].getMetadata;if(n(a)){const e=a();return{name:e.name,html:o(e)}}return{name:t,html:t}})(e,t)),(e=>{const t="premium"===e.type?`${e.name}*`:e.name;return{name:t,html:o({name:t,url:`https://www.tiny.cloud/docs/tinymce/${tinymce.majorVersion}/${e.slug}/`})}}));var i,s},p=e=>{const n=(e=>{const n=l(e.plugins),a=v(e),r=t(a)?["onboarding"]:a.concat(["onboarding"]);return m(n,(e=>!(((e,t)=>i.call(e,t))(r,e)>-1)))})(e),a=c(s(n,(t=>u(e,t))),((e,t)=>e.name.localeCompare(t.name))),r=s(a,(e=>"<li>"+e.html+"</li>")),o=r.length,p=r.join("");return"<p><b>"+f.translate(["Plugins installed ({0}):",o])+"</b></p><ul>"+p+"</ul>"},y={type:"htmlpanel",presets:"document",html:[(e=>null==e?"":"<div>"+p(e)+"</div>")(e),(()=>{const e=m(x,(({type:e})=>"premium"===e)),t=c(s(e,(e=>e.name)),((e,t)=>e.localeCompare(t))),n=s(t,(e=>`<li>${e}</li>`)).join("");return"<div><p><b>"+f.translate("Premium plugins:")+"</b></p><ul>"+n+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=help_dialog_plugin_tab&utm_source=tiny&utm_medium=referral&utm_term=read_more&utm_content=premium_plugin_heading" rel="noopener" target="_blank" data-alloy-tabstop="true" tabindex="-1">'+f.translate("Learn more...")+"</a></li></ul></div>"})()].join("")};return{name:"plugins",title:"Plugins",items:[y]}};var O=tinymce.util.Tools.resolve("tinymce.EditorManager");const P=(t,n,a)=>()=>{(async(t,n,a)=>{const o=_(),i=await(async e=>({name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:await w(e)}]}))(a),m=T(t),c=(()=>{var e,t;const n='<a data-alloy-tabstop="true" tabindex="-1" href="https://www.tiny.cloud/docs/tinymce/8/changelog/?utm_campaign=help_dialog_version_tab&utm_source=tiny&utm_medium=referral" rel="noopener" target="_blank">TinyMCE '+(e=O.majorVersion,t=O.minorVersion,(0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>");return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+f.translate(["You are using {0}",n])+"</p>",presets:"document"}]}})(),u={[o.name]:o,[i.name]:i,[m.name]:m,[c.name]:c,...n.get()};return r.from(k(t)).fold((()=>(e=>{const t=l(e),n=t.indexOf("versions");return-1!==n&&(t.splice(n,1),t.push("versions")),{tabs:e,names:t}})(u)),(t=>((t,n)=>{const a={},r=s(t,(t=>{if(e(t))return p(n,t)&&(a[t]=n[t]),t;{const e=t.name??h("tab-name");return a[e]=t,e}}));return{tabs:a,names:r}})(t,u)))})(t,n,a).then((({tabs:e,names:n})=>{const a={type:"tabpanel",tabs:(e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t})(s(n,(t=>{return p(n=e,a=t)?r.from(n[a]):r.none();var n,a})))};t.windowManager.open({title:"Help",size:"medium",body:a,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})}))};d.add("help",((e,t)=>{const n=(()=>{let e={};return{get:()=>e,set:t=>{e=t}}})(),a=(e=>({addTab:t=>{const n=t.name??h("tab-name"),a=e.get();a[n]=t,e.set(a)}}))(n);(e=>{(0,e.options.register)("help_tabs",{processor:"array"})})(e);const r=P(e,n,t);return((e,t)=>{e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t,context:"any"}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t,context:"any"})})(e,r),((e,t)=>{e.addCommand("mceHelp",t)})(e,r),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),((e,t)=>{e.on("init",(()=>{w(t)}))})(e,t),a}))}();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TinyMCE version 8.1.2 (TBD)
2
+ * TinyMCE version 8.2.0 (2025-10-23)
3
3
  */
4
4
 
5
5
  (function () {
@@ -10,13 +10,12 @@
10
10
  /* eslint-disable @typescript-eslint/no-wrapper-object-types */
11
11
  const getPrototypeOf = Object.getPrototypeOf;
12
12
  const hasProto = (v, constructor, predicate) => {
13
- var _a;
14
13
  if (predicate(v, constructor.prototype)) {
15
14
  return true;
16
15
  }
17
16
  else {
18
17
  // String-based fallback time
19
- return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
18
+ return v.constructor?.name === constructor.name;
20
19
  }
21
20
  };
22
21
  const typeOf = (x) => {
@@ -78,6 +77,11 @@
78
77
  * strict-null-checks
79
78
  */
80
79
  class Optional {
80
+ tag;
81
+ value;
82
+ // Sneaky optimisation: every instance of Optional.none is identical, so just
83
+ // reuse the same object
84
+ static singletonNone = new Optional(false);
81
85
  // The internal representation has a `tag` and a `value`, but both are
82
86
  // private: able to be console.logged, but not able to be accessed by code
83
87
  constructor(tag, value) {
@@ -245,7 +249,7 @@
245
249
  */
246
250
  getOrDie(message) {
247
251
  if (!this.tag) {
248
- throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
252
+ throw new Error(message ?? 'Called getOrDie on None');
249
253
  }
250
254
  else {
251
255
  return this.value;
@@ -309,9 +313,6 @@
309
313
  return this.tag ? `some(${this.value})` : 'none()';
310
314
  }
311
315
  }
312
- // Sneaky optimisation: every instance of Optional.none is identical, so just
313
- // reuse the same object
314
- Optional.singletonNone = new Optional(false);
315
316
 
316
317
  const nativeSlice = Array.prototype.slice;
317
318
  const nativePush = Array.prototype.push;
@@ -637,8 +638,7 @@
637
638
  resolve(reader.result);
638
639
  };
639
640
  reader.onerror = () => {
640
- var _a;
641
- reject((_a = reader.error) === null || _a === void 0 ? void 0 : _a.message);
641
+ reject(reader.error?.message);
642
642
  };
643
643
  reader.readAsDataURL(blob);
644
644
  });
@@ -678,9 +678,8 @@
678
678
  }
679
679
  };
680
680
  const getAttrib = (image, name) => {
681
- var _a;
682
681
  if (image.hasAttribute(name)) {
683
- return (_a = image.getAttribute(name)) !== null && _a !== void 0 ? _a : '';
682
+ return image.getAttribute(name) ?? '';
684
683
  }
685
684
  else {
686
685
  return '';
@@ -763,7 +762,7 @@
763
762
  const setBorderStyle = (image, value) => {
764
763
  image.style.borderStyle = value;
765
764
  };
766
- const getBorderStyle = (image) => { var _a; return (_a = image.style.borderStyle) !== null && _a !== void 0 ? _a : ''; };
765
+ const getBorderStyle = (image) => image.style.borderStyle ?? '';
767
766
  const isFigure = (elm) => isNonNullable(elm) && elm.nodeName === 'FIGURE';
768
767
  const isImage = (elm) => elm.nodeName === 'IMG';
769
768
  const getIsDecorative = (image) => {
@@ -802,7 +801,6 @@
802
801
  isDecorative: false
803
802
  });
804
803
  const getStyleValue = (normalizeCss, data) => {
805
- var _a;
806
804
  const image = document.createElement('img');
807
805
  updateAttrib(image, 'style', data.style);
808
806
  if (getHspace(image) || data.hspace !== '') {
@@ -817,7 +815,7 @@
817
815
  if (getBorderStyle(image) || data.borderStyle !== '') {
818
816
  setBorderStyle(image, data.borderStyle);
819
817
  }
820
- return normalizeCss((_a = image.getAttribute('style')) !== null && _a !== void 0 ? _a : '');
818
+ return normalizeCss(image.getAttribute('style') ?? '');
821
819
  };
822
820
  const create = (normalizeCss, data) => {
823
821
  const image = document.createElement('img');
@@ -920,12 +918,11 @@
920
918
  return imgElm;
921
919
  };
922
920
  const splitTextBlock = (editor, figure) => {
923
- var _a;
924
921
  const dom = editor.dom;
925
922
  const textBlockElements = filter(editor.schema.getTextBlockElements(), (_, parentElm) => !editor.schema.isValidChild(parentElm, 'figure'));
926
923
  const textBlock = dom.getParent(figure.parentNode, (node) => hasNonNullableKey(textBlockElements, node.nodeName), editor.getBody());
927
924
  if (textBlock) {
928
- return (_a = dom.split(textBlock, figure)) !== null && _a !== void 0 ? _a : figure;
925
+ return dom.split(textBlock, figure) ?? figure;
929
926
  }
930
927
  else {
931
928
  return figure;
@@ -1532,16 +1529,13 @@
1532
1529
  }));
1533
1530
  }
1534
1531
  };
1535
- const createBlobCache = (editor) => (file, blobUri, dataUrl) => {
1536
- var _a;
1537
- return editor.editorUpload.blobCache.create({
1538
- blob: file,
1539
- blobUri,
1540
- name: (_a = file.name) === null || _a === void 0 ? void 0 : _a.replace(/\.[^\.]+$/, ''),
1541
- filename: file.name,
1542
- base64: dataUrl.split(',')[1]
1543
- });
1544
- };
1532
+ const createBlobCache = (editor) => (file, blobUri, dataUrl) => editor.editorUpload.blobCache.create({
1533
+ blob: file,
1534
+ blobUri,
1535
+ name: file.name?.replace(/\.[^\.]+$/, ''),
1536
+ filename: file.name,
1537
+ base64: dataUrl.split(',')[1]
1538
+ });
1545
1539
  const addToBlobCache = (editor) => (blobInfo) => {
1546
1540
  editor.editorUpload.blobCache.add(blobInfo);
1547
1541
  };
@@ -1552,12 +1546,11 @@
1552
1546
  const parseStyle = (editor) => (cssText) => editor.dom.parseStyle(cssText);
1553
1547
  const serializeStyle = (editor) => (stylesArg, name) => editor.dom.serializeStyle(stylesArg, name);
1554
1548
  const uploadImage = (editor) => (blobInfo) => global$1(editor).upload([blobInfo], false).then((results) => {
1555
- var _a;
1556
1549
  if (results.length === 0) {
1557
1550
  return Promise.reject('Failed to upload image');
1558
1551
  }
1559
1552
  else if (results[0].status === false) {
1560
- return Promise.reject((_a = results[0].error) === null || _a === void 0 ? void 0 : _a.message);
1553
+ return Promise.reject(results[0].error?.message);
1561
1554
  }
1562
1555
  else {
1563
1556
  return results[0];
@@ -1 +1 @@
1
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf,a=(e,t,a)=>{var i;return!!a(e,t.prototype)||(null===(i=e.constructor)||void 0===i?void 0:i.name)===t.name},i=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&a(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,s=e=>t=>typeof t===e,r=i("string"),o=i("object"),n=e=>((e,i)=>o(e)&&a(e,i,((e,a)=>t(e)===a)))(e,Object),l=i("array"),c=e=>null===e;const m=s("boolean"),d=e=>!(e=>null==e)(e),g=s("function"),u=s("number"),p=()=>{};class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return d(e)?h.some(e):h.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1),Array.prototype.slice;const b=Array.prototype.push,v=e=>{const t=[];for(let a=0,i=e.length;a<i;++a){if(!l(e[a]))throw new Error("Arr.flatten item "+a+" was not an array, input: "+e);b.apply(t,e[a])}return t};g(Array.from)&&Array.from;const y=Object.keys,f=Object.hasOwnProperty,A=(e,t)=>f.call(e,t),w=(D=(e,t)=>n(e)&&n(t)?w(e,t):t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let a=0;a<e.length;a++){const i=e[a];for(const e in i)A(i,e)&&(t[e]=D(t[e],i[e]))}return t});var D;const _=e=>e.length>0,C=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},I=C,U=(e,t,a)=>{((e,t,a)=>{if(!(r(a)||m(a)||u(a)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",a,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,a+"")})(e.dom,t,a)};var S=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),x=tinymce.util.Tools.resolve("tinymce.util.URI");const N=e=>t=>t.options.get(e),T=N("image_dimensions"),E=N("image_advtab"),L=N("image_uploadtab"),O=N("image_prepend_url"),j=N("image_class_list"),M=N("image_description"),R=N("image_title"),k=N("image_caption"),z=N("image_list"),B=N("a11y_advanced_options"),P=N("automatic_uploads"),H=(e,t)=>Math.max(parseInt(e,10),parseInt(t,10)),F=e=>(e&&(e=e.replace(/px$/,"")),e),G=e=>(e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e),W=e=>"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder")),$=(e,t)=>{const a=e.options.get;return x.isDomSafe(t,"img",{allow_html_data_urls:a("allow_html_data_urls"),allow_script_urls:a("allow_script_urls"),allow_svg_data_urls:a("allow_svg_data_urls")})},V=S.DOM,K=e=>e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?F(e.style.marginLeft):"",Z=e=>e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?F(e.style.marginTop):"",q=e=>e.style.borderWidth?F(e.style.borderWidth):"",J=(e,t)=>{var a;return e.hasAttribute(t)&&null!==(a=e.getAttribute(t))&&void 0!==a?a:""},Q=e=>null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName,X=(e,t,a)=>{""===a||null===a?e.removeAttribute(t):e.setAttribute(t,a)},Y=(e,t)=>{const a=e.getAttribute("style"),i=t(null!==a?a:"");i.length>0?(e.setAttribute("style",i),e.setAttribute("data-mce-style",i)):e.removeAttribute("style")},ee=(e,t)=>(e,a,i)=>{const s=e.style;s[a]?(s[a]=G(i),Y(e,t)):X(e,a,i)},te=(e,t)=>e.style[t]?F(e.style[t]):J(e,t),ae=(e,t)=>{const a=G(t);e.style.marginLeft=a,e.style.marginRight=a},ie=(e,t)=>{const a=G(t);e.style.marginTop=a,e.style.marginBottom=a},se=(e,t)=>{const a=G(t);e.style.borderWidth=a},re=(e,t)=>{e.style.borderStyle=t},oe=e=>{var t;return null!==(t=e.style.borderStyle)&&void 0!==t?t:""},ne=e=>d(e)&&"FIGURE"===e.nodeName,le=e=>{const t=V.getAttrib(e,"alt"),a=V.getAttrib(e,"role");return e.hasAttribute("alt")&&0===t.length||"presentation"===a||"none"===a},ce=e=>le(e)?"":J(e,"alt"),me=(e,t)=>{var a;const i=document.createElement("img");return X(i,"style",t.style),(K(i)||""!==t.hspace)&&ae(i,t.hspace),(Z(i)||""!==t.vspace)&&ie(i,t.vspace),(q(i)||""!==t.border)&&se(i,t.border),(oe(i)||""!==t.borderStyle)&&re(i,t.borderStyle),e(null!==(a=i.getAttribute("style"))&&void 0!==a?a:"")},de=(e,t)=>({src:J(t,"src"),alt:ce(t),title:J(t,"title"),width:te(t,"width"),height:te(t,"height"),class:J(t,"class"),style:e(J(t,"style")),caption:Q(t),hspace:K(t),vspace:Z(t),border:q(t),borderStyle:oe(t),isDecorative:le(t)}),ge=(e,t,a,i,s)=>{a[i]!==t[i]&&s(e,i,String(a[i]))},ue=(e,t,a)=>{if(a){V.setAttrib(e,"role","presentation");const t=I(e);U(t,"alt","")}else{if(c(t)){I(e).dom.removeAttribute("alt")}else{const a=I(e);U(a,"alt",t)}"presentation"===V.getAttrib(e,"role")&&V.setAttrib(e,"role","")}},pe=(e,t)=>(a,i,s)=>{e(a,s),Y(a,t)},he=(e,t,a)=>{const i=de(e,a);ge(a,i,t,"caption",((e,t,a)=>(e=>{Q(e)?(e=>{const t=e.parentNode;d(t)&&(V.insertAfter(e,t),V.remove(t))})(e):(e=>{const t=V.create("figure",{class:"image"});V.insertAfter(t,e),t.appendChild(e),t.appendChild(V.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false"})(e)})(e))),ge(a,i,t,"src",X),ge(a,i,t,"title",X),ge(a,i,t,"width",ee(0,e)),ge(a,i,t,"height",ee(0,e)),ge(a,i,t,"class",X),ge(a,i,t,"style",pe(((e,t)=>X(e,"style",t)),e)),ge(a,i,t,"hspace",pe(ae,e)),ge(a,i,t,"vspace",pe(ie,e)),ge(a,i,t,"border",pe(se,e)),ge(a,i,t,"borderStyle",pe(re,e)),((e,t,a)=>{a.alt===t.alt&&a.isDecorative===t.isDecorative||ue(e,a.alt,a.isDecorative)})(a,i,t)},be=(e,t)=>{const a=(e=>{if(e.margin){const t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e})(e.dom.styles.parse(t)),i=e.dom.styles.parse(e.dom.styles.serialize(a));return e.dom.styles.serialize(i)},ve=e=>{const t=e.selection.getNode(),a=e.dom.getParent(t,"figure.image");return a?e.dom.select("img",a)[0]:t&&("IMG"!==t.nodeName||W(t))?null:t},ye=(e,t)=>{var a;const i=e.dom,s=(t=>{const a={};var i;return((e,t,a,i)=>{((e,t)=>{const a=y(e);for(let i=0,s=a.length;i<s;i++){const s=a[i];t(e[s],s)}})(e,((e,s)=>{(t(e,s)?a:i)(e,s)}))})(t,((t,a)=>!e.schema.isValidChild(a,"figure")),(i=a,(e,t)=>{i[t]=e}),p),a})(e.schema.getTextBlockElements()),r=i.getParent(t.parentNode,(e=>{return t=s,a=e.nodeName,A(t,a)&&void 0!==t[a]&&null!==t[a];var t,a}),e.getBody());return r&&null!==(a=i.split(r,t))&&void 0!==a?a:t},fe=(e,t)=>{const a=((t,a)=>{const i=document.createElement("img");if(he((t=>be(e,t)),{...a,caption:!1},i),ue(i,a.alt,a.isDecorative),a.caption){const e=V.create("figure",{class:"image"});return e.appendChild(i),e.appendChild(V.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false",e}return i})(0,t);e.dom.setAttrib(a,"data-mce-id","__mcenew"),e.focus(),e.insertContent(a.outerHTML);const i=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(i,"data-mce-id",null),ne(i)){const t=ye(e,i);e.selection.select(t)}else e.selection.select(i)},Ae=(e,t)=>{const a=ve(e);if(a){const i={...de((t=>be(e,t)),a),...t},s=((e,t)=>{const a=t.src;return{...t,src:$(e,a)?a:""}})(e,i);i.src?((e,t)=>{const a=ve(e);if(a)if(he((t=>be(e,t)),t,a),((e,t)=>{e.dom.setAttrib(t,"src",t.getAttribute("src"))})(e,a),ne(a.parentNode)){e.dom.setStyle(a,"float","");const t=a.parentNode;ye(e,t),e.selection.select(a.parentNode)}else e.selection.select(a),((e,t,a)=>{const i=()=>{a.onload=a.onerror=null,e.selection&&(e.selection.select(a),e.nodeChanged())};a.onload=()=>{t.width||t.height||!T(e)||e.dom.setAttribs(a,{width:String(a.clientWidth),height:String(a.clientHeight)}),i()},a.onerror=i})(e,t,a)})(e,s):((e,t)=>{if(t){const a=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(a),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}})(e,a)}else t.src&&fe(e,{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1,...t})};var we=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),De=tinymce.util.Tools.resolve("tinymce.util.Tools");const _e=e=>r(e.value)?e.value:"",Ce=(e,t)=>{const a=[];return De.each(e,(e=>{const i=(e=>r(e.text)?e.text:r(e.title)?e.title:"")(e);if(void 0!==e.menu){const s=Ce(e.menu,t);a.push({text:i,items:s})}else{const s=t(e);a.push({text:i,value:s})}})),a},Ie=(e=_e)=>t=>t?h.from(t).map((t=>Ce(t,e))):h.none(),Ue=(e,t)=>(e=>{for(let i=0;i<e.length;i++){const s=(e=>A(e,"items"))(a=e[i])?Ue(a.items,t):a.value===t?h.some(a):h.none();if(s.isSome())return s}var a;return h.none()})(e),Se=Ie,xe=(e,t)=>e.bind((e=>Ue(e,t))),Ne=e=>{const t=Se((t=>e.convertURL(t.value||t.url||"","src"))),a=new Promise((a=>{((e,t)=>{const a=z(e);r(a)?fetch(a).then((e=>{e.ok&&e.json().then(t)})):g(a)?a(t):t(a)})(e,(e=>{a(t(e).map((e=>v([[{text:"None",value:""}],e]))))}))})),i=(w=j(e),Ie(_e)(w)),s=E(e),o=L(e),n=(e=>_(e.options.get("images_upload_url")))(e),l=(e=>d(e.options.get("images_upload_handler")))(e),c=(e=>{const t=ve(e);return t?de((t=>be(e,t)),t):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}})(e),m=M(e),u=R(e),p=T(e),b=k(e),y=B(e),f=P(e),A=h.some(O(e)).filter((e=>r(e)&&e.length>0));var w;return a.then((e=>({image:c,imageList:e,classList:i,hasAdvTab:s,hasUploadTab:o,hasUploadUrl:n,hasUploadHandler:l,hasDescription:m,hasImageTitle:u,hasDimensions:p,hasImageCaption:b,prependURL:A,hasAccessibilityOptions:y,automaticUploads:f})))},Te=e=>{const t=e.imageList.map((e=>({name:"images",type:"listbox",label:"Image list",items:e}))),a={name:"alt",type:"input",label:"Alternative description",enabled:!(e.hasAccessibilityOptions&&e.image.isDecorative)},i=e.classList.map((e=>({name:"classes",type:"listbox",label:"Class",items:e})));return v([[{name:"src",type:"urlinput",filetype:"image",label:"Source",picker_text:"Browse files"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[a]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{...(s=e.classList.isSome()&&e.hasImageCaption,s?{type:"grid",columns:2}:{type:"panel"}),items:v([i.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]]);var s},Ee=e=>({title:"General",name:"general",items:Te(e)}),Le=Te,Oe=e=>({src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e.class,caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}),je=(e,t)=>({src:e.src.value,alt:null!==e.alt&&0!==e.alt.length||!t?e.alt:null,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}),Me=(e,t,a,i)=>{((e,t)=>{const a=t.getData();((e,t)=>/^(?:[a-zA-Z]+:)?\/\//.test(t)?h.none():e.prependURL.bind((e=>t.substring(0,e.length)!==e?h.some(e+t):h.none())))(e,a.src.value).each((e=>{t.setData({src:{value:e,meta:a.src.meta}})}))})(t,i),((e,t)=>{const a=t.getData(),i=a.src.meta;if(void 0!==i){const s=w({},a);((e,t,a)=>{e.hasDescription&&r(a.alt)&&(t.alt=a.alt),e.hasAccessibilityOptions&&(t.isDecorative=a.isDecorative||t.isDecorative||!1),e.hasImageTitle&&r(a.title)&&(t.title=a.title),e.hasDimensions&&(r(a.width)&&(t.dimensions.width=a.width),r(a.height)&&(t.dimensions.height=a.height)),r(a.class)&&xe(e.classList,a.class).each((e=>{t.classes=e.value})),e.hasImageCaption&&m(a.caption)&&(t.caption=a.caption),e.hasAdvTab&&(r(a.style)&&(t.style=a.style),r(a.vspace)&&(t.vspace=a.vspace),r(a.border)&&(t.border=a.border),r(a.hspace)&&(t.hspace=a.hspace),r(a.borderstyle)&&(t.borderstyle=a.borderstyle))})(e,s,i),t.setData(s)}})(t,i),((e,t,a,i)=>{const s=i.getData(),r=s.src.value,o=s.src.meta||{};o.width||o.height||!t.hasDimensions||(_(r)?e.imageSize(r).then((e=>{a.open&&i.setData({dimensions:e})})).catch((e=>console.error(e))):i.setData({dimensions:{width:"",height:""}}))})(e,t,a,i),((e,t,a)=>{const i=a.getData(),s=xe(e.imageList,i.src.value);t.prevImage=s,a.setData({images:s.map((e=>e.value)).getOr("")})})(t,a,i)},Re=(e,t,a,i)=>{const s=i.getData();var r;i.block("Uploading image"),(r=s.fileinput,(e=>0<e.length?h.some(e[0]):h.none())(r)).fold((()=>{i.unblock()}),(s=>{const r=URL.createObjectURL(s),o=()=>{i.unblock(),URL.revokeObjectURL(r)},n=s=>{i.setData({src:{value:s,meta:{}}}),i.showTab("general"),Me(e,t,a,i),i.focus("src")};var l;(l=s,new Promise(((e,t)=>{const a=new FileReader;a.onload=()=>{e(a.result)},a.onerror=()=>{var e;t(null===(e=a.error)||void 0===e?void 0:e.message)},a.readAsDataURL(l)}))).then((a=>{const l=e.createBlobCache(s,r,a);t.automaticUploads?e.uploadImage(l).then((e=>{n(e.url),o()})).catch((t=>{o(),e.alertErr(t,(()=>{i.focus("fileinput")}))})):(e.addToBlobCache(l),n(l.blobUri()),i.unblock())}))}))},ke=(e,t,a)=>(i,s)=>{"src"===s.name?Me(e,t,a,i):"images"===s.name?((e,t,a,i)=>{const s=i.getData(),r=xe(t.imageList,s.images);r.each((e=>{const t=""===s.alt||a.prevImage.map((e=>e.text===s.alt)).getOr(!1);t?""===e.value?i.setData({src:e,alt:a.prevAlt}):i.setData({src:e,alt:e.text}):i.setData({src:e})})),a.prevImage=r,Me(e,t,a,i)})(e,t,a,i):"alt"===s.name?a.prevAlt=i.getData().alt:"fileinput"===s.name?Re(e,t,a,i):"isDecorative"===s.name&&i.setEnabled("alt",!i.getData().isDecorative)},ze=e=>()=>{e.open=!1},Be=e=>e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler?{type:"tabpanel",tabs:v([[Ee(e)],e.hasAdvTab?[{title:"Advanced",name:"advanced",items:[{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}]:[]])}:{type:"panel",items:Le(e)},Pe=(e,t,a)=>i=>{const s=w(Oe(t.image),i.getData()),r={...s,style:me(a.normalizeCss,je(s,!1))};e.execCommand("mceUpdateImage",!1,je(r,t.hasAccessibilityOptions)),e.editorUpload.uploadImagesAuto(),i.close()},He=e=>t=>$(e,t)?(e=>new Promise((t=>{const a=document.createElement("img"),i=e=>{a.parentNode&&a.parentNode.removeChild(a),t(e)};a.addEventListener("load",(()=>{const e={width:H(a.width,a.clientWidth),height:H(a.height,a.clientHeight)};i(Promise.resolve(e))})),a.addEventListener("error",(()=>{i(Promise.reject(`Failed to get image dimensions for: ${e}`))}));const s=a.style;s.visibility="hidden",s.position="fixed",s.bottom=s.left="0px",s.width=s.height="auto",document.body.appendChild(a),a.src=e})))(e.documentBaseURI.toAbsolute(t)).then((e=>({width:String(e.width),height:String(e.height)}))):Promise.resolve({width:"",height:""}),Fe=e=>(t,a,i)=>{var s;return e.editorUpload.blobCache.create({blob:t,blobUri:a,name:null===(s=t.name)||void 0===s?void 0:s.replace(/\.[^\.]+$/,""),filename:t.name,base64:i.split(",")[1]})},Ge=e=>t=>{e.editorUpload.blobCache.add(t)},We=e=>(t,a)=>{e.windowManager.alert(t,a)},$e=e=>t=>be(e,t),Ve=e=>t=>e.dom.parseStyle(t),Ke=e=>(t,a)=>e.dom.serializeStyle(t,a),Ze=e=>t=>we(e).upload([t],!1).then((e=>{var t;return 0===e.length?Promise.reject("Failed to upload image"):!1===e[0].status?Promise.reject(null===(t=e[0].error)||void 0===t?void 0:t.message):e[0]})),qe=e=>{const t={imageSize:He(e),addToBlobCache:Ge(e),createBlobCache:Fe(e),alertErr:We(e),normalizeCss:$e(e),parseStyle:Ve(e),serializeStyle:Ke(e),uploadImage:Ze(e)};return{open:()=>{Ne(e).then((a=>{const i=(e=>({prevImage:xe(e.imageList,e.image.src),prevAlt:e.image.alt,open:!0}))(a);return{title:"Insert/Edit Image",size:"normal",body:Be(a),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Oe(a.image),onSubmit:Pe(e,a,t),onChange:ke(t,a,i),onClose:ze(i)}})).then(e.windowManager.open)}}},Je=e=>{const t=e.attr("class");return d(t)&&/\bimage\b/.test(t)},Qe=e=>t=>{let a=t.length;const i=t=>{t.attr("contenteditable",e?"true":null)};for(;a--;){const s=t[a];Je(s)&&(s.attr("contenteditable",e?"false":null),De.each(s.getAll("figcaption"),i))}},Xe=e=>t=>{const a=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",a),a(),()=>{e.off("NodeChange",a)}};e.add("image",(e=>{(e=>{const t=e.options.register;t("image_dimensions",{processor:"boolean",default:!0}),t("image_advtab",{processor:"boolean",default:!1}),t("image_uploadtab",{processor:"boolean",default:!0}),t("image_prepend_url",{processor:"string",default:""}),t("image_class_list",{processor:"object[]"}),t("image_description",{processor:"boolean",default:!0}),t("image_title",{processor:"boolean",default:!1}),t("image_caption",{processor:"boolean",default:!1}),t("image_list",{processor:e=>{const t=!1===e||r(e)||((e,t)=>{if(l(e)){for(let a=0,i=e.length;a<i;++a)if(!t(e[a]))return!1;return!0}return!1})(e,o)||g(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be false, a string, an array or a function."}},default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("figure",Qe(!0)),e.serializer.addNodeFilter("figure",Qe(!1))}))})(e),(e=>{e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:qe(e).open,onSetup:t=>{t.setActive(d(ve(e)));const a=e.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",t.setActive).unbind,i=Xe(e)(t);return()=>{a(),i()}}}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:qe(e).open,onSetup:Xe(e)}),e.ui.registry.addContextMenu("image",{update:t=>e.selection.isEditable()&&(ne(t)||"IMG"===t.nodeName&&!W(t))?["image"]:[]})})(e),(e=>{e.addCommand("mceImage",qe(e).open),e.addCommand("mceUpdateImage",((t,a)=>{e.undoManager.transact((()=>Ae(e,a)))}))})(e)}))}();
1
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf,a=(e,t,a)=>!!a(e,t.prototype)||e.constructor?.name===t.name,i=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&a(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,s=e=>t=>typeof t===e,r=i("string"),o=i("object"),n=e=>((e,i)=>o(e)&&a(e,i,((e,a)=>t(e)===a)))(e,Object),l=i("array"),c=e=>null===e;const m=s("boolean"),d=e=>!(e=>null==e)(e),g=s("function"),p=s("number"),u=()=>{};class h{tag;value;static singletonNone=new h(!1);constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(e??"Called getOrDie on None")}static from(e){return d(e)?h.some(e):h.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}Array.prototype.slice;const b=Array.prototype.push,y=e=>{const t=[];for(let a=0,i=e.length;a<i;++a){if(!l(e[a]))throw new Error("Arr.flatten item "+a+" was not an array, input: "+e);b.apply(t,e[a])}return t};g(Array.from)&&Array.from;const v=Object.keys,f=Object.hasOwnProperty,A=(e,t)=>f.call(e,t),w=(D=(e,t)=>n(e)&&n(t)?w(e,t):t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let a=0;a<e.length;a++){const i=e[a];for(const e in i)A(i,e)&&(t[e]=D(t[e],i[e]))}return t});var D;const _=e=>e.length>0,C=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},I=C,U=(e,t,a)=>{((e,t,a)=>{if(!(r(a)||m(a)||p(a)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",a,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,a+"")})(e.dom,t,a)};var S=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),x=tinymce.util.Tools.resolve("tinymce.util.URI");const N=e=>t=>t.options.get(e),T=N("image_dimensions"),E=N("image_advtab"),L=N("image_uploadtab"),O=N("image_prepend_url"),j=N("image_class_list"),M=N("image_description"),R=N("image_title"),k=N("image_caption"),z=N("image_list"),B=N("a11y_advanced_options"),P=N("automatic_uploads"),H=(e,t)=>Math.max(parseInt(e,10),parseInt(t,10)),F=e=>(e&&(e=e.replace(/px$/,"")),e),G=e=>(e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e),W=e=>"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder")),$=(e,t)=>{const a=e.options.get;return x.isDomSafe(t,"img",{allow_html_data_urls:a("allow_html_data_urls"),allow_script_urls:a("allow_script_urls"),allow_svg_data_urls:a("allow_svg_data_urls")})},V=S.DOM,K=e=>e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?F(e.style.marginLeft):"",Z=e=>e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?F(e.style.marginTop):"",q=e=>e.style.borderWidth?F(e.style.borderWidth):"",J=(e,t)=>e.hasAttribute(t)?e.getAttribute(t)??"":"",Q=e=>null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName,X=(e,t,a)=>{""===a||null===a?e.removeAttribute(t):e.setAttribute(t,a)},Y=(e,t)=>{const a=e.getAttribute("style"),i=t(null!==a?a:"");i.length>0?(e.setAttribute("style",i),e.setAttribute("data-mce-style",i)):e.removeAttribute("style")},ee=(e,t)=>(e,a,i)=>{const s=e.style;s[a]?(s[a]=G(i),Y(e,t)):X(e,a,i)},te=(e,t)=>e.style[t]?F(e.style[t]):J(e,t),ae=(e,t)=>{const a=G(t);e.style.marginLeft=a,e.style.marginRight=a},ie=(e,t)=>{const a=G(t);e.style.marginTop=a,e.style.marginBottom=a},se=(e,t)=>{const a=G(t);e.style.borderWidth=a},re=(e,t)=>{e.style.borderStyle=t},oe=e=>e.style.borderStyle??"",ne=e=>d(e)&&"FIGURE"===e.nodeName,le=e=>{const t=V.getAttrib(e,"alt"),a=V.getAttrib(e,"role");return e.hasAttribute("alt")&&0===t.length||"presentation"===a||"none"===a},ce=e=>le(e)?"":J(e,"alt"),me=(e,t)=>{const a=document.createElement("img");return X(a,"style",t.style),(K(a)||""!==t.hspace)&&ae(a,t.hspace),(Z(a)||""!==t.vspace)&&ie(a,t.vspace),(q(a)||""!==t.border)&&se(a,t.border),(oe(a)||""!==t.borderStyle)&&re(a,t.borderStyle),e(a.getAttribute("style")??"")},de=(e,t)=>({src:J(t,"src"),alt:ce(t),title:J(t,"title"),width:te(t,"width"),height:te(t,"height"),class:J(t,"class"),style:e(J(t,"style")),caption:Q(t),hspace:K(t),vspace:Z(t),border:q(t),borderStyle:oe(t),isDecorative:le(t)}),ge=(e,t,a,i,s)=>{a[i]!==t[i]&&s(e,i,String(a[i]))},pe=(e,t,a)=>{if(a){V.setAttrib(e,"role","presentation");const t=I(e);U(t,"alt","")}else{if(c(t)){I(e).dom.removeAttribute("alt")}else{const a=I(e);U(a,"alt",t)}"presentation"===V.getAttrib(e,"role")&&V.setAttrib(e,"role","")}},ue=(e,t)=>(a,i,s)=>{e(a,s),Y(a,t)},he=(e,t,a)=>{const i=de(e,a);ge(a,i,t,"caption",((e,t,a)=>(e=>{Q(e)?(e=>{const t=e.parentNode;d(t)&&(V.insertAfter(e,t),V.remove(t))})(e):(e=>{const t=V.create("figure",{class:"image"});V.insertAfter(t,e),t.appendChild(e),t.appendChild(V.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false"})(e)})(e))),ge(a,i,t,"src",X),ge(a,i,t,"title",X),ge(a,i,t,"width",ee(0,e)),ge(a,i,t,"height",ee(0,e)),ge(a,i,t,"class",X),ge(a,i,t,"style",ue(((e,t)=>X(e,"style",t)),e)),ge(a,i,t,"hspace",ue(ae,e)),ge(a,i,t,"vspace",ue(ie,e)),ge(a,i,t,"border",ue(se,e)),ge(a,i,t,"borderStyle",ue(re,e)),((e,t,a)=>{a.alt===t.alt&&a.isDecorative===t.isDecorative||pe(e,a.alt,a.isDecorative)})(a,i,t)},be=(e,t)=>{const a=(e=>{if(e.margin){const t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[0],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[0],e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0],e["margin-right"]=e["margin-right"]||t[1],e["margin-bottom"]=e["margin-bottom"]||t[2],e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e})(e.dom.styles.parse(t)),i=e.dom.styles.parse(e.dom.styles.serialize(a));return e.dom.styles.serialize(i)},ye=e=>{const t=e.selection.getNode(),a=e.dom.getParent(t,"figure.image");return a?e.dom.select("img",a)[0]:t&&("IMG"!==t.nodeName||W(t))?null:t},ve=(e,t)=>{const a=e.dom,i=(t=>{const a={};var i;return((e,t,a,i)=>{((e,t)=>{const a=v(e);for(let i=0,s=a.length;i<s;i++){const s=a[i];t(e[s],s)}})(e,((e,s)=>{(t(e,s)?a:i)(e,s)}))})(t,((t,a)=>!e.schema.isValidChild(a,"figure")),(i=a,(e,t)=>{i[t]=e}),u),a})(e.schema.getTextBlockElements()),s=a.getParent(t.parentNode,(e=>{return t=i,a=e.nodeName,A(t,a)&&void 0!==t[a]&&null!==t[a];var t,a}),e.getBody());return s?a.split(s,t)??t:t},fe=(e,t)=>{const a=((t,a)=>{const i=document.createElement("img");if(he((t=>be(e,t)),{...a,caption:!1},i),pe(i,a.alt,a.isDecorative),a.caption){const e=V.create("figure",{class:"image"});return e.appendChild(i),e.appendChild(V.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false",e}return i})(0,t);e.dom.setAttrib(a,"data-mce-id","__mcenew"),e.focus(),e.insertContent(a.outerHTML);const i=e.dom.select('*[data-mce-id="__mcenew"]')[0];if(e.dom.setAttrib(i,"data-mce-id",null),ne(i)){const t=ve(e,i);e.selection.select(t)}else e.selection.select(i)},Ae=(e,t)=>{const a=ye(e);if(a){const i={...de((t=>be(e,t)),a),...t},s=((e,t)=>{const a=t.src;return{...t,src:$(e,a)?a:""}})(e,i);i.src?((e,t)=>{const a=ye(e);if(a)if(he((t=>be(e,t)),t,a),((e,t)=>{e.dom.setAttrib(t,"src",t.getAttribute("src"))})(e,a),ne(a.parentNode)){e.dom.setStyle(a,"float","");const t=a.parentNode;ve(e,t),e.selection.select(a.parentNode)}else e.selection.select(a),((e,t,a)=>{const i=()=>{a.onload=a.onerror=null,e.selection&&(e.selection.select(a),e.nodeChanged())};a.onload=()=>{t.width||t.height||!T(e)||e.dom.setAttribs(a,{width:String(a.clientWidth),height:String(a.clientHeight)}),i()},a.onerror=i})(e,t,a)})(e,s):((e,t)=>{if(t){const a=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(a),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}})(e,a)}else t.src&&fe(e,{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1,...t})};var we=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),De=tinymce.util.Tools.resolve("tinymce.util.Tools");const _e=e=>r(e.value)?e.value:"",Ce=(e,t)=>{const a=[];return De.each(e,(e=>{const i=(e=>r(e.text)?e.text:r(e.title)?e.title:"")(e);if(void 0!==e.menu){const s=Ce(e.menu,t);a.push({text:i,items:s})}else{const s=t(e);a.push({text:i,value:s})}})),a},Ie=(e=_e)=>t=>t?h.from(t).map((t=>Ce(t,e))):h.none(),Ue=(e,t)=>(e=>{for(let i=0;i<e.length;i++){const s=(e=>A(e,"items"))(a=e[i])?Ue(a.items,t):a.value===t?h.some(a):h.none();if(s.isSome())return s}var a;return h.none()})(e),Se=Ie,xe=(e,t)=>e.bind((e=>Ue(e,t))),Ne=e=>{const t=Se((t=>e.convertURL(t.value||t.url||"","src"))),a=new Promise((a=>{((e,t)=>{const a=z(e);r(a)?fetch(a).then((e=>{e.ok&&e.json().then(t)})):g(a)?a(t):t(a)})(e,(e=>{a(t(e).map((e=>y([[{text:"None",value:""}],e]))))}))})),i=(w=j(e),Ie(_e)(w)),s=E(e),o=L(e),n=(e=>_(e.options.get("images_upload_url")))(e),l=(e=>d(e.options.get("images_upload_handler")))(e),c=(e=>{const t=ye(e);return t?de((t=>be(e,t)),t):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}})(e),m=M(e),p=R(e),u=T(e),b=k(e),v=B(e),f=P(e),A=h.some(O(e)).filter((e=>r(e)&&e.length>0));var w;return a.then((e=>({image:c,imageList:e,classList:i,hasAdvTab:s,hasUploadTab:o,hasUploadUrl:n,hasUploadHandler:l,hasDescription:m,hasImageTitle:p,hasDimensions:u,hasImageCaption:b,prependURL:A,hasAccessibilityOptions:v,automaticUploads:f})))},Te=e=>{const t=e.imageList.map((e=>({name:"images",type:"listbox",label:"Image list",items:e}))),a={name:"alt",type:"input",label:"Alternative description",enabled:!(e.hasAccessibilityOptions&&e.image.isDecorative)},i=e.classList.map((e=>({name:"classes",type:"listbox",label:"Class",items:e})));return y([[{name:"src",type:"urlinput",filetype:"image",label:"Source",picker_text:"Browse files"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[a]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{...(s=e.classList.isSome()&&e.hasImageCaption,s?{type:"grid",columns:2}:{type:"panel"}),items:y([i.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]]);var s},Ee=e=>({title:"General",name:"general",items:Te(e)}),Le=Te,Oe=e=>({src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e.class,caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative}),je=(e,t)=>({src:e.src.value,alt:null!==e.alt&&0!==e.alt.length||!t?e.alt:null,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative}),Me=(e,t,a,i)=>{((e,t)=>{const a=t.getData();((e,t)=>/^(?:[a-zA-Z]+:)?\/\//.test(t)?h.none():e.prependURL.bind((e=>t.substring(0,e.length)!==e?h.some(e+t):h.none())))(e,a.src.value).each((e=>{t.setData({src:{value:e,meta:a.src.meta}})}))})(t,i),((e,t)=>{const a=t.getData(),i=a.src.meta;if(void 0!==i){const s=w({},a);((e,t,a)=>{e.hasDescription&&r(a.alt)&&(t.alt=a.alt),e.hasAccessibilityOptions&&(t.isDecorative=a.isDecorative||t.isDecorative||!1),e.hasImageTitle&&r(a.title)&&(t.title=a.title),e.hasDimensions&&(r(a.width)&&(t.dimensions.width=a.width),r(a.height)&&(t.dimensions.height=a.height)),r(a.class)&&xe(e.classList,a.class).each((e=>{t.classes=e.value})),e.hasImageCaption&&m(a.caption)&&(t.caption=a.caption),e.hasAdvTab&&(r(a.style)&&(t.style=a.style),r(a.vspace)&&(t.vspace=a.vspace),r(a.border)&&(t.border=a.border),r(a.hspace)&&(t.hspace=a.hspace),r(a.borderstyle)&&(t.borderstyle=a.borderstyle))})(e,s,i),t.setData(s)}})(t,i),((e,t,a,i)=>{const s=i.getData(),r=s.src.value,o=s.src.meta||{};o.width||o.height||!t.hasDimensions||(_(r)?e.imageSize(r).then((e=>{a.open&&i.setData({dimensions:e})})).catch((e=>console.error(e))):i.setData({dimensions:{width:"",height:""}}))})(e,t,a,i),((e,t,a)=>{const i=a.getData(),s=xe(e.imageList,i.src.value);t.prevImage=s,a.setData({images:s.map((e=>e.value)).getOr("")})})(t,a,i)},Re=(e,t,a,i)=>{const s=i.getData();var r;i.block("Uploading image"),(r=s.fileinput,(e=>0<e.length?h.some(e[0]):h.none())(r)).fold((()=>{i.unblock()}),(s=>{const r=URL.createObjectURL(s),o=()=>{i.unblock(),URL.revokeObjectURL(r)},n=s=>{i.setData({src:{value:s,meta:{}}}),i.showTab("general"),Me(e,t,a,i),i.focus("src")};var l;(l=s,new Promise(((e,t)=>{const a=new FileReader;a.onload=()=>{e(a.result)},a.onerror=()=>{t(a.error?.message)},a.readAsDataURL(l)}))).then((a=>{const l=e.createBlobCache(s,r,a);t.automaticUploads?e.uploadImage(l).then((e=>{n(e.url),o()})).catch((t=>{o(),e.alertErr(t,(()=>{i.focus("fileinput")}))})):(e.addToBlobCache(l),n(l.blobUri()),i.unblock())}))}))},ke=(e,t,a)=>(i,s)=>{"src"===s.name?Me(e,t,a,i):"images"===s.name?((e,t,a,i)=>{const s=i.getData(),r=xe(t.imageList,s.images);r.each((e=>{const t=""===s.alt||a.prevImage.map((e=>e.text===s.alt)).getOr(!1);t?""===e.value?i.setData({src:e,alt:a.prevAlt}):i.setData({src:e,alt:e.text}):i.setData({src:e})})),a.prevImage=r,Me(e,t,a,i)})(e,t,a,i):"alt"===s.name?a.prevAlt=i.getData().alt:"fileinput"===s.name?Re(e,t,a,i):"isDecorative"===s.name&&i.setEnabled("alt",!i.getData().isDecorative)},ze=e=>()=>{e.open=!1},Be=e=>e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler?{type:"tabpanel",tabs:y([[Ee(e)],e.hasAdvTab?[{title:"Advanced",name:"advanced",items:[{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]}]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}]:[]])}:{type:"panel",items:Le(e)},Pe=(e,t,a)=>i=>{const s=w(Oe(t.image),i.getData()),r={...s,style:me(a.normalizeCss,je(s,!1))};e.execCommand("mceUpdateImage",!1,je(r,t.hasAccessibilityOptions)),e.editorUpload.uploadImagesAuto(),i.close()},He=e=>t=>$(e,t)?(e=>new Promise((t=>{const a=document.createElement("img"),i=e=>{a.parentNode&&a.parentNode.removeChild(a),t(e)};a.addEventListener("load",(()=>{const e={width:H(a.width,a.clientWidth),height:H(a.height,a.clientHeight)};i(Promise.resolve(e))})),a.addEventListener("error",(()=>{i(Promise.reject(`Failed to get image dimensions for: ${e}`))}));const s=a.style;s.visibility="hidden",s.position="fixed",s.bottom=s.left="0px",s.width=s.height="auto",document.body.appendChild(a),a.src=e})))(e.documentBaseURI.toAbsolute(t)).then((e=>({width:String(e.width),height:String(e.height)}))):Promise.resolve({width:"",height:""}),Fe=e=>(t,a,i)=>e.editorUpload.blobCache.create({blob:t,blobUri:a,name:t.name?.replace(/\.[^\.]+$/,""),filename:t.name,base64:i.split(",")[1]}),Ge=e=>t=>{e.editorUpload.blobCache.add(t)},We=e=>(t,a)=>{e.windowManager.alert(t,a)},$e=e=>t=>be(e,t),Ve=e=>t=>e.dom.parseStyle(t),Ke=e=>(t,a)=>e.dom.serializeStyle(t,a),Ze=e=>t=>we(e).upload([t],!1).then((e=>0===e.length?Promise.reject("Failed to upload image"):!1===e[0].status?Promise.reject(e[0].error?.message):e[0])),qe=e=>{const t={imageSize:He(e),addToBlobCache:Ge(e),createBlobCache:Fe(e),alertErr:We(e),normalizeCss:$e(e),parseStyle:Ve(e),serializeStyle:Ke(e),uploadImage:Ze(e)};return{open:()=>{Ne(e).then((a=>{const i=(e=>({prevImage:xe(e.imageList,e.image.src),prevAlt:e.image.alt,open:!0}))(a);return{title:"Insert/Edit Image",size:"normal",body:Be(a),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Oe(a.image),onSubmit:Pe(e,a,t),onChange:ke(t,a,i),onClose:ze(i)}})).then(e.windowManager.open)}}},Je=e=>{const t=e.attr("class");return d(t)&&/\bimage\b/.test(t)},Qe=e=>t=>{let a=t.length;const i=t=>{t.attr("contenteditable",e?"true":null)};for(;a--;){const s=t[a];Je(s)&&(s.attr("contenteditable",e?"false":null),De.each(s.getAll("figcaption"),i))}},Xe=e=>t=>{const a=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",a),a(),()=>{e.off("NodeChange",a)}};e.add("image",(e=>{(e=>{const t=e.options.register;t("image_dimensions",{processor:"boolean",default:!0}),t("image_advtab",{processor:"boolean",default:!1}),t("image_uploadtab",{processor:"boolean",default:!0}),t("image_prepend_url",{processor:"string",default:""}),t("image_class_list",{processor:"object[]"}),t("image_description",{processor:"boolean",default:!0}),t("image_title",{processor:"boolean",default:!1}),t("image_caption",{processor:"boolean",default:!1}),t("image_list",{processor:e=>{const t=!1===e||r(e)||((e,t)=>{if(l(e)){for(let a=0,i=e.length;a<i;++a)if(!t(e[a]))return!1;return!0}return!1})(e,o)||g(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be false, a string, an array or a function."}},default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("figure",Qe(!0)),e.serializer.addNodeFilter("figure",Qe(!1))}))})(e),(e=>{e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:qe(e).open,onSetup:t=>{t.setActive(d(ye(e)));const a=e.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",t.setActive).unbind,i=Xe(e)(t);return()=>{a(),i()}}}),e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:qe(e).open,onSetup:Xe(e)}),e.ui.registry.addContextMenu("image",{update:t=>e.selection.isEditable()&&(ne(t)||"IMG"===t.nodeName&&!W(t))?["image"]:[]})})(e),(e=>{e.addCommand("mceImage",qe(e).open),e.addCommand("mceUpdateImage",((t,a)=>{e.undoManager.transact((()=>Ae(e,a)))}))})(e)}))}();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TinyMCE version 8.1.2 (TBD)
2
+ * TinyMCE version 8.2.0 (2025-10-23)
3
3
  */
4
4
 
5
5
  (function () {
@@ -9,13 +9,12 @@
9
9
 
10
10
  /* eslint-disable @typescript-eslint/no-wrapper-object-types */
11
11
  const hasProto = (v, constructor, predicate) => {
12
- var _a;
13
12
  if (predicate(v, constructor.prototype)) {
14
13
  return true;
15
14
  }
16
15
  else {
17
16
  // String-based fallback time
18
- return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
17
+ return v.constructor?.name === constructor.name;
19
18
  }
20
19
  };
21
20
  const typeOf = (x) => {
@@ -202,7 +201,7 @@
202
201
  try {
203
202
  rules = styleSheet.cssRules || styleSheet.rules;
204
203
  }
205
- catch (_a) {
204
+ catch {
206
205
  // Firefox fails on rules to remote domain for example:
207
206
  // @import url(//fonts.googleapis.com/css?family=Pathway+Gothic+One);
208
207
  }
@@ -230,7 +229,7 @@
230
229
  append(styleSheet);
231
230
  });
232
231
  }
233
- catch (_a) {
232
+ catch {
234
233
  // Ignore
235
234
  }
236
235
  return selectors;
@@ -1 +1 @@
1
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(s=r=e,(o=String).prototype.isPrototypeOf(s)||(null===(n=r.constructor)||void 0===n?void 0:n.name)===o.name)?"string":t;var s,r,o,n})(t)===e,s=t("string"),r=t("object"),o=t("array"),n=e=>"function"==typeof e;Array.prototype.slice;const c=Array.prototype.push;n(Array.from)&&Array.from;var i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),l=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");const u=e=>t=>t.options.get(e),m=u("importcss_merge_classes"),f=u("importcss_exclusive"),y=u("importcss_selector_converter"),d=u("importcss_selector_filter"),h=u("importcss_groups"),g=u("importcss_append"),_=u("importcss_file_filter"),v=u("skin"),b=u("skin_url"),x=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/,T=e=>s(e)?t=>-1!==t.indexOf(e):e instanceof RegExp?t=>e.test(t):e,S=(e,t)=>{let s={};const r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(!r)return;const o=r[1],n=r[2].substr(1).split(".").join(" "),c=p.makeMap("a,img");return r[1]?(s={title:t},e.schema.getTextBlockElements()[o]?s.block=o:e.schema.getBlockElements()[o]||c[o.toLowerCase()]?s.selector=o:s.inline=o):r[2]&&(s={inline:"span",title:t.substr(1),classes:n}),m(e)?s.classes=n:s.attributes={class:n},s},A=(e,t)=>null===t||f(e),k=e=>{e.on("init",(()=>{const t=(()=>{const e=[],t=[],s={};return{addItemToGroup:(e,r)=>{s[e]?s[e].push(r):(t.push(e),s[e]=[r])},addItem:t=>{e.push(t)},toFormats:()=>{return(r=t,n=e=>{const t=s[e];return 0===t.length?[]:[{title:e,items:t}]},(e=>{const t=[];for(let s=0,r=e.length;s<r;++s){if(!o(e[s]))throw new Error("Arr.flatten item "+s+" was not an array, input: "+e);c.apply(t,e[s])}return t})(((e,t)=>{const s=e.length,r=new Array(s);for(let o=0;o<s;o++){const s=e[o];r[o]=t(s,o)}return r})(r,n))).concat(e);var r,n}}})(),r={},n=T(d(e)),u=(e=>p.map(e,(e=>p.extend({},e,{original:e,selectors:{},filter:T(e.filter)}))))(h(e)),m=(t,s)=>{if(((e,t,s,r)=>!(A(e,s)?t in r:t in s.selectors))(e,t,s,r)){((e,t,s,r)=>{A(e,s)?r[t]=!0:s.selectors[t]=!0})(e,t,s,r);const o=((e,t,s,r)=>{let o;const n=y(e);return o=r&&r.selector_converter?r.selector_converter:n||(()=>S(e,s)),o.call(t,s,r)})(e,e.plugins.importcss,t,s);if(o){const t=o.name||i.DOM.uniqueId();return e.formatter.register(t,o),{title:o.title,format:t}}}return null};p.each(((e,t,r)=>{const o=[],n={},c=(t,n)=>{let i,u=t.href;if(u=(e=>{const t=a.cacheSuffix;return s(e)&&(e=e.replace("?"+t,"").replace("&"+t,"")),e})(u),u&&(!r||r(u,n))&&!((e,t)=>{const s=v(e);if(s){const r=b(e),o=r?e.documentBaseURI.toAbsolute(r):l.baseURL+"/skins/ui/"+s,n=l.baseURL+"/skins/content/",c=e.editorManager.suffix;return t===o+"/content"+(e.inline?".inline":"")+`${c}.css`||-1!==t.indexOf(n)}return!1})(e,u)){p.each(t.imports,(e=>{c(e,!0)}));try{i=t.cssRules||t.rules}catch(e){}p.each(i,(e=>{e.styleSheet&&e.styleSheet?c(e.styleSheet,!0):e.selectorText&&p.each(e.selectorText.split(","),(e=>{o.push(p.trim(e))}))}))}};p.each(e.contentCSS,(e=>{n[e]=!0})),r||(r=(e,t)=>t||n[e]);try{p.each(t.styleSheets,(e=>{c(e)}))}catch(e){}return o})(e,e.getDoc(),T(_(e))),(e=>{if(!x.test(e)&&(!n||n(e))){const s=((e,t)=>p.grep(e,(e=>!e.filter||e.filter(t))))(u,e);if(s.length>0)p.each(s,(s=>{const r=m(e,s);r&&t.addItemToGroup(s.title,r)}));else{const s=m(e,null);s&&t.addItem(s)}}}));const f=t.toFormats();e.dispatch("addStyleModifications",{items:f,replace:!g(e)})}))};e.add("importcss",(e=>((e=>{const t=e.options.register,o=e=>s(e)||n(e)||r(e);t("importcss_merge_classes",{processor:"boolean",default:!0}),t("importcss_exclusive",{processor:"boolean",default:!0}),t("importcss_selector_converter",{processor:"function"}),t("importcss_selector_filter",{processor:o}),t("importcss_file_filter",{processor:o}),t("importcss_groups",{processor:"object[]"}),t("importcss_append",{processor:"boolean",default:!1})})(e),k(e),(e=>({convertSelectorToFormat:t=>S(e,t)}))(e))))}();
1
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(s=r=e,(o=String).prototype.isPrototypeOf(s)||r.constructor?.name===o.name)?"string":t;var s,r,o})(t)===e,s=t("string"),r=t("object"),o=t("array"),n=e=>"function"==typeof e;Array.prototype.slice;const c=Array.prototype.push;n(Array.from)&&Array.from;var i=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),l=tinymce.util.Tools.resolve("tinymce.EditorManager"),a=tinymce.util.Tools.resolve("tinymce.Env"),p=tinymce.util.Tools.resolve("tinymce.util.Tools");const u=e=>t=>t.options.get(e),m=u("importcss_merge_classes"),f=u("importcss_exclusive"),y=u("importcss_selector_converter"),h=u("importcss_selector_filter"),d=u("importcss_groups"),g=u("importcss_append"),_=u("importcss_file_filter"),v=u("skin"),b=u("skin_url"),x=/^\.(?:ephox|tiny-pageembed|mce)(?:[.-]+\w+)+$/,T=e=>s(e)?t=>-1!==t.indexOf(e):e instanceof RegExp?t=>e.test(t):e,S=(e,t)=>{let s={};const r=/^(?:([a-z0-9\-_]+))?(\.[a-z0-9_\-\.]+)$/i.exec(t);if(!r)return;const o=r[1],n=r[2].substr(1).split(".").join(" "),c=p.makeMap("a,img");return r[1]?(s={title:t},e.schema.getTextBlockElements()[o]?s.block=o:e.schema.getBlockElements()[o]||c[o.toLowerCase()]?s.selector=o:s.inline=o):r[2]&&(s={inline:"span",title:t.substr(1),classes:n}),m(e)?s.classes=n:s.attributes={class:n},s},A=(e,t)=>null===t||f(e),k=e=>{e.on("init",(()=>{const t=(()=>{const e=[],t=[],s={};return{addItemToGroup:(e,r)=>{s[e]?s[e].push(r):(t.push(e),s[e]=[r])},addItem:t=>{e.push(t)},toFormats:()=>{return(r=t,n=e=>{const t=s[e];return 0===t.length?[]:[{title:e,items:t}]},(e=>{const t=[];for(let s=0,r=e.length;s<r;++s){if(!o(e[s]))throw new Error("Arr.flatten item "+s+" was not an array, input: "+e);c.apply(t,e[s])}return t})(((e,t)=>{const s=e.length,r=new Array(s);for(let o=0;o<s;o++){const s=e[o];r[o]=t(s,o)}return r})(r,n))).concat(e);var r,n}}})(),r={},n=T(h(e)),u=(e=>p.map(e,(e=>p.extend({},e,{original:e,selectors:{},filter:T(e.filter)}))))(d(e)),m=(t,s)=>{if(((e,t,s,r)=>!(A(e,s)?t in r:t in s.selectors))(e,t,s,r)){((e,t,s,r)=>{A(e,s)?r[t]=!0:s.selectors[t]=!0})(e,t,s,r);const o=((e,t,s,r)=>{let o;const n=y(e);return o=r&&r.selector_converter?r.selector_converter:n||(()=>S(e,s)),o.call(t,s,r)})(e,e.plugins.importcss,t,s);if(o){const t=o.name||i.DOM.uniqueId();return e.formatter.register(t,o),{title:o.title,format:t}}}return null};p.each(((e,t,r)=>{const o=[],n={},c=(t,n)=>{let i,u=t.href;if(u=(e=>{const t=a.cacheSuffix;return s(e)&&(e=e.replace("?"+t,"").replace("&"+t,"")),e})(u),u&&(!r||r(u,n))&&!((e,t)=>{const s=v(e);if(s){const r=b(e),o=r?e.documentBaseURI.toAbsolute(r):l.baseURL+"/skins/ui/"+s,n=l.baseURL+"/skins/content/",c=e.editorManager.suffix;return t===o+"/content"+(e.inline?".inline":"")+`${c}.css`||-1!==t.indexOf(n)}return!1})(e,u)){p.each(t.imports,(e=>{c(e,!0)}));try{i=t.cssRules||t.rules}catch{}p.each(i,(e=>{e.styleSheet&&e.styleSheet?c(e.styleSheet,!0):e.selectorText&&p.each(e.selectorText.split(","),(e=>{o.push(p.trim(e))}))}))}};p.each(e.contentCSS,(e=>{n[e]=!0})),r||(r=(e,t)=>t||n[e]);try{p.each(t.styleSheets,(e=>{c(e)}))}catch{}return o})(e,e.getDoc(),T(_(e))),(e=>{if(!x.test(e)&&(!n||n(e))){const s=((e,t)=>p.grep(e,(e=>!e.filter||e.filter(t))))(u,e);if(s.length>0)p.each(s,(s=>{const r=m(e,s);r&&t.addItemToGroup(s.title,r)}));else{const s=m(e,null);s&&t.addItem(s)}}}));const f=t.toFormats();e.dispatch("addStyleModifications",{items:f,replace:!g(e)})}))};e.add("importcss",(e=>((e=>{const t=e.options.register,o=e=>s(e)||n(e)||r(e);t("importcss_merge_classes",{processor:"boolean",default:!0}),t("importcss_exclusive",{processor:"boolean",default:!0}),t("importcss_selector_converter",{processor:"function"}),t("importcss_selector_filter",{processor:o}),t("importcss_file_filter",{processor:o}),t("importcss_groups",{processor:"object[]"}),t("importcss_append",{processor:"boolean",default:!1})})(e),k(e),(e=>({convertSelectorToFormat:t=>S(e,t)}))(e))))}();
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TinyMCE version 8.1.2 (TBD)
2
+ * TinyMCE version 8.2.0 (2025-10-23)
3
3
  */
4
4
 
5
5
  (function () {
@@ -99,10 +99,10 @@
99
99
 
100
100
  const register$1 = (editor) => {
101
101
  editor.addCommand('mceInsertDate', (_ui, value) => {
102
- insertDateTime(editor, value !== null && value !== void 0 ? value : getDateFormat(editor));
102
+ insertDateTime(editor, value ?? getDateFormat(editor));
103
103
  });
104
104
  editor.addCommand('mceInsertTime', (_ui, value) => {
105
- insertDateTime(editor, value !== null && value !== void 0 ? value : getTimeFormat(editor));
105
+ insertDateTime(editor, value ?? getTimeFormat(editor));
106
106
  });
107
107
  };
108
108
 
@@ -1 +1 @@
1
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),n=t("insertdatetime_dateformat"),a=t("insertdatetime_timeformat"),r=t("insertdatetime_formats"),s=t("insertdatetime_element"),i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),c=(e,t)=>{if((e=""+e).length<t)for(let n=0;n<t-e.length;n++)e="0"+e;return e},d=(e,t,n=new Date)=>(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+n.getFullYear())).replace("%y",""+n.getYear())).replace("%m",c(n.getMonth()+1,2))).replace("%d",c(n.getDate(),2))).replace("%H",""+c(n.getHours(),2))).replace("%M",""+c(n.getMinutes(),2))).replace("%S",""+c(n.getSeconds(),2))).replace("%I",""+((n.getHours()+11)%12+1))).replace("%p",n.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(m[n.getMonth()]))).replace("%b",""+e.translate(l[n.getMonth()]))).replace("%A",""+e.translate(o[n.getDay()]))).replace("%a",""+e.translate(i[n.getDay()]))).replace("%%","%"),u=(e,t)=>{if(s(e)&&e.selection.isEditable()){const n=d(e,t);let a;a=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d");const r=e.dom.getParent(e.selection.getStart(),"time");r?((e,t,n,a)=>{const r=e.dom.create("time",{datetime:n},a);e.dom.replace(r,t),e.selection.select(r,!0),e.selection.collapse(!1)})(e,r,a,n):e.insertContent('<time datetime="'+a+'">'+n+"</time>")}else e.insertContent(d(e,t))};var p=tinymce.util.Tools.resolve("tinymce.util.Tools");const g=e=>t=>{const n=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",n),n(),()=>{e.off("NodeChange",n)}};e.add("insertdatetime",(e=>{(e=>{const t=e.options.register;t("insertdatetime_dateformat",{processor:"string",default:e.translate("%Y-%m-%d")}),t("insertdatetime_timeformat",{processor:"string",default:e.translate("%H:%M:%S")}),t("insertdatetime_formats",{processor:"string[]",default:["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"]}),t("insertdatetime_element",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceInsertDate",((t,a)=>{u(e,null!=a?a:n(e))})),e.addCommand("mceInsertTime",((t,n)=>{u(e,null!=n?n:a(e))}))})(e),(e=>{const t=r(e),n=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})((e=>{const t=r(e);return t.length>0?t[0]:a(e)})(e)),s=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",chevronTooltip:"Insert date/time menu",select:e=>e===n.get(),fetch:n=>{n(p.map(t,(t=>({type:"choiceitem",text:d(e,t),value:t}))))},onAction:e=>{s(n.get())},onItemAction:(e,t)=>{n.set(t),s(t)},onSetup:g(e)});const i=e=>()=>{n.set(e),s(e)};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:()=>p.map(t,(t=>({type:"menuitem",text:d(e,t),onAction:i(t)}))),onSetup:g(e)})})(e)}))}();
1
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),a=t("insertdatetime_dateformat"),n=t("insertdatetime_timeformat"),r=t("insertdatetime_formats"),s=t("insertdatetime_element"),i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),m="January February March April May June July August September October November December".split(" "),c=(e,t)=>{if((e=""+e).length<t)for(let a=0;a<t-e.length;a++)e="0"+e;return e},d=(e,t,a=new Date)=>(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+a.getFullYear())).replace("%y",""+a.getYear())).replace("%m",c(a.getMonth()+1,2))).replace("%d",c(a.getDate(),2))).replace("%H",""+c(a.getHours(),2))).replace("%M",""+c(a.getMinutes(),2))).replace("%S",""+c(a.getSeconds(),2))).replace("%I",""+((a.getHours()+11)%12+1))).replace("%p",a.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(m[a.getMonth()]))).replace("%b",""+e.translate(l[a.getMonth()]))).replace("%A",""+e.translate(o[a.getDay()]))).replace("%a",""+e.translate(i[a.getDay()]))).replace("%%","%"),u=(e,t)=>{if(s(e)&&e.selection.isEditable()){const a=d(e,t);let n;n=/%[HMSIp]/.test(t)?d(e,"%Y-%m-%dT%H:%M"):d(e,"%Y-%m-%d");const r=e.dom.getParent(e.selection.getStart(),"time");r?((e,t,a,n)=>{const r=e.dom.create("time",{datetime:a},n);e.dom.replace(r,t),e.selection.select(r,!0),e.selection.collapse(!1)})(e,r,n,a):e.insertContent('<time datetime="'+n+'">'+a+"</time>")}else e.insertContent(d(e,t))};var p=tinymce.util.Tools.resolve("tinymce.util.Tools");const g=e=>t=>{const a=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",a),a(),()=>{e.off("NodeChange",a)}};e.add("insertdatetime",(e=>{(e=>{const t=e.options.register;t("insertdatetime_dateformat",{processor:"string",default:e.translate("%Y-%m-%d")}),t("insertdatetime_timeformat",{processor:"string",default:e.translate("%H:%M:%S")}),t("insertdatetime_formats",{processor:"string[]",default:["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"]}),t("insertdatetime_element",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceInsertDate",((t,n)=>{u(e,n??a(e))})),e.addCommand("mceInsertTime",((t,a)=>{u(e,a??n(e))}))})(e),(e=>{const t=r(e),a=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})((e=>{const t=r(e);return t.length>0?t[0]:n(e)})(e)),s=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",chevronTooltip:"Insert date/time menu",select:e=>e===a.get(),fetch:a=>{a(p.map(t,(t=>({type:"choiceitem",text:d(e,t),value:t}))))},onAction:e=>{s(a.get())},onItemAction:(e,t)=>{a.set(t),s(t)},onSetup:g(e)});const i=e=>()=>{a.set(e),s(e)};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:()=>p.map(t,(t=>({type:"menuitem",text:d(e,t),onAction:i(t)}))),onSetup:g(e)})})(e)}))}();
@@ -284,7 +284,7 @@ tinymce.addI18n("it", {
284
284
  "Range 0 to 255": "Intervallo da 0 a 255",
285
285
  "Red": "Rosso",
286
286
  "Red component": "Componente rosso",
287
- "Redo": "Ripristina",
287
+ "Redo": "Redo",
288
288
  "Remove": "Rimuovi",
289
289
  "Remove color": "Rimuovi colore",
290
290
  "Remove link": "Rimuovi collegamento",