// 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=document.documentMode&&"object"==typeof window.clipboardData,e=this.paste.init;this.paste.init=function(a){var r="pre"===this.opts.type||this.utils.isCurrentOrParent("pre")?!0:!1;if(r){t=i?window.clipboardData.getData("Text"):a.originalEvent.clipboardData.getData("text/plain");var n=this.clean.encodeEntities;this.clean.encodeEntities=function(t){return this.clean.encodeEntities=n,WCF.String.escapeHTML(t)}.bind(this)}e.call(this,a)}.bind(this);var a=this.paste.getPasteBoxCode;this.paste.getPasteBoxCode=function(e){var r=a.call(this,e);return!e||r&&!i?r:t}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this)),this.paste.detectClipboardUpload=function(t){t=t.originalEvent||t;var e;if(i){if(!window.clipboardData.files.length)return!1;e=window.clipboardData.files.item(0)}else{if(this.detect.isFirefox())return!1;var a=t.clipboardData,r=a.types;if(Array.isArray(r)&&-1!==r.indexOf("public.tiff"))return t.preventDefault(),!1;if(!a.items||!a.items.length)return;var n=!1;if(e=a.items[0].getAsFile(),null===e&&(this.detect.isWebkit()&&a.items.length>1&&(e=a.items[1].getAsFile(),n=!0),null===e))return!1}var s=new FileReader;return s.readAsDataURL(e),s.onload=this.paste.insertFromClipboard.bind(this),n===!1}.bind(this),this.paste.insertFromClipboard=function(t){window.FormData&&(this.buffer.set(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.target.result)}))}.bind(this);var r="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",n=this.paste.insert;this.paste.insert=function(t,i){var e=[];if(!i.pre&&!i.text){var a=elCreate("div");a.innerHTML=t,elBySelAll("img",a,function(t){var i=t.src;if(0===i.indexOf("data:image")&&i!==r){t.src=r;var a=WCF.getUUID();elData(t,"uuid",a),e.push({src:i,uuid:a}),elHide(t)}}.bind(this)),t=a.innerHTML}n.call(this,t,i),e.length&&window.setTimeout(function(){for(var t,i,a=0,r=e.length;r>a;a++)t=e[a],i=elBySel('img[data-uuid="'+t.uuid+'"]',this.$editor[0]),i&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.src),replace:i})}.bind(this),50)}.bind(this),this.paste.clipboardUpload=function(){}}}};
+$.Redactor.prototype.WoltLabPaste=function(){"use strict";return{init:function(){var t=null,e=document.documentMode&&"object"==typeof window.clipboardData,i=this.paste.init;this.paste.init=function(a){var r="pre"===this.opts.type||this.utils.isCurrentOrParent("pre")?!0:!1;if(r){t=e?window.clipboardData.getData("Text"):a.originalEvent.clipboardData.getData("text/plain");var n=this.clean.encodeEntities;this.clean.encodeEntities=function(t){return this.clean.encodeEntities=n,WCF.String.escapeHTML(t)}.bind(this)}i.call(this,a)}.bind(this);var a=this.paste.getPasteBoxCode;this.paste.getPasteBoxCode=function(i){var r=a.call(this,i);return!i||r&&!e?r:t}.bind(this),this.core.editor().off("paste.redactor").on("paste.redactor",this.paste.init.bind(this)),this.paste.detectClipboardUpload=function(t){t=t.originalEvent||t;var i;if(e){if(!window.clipboardData.files.length)return!1;i=window.clipboardData.files.item(0)}else{if(this.detect.isFirefox())return!1;var a=t.clipboardData,r=a.types;if(Array.isArray(r)&&-1!==r.indexOf("public.tiff"))return t.preventDefault(),!1;if(!a.items||!a.items.length)return;var n=!1;if(i=a.items[0].getAsFile(),null===i&&(this.detect.isWebkit()&&a.items.length>1&&(i=a.items[1].getAsFile(),n=!0),null===i))return!1}var s=new FileReader;return s.readAsDataURL(i),s.onload=this.paste.insertFromClipboard.bind(this),n===!1}.bind(this),this.paste.insertFromClipboard=function(t){window.FormData&&(this.buffer.set(),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.target.result)}))}.bind(this);var r="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",n=this.paste.insert;this.paste.insert=function(t,e){var i=elCreate("div");i.innerHTML=t;var a=[];e.pre||e.text||elBySelAll("img",i,function(t){var e=t.src;if(0===e.indexOf("data:image")&&e!==r){t.src=r;var i=WCF.getUUID();elData(t,"uuid",i),a.push({src:e,uuid:i}),elHide(t)}}.bind(this)),elBySelAll(".redactor-selection-marker",i,elRemove),i.appendChild(elCreate("woltlab-selection-marker")),n.call(this,i.innerHTML,e);var s=elBySel("woltlab-selection-marker",this.$editor[0]);s&&(this.caret.end(s.previousElementSibling),elRemove(s)),a.length&&window.setTimeout(function(){for(var t,e,i=0,r=a.length;r>i;i++)t=a[i],e=elBySel('img[data-uuid="'+t.uuid+'"]',this.$editor[0]),e&&WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","pasteFromClipboard_"+this.$element[0].id,{blob:this.utils.dataURItoBlob(t.src),replace:e})}.bind(this),50)}.bind(this),this.paste.clipboardUpload=function(){}}}};
// 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))}}};
// WoltLabReply.js