You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

4 lines
15 KiB
Plaintext

11 months ago
/**
* TinyMCE version 6.0.2 (2022-04-27)
*/
!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.util.VK");const n=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||(null===(l=o.constructor)||void 0===l?void 0:l.name)===r.name)?"string":t;var n,o,r,l})(t)===e,o=e=>t=>typeof t===e,r=n("string"),l=n("object"),a=n("array"),s=(null,e=>null===e);const i=o("boolean"),c=o("function"),u=(e,t)=>{if(a(e)){for(let n=0,o=e.length;n<o;++n)if(!t(e[n]))return!1;return!0}return!1},g=()=>{},m=(e,t)=>e===t;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 null==e?h.none():h.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()"}}h.singletonNone=new h(!1);const d=Array.prototype.indexOf,p=Array.prototype.push,f=e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!a(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);p.apply(t,e[n])}return t},k=(e,t)=>{for(let n=0;n<e.length;n++){const o=t(e[n],n);if(o.isSome())return o}return h.none()},v=(e,t,n=m)=>e.exists((e=>n(e,t))),y=e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t},x=(e,t)=>e?h.some(t):h.none(),_=e=>t=>t.options.get(e),b=_("link_assume_external_targets"),w=_("link_context_toolbar"),C=_("link_list"),O=_("link_default_target"),N=_("link_default_protocol"),A=_("link_target_list"),T=_("link_rel_list"),S=_("link_class_list"),E=_("link_title"),R=_("allow_unsafe_link_target"),P=_("link_quicklink");var L=tinymce.util.Tools.resolve("tinymce.util.Tools");const M=e=>r(e.value)?e.value:"",D=(e,t)=>{const n=[];return L.each(e,(e=>{const o=(e=>r(e.text)?e.text:r(e.title)?e.title:"")(e);if(void 0!==e.menu){const r=D(e.menu,t);n.push({text:o,items:r})}else{const r=t(e);n.push({text:o,value:r})}})),n},B=(e=M)=>t=>h.from(t).map((t=>D(t,e))),I=e=>B(M)(e),j=B,K=(e,t)=>n=>({name:e,type:"listbox",label:t,items:n}),U=M,q=Object.keys,F=Object.hasOwnProperty,V=(e,t)=>F.call(e,t);var $=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),z=tinymce.util.Tools.resolve("tinymce.util.URI");const G=e=>e&&"a"===e.nodeName.toLowerCase(),H=e=>G(e)&&!!Q(e),J=(e,t)=>{if(e.collapsed)return[];{const n=e.cloneContents(),o=new $(n.firstChild,n),r=[];let l=n.firstChild;do{t(l)&&r.push(l)}while(l=o.next());return r}},W=e=>/^\w+:/i.test(e),Q=e=>e.getAttribute("data-mce-href")||e.getAttribute("href"),X=(e,t)=>{const n=["noopener"],o=e?e.split(/\s+/):[],r=e=>e.filter((e=>-1===L.inArray(n,e))),l=t?(e=>(e=r(e)).length>0?e.concat(n):n)(o):r(o);return l.length>0?(e=>L.trim(e.sort().join(" ")))(l):""},Y=(e,t)=>(t=t||e.selection.getNode(),ne(t)?e.dom.select("a[href]",t)[0]:e.dom.getParent(t,"a[href]")),Z=(e,t)=>(t?t.innerText||t.textContent:e.getContent({format:"text"})).replace(/\uFEFF/g,""),ee=e=>L.grep(e,H).length>0,te=e=>{const t=e.schema.getTextInlineElements();return 0===J(e.selection.getRng(),(e=>1===e.nodeType&&!G(e)&&!V(t,e.nodeName.toLowerCase()))).length},ne=e=>e&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className),oe=(e,t,n)=>{const o=e.selection.getNode(),r=Y(e,o),l=((e,t)=>{const n={...t};if(0===T(e).length&&!R(e)){const e=X(n.rel,"_blank"===n.target);n.rel=e||null}return h.from(n.target).isNone()&&!1===A(e)&&(n.target=O(e)),n.