$.Redactor.prototype.WoltLabButton=function(){"use strict";return{init:function(){var t,o,s,e;for(s=0,e=this.opts.woltlab.customButtons.length;e>s;s++)o=this.opts.woltlab.customButtons[s],t=this.button.add(o,""),this.button.addCallback(t,this.WoltLabButton._handleCustomButton);var n;for(s=0,e=this.opts.buttons.length;e>s;s++)if(o=this.opts.buttons[s],"wcfSeparator"!==o){if(!this.opts.woltlab.buttons.hasOwnProperty(o))throw new Error("Missing button definition for '"+o+"'.");if(n=this.opts.woltlab.buttons[o],"subscript"===o||"superscript"===o?(t=this.button.addAfter(this.opts.buttons[s-1],o,""),this.button.setEvent(t,o,{func:"inline.format"})):t=this.button.get(o),this.button.setIcon(t,'<span class="icon icon16 '+n.icon+'"></span>'),!t[0])throw new Error("Missing button element for '"+o+"'.");elAttr(t[0],"title",n.title),t[0].classList.add("jsTooltip")}for(var i,r={},l=[],a=this.core.toolbar()[0];a.childElementCount;)i=a.removeChild(a.children[0]),o=elAttr(i.children[0],"rel"),r[o]=i,l.push(o);var h=!1;for(s=0,e=this.opts.buttons.length;e>s;s++)o=this.opts.buttons[s],"wcfSeparator"!==o?(i=r[o],a.appendChild(i),l.splice(l.indexOf(o),1),h&&(i.classList.add("redactor-toolbar-separator"),h=!1)):h=!0;for(s=0,e=a.childElementCount;e>s;s++)i=a.children[s],t=i.children[0],elData(i,"show-on-mobile",-1!==this.opts.woltlab.buttonMobile.indexOf(t.rel));l.forEach(function(t){a.appendChild(r[t])}),WCF.DOMNodeInsertedHandler.execute()},_handleCustomButton:function(t){var o={cancel:!1};if(WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","bbcode_"+t+"_"+this.$element[0].id,o),o.cancel!==!0){this.buffer.set();var s="["+t+"]"+this.selection.html()+(this.selection.is()?"":this.marker.html())+"[/"+t+"]";this.insert.html(s),this.selection.restore()}}}};
// WoltLabCaret.js
$.Redactor.prototype.WoltLabCaret=function(){"use strict";return{init:function(){var t=this.caret.after;this.caret.after=function(e){e=this.caret.prepare(e),this.utils.isBlockTag(e.tagName)&&this.WoltLabCaret._addParagraphAfterBlock(e),t.call(this,e)}.bind(this),this.$editor[0].addEventListener("mouseup",this.WoltLabCaret._handleEditorClick.bind(this))},_handleEditorClick:function(t){if(t.target===this.$editor[0]&&this.selection.get().isCollapsed){var e=this.selection.block();if(e!==!1&&("P"!==e.nodeName||(e=e.parentNode,e!==this.$editor[0]&&this.utils.isBlockTag(e.nodeName)))){if("TD"===e.nodeName)for(;"TABLE"!==e.nodeName;)e=e.parentNode;this.buffer.set();var i=t.clientY<e.getBoundingClientRect().top,a=elCreate("p");a.textContent="",e.parentNode.insertBefore(a,i?e:e.nextSibling),this.caret.end(a)}}},_addParagraphAfterBlock:function(t){var e=t.nextElementSibling;(!e||"P"!==e.nodeName&&!this.utils.isBlockTag(e.nodeName))&&(e=elCreate("p"),e.textContent="",t.parentNode.insertBefore(e,t.nextSibling))}}};
+// WoltLabClean.js
+$.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){var n=this.clean.onSet;this.clean.onSet=function(t){return n.call(this,t.replace(/\u200B/g,""))}.bind(this);var t=this.clean.onSync;this.clean.onSync=function(n){var e,i={};return-1!==n.indexOf("<pre")&&(e=elCreate("div"),e.innerHTML=n,elBySelAll("pre",e,function(n){var t=WCF.getUUID();i[t]=n.textContent,n.textContent=t}),n=e.innerHTML),n=t.call(this,n),e&&(e.innerHTML=n,elBySelAll("pre",e,function(n){n.textContent=i[n.textContent]}),n=e.innerHTML),n}.bind(this);var e=this.clean.savePreFormatting;this.clean.savePreFormatting=function(n){var t=this.clean.encodeEntities;return this.clean.encodeEntities=function(n){return WCF.String.escapeHTML(n)},n=e.call(this,n),this.clean.encodeEntities=t,n}.bind(this)}}};
// WoltLabCode.js
-$.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/Code"],function(t){new t(this)}.bind(this))}}};
+$.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){this.source.setCaretOnShow=function(){},this.source.setCaretOnHide=function(t){return t},require(["WoltLabSuite/Core/Ui/Redactor/Code"],function(t){new t(this)}.bind(this))}}};
// WoltLabColor.js
$.Redactor.prototype.WoltLabColor=function(){"use strict";return{init:function(){for(var o,t=["000000","800000","8B4513","2F4F4F","008080","000080","4B0082","696969","B22222","A52A2A","DAA520","006400","40E0D0","0000CD","800080","808080","FF0000","FF8C00","FFD700","008000","00FFFF","0000FF","EE82EE","A9A9A9","FFA07A","FFA500","FFFF00","00FF00","AFEEEE","ADD8E6","DDA0DD","D3D3D3","FFF0F5","FAEBD7","FFFFE0","F0FFF0","F0FFFF","F0F8FF","E6E6FA","FFFFFF"],F=this.WoltLabColor.setColor.bind(this),r={removeColor:{title:this.lang.get("remove-color"),func:this.WoltLabColor.removeColor.bind(this)}},e=0,l=t.length;l>e;e++)o=t[e],r["color_"+o]={title:"#"+o,func:F};var i=this.button.add("woltlabColor","");this.button.addDropdown(i,r),i.data("dropdown").find("a").each(function(o,t){t.className.match(/redactor-dropdown-color_([A-F0-9]{6})/)&&(t.parentNode.classList.add("woltlab-color-"+RegExp.$1),t.parentNode.classList.add("woltlab-color-selection"))})},setColor:function(o){o=o.replace(/^color_/,""),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.format(this.$editor[0],"woltlab-color","woltlab-color-"+o)}.bind(this))},removeColor:function(){require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(o){this.buffer.set(),o.removeFormat(this.$editor[0],"woltlab-color")}.bind(this))}}};
// WoltLabDropdown.js
// WoltLabPage.js
$.Redactor.prototype.WoltLabPage=function(){"use strict";return{init:function(){var t=this.button.add("woltlabPage","");require(["WoltLabSuite/Core/Ui/Redactor/Page"],function(e){new e(this,t[0])}.bind(this))}}};
// WoltLabPaste.js
-$.Redactor.prototype.WoltLabPaste=function(){"use strict";return{init:function(){var t=null,i=this.paste.init;this.paste.init=function(a){t=a.originalEvent.clipboardData.getData("text/plain"),i.call(this,a)}.bind(this);var a=this.paste.getPasteBoxCode;this.paste.getPasteBoxCode=function(i){var e=a.call(this,i);return i&&!e?t:e}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this))}}};
+$.Redactor.prototype.WoltLabPaste=function(){"use strict";return{init:function(){var t=null,i=this.paste.init;this.paste.init=function(e){var n="pre"===this.opts.type||this.utils.isCurrentOrParent("pre")?!0:!1;if(n){t=e.originalEvent.clipboardData.getData("text/plain");var s=this.clean.encodeEntities;this.clean.encodeEntities=function(t){return this.clean.encodeEntities=s,WCF.String.escapeHTML(t)}.bind(this)}i.call(this,e)}.bind(this);var e=this.paste.getPasteBoxCode;this.paste.getPasteBoxCode=function(i){var n=e.call(this,i);return i&&!n?t:n}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this))}}};
// WoltLabQuote.js
$.Redactor.prototype.WoltLabQuote=function(){"use strict";return{init:function(){var t=this.button.add("woltlabQuote","");this.WoltLabBlock.register("woltlab-quote",!0),this.opts.replaceTags.blockquote="woltlab-quote",this.opts.activeButtonsStates["woltlab-quote"]="woltlabQuote",require(["WoltLabSuite/Core/Ui/Redactor/Quote"],function(o){new o(this,t)}.bind(this))}}};
// WoltLabSize.js