!function(t){const e=t.en=t.en||{};e.dictionary=Object.assign(e.dictionary||{},{"Remove Format":"Remove Format"})}(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})),
/*!
 * @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
 * For licensing, see LICENSE.md.
 */(()=>{var t={237:t=>{"use strict";t.exports=CKEditor5.dll},311:(t,e,o)=>{t.exports=o(237)("./src/ui.js")},355:(t,e,o)=>{t.exports=o(237)("./src/icons.js")},584:(t,e,o)=>{t.exports=o(237)("./src/utils.js")},782:(t,e,o)=>{t.exports=o(237)("./src/core.js")}},e={};function o(i){var r=e[i];if(void 0!==r)return r.exports;var s=e[i]={exports:{}};return t[i](s,s.exports,o),s.exports}o.d=(t,e)=>{for(var i in e)o.o(e,i)&&!o.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{"use strict";o.r(i),o.d(i,{RemoveFormat:()=>u,RemoveFormatCommand:()=>c,RemoveFormatEditing:()=>m,RemoveFormatUI:()=>n});var t=o(782),e=o(355),r=o(311);const s="removeFormat";class n extends t.Plugin{static get pluginName(){return"RemoveFormatUI"}static get isOfficialPlugin(){return!0}init(){const t=this.editor;t.ui.componentFactory.add(s,()=>{const t=this._createButton(r.ButtonView);return t.set({tooltip:!0}),t}),t.ui.componentFactory.add(`menuBar:${s}`,()=>this._createButton(r.MenuBarMenuListItemButtonView))}_createButton(t){const o=this.editor,i=o.locale,r=o.commands.get(s),n=new t(o.locale),a=i.t;return n.set({label:a("Remove Format"),icon:e.IconRemoveFormat}),n.bind("isEnabled").to(r,"isEnabled"),this.listenTo(n,"execute",()=>{o.execute(s),o.editing.view.focus()}),n}}var a=o(584);class c extends t.Command{_customAttributesHandlers=[];refresh(){const t=this.editor.model;this.isEnabled=!!(0,a.first)(this._getFormattingItems(t.document.selection))}execute(){const t=this.editor.model;t.change(e=>{for(const o of this._getFormattingItems(t.document.selection))if(o.is("selection"))for(const t of this._getFormattingAttributes(o))e.removeSelectionAttribute(t);else{const t=e.createRangeOn(o);for(const i of this._getFormattingAttributes(o))this._removeFormatting(i,o,t,e)}})}registerCustomAttribute(t,e){this._customAttributesHandlers.push({isFormatting:t,removeFormatting:e})}_removeFormatting(t,e,o,i){let r=!1;for(const{isFormatting:s,removeFormatting:n}of this._customAttributesHandlers)s(t,e)&&(n(t,o,i),r=!0);r||i.removeAttribute(t,o)}*_getFormattingItems(t){const e=this.editor.model,o=e.schema,i=t=>!!(0,a.first)(this._getFormattingAttributes(t));for(const r of t.getRanges())for(const t of r.getItems())o.isBlock(t)&&r.end.isTouching(e.createPositionAt(t,0))||i(t)&&(yield t);for(const e of t.getSelectedBlocks())i(e)&&(yield e);i(t)&&(yield t)}*_getFormattingAttributes(t){const e=this.editor.model.schema;for(const[o]of t.getAttributes()){for(const{isFormatting:e}of this._customAttributesHandlers)e(o,t)&&(yield o);const i=e.getAttributeProperties(o);i&&i.isFormatting&&(yield o)}}}class m extends t.Plugin{static get pluginName(){return"RemoveFormatEditing"}static get licenseFeatureCode(){return"RF"}static get isOfficialPlugin(){return!0}static get isPremiumPlugin(){return!0}init(){const t=this.editor;t.commands.add("removeFormat",new c(t))}}class u extends t.Plugin{static get requires(){return[m,n]}static get pluginName(){return"RemoveFormat"}static get isOfficialPlugin(){return!0}}})(),(window.CKEditor5=window.CKEditor5||{}).removeFormat=i})();