fuck-tiny-cloud/plugins/a11ychecker/plugin.min.js

10 lines
36 KiB
JavaScript
Raw Normal View History

2023-11-01 22:54:59 -04:00
/* !
* Tiny Accessibility 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.2.1-70
*/
!function(){"use strict";const e=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(r=o=e,(a=String).prototype.isPrototypeOf(r)||(null===(n=o.constructor)||void 0===n?void 0:n.name)===a.name)?"string":t;var r,o,a,n})(t)===e,r=e=>t=>typeof t===e,o=t("string"),a=t("object"),n=t("array"),i=r("boolean"),s=(void 0,e=>undefined===e);const l=e=>!(e=>null==e)(e),c=r("function"),u=r("number"),d=()=>{},p=e=>()=>e,h=e=>e,m=(e,t)=>e===t,y=e=>e(),g=p(!1),v=p(!0);class w{constructor(e,t){this.tag=e,this.value=t}static some(e){return new w(!0,e)}static none(){return w.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?w.some(e(this.value)):w.none()}bind(e){return this.tag?e(this.value):w.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:w.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)?w.some(e):w.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()"}}w.singletonNone=new w(!1);const b=e=>parseInt(e,10),f=(e,t)=>{const r=e-t;return 0===r?0:r>0?1:-1},k=(e,t,r)=>({major:e,minor:t,patch:r}),x=e=>{const t=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(e);return t?k(b(t[1]),b(t[2]),b(t[3])):k(0,0,0)},A=Array.prototype.slice,C=Array.prototype.indexOf,T=Array.prototype.push,D=(e,t)=>((e,t)=>C.call(e,t))(e,t)>-1,I=(e,t)=>{for(let r=0,o=e.length;r<o;r++)if(t(e[r],r))return!0;return!1},_=(e,t)=>{const r=e.length,o=new Array(r);for(let a=0;a<r;a++){const r=e[a];o[a]=t(r,a)}return o},N=(e,t)=>{for(let r=0,o=e.length;r<o;r++)t(e[r],r)},S=(e,t)=>{const r=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];t(a,o)&&r.push(a)}return r},M=(e,t,r)=>(N(e,((e,o)=>{r=t(r,e,o)})),r),O=(e,t,r)=>{for(let o=0,a=e.length;o<a;o++){const a=e[o];if(t(a,o))return w.some(a);if(r(a,o))break}return w.none()},E=(e,t)=>O(e,t,g),R=(e,t)=>(e=>{const t=[];for(let r=0,o=e.length;r<o;++r){if(!n(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);T.apply(t,e[r])}return t})(_(e,t)),W=e=>{const t=A.call(e,0);return t.reverse(),t},H=p("html4"),q=p("html5"),$=p("a"),G=p("aa"),P=p("aaa"),L=e=>t=>t.options.get(e),j=L("a11ychecker_css_url"),B=L("a11ychecker_level"),V=L("a11ychecker_html_version"),F=L("a11ychecker_issue_url_callback"),z=L("a11ychecker_filter_issue"),U=e=>{var t;return null!==(t=e.options.get("a11ychecker_allow_decorative_images"))&&void 0!==t?t:e.options.get("a11y_advanced_options")},K=tinymce.util.I18n,J={"a11y.d1.description":"This paragraph looks like a heading. If it is a heading, please select a heading level.","a11y.d1.repair.block.h1":"Heading 1","a11y.d1.repair.block.h2":"Heading 2","a11y.d1.repair.block.h3":"Heading 3","a11y.d1.repair.block.h4":"Heading 4","a11y.d1.repair.block.h5":"Heading 5","a11y.d1.repair.block.h6":"Heading 6","a11y.d1.repair.info":"Select a heading level:","a11y.d2.description":"Headings must be applied in sequential order. For example: Heading 1 should be followed by Heading 2, not Heading 3.","a11y.d3.description":"Adjacent links with the same URL should be merged into one link","a11y.d4.description":"The selected text appears to be a list. Lists should be formatted using a list tag.","a11y.d5a.description":"Large text must have a contrast ratio of at least 3:1","a11y.d5b.description":"Text must have a contrast ratio of at least 4.5:1","a11y.d5c.description":"Text must have a contrast ratio of at least 7:1","a11y.h93.description":"ID attribute must be unique","a11y.h93.repair.info":"Make ID unique","a11y.h93.repair.deduplicate.others":"Keep this ID and remove all others"