gripuqam.org/wp-content/plugins/tinymce-advanced/block-editor/richtext-buttons.js

1 line
12 KiB
JavaScript
Raw Normal View History

2025-03-31 12:02:18 -04:00
!function(t){var e={};function o(r){if(e[r])return e[r].exports;var n=e[r]={i:r,l:!1,exports:{}};return t[r].call(n.exports,n,n.exports,o),n.l=!0,n.exports}o.m=t,o.c=e,o.d=function(t,e,r){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(o.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)o.d(r,n,function(e){return t[e]}.bind(null,n));return r},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,o){"use strict";o.r(e);const r=window.tadvBlockButtons,{wp:n}=window,{get:c}=window.lodash,{createElement:a}=n.element,{InspectorControls:l,PanelColorSettings:i}=n.blockEditor,{registerFormatType:s,applyFormat:u,removeFormat:d,getActiveFormat:m}=n.richText;function p(t){return(t=t.replace(/.*?(background-)?color:\s*/,"")).replace(/[; ]+$/,"")}const h=window.tadvBlockButtons||{},{wp:v}=window,{RichTextToolbarButton:g}=v.blockEditor,{registerFormatType:f,removeFormat:b}=v.richText,{createElement:y}=v.element,{ToolbarButton:k}=v.components,w=h.strRemoveFormatting||"Clear formatting";let F;function T(t){const e=[];return F||(F=h.formats_to_remove?h.formats_to_remove.split(","):["core/bold","core/italic","core/code","core/underline","core/strikethrough","core/text-color","tadv/sup","tadv/sub","tadv/mark","tadv/color-panel","tadv/background-color-panel"]),t.forEach(t=>{t&&t.forEach(t=>{F.indexOf(t.type)>-1&&-1===e.indexOf(t.type)&&e.push(t.type)})}),e}function C(t){let e=t.formats;if(!e.length)return t;let o=0,r=e.length;t.end>t.start&&(o=t.start,r=t.end,e=e.slice(o,r));const n=T(e);return n.length?(n.forEach(e=>{t=b(t,e,o,r)}),t):t}const{wp:x}=window,{createElement:B,Fragment:A}=(window.tadvBlockButtons,x.element),{__:N}=x.i18n,{ToolbarButton:E}=x.components,{RichTextToolbarButton:S,RichTextShortcut:_}=x.blockEditor,{registerFormatType:O,getActiveFormat:P,toggleFormat:R,applyFormat:L,removeFormat:M}=x.richText,U=N("Strikethrough");function j(t,e,o){e(R(t,{type:"core/strikethrough"})),o&&o()}const{wp:z}=window,{createElement:I,Fragment:G}=z.element,{__:H}=z.i18n,{ToolbarButton:V}=z.components,{RichTextToolbarButton:$,RichTextShortcut:q}=z.blockEditor,{registerFormatType:D,getActiveFormat:J,toggleFormat:K,remove:Q,applyFormat:W}=z.richText,X=H("Inline Code");function Y(t,e,o){e(K(t,{type:"core/code"})),o&&o()}const{wp:Z}=window,tt=window.tadvBlockButtons||{},{createElement:et,Fragment:ot}=Z.element,{__:rt}=Z.i18n,{ToolbarButton:nt}=Z.components,{RichTextToolbarButton:ct,RichTextShortcut:at}=Z.blockEditor,{Path:lt,SVG:it}=Z.components,{registerFormatType:st,getActiveFormat:ut,toggleFormat:dt,applyFormat:mt,removeFormat:pt}=Z.richText,ht=et(it,{viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",className:"dashicon tadv-mark-icon"},et(lt,{"aria-hidden":"true",role:"img",focusable:"false",width:"20",height:"20",d:"M13.23 15h1.9L11 4H9L5 15h1.88l1.07-3h4.18zm-1.53-4.54H8.51L10 5.6z"})),vt=tt.strMark;function gt(t,e,o){e(dt(t,{type:"tadv/mark"})),o&&o()}const{wp:ft}=window,bt=window.tadvBlockButtons||{},{createElement:yt,Fragment:kt}=ft.element,{__:wt}=ft.i18n,{ToolbarButton:Ft}=ft.components,{RichTextToolbarButton:Tt,RichTextShortcut:Ct}=ft.blockEditor,{registerFormatType:xt,getActiveFormat:Bt,applyFormat:At,removeFormat:Nt}=ft.richText;function Et(t,e,o,r){if(t)o(Nt(e,"core/underline"));else{o(At(e,{type:"core/underline",attributes:{style:"text-decoration: underline"}}))}r&&r()}const{wp:St}=window,_t=window.tadvBlockButtons,{createElement:Ot,Fragment:Pt}=St.element,{registerFormatType:Rt,getActiveFormat:Lt,toggleFormat:Mt}=St.richText,{ToolbarButton:Ut}=St.components,{RichTextToolbarButton:jt,RichTextShortcut:zt}=St.blo