// WoltLabCaret.js
$.Redactor.prototype.WoltLabCaret=function(){"use strict";return{init:function(){var e=this.caret.after;this.caret.after=function(t){t=this.caret.prepare(t),this.utils.isBlockTag(t.tagName)&&this.WoltLabCaret._addParagraphAfterBlock(t),e.call(this,t)}.bind(this),this.$editor[0].addEventListener(WCF_CLICK_EVENT,this.WoltLabCaret._handleEditorClick.bind(this)),this.WoltLabCaret._initInternalRange()},paragraphAfterBlock:function(e){var t=e.nextElementSibling;t&&"P"!==t.nodeName&&(t=elCreate("p"),t.textContent="",e.parentNode.insertBefore(t,e.nextSibling)),this.caret.after(e)},endOfEditor:function(){var e=this.core.editor()[0];document.activeElement!==e&&e.focus();var t=e.lastElementChild;"P"===t.nodeName?this.caret.end(t):this.caret.after(t)},_initInternalRange:function(){var e=this.core.editor()[0],t=null,n=window.getSelection(),i=function(){t=n.rangeCount?n.getRangeAt(0).cloneRange():null},r=function(){if(null!==t){if(document.activeElement===e){var i=n.getRangeAt(0);if(0!==i.startOffset)return;for(var r=i.startContainer;r;){if(r.parentNode===e){if(r.previousSibling)return;break}if(r.previousSibling)return;r=r.parentNode}if(!r)return}e.focus(),n.removeAllRanges(),n.addRange(t),t=null}};e.addEventListener("keyup",i),e.addEventListener("mouseup",function(){n.rangeCount&&i()});var a=this.selection.save;this.selection.save=function(){t=null,a.call(this)}.bind(this);var o=this.selection.restore;this.selection.restore=function(){t&&(r(),n.rangeCount&&this.utils.isRedactorParent(n.getRangeAt(0).commonAncestorContainer))||o.call(this)}.bind(this);var s=this.buffer.set;this.buffer.set=function(t){document.activeElement!==e&&r(),s.call(this,t),i()}.bind(this);var l=this.insert.html;this.insert.html=function(e,t){var n=elBySel(".redactor-selection-marker",this.$editor[0]);l.call(this,e,t),(n||null===elBySel(".redactor-selection-marker",this.$editor[0]))&&i()}.bind(this),require(["Environment"],function(t){"ios"===t.platform()&&(e.addEventListener("focus",function(){document.addEventListener("selectionchange",i)}),e.addEventListener("blur",function(){document.removeEventListener("selectionchange",i)}))}.bind(this))},_handleEditorClick:function(e){var t=this.selection.block();if(t===!1){if(this.selection.current()===this.$editor[0]){var n=this.$editor[0].childNodes[this.selection.get().anchorOffset];n.nodeType===Node.ELEMENT_NODE&&"TABLE"===n.nodeName&&(t=n)}if(t===!1)return}for(var i=e.target;i&&!this.utils.isBlockTag(i.nodeName);)i=i.parentNode;if(i&&i!==t&&("P"!==t.nodeName||(t=t.parentNode,t!==this.$editor[0]&&this.utils.isBlockTag(t.nodeName)))){if("TD"===t.nodeName)for(;"TABLE"!==t.nodeName;)t=t.parentNode;if(!t.nodeName.match(/^H\d$/)&&!$(t).closest("ol, ul",this.$editor[0]).length){for(var r,a,o=t;o;){if(a=o.getBoundingClientRect(),e.clientY<a.top)r=!0,t=o;else{if(!(e.clientY>a.bottom))break;r=!1,t=o}if(!o.parentNode||o.parentNode===this.$editor[0])break;o=o.parentNode}var s=t[(r?"previous":"next")+"ElementSibling"];if(s&&"P"===s.nodeName)return void this.caret.end(s);this.buffer.set();var l=elCreate("p");l.textContent="",t.parentNode.insertBefore(l,r?t:t.nextSibling),this.caret.end(l)}}},_addParagraphAfterBlock:function(e){var t=e.nextElementSibling;(!t||"P"!==t.nodeName&&!this.utils.isBlockTag(t.nodeName))&&(t=elCreate("p"),t.textContent="",e.parentNode.insertBefore(t,e.nextSibling))}}};
// WoltLabClean.js
-$.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){this.opts.pasteInlineTags=this.opts.pasteInlineTags.filter(function(n){return"span"!==n});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=elCreate("div"),i={};return-1!==n.indexOf("<pre")&&(e.innerHTML=n,elBySelAll("pre",e,function(n){var t=WCF.getUUID();i[t]=n.textContent,n.textContent=t}),n=e.innerHTML),n=n.replace(/<p>\u200B<\/p>/g,"<p><br></p>"),n=t.call(this,n),e.innerHTML=n,elBySelAll("span",e,function(n){n.outerHTML=n.innerHTML}),elBySelAll("pre",e,function(n){i.hasOwnProperty(n.textContent)&&(n.textContent=i[n.textContent])}),n=e.innerHTML}.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);var i=this.clean.stripTags;this.clean.stripTags=function(n,t){return Array.isArray(t)&&t.push("span"),i.call(this,n,t)}.bind(this)}}};
+$.Redactor.prototype.WoltLabClean=function(){"use strict";return{init:function(){this.opts.pasteInlineTags=this.opts.pasteInlineTags.filter(function(e){return"span"!==e});var e=this.clean.onSet;this.clean.onSet=function(t){return e.call(this,t.replace(/\u200B/g,""))}.bind(this);var t=this.clean.onSync;this.clean.onSync=function(e){var n=elCreate("div"),r={};return-1!==e.indexOf("<pre")&&(n.innerHTML=e,elBySelAll("pre",n,function(e){var t=WCF.getUUID();r[t]=e.textContent,e.textContent=t}),e=n.innerHTML),e=e.replace(/<p>\u200B<\/p>/g,"<p><br></p>"),e=t.call(this,e),n.innerHTML=e,elBySelAll("span",n,function(e){e.outerHTML=e.innerHTML}),elBySelAll("pre",n,function(e){r.hasOwnProperty(e.textContent)&&(e.textContent=r[e.textContent])}),e=n.innerHTML}.bind(this);var n=this.clean.savePreFormatting;this.clean.savePreFormatting=function(e){var t=this.clean.encodeEntities;return this.clean.encodeEntities=function(e){return WCF.String.escapeHTML(e)},e=n.call(this,e),this.clean.encodeEntities=t,e}.bind(this);var r=this.clean.stripTags;this.clean.stripTags=function(e,t){return Array.isArray(t)&&t.push("span"),r.call(this,e,t)}.bind(this);var i=this.clean.onPaste;this.clean.onPaste=function(e,t,n){var r=elCreate("div");r.innerHTML=e;for(var a,l,s,o=elBySelAll("[style]",r),c=0,h=o.length;h>c;c++){a=o[c],s=[];for(var u=0,p=a.style.length;p>u;u++)l=a.style[u],this.WoltLabClean._applyInlineStyle(a,l,a.style.getPropertyValue(l))&&s.push(l);s.forEach(function(e){a.style.removeProperty(e)})}return i.call(this,r.innerHTML,t,n)}.bind(this);var a=[],l=function(e,t){for(var n={},r=0,i=t.length;i>r;r++)n[t[r]]=elAttr(e,t[r]);a.push({element:e,attributes:n})},s=this.clean.convertTags;this.clean.convertTags=function(e,t){var n=elCreate("div");return n.innerHTML=e,a=[],WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","convertTags_"+this.$element[0].id,{addToStorage:l,div:n}),a.forEach(function(e,t){e.element.outerHTML="###custom"+t+"###"+e.element.innerHTML+"###/custom"+t+"###"}),s.call(this,n.innerHTML,t)}.bind(this);var o=this.clean.reconvertTags;this.clean.reconvertTags=function(e,t){if(a.length){e=e.replace(/###(\/?)custom(\d+)###/g,'<$1woltlab-custom-tag data-index="$2">');var n=elCreate("div");n.innerHTML=e,elBySelAll("woltlab-custom-tag",n,function(e){var t=~~elData(e,"index");if(a[t]){var n=a[t],r=elCreate(n.element.nodeName);for(var i in n.attributes)n.attributes.hasOwnProperty(i)&&elAttr(r,i,n.attributes[i]);for(e.parentNode.insertBefore(r,e);e.childNodes.length;)r.appendChild(e.childNodes[0])}elRemove(e)}),e=n.innerHTML}return o.call(this,e,t)}.bind(this)},_applyInlineStyle:function(e,t,n){var r="",i="";switch(t){case"font-weight":600==n&&null===e.closest("strong")&&(i="strong")}if(i){var a=elCreate(i);return r&&(a.className=r),e.parentNode.insertBefore(a,e),a.appendChild(e),!0}return!1}}};
// WoltLabCode.js
$.Redactor.prototype.WoltLabCode=function(){"use strict";return{init:function(){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),e={removeColor:{title:this.lang.get("remove-color"),func:this.WoltLabColor.removeColor.bind(this)}},r=0,i=t.length;i>r;r++)o=t[r],e["color_"+o]={title:"#"+o,func:F};var l=this.button.add("woltlabColor","");this.button.addDropdown(l,e),l.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_/,""),this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.format(this.$editor[0],"woltlab-color","woltlab-color-"+o),this.buffer.set()}.bind(this))},removeColor:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(o){this.buffer.set(),o.removeFormat(this.$editor[0],"woltlab-color"),this.buffer.set()}.bind(this))}}};
+$.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"],e=this.WoltLabColor.setColor.bind(this),r={removeColor:{title:this.lang.get("remove-color"),func:this.WoltLabColor.removeColor.bind(this)}},l=0,F=t.length;F>l;l++)o=t[l],r["color_"+o]={title:"#"+o,func:e};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"))}),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","convertTags_"+this.$element[0].id,function(o){elBySelAll("woltlab-color",o.div,function(e){e.className.match(/^woltlab-color-([0-9A-F]{6})$/)&&-1!==t.indexOf(RegExp.$1)&&o.addToStorage(e,["class"])})})},setColor:function(o){o=o.replace(/^color_/,""),this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.format(this.$editor[0],"woltlab-color","woltlab-color-"+o),this.buffer.set()}.bind(this))},removeColor:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(o){this.buffer.set(),o.removeFormat(this.$editor[0],"woltlab-color"),this.buffer.set()}.bind(this))}}};
// WoltLabDragAndDrop.js
$.Redactor.prototype.WoltLabDragAndDrop=function(){"use strict";return{init:function(){require(["WoltLabSuite/Core/Ui/Redactor/DragAndDrop"],function(t){t.init(this)}.bind(this))}}};
// WoltLabDropdown.js
// WoltLabEvent.js
$.Redactor.prototype.WoltLabEvent=function(){"use strict";var t=0;return{init:function(){this._callbacks=[],this._elementId=this.$element[0].id,elData(this.$editor[0],"element-id",this._elementId),require(["EventHandler"],function(t){this.WoltLabEvent._setEvents(t),t.add("com.woltlab.wcf.redactor2","destroy_"+this._elementId,function(){t.removeAllBySuffix("com.woltlab.wcf.redactor2",this._elementId)}.bind(this))}.bind(this)),this.$editor[0].addEventListener("focus",function(){t++,document.documentElement.classList.add("redactorActive")}),this.$editor[0].addEventListener("blur",function(){t--,window.setTimeout(function(){0===t&&document.documentElement.classList.remove("redactorActive")},100)})},_setEvents:function(t){var e=this.$element[0].id,i=this.observe.load;this.observe.load=function(){i.call(this),t.fire("com.woltlab.wcf.redactor2","observe_load_"+e,{editor:this.$editor[0]})}.bind(this),this.opts.callbacks.keyup=function(i){var n={cancel:!1,event:i};return t.fire("com.woltlab.wcf.redactor","keyup_"+e,n),n.cancel===!1},t.add("com.woltlab.wcf.redactor2","getText_"+e,function(t){t.message=this.code.get()}.bind(this)),t.add("com.woltlab.wcf.redactor2","reset_"+e,function(){this.code.set("")}.bind(this))},register:function(t,e){require(["EventHandler"],function(i){var n=this.uuid;-1===this._callbacks.indexOf(t)&&(this.opts.callbacks[t]=function(e){var c={cancel:!1,event:e,redactor:this};return i.fire("com.woltlab.wcf.redactor2",t+"_"+n+"_"+this.WoltLabEvent._elementId,c),c.cancel===!1}.bind(this),this._callbacks.push(t)),require(["EventHandler"],function(i){i.add("com.woltlab.wcf.redactor2",t+"_"+n+"_"+this.WoltLabEvent._elementId,e)}.bind(this))}.bind(this))}}};
// WoltLabFont.js
-$.Redactor.prototype.WoltLabFont=function(){"use strict";return{init:function(){var t=["arial","comicSansMs","courierNew","georgia","lucidaSansUnicode","tahoma","timesNewRoman","trebuchetMs","verdana"],o=["Arial","Comic Sans MS","Courier New","Georgia","Lucida Sans Unicode","Tahoma","Times New Roman","Trebuchet MS","Verdana"],e=this.WoltLabFont.setFont.bind(this),a={};t.forEach(function(t,n){a[t]={title:o[n],func:e}}),a.removeFont={title:this.lang.get("remove-font"),func:this.WoltLabFont.removeFont.bind(this)};var n=this.button.add("woltlabFont","");this.button.addDropdown(n,a),n.data("dropdown").find("a").each(function(t,o){o.className&&"redactor-dropdown-removeFont"!==o.className&&(o.parentNode.classList.add("woltlab-font-"+o.className.replace(/^redactor-dropdown-/,"")),o.parentNode.classList.add("woltlab-font-selection"))})},setFont:function(t){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(o){this.buffer.set(),o.format(this.$editor[0],"woltlab-font","woltlab-font-"+t),this.buffer.set()}.bind(this))},removeFont:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.removeFormat(this.$editor[0],"woltlab-font"),this.buffer.set()}.bind(this))}}};
+$.Redactor.prototype.WoltLabFont=function(){"use strict";return{init:function(){var t=["arial","comicSansMs","courierNew","georgia","lucidaSansUnicode","tahoma","timesNewRoman","trebuchetMs","verdana"],o=["Arial","Comic Sans MS","Courier New","Georgia","Lucida Sans Unicode","Tahoma","Times New Roman","Trebuchet MS","Verdana"],e=this.WoltLabFont.setFont.bind(this),a={};t.forEach(function(t,n){a[t]={title:o[n],func:e}}),a.removeFont={title:this.lang.get("remove-font"),func:this.WoltLabFont.removeFont.bind(this)};var n=this.button.add("woltlabFont","");this.button.addDropdown(n,a),n.data("dropdown").find("a").each(function(t,o){o.className&&"redactor-dropdown-removeFont"!==o.className&&(o.parentNode.classList.add("woltlab-font-"+o.className.replace(/^redactor-dropdown-/,"")),o.parentNode.classList.add("woltlab-font-selection"))}),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","convertTags_"+this.$element[0].id,function(o){elBySelAll("woltlab-font",o.div,function(e){e.className.match(/^woltlab-font-([a-zA-Z]+)$/)&&-1!==t.indexOf(RegExp.$1)&&o.addToStorage(e,["class"])})})},setFont:function(t){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(o){this.buffer.set(),o.format(this.$editor[0],"woltlab-font","woltlab-font-"+t),this.buffer.set()}.bind(this))},removeFont:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.removeFormat(this.$editor[0],"woltlab-font"),this.buffer.set()}.bind(this))}}};
// WoltLabImage.js
$.Redactor.prototype.WoltLabImage=function(){"use strict";return{init:function(){var t=this.button.add("woltlabImage","");this.button.addCallback(t,this.WoltLabImage.add);var e=this.image.showEdit;this.image.showEdit=function(t){var a=t[0];if(!a.classList.contains("smiley")){e(t),this.modal.setTitle(WCF.Language.get("wcf.editor.image.edit")),this.modal.getActionButton().text(WCF.Language.get("wcf.global.button.save")),this.modal.getDeleteButton().text(WCF.Language.get("wcf.global.button.delete")),elById("redactor-image-source").value=a.src;var i=elById("redactor-image-float");a.classList.contains("messageFloatObjectLeft")?i.value="left":a.classList.contains("messageFloatObjectRight")&&(i.value="right"),a.classList.contains("woltlabAttachment")&&elRemove(elById("redactor-image-source-container"))}}.bind(this);var a=this.image.update;this.image.update=function(){var t=this.observe.image[0],e=elById("redactor-image-source"),i=function(t,e){$('<small class="innerError" />').text(e).insertAfter(t)};if(!t.classList.contains("woltlabAttachment")){var o=e.value.trim();if(""===o)return i(e,WCF.Language.get("wcf.global.form.error.empty"));if(!o.match(this.opts.regexps.url))return i(e,WCF.Language.get("wcf.editor.image.source.error.invalid"));t.src=o}t.classList.remove("messageFloatObjectLeft"),t.classList.remove("messageFloatObjectRight");var r=elById("redactor-image-float").value;("left"===r||"right"===r)&&t.classList.add("messageFloatObject"+WCF.String.ucfirst(r)),a(),t.removeAttribute("alt"),t.removeAttribute("title")}.bind(this),this.opts.modal["image-edit"]='<div class="section"><dl id="redactor-image-source-container"><dt><label for="redactor-image-source">'+WCF.Language.get("wcf.editor.image.source")+'</label></dt><dd><input type="text" id="redactor-image-source" class="long"></dd></dl><dl><dt><label for="redactor-image-link">'+WCF.Language.get("wcf.editor.image.link")+'</label></dt><dd><input type="text" id="redactor-image-link" class="long"></dd></dl><dl><dt><label for="redactor-image-float">'+WCF.Language.get("wcf.editor.image.float")+'</label></dt><dd><select id="redactor-image-float"><option value="none">'+WCF.Language.get("wcf.global.noSelection")+'</option><option value="left">'+WCF.Language.get("wcf.editor.image.float.left")+'</option><option value="right">'+WCF.Language.get("wcf.editor.image.float.right")+'</option></select></dd></dl><input id="redactor-image-title" style="display: none"><input id="redactor-image-caption" style="display: none"><div class="formSubmit"><button id="redactor-modal-button-action" class="buttonPrimary">Insert</button><button id="redactor-modal-button-delete" class="redactor-modal-button-offset">Delete</button></div></div>'},add:function(){this.modal.load("image-edit",WCF.Language.get("wcf.editor.image.insert")),this.modal.show(),this.modal.getDeleteButton().hide();var t=this.modal.getActionButton()[0];t.addEventListener(WCF_CLICK_EVENT,this.WoltLabImage.insert),t.textContent=WCF.Language.get("wcf.global.button.insert"),this.WoltLabModal.rebuild()},insert:function(t){t.preventDefault(),this.modal.getModal().find(".innerError").remove();var e=elById("redactor-image-source"),a=function(t,e){$('<small class="innerError" />').text(e).insertAfter(t)},i=e.value.trim();if(""===i)return a(e,WCF.Language.get("wcf.global.form.error.empty"));if(!i.match(this.opts.regexps.url))return a(e,WCF.Language.get("wcf.editor.image.source.error.invalid"));var o=elById("redactor-image-link"),r=o.value.trim();if(""!==r&&!r.match(this.opts.regexps.url))return a(o,WCF.Language.get("wcf.editor.image.link.error.invalid"));var l=elById("redactor-image-float").value,s="";("left"===l||"right"===l)&&(s="messageFloatObject"+WCF.String.ucfirst(l));var n='<img src="'+WCF.String.escapeHTML(i)+'"'+(s?' class="'+s+'"':"")+">";r&&(n='<a href="'+WCF.String.escapeHTML(r)+'">'+n+"</a>"),this.modal.close(),this.buffer.set(),this.insert.html(n)}}};
// WoltLabInlineCode.js
// WoltLabReply.js
$.Redactor.prototype.WoltLabReply=function(){"use strict";var t=null,e=null,s=null;return{init:function(){var i=this.$editor[0].closest(".messageContent"),o=elById("messageQuickReply");i&&i.classList.contains("messageQuickReplyContent")&&o&&o.classList.contains("messageQuickReplyCollapsed")&&(t=this.WoltLabReply._click.bind(this),e=i,s=o,WCF.System.Event.addListener("com.woltlab.wcf.redactor2","showEditor",this.WoltLabReply.showEditor.bind(this)),e.addEventListener(WCF_CLICK_EVENT,t))},showEditor:function(){return s?void(s.classList.contains("messageQuickReplyCollapsed")&&(s.classList.remove("messageQuickReplyCollapsed"),e.removeEventListener(WCF_CLICK_EVENT,t),this.WoltLabCaret.endOfEditor())):void this.WoltLabCaret.endOfEditor()},_click:function(t){t.preventDefault(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","showEditor")}}};
// WoltLabSize.js
-$.Redactor.prototype.WoltLabSize=function(){"use strict";return{init:function(){for(var t,e=[8,10,12,14,18,24,36],i=this.WoltLabSize.setSize.bind(this),o={},s=0,a=e.length;a>s;s++)t=e[s],o["size_"+t]={title:t,func:i};o.removeSize={title:this.lang.get("remove-size"),func:this.WoltLabSize.removeSize.bind(this)};var r=this.button.add("woltlabSize","");this.button.addDropdown(r,o),r.data("dropdown").find("a").each(function(t,e){e.className.match(/redactor-dropdown-size_(\d{1,2})/)&&(e.parentNode.classList.add("woltlab-size-"+RegExp.$1),e.parentNode.classList.add("woltlab-size-selection"))})},setSize:function(t){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(e){this.buffer.set(),e.format(this.$editor[0],"woltlab-size","woltlab-size-"+t.replace(/^size_/,"")),this.buffer.set()}.bind(this))},removeSize:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.removeFormat(this.$editor[0],"woltlab-size"),this.buffer.set()}.bind(this))}}};
+$.Redactor.prototype.WoltLabSize=function(){"use strict";return{init:function(){for(var e,t=[8,10,12,14,18,24,36],i=this.WoltLabSize.setSize.bind(this),o={},s=0,a=t.length;a>s;s++)e=t[s],o["size_"+e]={title:e,func:i};o.removeSize={title:this.lang.get("remove-size"),func:this.WoltLabSize.removeSize.bind(this)};var n=this.button.add("woltlabSize","");this.button.addDropdown(n,o),n.data("dropdown").find("a").each(function(e,t){t.className.match(/redactor-dropdown-size_(\d{1,2})/)&&(t.parentNode.classList.add("woltlab-size-"+RegExp.$1),t.parentNode.classList.add("woltlab-size-selection"))}),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","convertTags_"+this.$element[0].id,function(e){elBySelAll("woltlab-size",e.div,function(i){i.className.match(/^woltlab-size-(\d{1,2})$/)&&-1!==t.indexOf(~~RegExp.$1)&&e.addToStorage(i,["class"])})})},setSize:function(e){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(t){this.buffer.set(),t.format(this.$editor[0],"woltlab-size","woltlab-size-"+e.replace(/^size_/,"")),this.buffer.set()}.bind(this))},removeSize:function(){this.selection.save(),require(["WoltLabSuite/Core/Ui/Redactor/Format"],function(e){this.buffer.set(),e.removeFormat(this.$editor[0],"woltlab-size"),this.buffer.set()}.bind(this))}}};
// WoltLabSmiley.js
$.Redactor.prototype.WoltLabSmiley=function(){"use strict";return{init:function(){require(["EventHandler"],function(t){t.add("com.woltlab.wcf.redactor2","insertSmiley_"+this.$element[0].id,this.WoltLabSmiley._insert.bind(this))}.bind(this))},_insert:function(t){this.buffer.set(),this.insert.html(t.img.cloneNode().outerHTML)}}};
// WoltLabSource.js