10 lines
20 KiB
JavaScript
10 lines
20 KiB
JavaScript
|
/*!
|
||
|
* Tiny Link Checker plugin
|
||
|
*
|
||
|
* Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
|
||
|
* Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
|
||
|
*
|
||
|
* Version: 3.1.0-55
|
||
|
*/
|
||
|
|
||
|
!function(){"use strict";const e=Object.getPrototypeOf,t=(e,t,r)=>{var n;return!!r(e,t.prototype)||(null===(n=e.constructor)||void 0===n?void 0:n.name)===t.name},r=e=>r=>(e=>{const r=typeof e;return null===e?"null":"object"===r&&Array.isArray(e)?"array":"object"===r&&t(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":r})(r)===e,n=e=>t=>typeof t===e,o=r("object"),s=r=>((r,n)=>o(r)&&t(r,n,((t,r)=>e(t)===r)))(r,Object),a=r("array"),c=n("boolean"),u=(void 0,e=>undefined===e);const i=e=>!(e=>null==e)(e),l=n("function");class p{constructor(e,t){this.tag=e,this.value=t}static some(e){return new p(!0,e)}static none(){return p.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?p.some(e(this.value)):p.none()}bind(e){return this.tag?e(this.value):p.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:p.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 i(e)?p.some(e):p.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()"}}p.singletonNone=new p(!1);const h=e=>parseInt(e,10),d=(e,t)=>{const r=e-t;return 0===r?0:r>0?1:-1},m=(e,t,r)=>({major:e,minor:t,patch:r}),g=e=>{const t=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(e);return t?m(h(t[1]),h(t[2]),h(t[3])):m(0,0,0)},f=()=>{},k=(e,t)=>(...r)=>e(t.apply(null,r)),y=e=>()=>e,v=e=>e,w=e=>e(),b=y(!1),T=y(!0),x=e=>t=>t.options.get(e),O=x("linkchecker_content_css"),E=x("linkchecker_service_url"),S=x("linkchecker_preprocess"),j=x("contextmenu"),R=(e,t)=>{let r;const n=(...n)=>{clearTimeout(r),r=setTimeout((function(){e.apply(this,n)}),t)};return n.stop=()=>{clearTimeout(r)},n},A=Array.prototype.indexOf,_=Array.prototype.push,C=(e,t)=>{const r=e.length,n=new Array(r);for(let o=0;o<r;o++){const r=e[o];n[o]=t(r,o)}return n},N=(e,t)=>{for(let r=0,n=e.length;r<n;r++)t(e[r],r)},D=(e,t,r)=>(N(e,((e,n)=>{r=t(r,e,n)})),r),M=e=>{const t=[];for(let r=0,n=e.length;r<n;++r){if(!a(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);_.apply(t,e[r])}return t},U=Object.keys,F=Object.hasOwnProperty,I=(e,t)=>{const r=U(e);for(let n=0,o=r.length;n<o;n++){const o=r[n];t(e[o],o)}},J=(e,t)=>q(e,((e,r)=>({k:r,v:t(e,r)}))),q=(e,t)=>{const r={};return I(e,((e,n)=>{const o=t(e,n);r[o.k]=o.v})),r},L=(e,t)=>{const r=[];return I(e,((e,n)=>{r.push(t(e,n))})),r},P=(e,t)=>V(e,t)?p.from(e[t]):p.none(),V=(e,t)=>F.call(e,t),B=e=>{if(!a(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],r={};return N(e,((n,o)=>{const s=U(n);if(1!==s.length)throw new Error("one and only one name per case");const c=s[0],u=n[c];if(void 0!==r[c])throw new Error("duplicate key detected:"+c);if("cata"===c)throw new Error("cannot have a case named cata (sorry)");if(!a(u))throw new Error("case arguments must be an array");t.push(c),r[c]=(...r)=>{const n=r.length;if(n!==u.length)throw new Error("Wrong number of arguments to case "+c+". Expected "+u.length+" ("+u+"), got "+n);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[o].apply(null,r)},match:e=>{const n=U(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(!((e,t)=>{for(let t=0,o=e.length;t<o;++t)if(!0!==(r=e[t],((e,t)=>((e,t)=>A.call(e,t))(e,t)>-1)(n,r)))return!1;var r;return!0})(t))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "));return e[c].apply(null,r)},log:e=>{console.log(e,{constructors:t,constructor:c,params:r})}}}})
|