// wfontcolor.js
if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontcolor={init:function(){var a=this._createFontColorDropdown();this.buttonReplace("fontcolor","fontcolor",this.opts.curLang.fontcolor,$.proxy(function(f,c,b,d){this.dropdownShow(d,f)},this));this.buttonGet("fontcolor").data("dropdown",a)},_createFontColorDropdown:function(){var d=$('<div class="redactor_dropdown redactor_dropdown_box_fontcolor dropdownMenu" style="display: none;">');var b=["#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"];var f=$('<li class="redactorColorPallet" />');for(var h=0,e=b.length;h<e;h++){var g=b[h];var c=$('<a href="#" />').data("color",g).css("background-color",g);f.append(c);c.click($.proxy(this._onColorPick,this))}var a=$('<a href="#" />').html(this.opts.curLang.none).data("color","none");a.click($.proxy(this._onColorPick,this));d.append(f);d.append($('<li class="dropdownDivider" />'));d.append(a);a.wrap("<li />");$(this.$toolbar).append(d);return d},_onColorPick:function(a){a.preventDefault();var b=$(a.currentTarget).data("color");if(b==="none"){this.inlineRemoveStyle("color")}else{this.inlineSetStyle("color",b)}}};
// wfontfamily.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontfamily={init:function(){var a=this._createFontFamilyDropdown();this.buttonReplace("fontfamily","wfontfamily",this.opts.curLang.fontfamily,$.proxy(function(f,c,b,d){this.dropdownShow(d,f)},this));this.buttonGet("wfontfamily").addClass("re-fontfamily").data("dropdown",a)},_createFontFamilyDropdown:function(){var d=$('<div class="redactor_dropdown redactor_dropdown_box_wfontfamily dropdownMenu" style="display: none;">');var c={Arial:"Arial, Helvetica, sans-serif","Comic Sans MS":"Comic Sans MS, cursive","Courier New":"Consolas, Courier New, Courier, monospace",Georgia:"Georgia, serif","Lucida Sans Unicode":"Lucida Sans Unicode, Lucida Grande, sans-serif",Tahoma:"Tahoma, Geneva, sans-serif","Times New Roman":"Times New Roman, Times, serif","Trebuchet MS":"Trebuchet MS, Helvetica, sans-serif",Verdana:"Verdana, Geneva, sans-serif"};var a=this;$.each(c,function(h,e){var g=$('<li><a href="#">'+h+"</a></li>").appendTo(d);var f=g.children("a").data("fontFamily",e).css("font-family",e);f.click(function(){event.preventDefault();a.inlineSetStyle("font-family",$(this).data("fontFamily"))})});$('<li class="dropdownDivider" />').appendTo(d);var b=$('<li><a href="#">None</a></li>').appendTo(d);b.children("a").click(function(){event.preventDefault();a.inlineRemoveStyle("font-family")});$(this.$toolbar).append(d);return d}};
+if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontfamily={init:function(){var a=this._createFontFamilyDropdown();this.buttonReplace("fontfamily","wfontfamily",WCF.Language.get("wcf.bbcode.button.fontFamily"),$.proxy(function(f,c,b,d){this.dropdownShow(d,f)},this));this.buttonGet("wfontfamily").addClass("re-fontfamily").data("dropdown",a)},_createFontFamilyDropdown:function(){var d=$('<div class="redactor_dropdown redactor_dropdown_box_wfontfamily dropdownMenu" style="display: none;">');var c={Arial:"Arial, Helvetica, sans-serif","Comic Sans MS":"Comic Sans MS, cursive","Courier New":"Consolas, Courier New, Courier, monospace",Georgia:"Georgia, serif","Lucida Sans Unicode":"Lucida Sans Unicode, Lucida Grande, sans-serif",Tahoma:"Tahoma, Geneva, sans-serif","Times New Roman":"Times New Roman, Times, serif","Trebuchet MS":"Trebuchet MS, Helvetica, sans-serif",Verdana:"Verdana, Geneva, sans-serif"};var a=this;$.each(c,function(h,e){var g=$('<li><a href="#">'+h+"</a></li>").appendTo(d);var f=g.children("a").data("fontFamily",e).css("font-family",e);f.click(function(){event.preventDefault();a.inlineSetStyle("font-family",$(this).data("fontFamily"))})});$('<li class="dropdownDivider" />').appendTo(d);var b=$('<li><a href="#">None</a></li>').appendTo(d);b.children("a").click(function(){event.preventDefault();a.inlineRemoveStyle("font-family")});$(this.$toolbar).append(d);return d}};
// wfontsize.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontsize={init:function(){var a=this._createFontSizeDropdown();this.buttonReplace("fontsize","wfontsize",this.opts.curLang.fontsize,$.proxy(function(f,c,b,d){this.dropdownShow(d,f)},this));this.buttonGet("wfontsize").addClass("re-fontsize").data("dropdown",a)},_createFontSizeDropdown:function(){var f=$('<div class="redactor_dropdown redactor_dropdown_box_wfontsize dropdownMenu" style="display: none;">');var e=[8,10,12,14,18,24,36];var b=this;for(var g=0;g<e.length;g++){var c=e[g];var d=$('<li><a href="#">'+c+"</a></li>").appendTo(f);var a=d.children("a").data("fontSize",c).css("font-size",c+"pt");if(c>18){a.css("line-height","1em")}a.click(function(){event.preventDefault();b.inlineSetStyle("font-size",$(this).data("fontSize")+"pt")})}$('<li class="dropdownDivider" />').appendTo(f);var d=$('<li><a href="#">None</a></li>').appendTo(f);d.children("a").click(function(){event.preventDefault();b.inlineRemoveStyle("font-size")});$(this.$toolbar).append(f);return f}};
+if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontsize={init:function(){var a=this._createFontSizeDropdown();this.buttonReplace("fontsize","wfontsize",WCF.Language.get("wcf.bbcode.button.fontSize"),$.proxy(function(f,c,b,d){this.dropdownShow(d,f)},this));this.buttonGet("wfontsize").addClass("re-fontsize").data("dropdown",a)},_createFontSizeDropdown:function(){var f=$('<div class="redactor_dropdown redactor_dropdown_box_wfontsize dropdownMenu" style="display: none;">');var e=[8,10,12,14,18,24,36];var b=this;for(var g=0;g<e.length;g++){var c=e[g];var d=$('<li><a href="#">'+c+"</a></li>").appendTo(f);var a=d.children("a").data("fontSize",c).css("font-size",c+"pt");if(c>18){a.css("line-height","1em")}a.click(function(){event.preventDefault();b.inlineSetStyle("font-size",$(this).data("fontSize")+"pt")})}$('<li class="dropdownDivider" />').appendTo(f);var d=$('<li><a href="#">None</a></li>').appendTo(f);d.children("a").click(function(){event.preventDefault();b.inlineRemoveStyle("font-size")});$(this.$toolbar).append(f);return f}};
// wmonkeypatch.js
if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wmonkeypatch={init:function(){var m=this;var e=this.$source.wcfIdentify();var b=this.indentingStart;this.indentingStart=function(o){if(m.mpIndentingStart(o)){b.call(m,o)}};var n=this.buildEventKeydown;this.buildEventKeydown=function(p){var o={cancel:false,event:p};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keydown_"+e,o);if(o.cancel!==true){return n.call(m,p)}return false};var l=this.toggleCode;this.toggleCode=function(p){var o=m.normalize(m.$editor.css("height"));l.call(m,p);m.$source.height(o)};var i=this.modalInit;this.modalInit=function(q,p,o,r){m.mpModalInit();i.call(m,q,p,o,r)};var j=this.modalShowOnDesktop;this.modalShowOnDesktop=function(){j.call(m);$(document.body).css("overflow",false)};var g=this.destroy;this.destroy=function(){m.callback("destroy",false,{});g.call(m)};var f=this.sync;this.sync=function(p,o){if(o===true){f.call(m,p)}};var h=this.buttonActiveObserver;this.buttonActiveObserver=function(o,p){h.call(m,o,p);m.mpButtonActiveObserver(o,p)};if(this.opts.activeButtons){this.$editor.off("mouseup.redactor keyup.redactor").on("mouseup.redactor keyup.redactor",$.proxy(this.buttonActiveObserver,this))}this.$toolbar.find("a.re-indent, a.re-outdent").addClass("redactor_button_disabled");var d=this.imageResizeControls;this.imageResizeControls=function(o){if(!o.data("attachmentID")){d.call(m,o)}return false};var a=this.imageEdit;this.imageEdit=function(o){a.call(m,o);$("#redactor_image_source").val($(o).prop("src"))};var k=this.imageSave;this.imageSave=function(o){$(o).prop("src",$("#redactor_image_source").val());k.call(m,o)};var c=this.buildEventKeydownBackspace;this.buildEventKeydownBackspace=function(q,p,o){if(c.call(m,q,p,o)!==false){return m.mpBuildEventKeydownBackspace(q,p,o)}return false};this.setOption("modalOpenedCallback",$.proxy(this.modalOpenedCallback,this));this.setOption("dropdownShowCallback",$.proxy(this.dropdownShowCallback,this));this.modalTemplatesInit()},cleanRemoveSpaces:function(b,a){return b},mpButtonActiveObserver:function(d,g){var b=this.getParent();b=(b===false)?null:$(b);var a=this;var c=this.$editor.get()[0];var f=function(e,j,h,k,l){var i=a.$toolbar.find(j);if(b&&b.closest(e,c).length!=0){i[(h?"removeClass":"addClass")](k)}else{if(l&&!a.opts.visual){return}i[(h?"addClass":"removeClass")](k)}};f("ul","a.re-indent, a.re-outdent",true,"redactor_button_disabled");f("inline.inlineCode","a.re-__wcf_tt",false,"redactor_act");f("blockquote.quoteBox","a.re-__wcf_quote",false,"redactor_button_disabled",true);f("sub","a.re-subscript",false,"redactor_act");f("sup","a.re-superscript",false,"redactor_act")},inlineRemoveStyle:function(a){this.selectionSave();this.inlineEachNodes(function(b){$(b).css(a,"");this.removeEmptyAttr(b,"style")});this.$editor.find("inline").each(function(c,d){if(!d.attributes.length){var b=$(d);b.replaceWith(b.html())}});this.selectionRestore();this.sync()},inlineMethods:function(e,b,g){this.bufferSet();this.selectionSave();var c=this.getRange();var d=this.getElement();if((c.collapsed||c.startContainer===c.endContainer)&&d&&!this.nodeTestBlocks(d)){$(d)[e](b,g)}else{var f,a=g;switch(b){case"font-size":f="fontSize";a=4;break;case"font-family":f="fontName";break;case"color":f="foreColor";break;case"background-color":f="backColor";break}if(e==="addClass"){f="fontSize";a=4}this.document.execCommand(f,false,a);var h=this.$editor.find("font");$.each(h,$.proxy(function(j,k){this.inlineSetMethods(e,k,b,g)},this))}this.selectionRestore();this.sync()},mpIndentingStart:function(a){if(this.getBlock().tagName=="LI"){return true}return false},modalTemplatesInit:function(){this.setOption("modal_image",'<fieldset><dl><dt><label for="redactor_file_link">'+this.opts.curLang.image_web_link+'</label></dt><dd><input type="text" name="redactor_image_source" id="redactor_image_source" class="long" /></dd></dl><dl><dt><label for="redactor_form_image_align">'+this.opts.curLang.image_position+'</label></dt><dd><select id="redactor_form_image_align"><option value="none">'+this.opts.curLang.none+'</option><option value="left">'+this.opts.curLang.left+'</option><option value="right">'+this.opts.curLang.right+'</option></select></dd></dl></fieldset><div class="formSubmit"><button id="redactor_upload_btn">'+this.opts.curLang.insert+"</button></div>");this.setOption("modal_image_edit",this.getOption("modal_image").replace('<button id="redactor_upload_btn">'+this.opts.curLang.insert+"</button>",'<button id="redactorSaveBtn">'+this.opts.curLang.save+"</button>"));this.setOption("modal_link",'<fieldset><dl><dt><label for="redactor_link_url">URL</label></dt><dd><input type="text" id="redactor_link_url" class="long" /></dd></dl><dl><dt><label for="redactor_link_url_text">'+this.opts.curLang.text+'</label></dt><dd><input type="text" id="redactor_link_url_text" class="long" /></dd></dl></fieldset><div class="formSubmit"><button id="redactor_insert_link_btn">'+this.opts.curLang.insert+"</button></div>");this.setOption("modal_table",'<fieldset><dl><dt><label for="redactor_table_rows">'+this.opts.curLang.rows+'</label></dt><dd><input type="number" size="5" value="2" min="0" id="redactor_table_rows" class="tiny" /></dd></dl><dl><dt><label for="redactor_table_columns">'+this.opts.curLang.columns+'</label></dt><dd><input type="number" size="5" value="3" min="0" id="redactor_table_columns" class="tiny" /></dd></dl></fieldset><div class="formSubmit"><button id="redactor_insert_table_btn">'+this.opts.curLang.insert+"</button></div>");this.setOption("modal_quote",'<fieldset><dl><dt><label for="redactorQuoteAuthor">'+WCF.Language.get("wcf.bbcode.quote.edit.author")+'</label></dt><dd><input type="text" id="redactorQuoteAuthor" class="long" /></dd></dl><dl><dt><label for="redactorQuoteLink">'+WCF.Language.get("wcf.bbcode.quote.edit.link")+'</label></dt><dd><input type="text" id="redactorQuoteLink" class="long" /></dd></dl></fieldset><div class="formSubmit"><button id="redactorEditQuote">'+this.opts.curLang.save+"</button></div>")},mpModalInit:function(){if(!$("#redactor_modal_overlay").length){this.$overlay=$('<div id="redactor_modal_overlay" class="dialogOverlay" />').css({height:"100%",zIndex:50000}).hide().appendTo(document.body)}if(!$("#redactor_modal").length){this.$modal=$('<div id="redactor_modal" class="dialogContainer" />').css({display:"none",zIndex:50001}).appendTo(document.body);$('<header class="dialogTitlebar"><span id="redactor_modal_header" class="dialogTitle" /><a id="redactor_modal_close" class="dialogCloseButton" /></header>').appendTo(this.$modal);$('<div class="dialogContent"><div id="redactor_modal_inner" /></div>').appendTo(this.$modal)}this.$modal.children(".dialogContent").removeClass("dialogForm")},modalOpenedCallback:function(){var a=0;if(this.$modal.find(".formSubmit").length){a=this.$modal.find(".formSubmit").outerHeight();this.$modal.children(".dialogContent").addClass("dialogForm").css({marginBottom:a+"px"})}else{this.$modal.children(".dialogContent").removeClass("dialogForm").css({marginBottom:"0px"})}var b=this.$modal.getDimensions("outer");this.$modal.css({marginLeft:-1*Math.round(b.width/2)+"px",marginTop:-1*Math.round(b.height/2)+"px"})},dropdownShowCallback:function(a){if(!a.dropdown.hasClass("dropdownMenu")){a.dropdown.addClass("dropdownMenu");a.dropdown.children(".redactor_separator_drop").replaceWith('<li class="dropdownDivider" />');a.dropdown.children("a").wrap("<li />")}},inlineEachNodes:function(e){var b=this.getRange(),c=this.getElement(),a=this.getNodes(),d;if(b.collapsed||b.startContainer===b.endContainer&&c){a=$(c);d=true}$.each(a,$.proxy(function(g,j){if(!d&&j.tagName!=="INLINE"){var f=this.getSelectionText();var k=$(j).parent().text();var h=this.removeZeroWidthSpace(f)==this.removeZeroWidthSpace(k);if(h&&j.parentNode.tagName==="INLINE"&&!$(j.parentNode).hasClass("redactor_editor")){j=j.parentNode}else{return}}e.call(this,j)},this))},imageCallbackLink:function(){var a=$.trim($("#redactor_image_source").val());if(a.length){var c="";var d=$("#redactor_form_image_align").val();switch(d){case"left":c=' style="float: left;"';break;case"right":c=' style="float: right;"';break}var b='<img id="image-marker" src="'+a+'"'+c+" />";this.imageInsert(b,true)}else{this.modalClose()}},observeLinks:function(){this.$editor.find("a:not(.redactorQuoteEdit)").on("click",$.proxy(this.linkObserver,this));this.$editor.on("click.redactor",$.proxy(function(a){this.linkObserverTooltipClose(a)},this));$(document).on("click.redactor",$.proxy(function(a){this.linkObserverTooltipClose(a)},this))},observeImages:function(){if(this.opts.observeImages===false){return false}this.$editor.find("img:not(.smiley)").each($.proxy(function(a,c){if(this.browser("msie")){$(c).attr("unselectable","on")}var b=$(c).parent();if(!b.hasClass("royalSlider")&&!b.hasClass("fotorama")){this.imageResize(c)}},this));this.$editor.find(".fotorama, .royalSlider").on("click",$.proxy(this.editGallery,this))},mpBuildEventKeydownBackspace:function(c,d,b){var a=$.trim((d.textContent)?d.textContent:d.innerText);if(a==""&&b.parentNode&&b.parentNode.tagName=="BLOCKQUOTE"){var e=b.parentNode.parentNode;$(b.parentNode).remove();this.selectionStart(e);return false}},cleanGetTabs:function(){return""},};
// wupload.js