10 lines
175 KiB
JavaScript
10 lines
175 KiB
JavaScript
|
/* !
|
||
|
* Tiny PowerPaste plugin
|
||
|
*
|
||
|
* Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
|
||
|
* Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
|
||
|
*
|
||
|
* Version: 6.2.2-625
|
||
|
*/
|
||
|
|
||
|
!function(){"use strict";const e=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&((e,t,n)=>{var r,o;return o=e,!!t.prototype.isPrototypeOf(o)||(null===(r=e.constructor)||void 0===r?void 0:r.name)===t.name})(e,String)?"string":t})(t)===e,t=e=>t=>typeof t===e,n=e("string"),r=e("object"),o=e("array"),s=t("boolean"),a=(void 0,e=>undefined===e);const i=e=>null==e,l=e=>!i(e),c=t("function"),u=t("number"),d=()=>{},h=(e,t)=>(...n)=>e(t.apply(null,n)),m=e=>()=>e,p=e=>e,f=(e,t)=>e===t;function g(e,...t){return(...n)=>{const r=t.concat(n);return e.apply(null,r)}}const v=e=>()=>{throw new Error(e)},y=e=>e(),b=m(!1),x=m(!0);class k{constructor(e,t){this.tag=e,this.value=t}static some(e){return new k(!0,e)}static none(){return k.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?k.some(e(this.value)):k.none()}bind(e){return this.tag?e(this.value):k.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:k.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 l(e)?k.some(e):k.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()"}}k.singletonNone=new k(!1);const w=Array.prototype.slice,S=Array.prototype.indexOf,C=Array.prototype.push,T=(e,t)=>((e,t)=>S.call(e,t))(e,t)>-1,I=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(t(e[n],n))return!0;return!1},A=(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},O=(e,t)=>{for(let n=0,r=e.length;n<r;n++)t(e[n],n)},E=(e,t)=>{const n=[],r=[];for(let o=0,s=e.length;o<s;o++){const s=e[o];(t(s,o)?n:r).push(s)}return{pass:n,fail:r}},L=(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},N=(e,t,n)=>(O(e,((e,r)=>{n=t(n,e,r)})),n),_=(e,t)=>((e,t,n)=>{for(let r=0,o=e.length;r<o;r++){const o=e[r];if(t(o,r))return k.some(o);if(n(o,r))break}return k.none()})(e,t,b),D=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(t(e[n],n))return k.some(n);return k.none()},P=e=>{const t=[];for(let n=0,r=e.length;n<r;++n){if(!o(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);C.apply(t,e[n])}return t},R=(e,t)=>P(A(e,t)),M=(e,t)=>{for(let n=0,r=e.length;n<r;++n)if(!0!==t(e[n],n))return!1;return!0},j=(e,t)=>{const n={};for(let r=0,o=e.length;r<o;r++){const o=e[r];n[String(o)]=t(o,r)}return n},F=e=>((e,t)=>0<e.length?k.some(e[0]):k.none())(e),U=(e,t)=>{for(let n=0;n<e.length;n++){const r=t(e[n],n);if(r.isSome())return r}return k.none()},B=(e,t,n)=>""===t||e.length>=t.length&&e.substr(n,n+t.length)===t,z=(e,t)=>W(e,t)?((e,t)=>e.substring(t))(e,t.length):e,H=(e,t,n=0,r)=>{const o=e.indexOf(t,n);return-1!==o&&(!!a(r)||o+t.length<=r)},W=(e,t)=>B(e,t,0),$=(e,t)=>B(e,t,e.length-t.length),V=(G=/^\s+|\s+$/g,e=>e.replace(G,""));var G;const q=e=>parseInt(e,10),K=(e,t)=>{const n=e-t;return 0===n?0:n>0?1:-1},J=(e,t,n)=>({major:e,minor:t,patch:n}),Y=e=>{const t=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(e);return t?J(q(t[1]),q(t[2]),q(t[3])):J(0,0,0)},X=e=>t=>t.options.get(e),Z=X("paste_as_text"),Q=X("paste_merge_formats"),ee=X("paste_tab_spaces"),te=X("smart_paste"),ne=X("cache_suffix"),re=X("automatic_uploads"),oe=X("indent_use_margin"),se=X("powerpaste_block_drop"),ae=X("powerpaste_keep_unsupported_src"),ie=X("powerpaste_allow_local_images"),le=X("powerpaste_word_import"),ce=X("powerpaste_googledocs_import"),ue=X("powerpaste_html_import"),de=X("powerpaste_clean_filtered_inline_elements"),he=X("link_default_protocol"),me=e=>{var t;return tinymce.explode(null!==(t=e.options.get("images_file_types"))&&void 0!==t?t:"")},pe=e=>{let t=e;return{get:()=>t,set:e=
|