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

9 lines
22 KiB

2 years ago
/**
* Copyright (c) Tiny Technologies, Inc. All rights reserved.
* Licensed under the LGPL or a commercial license.
* For LGPL see License.txt in the project root for license information.
* For commercial licenses see https://www.tiny.cloud/
*
* Version: 5.10.7 (2022-12-06)
*/
!function(){"use strict";function w(e){var t=e;return{get:function(){return t},set:function(e){t=e}}}function P(e){return!(null==e)}function _(){}function o(e){return function(){return e}}function e(e){return e}function t(){return l}var n,r=tinymce.util.Tools.resolve("tinymce.PluginManager"),u=function(e){return n=typeof(t=e),"array"==(null===t?"null":"object"==n&&(Array.prototype.isPrototypeOf(t)||t.constructor&&"Array"===t.constructor.name)?"array":"object"==n&&(String.prototype.isPrototypeOf(t)||t.constructor&&"String"===t.constructor.name)?"string":n);var t,n},i=o(!(n="function")),s=o(!0),l={fold:function(e,t){return e()},isSome:i,isNone:s,getOr:e,getOrThunk:a,getOrDie:function(e){throw new Error(e||"error: getOrDie called on none.")},getOrNull:o(null),getOrUndefined:o(void 0),or:e,orThunk:a,map:t,each:_,bind:t,exists:i,forall:s,filter:function(){return l},toArray:function(){return[]},toString:o("none()")};function a(e){return e()}function c(e,t){for(var n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1}function f(e,t){for(var n=e.length,r=new Array(n),a=0;a<n;a++){var o=e[a];r[a]=t(o,a)}return r}function d(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function p(){var e,t,n=(e=_,t=w(le.none()),{clear:function(){r(),t.set(le.none())},isSet:function(){return t.get().isSome()},get:function(){return t.get()},set:function(e){r(),t.set(le.some(e))}});function r(){return t.get().each(e)}return de(de({},n),{on:function(e){return n.get().each(e)}})}function m(e,t,n){return""===t||e.length>=t.length&&e.substr(n,n+t.length)===t}function C(e,t){return e.fire("PastePlainTextToggle",{state:t})}function T(e){return e.getParam("paste_data_images",!1)}function g(e){return e.getParam("paste_retain_style_properties")}function h(e){return e.getParam("validate")}function y(e){return e.getParam("paste_data_images",!1,"boolean")}function v(e){return he.explode(e.getParam("images_file_types","jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp","string"))}function b(e){return-1!==e.indexOf(be)}function x(e,t,n){return t?(r=!0===t?"p":t,a=n,o=e.split(/\n\n/),i=function(e,t){var n,r=[],a="<"+e;if("object"==typeof t){for(var o in t)n=o,we.call(t,n)&&r.push(o+'="'+Pe.encodeAllRaw(t[o])+'"');r.length&&(a+=" "+r.join(" "))}return a+">"}(r,a),s="</"+r+">",1===(l=he.map(o,function(e){return e.split(/\n/).join("<br />")})).length?l[0]:he.map(l,function(e){return i+e+s}).join("")):e.replace(/\r?\n/g,"<br>");var r,a,o,i,s,l}function D(t,e){return he.each(e,function(e){t=e.constructor===RegExp?t.replace(e,""):t.replace(e[0],e[1])}),t}function k(e){return D(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,function(e,t,n){return t||n?"\xa0":" "}],/<br class="Apple-interchange-newline">/g,/<br>$/i])}function O(e){return/<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(e)||/class="OutlineElement/.test(e)||/id="?docs\-internal\-guid\-/.test(e)}function S(r,e){var a,t=g(r);t&&(a=he.makeMap(t.split(/[, ]/))),e=D(e,[/<br class="?Apple-interchange-newline"?>/gi,/<b[^>]+id="?docs-internal-[^>]*>/gi,/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\xa0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return 0<t.length?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\xa0"):""}]]);var n=r.getParam("paste_word_valid_elements","-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody"),o=De({valid_elements:n,valid_children:"-li[p]"});he.each(o.elements,function(e){e.attributes.class||(e.attributes.class={},e.attributesOrder.push("class")),e.attributes.style||(e.attributes.style={},e.attributesOrder.push("style"))});var i=_e({},o);i.addAttributeFilter("style",function(e){for(var t,n=e.length;n