Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Fri, 26 Jun 2015 09:35:22 +0000 (11:35 +0200)
committerwoltlab.com <woltlab@woltlab.com>
Fri, 26 Jun 2015 09:35:22 +0000 (11:35 +0200)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js
wcfsetup/install/files/js/WCF.Core.min.js [new file with mode: 0644]

index 96dbef0d62fa7ef25e6d4b12cdbd8fb1e393b995..4cd4856d53a26a5421a23be36b4246d8a5d62520 100644 (file)
@@ -1,18 +1,28 @@
 // table.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.table=function(){return{getTemplate:function(){return String()+'<section id="redactor-modal-table-insert"><label>'+this.lang.get("rows")+'</label><input type="text" size="5" value="2" id="redactor-table-rows" /><label>'+this.lang.get("columns")+'</label><input type="text" size="5" value="3" id="redactor-table-columns" /></section>'},init:function(){var b={};b.insert_table={title:this.lang.get("insert_table"),func:this.table.show};b.insert_row_above={title:this.lang.get("insert_row_above"),func:this.table.addRowAbove};b.insert_row_below={title:this.lang.get("insert_row_below"),func:this.table.addRowBelow};b.insert_column_left={title:this.lang.get("insert_column_left"),func:this.table.addColumnLeft};b.insert_column_right={title:this.lang.get("insert_column_right"),func:this.table.addColumnRight};b.add_head={title:this.lang.get("add_head"),func:this.table.addHead};b.delete_head={title:this.lang.get("delete_head"),func:this.table.deleteHead};b.delete_column={title:this.lang.get("delete_column"),func:this.table.deleteColumn};b.delete_row={title:this.lang.get("delete_row"),func:this.table.deleteRow};b.delete_table={title:this.lang.get("delete_table"),func:this.table.deleteTable};this.observe.addButton("td","table");this.observe.addButton("th","table");var a=this.button.addBefore("link","table",this.lang.get("table"));this.button.addDropdown(a,b)},show:function(){this.modal.addTemplate("table",this.table.getTemplate());this.modal.load("table",this.lang.get("insert_table"),300);this.modal.createCancelButton();var a=this.modal.createActionButton(this.lang.get("insert"));a.on("click",this.table.insert);this.selection.save();this.modal.show();$("#redactor-table-rows").focus()},insert:function(){var n=$("#redactor-table-rows").val(),c=$("#redactor-table-columns").val(),a=$("<div>"),b=Math.floor(Math.random()*99999),l=$('<table id="table'+b+'"><tbody></tbody></table>'),e,h,j,k;for(e=0;e<n;e++){h=$("<tr>");for(j=0;j<c;j++){k=$("<td>"+this.opts.invisibleSpace+"</td>");if(e===0&&j===0){k.append(this.selection.getMarker())}$(h).append(k)}l.append(h)}a.append(l);var f=a.html();this.modal.close();this.selection.restore();if(this.table.getTable()){return}this.buffer.set();var g=this.selection.getBlock()||this.selection.getCurrent();if(g&&g.tagName!="BODY"){if(g.tagName=="LI"){g=$(g).closest("ul, ol")}$(g).after(f)}else{this.insert.html(f)}this.selection.restore();var m=this.$editor.find("#table"+b);if(!this.opts.linebreaks&&(this.utils.browser("mozilla")||this.utils.browser("msie"))){var d=m.next();if(d.length===0){m.after(this.opts.emptyHtml)}}this.observe.buttons();m.find("span.redactor-selection-marker").remove();m.removeAttr("id");this.code.sync();this.core.setCallback("insertedTable",m)},getTable:function(){var a=$(this.selection.getParent()).closest("table");if(!this.utils.isRedactorParent(a)){return false}if(a.size()===0){return false}return a},restoreAfterDelete:function(a){this.selection.restore();a.find("span.redactor-selection-marker").remove();this.code.sync()},deleteTable:function(){var b=this.table.getTable();if(!b){return}this.buffer.set();var a=b.next();if(!this.opts.linebreaks&&a.length!==0){this.caret.setStart(a)}else{this.caret.setAfter(b)}b.remove();this.code.sync()},deleteRow:function(){var a=this.table.getTable();if(!a){return}var c=$(this.selection.getCurrent());this.buffer.set();var e=c.closest("tr");var b=e.prev().length?e.prev():e.next();if(b.length){var d=b.children("td, th").first();if(d.length){d.prepend(this.selection.getMarker())}}e.remove();this.table.restoreAfterDelete(a)},deleteColumn:function(){var c=this.table.getTable();if(!c){return}this.buffer.set();var d=$(this.selection.getCurrent());var a=d.closest("td, th");var b=a[0].cellIndex;c.find("tr").each($.proxy(function(f,g){var e=$(g);var h=b-1<0?b+1:b-1;if(f===0){e.find("td, th").eq(h).prepend(this.selection.getMarker())}e.find("td, th").eq(b).remove()},this));this.table.restoreAfterDelete(c)},addHead:function(){var a=this.table.getTable();if(!a){return}this.buffer.set();if(a.find("thead").size()!==0){this.table.deleteHead();return}var b=a.find("tr").first().clone();b.find("td").html(this.opts.invisibleSpace);$thead=$("<thead></thead>").append(b);a.prepend($thead);this.code.sync()},deleteHead:function(){var a=this.table.getTable();if(!a){return}var b=a.find("thead");if(b.size()===0){return}this.buffer.set();b.remove();this.code.sync()},addRowAbove:function(){this.table.addRow("before")},addRowBelow:function(){this.table.addRow("after")},addColumnLeft:function(){this.table.addColumn("before")},addColumnRight:function(){this.table.addColumn("after")},addRow:function(c){var a=this.table.getTable();if(!a){return}this.buffer.set();var b=$(this.selection.getCurrent());var d=b.closest("tr");var e=d.clone();e.find("th").replaceWith(function(){var f=$("<td>");f[0].attributes=this.attributes;return f.append($(this).contents())});e.find("td").html(this.opts.invisibleSpace);if(c=="after"){d.after(e)}else{d.before(e)}this.code.sync()},addColumn:function(d){var c=this.table.getTable();if(!c){return}var b=0;var e=$(this.selection.getCurrent());this.buffer.set();var f=e.closest("tr");var a=e.closest("td, th");f.find("td, th").each($.proxy(function(g,h){if($(h)[0]===a[0]){b=g}},this));c.find("tr").each($.proxy(function(g,j){var h=$(j).find("td, th").eq(b);var k=h.clone();k.html(this.opts.invisibleSpace);if(d=="after"){h.after(k)}else{h.before(k)}},this));this.code.sync()}}};
+if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.table=function(){return{getTemplate:function(){return String()+'<section id="redactor-modal-table-insert"><label>'+this.lang.get("rows")+'</label><input type="text" size="5" value="2" id="redactor-table-rows" /><label>'+this.lang.get("columns")+'</label><input type="text" size="5" value="3" id="redactor-table-columns" /></section>'},init:function(){var t={};t.insert_table={title:this.lang.get("insert_table"),func:this.table.show},t.insert_row_above={title:this.lang.get("insert_row_above"),func:this.table.addRowAbove},t.insert_row_below={title:this.lang.get("insert_row_below"),func:this.table.addRowBelow},t.insert_column_left={title:this.lang.get("insert_column_left"),func:this.table.addColumnLeft},t.insert_column_right={title:this.lang.get("insert_column_right"),func:this.table.addColumnRight},t.add_head={title:this.lang.get("add_head"),func:this.table.addHead},t.delete_head={title:this.lang.get("delete_head"),func:this.table.deleteHead},t.delete_column={title:this.lang.get("delete_column"),func:this.table.deleteColumn},t.delete_row={title:this.lang.get("delete_row"),func:this.table.deleteRow},t.delete_table={title:this.lang.get("delete_table"),func:this.table.deleteTable},this.observe.addButton("td","table"),this.observe.addButton("th","table");var e=this.button.addBefore("link","table",this.lang.get("table"));this.button.addDropdown(e,t)},show:function(){this.modal.addTemplate("table",this.table.getTemplate()),this.modal.load("table",this.lang.get("insert_table"),300),this.modal.createCancelButton();var t=this.modal.createActionButton(this.lang.get("insert"));t.on("click",this.table.insert),this.selection.save(),this.modal.show(),$("#redactor-table-rows").focus()},insert:function(){var t,e,i,a,s=$("#redactor-table-rows").val(),l=$("#redactor-table-columns").val(),n=$("<div>"),r=Math.floor(99999*Math.random()),o=$('<table id="table'+r+'"><tbody></tbody></table>');for(t=0;s>t;t++){for(e=$("<tr>"),i=0;l>i;i++)a=$("<td>"+this.opts.invisibleSpace+"</td>"),0===t&&0===i&&a.append(this.selection.getMarker()),$(e).append(a);o.append(e)}n.append(o);var d=n.html();if(this.modal.close(),this.selection.restore(),!this.table.getTable()){this.buffer.set();var h=this.selection.getBlock()||this.selection.getCurrent();h&&"BODY"!=h.tagName?("LI"==h.tagName&&(h=$(h).closest("ul, ol")),$(h).after(d)):this.insert.html(d),this.selection.restore();var c=this.$editor.find("#table"+r);if(!this.opts.linebreaks&&(this.utils.browser("mozilla")||this.utils.browser("msie"))){var b=c.next();0===b.length&&c.after(this.opts.emptyHtml)}this.observe.buttons(),c.find("span.redactor-selection-marker").remove(),c.removeAttr("id"),this.code.sync(),this.core.setCallback("insertedTable",c)}},getTable:function(){var t=$(this.selection.getParent()).closest("table");return this.utils.isRedactorParent(t)?0===t.size()?!1:t:!1},restoreAfterDelete:function(t){this.selection.restore(),t.find("span.redactor-selection-marker").remove(),this.code.sync()},deleteTable:function(){var t=this.table.getTable();if(t){this.buffer.set();var e=t.next();this.opts.linebreaks||0===e.length?this.caret.setAfter(t):this.caret.setStart(e),t.remove(),this.code.sync()}},deleteRow:function(){var t=this.table.getTable();if(t){var e=$(this.selection.getCurrent());this.buffer.set();var i=e.closest("tr"),a=i.prev().length?i.prev():i.next();if(a.length){var s=a.children("td, th").first();s.length&&s.prepend(this.selection.getMarker())}i.remove(),this.table.restoreAfterDelete(t)}},deleteColumn:function(){var t=this.table.getTable();if(t){this.buffer.set();var e=$(this.selection.getCurrent()),i=e.closest("td, th"),a=i[0].cellIndex;t.find("tr").each($.proxy(function(t,e){var i=$(e),s=0>a-1?a+1:a-1;0===t&&i.find("td, th").eq(s).prepend(this.selection.getMarker()),i.find("td, th").eq(a).remove()},this)),this.table.restoreAfterDelete(t)}},addHead:function(){var t=this.table.getTable();if(t){if(this.buffer.set(),0!==t.find("thead").size())return void this.table.deleteHead();var e=t.find("tr").first().clone();e.find("td").html(this.opts.invisibleSpace),$thead=$("<thead></thead>").append(e),t.prepend($thead),this.code.sync()}},deleteHead:function(){var t=this.table.getTable();if(t){var e=t.find("thead");0!==e.size()&&(this.buffer.set(),e.remove(),this.code.sync())}},addRowAbove:function(){this.table.addRow("before")},addRowBelow:function(){this.table.addRow("after")},addColumnLeft:function(){this.table.addColumn("before")},addColumnRight:function(){this.table.addColumn("after")},addRow:function(t){var e=this.table.getTable();if(e){this.buffer.set();var i=$(this.selection.getCurrent()),a=i.closest("tr"),s=a.clone();s.find("th").replaceWith(function(){var t=$("<td>");return t[0].attributes=this.attributes,t.append($(this).contents())}),s.find("td").html(this.opts.invisibleSpace),"after"==t?a.after(s):a.before(s),this.code.sync()}},addColumn:function(t){var e=this.table.getTable();if(e){var i=0,a=$(this.selection.getCurrent());this.buffer.set();var s=a.closest("tr"),l=a.closest("td, th");s.find("td, th").each($.proxy(function(t,e){$(e)[0]===l[0]&&(i=t)},this)),e.find("tr").each($.proxy(function(e,a){var s=$(a).find("td, th").eq(i),l=s.clone();l.html(this.opts.invisibleSpace),"after"==t?s.after(l):s.before(l)},this)),this.code.sync()}}}};
+
 // wbbcode.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbbcode=function(){var a=false;return{init:function(){var e=this.$textarea.wcfIdentify();this.opts.initCallback=(function(){if($.browser.msie){this.$editor.addClass("msie")}var i=$.trim(this.wutil.getOption("woltlab.originalValue"));if(i.length){this.wutil.replaceText(i);this.wutil.selectionEndOfEditor()}delete this.opts.woltlab.originalValue;$(document).trigger("resize");this.wutil.saveSelection()}).bind(this);this.opts.pasteBeforeCallback=$.proxy(this.wbbcode._pasteBeforeCallback,this);this.opts.pasteCallback=$.proxy(this.wbbcode._pasteCallback,this);var d=this.clean.onSync;this.clean.onSync=(function(i){i=i.replace(/\u200C/g,"__wcf_zwnj__");i=i.replace(/\u200D/g,"__wcf_zwj__");if(a===true){a=false}else{i=i.replace(/<p><br([^>]+)?><\/p>/g,"<p>@@@wcf_empty_line@@@</p>")}i=d.call(this,i);i=i.replace(/__wcf_zwnj__/g,"\u200C");return i.replace(/__wcf_zwj__/g,"\u200D")}).bind(this);if(this.wutil.getOption("woltlab.autosaveOnce")){this.wutil.saveTextToStorage();delete this.opts.woltlab.autosaveOnce}var c=this.button.get("table");if(c.length){var h=c.data("dropdown");h.find(".redactor-dropdown-add_head").parent().remove();h.find(".redactor-dropdown-delete_head").parent().remove();$('<li class="dropdownDivider" />').insertBefore(h.find(".redactor-dropdown-delete_table").parent());c.click($.proxy(this.wbbcode._tableButtonClick,this))}WCF.System.Event.addListener("com.woltlab.wcf.redactor","insertBBCode_quote_"+e,$.proxy(function(i){i.cancel=true;this.wbbcode._handleInsertQuote()},this));WCF.System.Event.addListener("com.woltlab.wcf.redactor","insertBBCode_code_"+e,$.proxy(function(i){i.cancel=true;this.wbbcode._handleInsertCode(null,true)},this));WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+e,$.proxy(this.wbbcode._keydownCallback,this));WCF.System.Event.addListener("com.woltlab.wcf.redactor","keyup_"+e,$.proxy(this.wbbcode._keyupCallback,this));this.code.sync=function(){};var f=$(".redactor-toolbar-tooltip-html:not(.jsWbbcode)").addClass("jsWbbcode").text(WCF.Language.get("wcf.bbcode.button.toggleBBCode"));var g=function(i){i.find("br").each(function(j,k){if(k.children.length){$(k).empty()}})};this.code.toggle=(function(){if(this.opts.visual){this.code.startSync();this.code.showCode();this.$textarea.val(this.wbbcode.convertFromHtml(this.$textarea.val()));this.button.get("html").children("i").removeClass("fa-square-o").addClass("fa-square");f.text(WCF.Language.get("wcf.bbcode.button.toggleHTML"))}else{this.$textarea.val(this.wbbcode.convertToHtml(this.$textarea.val()));this.code.offset=this.$textarea.val().length;this.code.showVisual();this.wbbcode.fixBlockLevelElements();this.wutil.selectionEndOfEditor();this.wbbcode.observeQuotes();this.wbbcode.observeCodeListings();this.button.get("html").children("i").removeClass("fa-square").addClass("fa-square-o");f.text(WCF.Language.get("wcf.bbcode.button.toggleBBCode"));this.wutil.fixDOM();g(this.$editor);this.wutil.saveSelection()}}).bind(this);this.wutil.setOption("clickCallback",(function(i){this.wutil.saveSelection();if(i.target===this.$editor[0]){if(this.$editor[0].lastElementChild&&this.$editor[0].lastElementChild.tagName==="BLOCKQUOTE"){this.wutil.setCaretAfter($(this.$editor[0].lastElementChild))}}}).bind(this));var b=this.opts.verifiedTags.indexOf("ul");if(b>-1){this.opts.verifiedTags.splice(b,1)}WCF.System.Event.addListener("com.woltlab.wcf.redactor","observe_load_"+e,(function(i){this.wbbcode.observeCodeListings();this.wbbcode.observeQuotes()}).bind(this));WCF.System.Event.addListener("com.woltlab.wcf.redactor","fixFormatting_"+e,$.proxy(this.wbbcode.fixFormatting,this))},_tableButtonClick:function(c){var d=$(c.currentTarget);if(!d.hasClass("dropact")){return}var b=this.selection.getBlock()||this.selection.getCurrent();var e=d.data("dropdown");e.children("li").show();var f=e.find("> li > .redactor-dropdown-insert_table").parent();if(b.tagName=="TD"){f.hide()}else{f.nextAll().hide()}},insertSmiley:function(j,i,e){if(e){this.wbbcode.registerSmiley(j,i)}if(this.opts.visual){var f=null;if(window.getSelection().rangeCount&&window.getSelection().getRangeAt(0).collapsed){f=window.getSelection().getRangeAt(0).startContainer;if(f.nodeType===Node.TEXT_NODE){f=f.parentElement}if(!this.utils.isRedactorParent(f)){f=null}}this.insert.html('<img src="'+i+'" class="smiley" alt="'+j+'" id="redactorSmiley">',false);var b=document.getElementById("redactorSmiley");b.removeAttribute("id");if(f!==null){var d=window.getSelection().getRangeAt(0).startContainer;if(d.nodeType===Node.TEXT_NODE){d=d.parentElement}if(f!==d){f.appendChild(b)}}var h=function(k){if(k===null){return false}if((k.nodeType===Node.ELEMENT_NODE&&k.nodeName==="SPAN")||k.nodeType===Node.TEXT_NODE){if(k.textContent==="\u00A0"){return true}}return false};var g=b.parentElement;if(!h(b.previousSibling)){var c=document.createTextNode("\u00A0");g.insertBefore(c,b)}if(!h(b.nextSibling)){var c=document.createTextNode("\u00A0");if(g.lastChild===b){g.appendChild(c)}else{g.insertBefore(c,b.nextSibling)}}}else{this.wutil.insertAtCaret(" "+j+" ")}},registerSmiley:function(b,c){if(__REDACTOR_SMILIES[b]){return false}__REDACTOR_SMILIES[b]=c;return true},convertFromHtml:function(n){var w=[];WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertFromHtml",{html:n});n=n.replace(/(<[^>]+?) data-redactor-tag="[^"]+"/g,"$1");n=n.replace(/(<[^>]+?) rel="[^"]+"/g,"$1");n=n.replace(/&#(8203|x200b);/g,"");n=n.replace(/&trade;/gi,"\u2122");n=n.replace(/&copy;/gi,"\u00a9");n=n.replace(/&hellip;/gi,"\u2026");n=n.replace(/&mdash;/gi,"\u2014");n=n.replace(/&dash;/gi,"\u2010");var s={};n=n.replace(/<div([^>]+?)class="codeBox[^"]+"([^>]*?)>\n*<div>[\s\S]+?<ol start="(\d+)">([\s\S]+?)<\/ol>\n*<\/div>\n*<\/div>/g,function(F,D,C,E,B){var J=D+" "+C;var G="";var H="";if(J.match(/data-highlighter="([a-zA-Z]+)"/)){G=RegExp.$1}if(J.match(/data-filename="([^"]+)"/)){H=$.trim(RegExp.$1)}var I=WCF.getUUID();s[I]={codeContent:B.replace(/<li>/g,"").replace(/<\/li>/g,"\n").replace(/\n$/,""),filename:H.replace(/['"]/g,""),highlighter:(G==="plain"?"":G),lineNumber:(E>1?E:0)};return"@@@"+I+"@@@"});n=n.replace(/\r?\n/g,"");n=n.replace(/<a[^>]*?><\/a>/g,"");n=n.replace(/<p><\/p><table/g,"<table");n=n.replace(/<\/table><p><\/p>/g,"</table>");for(var A in s){n=n.replace(new RegExp("<p></p>@@@"+A+"@@@<p></p>"),"@@@"+A+"@@@")}n=n.replace(/<p><\/p><p>(?!<br>)/g,"<p>@@@wcf_empty_line@@@</p><p>");n=n.replace(/<br( \/)?><\/p>/g,"</p>");var h=n.split(/(<\/?(?:div|p)>)/);var i="";var y="";for(var b=0;b<h.length;b++){var z=h[b];if(z=="<p>"||z=="<div>"){continue}else{if(z=="</p>"||z=="</div>"){y=$.trim(y);if(y!="@@@wcf_empty_line@@@"){y+="\n"}i+=y;y=""}else{if(b==0||b+1==h.length){i+=z}else{y+=z}}}}if(y){i+=y;y=""}n=i;n=n.replace(/@@@wcf_empty_line@@@/g,"\n");n=n.replace(/\n\n$/,"\n");n=n.replace(/<br>$/,"");n=n.replace(/<br>/g,"\n");n=n.replace(/<br>/g,"");n=n.replace(/&nbsp;/gi," ");n=n.replace(/<blockquote([^>]+)>\n?<header[^>]*?>[\s\S]*?<\/header>/gi,function(D,C,F){var G;var E="";var B="";if(C.match(/data-author="([^"]+)"/)){E=WCF.String.unescapeHTML(RegExp.$1)}if(C.match(/cite="([^"]+)"/)){B=WCF.String.unescapeHTML(RegExp.$1)}if(B){G="[quote='"+E+"','"+B+"']"}else{if(E){G="[quote='"+E+"']"}else{G="[quote]"}}return G});n=n.replace(/(?:\n*)<\/blockquote>\n?/gi,"\n[/quote]\n");n=n.replace(/<a [^>]*?href=(["'])mailto:(.+?)\1.*?>([\s\S]+?)<\/a>/gi,"[email=$2]$3[/email]");n=n.replace(/<a[^>]+><\/a>/,"");n=n.replace(/<a [^>]*?href=(["'])(.+?)\1.*?>([\s\S]+?)<\/a>/gi,function(D,B,C,E){if(C==E){return"[url]"+C+"[/url]"}return"[url='"+C+"']"+E+"[/url]"});n=n.replace(/<(?:b|strong)>/gi,function(){if(w.indexOf("b")===-1){w.push("b")}return"[b]"});n=n.replace(/<\/(?:b|strong)>/gi,"[/b]");n=n.replace(/<(?:i|em)>/gi,function(){if(w.indexOf("i")===-1){w.push("i")}return"[i]"});n=n.replace(/<\/(?:i|em)>/gi,"[/i]");n=n.replace(/<u>/gi,function(){if(w.indexOf("u")===-1){w.push("u")}return"[u]"});n=n.replace(/<\/u>/gi,"[/u]");n=n.replace(/<sub>/gi,function(){if(w.indexOf("sub")===-1){w.push("sub")}return"[sub]"});n=n.replace(/<\/sub>/gi,"[/sub]");n=n.replace(/<sup>/gi,function(){if(w.indexOf("sup")===-1){w.push("sup")}return"[sup]"});n=n.replace(/<\/sup>/gi,"[/sup]");n=n.replace(/<(?:s(trike)?|del)>/gi,function(){if(w.indexOf("s")===-1){w.push("s")}return"[s]"});n=n.replace(/<\/(?:s(trike)?|del)>/gi,"[/s]");var f=n.split(/(<\/?span[^>]*>)/);var y=[];var p=[];var q="";var d={11:8,13:10,16:12,19:14,24:18,29:22,32:24,48:36};for(var b=0;b<f.length;b++){var j=f[b];if(j=="</span>"){var e=p.pop();var i=e.start+y.pop()+e.end;if(y.length){y[y.length-1]+=i}else{q+=i}}else{if(j.match(/^<span/)){if(j.match(/^<span(?:.*?)style="([^"]+)"(?:[^>]*?)>/)){var l=RegExp.$1;var v;var o;if(l.match(/(?:^|;\s*)color: ?rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\);?/i)){var u=RegExp.$1;var c=RegExp.$2;var g=RegExp.$3;var r=("0123456789ABCDEF".charAt((u-u%16)/16)+""+"0123456789ABCDEF".charAt(u%16))+""+("0123456789ABCDEF".charAt((c-c%16)/16)+""+"0123456789ABCDEF".charAt(c%16))+""+("0123456789ABCDEF".charAt((g-g%16)/16)+""+"0123456789ABCDEF".charAt(g%16));v="[color=#"+r+"]";o="[/color=#"+r+"]";if(w.indexOf("color")===-1){w.push("color")}}else{if(l.match(/(?:^|;\s*)color: ?([^;]+);?/i)){v="[color="+RegExp.$1+"]";o="[/color="+RegExp.$1+"]";if(w.indexOf("color")===-1){w.push("color")}}else{if(l.match(/font-size: ?(\d+)(pt|px);?/i)){if(RegExp.$2=="pt"){v="[size="+RegExp.$1+"]";o="[/size="+RegExp.$1+"]";if(w.indexOf("size")===-1){w.push("size")}}else{if(d[RegExp.$1]){v="[size="+d[RegExp.$1]+"]";o="[/size="+d[RegExp.$1]+"]";if(w.indexOf("size")===-1){w.push("size")}}else{v="";o=""}}}else{if(l.match(/font-family: ?([^;]+);?/)){v="[font='"+RegExp.$1.replace(/'/g,"")+"']";o="[/font='"+RegExp.$1.replace(/'/g,"")+"']";if(w.indexOf("font")===-1){w.push("font")}}else{v='<span style="'+l+'">';o="</span>"}}}}y[y.length]="";p[y.length]={start:v,end:o}}else{if(j.match(/^<span class="inlineCode">/)){y[y.length]="";p[y.length]={start:"[tt]",end:"[/tt]"}}else{y[y.length]="";p[y.length]={start:"",end:""}}}}else{if(y.length){y[y.length-1]+=j}else{q+=j}}}}n=q;n=n.replace(/<(div|p) style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)\n/gi,function(C,B,E,D){if(w.indexOf("align")===-1){w.push("align")}return"[align="+E+"]"+$.trim(D)+"[/align="+E+"]\n"});if(w.length){var m=true;while(m){m=false;n=n.replace(new RegExp("\\[\\/((?:"+w.join("|")+")=[^\\]]+?)\\]\n\\[\\1\\]","gi"),function(){m=true;return"\n"})}n=n.replace(new RegExp("\\[\\/("+w.join("|")+")=[^\\]]+?\\]","gi"),"[/$1]")}n=n.replace(/ ?<img [^>]*?alt="([^"]+?)"[^>]*?class="smiley"[^>]*?> ?/gi," $1 ");n=n.replace(/ ?<img [^>]*?class="smiley"[^>]*?alt="([^"]+?)"[^>]*?> ?/gi," $1 ");n=n.replace(/<img([^>]*?)class="[^"]*redactorEmbeddedAttachment[^"]*"([^>]*?)>/gi,function(E,H,J){var K=H+" "+J;var G;if(K.match(/data-attachment-id="(\d+)"/)){G=RegExp.$1}else{return E}var D="none";var C=null;if(K.match(/style="([^"]+)"/)){var F=RegExp.$1.split(";");for(var I=0;I<F.length;I++){var B=$.trim(F[I]);if(B.match(/^float: (left|right)$/)){D=RegExp.$1}else{if(B.match(/^width: (\d+)px$/)){C=RegExp.$1}}}if(C!==null){return"[attach="+G+","+D+","+C+"][/attach]"}else{if(D!=="none"){return"[attach="+G+","+D+"][/attach]"}}}return"[attach="+G+"][/attach]"});n=n.replace(/<img([^>]*)?src=(["'])([^"']+?)\2([^>]*)?>/gi,function(G,I,M,C,L){var J=I+" "+L;var E="";if(J.match(/style="([^"]+)"/)){E=RegExp.$1}var F="none";var D=0;var H=E.split(";");for(var K=0;K<H.length;K++){var B=H[K];if(B.match(/float: (left|right|none)/)){F=RegExp.$1}else{if(B.match(/width: (\d+)px/)){D=parseInt(RegExp.$1)}}}if(D){return"[img='"+C+"',"+F+","+D+"][/img]"}else{if(F!=="none"){return"[img='"+C+"',"+F+"][/img]"}}return"[img]"+C+"[/img]"});n=n.replace(/<li>/gi,"[*]");n=n.replace(/<\/li>/gi,"\n");n=n.replace(/<ul>/gi,"[list]");n=n.replace(/<(ol|ul style="list-style-type: decimal")>/gi,"[list=1]");n=n.replace(/<ul style="list-style-type: (none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)">/gi,"[list=$1]");n=n.replace(/<\/(ul|ol)>/gi,"[/list]");n=n.replace(/\n?\[list\]/g,"\n[list]");n=n.replace(/\[\/list\]\n\[\*\]/g,"[/list][*]");n=n.replace(/\[\/list\]\n\[\/list\]/g,"[/list][/list]");n=n.replace(/<table[^>]*>/gi,"[table]\n");n=n.replace(/<\/table>\n?/gi,"[/table]\n");n=n.replace(/<tbody>([\s\S]*?)<\/tbody>/,function(B,C){return $.trim(C)});n=n.replace(/<tr><\/tr>/gi,"");n=n.replace(/<tr>/gi,"[tr]\n");n=n.replace(/<\/tr>/gi,"[/tr]\n");n=n.replace(/<td style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)<\/td>/gi,"[td][align=$1]$2[/align][/td]");n=n.replace(/(\t)*<td>(\t)*/gi,"[td]");n=n.replace(/(\t)*<\/td>/gi,"[/td]\n");var x={};n.replace(/<span id="selection-marker-\d+" class="redactor-selection-marker"><\/span>/,function(B){var C=B.hashCode();x[C]=B.replace(/\$/g,"$$$$");return"@@"+C+"@@"});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","convertFromHtml",{html:n});n=n.replace(/<[^(<|>)]+>/g,"");if($.getLength(x)){for(var k in x){var t=new RegExp("@@"+k+"@@","g");data=data.replace(t,x[k])}}if($.getLength(s)){$.each(s,function(D,F){var C=0;if(F.highlighter){C++}if(F.lineNumber){C++}if(F.filename){C++}var B="";switch(C){case 1:if(F.highlighter){B=F.highlighter}else{if(F.filename){B="'"+F.filename+"'"}else{B=F.lineNumber}}break;case 2:if(F.lineNumber){B=F.lineNumber}if(F.highlighter){if(B.length){B+=","}B+=F.highlighter}if(F.filename){if(B.length){B+=","}B+="'"+F.filename+"'"}break;case 3:B=F.highlighter+","+F.lineNumber+",'"+F.filename+"'";break}var E="[code"+(B.length?"="+B:"")+"]"+F.codeContent+"[/code]\n";n=n.replace(new RegExp("@@@"+D+"@@@\n?","g"),E)})}n=n.replace(/&lt;/g,"<");n=n.replace(/&gt;/g,">");n=n.replace(/&amp;/g,"&");n=n.replace(/%28/g,"(");n=n.replace(/%29/g,")");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertFromHtml",{html:n});n=$.trim(n);if(n.length){n+="\n"}return n},convertToHtml:function(I){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertToHtml",{data:I});I=this.wutil.removeZeroWidthSpace(I);I=I.replace(/&/g,"&amp;");I=I.replace(/</g,"&lt;");I=I.replace(/>/g,"&gt;");var u=[];var o=new RegExp("\\[("+__REDACTOR_SOURCE_BBCODES.join("|")+")([\\S\\s]+?)\\[\\/\\1\\]","gi");I=I.replace(o,function(J){var K=J.hashCode();u.push({key:K,value:J.replace(/\$/g,"$$$$")});return"@@"+K+"@@"});I=I.replace(/\[url\]([^"]+?)\[\/url]/gi,'<a href="$1">$1</a>'+this.opts.invisibleSpace);I=I.replace(/\[url\='([^'"]+)']([\s\S]+?)\[\/url]/gi,'<a href="$1">$2</a>'+this.opts.invisibleSpace);I=I.replace(/\[url\=([^'"\]]+)]([\s\S]+?)\[\/url]/gi,'<a href="$1">$2</a>'+this.opts.invisibleSpace);I=I.replace(/\[email\]([^"]+?)\[\/email]/gi,'<a href="mailto:$1">$1</a>'+this.opts.invisibleSpace);I=I.replace(/\[email\=([^"\]]+)](.+?)\[\/email]/gi,'<a href="mailto:$1">$2</a>'+this.opts.invisibleSpace);I=I.replace(/\[(b|i|s|sub|sup|u)\]\[\1\]/gi,"[$1]");I=I.replace(/\[(\/(?:b|i|s|sub|sup|u))\]\[\1\]/gi,"[$1]");I=I.replace(/\[(b|i|s|sub|sup|u)\]\[\/\1\]/gi,"");I=I.replace(/\[b\]([\s\S]*?)\[\/b]/gi,(function(J,K){return this.wbbcode._expandFormatting(K,"<strong>","</strong>")}).bind(this));I=I.replace(/\[i\]([\s\S]*?)\[\/i]/gi,(function(J,K){return this.wbbcode._expandFormatting(K,"<em>","</em>")}).bind(this));I=I.replace(/\[u\]([\s\S]*?)\[\/u]/gi,(function(J,K){return this.wbbcode._expandFormatting(K,"<u>","</u>")}).bind(this));I=I.replace(/\[s\]([\s\S]*?)\[\/s]/gi,(function(J,K){return this.wbbcode._expandFormatting(K,"<del>","</del>")}).bind(this));I=I.replace(/\[sub\]([\s\S]*?)\[\/sub]/gi,(function(J,K){return this.wbbcode._expandFormatting(K,"<sub>","</sub>")}).bind(this));I=I.replace(/\[sup\]([\s\S]*?)\[\/sup]/gi,(function(J,K){return this.wbbcode._expandFormatting(K,"<sup>","</sup>")}).bind(this));I=I.replace(/\[img\]([^"]+?)\[\/img\]/gi,'<img src="$1" />');I=I.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi,function(K,L,M){var J="float: "+M+";";if(M==="left"){J+="margin: 0 15px 7px 0"}else{J+="margin: 0 0 7px 15px"}return'<img src="'+L+'" style="'+J+'" />'});I=I.replace(/\[img='?([^"]*?)'?,'?(left|right|none)'?,'?(\d+)'?\]\[\/img\]/gi,function(K,M,N,L){var J="float: "+N+"; width: "+L+"px;";if(N==="left"){J+="margin: 0 15px 7px 0"}else{J+="margin: 0 0 7px 15px"}return'<img src="'+M+'" style="'+J+'" />'});I=I.replace(/\[img='?([^"]*?)'?\]\[\/img\]/gi,'<img src="$1" />');I=I.replace(/\[size=(\d+)\]([\s\S]*?)\[\/size\]/gi,(function(J,K,L){return this.wbbcode._expandFormatting(L,'<span style="font-size: '+K+'pt">',"</span>")}).bind(this));I=I.replace(/\[color=([#a-z0-9]*?)\]([\s\S]*?)\[\/color\]/gi,(function(K,J,L){return this.wbbcode._expandFormatting(L,'<span style="color: '+J+'">',"</span>")}).bind(this));I=I.replace(/\[font='?([a-z,\- ]*?)'?\]([\s\S]*?)\[\/font\]/gi,(function(K,J,L){return this.wbbcode._expandFormatting(L,'<span style="font-family: '+J+'">',"</span>")}).bind(this));I=I.replace(/\[align=(left|right|center|justify)\]([\s\S]*?)\[\/align\]/gi,(function(J,L,K){return this.wbbcode._expandFormatting(K,'<p style="text-align: '+L+'">',"</p>")}).bind(this));var s=I.indexOf("[list");if(s>0){var h=I.substr(0,s);h=h.replace(/\[\*\]/g,"");I=h+I.substr(s)}var x=I.lastIndexOf("[/list]");if(x===-1){I=I.replace(/\[\*\]/g,"");I=I.replace(/\[list[^\]]*\]/g,"")}else{var h=I.substr(x+7);h=h.replace(/\[\*\]/g,"");I=I.substr(0,x+7)+h}I=I.replace(/\[\*\]([\s\S]*?)(?=\[\*\]|\[\/list\])/gi,function(J,K){return"<li>"+$.trim(K)+"</li>"});I=I.replace(/\n*(\[list\]<\/li>)/g,"$1");I=I.replace(/\[list\]/gi,"<ul>");I=I.replace(/\[list=1\]/gi,'<ul style="list-style-type: decimal">');I=I.replace(/\[list=a\]/gi,'<ul style="list-style-type: lower-latin">');I=I.replace(/\[list=(none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)\]/gi,'<ul style="list-style-type: $1">');I=I.replace(/\[\/list\]/gi,"</ul>");I=I.replace(/\[table\]([\S\s]*?)\[\/table\]/gi,function(J,K){return"[table]"+$.trim(K)+"[/table]"});I=I.replace(/\[table\]\n*/gi,'<table border="1" cellspacing="1" cellpadding="1" style="width: 500px;">');I=I.replace(/\[\/table\](\n*)?/gi,function(J,K){if(K){if(K.match(/\n/g).length>2){K=K.replace(/^\n/,"")}return"</table>"+K}return"</table>"});I=I.replace(/\[tr\]\n*/gi,"<tr>");I=I.replace(/\[\/tr\]\n*/gi,"</tr>");I=I.replace(/\[td\]\n*/gi,"<td>");I=I.replace(/\[\/td\]\n*/gi,"</td>");I=I.replace(/<td>([\S\s]*?)<\/td>/gi,function(J,L){var K=$.trim(L);if(!K.length){K="&#8203;"}return"<td>"+K+"</td>"});var d=this.wutil.getOption("woltlab.attachmentUrl");var H=this.wutil.getOption("woltlab.attachmentThumbnailUrl");if(d){var F=this.wbbcode._getImageAttachments();I=I.replace(/\[attach=(\d+)\]\[\/attach\]/g,function(J,K,L){K=parseInt(K);if(F[K]!==undefined){return'<img src="'+H.replace(/987654321/,K)+'" class="redactorEmbeddedAttachment redactorDisableResize" data-attachment-id="'+K+'" />'}return J});I=I.replace(/\[attach=(\d+),(left|right|none)\]\[\/attach\]/g,function(K,L,M){L=parseInt(L);if(F[L]!==undefined){var J="";if(M==="left"||M==="right"){J="float: "+M+";";if(M==="left"){J+="margin: 0 15px 7px 0"}else{J+="margin: 0 0 7px 15px"}}J=' style="'+J+'"';return'<img src="'+H.replace(/987654321/,L)+'" class="redactorEmbeddedAttachment redactorDisableResize" data-attachment-id="'+L+'"'+J+" />"}return K});I=I.replace(/\[attach=(\d+),(left|right|none),(\d+)\]\[\/attach\]/g,function(K,M,N,L){M=parseInt(M);if(F[M]!==undefined){var J="width: "+L+"px; max-height: "+F[M].height+"px; max-width: "+F[M].width+"px;";if(N==="left"||N==="right"){J+="float: "+N+";";if(N==="left"){J+="margin: 0 15px 7px 0"}else{J+="margin: 0 0 7px 15px"}}J=' style="'+J+'"';return'<img src="'+d.replace(/987654321/,M)+'" class="redactorEmbeddedAttachment" data-attachment-id="'+M+'"'+J+" />"}return K})}for(var w in __REDACTOR_SMILIES){var k=w.replace(/</g,"&lt;").replace(/>/g,"&gt;");var j=new RegExp("(\\s|>|^)"+WCF.String.escapeRegExp(k)+"(?=\\s|<|$)","gi");I=I.replace(j,'$1<img src="'+__REDACTOR_SMILIES[w]+'" class="smiley" alt="'+k+'" />')}I=I.replace(/(javascript):/gi,"$1<span></span>:");I=I.replace(/(\r|\r\n)/g,"\n");var B=[];var E=[];var g=I.split(/(\[(?:\/quote|quote|quote='[^']*?'(?:,'[^']*?')?|quote="[^"]*?"(?:,"[^"]*?")?)\])/i);var e=WCF.getUUID();while(true){var p=false;for(var b=0;b<g.length;b++){var D=g[b];if(D.toLowerCase()==="[/quote]"){p=true;var f="";var n=g.slice(0,b);var c=false;while(n.length){var C=n.pop();f=C+f;if(C.match(/^\[quote/i)){D=f+D;var m=WCF.getUUID();B.push({hashCode:m,content:D.replace(/\$/g,"$$$$")});E.push(m);D="@@"+m+"@@";c=true;break}}if(!c){n=g.slice(0,b);D=e}g=n.concat(D,g.slice(b+1));break}}if(!p){break}}I=g.join("");I=I.replace(new RegExp(e,"g"),"[/quote]");I=I.replace(/\n*$/,"");var y=[];I=I.replace(/(<li>[\s\S]*?<\/li>)/g,function(J){J=$.trim(J).replace(/\n/,"<br>");var K=WCF.getUUID();y.push({key:K,content:J});return K});var h=I.split("\n");I="";for(var b=0,l=h.length;b<l;b++){var t=$.trim(h[b]);if(t.match(/^<([a-z]+)/)||t.match(/<\/([a-z]+)>$/)){if(this.reIsBlock.test(RegExp.$1.toUpperCase())||RegExp.$1.toUpperCase()==="TABLE"){if(t.match(/^<([a-z]+).*<\/\1>/)){I+=t}else{I+=t+"<br />"}}else{I+="<p>"+t+"</p>"}}else{if(!t){t="<br>"}else{if(t.match(/^@@([0-9\-]+)@@$/)){if(WCF.inArray(RegExp.$1,E)){I+=t;continue}}}I+="<p>"+t+"</p>"}}I=I.replace(/<td>([\s\S]+?)<\/td>/g,function(J,K){K=K.replace(/<br(?: \/)?>(<[uo]l)/g,"$1");return"<td>"+K.replace(/<p><br(?: \/)?><\/p>/g,"<br>").replace(/<p>/g,"").replace(/<\/p>/g,"<br>").replace(/<br>$/,"")+"</td>"});if(y.length){for(var b=y.length-1;b>=0;b--){I=I.replace(y[b].key,y[b].content)}}if(B.length){var G=function(J){return J.replace(/^['"]/,"").replace(/['"]$/,"")};var r=this;var q=function(J){return J.replace(/\[quote(=['"].+?\1)?\]([\S\s]*)\[\/quote\]/gi,function(M,L,O){var S="";var N="";if(L){L=L.substr(1);L=L.split(",");switch(L.length){case 1:S=L[0];break;case 2:S=L[0];N=L[1];break}S=WCF.String.escapeHTML(G($.trim(S)));N=WCF.String.escapeHTML(G($.trim(N)))}var T='<blockquote class="quoteBox container containerPadding quoteBoxSimple" cite="'+N+'" data-author="'+S+'"><header contenteditable="false"><h3>'+r.wbbcode._buildQuoteHeader(S,N)+'</h3><a class="redactorQuoteEdit"></a></header>';O=$.trim(O);var K="";if(O.length){var R=O.split("\n");for(var Q=0;Q<R.length;Q++){var P=R[Q];if(P.length===0){P=r.opts.invisibleSpace}else{if(P.match(/^@@([0-9\-]+)@@$/)){if(WCF.inArray(RegExp.$1,E)){K+=P;continue}}}K+="<div>"+P+"</div>"}}else{K="<div>"+r.opts.invisibleSpace+"</div>"}T+=K;T+="</blockquote>";return T})};for(var b=B.length-1;b>=0;b--){var v=B[b];var z=new RegExp("@@"+v.hashCode+"@@","g");I=I.replace(z,q(v.content))}}I=I.replace(/<(?:div|p)><(blockquote|div)/g,"<$1");I=I.replace(/<\/(blockquote|div)><\/(?:div|p)>/g,"</$1>");if(u.length){for(var b=u.length-1;b>=0;b--){var A=u[b];var z=new RegExp("@@"+A.key+"@@","g");var i=A.value;i=i.replace(/^\[tt\]([\s\S]+)\[\/tt\]/,(function(J,L){var K=L.split("\n");L="";for(var O=0,N=K.length;O<N;O++){var M=K[O];if(M.length){if(L.length){L+="</p><p>"}L+="[tt]"+M+"[/tt]"}else{if(O===0||(O+1)===N){continue}if(L.match(/\[\/tt\]$/)){L+="</p><p>"+this.opts.invisibleSpace+""}else{L+="</p><p><br>"}}}return L}).bind(this));i=i.replace(/^\[code([^\]]*)\]([\S\s]*)\[\/code\]$/,(function(M,U,O){var N="plain";var S=0;var Q="";if(U){U=U.substring(1);U=U.split(",");var P=function(W){return W.match(/^\d+$/)};var L=function(W){return(W.indexOf(".")!==-1)||(W.match(/^(["']).*\1$/))};var K=function(W){return(__REDACTOR_CODE_HIGHLIGHTERS[W]!==undefined)};var J=function(W){return W.replace(/^(["'])(.*)\1$/,"$2")};switch(U.length){case 1:if(P(U[0])){S=(parseInt(U[0])>1)?U[0]:0}else{if(L(U[0])){Q=J(U[0])}else{if(K(U[0])){N=U[0]}}}break;case 2:if(P(U[0])){S=(parseInt(U[0])>1)?U[0]:0;if(K(U[1])){N=U[1]}else{if(L(U[1])){Q=J(U[1])}}}else{if(K(U[0])){N=U[0]}if(L(U[1])){Q=J(U[1])}}break;case 3:if(K(U[0])){N=U[0]}if(P(U[1])){S=U[1]}if(L(U[2])){Q=J(U[2])}break}}O=O.replace(/^\n+/,"").replace(/\n+$/,"").split(/\n/);var V="";for(var T=0;T<O.length;T++){var R=O[T];if(!R.length){R=this.opts.invisibleSpace}V+="<li>"+R+"</li>"}return'<div class="codeBox container" contenteditable="false" data-highlighter="'+N+'"'+(Q?' data-filename="'+WCF.String.escapeHTML(Q)+'"':"")+"><div><div><h3>"+__REDACTOR_CODE_HIGHLIGHTERS[N]+(Q?": "+WCF.String.escapeHTML(Q):"")+'</h3></div><ol start="'+(S>1?S:1)+'">'+V+"</ol></div></div>"}).bind(this));I=I.replace(z,i)}}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:I});return I},_expandFormatting:function(e,c,f){if(!e.length){return c+this.opts.invisibleSpace+f}var b=e.indexOf("[/td]");if(b!==-1){var d=e.substring(0,b);if(d.indexOf("[td]")===-1){return c+d+f+e.substring(b)}}var d=e.split("\n");e="";for(var i=0,h=d.length;i<h;i++){var g=d[i];if(g.length===0){g=this.opts.invisibleSpace}if(e.length){e+="\n"}e+=c+g+f}return e},_pasteBeforeCallback:function(b){var c={1:24,2:22,3:18,4:14,5:12,6:10};b=b.replace(/<h([1-6])([^>]*)>/g,function(g,j,i){if(i&&i.match(/style="([^"]+?)"/)){if(/font-size: ?(\d+|\d+\.\d+)(px|pt|em|rem|%)/.test(RegExp.$1)){var d=$('<div style="width: '+RegExp.$1+RegExp.$2+'; position: absolute;" />').appendTo(document.body);var f=parseInt(d[0].clientWidth);d.remove();var e=-1;var h=false;$.each(c,function(m,l){if(e===-1){e=m}else{if(Math.abs(f-l)<Math.abs(f-c[e])){e=m}}if(f==l){h=true}});if(!h){e=(e<6)?parseInt(e)+1:e}j=e}}return"[size="+c[j]+"]"});b=b.replace(/<\/h[1-6]>/g,"[/size]");b=b.replace(/<(article|header)[^>]+>/g,"<div>");b=b.replace(/<\/(article|header)>/g,"</div>");b=b.replace(/<(div|p)([^>]+)?><(div|p)([^>]+)?>/g,"<p>");b=b.replace(/<\/(div|p)><\/(div|p)>/g,"</p>");b=b.replace(/<(?:div|p|span)[^>]+>/gi,function(d){return d.replace(/ class="[^"]+"/,"")});b=b.replace(/<\/?wbr[^>]*>/g,"");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:b});return b},_pasteCallback:function(b){b=b.replace(/\[size=(\d+)\]/g,'<p><span style="font-size: $1pt">');b=b.replace(/\[\/size\]/g,"</span></p>");b=b.replace(/style="([^"]+)"/,function(c,e){var d=e.split(";");var g=[];for(var i=0,f=d.length;i<f;i++){var h=d[i];if(!h.match(/^\s*background-color/)){g.push(h)}}return'style="'+g.join(";")+'"'});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterPaste",{html:b});return b;b=b.replace(/<img([^>]+)>/g,function(c,d){c=c.replace(/data-mozilla-paste-image="0"/,'data-mozilla-paste-image="0" style="display:none"');return c});return b},insertAttachment:function(f,d){f=parseInt(f);var b=this.wutil.getOption("woltlab.attachment"+(!d?"Thumbnail":"")+"Url");var e=this.wbbcode._getImageAttachments();if(b&&e[f]!==undefined){var c="";if(d){c=' style="width: '+e[f].width+"px; max-height: "+e[f].height+"px; max-width: "+e[f].width+'px;"'}this.wutil.insertDynamic('<img src="'+b.replace(/987654321/,f)+'" class="redactorEmbeddedAttachment'+(!d?" redactorDisableResize":"")+'" data-attachment-id="'+f+'"'+c+" />","[attach="+f+(d?",none,"+e[f].width:"")+"][/attach]")}else{this.wutil.insertDynamic("[attach="+f+"][/attach]")}},removeAttachment:function(b){if(!this.opts.visual){return}this.$editor.find("img.redactorEmbeddedAttachment").each(function(c,e){var d=$(e);if(d.data("attachmentID")==b){d.remove()}})},_getImageAttachments:function(){var c=this.wutil.getOption("woltlab.attachmentImages")||[];if(c.length){delete this.opts.attachmentImages;return c}var b={imageAttachments:{}};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$textarea.wcfIdentify(),b);return b.imageAttachments},_keydownCallback:function(x){switch(x.event.which){case $.ui.keyCode.BACKSPACE:case $.ui.keyCode.DELETE:case $.ui.keyCode.DOWN:case $.ui.keyCode.ENTER:case $.ui.keyCode.UP:case 83:break;default:return;break}this.selection.get();var p=this.selection.getCurrent();var n=this.selection.getParent();n=(n)?$(n):n;var j=(n)?n.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};switch(x.event.which){case $.ui.keyCode.BACKSPACE:if(this.wutil.isCaret()){var h=false;if(j.length){var k=true;for(var b=0;b<j[0].children.length;b++){var w=j[0].children[b];if(w.tagName==="DIV"){if(w.textContent.replace(/\u200b/,"").length){k=false;break}}}if(k){h=true}else{var m=(this.selection.implicitRange===null)?this.range:this.selection.implicitRange;if(m.startOffset===0){var d=m.startContainer,o;while((d=d.parentNode)!==null){o=d.previousSibling;if(o!==null){if(o.nodeType===Node.ELEMENT_NODE&&o.nodeName==="HEADER"){h=true}break}}}}}else{var f=(this.selection.implicitRange===null)?this.range:this.selection.implicitRange;var q=f.startContainer;if(q.nodeType===Node.TEXT_NODE){if(f.startOffset===0||(f.startOffset===1&&q.textContent==="\u200b")){if(!q.previousSibling){q=q.parentElement}}}if(q.nodeType===Node.ELEMENT_NODE){var i=q.previousSibling;if(i&&i.nodeType===Node.ELEMENT_NODE&&i.tagName==="BLOCKQUOTE"){j=i;h=true}}}if(h){var t=window.getSelection();if(t.rangeCount){t.removeAllRanges()}var r=document.createRange();r.selectNode(j[0]||j);t.addRange(r);x.cancel=true}}break;case $.ui.keyCode.DELETE:if(this.wutil.isCaret()&&this.wutil.isEndOfElement(p)){var v=p.nextElementSibling;if(v&&v.tagName==="BLOCKQUOTE"){var t=window.getSelection();if(t.rangeCount){t.removeAllRanges()}var r=document.createRange();r.selectNode(v);t.addRange(r);x.cancel=true}}break;case $.ui.keyCode.DOWN:var e=$(p);if(e.next("blockquote").length){this.caret.setStart(e.next().children("div:first"));x.cancel=true}else{if(n){if(n.next("blockquote").length){this.caret.setStart(n.next().children("div:first"));x.cancel=true}else{if(j.length){var s=e.closest("div",j[0]);if(!s.next().length){if(j.next().length){this.caret.setStart(j.next())}else{this.wutil.setCaretAfter(j)}x.cancel=true}}}}}break;case $.ui.keyCode.ENTER:if(j.length){this.keydown.blockquote=false;this.keydown.enterWithinBlockquote=true}break;case $.ui.keyCode.UP:if(!n||!j.length){return}var s=$(p).closest("div",j[0]);var u=s.prev();if(u[0].tagName==="DIV"){return}else{if(u[0].tagName==="BLOCKQUOTE"){return}}var l=j.prev();if(l.length===0){this.wutil.setCaretBefore(j)}else{if(l[0].tagName==="BLOCKQUOTE"){this.caret.sendEnd(l.children("div:last"))}else{if($.trim(l.html())==""){l.html(this.opts.invisibleSpace)}this.caret.setEnd(l)}}x.cancel=true;break;case 83:if($.browser.mobile){return}var c=false;if(navigator.platform.match(/^Mac/)){if(x.event.ctrlKey&&x.event.altKey){c=true}}else{if(x.event.altKey&&!x.event.ctrlKey){c=true}}if(c){var g={cancel:false};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","submitEditor_"+this.$textarea.wcfIdentify(),g);if(g.cancel){x.cancel=true}}break}},_keyupCallback:function(d){switch(d.event.which){case $.ui.keyCode.BACKSPACE:case $.ui.keyCode.DELETE:this.$editor.find("blockquote").each(function(h,j){var i=$(j);if(!i.children("header").length){i.remove()}});break;case $.ui.keyCode.ENTER:for(var g=0,f=this.$editor[0].children.length;g<f;g++){var c=this.$editor[0].children[g];if(c.nodeType!==Node.ELEMENT_NODE||c.tagName!=="P"){continue}if(c.textContent.length>0){continue}if(c.children.length>1||c.children[0].tagName==="BR"){continue}c=c.children[0];while(c.children.length===1){c=c.children[0]}if(c.children.length===0&&c.tagName==="BR"){var e=c.parentNode;var b=document.createTextNode("\u200b");e.appendChild(b);e.removeChild(c)}}break}},observeQuotes:function(){this.$editor.find(".redactorQuoteEdit").off("click.wbbcode").on("click.wbbcode",$.proxy(this.wbbcode._observeQuotesClick,this))},_observeQuotesClick:function(e){var c=$(e.currentTarget).closest("header");var d=$('<span class="redactor-link-tooltip" />');$('<a href="#">'+WCF.Language.get("wcf.bbcode.quote.edit")+"</a>").click($.proxy(function(f){f.preventDefault();this.wbbcode._openQuoteEditOverlay($(e.currentTarget).closest("blockquote.quoteBox"),false);$(".redactor-link-tooltip").remove()},this)).appendTo(d);var b=c.offset();d.css({left:b.left+"px",top:(b.top+20)+"px"});$(".redactor-link-tooltip").remove();d.appendTo(document.body);this.selection.remove()},observeCodeListings:function(){this.$editor.find(".codeBox").each((function(b,e){var c=$(e);var d=c.find(".redactorEditCodeBox");if(!d.length){d=$('<div class="redactorEditCodeBox"><div>'+WCF.Language.get("wcf.bbcode.code.edit")+"</div></div>").insertAfter(c.find("> div > div > h3"))}d.off("click.wbbcode").on("click.wbbcode",(function(){this.wbbcode._handleInsertCode(c,false)}).bind(this))}).bind(this))},_openQuoteEditOverlay:function(b,d){this.modal.load("quote",WCF.Language.get("wcf.bbcode.quote."+(d?"insert":"edit")),400);var c=this.modal.createActionButton(this.lang.get("save"));if(d){this.selection.save();c.click($.proxy(function(){var g=$("#redactorQuoteAuthor").val();var f=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.selection.restore();a=true;var e=this.selection.getHtml();if(this.utils.isEmpty(e)){e=""}var h=this.wbbcode.insertQuoteBBCode(g,f,e);if(h!==null){if(!e.length){if($.browser.mozilla){h.children("br[type=_moz]").replaceWith("<div>"+this.opts.invisibleSpace+"</div>")}this.caret.setStart(h.children("div")[0])}}this.modal.close()},this))}else{$("#redactorQuoteAuthor").val(b.data("author"));$("#redactorQuoteLink").val(WCF.String.unescapeHTML(b.attr("cite")));c.click($.proxy(function(){var e=$("#redactorQuoteAuthor").val();b.data("author",e);b.attr("data-author",e);b.prop("cite",WCF.String.escapeHTML($("#redactorQuoteLink").val()));this.wbbcode._updateQuoteHeader(b);this.modal.close()},this))}this.modal.show()},_updateQuoteHeader:function(c){var d=c.data("author");var b=c.attr("cite");if(b){b=WCF.String.escapeHTML(b)}c.find("> header > h3").empty().append(this.wbbcode._buildQuoteHeader(d,b))},insertQuoteBBCode:function(g,l,i,j){var k="[quote]";var c="[/quote]";if(g){if(l){k="[quote='"+g+"','"+l+"']"}else{k="[quote='"+g+"']"}}var p=null;if(this.wutil.inWysiwygMode()){var o=WCF.getUUID();var e="";if(j){e=this.wbbcode.convertToHtml(k+j+c)}else{e=this.wbbcode.convertToHtml(k+o+c);e=e.replace(o,i.replace(/^<p>/,"").replace(/<\/p>$/,""))}e=e.replace(/^<p>/,"").replace(/<\/p>$/,"");e=e.replace(/<blockquote/,'<blockquote id="'+o+'"');if(!window.getSelection().rangeCount){this.wutil.restoreSelection();if(!window.getSelection().rangeCount){this.$editor.focus();if(!window.getSelection().rangeCount){this.wutil.selectionEndOfEditor()}this.wutil.saveSelection()}}window.getSelection().getRangeAt(0).deleteContents();this.wutil.restoreSelection();var h=window.getSelection().getRangeAt(0);var b=h.startContainer;while(b){var f=b.parentNode;if(f===this.$editor[0]){break}b=f}if(b&&b.parentNode===this.$editor[0]){if(b.innerHTML.length){if(b.innerHTML==="\u200b"){this.caret.setEnd(b)}else{this.wutil.setCaretAfter(b)}}}this.insert.html(e,false);p=this.$editor.find("#"+o);if(p.length){var n=p.find("> div");if(n.length==1){if(n[0].innerHTML===""){n[0].innerHTML=this.opts.invisibleSpace}}else{if($.browser.mozilla){var m=p.find("> div > br[type=_moz]");if(m.length){$("<div>"+this.opts.invisibleSpace+"</div>").insertBefore(m);m.remove()}}}p.removeAttr("id");this.wutil.setCaretAfter(p[0]);var d=p[0].previousElementSibling;if(d!==null&&d.nodeName==="P"&&d.innerHTML==="\u200B"){d=d.previousElementSibling;if(d!==null&&d.nodeName==="P"&&(d.innerHTML==="\u200B"||d.innerHTML==="<br>")){d.parentNode.removeChild(d.nextElementSibling)}}}this.wbbcode.observeQuotes();this.wbbcode.fixBlockLevelElements();this.$toolbar.find("a.re-__wcf_quote").removeClass("redactor-button-disabled")}else{this.wutil.insertAtCaret(k+j+c)}this.wutil.saveSelection();return p},_buildQuoteHeader:function(c,d){var b="";if(!c&&d){c=d;d=""}if(c){if(d){b+='<a href="'+d+'" tabindex="-1">'}b+=WCF.Language.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:WCF.String.unescapeHTML(c)});if(d){b+="</a>"}}else{b="<small>"+WCF.Language.get("wcf.bbcode.quote.title.clickToSet")+"</small>"}return b},_handleInsertQuote:function(){this.wbbcode._openQuoteEditOverlay(null,true)},_handleInsertCode:function(d,f){this.modal.load("code",WCF.Language.get("wcf.bbcode.code."+(f?"insert":"edit")),400);var b=this.modal.createActionButton(this.lang.get("save")).addClass("buttonPrimary");if(f){this.selection.get();var c=this.selection.getText();this.selection.save();this.modal.show();var j=$("#redactorCodeBox").focus();j.val(c);b.click($.proxy(function(){var q=$("#redactorCodeBox");var n=$("#redactorCodeFilename");var s=$("#redactorCodeHighlighter");var t=$("#redactorCodeLineNumber");var p=q.val().replace(/^\n+/,"").replace(/\n+$/,"");if($.trim(p).length===0){if(!q.next("small.innerError").length){$('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(q)}return}var o=$.trim(n.val().replace(/['"]/g,""));var r="[code="+s.val()+","+t.val()+(o.length?",'"+o+"'":"")+"]";if(r.match(/\[code=([^,]+),(\d+)\]/)){r="[code="+RegExp.$2+","+RegExp.$1+"]"}r+=p;r+="[/code]";this.wutil.adjustSelectionForBlockElement();this.wutil.saveSelection();var m=this.wbbcode.convertToHtml(r);this.buffer.set();this.insert.html(m,false);var q=this.$editor.find(".codeBox:not(.jsRedactorCodeBox)");this.wbbcode.observeCodeListings();this.wbbcode.fixBlockLevelElements();q.attr("contenteditable","false");this.wutil.setCaretAfter(q[0]);this.modal.close()},this))}else{var h=this.modal.createActionButton(WCF.Language.get("wcf.global.button.delete"));h.click((function(){this.buffer.set();d.remove();this.modal.close()}).bind(this));this.modal.show();var j=$("#redactorCodeBox").focus();var i=$("#redactorCodeFilename");var g=$("#redactorCodeHighlighter");var k=$("#redactorCodeLineNumber");g.val(d.data("highlighter"));i.val(d.data("filename")||"");var e=d.find("> div > ol");k.val(parseInt(e.prop("start")));var l="";e.children("li").each(function(m,n){l+=$(n).text().replace(/^\u200b$/,"")+"\n"});j.val(l.replace(/^\n+/,"").replace(/\n+$/,""));b.click($.proxy(function(){var n=j.val().replace(/^\n+/,"").replace(/\n+$/,"");if($.trim(n).length===0){if(!j.next("small.innerError").length){$('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(j)}return}var r=g.val();d.data("highlighter",r);d.attr("data-highlighter",r);var o=__REDACTOR_CODE_HIGHLIGHTERS[r];var m=$.trim(i.val().replace(/['"]/g,""));if(m){o+=": "+WCF.String.escapeHTML(m);d.data("filename",m);d.attr("data-filename",m)}else{d.removeAttr("data-filename");d.removeData("filename")}d.data("highlighter",g.val());d.find("> div > div > h3").html(o);var p=d.find("> div > ol").empty();var s=parseInt(k.val());p.prop("start",(s>1?s:1));n=n.split("\n");var q="";for(var t=0;t<n.length;t++){q+="<li>"+WCF.String.escapeHTML(n[t])+"</li>"}p.append($(q));this.modal.close()},this))}},fixBlockLevelElements:function(){var b=(function(e,c){var d=e[c];if(d&&d.nodeType===Node.ELEMENT_NODE&&d.tagName==="P"){if(!d.innerHTML.length){d.parentElement.removeChild(d)}}}).bind(this);this.$editor.find("blockquote, .codeBox").each(function(){b(this,"previousElementSibling");b(this,"nextElementSibling")})},fixFormatting:function(d){var b=function(f){f.style.removeProperty("text-align");for(var g=0;g<f.children.length;g++){b(f.children[g])}};for(var e=0;e<this.alignment.blocks.length;e++){var c=this.alignment.blocks[e];switch(c.tagName){case"BLOCKQUOTE":c.style.removeProperty("text-align");b(c.children[0]);break;case"DIV":if(/\bcodeBox\b/.test(c.className)){b(c)}break}}}}};
+if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wbbcode=function(){"use strict";var e=!1;return{init:function(){var t=this.$textarea.wcfIdentify();this.opts.initCallback=function(){$.browser.msie&&this.$editor.addClass("msie");var e=$.trim(this.wutil.getOption("woltlab.originalValue"));e.length&&(this.wutil.replaceText(e),this.wutil.selectionEndOfEditor()),delete this.opts.woltlab.originalValue,$(document).trigger("resize"),this.wutil.saveSelection()}.bind(this),this.opts.pasteBeforeCallback=$.proxy(this.wbbcode._pasteBeforeCallback,this),this.opts.pasteCallback=$.proxy(this.wbbcode._pasteCallback,this);var i=this.clean.onSync;this.clean.onSync=function(t){return t=t.replace(/\u200C/g,"__wcf_zwnj__"),t=t.replace(/\u200D/g,"__wcf_zwj__"),e===!0?e=!1:t=t.replace(/<p><br([^>]+)?><\/p>/g,"<p>@@@wcf_empty_line@@@</p>"),t=i.call(this,t),t=t.replace(/__wcf_zwnj__/g,"‌"),t.replace(/__wcf_zwj__/g,"‍")}.bind(this),this.wutil.getOption("woltlab.autosaveOnce")&&(this.wutil.saveTextToStorage(),delete this.opts.woltlab.autosaveOnce);var a=this.button.get("table");if(a.length){var r=a.data("dropdown");r.find(".redactor-dropdown-add_head").parent().remove(),r.find(".redactor-dropdown-delete_head").parent().remove(),$('<li class="dropdownDivider" />').insertBefore(r.find(".redactor-dropdown-delete_table").parent()),a.click($.proxy(this.wbbcode._tableButtonClick,this))}WCF.System.Event.addListener("com.woltlab.wcf.redactor","insertBBCode_quote_"+t,$.proxy(function(e){e.cancel=!0,this.wbbcode._handleInsertQuote()},this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","insertBBCode_code_"+t,$.proxy(function(e){e.cancel=!0,this.wbbcode._handleInsertCode(null,!0)},this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+t,$.proxy(this.wbbcode._keydownCallback,this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","keyup_"+t,$.proxy(this.wbbcode._keyupCallback,this)),this.code.sync=function(){};var n=$(".redactor-toolbar-tooltip-html:not(.jsWbbcode)").addClass("jsWbbcode").text(WCF.Language.get("wcf.bbcode.button.toggleBBCode")),l=function(e){e.find("br").each(function(e,t){t.children.length&&$(t).empty()})};this.code.toggle=function(){this.opts.visual?(this.code.startSync(),this.code.showCode(),this.$textarea.val(this.wbbcode.convertFromHtml(this.$textarea.val())),this.button.get("html").children("i").removeClass("fa-square-o").addClass("fa-square"),n.text(WCF.Language.get("wcf.bbcode.button.toggleHTML"))):(this.$textarea.val(this.wbbcode.convertToHtml(this.$textarea.val())),this.code.offset=this.$textarea.val().length,this.code.showVisual(),this.wbbcode.fixBlockLevelElements(),this.wutil.selectionEndOfEditor(),this.wbbcode.observeQuotes(),this.wbbcode.observeCodeListings(),this.button.get("html").children("i").removeClass("fa-square").addClass("fa-square-o"),n.text(WCF.Language.get("wcf.bbcode.button.toggleBBCode")),this.wutil.fixDOM(),l(this.$editor),this.wutil.saveSelection())}.bind(this),this.wutil.setOption("clickCallback",function(e){this.wutil.saveSelection(),e.target===this.$editor[0]&&this.$editor[0].lastElementChild&&"BLOCKQUOTE"===this.$editor[0].lastElementChild.tagName&&this.wutil.setCaretAfter($(this.$editor[0].lastElementChild))}.bind(this));var o=this.opts.verifiedTags.indexOf("ul");o>-1&&this.opts.verifiedTags.splice(o,1),WCF.System.Event.addListener("com.woltlab.wcf.redactor","observe_load_"+t,function(e){this.wbbcode.observeCodeListings(),this.wbbcode.observeQuotes()}.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","fixFormatting_"+t,$.proxy(this.wbbcode.fixFormatting,this))},_tableButtonClick:function(e){var t=$(e.currentTarget);if(t.hasClass("dropact")){var i=this.selection.getBlock()||this.selection.getCurrent(),a=t.data("dropdown");a.children("li").show();var r=a.find("> li > .redactor-dropdown-insert_table").parent();"TD"==i.tagName?r.hide():r.nextAll().hide()}},insertSmiley:function(e,t,i){if(i&&this.wbbcode.registerSmiley(e,t),this.opts.visual){var a=null;window.getSelection().rangeCount&&window.getSelection().getRangeAt(0).collapsed&&(a=window.getSelection().getRangeAt(0).startContainer,a.nodeType===Node.TEXT_NODE&&(a=a.parentElement),this.utils.isRedactorParent(a)||(a=null)),this.insert.html('<img src="'+t+'" class="smiley" alt="'+e+'" id="redactorSmiley">',!1);var r=document.getElementById("redactorSmiley");if(r.removeAttribute("id"),null!==a){var n=window.getSelection().getRangeAt(0).startContainer;n.nodeType===Node.TEXT_NODE&&(n=n.parentElement),a!==n&&a.appendChild(r)}var l=function(e){return null===e?!1:(e.nodeType===Node.ELEMENT_NODE&&"SPAN"===e.nodeName||e.nodeType===Node.TEXT_NODE)&&" "===e.textContent?!0:!1},o=r.parentElement;if(!l(r.previousSibling)){var c=document.createTextNode(" ");o.insertBefore(c,r)}if(!l(r.nextSibling)){var c=document.createTextNode(" ");o.lastChild===r?o.appendChild(c):o.insertBefore(c,r.nextSibling)}}else this.wutil.insertAtCaret(" "+e+" ")},registerSmiley:function(e,t){return __REDACTOR_SMILIES[e]?!1:(__REDACTOR_SMILIES[e]=t,!0)},convertFromHtml:function(e){var t=[];WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertFromHtml",{html:e}),e=e.replace(/(<[^>]+?) data-redactor-tag="[^"]+"/g,"$1"),e=e.replace(/(<[^>]+?) rel="[^"]+"/g,"$1"),e=e.replace(/&#(8203|x200b);/g,""),e=e.replace(/&trade;/gi,"™"),e=e.replace(/&copy;/gi,"©"),e=e.replace(/&hellip;/gi,"…"),e=e.replace(/&mdash;/gi,"—"),e=e.replace(/&dash;/gi,"‐");var i={};e=e.replace(/<div([^>]+?)class="codeBox[^"]+"([^>]*?)>\n*<div>[\s\S]+?<ol start="(\d+)">([\s\S]+?)<\/ol>\n*<\/div>\n*<\/div>/g,function(e,t,a,r,n){var l=t+" "+a,o="",c="";l.match(/data-highlighter="([a-zA-Z]+)"/)&&(o=RegExp.$1),l.match(/data-filename="([^"]+)"/)&&(c=$.trim(RegExp.$1));var s=WCF.getUUID();return i[s]={codeContent:n.replace(/<li>/g,"").replace(/<\/li>/g,"\n").replace(/\n$/,""),filename:c.replace(/['"]/g,""),highlighter:"plain"===o?"":o,lineNumber:r>1?r:0},"@@@"+s+"@@@"}),e=e.replace(/\r?\n/g,""),e=e.replace(/<a[^>]*?><\/a>/g,""),e=e.replace(/<p><\/p><table/g,"<table"),e=e.replace(/<\/table><p><\/p>/g,"</table>");for(var a in i)e=e.replace(new RegExp("<p></p>@@@"+a+"@@@<p></p>"),"@@@"+a+"@@@");e=e.replace(/<p><\/p><p>(?!<br>)/g,"<p>@@@wcf_empty_line@@@</p><p>"),e=e.replace(/<br( \/)?><\/p>/g,"</p>");for(var r=e.split(/(<\/?(?:div|p)>)/),n="",l="",o=0;o<r.length;o++){var c=r[o];"<p>"!=c&&"<div>"!=c&&("</p>"==c||"</div>"==c?(l=$.trim(l),"@@@wcf_empty_line@@@"!=l&&(l+="\n"),n+=l,l=""):0==o||o+1==r.length?n+=c:l+=c)}l&&(n+=l,l=""),e=n,e=e.replace(/@@@wcf_empty_line@@@/g,"\n"),e=e.replace(/\n\n$/,"\n"),e=e.replace(/<br>$/,""),e=e.replace(/<br>/g,"\n"),e=e.replace(/<br>/g,""),e=e.replace(/&nbsp;/gi," "),e=e.replace(/<blockquote([^>]+)>\n?<header[^>]*?>[\s\S]*?<\/header>/gi,function(e,t,i){var a,r="",n="";return t.match(/data-author="([^"]+)"/)&&(r=WCF.String.unescapeHTML(RegExp.$1)),t.match(/cite="([^"]+)"/)&&(n=WCF.String.unescapeHTML(RegExp.$1)),a=n?"[quote='"+r+"','"+n+"']":r?"[quote='"+r+"']":"[quote]"}),e=e.replace(/(?:\n*)<\/blockquote>\n?/gi,"\n[/quote]\n"),e=e.replace(/<a [^>]*?href=(["'])mailto:(.+?)\1.*?>([\s\S]+?)<\/a>/gi,"[email=$2]$3[/email]"),e=e.replace(/<a[^>]+><\/a>/,""),e=e.replace(/<a [^>]*?href=(["'])(.+?)\1.*?>([\s\S]+?)<\/a>/gi,function(e,t,i,a){return i==a?"[url]"+i+"[/url]":"[url='"+i+"']"+a+"[/url]"}),e=e.replace(/<(?:b|strong)>/gi,function(){return-1===t.indexOf("b")&&t.push("b"),"[b]"}),e=e.replace(/<\/(?:b|strong)>/gi,"[/b]"),e=e.replace(/<(?:i|em)>/gi,function(){return-1===t.indexOf("i")&&t.push("i"),"[i]"}),e=e.replace(/<\/(?:i|em)>/gi,"[/i]"),e=e.replace(/<u>/gi,function(){return-1===t.indexOf("u")&&t.push("u"),"[u]"}),e=e.replace(/<\/u>/gi,"[/u]"),e=e.replace(/<sub>/gi,function(){return-1===t.indexOf("sub")&&t.push("sub"),"[sub]"}),e=e.replace(/<\/sub>/gi,"[/sub]"),e=e.replace(/<sup>/gi,function(){return-1===t.indexOf("sup")&&t.push("sup"),"[sup]"}),e=e.replace(/<\/sup>/gi,"[/sup]"),e=e.replace(/<(?:s(trike)?|del)>/gi,function(){return-1===t.indexOf("s")&&t.push("s"),"[s]"}),e=e.replace(/<\/(?:s(trike)?|del)>/gi,"[/s]");for(var s=e.split(/(<\/?span[^>]*>)/),l=[],d=[],p="",h={11:8,13:10,16:12,19:14,24:18,29:22,32:24,48:36},o=0;o<s.length;o++){var g=s[o];if("</span>"==g){var u=d.pop(),n=u.start+l.pop()+u.end;l.length?l[l.length-1]+=n:p+=n}else if(g.match(/^<span/))if(g.match(/^<span(?:.*?)style="([^"]+)"(?:[^>]*?)>/)){var f,m,b=RegExp.$1;if(b.match(/(?:^|;\s*)color: ?rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\);?/i)){var v=RegExp.$1,w=RegExp.$2,E=RegExp.$3,C="0123456789ABCDEF".charAt((v-v%16)/16)+""+"0123456789ABCDEF".charAt(v%16)+("0123456789ABCDEF".charAt((w-w%16)/16)+""+"0123456789ABCDEF".charAt(w%16))+("0123456789ABCDEF".charAt((E-E%16)/16)+""+"0123456789ABCDEF".charAt(E%16));f="[color=#"+C+"]",m="[/color=#"+C+"]",-1===t.indexOf("color")&&t.push("color")}else b.match(/(?:^|;\s*)color: ?([^;]+);?/i)?(f="[color="+RegExp.$1+"]",m="[/color="+RegExp.$1+"]",-1===t.indexOf("color")&&t.push("color")):b.match(/font-size: ?(\d+)(pt|px);?/i)?"pt"==RegExp.$2?(f="[size="+RegExp.$1+"]",m="[/size="+RegExp.$1+"]",-1===t.indexOf("size")&&t.push("size")):h[RegExp.$1]?(f="[size="+h[RegExp.$1]+"]",m="[/size="+h[RegExp.$1]+"]",-1===t.indexOf("size")&&t.push("size")):(f="",m=""):b.match(/font-family: ?([^;]+);?/)?(f="[font='"+RegExp.$1.replace(/'/g,"")+"']",m="[/font='"+RegExp.$1.replace(/'/g,"")+"']",-1===t.indexOf("font")&&t.push("font")):(f='<span style="'+b+'">',m="</span>");l[l.length]="",d[l.length]={start:f,end:m}}else g.match(/^<span class="inlineCode">/)?(l[l.length]="",d[l.length]={start:"[tt]",end:"[/tt]"}):(l[l.length]="",d[l.length]={start:"",end:""});else l.length?l[l.length-1]+=g:p+=g}if(e=p,e=e.replace(/<(div|p) style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)\n/gi,function(e,i,a,r){return-1===t.indexOf("align")&&t.push("align"),"[align="+a+"]"+$.trim(r)+"[/align="+a+"]\n"}),t.length){for(var x=!0;x;)x=!1,e=e.replace(new RegExp("\\[\\/((?:"+t.join("|")+")=[^\\]]+?)\\]\n\\[\\1\\]","gi"),function(){return x=!0,"\n"});e=e.replace(new RegExp("\\[\\/("+t.join("|")+")=[^\\]]+?\\]","gi"),"[/$1]")}e=e.replace(/ ?<img [^>]*?alt="([^"]+?)"[^>]*?class="smiley"[^>]*?> ?/gi," $1 "),e=e.replace(/ ?<img [^>]*?class="smiley"[^>]*?alt="([^"]+?)"[^>]*?> ?/gi," $1 "),e=e.replace(/<img([^>]*?)class="[^"]*redactorEmbeddedAttachment[^"]*"([^>]*?)>/gi,function(e,t,i){var a,r=t+" "+i;if(!r.match(/data-attachment-id="(\d+)"/))return e;a=RegExp.$1;var n="none",l=null;if(r.match(/style="([^"]+)"/)){for(var o=RegExp.$1.split(";"),c=0;c<o.length;c++){var s=$.trim(o[c]);s.match(/^float: (left|right)$/)?n=RegExp.$1:s.match(/^width: (\d+)px$/)&&(l=RegExp.$1)}if(null!==l)return"[attach="+a+","+n+","+l+"][/attach]";if("none"!==n)return"[attach="+a+","+n+"][/attach]"}return"[attach="+a+"][/attach]"}),e=e.replace(/<img([^>]*)?src=(["'])([^"']+?)\2([^>]*)?>/gi,function(e,t,i,a,r){var n=t+" "+r,l="";n.match(/style="([^"]+)"/)&&(l=RegExp.$1);for(var o="none",c=0,s=l.split(";"),d=0;d<s.length;d++){var p=s[d];p.match(/float: (left|right|none)/)?o=RegExp.$1:p.match(/width: (\d+)px/)&&(c=parseInt(RegExp.$1))}return c?"[img='"+a+"',"+o+","+c+"][/img]":"none"!==o?"[img='"+a+"',"+o+"][/img]":"[img]"+a+"[/img]"}),e=e.replace(/<li>/gi,"[*]"),e=e.replace(/<\/li>/gi,"\n"),e=e.replace(/<ul>/gi,"[list]"),e=e.replace(/<(ol|ul style="list-style-type: decimal")>/gi,"[list=1]"),e=e.replace(/<ul style="list-style-type: (none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)">/gi,"[list=$1]"),e=e.replace(/<\/(ul|ol)>/gi,"[/list]"),e=e.replace(/\n?\[list\]/g,"\n[list]"),e=e.replace(/\[\/list\]\n\[\*\]/g,"[/list][*]"),e=e.replace(/\[\/list\]\n\[\/list\]/g,"[/list][/list]"),e=e.replace(/<table[^>]*>/gi,"[table]\n"),e=e.replace(/<\/table>\n?/gi,"[/table]\n"),e=e.replace(/<tbody>([\s\S]*?)<\/tbody>/,function(e,t){return $.trim(t)}),e=e.replace(/<tr><\/tr>/gi,""),e=e.replace(/<tr>/gi,"[tr]\n"),e=e.replace(/<\/tr>/gi,"[/tr]\n"),e=e.replace(/<td style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)<\/td>/gi,"[td][align=$1]$2[/align][/td]"),e=e.replace(/(\t)*<td>(\t)*/gi,"[td]"),e=e.replace(/(\t)*<\/td>/gi,"[/td]\n");var y={};if(e.replace(/<span id="selection-marker-\d+" class="redactor-selection-marker"><\/span>/,function(e){var t=e.hashCode();return y[t]=e.replace(/\$/g,"$$$$"),"@@"+t+"@@"}),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","convertFromHtml",{html:e}),e=e.replace(/<[^(<|>)]+>/g,""),$.getLength(y))for(var S in y){var _=new RegExp("@@"+S+"@@","g");data=data.replace(_,y[S])}return $.getLength(i)&&$.each(i,function(t,i){var a=0;i.highlighter&&a++,i.lineNumber&&a++,i.filename&&a++;var r="";switch(a){case 1:r=i.highlighter?i.highlighter:i.filename?"'"+i.filename+"'":i.lineNumber;break;case 2:i.lineNumber&&(r=i.lineNumber),i.highlighter&&(r.length&&(r+=","),r+=i.highlighter),i.filename&&(r.length&&(r+=","),r+="'"+i.filename+"'");break;case 3:r=i.highlighter+","+i.lineNumber+",'"+i.filename+"'"}var n="[code"+(r.length?"="+r:"")+"]"+i.codeContent+"[/code]\n";e=e.replace(new RegExp("@@@"+t+"@@@\n?","g"),n)}),e=e.replace(/&lt;/g,"<"),e=e.replace(/&gt;/g,">"),e=e.replace(/&amp;/g,"&"),e=e.replace(/%28/g,"("),e=e.replace(/%29/g,")"),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertFromHtml",{html:e}),e=$.trim(e),e.length&&(e+="\n"),e},convertToHtml:function(e){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertToHtml",{data:e}),e=this.wutil.removeZeroWidthSpace(e),e=e.replace(/&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;");var t=[],i=new RegExp("\\[("+__REDACTOR_SOURCE_BBCODES.join("|")+")([\\S\\s]+?)\\[\\/\\1\\]","gi");e=e.replace(i,function(e){var i=e.hashCode();return t.push({key:i,value:e.replace(/\$/g,"$$$$")}),"@@"+i+"@@"}),e=e.replace(/\[url\]([^"]+?)\[\/url]/gi,'<a href="$1">$1</a>'+this.opts.invisibleSpace),e=e.replace(/\[url\='([^'"]+)']([\s\S]+?)\[\/url]/gi,'<a href="$1">$2</a>'+this.opts.invisibleSpace),e=e.replace(/\[url\=([^'"\]]+)]([\s\S]+?)\[\/url]/gi,'<a href="$1">$2</a>'+this.opts.invisibleSpace),e=e.replace(/\[email\]([^"]+?)\[\/email]/gi,'<a href="mailto:$1">$1</a>'+this.opts.invisibleSpace),e=e.replace(/\[email\=([^"\]]+)](.+?)\[\/email]/gi,'<a href="mailto:$1">$2</a>'+this.opts.invisibleSpace),e=e.replace(/\[(b|i|s|sub|sup|u)\]\[\1\]/gi,"[$1]"),e=e.replace(/\[(\/(?:b|i|s|sub|sup|u))\]\[\1\]/gi,"[$1]"),e=e.replace(/\[(b|i|s|sub|sup|u)\]\[\/\1\]/gi,""),e=e.replace(/\[b\]([\s\S]*?)\[\/b]/gi,function(e,t){return this.wbbcode._expandFormatting(t,"<strong>","</strong>")}.bind(this)),e=e.replace(/\[i\]([\s\S]*?)\[\/i]/gi,function(e,t){return this.wbbcode._expandFormatting(t,"<em>","</em>")}.bind(this)),e=e.replace(/\[u\]([\s\S]*?)\[\/u]/gi,function(e,t){return this.wbbcode._expandFormatting(t,"<u>","</u>")}.bind(this)),e=e.replace(/\[s\]([\s\S]*?)\[\/s]/gi,function(e,t){return this.wbbcode._expandFormatting(t,"<del>","</del>")}.bind(this)),e=e.replace(/\[sub\]([\s\S]*?)\[\/sub]/gi,function(e,t){return this.wbbcode._expandFormatting(t,"<sub>","</sub>")}.bind(this)),e=e.replace(/\[sup\]([\s\S]*?)\[\/sup]/gi,function(e,t){return this.wbbcode._expandFormatting(t,"<sup>","</sup>")}.bind(this)),e=e.replace(/\[img\]([^"]+?)\[\/img\]/gi,'<img src="$1" />'),e=e.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi,function(e,t,i){var a="float: "+i+";";return a+="left"===i?"margin: 0 15px 7px 0":"margin: 0 0 7px 15px",'<img src="'+t+'" style="'+a+'" />'}),e=e.replace(/\[img='?([^"]*?)'?,'?(left|right|none)'?,'?(\d+)'?\]\[\/img\]/gi,function(e,t,i,a){var r="float: "+i+"; width: "+a+"px;";return r+="left"===i?"margin: 0 15px 7px 0":"margin: 0 0 7px 15px",'<img src="'+t+'" style="'+r+'" />'}),e=e.replace(/\[img='?([^"]*?)'?\]\[\/img\]/gi,'<img src="$1" />'),e=e.replace(/\[size=(\d+)\]([\s\S]*?)\[\/size\]/gi,function(e,t,i){return this.wbbcode._expandFormatting(i,'<span style="font-size: '+t+'pt">',"</span>")}.bind(this)),e=e.replace(/\[color=([#a-z0-9]*?)\]([\s\S]*?)\[\/color\]/gi,function(e,t,i){return this.wbbcode._expandFormatting(i,'<span style="color: '+t+'">',"</span>")}.bind(this)),e=e.replace(/\[font='?([a-z,\- ]*?)'?\]([\s\S]*?)\[\/font\]/gi,function(e,t,i){return this.wbbcode._expandFormatting(i,'<span style="font-family: '+t+'">',"</span>")}.bind(this)),e=e.replace(/\[align=(left|right|center|justify)\]([\s\S]*?)\[\/align\]/gi,function(e,t,i){return this.wbbcode._expandFormatting(i,'<p style="text-align: '+t+'">',"</p>")}.bind(this));var a=e.indexOf("[list");if(a>0){var r=e.substr(0,a);r=r.replace(/\[\*\]/g,""),e=r+e.substr(a)}var n=e.lastIndexOf("[/list]");if(-1===n)e=e.replace(/\[\*\]/g,""),e=e.replace(/\[list[^\]]*\]/g,"");else{var r=e.substr(n+7);r=r.replace(/\[\*\]/g,""),e=e.substr(0,n+7)+r}e=e.replace(/\[\*\]([\s\S]*?)(?=\[\*\]|\[\/list\])/gi,function(e,t){return"<li>"+$.trim(t)+"</li>"}),e=e.replace(/\n*(\[list\]<\/li>)/g,"$1"),e=e.replace(/\[list\]/gi,"<ul>"),e=e.replace(/\[list=1\]/gi,'<ul style="list-style-type: decimal">'),e=e.replace(/\[list=a\]/gi,'<ul style="list-style-type: lower-latin">'),e=e.replace(/\[list=(none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)\]/gi,'<ul style="list-style-type: $1">'),e=e.replace(/\[\/list\]/gi,"</ul>"),e=e.replace(/\[table\]([\S\s]*?)\[\/table\]/gi,function(e,t){return"[table]"+$.trim(t)+"[/table]"}),e=e.replace(/\[table\]\n*/gi,'<table border="1" cellspacing="1" cellpadding="1" style="width: 500px;">'),e=e.replace(/\[\/table\](\n*)?/gi,function(e,t){return t?(t.match(/\n/g).length>2&&(t=t.replace(/^\n/,"")),"</table>"+t):"</table>"}),e=e.replace(/\[tr\]\n*/gi,"<tr>"),e=e.replace(/\[\/tr\]\n*/gi,"</tr>"),e=e.replace(/\[td\]\n*/gi,"<td>"),e=e.replace(/\[\/td\]\n*/gi,"</td>"),e=e.replace(/<td>([\S\s]*?)<\/td>/gi,function(e,t){var i=$.trim(t);return i.length||(i="&#8203;"),"<td>"+i+"</td>"});var l=this.wutil.getOption("woltlab.attachmentUrl"),o=this.wutil.getOption("woltlab.attachmentThumbnailUrl");if(l){var c=this.wbbcode._getImageAttachments();e=e.replace(/\[attach=(\d+)\]\[\/attach\]/g,function(e,t,i){return t=parseInt(t),void 0!==c[t]?'<img src="'+o.replace(/987654321/,t)+'" class="redactorEmbeddedAttachment redactorDisableResize" data-attachment-id="'+t+'" />':e}),e=e.replace(/\[attach=(\d+),(left|right|none)\]\[\/attach\]/g,function(e,t,i){if(t=parseInt(t),void 0!==c[t]){var a="";return("left"===i||"right"===i)&&(a="float: "+i+";",a+="left"===i?"margin: 0 15px 7px 0":"margin: 0 0 7px 15px"),a=' style="'+a+'"','<img src="'+o.replace(/987654321/,t)+'" class="redactorEmbeddedAttachment redactorDisableResize" data-attachment-id="'+t+'"'+a+" />"}return e}),e=e.replace(/\[attach=(\d+),(left|right|none),(\d+)\]\[\/attach\]/g,function(e,t,i,a){if(t=parseInt(t),void 0!==c[t]){var r="width: "+a+"px; max-height: "+c[t].height+"px; max-width: "+c[t].width+"px;";return("left"===i||"right"===i)&&(r+="float: "+i+";",r+="left"===i?"margin: 0 15px 7px 0":"margin: 0 0 7px 15px"),r=' style="'+r+'"','<img src="'+l.replace(/987654321/,t)+'" class="redactorEmbeddedAttachment" data-attachment-id="'+t+'"'+r+" />"}return e})}for(var s in __REDACTOR_SMILIES){var d=s.replace(/</g,"&lt;").replace(/>/g,"&gt;"),p=new RegExp("(\\s|>|^)"+WCF.String.escapeRegExp(d)+"(?=\\s|<|$)","gi");e=e.replace(p,'$1<img src="'+__REDACTOR_SMILIES[s]+'" class="smiley" alt="'+d+'" />')}e=e.replace(/(javascript):/gi,"$1<span></span>:"),e=e.replace(/(\r|\r\n)/g,"\n");for(var h=[],g=[],u=e.split(/(\[(?:\/quote|quote|quote='[^']*?'(?:,'[^']*?')?|quote="[^"]*?"(?:,"[^"]*?")?)\])/i),f=WCF.getUUID();;){for(var m=!1,b=0;b<u.length;b++){var v=u[b];if("[/quote]"===v.toLowerCase()){m=!0;for(var w="",E=u.slice(0,b),C=!1;E.length;){var x=E.pop();if(w=x+w,x.match(/^\[quote/i)){v=w+v;var y=WCF.getUUID();h.push({hashCode:y,content:v.replace(/\$/g,"$$$$")}),g.push(y),v="@@"+y+"@@",C=!0;break}}C||(E=u.slice(0,b),v=f),u=E.concat(v,u.slice(b+1));break}}if(!m)break}e=u.join(""),e=e.replace(new RegExp(f,"g"),"[/quote]"),e=e.replace(/\n*$/,"");var S=[];e=e.replace(/(<li>[\s\S]*?<\/li>)/g,function(e){e=$.trim(e).replace(/\n/,"<br>");var t=WCF.getUUID();return S.push({key:t,content:e}),t});var r=e.split("\n");e="";for(var b=0,_=r.length;_>b;b++){var k=$.trim(r[b]);if(k.match(/^<([a-z]+)/)||k.match(/<\/([a-z]+)>$/))e+=this.reIsBlock.test(RegExp.$1.toUpperCase())||"TABLE"===RegExp.$1.toUpperCase()?k.match(/^<([a-z]+).*<\/\1>/)?k:k+"<br />":"<p>"+k+"</p>";else{if(k){if(k.match(/^@@([0-9\-]+)@@$/)&&WCF.inArray(RegExp.$1,g)){e+=k;continue}}else k="<br>";e+="<p>"+k+"</p>"}}if(e=e.replace(/<td>([\s\S]+?)<\/td>/g,function(e,t){return t=t.replace(/<br(?: \/)?>(<[uo]l)/g,"$1"),"<td>"+t.replace(/<p><br(?: \/)?><\/p>/g,"<br>").replace(/<p>/g,"").replace(/<\/p>/g,"<br>").replace(/<br>$/,"")+"</td>"}),S.length)for(var b=S.length-1;b>=0;b--)e=e.replace(S[b].key,S[b].content);if(h.length)for(var T=function(e){return e.replace(/^['"]/,"").replace(/['"]$/,"")},R=this,L=function(e){return e.replace(/\[quote(=['"].+?\1)?\]([\S\s]*)\[\/quote\]/gi,function(e,t,i){var a="",r="";if(t){switch(t=t.substr(1),t=t.split(","),t.length){case 1:a=t[0];break;case 2:a=t[0],r=t[1]}a=WCF.String.escapeHTML(T($.trim(a))),r=WCF.String.escapeHTML(T($.trim(r)))}var n='<blockquote class="quoteBox container containerPadding quoteBoxSimple" cite="'+r+'" data-author="'+a+'"><header contenteditable="false"><h3>'+R.wbbcode._buildQuoteHeader(a,r)+'</h3><a class="redactorQuoteEdit"></a></header>';i=$.trim(i);var l="";if(i.length)for(var o=i.split("\n"),c=0;c<o.length;c++){var s=o[c];if(0===s.length)s=R.opts.invisibleSpace;else if(s.match(/^@@([0-9\-]+)@@$/)&&WCF.inArray(RegExp.$1,g)){l+=s;continue}l+="<div>"+s+"</div>"}else l="<div>"+R.opts.invisibleSpace+"</div>";return n+=l,n+="</blockquote>"})},b=h.length-1;b>=0;b--){var F=h[b],O=new RegExp("@@"+F.hashCode+"@@","g");e=e.replace(O,L(F.content))}if(e=e.replace(/<(?:div|p)><(blockquote|div)/g,"<$1"),e=e.replace(/<\/(blockquote|div)><\/(?:div|p)>/g,"</$1>"),t.length)for(var b=t.length-1;b>=0;b--){var A=t[b],O=new RegExp("@@"+A.key+"@@","g"),B=A.value;B=B.replace(/^\[tt\]([\s\S]+)\[\/tt\]/,function(e,t){var i=t.split("\n");t="";for(var a=0,r=i.length;r>a;a++){var n=i[a];if(n.length)t.length&&(t+="</p><p>"),t+="[tt]"+n+"[/tt]";else{if(0===a||a+1===r)continue;t+=t.match(/\[\/tt\]$/)?"</p><p>"+this.opts.invisibleSpace:"</p><p><br>"}}return t}.bind(this)),B=B.replace(/^\[code([^\]]*)\]([\S\s]*)\[\/code\]$/,function(e,t,i){var a="plain",r=0,n="";if(t){t=t.substring(1),t=t.split(",");var l=function(e){return e.match(/^\d+$/)},o=function(e){return-1!==e.indexOf(".")||e.match(/^(["']).*\1$/)},c=function(e){return void 0!==__REDACTOR_CODE_HIGHLIGHTERS[e]},s=function(e){return e.replace(/^(["'])(.*)\1$/,"$2")};switch(t.length){case 1:l(t[0])?r=parseInt(t[0])>1?t[0]:0:o(t[0])?n=s(t[0]):c(t[0])&&(a=t[0]);break;case 2:l(t[0])?(r=parseInt(t[0])>1?t[0]:0,c(t[1])?a=t[1]:o(t[1])&&(n=s(t[1]))):(c(t[0])&&(a=t[0]),o(t[1])&&(n=s(t[1])));break;case 3:c(t[0])&&(a=t[0]),l(t[1])&&(r=t[1]),o(t[2])&&(n=s(t[2]))}}i=i.replace(/^\n+/,"").replace(/\n+$/,"").split(/\n/);for(var d="",p=0;p<i.length;p++){var h=i[p];h.length||(h=this.opts.invisibleSpace),d+="<li>"+h+"</li>"}return'<div class="codeBox container" contenteditable="false" data-highlighter="'+a+'"'+(n?' data-filename="'+WCF.String.escapeHTML(n)+'"':"")+"><div><div><h3>"+__REDACTOR_CODE_HIGHLIGHTERS[a]+(n?": "+WCF.String.escapeHTML(n):"")+'</h3></div><ol start="'+(r>1?r:1)+'">'+d+"</ol></div></div>"}.bind(this)),e=e.replace(O,B)}return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:e}),e},_expandFormatting:function(e,t,i){if(!e.length)return t+this.opts.invisibleSpace+i;var a=e.indexOf("[/td]");if(-1!==a){var r=e.substring(0,a);if(-1===r.indexOf("[td]"))return t+r+i+e.substring(a)}var r=e.split("\n");e="";for(var n=0,l=r.length;l>n;n++){var o=r[n];0===o.length&&(o=this.opts.invisibleSpace),e.length&&(e+="\n"),e+=t+o+i}return e},_pasteBeforeCallback:function(e){var t={1:24,2:22,3:18,4:14,5:12,6:10};return e=e.replace(/<h([1-6])([^>]*)>/g,function(e,i,a){if(a&&a.match(/style="([^"]+?)"/)&&/font-size: ?(\d+|\d+\.\d+)(px|pt|em|rem|%)/.test(RegExp.$1)){var r=$('<div style="width: '+RegExp.$1+RegExp.$2+'; position: absolute;" />').appendTo(document.body),n=parseInt(r[0].clientWidth);r.remove();var l=-1,o=!1;$.each(t,function(e,i){-1===l?l=e:Math.abs(n-i)<Math.abs(n-t[l])&&(l=e),n==i&&(o=!0)}),o||(l=6>l?parseInt(l)+1:l),i=l}return"[size="+t[i]+"]"}),e=e.replace(/<\/h[1-6]>/g,"[/size]"),e=e.replace(/<(article|header)[^>]+>/g,"<div>"),e=e.replace(/<\/(article|header)>/g,"</div>"),e=e.replace(/<(div|p)([^>]+)?><(div|p)([^>]+)?>/g,"<p>"),e=e.replace(/<\/(div|p)><\/(div|p)>/g,"</p>"),e=e.replace(/<(?:div|p|span)[^>]+>/gi,function(e){return e.replace(/ class="[^"]+"/,"")}),e=e.replace(/<\/?wbr[^>]*>/g,""),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:e}),e},_pasteCallback:function(e){return e=e.replace(/\[size=(\d+)\]/g,'<p><span style="font-size: $1pt">'),e=e.replace(/\[\/size\]/g,"</span></p>"),e=e.replace(/style="([^"]+)"/,function(e,t){for(var i=t.split(";"),a=[],r=0,n=i.length;n>r;r++){var l=i[r];l.match(/^\s*background-color/)||a.push(l)}return'style="'+a.join(";")+'"'}),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterPaste",{html:e}),e},insertAttachment:function(e,t){e=parseInt(e);var i=this.wutil.getOption("woltlab.attachment"+(t?"":"Thumbnail")+"Url"),a=this.wbbcode._getImageAttachments();if(i&&void 0!==a[e]){var r="";t&&(r=' style="width: '+a[e].width+"px; max-height: "+a[e].height+"px; max-width: "+a[e].width+'px;"'),this.wutil.insertDynamic('<img src="'+i.replace(/987654321/,e)+'" class="redactorEmbeddedAttachment'+(t?"":" redactorDisableResize")+'" data-attachment-id="'+e+'"'+r+" />","[attach="+e+(t?",none,"+a[e].width:"")+"][/attach]")}else this.wutil.insertDynamic("[attach="+e+"][/attach]")},removeAttachment:function(e){this.opts.visual&&this.$editor.find("img.redactorEmbeddedAttachment").each(function(t,i){var a=$(i);a.data("attachmentID")==e&&a.remove()})},_getImageAttachments:function(){var e=this.wutil.getOption("woltlab.attachmentImages")||[];if(e.length)return delete this.opts.attachmentImages,e;var t={imageAttachments:{}};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$textarea.wcfIdentify(),t),t.imageAttachments},_keydownCallback:function(e){switch(e.event.which){case $.ui.keyCode.BACKSPACE:case $.ui.keyCode.DELETE:case $.ui.keyCode.DOWN:case $.ui.keyCode.ENTER:case $.ui.keyCode.UP:case 83:break;default:return}this.selection.get();var t=this.selection.getCurrent(),i=this.selection.getParent();i=i?$(i):i;var a=i?i.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};switch(e.event.which){case $.ui.keyCode.BACKSPACE:if(this.wutil.isCaret()){var r=!1;if(a.length){for(var n=!0,l=0;l<a[0].children.length;l++){var o=a[0].children[l];if("DIV"===o.tagName&&o.textContent.replace(/\u200b/,"").length){n=!1;break}}if(n)r=!0;else{var c=null===this.selection.implicitRange?this.range:this.selection.implicitRange;if(0===c.startOffset)for(var s,d=c.startContainer;null!==(d=d.parentNode);)if(s=d.previousSibling,null!==s){s.nodeType===Node.ELEMENT_NODE&&"HEADER"===s.nodeName&&(r=!0);break}}}else{var p=null===this.selection.implicitRange?this.range:this.selection.implicitRange,h=p.startContainer;if(h.nodeType===Node.TEXT_NODE&&(0===p.startOffset||1===p.startOffset&&"​"===h.textContent)&&(h.previousSibling||(h=h.parentElement)),h.nodeType===Node.ELEMENT_NODE){var g=h.previousSibling;g&&g.nodeType===Node.ELEMENT_NODE&&"BLOCKQUOTE"===g.tagName&&(a=g,r=!0)}}if(r){var u=window.getSelection();u.rangeCount&&u.removeAllRanges();var f=document.createRange();f.selectNode(a[0]||a),u.addRange(f),e.cancel=!0}}break;case $.ui.keyCode.DELETE:if(this.wutil.isCaret()&&this.wutil.isEndOfElement(t)){var m=t.nextElementSibling;if(m&&"BLOCKQUOTE"===m.tagName){var u=window.getSelection();u.rangeCount&&u.removeAllRanges();var f=document.createRange();f.selectNode(m),u.addRange(f),e.cancel=!0}}break;case $.ui.keyCode.DOWN:var b=$(t);if(b.next("blockquote").length)this.caret.setStart(b.next().children("div:first")),e.cancel=!0;else if(i)if(i.next("blockquote").length)this.caret.setStart(i.next().children("div:first")),e.cancel=!0;else if(a.length){var v=b.closest("div",a[0]);v.next().length||(a.next().length?this.caret.setStart(a.next()):this.wutil.setCaretAfter(a),e.cancel=!0)}break;case $.ui.keyCode.ENTER:a.length&&(this.keydown.blockquote=!1,this.keydown.enterWithinBlockquote=!0);break;case $.ui.keyCode.UP:if(!i||!a.length)return;var v=$(t).closest("div",a[0]),w=v.prev();if("DIV"===w[0].tagName)return;if("BLOCKQUOTE"===w[0].tagName)return;var E=a.prev();0===E.length?this.wutil.setCaretBefore(a):"BLOCKQUOTE"===E[0].tagName?this.caret.sendEnd(E.children("div:last")):(""==$.trim(E.html())&&E.html(this.opts.invisibleSpace),this.caret.setEnd(E)),e.cancel=!0;break;case 83:if($.browser.mobile)return;var C=!1;if(navigator.platform.match(/^Mac/)?e.event.ctrlKey&&e.event.altKey&&(C=!0):e.event.altKey&&!e.event.ctrlKey&&(C=!0),C){var x={cancel:!1};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","submitEditor_"+this.$textarea.wcfIdentify(),x),x.cancel&&(e.cancel=!0)}}},_keyupCallback:function(e){switch(e.event.which){case $.ui.keyCode.BACKSPACE:case $.ui.keyCode.DELETE:this.$editor.find("blockquote").each(function(e,t){var i=$(t);i.children("header").length||i.remove()});break;case $.ui.keyCode.ENTER:for(var t=0,i=this.$editor[0].children.length;i>t;t++){var a=this.$editor[0].children[t];if(a.nodeType===Node.ELEMENT_NODE&&"P"===a.tagName&&!(a.textContent.length>0||a.children.length>1||"BR"===a.children[0].tagName)){for(a=a.children[0];1===a.children.length;)a=a.children[0];if(0===a.children.length&&"BR"===a.tagName){var r=a.parentNode,n=document.createTextNode("​");r.appendChild(n),r.removeChild(a)}}}}},observeQuotes:function(){this.$editor.find(".redactorQuoteEdit").off("click.wbbcode").on("click.wbbcode",$.proxy(this.wbbcode._observeQuotesClick,this))},_observeQuotesClick:function(e){var t=$(e.currentTarget).closest("header"),i=$('<span class="redactor-link-tooltip" />');$('<a href="#">'+WCF.Language.get("wcf.bbcode.quote.edit")+"</a>").click($.proxy(function(t){t.preventDefault(),this.wbbcode._openQuoteEditOverlay($(e.currentTarget).closest("blockquote.quoteBox"),!1),$(".redactor-link-tooltip").remove()},this)).appendTo(i);var a=t.offset();i.css({left:a.left+"px",top:a.top+20+"px"}),$(".redactor-link-tooltip").remove(),i.appendTo(document.body),this.selection.remove()},observeCodeListings:function(){this.$editor.find(".codeBox").each(function(e,t){var i=$(t),a=i.find(".redactorEditCodeBox");a.length||(a=$('<div class="redactorEditCodeBox"><div>'+WCF.Language.get("wcf.bbcode.code.edit")+"</div></div>").insertAfter(i.find("> div > div > h3"))),a.off("click.wbbcode").on("click.wbbcode",function(){this.wbbcode._handleInsertCode(i,!1)}.bind(this))}.bind(this))},_openQuoteEditOverlay:function(t,i){this.modal.load("quote",WCF.Language.get("wcf.bbcode.quote."+(i?"insert":"edit")),400);var a=this.modal.createActionButton(this.lang.get("save"));i?(this.selection.save(),a.click($.proxy(function(){var t=$("#redactorQuoteAuthor").val(),i=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.selection.restore(),e=!0;var a=this.selection.getHtml();this.utils.isEmpty(a)&&(a="");var r=this.wbbcode.insertQuoteBBCode(t,i,a);null!==r&&(a.length||($.browser.mozilla&&r.children("br[type=_moz]").replaceWith("<div>"+this.opts.invisibleSpace+"</div>"),this.caret.setStart(r.children("div")[0]))),this.modal.close()},this))):($("#redactorQuoteAuthor").val(t.data("author")),$("#redactorQuoteLink").val(WCF.String.unescapeHTML(t.attr("cite"))),a.click($.proxy(function(){var e=$("#redactorQuoteAuthor").val();t.data("author",e),t.attr("data-author",e),t.prop("cite",WCF.String.escapeHTML($("#redactorQuoteLink").val())),this.wbbcode._updateQuoteHeader(t),this.modal.close()},this))),this.modal.show()},_updateQuoteHeader:function(e){var t=e.data("author"),i=e.attr("cite");
+i&&(i=WCF.String.escapeHTML(i)),e.find("> header > h3").empty().append(this.wbbcode._buildQuoteHeader(t,i))},insertQuoteBBCode:function(e,t,i,a){var r="[quote]",n="[/quote]";e&&(r=t?"[quote='"+e+"','"+t+"']":"[quote='"+e+"']");var l=null;if(this.wutil.inWysiwygMode()){var o=WCF.getUUID(),c="";a?c=this.wbbcode.convertToHtml(r+a+n):(c=this.wbbcode.convertToHtml(r+o+n),c=c.replace(o,i.replace(/^<p>/,"").replace(/<\/p>$/,""))),c=c.replace(/^<p>/,"").replace(/<\/p>$/,""),c=c.replace(/<blockquote/,'<blockquote id="'+o+'"'),window.getSelection().rangeCount||(this.wutil.restoreSelection(),window.getSelection().rangeCount||(this.$editor.focus(),window.getSelection().rangeCount||this.wutil.selectionEndOfEditor(),this.wutil.saveSelection())),window.getSelection().getRangeAt(0).deleteContents(),this.wutil.restoreSelection();for(var s=window.getSelection().getRangeAt(0),d=s.startContainer;d;){var p=d.parentNode;if(p===this.$editor[0])break;d=p}if(d&&d.parentNode===this.$editor[0]&&d.innerHTML.length&&("​"===d.innerHTML?this.caret.setEnd(d):this.wutil.setCaretAfter(d)),this.insert.html(c,!1),l=this.$editor.find("#"+o),l.length){var h=l.find("> div");if(1==h.length)""===h[0].innerHTML&&(h[0].innerHTML=this.opts.invisibleSpace);else if($.browser.mozilla){var g=l.find("> div > br[type=_moz]");g.length&&($("<div>"+this.opts.invisibleSpace+"</div>").insertBefore(g),g.remove())}l.removeAttr("id"),this.wutil.setCaretAfter(l[0]);var u=l[0].previousElementSibling;null!==u&&"P"===u.nodeName&&"​"===u.innerHTML&&(u=u.previousElementSibling,null===u||"P"!==u.nodeName||"​"!==u.innerHTML&&"<br>"!==u.innerHTML||u.parentNode.removeChild(u.nextElementSibling))}this.wbbcode.observeQuotes(),this.wbbcode.fixBlockLevelElements(),this.$toolbar.find("a.re-__wcf_quote").removeClass("redactor-button-disabled")}else this.wutil.insertAtCaret(r+a+n);return this.wutil.saveSelection(),l},_buildQuoteHeader:function(e,t){var i="";return!e&&t&&(e=t,t=""),e?(t&&(i+='<a href="'+t+'" tabindex="-1">'),i+=WCF.Language.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:WCF.String.unescapeHTML(e)}),t&&(i+="</a>")):i="<small>"+WCF.Language.get("wcf.bbcode.quote.title.clickToSet")+"</small>",i},_handleInsertQuote:function(){this.wbbcode._openQuoteEditOverlay(null,!0)},_handleInsertCode:function(e,t){this.modal.load("code",WCF.Language.get("wcf.bbcode.code."+(t?"insert":"edit")),400);var i=this.modal.createActionButton(this.lang.get("save")).addClass("buttonPrimary");if(t){this.selection.get();var a=this.selection.getText();this.selection.save(),this.modal.show();var r=$("#redactorCodeBox").focus();r.val(a),i.click($.proxy(function(){var e=$("#redactorCodeBox"),t=$("#redactorCodeFilename"),i=$("#redactorCodeHighlighter"),a=$("#redactorCodeLineNumber"),r=e.val().replace(/^\n+/,"").replace(/\n+$/,"");if(0===$.trim(r).length)return void(e.next("small.innerError").length||$('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(e));var n=$.trim(t.val().replace(/['"]/g,"")),l="[code="+i.val()+","+a.val()+(n.length?",'"+n+"'":"")+"]";l.match(/\[code=([^,]+),(\d+)\]/)&&(l="[code="+RegExp.$2+","+RegExp.$1+"]"),l+=r,l+="[/code]",this.wutil.adjustSelectionForBlockElement(),this.wutil.saveSelection();var o=this.wbbcode.convertToHtml(l);this.buffer.set(),this.insert.html(o,!1);var e=this.$editor.find(".codeBox:not(.jsRedactorCodeBox)");this.wbbcode.observeCodeListings(),this.wbbcode.fixBlockLevelElements(),e.attr("contenteditable","false"),this.wutil.setCaretAfter(e[0]),this.modal.close()},this))}else{var n=this.modal.createActionButton(WCF.Language.get("wcf.global.button.delete"));n.click(function(){this.buffer.set(),e.remove(),this.modal.close()}.bind(this)),this.modal.show();var r=$("#redactorCodeBox").focus(),l=$("#redactorCodeFilename"),o=$("#redactorCodeHighlighter"),c=$("#redactorCodeLineNumber");o.val(e.data("highlighter")),l.val(e.data("filename")||"");var s=e.find("> div > ol");c.val(parseInt(s.prop("start")));var d="";s.children("li").each(function(e,t){d+=$(t).text().replace(/^\u200b$/,"")+"\n"}),r.val(d.replace(/^\n+/,"").replace(/\n+$/,"")),i.click($.proxy(function(){var t=r.val().replace(/^\n+/,"").replace(/\n+$/,"");if(0===$.trim(t).length)return void(r.next("small.innerError").length||$('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(r));var i=o.val();e.data("highlighter",i),e.attr("data-highlighter",i);var a=__REDACTOR_CODE_HIGHLIGHTERS[i],n=$.trim(l.val().replace(/['"]/g,""));n?(a+=": "+WCF.String.escapeHTML(n),e.data("filename",n),e.attr("data-filename",n)):(e.removeAttr("data-filename"),e.removeData("filename")),e.data("highlighter",o.val()),e.find("> div > div > h3").html(a);var s=e.find("> div > ol").empty(),d=parseInt(c.val());s.prop("start",d>1?d:1),t=t.split("\n");for(var p="",h=0;h<t.length;h++)p+="<li>"+WCF.String.escapeHTML(t[h])+"</li>";s.append($(p)),this.modal.close()},this))}},fixBlockLevelElements:function(){var e=function(e,t){var i=e[t];i&&i.nodeType===Node.ELEMENT_NODE&&"P"===i.tagName&&(i.innerHTML.length||i.parentElement.removeChild(i))}.bind(this);this.$editor.find("blockquote, .codeBox").each(function(){e(this,"previousElementSibling"),e(this,"nextElementSibling")})},fixFormatting:function(e){for(var t=function(e){e.style.removeProperty("text-align");for(var i=0;i<e.children.length;i++)t(e.children[i])},i=0;i<this.alignment.blocks.length;i++){var a=this.alignment.blocks[i];switch(a.tagName){case"BLOCKQUOTE":a.style.removeProperty("text-align"),t(a.children[0]);break;case"DIV":/\bcodeBox\b/.test(a.className)&&t(a)}}}}};
+
 // wbutton.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbutton=function(){return{_bbcodes:{},init:function(){this._bbcodes={};for(var i=0,f=__REDACTOR_BUTTONS.length;i<f;i++){this.wbutton._addBBCodeButton(__REDACTOR_BUTTONS[i])}var d={html:"fa-square-o",bold:"fa-bold",italic:"fa-italic",underline:"fa-underline",deleted:"fa-strikethrough",subscript:"fa-subscript",superscript:"fa-superscript",orderedlist:"fa-list-ol",unorderedlist:"fa-list-ul",outdent:"fa-outdent",indent:"fa-indent",link:"fa-link",alignment:"fa-align-left",table:"fa-table"};var e={fontcolor:WCF.Language.get("wcf.bbcode.button.fontColor"),fontfamily:WCF.Language.get("wcf.bbcode.button.fontFamily"),fontsize:WCF.Language.get("wcf.bbcode.button.fontSize"),image:WCF.Language.get("wcf.bbcode.button.image"),subscript:WCF.Language.get("wcf.bbcode.button.subscript"),superscript:WCF.Language.get("wcf.bbcode.button.superscript")};var c=this.wutil.getOption("buttons");var g="";for(var i=0,f=c.length;i<f;i++){var a=c[i];if(a=="separator"){this.button.get(g).parent().addClass("separator");continue}var h=this.button.get(a);if(h.length){if(d[a]){this.button.setAwesome(a,d[a])}if(a==="table"&&g){h.parent().insertAfter(this.button.get(g).parent())}}else{this.wbutton._addCoreButton(a,(e[a]?e[a]:null),(d[a]?d[a]:null),g)}g=a}this.button.addCallback(this.button.get("image"),$.proxy(this.wbutton.insertImage,this));var b=this.button.addAfter("html","undo",WCF.Language.get("wcf.bbcode.button.undo"));var j=this.button.addAfter("undo","redo",WCF.Language.get("wcf.bbcode.button.redo"));this.button.addCallback(b,this.buffer.undo);this.button.addCallback(j,this.buffer.redo);j.parent().addClass("separator")},_addCoreButton:function(b,c,a,d){var f={title:(c===null?b:c)};if(b==="subscript"||b==="superscript"){f.command=b}var e=this.button.build(b,f);$("<li />").append(e).insertAfter(this.button.get(d).parent());if(a!==null){this.button.setAwesome(b,a)}},_addBBCodeButton:function(b){var c="__wcf_"+b.name;var a=this.button.add(c,b.label);this.button.addCallback(a,this.wbutton._insertBBCode);this._bbcodes[c]={name:b.name,voidElement:(b.voidElement===true)};if(b.icon.match(/^fa\-[a-z\-]+$/)){this.button.setAwesome(c,b.icon)}else{a.css("background-image","url("+__REDACTOR_ICON_PATH+b.icon+")")}},_insertBBCode:function(a){var d=this._bbcodes[a].name;var b={buttonName:a,cancel:false,redactor:this};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","insertBBCode_"+d+"_"+this.$textarea.wcfIdentify(),b);if(b.cancel===false){var c=this.selection.getHtml();c=c.replace(/<p>@@@wcf_empty_line@@@<\/p>/g,"<p><br></p>");if(false&&d==="tt"){var e=(this.selection.getParent())?$(this.selection.getParent()):null;if(e&&e.closest("inline.inlineCode",this.$editor.get()[0]).length){this.inline.toggleClass("inlineCode")}else{this.inline.toggleClass("inlineCode")}}else{this.buffer.set();if(this.utils.browser("mozilla")&&!c.length){var f=getSelection().getRangeAt(0).startContainer;if(f.nodeType===Node.ELEMENT_NODE&&f.tagName==="P"&&f.innerHTML==="<br>"){f.removeChild(f.children[0])}}if(this._bbcodes[a].voidElement){this.insert.html(c+this.selection.getMarkerAsHtml()+"["+d+"]",false)}else{this.insert.html("["+d+"]"+c+this.selection.getMarkerAsHtml()+"[/"+d+"]",false)}this.selection.restore()}}},insertImage:function(){this.image.show()},_insertImage:function(){var d=$("#redactor-image-link-source");var b=d.val().trim();if(b.length){this.buffer.set();var c=$("#redactor-image-align").val();var a="";if(c==="left"||c==="right"){a=' style="float: '+c+'"'}this.insert.html('<img src="'+b+'"'+a+">",false);this.modal.close();this.observe.images()}else{if(!d.next("small.innerError")){$('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(d)}}}}};
+if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wbutton=function(){"use strict";return{_bbcodes:{},init:function(){this._bbcodes={};for(var t=0,e=__REDACTOR_BUTTONS.length;e>t;t++)this.wbutton._addBBCodeButton(__REDACTOR_BUTTONS[t]);for(var n={html:"fa-square-o",bold:"fa-bold",italic:"fa-italic",underline:"fa-underline",deleted:"fa-strikethrough",subscript:"fa-subscript",superscript:"fa-superscript",orderedlist:"fa-list-ol",unorderedlist:"fa-list-ul",outdent:"fa-outdent",indent:"fa-indent",link:"fa-link",alignment:"fa-align-left",table:"fa-table"},a={fontcolor:WCF.Language.get("wcf.bbcode.button.fontColor"),fontfamily:WCF.Language.get("wcf.bbcode.button.fontFamily"),fontsize:WCF.Language.get("wcf.bbcode.button.fontSize"),image:WCF.Language.get("wcf.bbcode.button.image"),subscript:WCF.Language.get("wcf.bbcode.button.subscript"),superscript:WCF.Language.get("wcf.bbcode.button.superscript")},i=this.wutil.getOption("buttons"),o="",t=0,e=i.length;e>t;t++){var s=i[t];if("separator"!=s){var r=this.button.get(s);r.length?(n[s]&&this.button.setAwesome(s,n[s]),"table"===s&&o&&r.parent().insertAfter(this.button.get(o).parent())):this.wbutton._addCoreButton(s,a[s]?a[s]:null,n[s]?n[s]:null,o),o=s}else this.button.get(o).parent().addClass("separator")}this.button.addCallback(this.button.get("image"),$.proxy(this.wbutton.insertImage,this));var l=this.button.addAfter("html","undo",WCF.Language.get("wcf.bbcode.button.undo")),u=this.button.addAfter("undo","redo",WCF.Language.get("wcf.bbcode.button.redo"));this.button.addCallback(l,this.buffer.undo),this.button.addCallback(u,this.buffer.redo),u.parent().addClass("separator")},_addCoreButton:function(t,e,n,a){var i={title:null===e?t:e};("subscript"===t||"superscript"===t)&&(i.command=t);var o=this.button.build(t,i);$("<li />").append(o).insertAfter(this.button.get(a).parent()),null!==n&&this.button.setAwesome(t,n)},_addBBCodeButton:function(t){var e="__wcf_"+t.name,n=this.button.add(e,t.label);this.button.addCallback(n,this.wbutton._insertBBCode),this._bbcodes[e]={name:t.name,voidElement:t.voidElement===!0},t.icon.match(/^fa\-[a-z\-]+$/)?this.button.setAwesome(e,t.icon):n.css("background-image","url("+__REDACTOR_ICON_PATH+t.icon+")")},_insertBBCode:function(t){var e=this._bbcodes[t].name,n={buttonName:t,cancel:!1,redactor:this};if(WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","insertBBCode_"+e+"_"+this.$textarea.wcfIdentify(),n),n.cancel===!1){var a=this.selection.getHtml();a=a.replace(/<p>@@@wcf_empty_line@@@<\/p>/g,"<p><br></p>");if(this.buffer.set(),this.utils.browser("mozilla")&&!a.length){var i=getSelection().getRangeAt(0).startContainer;i.nodeType===Node.ELEMENT_NODE&&"P"===i.tagName&&"<br>"===i.innerHTML&&i.removeChild(i.children[0])}this._bbcodes[t].voidElement?this.insert.html(a+this.selection.getMarkerAsHtml()+"["+e+"]",!1):this.insert.html("["+e+"]"+a+this.selection.getMarkerAsHtml()+"[/"+e+"]",!1),this.selection.restore()}},insertImage:function(){this.image.show()},_insertImage:function(){var t=$("#redactor-image-link-source"),e=t.val().trim();if(e.length){this.buffer.set();var n=$("#redactor-image-align").val(),a="";("left"===n||"right"===n)&&(a=' style="float: '+n+'"'),this.insert.html('<img src="'+e+'"'+a+">",!1),this.modal.close(),this.observe.images()}else t.next("small.innerError")||$('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t)}}};
+
 // wfontcolor.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontcolor=function(){return{init:function(){var a=this.button.addDropdown(this.button.get("fontcolor"));this.wfontcolor._createDropdown(a)},_createDropdown:function(h){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 e=$('<li class="redactorColorPallet" />');for(var g=0,d=b.length;g<d;g++){var f=b[g];var c=$('<a href="#" title="'+f+'" />').data("color",f).css("background-color",f);e.append(c);c.click($.proxy(this.wfontcolor._onColorPick,this))}var a=$('<a href="#" />').html(this.lang.get("none")).data("color","none");a.click($.proxy(this.wfontcolor._onColorPick,this));e.appendTo(h);$('<li class="dropdownDivider" />').appendTo(h);a.appendTo(h);a.wrap("<li />")},_onColorPick:function(a){a.preventDefault();var b=$(a.currentTarget).data("color");if(b==="none"){this.inline.removeStyleRule("color")}else{this.inline.format("span","style","color: "+b+";")}}}};
+if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wfontcolor=function(){"use strict";return{init:function(){var o=this.button.addDropdown(this.button.get("fontcolor"));this.wfontcolor._createDropdown(o)},_createDropdown:function(o){for(var F=["#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"],t=$('<li class="redactorColorPallet" />'),r=0,n=F.length;n>r;r++){var e=F[r],l=$('<a href="#" title="'+e+'" />').data("color",e).css("background-color",e);t.append(l),l.click($.proxy(this.wfontcolor._onColorPick,this))}var i=$('<a href="#" />').html(this.lang.get("none")).data("color","none");i.click($.proxy(this.wfontcolor._onColorPick,this)),t.appendTo(o),$('<li class="dropdownDivider" />').appendTo(o),i.appendTo(o),i.wrap("<li />")},_onColorPick:function(o){o.preventDefault();var F=$(o.currentTarget).data("color");"none"===F?this.inline.removeStyleRule("color"):this.inline.format("span","style","color: "+F+";")}}};
+
 // wfontfamily.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontfamily=function(){return{init:function(){var a=this.button.addDropdown(this.button.get("fontfamily"));this.wfontfamily._createDropdown(a)},_createDropdown:function(d){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(i){i.preventDefault();a.inline.format("span","style","font-family: "+$(this).data("fontFamily")+";")})});$('<li class="dropdownDivider" />').appendTo(d);var b=$('<li><a href="#">'+this.lang.get("none")+"</a></li>").appendTo(d);b.children("a").click(function(e){e.preventDefault();a.inline.removeStyleRule("font-family")})}}};
+if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wfontfamily=function(){"use strict";return{init:function(){var a=this.button.addDropdown(this.button.get("fontfamily"));this.wfontfamily._createDropdown(a)},_createDropdown:function(a){var e={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"},i=this;$.each(e,function(e,n){var o=$('<li><a href="#">'+e+"</a></li>").appendTo(a),r=o.children("a").data("fontFamily",n).css("font-family",n);r.click(function(a){a.preventDefault(),i.inline.format("span","style","font-family: "+$(this).data("fontFamily")+";")})}),$('<li class="dropdownDivider" />').appendTo(a);var n=$('<li><a href="#">'+this.lang.get("none")+"</a></li>").appendTo(a);n.children("a").click(function(a){a.preventDefault(),i.inline.removeStyleRule("font-family")})}}};
+
 // wfontsize.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wfontsize=function(){return{init:function(){var a=this.button.addDropdown(this.button.get("fontsize"));this.wfontsize._createDropdown(a)},_createDropdown:function(g){var e=[8,10,12,14,18,24,36];var b=this;for(var f=0;f<e.length;f++){var c=e[f];var d=$('<li><a href="#">'+c+"</a></li>").appendTo(g);var a=d.children("a").data("fontSize",c).css("font-size",c+"pt");if(c>18){a.css("line-height","1em")}a.click(function(h){h.preventDefault();b.inline.format("span","style","font-size: "+$(this).data("fontSize")+"pt;")})}$('<li class="dropdownDivider" />').appendTo(g);var d=$('<li><a href="#">'+this.opts.curLang.none+"</a></li>").appendTo(g);d.children("a").click(function(h){h.preventDefault();b.inline.removeStyleRule("font-size")})}}};
+if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wfontsize=function(){"use strict";return{init:function(){var t=this.button.addDropdown(this.button.get("fontsize"));this.wfontsize._createDropdown(t)},_createDropdown:function(t){for(var n=[8,10,12,14,18,24,36],e=this,i=0;i<n.length;i++){var o=n[i],a=$('<li><a href="#">'+o+"</a></li>").appendTo(t),r=a.children("a").data("fontSize",o).css("font-size",o+"pt");o>18&&r.css("line-height","1em"),r.click(function(t){t.preventDefault(),e.inline.format("span","style","font-size: "+$(this).data("fontSize")+"pt;")})}$('<li class="dropdownDivider" />').appendTo(t);var a=$('<li><a href="#">'+this.opts.curLang.none+"</a></li>").appendTo(t);a.children("a").click(function(t){t.preventDefault(),e.inline.removeStyleRule("font-size")})}}};
+
 // wmonkeypatch.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wmonkeypatch=function(){return{init:function(){this.wmonkeypatch.alignment();this.wmonkeypatch.button();this.wmonkeypatch.caret();this.wmonkeypatch.clean();this.wmonkeypatch.code();this.wmonkeypatch.dropdown();this.wmonkeypatch.image();this.wmonkeypatch.indent();this.wmonkeypatch.inline();this.wmonkeypatch.insert();this.wmonkeypatch.keydown();this.wmonkeypatch.keyup();this.wmonkeypatch.link();this.wmonkeypatch.modal();this.wmonkeypatch.paste();this.wmonkeypatch.observe();this.wmonkeypatch.selection();this.wmonkeypatch.utils();this.wmonkeypatch.rebuildTemplates();this.wmonkeypatch.bindEvents();this.wmonkeypatch.fixWebKit()},bindEvents:function(){var a=this.$textarea.wcfIdentify();this.wutil.setOption("keydownCallback",function(f){var e={cancel:false,event:f};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keydown_"+a,e);return(e.cancel?false:true)});this.wutil.setOption("keyupCallback",(function(f){this.wutil.saveSelection();var e={cancel:false,event:f};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keyup_"+a,e);return(e.cancel?false:true)}).bind(this));if(this.opts.activeButtons){this.$editor.off("mouseup.redactor keyup.redactor focus.redactor");this.$editor.on("mouseup.redactor keyup.redactor focus.redactor",$.proxy(this.observe.buttons,this));this.$editor.on("keyup.redactor",$.proxy(this.keyup.init,this))}var c=false;this.$editor.on("mousedown.wmonkeypatch",(function(){c=true}).bind(this));$(document).on("mouseup.wmonkeypatch",(function(){if(c){c=false;this.wutil.saveSelection()}}).bind(this));var b=(function(e,f){if(f){if(e.previousElementSibling&&(e.previousElementSibling.tagName==="P"||e.previousElementSibling.tagName==="DIV")){this.caret.setEnd(e.previousElementSibling)}else{this.wutil.setCaretBefore(e)}}else{if(e.nextElementSibling&&(e.nextElementSibling.tagName==="P"||e.nextElementSibling.tagName==="DIV")){this.caret.setEnd(e.nextElementSibling)}else{this.wutil.setCaretAfter(e)}}}).bind(this);var d=null;this.$editor.on("click.wmonkeypatch",(function(f){if(f.target===this.$editor[0]){var k=(window.getSelection().rangeCount)?window.getSelection().getRangeAt(0):null;if(k&&k.collapsed){var g=k.startContainer;var m=this.$editor.offset();if(d===null){d={left:this.$editor.cssAsNumber("padding-left"),top:this.$editor.cssAsNumber("padding-top")}}if(f.pageY<=m.top+d.top){var j=this.$editor[0].children[0];if(j.tagName!=="BLOCKQUOTE"&&(j.tagName!=="DIV"||!/\bcodeBox\b/.test(j.className))){return}}else{if(f.pageX<=m.left+d.left){return}else{if(f.pageX>m.left+this.$editor.width()){return}}}while(g&&g!==this.$editor[0]){if(g.nodeType===Node.ELEMENT_NODE){if(g.tagName==="BLOCKQUOTE"||(g.tagName==="DIV"&&/\bcodeBox\b/.test(g.className))){var n=$(g).offset();if(f.pageY<=n.top){b(g,true)}else{b(g,false)}return false}}g=g.parentElement}}var l=this.$editor.children("blockquote, div.codeBox");l.each(function(r,s){var p=$(s);var o=p.offset();if(f.pageY<=o.top){b(s,true);return false}else{var q=p.outerHeight()+(parseInt(p.css("margin-bottom"),10)||0);if(f.pageY<=o.top+q){b(s,false);return false}}});return false}else{if(f.target.tagName==="LI"){var k=(window.getSelection().rangeCount)?window.getSelection().getRangeAt(0):null;var e=false;if(k!==null){if(!k.collapsed){return}var g=k.startContainer;while(g!==null&&g!==this.$editor[0]){if(g.tagName==="LI"){e=true;break}g=g.parentElement}}if(!e||k===null){var h=document.createTextNode("\u200b");var j=f.target.children[0];j.appendChild(h);this.caret.setEnd(j)}}else{if(f.target.tagName==="BLOCKQUOTE"){var k=(window.getSelection().rangeCount)?window.getSelection().getRangeAt(0):null;if(k!==null&&k.collapsed){var i=null;var g=(k.startContainer.nodeType===Node.TEXT_NODE)?k.startContainer.parentElement:k.startContainer;while(g!==null&&g!==this.$editor[0]){if(g.tagName==="BLOCKQUOTE"){i=g;break}g=g.parentElement}if(i!==null&&i!==f.target){if(f.pageY<=$(i).offset().top){b(i,true)}else{b(i,false)}}}}}}}).bind(this))},alignment:function(){var a=this.alignment.setBlocks;this.alignment.setBlocks=(function(b){a.call(this,b);WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","fixFormatting_"+this.$textarea.wcfIdentify())}).bind(this)},button:function(){var a=this.button.addDropdown;this.button.addDropdown=(function(b,d){var c=a.call(this,b,d);if(!d){c.addClass("dropdownMenu")}return c}).bind(this)},caret:function(){this.caret.set=(function(g,f,d,b){if(!this.utils.browser("msie")){if(this.utils.isMobile()&&this.utils.browser("webkit")&&navigator.userAgent.match(/(iPad|iPhone|iPod)/i)){if(document.activeElement!==this.$editor[0]){this.$editor.focus()}}else{this.$editor.focus()}}g=g[0]||g;d=d[0]||d;if(this.utils.isBlockTag(g.tagName)&&g.innerHTML===""){g.innerHTML=this.opts.invisibleSpace}if(g.tagName=="BR"&&this.opts.linebreaks===false){var a=$(this.opts.emptyHtml)[0];$(g).replaceWith(a);g=a;d=g}this.selection.get();try{this.range.setStart(g,f);this.range.setEnd(d,b)}catch(c){}this.selection.addRange()}).bind(this);this.caret.setOffset=(function(g,a){if(typeof a=="undefined"){a=g}if(!this.focus.isFocused()){this.focus.setStart()}var b=document.createRange();var d=document.getSelection();var c,f=0;var e=document.createTreeWalker(this.$editor[0],NodeFilter.SHOW_TEXT,null,null);while(c=e.nextNode()){f+=c.nodeValue.length;if(f>g||(g===a&&f===g)){b.setStart(c,c.nodeValue.length+g-f);g=Infinity}if(f>=a){b.setEnd(c,c.nodeValue.length+a-f);break}}d.removeAllRanges();d.addRange(b)}).bind(this)},clean:function(){var d=function(f){f=f.replace(/\u201D/g,"__wcf_preserve_character_1__");f=f.replace(/\u201C/g,"__wcf_preserve_character_2__");f=f.replace(/\u2018/g,"__wcf_preserve_character_3__");f=f.replace(/\u2019/g,"__wcf_preserve_character_4__");return f};var c=function(f){f=f.replace(/__wcf_preserve_character_1__/g,"\u201D");f=f.replace(/__wcf_preserve_character_2__/g,"\u201C");f=f.replace(/__wcf_preserve_character_3__/g,"\u2018");f=f.replace(/__wcf_preserve_character_4__/g,"\u2019");return f};var e=this.clean.onPaste;this.clean.onPaste=(function(g,f){this.opts.replaceDivs=true;g=d(g);g=e.call(this,g,f);this.opts.replaceDivs=false;return c(g)}).bind(this);this.clean.onPasteRemoveEmpty=function(f){return f.replace(/<br\s?\/?>$/i,"")};var a=this.clean.removeSpaces;this.clean.removeSpaces=(function(f){f=f.replace(/\u200C/g,"__wcf_zwnj__");f=f.replace(/\u200D/g,"__wcf_zwj__");f=a.call(this,f);f=f.replace(/__wcf_zwnj__/g,"\u200C");return f.replace(/__wcf_zwj__/g,"\u200D")});var b=this.clean.onSet;this.clean.onSet=(function(f){f=d(f);f=b.call(this,f);return c(f)}).bind(this)},code:function(){var c=this.code.startSync;this.code.startSync=(function(){this.code.syncCode=undefined;c.call(this)}).bind(this);var b=this.code.textareaIndenting;this.code.textareaIndenting=(function(d){if(d.keyCode!==9||d.ctrlKey){return true}return b.call(this,d)}).bind(this);var a=this.code.showCode;this.code.showCode=(function(){var d=null;if(!this.$textarea.is(":visible")){d=this.$textarea.parentsUntil(":visible").last();d.show()}a.call(this);if(d!==null){d.hide()}}).bind(this)},dropdown:function(){this.dropdown.build=(function(c,e,d){e.addClass("dropdownMenu");$.each(d,(function(i,h){if(i=="dropdownDivider"){$('<li class="dropdownDivider" />').appendTo(e)}else{var g=$("<li />");var f=$('<a href="#" class="redactor-dropdown-'+i+'">'+h.title+"</a>");f.on("click",$.proxy(function(k){k.preventDefault();var j="func";var l=h.func;if(h.command){j="command";l=h.command}else{if(h.dropdown){j="dropdown";l=h.dropdown}}this.button.onClick(k,i,j,l);this.dropdown.hideAll()},this));f.appendTo(g);g.appendTo(e)}}).bind(this))}).bind(this);var a=this.dropdown.show;this.dropdown.show=$.proxy(function(f,c){var d=this.button.get(c).data("dropdown");b(d);if($.browser.iOS){this.wutil.saveSelection()}a.call(this,f,c);d.off("mouseover mouseout")},this);var b=function(f){if(f.hasClass("dropdownMenu")){return}f.addClass("dropdownMenu");var e=f.children("a").detach();for(var d=0;d<e.length;d++){var c=$("<li />").appendTo(f);c.append(e[d])}}},image:function(){var c=this.image.setEditable;this.image.setEditable=(function(d){if(!d.hasClass("smiley")){c.call(this,d)}}).bind(this);var b=this.image.loadEditableControls;this.image.loadEditableControls=(function(d){var e=b.call(this,d);if(d.hasClass("redactorDisableResize")&&e!==false){e.hide()}return e}).bind(this);this.image.show=(function(){this.modal.load("image",this.lang.get("image"),0);var d=this.modal.createActionButton(this.lang.get("insert"));d.click($.proxy(this.wbutton._insertImage,this));this.selection.save();this.modal.show()}).bind(this);this.image.showEdit=(function(d){this.modal.load("imageEdit",this.lang.get("edit"),0);this.image.buttonSave=this.modal.createActionButton(this.lang.get("save"));this.image.buttonSave.click((function(){this.image.update(d)}).bind(this));$("#redactor-image-link-source").val(d.attr("src"));$("#redactor-image-align").val(d.css("float"));this.modal.show()}).bind(this);var a=(function(e){var d=e.parent();e=e.detach();e.prependTo(d);this.caret.setAfter(e)}).bind(this);this.image.update=(function(d){this.image.hideResize();this.buffer.set();d.attr("src",$("#redactor-image-link-source").val());this.image.setFloating(d);a(d);this.modal.close();this.observe.images()}).bind(this)},indent:function(){var a=this.indent.increase;this.indent.increase=(function(){var b=this.selection.getBlock();if(b&&b.tagName==="LI"){if(b.parentElement.firstChild!==b){a.call(this)}}}).bind(this)},inline:function(){var c=(function(e,d){var f=e.parent();while(f[0]!==this.$editor[0]){if(f.children(":not(.redactor-selection-marker)").length>1){break}if(f[0].tagName==="SPAN"&&f[0].style.getPropertyValue(d)){f.contents().unwrap();break}f=f.parent()}}).bind(this);var b=this.inline.format;this.inline.format=(function(d,e,f){if($.browser.iOS){this.wutil.restoreSelection()}b.call(this,d,e,f)}).bind(this);var a=this.inline.removeStyleRule;this.inline.removeStyleRule=(function(d){if($.browser.iOS){this.wuil.restoreSelection()}a.call(this,d)}).bind(this)},insert:function(){var c=($.browser.webkit||document.documentElement.style.hasOwnProperty("WebkitAppearance")||window.hasOwnProperty("chrome"));var a=(function(g){var f=this.$editor.html();if(this.utils.isEmpty(f)){var i=false;if(g.match(/^<(blockquote|div|p)/i)){this.$editor.empty();i=true}this.$editor.focus();if(!i){this.caret.setEnd(this.$editor.children("p:eq(0)"))}}else{if(document.activeElement!==this.$editor[0]){this.wutil.restoreSelection()}if(g.match(/^<(blockquote|div|p)/i)&&getSelection().getRangeAt(0).collapsed){var h=getSelection().getRangeAt(0).startContainer;if(h.nodeType===Node.TEXT_NODE&&h.textContent==="\u200b"){this.caret.setEnd($(h.parentElement).html("<br />"))}}}}).bind(this);var b=(function(){var f=false;this.$editor.find("span").each(function(){var g=$(this);if(g.data("verified")!=="redactor"){var h=$("<b>helper</b>").insertBefore(g);h.after(g.contents());h.remove();g.remove();f=true}});if(f){this.wutil.saveSelection()}}).bind(this);var e=this.insert.html;this.insert.html=(function(g,f){a(g);e.call(this,g,f);this.wutil.saveSelection();if(c){setTimeout(function(){b()},10)}}).bind(this);if(navigator.userAgent.match(/safari/i)){var d=this.insert.execHtml;this.insert.execHtml=(function(f){try{d.call(this,f)}catch(g){console.debug("[Redactor.wmonkeypatch] Suppressed error in Safari: "+g.message)}}).bind(this)}},keydown:function(){this.keydown.enterWithinBlockquote=false;var c=this.keydown.onTab;this.keydown.onTab=(function(g,d){var f=this.selection.getBlock();if(f&&f.tagName==="LI"){return c.call(this,g,d)}return true}).bind(this);var b=this.keydown.replaceDivToParagraph;this.keydown.replaceDivToParagraph=(function(){if(this.keydown.enterWithinBlockquote){this.keydown.enterWithinBlockquote=false}else{b.call(this)}}).bind(this);var a=this.keydown.setupBuffer;this.keydown.setupBuffer=(function(f,d){if(this.keydown.ctrl&&d===89&&!f.shiftKey&&!f.altKey&&this.opts.rebuffer.length!==0){f.preventDefault();this.buffer.redo();return}a.call(this,f,d)}).bind(this)},keyup:function(){var a=this.keyup.replaceToParagraph;this.keyup.replaceToParagraph=(function(b){if(this.keyup.current.tagName!=="DIV"||this.keyup.current.parentElement.tagName!=="BLOCKQUOTE"){a.call(this,b)}}).bind(this)},link:function(){var a=this.link.insert;this.link.insert=(function(){a.call(this);this.selection.get();var b=this.selection.getCurrent();if(b.nodeType===Node.TEXT_NODE){b=b.parentElement}if(b.tagName==="A"){this.caret.setAfter(b)}}).bind(this)},modal:function(){this.modal.dialog=null;var b=this.modal.addTemplate;this.modal.addTemplate=(function(c,d){if(c!=="table"){b.call(this,c,d)}}).bind(this);this.modal.build=function(){};this.modal.load=(function(c,e,d){this.modal.templateName=c;this.modal.title=e;this.modal.dialog=$("<div />").hide().appendTo(document.body);this.modal.dialog.html(this.modal.getTemplate(this.modal.templateName));this.$modalFooter=null}).bind(this);this.modal.show=(function(){this.modal.dialog.wcfDialog({onClose:$.proxy(this.modal.close,this),title:this.modal.title});this.modal.dialog.find("input:first").focus()}).bind(this);var a=this.modal.createButton;this.modal.createButton=(function(c,d){if(this.$modalFooter===null){this.$modalFooter=$('<div class="formSubmit" />').appendTo(this.modal.dialog);this.modal.dialog.addClass("dialogForm")}return a.call(this,c,d)}).bind(this);this.modal.close=(function(){if(this.modal.dialog===null){return}try{this.modal.dialog.wcfDialog("close")}catch(c){}finally{if(this.modal.dialog){var d=this.modal.dialog.parents(".dialogContainer:eq(0)");if(d.length){setTimeout(function(){d.remove()},500)}}}this.modal.dialog=null}).bind(this);this.modal.createCancelButton=function(){return $()};this.modal.createDeleteButton=function(){return $()}},observe:function(){var d=(function(j,e,h,f,i,k){var g=this.$toolbar.find(h);if(j&&j.closest(e,this.$editor[0]).length!=0){g[(f?"removeClass":"addClass")](i)}else{if(k&&!this.opts.visual){return}g[(f?"addClass":"removeClass")](i)}}).bind(this);var c=this.observe.buttons;this.observe.buttons=(function(g,h){c.call(this,g,h);var f=this.selection.getParent();f=(f===false)?null:$(f);d(f,"ul, ol","a.re-indent, a.re-outdent",true,"redactor-button-disabled");d(f,"blockquote.quoteBox","a.re-__wcf_quote",false,"redactor-button-disabled",true);d(f,"sub","a.re-subscript",false,"redactor-act");d(f,"sup","a.re-superscript",false,"redactor-act")}).bind(this);var a=this.observe.load;this.observe.load=(function(){a.call(this);WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","observe_load_"+this.$textarea.wcfIdentify())}).bind(this);var b=this.observe.showTooltip;this.observe.showTooltip=(function(g){var f=$(g.target);if(!f.hasClass("redactorQuoteEdit")){b.call(this,g)}}).bind(this)},paste:function(){var a=this.paste.createPasteBox;this.paste.createPasteBox=(function(){if($.browser.iOS){var e=0;if(window.getSelection().rangeCount){var d=window.getSelection().getRangeAt(0).endContainer;if(d.nodeType!==Node.ELEMENT_NODE){d=d.parentElement}d=$(d);e=$(d).offset().top}else{e=$(window).scrollTop()}this.$pasteBox=$("<div>").html("").attr("contenteditable","true").css({position:"fixed",top:e+"px",fontSize:"16px"});this.$box.parent().append(this.$pasteBox);this.$pasteBox.focus()}else{a.call(this)}}).bind(this);var c=function(){var d=window.getSelection();if(!d.rangeCount){return}var i=d.getRangeAt(0);if(!i.collapsed){return}var f=i.startContainer;if(f.nodeType===Node.ELEMENT_NODE&&f.tagName==="DIV"){var h=f.parentNode;if(h!==null&&h.tagName==="BLOCKQUOTE"&&h.classList.contains("quoteBox")){var g=i.startContainer.childNodes[i.startContainer.childNodes.length-1];var e=document.createRange();e.setStart(i.startContainer.childNodes[0],0);e.setEnd(g,g.length);e.collapse(false);d.removeAllRanges();d.addRange(e)}}};var b=this.paste.insert;this.paste.insert=(function(d){c();b.call(this,d);setTimeout((function(){this.wutil.fixDOM();if($.browser.msie){getSelection().getRangeAt(0).collapse(false)}else{if($.browser.mozilla){var e=getSelection().getRangeAt(0);if(e.startContainer===this.$editor[0]&&e.endContainer===this.$editor[0]){this.wutil.selectionEndOfEditor()}}}this.wutil.saveSelection()}).bind(this),20)}).bind(this)},selection:function(){this.selection.implicitRange=null;var a=(function(e,c){var b=c.nextSibling;if(b!==null&&b.nodeType===Node.TEXT_NODE&&b.length===0){$(b).remove()}var d=null;if((c.id==="selection-marker-1"&&!this.$editor.find("#selection-marker-2").length)||c.id==="nodes-marker-1"&&!this.$editor.find("#nodes-marker-2").length){d=c.previousSibling}$(c).remove();if(d!==null){this.selection.implicitRange=document.createRange();this.selection.implicitRange.setStart(d,d.length);this.selection.implicitRange.setEnd(d,d.length)}else{this.selection.implicitRange=null}}).bind(this);this.selection.removeMarkers=(function(){this.$editor.find("span.redactor-selection-marker").each(a)}).bind(this);this.selection.removeNodesMarkers=(function(){$(document).find("span.redactor-nodes-marker").each(a);this.$editor.find("span.redactor-nodes-marker").each(a)}).bind(this)},utils:function(){this.utils.removeEmpty=function(a,b){}},rebuildTemplates:function(){this.opts.modal.image='<fieldset id="redactor-modal-image-edit"><dl><dt><label for="redactor-image-link-source">'+this.lang.get("link")+'</label></dt><dd><input type="text" id="redactor-image-link-source" class="long"  /></dd></dl><dl><dt><label for="redactor-image-align">'+this.opts.curLang.image_position+'</label></dt><dd><select id="redactor-image-align"><option value="none">'+WCF.Language.get("wcf.global.noSelection")+'</option><option value="left">'+this.lang.get("left")+'</option><option value="right">'+this.lang.get("right")+"</option></select></dd></dl></fieldset>";this.opts.modal.imageEdit=this.opts.modal.image;this.opts.modal.link='<fieldset id="redactor-modal-link"><dl><dt><label for="redactor-link-url" />URL</label></dt><dd><input type="url" id="redactor-link-url" class="long" /></dd></dl><dl><dt><label for="redactor-link-url-text">'+this.lang.get("text")+'</label></dt><dd><input type="text" id="redactor-link-url-text" class="long" /></dd></dl></fieldset>';this.opts.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>';var a="";$.each(__REDACTOR_CODE_HIGHLIGHTERS,function(c,b){if(c==="plain"){return true}a+='<option value="'+c+'">'+b+"</option>"});this.opts.modal.code="<fieldset><legend>"+WCF.Language.get("wcf.bbcode.code.settings")+'</legend><dl><dt><label for="redactorCodeHighlighter">'+WCF.Language.get("wcf.bbcode.code.highlighter")+'</label></dt><dd><select id="redactorCodeHighlighter"><option value="plain">'+WCF.Language.get("wcf.bbcode.code.highlighter.none")+"</option>"+a+"</select><small>"+WCF.Language.get("wcf.bbcode.code.highlighter.description")+'</small></dd></dl><dl><dt><label for="redactorCodeLineNumber">'+WCF.Language.get("wcf.bbcode.code.lineNumber")+'</label></dt><dd><input type="number" id="redactorCodeLineNumber" min="1" max="99999" value="1" /><small>'+WCF.Language.get("wcf.bbcode.code.lineNumber.description")+'</small></dd></dl><dl><dt><label for="redactorCodeFilename">'+WCF.Language.get("wcf.bbcode.code.filename")+'</label></dt><dd><input type="text" id="redactorCodeFilename" value="" class="long" /><small>'+WCF.Language.get("wcf.bbcode.code.filename.description")+"</small></dd></dl></fieldset><fieldset><legend>"+WCF.Language.get("wcf.bbcode.code")+'</legend><dl class="wide"><dt></dt><dd><textarea id="redactorCodeBox" class="long" rows="12" /></dd></dl></fieldset>';this.opts.modal.table='<fieldset id="redactor-modal-table-insert"><dl><dt><label for="redactor-table-rows">'+this.lang.get("rows")+'</label></dt><dd><input type="number" size="5" value="2" min="1" id="redactor-table-rows" class="tiny" /></dd></dl><dl><dt><label for="redactor-table-columns">'+this.lang.get("columns")+'</label></dt><dd><input type="number" size="5" value="3" min="1" id="redactor-table-columns" class="tiny" /></dd></dl></fieldset>'},fixWebKit:function(){return;if(!$.browser.webkit&&!document.documentElement.style.hasOwnProperty("WebkitAppearance")&&!window.hasOwnProperty("chrome")){return}var a={fontSize:this.$editor.css("font-size"),lineHeight:this.$editor.css("line-height")};var c=this.$editor.wcfIdentify();var b=document.createElement("style");b.type="text/css";b.innerHTML="#"+c+" span { font-size: "+a.fontSize+"; line-height: "+a.lineHeight+" }";document.head.appendChild(b)}}};
+if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wmonkeypatch=function(){"use strict";return{init:function(){this.wmonkeypatch.alignment(),this.wmonkeypatch.button(),this.wmonkeypatch.caret(),this.wmonkeypatch.clean(),this.wmonkeypatch.code(),this.wmonkeypatch.dropdown(),this.wmonkeypatch.image(),this.wmonkeypatch.indent(),this.wmonkeypatch.inline(),this.wmonkeypatch.insert(),this.wmonkeypatch.keydown(),this.wmonkeypatch.keyup(),this.wmonkeypatch.link(),this.wmonkeypatch.modal(),this.wmonkeypatch.paste(),this.wmonkeypatch.observe(),this.wmonkeypatch.selection(),this.wmonkeypatch.utils(),this.wmonkeypatch.rebuildTemplates(),this.wmonkeypatch.bindEvents(),this.wmonkeypatch.fixWebKit()},bindEvents:function(){var t=this.$textarea.wcfIdentify();this.wutil.setOption("keydownCallback",function(e){var i={cancel:!1,event:e};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keydown_"+t,i),i.cancel?!1:!0}),this.wutil.setOption("keyupCallback",function(e){this.wutil.saveSelection();var i={cancel:!1,event:e};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","keyup_"+t,i),i.cancel?!1:!0}.bind(this)),this.opts.activeButtons&&(this.$editor.off("mouseup.redactor keyup.redactor focus.redactor"),this.$editor.on("mouseup.redactor keyup.redactor focus.redactor",$.proxy(this.observe.buttons,this)),this.$editor.on("keyup.redactor",$.proxy(this.keyup.init,this)));var e=!1;this.$editor.on("mousedown.wmonkeypatch",function(){e=!0}.bind(this)),$(document).on("mouseup.wmonkeypatch",function(){e&&(e=!1,this.wutil.saveSelection())}.bind(this));var i=function(t,e){e?!t.previousElementSibling||"P"!==t.previousElementSibling.tagName&&"DIV"!==t.previousElementSibling.tagName?this.wutil.setCaretBefore(t):this.caret.setEnd(t.previousElementSibling):!t.nextElementSibling||"P"!==t.nextElementSibling.tagName&&"DIV"!==t.nextElementSibling.tagName?this.wutil.setCaretAfter(t):this.caret.setEnd(t.nextElementSibling)}.bind(this),n=null;this.$editor.on("click.wmonkeypatch",function(t){if(t.target===this.$editor[0]){var e=window.getSelection().rangeCount?window.getSelection().getRangeAt(0):null;if(e&&e.collapsed){var o=e.startContainer,a=this.$editor.offset();if(null===n&&(n={left:this.$editor.cssAsNumber("padding-left"),top:this.$editor.cssAsNumber("padding-top")}),t.pageY<=a.top+n.top){var s=this.$editor[0].children[0];if("BLOCKQUOTE"!==s.tagName&&("DIV"!==s.tagName||!/\bcodeBox\b/.test(s.className)))return}else{if(t.pageX<=a.left+n.left)return;if(t.pageX>a.left+this.$editor.width())return}for(;o&&o!==this.$editor[0];){if(o.nodeType===Node.ELEMENT_NODE&&("BLOCKQUOTE"===o.tagName||"DIV"===o.tagName&&/\bcodeBox\b/.test(o.className))){var r=$(o).offset();return t.pageY<=r.top?i(o,!0):i(o,!1),!1}o=o.parentElement}}var l=this.$editor.children("blockquote, div.codeBox");return l.each(function(e,n){var o=$(n),a=o.offset();if(t.pageY<=a.top)return i(n,!0),!1;var s=o.outerHeight()+(parseInt(o.css("margin-bottom"),10)||0);return t.pageY<=a.top+s?(i(n,!1),!1):void 0}),!1}if("LI"===t.target.tagName){var e=window.getSelection().rangeCount?window.getSelection().getRangeAt(0):null,d=!1;if(null!==e){if(!e.collapsed)return;for(var o=e.startContainer;null!==o&&o!==this.$editor[0];){if("LI"===o.tagName){d=!0;break}o=o.parentElement}}if(!d||null===e){var c=document.createTextNode("​"),s=t.target.children[0];s.appendChild(c),this.caret.setEnd(s)}}else if("BLOCKQUOTE"===t.target.tagName){var e=window.getSelection().rangeCount?window.getSelection().getRangeAt(0):null;if(null!==e&&e.collapsed){for(var h=null,o=e.startContainer.nodeType===Node.TEXT_NODE?e.startContainer.parentElement:e.startContainer;null!==o&&o!==this.$editor[0];){if("BLOCKQUOTE"===o.tagName){h=o;break}o=o.parentElement}null!==h&&h!==t.target&&(t.pageY<=$(h).offset().top?i(h,!0):i(h,!1))}}}.bind(this))},alignment:function(){var t=this.alignment.setBlocks;this.alignment.setBlocks=function(e){t.call(this,e),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","fixFormatting_"+this.$textarea.wcfIdentify())}.bind(this)},button:function(){var t=this.button.addDropdown;this.button.addDropdown=function(e,i){var n=t.call(this,e,i);return i||n.addClass("dropdownMenu"),n}.bind(this)},caret:function(){this.caret.set=function(t,e,i,n){if(this.utils.browser("msie")||(this.utils.isMobile()&&this.utils.browser("webkit")&&navigator.userAgent.match(/(iPad|iPhone|iPod)/i)?document.activeElement!==this.$editor[0]&&this.$editor.focus():this.$editor.focus()),t=t[0]||t,i=i[0]||i,this.utils.isBlockTag(t.tagName)&&""===t.innerHTML&&(t.innerHTML=this.opts.invisibleSpace),"BR"==t.tagName&&this.opts.linebreaks===!1){var o=$(this.opts.emptyHtml)[0];$(t).replaceWith(o),t=o,i=t}this.selection.get();try{this.range.setStart(t,e),this.range.setEnd(i,n)}catch(t){}this.selection.addRange()}.bind(this),this.caret.setOffset=function(t,e){"undefined"==typeof e&&(e=t),this.focus.isFocused()||this.focus.setStart();for(var i,n=document.createRange(),o=document.getSelection(),a=0,s=document.createTreeWalker(this.$editor[0],NodeFilter.SHOW_TEXT,null,null);i=s.nextNode();)if(a+=i.nodeValue.length,(a>t||t===e&&a===t)&&(n.setStart(i,i.nodeValue.length+t-a),t=1/0),a>=e){n.setEnd(i,i.nodeValue.length+e-a);break}o.removeAllRanges(),o.addRange(n)}.bind(this)},clean:function(){var t=function(t){return t=t.replace(/\u201D/g,"__wcf_preserve_character_1__"),t=t.replace(/\u201C/g,"__wcf_preserve_character_2__"),t=t.replace(/\u2018/g,"__wcf_preserve_character_3__"),t=t.replace(/\u2019/g,"__wcf_preserve_character_4__")},e=function(t){return t=t.replace(/__wcf_preserve_character_1__/g,"”"),t=t.replace(/__wcf_preserve_character_2__/g,"“"),t=t.replace(/__wcf_preserve_character_3__/g,"‘"),t=t.replace(/__wcf_preserve_character_4__/g,"’")},i=this.clean.onPaste;this.clean.onPaste=function(n,o){return this.opts.replaceDivs=!0,n=t(n),n=i.call(this,n,o),this.opts.replaceDivs=!1,e(n)}.bind(this),this.clean.onPasteRemoveEmpty=function(t){return t.replace(/<br\s?\/?>$/i,"")};var n=this.clean.removeSpaces;this.clean.removeSpaces=function(t){return t=t.replace(/\u200C/g,"__wcf_zwnj__"),t=t.replace(/\u200D/g,"__wcf_zwj__"),t=n.call(this,t),t=t.replace(/__wcf_zwnj__/g,"‌"),t.replace(/__wcf_zwj__/g,"‍")};var o=this.clean.onSet;this.clean.onSet=function(i){return i=t(i),i=o.call(this,i),e(i)}.bind(this)},code:function(){var t=this.code.startSync;this.code.startSync=function(){this.code.syncCode=void 0,t.call(this)}.bind(this);var e=this.code.textareaIndenting;this.code.textareaIndenting=function(t){return 9!==t.keyCode||t.ctrlKey?!0:e.call(this,t)}.bind(this);var i=this.code.showCode;this.code.showCode=function(){var t=null;this.$textarea.is(":visible")||(t=this.$textarea.parentsUntil(":visible").last(),t.show()),i.call(this),null!==t&&t.hide()}.bind(this)},dropdown:function(){this.dropdown.build=function(t,e,i){e.addClass("dropdownMenu"),$.each(i,function(t,i){if("dropdownDivider"==t)$('<li class="dropdownDivider" />').appendTo(e);else{var n=$("<li />"),o=$('<a href="#" class="redactor-dropdown-'+t+'">'+i.title+"</a>");o.on("click",$.proxy(function(e){e.preventDefault();var n="func",o=i.func;i.command?(n="command",o=i.command):i.dropdown&&(n="dropdown",o=i.dropdown),this.button.onClick(e,t,n,o),this.dropdown.hideAll()},this)),o.appendTo(n),n.appendTo(e)}}.bind(this))}.bind(this);var t=this.dropdown.show;this.dropdown.show=$.proxy(function(i,n){var o=this.button.get(n).data("dropdown");e(o),$.browser.iOS&&this.wutil.saveSelection(),t.call(this,i,n),o.off("mouseover mouseout")},this);var e=function(t){if(!t.hasClass("dropdownMenu")){t.addClass("dropdownMenu");for(var e=t.children("a").detach(),i=0;i<e.length;i++){var n=$("<li />").appendTo(t);n.append(e[i])}}}},image:function(){var t=this.image.setEditable;this.image.setEditable=function(e){e.hasClass("smiley")||t.call(this,e)}.bind(this);var e=this.image.loadEditableControls;this.image.loadEditableControls=function(t){var i=e.call(this,t);return t.hasClass("redactorDisableResize")&&i!==!1&&i.hide(),i}.bind(this),this.image.show=function(){this.modal.load("image",this.lang.get("image"),0);var t=this.modal.createActionButton(this.lang.get("insert"));t.click($.proxy(this.wbutton._insertImage,this)),this.selection.save(),this.modal.show()}.bind(this),this.image.showEdit=function(t){this.modal.load("imageEdit",this.lang.get("edit"),0),this.image.buttonSave=this.modal.createActionButton(this.lang.get("save")),this.image.buttonSave.click(function(){this.image.update(t)}.bind(this)),$("#redactor-image-link-source").val(t.attr("src")),$("#redactor-image-align").val(t.css("float")),this.modal.show()}.bind(this);var i=function(t){var e=t.parent();t=t.detach(),t.prependTo(e),this.caret.setAfter(t)}.bind(this);this.image.update=function(t){this.image.hideResize(),this.buffer.set(),t.attr("src",$("#redactor-image-link-source").val()),this.image.setFloating(t),i(t),this.modal.close(),this.observe.images()}.bind(this)},indent:function(){var t=this.indent.increase;this.indent.increase=function(){var e=this.selection.getBlock();e&&"LI"===e.tagName&&e.parentElement.firstChild!==e&&t.call(this)}.bind(this)},inline:function(){var t=(function(t,e){for(var i=t.parent();i[0]!==this.$editor[0]&&!(i.children(":not(.redactor-selection-marker)").length>1);){if("SPAN"===i[0].tagName&&i[0].style.getPropertyValue(e)){i.contents().unwrap();break}i=i.parent()}}.bind(this),this.inline.format);this.inline.format=function(e,i,n){$.browser.iOS&&this.wutil.restoreSelection(),t.call(this,e,i,n)}.bind(this);var e=this.inline.removeStyleRule;this.inline.removeStyleRule=function(t){$.browser.iOS&&this.wuil.restoreSelection(),e.call(this,t)}.bind(this)},insert:function(){var t=$.browser.webkit||document.documentElement.style.hasOwnProperty("WebkitAppearance")||window.hasOwnProperty("chrome"),e=function(t){var e=this.$editor.html();if(this.utils.isEmpty(e)){var i=!1;t.match(/^<(blockquote|div|p)/i)&&(this.$editor.empty(),i=!0),this.$editor.focus(),i||this.caret.setEnd(this.$editor.children("p:eq(0)"))}else if(document.activeElement!==this.$editor[0]&&this.wutil.restoreSelection(),t.match(/^<(blockquote|div|p)/i)&&getSelection().getRangeAt(0).collapsed){var n=getSelection().getRangeAt(0).startContainer;n.nodeType===Node.TEXT_NODE&&"​"===n.textContent&&this.caret.setEnd($(n.parentElement).html("<br />"))}}.bind(this),i=function(){var t=!1;this.$editor.find("span").each(function(){var e=$(this);if("redactor"!==e.data("verified")){var i=$("<b>helper</b>").insertBefore(e);i.after(e.contents()),i.remove(),e.remove(),t=!0}}),t&&this.wutil.saveSelection()}.bind(this),n=this.insert.html;if(this.insert.html=function(o,a){e(o),n.call(this,o,a),this.wutil.saveSelection(),t&&setTimeout(function(){i()},10)}.bind(this),navigator.userAgent.match(/safari/i)){var o=this.insert.execHtml;this.insert.execHtml=function(t){try{o.call(this,t)}catch(t){console.debug("[Redactor.wmonkeypatch] Suppressed error in Safari: "+t.message)}}.bind(this)}},keydown:function(){this.keydown.enterWithinBlockquote=!1;var t=this.keydown.onTab;this.keydown.onTab=function(e,i){var n=this.selection.getBlock();return n&&"LI"===n.tagName?t.call(this,e,i):!0}.bind(this);var e=this.keydown.replaceDivToParagraph;this.keydown.replaceDivToParagraph=function(){this.keydown.enterWithinBlockquote?this.keydown.enterWithinBlockquote=!1:e.call(this)}.bind(this);var i=this.keydown.setupBuffer;this.keydown.setupBuffer=function(t,e){return!this.keydown.ctrl||89!==e||t.shiftKey||t.altKey||0===this.opts.rebuffer.length?void i.call(this,t,e):(t.preventDefault(),void this.buffer.redo())}.bind(this)},keyup:function(){var t=this.keyup.replaceToParagraph;this.keyup.replaceToParagraph=function(e){("DIV"!==this.keyup.current.tagName||"BLOCKQUOTE"!==this.keyup.current.parentElement.tagName)&&t.call(this,e)}.bind(this)},link:function(){var t=this.link.insert;this.link.insert=function(){t.call(this),this.selection.get();var e=this.selection.getCurrent();e.nodeType===Node.TEXT_NODE&&(e=e.parentElement),"A"===e.tagName&&this.caret.setAfter(e)}.bind(this)},modal:function(){this.modal.dialog=null;var t=this.modal.addTemplate;this.modal.addTemplate=function(e,i){"table"!==e&&t.call(this,e,i)}.bind(this),this.modal.build=function(){},this.modal.load=function(t,e,i){this.modal.templateName=t,this.modal.title=e,this.modal.dialog=$("<div />").hide().appendTo(document.body),this.modal.dialog.html(this.modal.getTemplate(this.modal.templateName)),this.$modalFooter=null}.bind(this),this.modal.show=function(){this.modal.dialog.wcfDialog({onClose:$.proxy(this.modal.close,this),title:this.modal.title}),this.modal.dialog.find("input:first").focus()}.bind(this);var e=this.modal.createButton;this.modal.createButton=function(t,i){return null===this.$modalFooter&&(this.$modalFooter=$('<div class="formSubmit" />').appendTo(this.modal.dialog),this.modal.dialog.addClass("dialogForm")),e.call(this,t,i)}.bind(this),this.modal.close=function(){if(null!==this.modal.dialog){try{this.modal.dialog.wcfDialog("close")}catch(t){}finally{if(this.modal.dialog){var t=this.modal.dialog.parents(".dialogContainer:eq(0)");t.length&&setTimeout(function(){t.remove()},500)}}this.modal.dialog=null}}.bind(this),this.modal.createCancelButton=function(){return $()},this.modal.createDeleteButton=function(){return $()}},observe:function(){var t=function(t,e,i,n,o,a){var s=this.$toolbar.find(i);if(t&&0!=t.closest(e,this.$editor[0]).length)s[n?"removeClass":"addClass"](o);else{if(a&&!this.opts.visual)return;s[n?"addClass":"removeClass"](o)}}.bind(this),e=this.observe.buttons;this.observe.buttons=function(i,n){e.call(this,i,n);var o=this.selection.getParent();o=o===!1?null:$(o),t(o,"ul, ol","a.re-indent, a.re-outdent",!0,"redactor-button-disabled"),t(o,"blockquote.quoteBox","a.re-__wcf_quote",!1,"redactor-button-disabled",!0),t(o,"sub","a.re-subscript",!1,"redactor-act"),t(o,"sup","a.re-superscript",!1,"redactor-act")}.bind(this);var i=this.observe.load;this.observe.load=function(){i.call(this),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","observe_load_"+this.$textarea.wcfIdentify())}.bind(this);var n=this.observe.showTooltip;this.observe.showTooltip=function(t){var e=$(t.target);e.hasClass("redactorQuoteEdit")||n.call(this,t)}.bind(this)},paste:function(){var t=this.paste.createPasteBox;this.paste.createPasteBox=function(){if($.browser.iOS){var e=0;if(window.getSelection().rangeCount){var i=window.getSelection().getRangeAt(0).endContainer;i.nodeType!==Node.ELEMENT_NODE&&(i=i.parentElement),i=$(i),e=$(i).offset().top}else e=$(window).scrollTop();this.$pasteBox=$("<div>").html("").attr("contenteditable","true").css({position:"fixed",top:e+"px",fontSize:"16px"}),this.$box.parent().append(this.$pasteBox),this.$pasteBox.focus()}else t.call(this)}.bind(this);var e=function(){var t=window.getSelection();if(t.rangeCount){var e=t.getRangeAt(0);if(e.collapsed){var i=e.startContainer;if(i.nodeType===Node.ELEMENT_NODE&&"DIV"===i.tagName){var n=i.parentNode;if(null!==n&&"BLOCKQUOTE"===n.tagName&&n.classList.contains("quoteBox")){var o=e.startContainer.childNodes[e.startContainer.childNodes.length-1],a=document.createRange();a.setStart(e.startContainer.childNodes[0],0),a.setEnd(o,o.length),a.collapse(!1),t.removeAllRanges(),t.addRange(a)}}}}},i=this.paste.insert;this.paste.insert=function(t){e(),i.call(this,t),setTimeout(function(){if(this.wutil.fixDOM(),$.browser.msie)getSelection().getRangeAt(0).collapse(!1);else if($.browser.mozilla){var t=getSelection().getRangeAt(0);t.startContainer===this.$editor[0]&&t.endContainer===this.$editor[0]&&this.wutil.selectionEndOfEditor()}this.wutil.saveSelection()}.bind(this),20)}.bind(this)},selection:function(){this.selection.implicitRange=null;var t=function(t,e){var i=e.nextSibling;null!==i&&i.nodeType===Node.TEXT_NODE&&0===i.length&&$(i).remove();var n=null;("selection-marker-1"===e.id&&!this.$editor.find("#selection-marker-2").length||"nodes-marker-1"===e.id&&!this.$editor.find("#nodes-marker-2").length)&&(n=e.previousSibling),$(e).remove(),null!==n?(this.selection.implicitRange=document.createRange(),this.selection.implicitRange.setStart(n,n.length),this.selection.implicitRange.setEnd(n,n.length)):this.selection.implicitRange=null}.bind(this);this.selection.removeMarkers=function(){this.$editor.find("span.redactor-selection-marker").each(t)}.bind(this),this.selection.removeNodesMarkers=function(){$(document).find("span.redactor-nodes-marker").each(t),this.$editor.find("span.redactor-nodes-marker").each(t)}.bind(this)},utils:function(){this.utils.removeEmpty=function(t,e){}},rebuildTemplates:function(){this.opts.modal.image='<fieldset id="redactor-modal-image-edit"><dl><dt><label for="redactor-image-link-source">'+this.lang.get("link")+'</label></dt><dd><input type="text" id="redactor-image-link-source" class="long"  /></dd></dl><dl><dt><label for="redactor-image-align">'+this.opts.curLang.image_position+'</label></dt><dd><select id="redactor-image-align"><option value="none">'+WCF.Language.get("wcf.global.noSelection")+'</option><option value="left">'+this.lang.get("left")+'</option><option value="right">'+this.lang.get("right")+"</option></select></dd></dl></fieldset>",this.opts.modal.imageEdit=this.opts.modal.image,this.opts.modal.link='<fieldset id="redactor-modal-link"><dl><dt><label for="redactor-link-url" />URL</label></dt><dd><input type="url" id="redactor-link-url" class="long" /></dd></dl><dl><dt><label for="redactor-link-url-text">'+this.lang.get("text")+'</label></dt><dd><input type="text" id="redactor-link-url-text" class="long" /></dd></dl></fieldset>',this.opts.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>';var t="";$.each(__REDACTOR_CODE_HIGHLIGHTERS,function(e,i){return"plain"===e?!0:void(t+='<option value="'+e+'">'+i+"</option>")}),this.opts.modal.code="<fieldset><legend>"+WCF.Language.get("wcf.bbcode.code.settings")+'</legend><dl><dt><label for="redactorCodeHighlighter">'+WCF.Language.get("wcf.bbcode.code.highlighter")+'</label></dt><dd><select id="redactorCodeHighlighter"><option value="plain">'+WCF.Language.get("wcf.bbcode.code.highlighter.none")+"</option>"+t+"</select><small>"+WCF.Language.get("wcf.bbcode.code.highlighter.description")+'</small></dd></dl><dl><dt><label for="redactorCodeLineNumber">'+WCF.Language.get("wcf.bbcode.code.lineNumber")+'</label></dt><dd><input type="number" id="redactorCodeLineNumber" min="1" max="99999" value="1" /><small>'+WCF.Language.get("wcf.bbcode.code.lineNumber.description")+'</small></dd></dl><dl><dt><label for="redactorCodeFilename">'+WCF.Language.get("wcf.bbcode.code.filename")+'</label></dt><dd><input type="text" id="redactorCodeFilename" value="" class="long" /><small>'+WCF.Language.get("wcf.bbcode.code.filename.description")+"</small></dd></dl></fieldset><fieldset><legend>"+WCF.Language.get("wcf.bbcode.code")+'</legend><dl class="wide"><dt></dt><dd><textarea id="redactorCodeBox" class="long" rows="12" /></dd></dl></fieldset>',this.opts.modal.table='<fieldset id="redactor-modal-table-insert"><dl><dt><label for="redactor-table-rows">'+this.lang.get("rows")+'</label></dt><dd><input type="number" size="5" value="2" min="1" id="redactor-table-rows" class="tiny" /></dd></dl><dl><dt><label for="redactor-table-columns">'+this.lang.get("columns")+'</label></dt><dd><input type="number" size="5" value="3" min="1" id="redactor-table-columns" class="tiny" /></dd></dl></fieldset>'},fixWebKit:function(){return}}};
+
 // wupload.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wupload=function(){return{_boundGlobalUploadEvents:false,_dropArea:{},_timer:null,_isDragging:false,_isFile:false,init:function(){var a=".redactor_"+this.$textarea.wcfIdentify();$(document).on("dragover"+a,$.proxy(this.wupload._dragOver,this));$(document).on("dragleave"+a,$.proxy(this.wupload._dragLeave,this));$(document).on("drop"+a,(function(b){b.preventDefault();this.wupload._revertDropArea(undefined,this.$textarea.wcfIdentify())}).bind(this));if(!this.wupload._boundGlobalUploadEvents){this.wupload._boundGlobalUploadEvents=true;$(document).on("dragend",function(b){b.preventDefault()})}WCF.System.Event.addListener("com.woltlab.wcf.attachment","autoInsert_"+this.$textarea.wcfIdentify(),$.proxy(this.wupload.insertPastedImageAttachment,this))},_dragOver:function(d){d=d.originalEvent;if(!this.$editor.is(":visible")){return}if(!d.dataTransfer||!d.dataTransfer.types){return}var e=false;for(var c in d.dataTransfer){if(/^moz/.test(c)){e=true;break}}this.wupload._isFile=false;if(e){if(d.dataTransfer.types[0]==="application/x-moz-file"){this.wupload._isFile=true}}else{for(var g=0;g<d.dataTransfer.types.length;g++){if(d.dataTransfer.types[g]==="Files"){this.wupload._isFile=true;break}}}if(!this.wupload._isFile){return}this.wupload._isFile=true;d.preventDefault();if(!this.wupload._isDragging){var b=this.$textarea.wcfIdentify();if(this.wupload._dropArea[b]===undefined){this.wupload._dropArea[b]=$('<div class="redactorDropArea">'+WCF.Language.get("wcf.attachment.dragAndDrop.dropHere")+"</div>").hide().appendTo(document.body);this.wupload._dropArea[b].on("dragover",$.proxy(this.wupload._hoverDropArea,this)).on("dragleave",$.proxy(this.wupload._revertDropArea,this)).on("drop",$.proxy(this.wupload._drop,this))}var a=(this.wutil.inWysiwygMode())?this.$editor.getDimensions("outer"):this.$textarea.getDimensions("outer");var f=(this.wutil.inWysiwygMode())?this.$editor.getOffsets("offset"):this.$textarea.getOffsets("offset");this.wupload._dropArea[b].css({height:a.height+"px",left:f.left+"px",lineHeight:a.height+"px",top:f.top+"px",width:a.width+"px"}).show();this.wupload._isDragging=true}d.preventDefault()},_hoverDropArea:function(a){this.wupload._dropArea[this.$textarea.wcfIdentify()].addClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropNow"))},_revertDropArea:function(c,a){if(!this.wupload._isFile){return}var b=a||this.$textarea.wcfIdentify();this.wupload._dropArea[b].removeClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropHere"));if(a){this.wupload._dropArea[b].hide()}},_dragLeave:function(){if(!this.wupload._isDragging||!this.wupload._isFile){return}if(this.wupload._timer===null){this.wupload._timer=new WCF.PeriodicalExecuter((function(a){a.stop();if(!this.wupload._isDragging){this.wupload._dropArea[this.$textarea.wcfIdentify()].hide()}}).bind(this),100)}else{this.wupload._timer.resume()}this.wupload._isDragging=false},_drop:function(b){if(!this.wupload._isFile){return}b=b.originalEvent||b;if(b.dataTransfer&&b.dataTransfer.files.length){b.preventDefault();var a=this.$textarea.wcfIdentify();this.wupload._revertDropArea(undefined,a);for(var c=0;c<b.dataTransfer.files.length;c++){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","upload_"+a,{file:b.dataTransfer.files[c]})}}},pasteClipboardUploadMozilla:function(){this.$editor.find("img[data-mozilla-paste-image]").each($.proxy(function(d,g){var f=$(g);var a=f.prop("src").split(",");var e=a[0].split(";")[0].split(":")[1];var c=a[1];var b={blob:WCF.base64toBlob(c,e),uploadID:null};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","upload_"+this.$textarea.wcfIdentify(),b);f.replaceWith('<span class="redactor-pastedImageFromClipboard-'+b.uploadID+'" />')},this))},insertPastedImageAttachment:function(b){var a=this.$editor.find("span.redactor-pastedImageFromClipboard-"+b.uploadID);a.before(b.attachment);a.remove()}}};
+if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wupload=function(){"use strict";return{_boundGlobalUploadEvents:!1,_dropArea:{},_timer:null,_isDragging:!1,_isFile:!1,init:function(){var t=".redactor_"+this.$textarea.wcfIdentify();$(document).on("dragover"+t,$.proxy(this.wupload._dragOver,this)),$(document).on("dragleave"+t,$.proxy(this.wupload._dragLeave,this)),$(document).on("drop"+t,function(t){t.preventDefault(),this.wupload._revertDropArea(void 0,this.$textarea.wcfIdentify())}.bind(this)),this.wupload._boundGlobalUploadEvents||(this.wupload._boundGlobalUploadEvents=!0,$(document).on("dragend",function(t){t.preventDefault()})),WCF.System.Event.addListener("com.woltlab.wcf.attachment","autoInsert_"+this.$textarea.wcfIdentify(),$.proxy(this.wupload.insertPastedImageAttachment,this))},_dragOver:function(t){if(t=t.originalEvent,this.$editor.is(":visible")&&t.dataTransfer&&t.dataTransfer.types){var e=!1;for(var a in t.dataTransfer)if(/^moz/.test(a)){e=!0;break}if(this.wupload._isFile=!1,e)"application/x-moz-file"===t.dataTransfer.types[0]&&(this.wupload._isFile=!0);else for(var i=0;i<t.dataTransfer.types.length;i++)if("Files"===t.dataTransfer.types[i]){this.wupload._isFile=!0;break}if(this.wupload._isFile){if(this.wupload._isFile=!0,t.preventDefault(),!this.wupload._isDragging){var r=this.$textarea.wcfIdentify();void 0===this.wupload._dropArea[r]&&(this.wupload._dropArea[r]=$('<div class="redactorDropArea">'+WCF.Language.get("wcf.attachment.dragAndDrop.dropHere")+"</div>").hide().appendTo(document.body),this.wupload._dropArea[r].on("dragover",$.proxy(this.wupload._hoverDropArea,this)).on("dragleave",$.proxy(this.wupload._revertDropArea,this)).on("drop",$.proxy(this.wupload._drop,this)));var o=this.wutil.inWysiwygMode()?this.$editor.getDimensions("outer"):this.$textarea.getDimensions("outer"),s=this.wutil.inWysiwygMode()?this.$editor.getOffsets("offset"):this.$textarea.getOffsets("offset");this.wupload._dropArea[r].css({height:o.height+"px",left:s.left+"px",lineHeight:o.height+"px",top:s.top+"px",width:o.width+"px"}).show(),this.wupload._isDragging=!0}t.preventDefault()}}},_hoverDropArea:function(t){this.wupload._dropArea[this.$textarea.wcfIdentify()].addClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropNow"))},_revertDropArea:function(t,e){if(this.wupload._isFile){var a=e||this.$textarea.wcfIdentify();this.wupload._dropArea[a].removeClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropHere")),e&&this.wupload._dropArea[a].hide()}},_dragLeave:function(){this.wupload._isDragging&&this.wupload._isFile&&(null===this.wupload._timer?this.wupload._timer=new WCF.PeriodicalExecuter(function(t){t.stop(),this.wupload._isDragging||this.wupload._dropArea[this.$textarea.wcfIdentify()].hide()}.bind(this),100):this.wupload._timer.resume(),this.wupload._isDragging=!1)},_drop:function(t){if(this.wupload._isFile&&(t=t.originalEvent||t,t.dataTransfer&&t.dataTransfer.files.length)){t.preventDefault();var e=this.$textarea.wcfIdentify();this.wupload._revertDropArea(void 0,e);for(var a=0;a<t.dataTransfer.files.length;a++)WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","upload_"+e,{file:t.dataTransfer.files[a]})}},pasteClipboardUploadMozilla:function(){this.$editor.find("img[data-mozilla-paste-image]").each($.proxy(function(t,e){var a=$(e),i=a.prop("src").split(","),r=i[0].split(";")[0].split(":")[1],o=i[1],s={blob:WCF.base64toBlob(o,r),uploadID:null};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","upload_"+this.$textarea.wcfIdentify(),s),a.replaceWith('<span class="redactor-pastedImageFromClipboard-'+s.uploadID+'" />')},this))},insertPastedImageAttachment:function(t){var e=this.$editor.find("span.redactor-pastedImageFromClipboard-"+t.uploadID);e.before(t.attachment),e.remove()}}};
+
 // wutil.js
-if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wutil=function(){var c="";var d=null;var a=false;var b=false;var e=null;return{_autosaveWorker:null,_range:null,init:function(){this.$textarea.parents("form").submit($.proxy(this.wutil.submit,this));if(this.wutil.getOption("woltlab.autosave").active){this.wutil.autosaveEnable();if(this.wutil.getOption("woltlab.autosave").saveOnInit||this.$textarea.data("saveOnInit")){this.wutil.setOption("woltlab.autosaveOnce",true)}else{this.wutil.autosaveRestore()}}this.wutil.setOption("autosave",false);var f=this.core.destroy;this.core.destroy=(function(){this.wutil.autosaveDisable();f.call(this)}).bind(this)},saveSelection:function(g){var f=getSelection();if(f.rangeCount){this.wutil._range=f.getRangeAt(0)}else{if(g){this.wutil._range=null}}},restoreSelection:function(){if(document.activeElement!==this.$editor[0]){this.$editor.focus()}if(this.wutil._range!==null){var f=window.getSelection();f.removeAllRanges();f.addRange(this.wutil._range);this.wutil._range=null}},clearSelection:function(){this.wutil._range=null},getSelection:function(){return this.wutil._range},insertAtCaret:function(g){if(this.opts.visual){console.debug("insertAtCaret() failed: Editor is in WYSIWYG-mode.");return false}this.$textarea.focus();var h=this.$textarea.getCaret();if(h==-1){console.debug("insertAtCaret() failed: Source is not input[type=text], input[type=password] or textarea.")}var f=this.$textarea.val();f=f.substr(0,h)+g+f.substr(h);this.$textarea.val(f);return true},insertDynamic:function(f,g){if(this.wutil.inWysiwygMode()){this.insert.html(f,false)}else{if(g===undefined||g===null){g=f}this.wutil.insertAtCaret(g)}},setOption:function(f,g){if(f.indexOf(".")!==-1){f=f.split(".",2);this.opts[f[0]][f[1]]=g}else{this.opts[f]=g}},getOption:function(f){if(f.indexOf(".")!==-1){f=f.split(".",2);if(this.opts[f[0]][f[1]]){return this.opts[f[0]][f[1]]}}else{if(this.opts[f]){return this.opts[f]}}return null},inPlainMode:function(){return !this.opts.visual},inWysiwygMode:function(){return(this.opts.visual)},replaceRangesWith:function(f){getSelection().removeAllRanges();getSelection().addRange(f)},getText:function(){if(this.wutil.inWysiwygMode()){this.code.startSync();var f=this.$textarea.val();this.$textarea.val($.trim(this.wbbcode.convertFromHtml(f)))}var g=$.trim(this.$textarea.val());g=this.wutil._removeSuperfluousNewlines(g);return g},isEmptyEditor:function(){if(this.opts.visual){return this.utils.isEmpty(this.$editor.html())}return(!$.trim(this.$textarea.val()))},submit:function(){if(this.wutil.inWysiwygMode()){this.code.startSync();var f=$.trim(this.wbbcode.convertFromHtml(this.$textarea.val()));f=this.wutil._removeSuperfluousNewlines(f);this.$textarea.val(f)}this.wutil.autosavePurge()},_removeSuperfluousNewlines:function(g){g=g.replace(/(\[\/(?:align|code|quote)\])\n/g,"$1");var f={text:g};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","wutil_removeSuperfluousNewlines",f);return f.text},addNewlines:function(g){g=g.replace(/(\[\/(?:align|code|quote)\])/g,"$1\n");var f={text:g};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","wutil_addNewlines",f);return f.text},reset:function(){if(this.opts.visual){this.$editor.html("<p>"+this.opts.invisibleSpace+"</p>");this.wutil.saveSelection()}this.$textarea.val("");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","reset",{wysiwygContainerID:this.$textarea.wcfIdentify()})},autosaveEnable:function(f){if(!this.wutil.getOption("woltlab.autosave").active){this.wutil.setOption("woltlab.autosave",{active:true,key:f})}if(this.wutil._autosaveWorker===null){this.wutil.autosavePurgeOutdated();this.wutil._autosaveWorker=new WCF.PeriodicalExecuter((function(g){this.wutil.saveTextToStorage(false)}).bind(this),15*1000)}return true},saveTextToStorage:function(g){var f=this.wutil.getText();if(c==f&&!g){return}try{localStorage.setItem(this.wutil.getOption("woltlab.autosave").key,JSON.stringify({content:f,timestamp:Date.now()}));c=f;a=true;if(e===null){e=new WCF.PeriodicalExecuter((function(i){if(b===true){return}if(a===false){i.stop();e=null;return}this.wutil.autosaveShowNotice("saved");a=false}).bind(this),120*1000)}}catch(h){console.debug("[wutil.saveTextToStorage] Unable to access local storage: "+h.message)}},autosaveDisable:function(){if(!this.wutil.getOption("woltlab.autosave").active){return false}this.wutil._autosaveWorker.stop();this.wutil._autosaveWorker=null;this.wutil.setOption("woltlab.autosave",{active:false,key:""});return true},autosavePurge:function(){try{localStorage.removeItem(this.wutil.getOption("woltlab.autosave").key)}catch(f){console.debug("[wutil.autosavePurge] Unable to access local storage: "+f.message)}},autosaveRestore:function(){var f=this.wutil.getOption("woltlab.autosave");var g=null;try{g=localStorage.getItem(f.key)}catch(h){console.debug("[wutil.autosaveRestore] Unable to access local storage: "+h.message)}try{g=(g===null)?null:JSON.parse(g)}catch(h){g=null}if(g===null||!g.content){return false}if(f.lastEditTime&&(f.lastEditTime*1000)>g.timestamp){this.wutil.autosavePurge();return false}if(f.prompt){this.wutil.autosaveShowNotice("prompt",g);return false}if(this.wutil.inWysiwygMode()){this.wutil.setOption("woltlab.originalValue",g.content)}else{this.$textarea.val(g.content)}this.wutil.autosaveShowNotice("restored",{timestamp:g.timestamp});return true},autosaveShowNotice:function(j,l){if(d===null){d=$('<div class="redactorAutosaveNotice"><span class="redactorAutosaveMessage" /></div>');d.appendTo(this.$box);var h=(function(m){if(m!==null&&m.originalEvent.propertyName!=="opacity"){return}if(d.hasClass("open")&&m!==null){if(d.data("callbackOpen")){d.data("callbackOpen")()}}else{if(d.data("callbackClose")){d.data("callbackClose")()}d.removeData("callbackClose");d.removeData("callbackOpen");d.removeClass("redactorAutosaveNoticeIcons");d.empty();$('<span class="redactorAutosaveMessage" />').appendTo(d)}}).bind(this);d.on("transitionend webkitTransitionEnd",h)}var i="";switch(j){case"prompt":$('<span class="icon icon16 fa-info blue jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.version",{date:new Date(l.timestamp).toLocaleString()})+'"></span>').prependTo(d);var k=$('<span class="icon icon16 fa-check green pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.prompt.confirm")+'"></span>').appendTo(d);var f=$('<span class="icon icon16 fa-times red pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.prompt.discard")+'"></span>').appendTo(d);k.click((function(){this.wutil.replaceText(l.content);h(null);this.wutil.autosaveShowNotice("restored",l)}).bind(this));f.click((function(){this.wutil.autosavePurge();d.removeClass("open")}).bind(this));i=WCF.Language.get("wcf.message.autosave.prompt");d.addClass("redactorAutosaveNoticeIcons");var g="";g=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),(function(m){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),g);setTimeout(function(){d.removeClass("open")},3000)}).bind(this));break;case"restored":$('<span class="icon icon16 fa-info blue jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.version",{date:new Date(l.timestamp).toLocaleString()})+'"></span>').prependTo(d);var k=$('<span class="icon icon16 fa-check green pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.confirm")+'"></span>').appendTo(d);var f=$('<span class="icon icon16 fa-times red pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.revert")+'"></span>').appendTo(d);k.click(function(){d.removeClass("open")});f.click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.message.autosave.restored.revert.confirmMessage"),(function(m){if(m==="confirm"){this.wutil.reset();this.wutil.autosavePurge();d.removeClass("open")}}).bind(this))}).bind(this));i=WCF.Language.get("wcf.message.autosave.restored");d.addClass("redactorAutosaveNoticeIcons");var g="";g=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),(function(m){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),g);setTimeout(function(){k.trigger("click")},3000)}).bind(this));break;case"saved":if(d.hasClass("open")){return}setTimeout(function(){d.removeClass("open")},2000);i=WCF.Language.get("wcf.message.autosave.saved");break}d.children("span.redactorAutosaveMessage").text(i);d.addClass("open");if(j!=="saved"){WCF.DOMNodeInsertedHandler.execute()}},autosavePurgeOutdated:function(){var j=0;var m=this.wutil.getOption("woltlab.autosave").prefix;var l=m+"_wcf_master";try{j=localStorage.getItem(l)}catch(k){console.debug("[wutil.autosavePurgeOutdated] Unable to access local storage: "+k.message)}if(j===0){return}var f=Date.now()-(7*24*3600*1000);if(j===null||j<f){var i=new RegExp("^"+m+"_");for(var h in localStorage){if(h.match(i)&&h!==l){var g=localStorage.getItem(h);try{g=JSON.parse(g)}catch(k){g={timestamp:0}}if(g===null||!g.timestamp||g.timestamp<f){try{localStorage.removeItem(h)}catch(k){console.debug("[wutil.autosavePurgeOutdated] Unable to access local storage: "+k.message)}}}}try{localStorage.setItem(l,Date.now())}catch(k){console.debug("[wutil.autosavePurgeOutdated] Unable to access local storage: "+k.message)}}},autosavePause:function(){b=true},autosaveResume:function(){b=false},buttonReplace:function(i,g,j,l,k){var f=this.buttonGet(i);var h=this.buttonAddAfter(i,g,j,l,k);if(f.parent().hasClass("separator")){h.parent().addClass("separator")}f.parent().remove();return h},removeZeroWidthSpace:function(f){var g="";for(var j=0,i=f.length;j<i;j++){var h=f.charCodeAt(j).toString(16);if(h!="200b"){g+=f[j]}}return g},getSource:function(){return this.$textarea},getName:function(){return this.$textarea.wcfIdentify()},selectionEndOfEditor:function(){this.focus.setEnd();var f=this.$editor.children(":last")[0];if(f.tagName==="P"){if(f.innerHTML===""){f.remove();f=$(this.opts.emptyHtml).appendTo(this.$editor)[0]}if(f.lastChild.nodeType===Element.TEXT_NODE){this.caret.set(f.lastChild,f.lastChild.length,f.lastChild,f.lastChild.length)}else{this.caret.setEnd(f)}}else{this.wutil.setCaretAfter(f)}this.wutil.saveSelection()},adjustSelectionForBlockElement:function(){if(document.activeElement!==this.$editor[0]){this.wutil.restoreSelection()}if(getSelection().getRangeAt(0).collapsed){var g=getSelection().getRangeAt(0).startContainer;if(g.nodeType===Node.TEXT_NODE&&g.textContent==="\u200b"&&g.parentElement&&g.parentElement.tagName==="P"&&g.parentElement.parentElement===this.$editor[0]){return}else{var f=$(g).parentsUntil(this.$editor[0]).last();if(f[0]===document.body.parentElement){this.wutil.selectionEndOfEditor()}else{this.caret.setAfter(f)}}}},isCaret:function(){this.selection.get();return this.range.collapsed},isEndOfElement:function(f){var h=this.selection.implicitRange;if(h===null){this.selection.get();h=this.range}if(!this.wutil.isCaret()){return false}if(h.endContainer.nodeType===Element.TEXT_NODE){if(h.endOffset<h.endContainer.length){return false}}if(!this.wutil.isNodeWithin(h.endContainer,f)){return false}var g=h.endContainer;while(g!==f){if(g.nextSibling){return false}g=g.parentNode}return true},isNodeWithin:function(g,f){while(g&&g!==this.$editor[0]){if(g===f){return true}g=g.parentNode}return false},containsTag:function(g,f){switch(g.nodeType){case Element.ELEMENT_NODE:if(g.tagName===f){return true}case Element.DOCUMENT_FRAGMENT_NODE:for(var h=0;h<g.childNodes.length;h++){if(this.wutil.containsTag(g.childNodes[h],f)){return true}}return false;break;default:return false;break}},replaceText:function(h){var i=$(document);var f=i.scrollTop();var g=false;if(this.wutil.inWysiwygMode()){this.code.toggle();g=true}h=this.wutil.addNewlines(h);this.$textarea.val(h);if(g){this.code.toggle();i.scrollTop(f)}i.trigger("resize")},setCaretBefore:function(f){this.wutil._setCaret(f,true)},setCaretAfter:function(f){this.wutil._setCaret(f,false)},_setCaret:function(g,h){var f;if((g[0]||g).parentElement&&(g[0]||g).parentElement.tagName==="BLOCKQUOTE"){f=$("<div>"+this.opts.invisibleSpace+"</div>")}else{f=$("<p>"+this.opts.invisibleSpace+"</p>")}f[(h?"insertBefore":"insertAfter")](g);this.caret.setEnd(f[0])},fixDOM:function(){var f=this.$editor[0].childNodes[0];var j=f;var m=null;while(j){f=j;j=f.nextSibling;if(f.nodeType===Element.ELEMENT_NODE){if(this.reIsBlock.test(f.tagName)){m=null}else{if(m===null){m=$("<p />").insertBefore(f)}m.append(f)}}else{if(f.nodeType===Element.TEXT_NODE){if(m===null){if(j){if(j.nodeType===Element.ELEMENT_NODE&&j.tagName==="P"&&j.innerHTML==="\u200B"){var l=j.nextSibling;this.$editor[0].removeChild(j);j=l}}m=$("<p />").insertBefore(f)}m.append(f)}}}var i=this.$editor[0].getElementsByTagName("li");for(var q=0,o=i.length;q<o;q++){var n=i[q];if(!n.innerHTML.length){var k=n.parentElement;if(k.children.length>1){n.parentElement.removeChild(n);q--;o--}}}for(var q=0,o=this.$editor[0].children.length;q<o;q++){var h=this.$editor[0].children[q];if(h.nodeType!==Node.ELEMENT_NODE||h.tagName!=="P"){continue}if(h.innerHTML==="\n"){h.parentElement.removeChild(h);q--;o--;continue}if(h.textContent.length>0){continue}if(h.children.length>1||(h.children.length===1&&h.children[0].tagName==="BR")){continue}while(h.children.length===1){h=h.children[0]}if(h.childNodes.length===0&&h.tagName!=="BR"){var g=document.createTextNode("\u200b");h.appendChild(g)}}var p=this.$editor[0].getElementsByTagName("INPUT");while(p.length){p[0].parentNode.removeChild(p[0])}}}};
+if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wutil=function(){"use strict";var t="",e=null,a=!1,i=!1,n=null;return{_autosaveWorker:null,_range:null,init:function(){this.$textarea.parents("form").submit($.proxy(this.wutil.submit,this)),this.wutil.getOption("woltlab.autosave").active&&(this.wutil.autosaveEnable(),this.wutil.getOption("woltlab.autosave").saveOnInit||this.$textarea.data("saveOnInit")?this.wutil.setOption("woltlab.autosaveOnce",!0):this.wutil.autosaveRestore()),this.wutil.setOption("autosave",!1);var t=this.core.destroy;this.core.destroy=function(){this.wutil.autosaveDisable(),t.call(this)}.bind(this)},saveSelection:function(t){var e=getSelection();e.rangeCount?this.wutil._range=e.getRangeAt(0):t&&(this.wutil._range=null)},restoreSelection:function(){if(document.activeElement!==this.$editor[0]&&this.$editor.focus(),null!==this.wutil._range){var t=window.getSelection();t.removeAllRanges(),t.addRange(this.wutil._range),this.wutil._range=null}},clearSelection:function(){this.wutil._range=null},getSelection:function(){return this.wutil._range},insertAtCaret:function(t){if(this.opts.visual)return console.debug("insertAtCaret() failed: Editor is in WYSIWYG-mode."),!1;this.$textarea.focus();var e=this.$textarea.getCaret();-1==e&&console.debug("insertAtCaret() failed: Source is not input[type=text], input[type=password] or textarea.");var a=this.$textarea.val();return a=a.substr(0,e)+t+a.substr(e),this.$textarea.val(a),!0},insertDynamic:function(t,e){this.wutil.inWysiwygMode()?this.insert.html(t,!1):((void 0===e||null===e)&&(e=t),this.wutil.insertAtCaret(e))},setOption:function(t,e){-1!==t.indexOf(".")?(t=t.split(".",2),this.opts[t[0]][t[1]]=e):this.opts[t]=e},getOption:function(t){if(-1!==t.indexOf(".")){if(t=t.split(".",2),this.opts[t[0]][t[1]])return this.opts[t[0]][t[1]]}else if(this.opts[t])return this.opts[t];return null},inPlainMode:function(){return!this.opts.visual},inWysiwygMode:function(){return this.opts.visual},replaceRangesWith:function(t){getSelection().removeAllRanges(),getSelection().addRange(t)},getText:function(){if(this.wutil.inWysiwygMode()){this.code.startSync();var t=this.$textarea.val();this.$textarea.val($.trim(this.wbbcode.convertFromHtml(t)))}var e=$.trim(this.$textarea.val());return e=this.wutil._removeSuperfluousNewlines(e)},isEmptyEditor:function(){return this.opts.visual?this.utils.isEmpty(this.$editor.html()):!$.trim(this.$textarea.val())},submit:function(){if(this.wutil.inWysiwygMode()){this.code.startSync();var t=$.trim(this.wbbcode.convertFromHtml(this.$textarea.val()));t=this.wutil._removeSuperfluousNewlines(t),this.$textarea.val(t)}this.wutil.autosavePurge()},_removeSuperfluousNewlines:function(t){t=t.replace(/(\[\/(?:align|code|quote)\])\n/g,"$1");var e={text:t};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","wutil_removeSuperfluousNewlines",e),e.text},addNewlines:function(t){t=t.replace(/(\[\/(?:align|code|quote)\])/g,"$1\n");var e={text:t};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","wutil_addNewlines",e),e.text},reset:function(){this.opts.visual&&(this.$editor.html("<p>"+this.opts.invisibleSpace+"</p>"),this.wutil.saveSelection()),this.$textarea.val(""),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","reset",{wysiwygContainerID:this.$textarea.wcfIdentify()})},autosaveEnable:function(t){return this.wutil.getOption("woltlab.autosave").active||this.wutil.setOption("woltlab.autosave",{active:!0,key:t}),null===this.wutil._autosaveWorker&&(this.wutil.autosavePurgeOutdated(),this.wutil._autosaveWorker=new WCF.PeriodicalExecuter(function(t){this.wutil.saveTextToStorage(!1)}.bind(this),15e3)),!0},saveTextToStorage:function(e){var s=this.wutil.getText();if(t!=s||e)try{localStorage.setItem(this.wutil.getOption("woltlab.autosave").key,JSON.stringify({content:s,timestamp:Date.now()})),t=s,a=!0,null===n&&(n=new WCF.PeriodicalExecuter(function(t){if(i!==!0){if(a===!1)return t.stop(),void(n=null);this.wutil.autosaveShowNotice("saved"),a=!1}}.bind(this),12e4))}catch(t){console.debug("[wutil.saveTextToStorage] Unable to access local storage: "+t.message)}},autosaveDisable:function(){return this.wutil.getOption("woltlab.autosave").active?(this.wutil._autosaveWorker.stop(),this.wutil._autosaveWorker=null,this.wutil.setOption("woltlab.autosave",{active:!1,key:""}),!0):!1},autosavePurge:function(){try{localStorage.removeItem(this.wutil.getOption("woltlab.autosave").key)}catch(t){console.debug("[wutil.autosavePurge] Unable to access local storage: "+t.message)}},autosaveRestore:function(){var t=this.wutil.getOption("woltlab.autosave"),e=null;try{e=localStorage.getItem(t.key)}catch(t){console.debug("[wutil.autosaveRestore] Unable to access local storage: "+t.message)}try{e=null===e?null:JSON.parse(e)}catch(t){e=null}return null!==e&&e.content?t.lastEditTime&&1e3*t.lastEditTime>e.timestamp?(this.wutil.autosavePurge(),!1):t.prompt?(this.wutil.autosaveShowNotice("prompt",e),!1):(this.wutil.inWysiwygMode()?this.wutil.setOption("woltlab.originalValue",e.content):this.$textarea.val(e.content),this.wutil.autosaveShowNotice("restored",{timestamp:e.timestamp}),!0):!1},autosaveShowNotice:function(t,a){if(null===e){e=$('<div class="redactorAutosaveNotice"><span class="redactorAutosaveMessage" /></div>'),e.appendTo(this.$box);var i=function(t){(null===t||"opacity"===t.originalEvent.propertyName)&&(e.hasClass("open")&&null!==t?e.data("callbackOpen")&&e.data("callbackOpen")():(e.data("callbackClose")&&e.data("callbackClose")(),e.removeData("callbackClose"),e.removeData("callbackOpen"),e.removeClass("redactorAutosaveNoticeIcons"),e.empty(),$('<span class="redactorAutosaveMessage" />').appendTo(e)))}.bind(this);e.on("transitionend webkitTransitionEnd",i)}var n="";switch(t){case"prompt":$('<span class="icon icon16 fa-info blue jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.version",{date:new Date(a.timestamp).toLocaleString()})+'"></span>').prependTo(e);var s=$('<span class="icon icon16 fa-check green pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.prompt.confirm")+'"></span>').appendTo(e),o=$('<span class="icon icon16 fa-times red pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.prompt.discard")+'"></span>').appendTo(e);s.click(function(){this.wutil.replaceText(a.content),i(null),this.wutil.autosaveShowNotice("restored",a)}.bind(this)),o.click(function(){this.wutil.autosavePurge(),e.removeClass("open")}.bind(this)),n=WCF.Language.get("wcf.message.autosave.prompt"),e.addClass("redactorAutosaveNoticeIcons");var r="";r=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),function(t){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),r),setTimeout(function(){e.removeClass("open")},3e3)}.bind(this));break;case"restored":$('<span class="icon icon16 fa-info blue jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.version",{date:new Date(a.timestamp).toLocaleString()})+'"></span>').prependTo(e);var s=$('<span class="icon icon16 fa-check green pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.confirm")+'"></span>').appendTo(e),o=$('<span class="icon icon16 fa-times red pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.revert")+'"></span>').appendTo(e);s.click(function(){e.removeClass("open")}),o.click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.message.autosave.restored.revert.confirmMessage"),function(t){"confirm"===t&&(this.wutil.reset(),this.wutil.autosavePurge(),e.removeClass("open"))}.bind(this))}.bind(this)),n=WCF.Language.get("wcf.message.autosave.restored"),e.addClass("redactorAutosaveNoticeIcons");var r="";r=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),function(t){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+this.$textarea.wcfIdentify(),r),setTimeout(function(){s.trigger("click")},3e3)}.bind(this));break;case"saved":if(e.hasClass("open"))return;setTimeout(function(){e.removeClass("open")},2e3),n=WCF.Language.get("wcf.message.autosave.saved")}e.children("span.redactorAutosaveMessage").text(n),e.addClass("open"),"saved"!==t&&WCF.DOMNodeInsertedHandler.execute()},autosavePurgeOutdated:function(){var t=0,e=this.wutil.getOption("woltlab.autosave").prefix,a=e+"_wcf_master";try{t=localStorage.getItem(a)}catch(t){console.debug("[wutil.autosavePurgeOutdated] Unable to access local storage: "+t.message)}if(0!==t){var i=Date.now()-6048e5;if(null===t||i>t){var n=new RegExp("^"+e+"_");for(var s in localStorage)if(s.match(n)&&s!==a){var o=localStorage.getItem(s);try{o=JSON.parse(o)}catch(t){o={timestamp:0}}if(null===o||!o.timestamp||o.timestamp<i)try{localStorage.removeItem(s)}catch(t){console.debug("[wutil.autosavePurgeOutdated] Unable to access local storage: "+t.message)}}try{localStorage.setItem(a,Date.now())}catch(t){console.debug("[wutil.autosavePurgeOutdated] Unable to access local storage: "+t.message)}}}},autosavePause:function(){i=!0},autosaveResume:function(){i=!1},buttonReplace:function(t,e,a,i,n){var s=this.buttonGet(t),o=this.buttonAddAfter(t,e,a,i,n);return s.parent().hasClass("separator")&&o.parent().addClass("separator"),s.parent().remove(),o},removeZeroWidthSpace:function(t){for(var e="",a=0,i=t.length;i>a;a++){var n=t.charCodeAt(a).toString(16);"200b"!=n&&(e+=t[a])}return e},getSource:function(){return this.$textarea},getName:function(){return this.$textarea.wcfIdentify()},selectionEndOfEditor:function(){this.focus.setEnd();var t=this.$editor.children(":last")[0];"P"===t.tagName?(""===t.innerHTML&&(t.remove(),t=$(this.opts.emptyHtml).appendTo(this.$editor)[0]),t.lastChild.nodeType===Element.TEXT_NODE?this.caret.set(t.lastChild,t.lastChild.length,t.lastChild,t.lastChild.length):this.caret.setEnd(t)):this.wutil.setCaretAfter(t),this.wutil.saveSelection()},adjustSelectionForBlockElement:function(){if(document.activeElement!==this.$editor[0]&&this.wutil.restoreSelection(),getSelection().getRangeAt(0).collapsed){var t=getSelection().getRangeAt(0).startContainer;if(t.nodeType===Node.TEXT_NODE&&"​"===t.textContent&&t.parentElement&&"P"===t.parentElement.tagName&&t.parentElement.parentElement===this.$editor[0])return;var e=$(t).parentsUntil(this.$editor[0]).last();e[0]===document.body.parentElement?this.wutil.selectionEndOfEditor():this.caret.setAfter(e)}},isCaret:function(){return this.selection.get(),this.range.collapsed},isEndOfElement:function(t){var e=this.selection.implicitRange;if(null===e&&(this.selection.get(),e=this.range),!this.wutil.isCaret())return!1;if(e.endContainer.nodeType===Element.TEXT_NODE&&e.endOffset<e.endContainer.length)return!1;if(!this.wutil.isNodeWithin(e.endContainer,t))return!1;for(var a=e.endContainer;a!==t;){if(a.nextSibling)return!1;a=a.parentNode}return!0},isNodeWithin:function(t,e){for(;t&&t!==this.$editor[0];){if(t===e)return!0;t=t.parentNode}return!1},containsTag:function(t,e){switch(t.nodeType){case Element.ELEMENT_NODE:if(t.tagName===e)return!0;case Element.DOCUMENT_FRAGMENT_NODE:for(var a=0;a<t.childNodes.length;a++)if(this.wutil.containsTag(t.childNodes[a],e))return!0;return!1;default:return!1}},replaceText:function(t){var e=$(document),a=e.scrollTop(),i=!1;this.wutil.inWysiwygMode()&&(this.code.toggle(),i=!0),t=this.wutil.addNewlines(t),this.$textarea.val(t),i&&(this.code.toggle(),e.scrollTop(a)),e.trigger("resize")},setCaretBefore:function(t){this.wutil._setCaret(t,!0)},setCaretAfter:function(t){this.wutil._setCaret(t,!1)},_setCaret:function(t,e){var a;a=(t[0]||t).parentElement&&"BLOCKQUOTE"===(t[0]||t).parentElement.tagName?$("<div>"+this.opts.invisibleSpace+"</div>"):$("<p>"+this.opts.invisibleSpace+"</p>"),a[e?"insertBefore":"insertAfter"](t),this.caret.setEnd(a[0])},fixDOM:function(){for(var t=this.$editor[0].childNodes[0],e=t,a=null;e;)if(t=e,e=t.nextSibling,t.nodeType===Element.ELEMENT_NODE)this.reIsBlock.test(t.tagName)?a=null:(null===a&&(a=$("<p />").insertBefore(t)),a.append(t));else if(t.nodeType===Element.TEXT_NODE){if(null===a){if(e&&e.nodeType===Element.ELEMENT_NODE&&"P"===e.tagName&&"​"===e.innerHTML){var i=e.nextSibling;this.$editor[0].removeChild(e),e=i}a=$("<p />").insertBefore(t)}a.append(t)}for(var n=this.$editor[0].getElementsByTagName("li"),s=0,o=n.length;o>s;s++){var r=n[s];if(!r.innerHTML.length){var l=r.parentElement;l.children.length>1&&(r.parentElement.removeChild(r),s--,o--)}}for(var s=0,o=this.$editor[0].children.length;o>s;s++){var u=this.$editor[0].children[s];if(u.nodeType===Node.ELEMENT_NODE&&"P"===u.tagName)if("\n"!==u.innerHTML){if(!(u.textContent.length>0||u.children.length>1||1===u.children.length&&"BR"===u.children[0].tagName)){for(;1===u.children.length;)u=u.children[0];if(0===u.childNodes.length&&"BR"!==u.tagName){var c=document.createTextNode("​");u.appendChild(c)}}}else u.parentElement.removeChild(u),s--,o--}for(var d=this.$editor[0].getElementsByTagName("INPUT");d.length;)d[0].parentNode.removeChild(d[0])}}};
+
diff --git a/wcfsetup/install/files/js/WCF.Core.min.js b/wcfsetup/install/files/js/WCF.Core.min.js
new file mode 100644 (file)
index 0000000..85e70be
--- /dev/null
@@ -0,0 +1,5 @@
+var requirejs,require,define;!function(ba){function G(e){return"[object Function]"===K.call(e)}function H(e){return"[object Array]"===K.call(e)}function v(e,t){if(e){var n;for(n=0;n<e.length&&(!e[n]||!t(e[n],n,e));n+=1);}}function T(e,t){if(e){var n;for(n=e.length-1;n>-1&&(!e[n]||!t(e[n],n,e));n-=1);}}function t(e,t){return fa.call(e,t)}function m(e,n){return t(e,n)&&e[n]}function B(e,n){for(var i in e)if(t(e,i)&&n(e[i],i))break}function U(e,n,i,r){return n&&B(n,function(n,a){(i||!t(e,a))&&(!r||"object"!=typeof n||!n||H(n)||G(n)||n instanceof RegExp?e[a]=n:(e[a]||(e[a]={}),U(e[a],n,i,r)))}),e}function u(e,t){return function(){return t.apply(e,arguments)}}function ca(e){throw e}function da(e){if(!e)return e;var t=ba;return v(e.split("."),function(e){t=t[e]}),t}function C(e,t,n,i){return t=Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e),t.requireType=e,t.requireModules=i,n&&(t.originalError=n),t}function ga(e){function n(e,t,n){var i,r,a,o,s,l,c,u,t=t&&t.split("/"),d=A.map,h=d&&d["*"];if(e){for(e=e.split("/"),r=e.length-1,A.nodeIdCompat&&Q.test(e[r])&&(e[r]=e[r].replace(Q,"")),"."===e[0].charAt(0)&&t&&(r=t.slice(0,t.length-1),e=r.concat(e)),r=e,a=0;a<r.length;a++)o=r[a],"."===o?(r.splice(a,1),a-=1):".."===o&&0!==a&&(1!==a||".."!==r[2])&&".."!==r[a-1]&&a>0&&(r.splice(a-1,2),a-=2);e=e.join("/")}if(n&&d&&(t||h)){r=e.split("/"),a=r.length;e:for(;a>0;a-=1){if(s=r.slice(0,a).join("/"),t)for(o=t.length;o>0;o-=1)if((n=m(d,t.slice(0,o).join("/")))&&(n=m(n,s))){i=n,l=a;break e}!c&&h&&m(h,s)&&(c=m(h,s),u=a)}!i&&c&&(i=c,l=u),i&&(r.splice(0,l,i),e=r.join("/"))}return(i=m(A.pkgs,e))?i:e}function i(e){z&&v(document.getElementsByTagName("script"),function(t){return t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===x.contextName?(t.parentNode.removeChild(t),!0):void 0})}function r(e){var t=m(A.paths,e);return t&&H(t)&&1<t.length?(t.shift(),x.require.undef(e),x.makeRequire(null,{skipMap:!0})([e]),!0):void 0}function a(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function o(e,t,i,r){var o,s,l=null,c=t?t.name:null,u=e,d=!0,h="";return e||(d=!1,e="_@r"+(P+=1)),e=a(e),l=e[0],e=e[1],l&&(l=n(l,c,r),s=m(j,l)),e&&(l?h=s&&s.normalize?s.normalize(e,function(e){return n(e,c,r)}):-1===e.indexOf("!")?n(e,c,r):e:(h=n(e,c,r),e=a(h),l=e[0],h=e[1],i=!0,o=x.nameToUrl(h))),i=!l||s||i?"":"_unnormalized"+(q+=1),{prefix:l,name:h,parentMap:t,unnormalized:!!i,url:o,originalName:u,isDefine:d,id:(l?l+"!"+h:h)+i}}function s(e){var t=e.id,n=m(S,t);return n||(n=S[t]=new x.Module(e)),n}function l(e,n,i){var r=e.id,a=m(S,r);!t(j,r)||a&&!a.defineEmitComplete?(a=s(e),a.error&&"error"===n?i(a.error):a.on(n,i)):"defined"===n&&i(j[r])}function c(e,t){var n=e.requireModules,i=!1;t?t(e):(v(n,function(t){(t=m(S,t))&&(t.error=e,t.events.error&&(i=!0,t.emit("error",e)))}),i||g.onError(e))}function d(){R.length&&(ha.apply(W,[W.length,0].concat(R)),R=[])}function h(e){delete S[e],delete D[e]}function f(e,t,n){var i=e.map.id;e.error?e.emit("error",e.error):(t[i]=!0,v(e.depMaps,function(i,r){var a=i.id,o=m(S,a);o&&!e.depMatched[r]&&!n[a]&&(m(t,a)?(e.defineDep(r,j[a]),e.check()):f(o,t,n))}),n[i]=!0)}function p(){var e,t,n=(e=1e3*A.waitSeconds)&&x.startTime+e<(new Date).getTime(),a=[],o=[],s=!1,l=!0;if(!_){if(_=!0,B(D,function(e){var c=e.map,u=c.id;if(e.enabled&&(c.isDefine||o.push(e),!e.error))if(!e.inited&&n)r(u)?s=t=!0:(a.push(u),i(u));else if(!e.inited&&e.fetched&&c.isDefine&&(s=!0,!c.prefix))return l=!1}),n&&a.length)return e=C("timeout","Load timeout for modules: "+a,null,a),e.contextName=x.contextName,c(e);l&&v(o,function(e){f(e,{},{})}),n&&!t||!s||!z&&!ea||k||(k=setTimeout(function(){k=0,p()},50)),_=!1}}function b(e){t(j,e[0])||s(o(e[0],null,!0)).init(e[1],e[2])}function y(e){var e=e.currentTarget||e.srcElement,t=x.onScriptLoad;return e.detachEvent&&!Y?e.detachEvent("onreadystatechange",t):e.removeEventListener("load",t,!1),t=x.onScriptError,(!e.detachEvent||Y)&&e.removeEventListener("error",t,!1),{node:e,id:e&&e.getAttribute("data-requiremodule")}}function w(){var e;for(d();W.length;){if(e=W.shift(),null===e[0])return c(C("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));b(e)}}var _,E,x,L,k,A={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},S={},D={},I={},W=[],j={},O={},F={},P=1,q=1;return L={require:function(e){return e.require?e.require:e.require=x.makeRequire(e.map)},exports:function(e){return e.usingExports=!0,e.map.isDefine?e.exports?j[e.map.id]=e.exports:e.exports=j[e.map.id]={}:void 0},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return m(A.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},E=function(e){this.events=m(I,e.id)||{},this.map=e,this.shim=m(A.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},E.prototype={init:function(e,t,n,i){i=i||{},this.inited||(this.factory=t,n?this.on("error",n):this.events.error&&(n=u(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=n,this.inited=!0,this.ignore=i.ignore,i.enabled||this.enabled?this.enable():this.check())},defineDep:function(e,t){this.depMatched[e]||(this.depMatched[e]=!0,this.depCount-=1,this.depExports[e]=t)},fetch:function(){if(!this.fetched){this.fetched=!0,x.startTime=(new Date).getTime();var e=this.map;if(!this.shim)return e.prefix?this.callPlugin():this.load();x.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],u(this,function(){return e.prefix?this.callPlugin():this.load()}))}},load:function(){var e=this.map.url;O[e]||(O[e]=!0,x.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,n=this.map.id;t=this.depExports;var i=this.exports,r=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,1>this.depCount&&!this.defined){if(G(r)){if(this.events.error&&this.map.isDefine||g.onError!==ca)try{i=x.execCb(n,r,t,i)}catch(a){e=a}else i=x.execCb(n,r,t,i);if(this.map.isDefine&&void 0===i&&((t=this.module)?i=t.exports:this.usingExports&&(i=this.exports)),e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",c(this.error=e)}else i=r;this.exports=i,this.map.isDefine&&!this.ignore&&(j[n]=i,g.onResourceLoad)&&g.onResourceLoad(x,this.map,this.depMaps),h(n),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var e=this.map,i=e.id,r=o(e.prefix);this.depMaps.push(r),l(r,"defined",u(this,function(r){var a,d;d=m(F,this.map.id);var f=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,v=x.makeRequire(e.parentMap,{enableBuildCallback:!0});this.map.unnormalized?(r.normalize&&(f=r.normalize(f,function(e){return n(e,p,!0)})||""),r=o(e.prefix+"!"+f,this.map.parentMap),l(r,"defined",u(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),(d=m(S,r.id))&&(this.depMaps.push(r),this.events.error&&d.on("error",u(this,function(e){this.emit("error",e)})),d.enable())):d?(this.map.url=x.nameToUrl(d),this.load()):(a=u(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),a.error=u(this,function(e){this.inited=!0,this.error=e,e.requireModules=[i],B(S,function(e){0===e.map.id.indexOf(i+"_unnormalized")&&h(e.map.id)}),c(e)}),a.fromText=u(this,function(n,r){var l=e.name,u=o(l),d=M;r&&(n=r),d&&(M=!1),s(u),t(A.config,i)&&(A.config[l]=A.config[i]);try{g.exec(n)}catch(h){return c(C("fromtexteval","fromText eval for "+i+" failed: "+h,h,[i]))}d&&(M=!0),this.depMaps.push(u),x.completeLoad(l),v([l],a)}),r.load(e.name,v,a,A))})),x.enable(r,this),this.pluginMaps[r.id]=r},enable:function(){D[this.map.id]=this,this.enabling=this.enabled=!0,v(this.depMaps,u(this,function(e,n){var i,r;if("string"==typeof e){if(e=o(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[n]=e,i=m(L,e.id))return void(this.depExports[n]=i(this));this.depCount+=1,l(e,"defined",u(this,function(e){this.defineDep(n,e),this.check()})),this.errback?l(e,"error",u(this,this.errback)):this.events.error&&l(e,"error",u(this,function(e){this.emit("error",e)}))}i=e.id,r=S[i],!t(L,i)&&r&&!r.enabled&&x.enable(e,this)})),B(this.pluginMaps,u(this,function(e){var t=m(S,e.id);t&&!t.enabled&&x.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var n=this.events[e];n||(n=this.events[e]=[]),n.push(t)},emit:function(e,t){v(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},x={config:A,contextName:e,registry:S,defined:j,urlFetched:O,defQueue:W,Module:E,makeModuleMap:o,nextTick:g.nextTick,onError:c,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");var t=A.shim,n={paths:!0,bundles:!0,config:!0,map:!0};B(e,function(e,t){n[t]?(A[t]||(A[t]={}),U(A[t],e,!0,!0)):A[t]=e}),e.bundles&&B(e.bundles,function(e,t){v(e,function(e){e!==t&&(F[e]=t)})}),e.shim&&(B(e.shim,function(e,n){H(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=x.makeShimExports(e)),t[n]=e}),A.shim=t),e.packages&&v(e.packages,function(e){var t,e="string"==typeof e?{name:e}:e;t=e.name,e.location&&(A.paths[t]=e.location),A.pkgs[t]=e.name+"/"+(e.main||"main").replace(ia,"").replace(Q,"")}),B(S,function(e,t){!e.inited&&!e.map.unnormalized&&(e.map=o(t))}),(e.deps||e.callback)&&x.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(ba,arguments)),t||e.exports&&da(e.exports)}},makeRequire:function(r,a){function l(n,i,u){var d,h;return a.enableBuildCallback&&i&&G(i)&&(i.__requireJsBuild=!0),"string"==typeof n?G(i)?c(C("requireargs","Invalid require call"),u):r&&t(L,n)?L[n](S[r.id]):g.get?g.get(x,n,r,l):(d=o(n,r,!1,!0),d=d.id,t(j,d)?j[d]:c(C("notloaded",'Module name "'+d+'" has not been loaded yet for context: '+e+(r?"":". Use require([])")))):(w(),x.nextTick(function(){w(),h=s(o(null,r)),h.skipMap=a.skipMap,h.init(n,i,u,{enabled:!0}),p()}),l)}return a=a||{},U(l,{isBrowser:z,toUrl:function(e){var t,i=e.lastIndexOf("."),a=e.split("/")[0];return-1!==i&&("."!==a&&".."!==a||i>1)&&(t=e.substring(i,e.length),e=e.substring(0,i)),x.nameToUrl(n(e,r&&r.id,!0),t,!0)},defined:function(e){return t(j,o(e,r,!1,!0).id)},specified:function(e){return e=o(e,r,!1,!0).id,t(j,e)||t(S,e)}}),r||(l.undef=function(e){d();var t=o(e,r,!0),n=m(S,e);i(e),delete j[e],delete O[t.url],delete I[e],T(W,function(t,n){t[0]===e&&W.splice(n,1)}),n&&(n.events.defined&&(I[e]=n.events),h(e))}),l},enable:function(e){m(S,e.id)&&s(e).enable()},completeLoad:function(e){var n,i,a=m(A.shim,e)||{},o=a.exports;for(d();W.length;){if(i=W.shift(),null===i[0]){if(i[0]=e,n)break;n=!0}else i[0]===e&&(n=!0);b(i)}if(i=m(S,e),!n&&!t(j,e)&&i&&!i.inited){if(A.enforceDefine&&(!o||!da(o)))return r(e)?void 0:c(C("nodefine","No define call for "+e,null,[e]));b([e,a.deps||[],a.exportsFn])}p()},nameToUrl:function(e,t,n){var i,r,a;if((i=m(A.pkgs,e))&&(e=i),i=m(F,e))return x.nameToUrl(i,t,n);if(g.jsExtRegExp.test(e))i=e+(t||"");else{for(i=A.paths,e=e.split("/"),r=e.length;r>0;r-=1)if(a=e.slice(0,r).join("/"),a=m(i,a)){H(a)&&(a=a[0]),e.splice(0,r,a);break}i=e.join("/"),i+=t||(/^data\:|\?/.test(i)||n?"":".js"),i=("/"===i.charAt(0)||i.match(/^[\w\+\.\-]+:/)?"":A.baseUrl)+i}return A.urlArgs?i+((-1===i.indexOf("?")?"?":"&")+A.urlArgs):i},load:function(e,t){g.load(x,e,t)},execCb:function(e,t,n,i){return t.apply(i,n)},onScriptLoad:function(e){("load"===e.type||ja.test((e.currentTarget||e.srcElement).readyState))&&(N=null,e=y(e),x.completeLoad(e.id))},onScriptError:function(e){var t=y(e);return r(t.id)?void 0:c(C("scripterror","Script error for: "+t.id,e,[t.id]))}},x.require=x.makeRequire(),x}var g,x,y,D,I,E,N,J,s,O,ka=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,la=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,Q=/\.js$/,ia=/^\.\//;x=Object.prototype;var K=x.toString,fa=x.hasOwnProperty,ha=Array.prototype.splice,z=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),ea=!z&&"undefined"!=typeof importScripts,ja=z&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,Y="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),F={},q={},R=[],M=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(G(requirejs))return;q=requirejs,requirejs=void 0}"undefined"!=typeof require&&!G(require)&&(q=require,require=void 0),g=requirejs=function(e,t,n,i){var r,a="_";return!H(e)&&"string"!=typeof e&&(r=e,H(t)?(e=t,t=n,n=i):e=[]),r&&r.context&&(a=r.context),(i=m(F,a))||(i=F[a]=g.s.newContext(a)),r&&i.configure(r),i.require(e,t,n)},g.config=function(e){return g(e)},g.nextTick="undefined"!=typeof setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=g),g.version="2.1.17",g.jsExtRegExp=/^\/|:|\?|\.js$/,g.isBrowser=z,x=g.s={contexts:F,newContext:ga},g({}),v(["toUrl","undef","defined","specified"],function(e){g[e]=function(){var t=F._;return t.require[e].apply(t,arguments)}}),z&&(y=x.head=document.getElementsByTagName("head")[0],D=document.getElementsByTagName("base")[0])&&(y=x.head=D.parentNode),g.onError=ca,g.createNode=function(e){var t=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return t.type=e.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,t},g.load=function(e,t,n){var i=e&&e.config||{};if(z)return i=g.createNode(i,t,n),i.setAttribute("data-requirecontext",e.contextName),i.setAttribute("data-requiremodule",t),!i.attachEvent||i.attachEvent.toString&&0>i.attachEvent.toString().indexOf("[native code")||Y?(i.addEventListener("load",e.onScriptLoad,!1),i.addEventListener("error",e.onScriptError,!1)):(M=!0,i.attachEvent("onreadystatechange",e.onScriptLoad)),i.src=n,J=i,D?y.insertBefore(i,D):y.appendChild(i),J=null,i;if(ea)try{importScripts(n),e.completeLoad(t)}catch(r){e.onError(C("importscripts","importScripts failed for "+t+" at "+n,r,[t]))}},z&&!q.skipDataMain&&T(document.getElementsByTagName("script"),function(e){return y||(y=e.parentNode),(I=e.getAttribute("data-main"))?(s=I,q.baseUrl||(E=s.split("/"),s=E.pop(),O=E.length?E.join("/")+"/":"./",q.baseUrl=O),s=s.replace(Q,""),g.jsExtRegExp.test(s)&&(s=I),q.deps=q.deps?q.deps.concat(s):[s],!0):void 0}),define=function(e,t,n){var i,r;"string"!=typeof e&&(n=t,t=e,e=null),H(t)||(n=t,t=null),!t&&G(n)&&(t=[],n.length&&(n.toString().replace(ka,"").replace(la,function(e,n){t.push(n)}),t=(1===n.length?["require"]:["require","exports","module"]).concat(t))),M&&((i=J)||(N&&"interactive"===N.readyState||T(document.getElementsByTagName("script"),function(e){return"interactive"===e.readyState?N=e:void 0}),i=N),i&&(e||(e=i.getAttribute("data-requiremodule")),r=F[i.getAttribute("data-requirecontext")])),(r?r.defQueue:R).push([e,t,n])},define.amd={jQuery:!0},g.exec=function(b){return eval(b)},g(q)}}(this),define("requireLib",function(){}),define("WoltLab/WCF/Core.js",[],function(){"use strict";var e=function(e){return"object"==typeof e&&(Array.isArray(e)||n.isPlainObject(e))?t(e):e},t=function(t){if(!t)return null;if(Array.isArray(t))return t.slice();var n={};for(var i in t)t.hasOwnProperty(i)&&"undefined"!=typeof t[i]&&(n[i]=e(t[i]));return n},n={clone:function(t){return e(t)},convertLegacyUrl:function(e){return URL_LEGACY_MODE?e:e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var n=t.split(/([A-Z][a-z0-9]+)/),t="",i=0,r=n.length;r>i;i++){var a=n[i].trim();a.length&&(t.length&&(t+="-"),t+=a.toLowerCase())}return"index.php?"+t+"/&"})},extend:function(e){e=e||{};for(var t=this.clone(e),n=1,i=arguments.length;i>n;n++){var r=arguments[n];if(r)for(var a in r)r.hasOwnProperty(a)&&(t[a]=Array.isArray(r[a])||"object"!=typeof r[a]?r[a]:this.isPlainObject(r[a])?this.extend(e[a],r[a]):r[a])}return t},isPlainObject:function(e){return"object"!=typeof e||null===e||e.nodeType?!1:Object.getPrototypeOf(e)===Object.prototype},getType:function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)\]$/,"$1")},getUuid:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,n="x"==e?t:3&t|8;return n.toString(16)})},serialize:function(e,t){var n=[];for(var i in e)if(e.hasOwnProperty(i)){var r=t?t+"["+i+"]":i,a=e[i];n.push("object"==typeof a?this.serialize(a,r):encodeURIComponent(r)+"="+encodeURIComponent(a))}return n.join("&")},triggerEvent:function(e,t){var n;try{n=new Event(t,{bubbles:!0,cancelable:!0})}catch(i){n=document.createEvent("Event"),n.initEvent(t,!0,!0)}e.dispatchEvent(n)}};return n}),define("WoltLab/WCF/Dictionary.js",[],function(){"use strict";function e(){this._dictionary=t?new Map:{}}var t=window.hasOwnProperty("Map")&&"function"==typeof window.Map;return e.prototype={set:function(e,n){if("number"==typeof e&&(e=e.toString()),"string"!=typeof e)throw new TypeError("Only strings can be used as keys, rejected '"+e+"' ("+typeof e+").");t?this._dictionary.set(e,n):this._dictionary[e]=n},"delete":function(e){"number"==typeof e&&(e=e.toString()),t?this._dictionary["delete"](e):this._dictionary[e]=void 0},has:function(e){return"number"==typeof e&&(e=e.toString()),t?this._dictionary.has(e):this._dictionary.hasOwnProperty(e)&&"undefined"!=typeof this._dictionary[e]},get:function(e){return"number"==typeof e&&(e=e.toString()),this.has(e)?t?this._dictionary.get(e):this._dictionary[e]:void 0},forEach:function(e){if("function"!=typeof e)throw new TypeError("forEach() expects a callback as first parameter.");if(t)this._dictionary.forEach(e);else for(var n=Object.keys(this._dictionary),i=0,r=n.length;r>i;i++)e(this._dictionary[n[i]],n[i])},merge:function(){for(var t=0,n=arguments.length;n>t;t++){var i=arguments[t];if(!(i instanceof e))throw new TypeError("Expected an object of type Dictionary, but argument "+t+" is not.");i.forEach(function(e,t){this.set(t,e)}.bind(this))}}},e.fromObject=function(t){var n=new e;for(var i in t)t.hasOwnProperty(i)&&n.set(i,t[i]);return n},Object.defineProperty(e.prototype,"size",{enumerable:!1,configurable:!0,get:function(){return t?this._dictionary.size:Object.keys(this._dictionary).length}}),e}),define("WoltLab/WCF/Template.grammar.js",["require"],function(){var e=function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},t=[2,47],n=[5,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,29,31,32,33,35,36,37,39,40,41,42,44,46,48],i=[1,33],r=[1,37],a=[1,38],o=[1,39],s=[1,42],l=[1,40],c=[1,44],u=[11,12,14,15,17,20,21,22,23],d=[11,12,14,15,16,17,18,19,20,21,22,23],h=[9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,29,31,33,36,39,40,41,42,44,46],f=[28,44,46],p=[12,14],m={trace:function(){},yy:{},symbols_:{error:2,TEMPLATE:3,CHUNK_STAR:4,EOF:5,CHUNK_STAR_repetition0:6,CHUNK:7,PLAIN_ANY:8,T_LITERAL:9,COMMAND:10,T_ANY:11,"}":12,"{":13,T_WS:14,"]":15,"[":16,")":17,"(":18,".":19,"=":20,T_VARIABLE:21,T_VARIABLE_NAME:22,T_QUOTED_STRING:23,"{if":24,COMMAND_PARAMETERS:25,COMMAND_repetition0:26,COMMAND_option0:27,"{/if}":28,"{include":29,COMMAND_PARAMETER_LIST:30,"{implode":31,"{/implode}":32,"{foreach":33,COMMAND_option1:34,"{/foreach}":35,"{lang}":36,"{/lang}":37,VARIABLE:38,"{#":39,"{@":40,"{ldelim}":41,"{rdelim}":42,ELSE:43,"{else}":44,ELSE_IF:45,"{elseif":46,FOREACH_ELSE:47,"{foreachelse}":48,VARIABLE_repetition0:49,VARIABLE_SUFFIX:50,VARIABLE_SUFFIX_option0:51,COMMAND_PARAMETER_VALUE:52,COMMAND_PARAMETERS_repetition_plus0:53,COMMAND_PARAMETER:54,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",9:"T_LITERAL",11:"T_ANY",12:"}",13:"{",14:"T_WS",15:"]",16:"[",17:")",18:"(",19:".",20:"=",21:"T_VARIABLE",22:"T_VARIABLE_NAME",23:"T_QUOTED_STRING",24:"{if",28:"{/if}",29:"{include",31:"{implode",32:"{/implode}",33:"{foreach",35:"{/foreach}",36:"{lang}",37:"{/lang}",39:"{#",40:"{@",41:"{ldelim}",42:"{rdelim}",44:"{else}",46:"{elseif",48:"{foreachelse}"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[8,1],[8,1],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[10,7],[10,3],[10,5],[10,6],[10,3],[10,3],[10,3],[10,3],[10,1],[10,1],[43,2],[45,4],[47,2],[38,3],[50,3],[50,2],[50,3],[30,5],[30,3],[52,1],[52,1],[25,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[6,0],[6,2],[26,0],[26,2],[27,0],[27,1],[34,0],[34,1],[49,0],[49,2],[51,0],[51,1],[53,1],[53,2]],performAction:function(e,t,n,i,r,a){var o=a.length-1;switch(r){case 1:return a[o-1]+";";case 2:var s=a[o].reduce(function(e,t){return t.encode&&!e[1]?e[0]+=" + '"+t.value:t.encode&&e[1]?e[0]+=t.value:!t.encode&&e[1]?e[0]+="' + "+t.value:t.encode||e[1]||(e[0]+=" + "+t.value),e[1]=t.encode,e},["''",!1]);s[1]&&(s[0]+="'"),this.$=s[0];break;case 3:case 4:this.$={encode:!0,value:a[o].replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")};break;case 5:this.$={encode:!1,value:a[o]};break;case 8:this.$=a[o-1]+a[o];break;case 19:this.$="(function() { if ("+a[o-5]+") { return "+a[o-3]+"; } "+a[o-2].join(" ")+" "+(a[o-1]||"")+" return ''; })()";break;case 20:if(!a[o-1].file)throw new Error("Missing parameter file");this.$=a[o-1].file+".fetch(v)";break;case 21:if(!a[o-3].from)throw new Error("Missing parameter from");if(!a[o-3].item)throw new Error("Missing parameter item");a[o-3].glue||(a[o-3].glue="', '"),this.$="(function() { return "+a[o-3].from+".map(function(item) { v["+a[o-3].item+"] = item; return "+a[o-1]+"; }).join("+a[o-3].glue+"); })()";break;case 22:if(!a[o-4].from)throw new Error("Missing parameter from");if(!a[o-4].item)throw new Error("Missing parameter item");this.$="(function() {var looped = false, result = '';if ("+a[o-4].from+" instanceof Array) {for (var i = 0; i < "+a[o-4].from+".length; i++) { looped = true;v["+a[o-4].key+"] = i;v["+a[o-4].item+"] = "+a[o-4].from+"[i];result += "+a[o-2]+";}} else {for (var key in "+a[o-4].from+") {if (!"+a[o-4].from+".hasOwnProperty(key)) continue;looped = true;v["+a[o-4].key+"] = key;v["+a[o-4].item+"] = "+a[o-4].from+"[key];result += "+a[o-2]+";}}return (looped ? result : "+(a[o-1]||"''")+"); })()";break;case 23:this.$="Language.get("+a[o-1]+")";break;case 24:this.$="StringUtil.escapeHTML("+a[o-1]+")";break;case 25:this.$="StringUtil.formatNumeric("+a[o-1]+")";break;case 26:this.$=a[o-1];break;case 27:this.$="'{'";break;case 28:this.$="'}'";break;case 29:this.$="else { return "+a[o]+"; }";break;case 30:this.$="else if ("+a[o-2]+") { return "+a[o]+"; }";break;case 31:this.$=a[o];break;case 32:this.$="v['"+a[o-1]+"']"+a[o].join("");break;case 33:this.$=a[o-2]+a[o-1]+a[o];break;case 34:this.$="['"+a[o]+"']";break;case 35:this.$=a[o-2]+(a[o-1]||"")+a[o];break;case 36:this.$=a[o],this.$[a[o-4]]=a[o-2];break;case 37:this.$={},this.$[a[o-2]]=a[o];break;case 40:this.$=a[o].join("");break;case 47:case 49:case 55:this.$=[];break;case 48:case 50:case 56:case 60:a[o-1].push(a[o]);break;case 59:this.$=[a[o]]}},table:[e([5,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,36,39,40,41,42],t,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},e([5,28,32,35,37,44,46,48],[2,2],{7:5,8:6,10:8,9:[1,7],11:[1,9],12:[1,10],13:[1,11],14:[1,21],15:[1,12],16:[1,13],17:[1,14],18:[1,15],19:[1,16],20:[1,17],21:[1,18],22:[1,19],23:[1,20],24:[1,22],29:[1,23],31:[1,24],33:[1,25],36:[1,26],39:[1,27],40:[1,28],41:[1,29],42:[1,30]}),{1:[2,1]},e(n,[2,48]),e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{14:[1,31],21:i,38:32},e(n,[2,9]),e(n,[2,10]),e(n,[2,11]),e(n,[2,12]),e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),e(n,[2,17]),e(n,[2,18]),{11:r,14:a,20:o,21:i,22:s,23:l,25:34,38:41,53:35,54:36},{22:c,30:43},{22:c,30:45},{22:c,30:46},e([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,36,37,39,40,41,42],t,{6:3,4:47}),{21:i,38:48},{21:i,38:49},e(n,[2,27]),e(n,[2,28]),e(n,[2,8]),{12:[1,50]},{22:[1,51]},{12:[1,52]},e([12,15,17],[2,40],{38:41,54:53,11:r,14:a,20:o,21:i,22:s,23:l}),e(u,[2,59]),e(u,[2,41]),e(u,[2,42]),e(u,[2,43]),e(u,[2,44]),e(u,[2,45]),e(u,[2,46]),{12:[1,54]},{20:[1,55]},{12:[1,56]},{12:[1,57]},{37:[1,58]},{12:[1,59]},{12:[1,60]},e(n,[2,24]),e(d,[2,55],{49:61}),e(h,t,{6:3,4:62}),e(u,[2,60]),e(n,[2,20]),{21:i,23:[1,64],38:65,52:63},e([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,32,33,36,39,40,41,42],t,{6:3,4:66}),e([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,35,36,39,40,41,42,48],t,{6:3,4:67}),e(n,[2,23]),e(n,[2,25]),e(n,[2,26]),e(u,[2,32],{50:68,16:[1,69],18:[1,71],19:[1,70]}),e(f,[2,49],{26:72}),{12:[2,37],14:[1,73]},e(p,[2,38]),e(p,[2,39]),{32:[1,74]},{34:75,35:[2,53],47:76,48:[1,77]},e(d,[2,56]),{11:r,14:a,20:o,21:i,22:s,23:l,25:78,38:41,53:35,54:36},{22:[1,79]},{11:r,14:a,17:[2,57],20:o,21:i,22:s,23:l,25:81,38:41,51:80,53:35,54:36},{27:82,28:[2,51],43:84,44:[1,86],45:83,46:[1,85]},{22:c,30:87},e(n,[2,21]),{35:[1,88]},{35:[2,54]},e([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,35,36,39,40,41,42],t,{6:3,4:89}),{15:[1,90]},e(d,[2,34]),{17:[1,91]},{17:[2,58]},{28:[1,92]},e(f,[2,50]),{28:[2,52]},{11:r,14:a,20:o,21:i,22:s,23:l,25:93,38:41,53:35,54:36},e([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,29,31,33,36,39,40,41,42],t,{6:3,4:94}),{12:[2,36]},e(n,[2,22]),{35:[2,31]},e(d,[2,33]),e(d,[2,35]),e(n,[2,19]),{12:[1,95]},{28:[2,29]},e(h,t,{6:3,4:96}),e(f,[2,30])],defaultActions:{4:[2,1],76:[2,54],81:[2,58],84:[2,52],87:[2,36],89:[2,31],94:[2,29]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){function t(){var e;return e=p.lex()||h,"number"!=typeof e&&(e=n.symbols_[e]||e),e}var n=this,i=[0],r=[null],a=[],o=this.table,s="",l=0,c=0,u=0,d=2,h=1,f=a.slice.call(arguments,1),p=Object.create(this.lexer),m={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(m.yy[g]=this.yy[g]);p.setInput(e,m.yy),m.yy.lexer=p,m.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var b=p.options&&p.options.ranges;this.parseError="function"==typeof m.yy.parseError?m.yy.parseError:Object.getPrototypeOf(this).parseError;for(var y,w,_,E,C,x,L,k,A,T={};;){if(_=i[i.length-1],this.defaultActions[_]?E=this.defaultActions[_]:((null===y||"undefined"==typeof y)&&(y=t()),E=o[_]&&o[_][y]),"undefined"==typeof E||!E.length||!E[0]){var S="";A=[];for(x in o[_])this.terminals_[x]&&x>d&&A.push("'"+this.terminals_[x]+"'");S=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(l+1)+": Unexpected "+(y==h?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError(S,{text:p.match,token:this.terminals_[y]||y,line:p.yylineno,loc:v,expected:A})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+y);switch(E[0]){case 1:i.push(y),r.push(p.yytext),a.push(p.yylloc),i.push(E[1]),y=null,w?(y=w,w=null):(c=p.yyleng,s=p.yytext,l=p.yylineno,v=p.yylloc,u>0&&u--);break;case 2:if(L=this.productions_[E[1]][1],T.$=r[r.length-L],T._$={first_line:a[a.length-(L||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(L||1)].first_column,last_column:a[a.length-1].last_column},b&&(T._$.range=[a[a.length-(L||1)].range[0],a[a.length-1].range[1]]),C=this.performAction.apply(T,[s,c,l,m.yy,E[1],r,a].concat(f)),"undefined"!=typeof C)return C;L&&(i=i.slice(0,-1*L*2),r=r.slice(0,-1*L),a=a.slice(0,-1*L)),i.push(this.productions_[E[1]][0]),r.push(T.$),a.push(T._$),k=o[i[i.length-2]][i[i.length-1]],i.push(k);break;case 3:return!0}}return!0}},g=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e;var t=e.match(/(?:\r\n?|\n).*/g);return t?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var r=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,i,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),i=e[0].match(/(?:\r\n?|\n).*/g),i&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in r)this[a]=r[a];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,i;this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),a=0;a<r.length;a++)if(n=this._input.match(this.rules[r[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,i=a,this.options.backtrack_lexer){if(e=this.test_match(n,r[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,r[i]),e!==!1?e:!1):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){var e=this.conditionStack.length-1;return e>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules
+},topState:function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,i){switch(n){case 0:break;case 1:return t.yytext=t.yytext.substring(9,t.yytext.length-10),9;case 2:return 23;case 3:return 23;case 4:return 21;case 5:return 22;case 6:return 19;case 7:return 16;case 8:return 15;case 9:return 18;case 10:return 17;case 11:return 20;case 12:return 41;case 13:return 42;case 14:return 39;case 15:return 40;case 16:return this.begin("command"),24;case 17:return this.begin("command"),46;case 18:return this.begin("command"),46;case 19:return 44;case 20:return 28;case 21:return 36;case 22:return 37;case 23:return this.begin("command"),29;case 24:return this.begin("command"),31;case 25:return 32;case 26:return this.begin("command"),33;case 27:return 48;case 28:return 35;case 29:return 13;case 30:return this.popState(),12;case 31:return 12;case 32:return 14;case 33:return 5;case 34:return 11}},rules:[/^(?:\{\*.*\*\})/,/^(?:\{literal\}.*?\{\/literal\})/,/^(?:"([^"]|\\\.)*")/,/^(?:'([^']|\\\.)*')/,/^(?:\$)/,/^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:=)/,/^(?:\{ldelim\})/,/^(?:\{rdelim\})/,/^(?:\{#)/,/^(?:\{@)/,/^(?:\{if )/,/^(?:\{else if )/,/^(?:\{elseif )/,/^(?:\{else\})/,/^(?:\{\/if\})/,/^(?:\{lang\})/,/^(?:\{\/lang\})/,/^(?:\{include )/,/^(?:\{implode )/,/^(?:\{\/implode\})/,/^(?:\{foreach )/,/^(?:\{foreachelse\})/,/^(?:\{\/foreach\})/,/^(?:\{)/,/^(?:\})/,/^(?:\})/,/^(?:\s+)/,/^(?:$)/,/^(?:[^{])/],conditions:{command:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],inclusive:!0},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33,34],inclusive:!0}}};return e}();return m.lexer=g,m}),define("WoltLab/WCF/NumberUtil.js",[],function(){"use strict";var e={round:function(e,t){return"undefined"==typeof t||0===+t?Math.round(e):(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!==0?0/0:(e=e.toString().split("e"),e=Math.round(+(e[0]+"e"+(e[1]?+e[1]-t:-t))),e=e.toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+t:t))))}};return e}),define("WoltLab/WCF/StringUtil.js",["Language","./NumberUtil"],function(e,t){"use strict";var n={addThousandsSeparator:function(t){return void 0===e&&(e=require("Language")),String(t).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+e.get("wcf.global.thousandsSeparator"))},escapeHTML:function(e){return String(e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(n,i){void 0===e&&(e=require("Language")),n=String(t.round(n,i||-2));var r=n.split(".");return n=this.addThousandsSeparator(r[0]),r.length>1&&(n+=e.get("wcf.global.decimalPoint")+r[1]),n=n.replace("-","−")},lcfirst:function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},ucfirst:function(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)},unescapeHTML:function(e){return String(e).replace(/&amp;/g,"&").replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">")}};return n}),define("WoltLab/WCF/Template.js",["./Template.grammar","./StringUtil","Language"],function(e,t,n){"use strict";function i(){this.yy={}}function r(i){void 0===n&&(n=require("Language"));try{i=e.parse(i),i="var tmp = {};\nfor (var key in v) tmp[key] = v[key];\nv = tmp;\nv.__wcf = window.WCF; v.__window = window;\nreturn "+i,this.fetch=new Function("StringUtil","Language","v",i).bind(void 0,t,n)}catch(r){throw console.debug(r.message),r}}return i.prototype=e,e.Parser=i,e=new i,Object.defineProperty(r,"callbacks",{enumerable:!1,configurable:!1,get:function(){throw new Error("WCF.Template.callbacks is no longer supported")},set:function(){throw new Error("WCF.Template.callbacks is no longer supported")}}),r.prototype={fetch:function(){throw new Error("This Template is not initialized.")}},r}),define("WoltLab/WCF/Language.js",["Dictionary","./Template"],function(e,t){"use strict";var n=new e,i={addObject:function(t){n.merge(e.fromObject(t))},add:function(e,t){n.set(e,t)},get:function(e,i){i||(i={});var r=n.get(e);return void 0===r?(console.warn("Attempt to retrieve unknown phrase '"+e+"'."),console.warn((new Error).stack),e):("string"==typeof r&&(n.set(e,new t(r)),r=n.get(e)),r instanceof t&&(r=r.fetch(i)),r)}};return i}),define("WoltLab/WCF/CallbackList.js",["Dictionary"],function(e){"use strict";function t(){this._dictionary=new e}return t.prototype={add:function(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._dictionary.has(e)||this._dictionary.set(e,[]),this._dictionary.get(e).push(t)},remove:function(e){this._dictionary["delete"](e)},forEach:function(e,t){if(null===e)this._dictionary.forEach(function(e){e.forEach(t)});else{var n=this._dictionary.get(e);void 0!==n&&n.forEach(t)}}},t}),define("WoltLab/WCF/DOM/Change/Listener.js",["CallbackList"],function(e){"use strict";var t=new e,n=!1,i={add:t.add.bind(t),remove:t.remove.bind(t),trigger:function(){if(!n)try{n=!0,t.forEach(null,function(e){e()})}finally{n=!1}}};return i}),define("WoltLab/WCF/DOM/Util.js",[],function(){"use strict";for(var e="",t=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector"],n=0;4>n;n++)if(Element.prototype.hasOwnProperty(t[n])){e=t[n];break}var i=0,r={createFragmentFromHtml:function(e){var t=document.createElement("div");t.innerHTML=e;for(var n=document.createDocumentFragment();t.childNodes.length;)n.appendChild(t.childNodes[0]);return n},getUniqueId:function(){var e;do e="wcf"+i++;while(null!==document.getElementById(e));return e},identify:function(e){if(!(e&&e instanceof Element))return null;var t=e.getAttribute("id");return t||(t=this.getUniqueId(),e.setAttribute("id",t)),t},matches:function(t,n){return t[e](n)},outerHeight:function(e,t){t=t||window.getComputedStyle(e);var n=e.offsetHeight;return n+=~~t.marginTop+~~t.marginBottom},outerWidth:function(e,t){t=t||window.getComputedStyle(e);var n=e.offsetWidth;return n+=~~t.marginLeft+~~t.marginRight},outerDimensions:function(e){var t=window.getComputedStyle(e);return{height:this.outerHeight(e,t),width:this.outerWidth(e,t)}},offset:function(e){var t=e.getBoundingClientRect();return{top:t.top+document.body.scrollTop,left:t.left+document.body.scrollLeft}},prepend:function(e,t){0===t.childElementCount?t.appendChild(e):t.insertBefore(e,t.children[0])},insertAfter:function(e,t){null!==t.nextElementSibling?t.parentNode.insertBefore(e,t.nextElementSibling):t.parentNode.appendChild(e)},setStyles:function(e,t){for(var n in t)t.hasOwnProperty(n)&&e.style.setProperty(n,t[n])},styleAsInt:function(e,t){var n=e.getPropertyValue(t);return null===n?0:parseInt(n)}};return window.bc_wcfDOMUtil=r,r}),function(e,t,n){var i=window.matchMedia;"undefined"!=typeof module&&module.exports?module.exports=n(i):"function"==typeof define&&define.amd?define("enquire",[],function(){return t[e]=n(i)}):t[e]=n(i)}("enquire",this,function(e){"use strict";function t(e,t){var n,i=0,r=e.length;for(i;r>i&&(n=t(e[i],i),n!==!1);i++);}function n(e){return"[object Array]"===Object.prototype.toString.apply(e)}function i(e){return"function"==typeof e}function r(e){this.options=e,!e.deferSetup&&this.setup()}function a(t,n){this.query=t,this.isUnconditional=n,this.handlers=[],this.mql=e(t);var i=this;this.listener=function(e){i.mql=e,i.assess()},this.mql.addListener(this.listener)}function o(){if(!e)throw new Error("matchMedia not present, legacy browsers require a polyfill");this.queries={},this.browserIsIncapable=!e("only all").matches}return r.prototype={setup:function(){this.options.setup&&this.options.setup(),this.initialised=!0},on:function(){!this.initialised&&this.setup(),this.options.match&&this.options.match()},off:function(){this.options.unmatch&&this.options.unmatch()},destroy:function(){this.options.destroy?this.options.destroy():this.off()},equals:function(e){return this.options===e||this.options.match===e}},a.prototype={addHandler:function(e){var t=new r(e);this.handlers.push(t),this.matches()&&t.on()},removeHandler:function(e){var n=this.handlers;t(n,function(t,i){return t.equals(e)?(t.destroy(),!n.splice(i,1)):void 0})},matches:function(){return this.mql.matches||this.isUnconditional},clear:function(){t(this.handlers,function(e){e.destroy()}),this.mql.removeListener(this.listener),this.handlers.length=0},assess:function(){var e=this.matches()?"on":"off";t(this.handlers,function(t){t[e]()})}},o.prototype={register:function(e,r,o){var s=this.queries,l=o&&this.browserIsIncapable;return s[e]||(s[e]=new a(e,l)),i(r)&&(r={match:r}),n(r)||(r=[r]),t(r,function(t){i(t)&&(t={match:t}),s[e].addHandler(t)}),this},unregister:function(e,t){var n=this.queries[e];return n&&(t?n.removeHandler(t):(n.clear(),delete this.queries[e])),this}},new o}),define("WoltLab/WCF/Ajax",["AjaxRequest","Core","ObjectMap"],function(e,t,n){"use strict";var i=new n,r={api:function(t,n,r,a){"object"!=typeof n&&(n={});var o=i.get(t);if(void 0===o){if("function"!=typeof t._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");var s=t._ajaxSetup();s.pinData=!0,s.callbackObject=t,s.url||(s.url="index.php/AJAXProxy/?t="+SECURITY_TOKEN),o=new e(s),i.set(t,o)}var l=null,c=null;return"function"==typeof r&&(l=o.getOption("success"),o.setOption("success",r)),"function"==typeof a&&(c=o.getOption("failure"),o.setOption("failure",a)),o.setData(n),o.sendRequest(),null!==l&&o.setOption("success",l),null!==c&&o.setOption("failure",c),o},apiOnce:function(t){t.pinData=!1,t.callbackObject=null,t.url||(t.url="index.php/AJAXProxy/?t="+SECURITY_TOKEN);var n=new e(t);n.sendRequest()}};return r}),define("WoltLab/WCF/Environment.js",[],function(){"use strict";var e="other",t="none",n="desktop",i=!1,r={setup:function(){if("object"==typeof window.chrome)e="chrome";else for(var r=window.getComputedStyle(document.documentElement),a=0,o=r.length;o>a;a++){var s=r[a];0===s.indexOf("-ms-")?e="microsoft":0===s.indexOf("-moz-")?e="firefox":0===s.indexOf("-webkit-")&&(e="safari")}var l=window.navigator.userAgent.toLowerCase();-1!==l.indexOf("crios")?(e="chrome",n="ios"):/(?:iphone|ipad|ipod)/.test(l)?(e="safari",n="ios"):-1!==l.indexOf("android")?n="android":-1!==l.indexOf("iemobile")&&(e="microsoft",n="windows"),"desktop"!==n||-1===l.indexOf("mobile")&&-1===l.indexOf("tablet")||(n="mobile"),t="redactor",i=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0||window.DocumentTouch&&document instanceof DocumentTouch},browser:function(){return e},editor:function(){return t},platform:function(){return n},touch:function(){return i}};return r}),define("WoltLab/WCF/ObjectMap.js",[],function(){"use strict";function e(){this._map=t?new WeakMap:{key:[],value:[]}}var t=window.hasOwnProperty("WeakMap")&&"function"==typeof window.WeakMap;return e.prototype={set:function(e,n){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof n||null===n)throw new TypeError("Only objects can be used as value");t?this._map.set(e,n):(this._map.key.push(e),this._map.value.push(n))},"delete":function(e){if(t)this._map["delete"](e);else{var n=this._map.key.indexOf(e);this._map.key.splice(n),this._map.value.splice(n)}},has:function(e){return t?this._map.has(e):-1!==this._map.key.indexOf(e)},get:function(e){if(t)return this._map.get(e);var n=this._map.key.indexOf(e);return-1!==n?this._map.value[n]:void 0}},e}),define("WoltLab/WCF/UI/Confirmation.js",["Core","Language","UI/Dialog"],function(e,t,n){"use strict";var i=!1,r=null,a=null,o={},s=null,l={show:function(t){if(!i){if(o=e.extend({cancel:null,confirm:null,legacyCallback:null,message:"",parameters:{},template:""},t),o.message="string"==typeof o.message?o.message.trim():"",!o.message.length)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof o.confirm&&"function"!=typeof o.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");null===a&&this._createDialog(),a.innerHTML="string"==typeof t.template?t.template.trim():"",s.textContent=o.message,i=!0,n.open(this)}},_dialogSetup:function(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:t.get("wcf.global.confirmation.title")}}},getContentElement:function(){return a},_createDialog:function(){var e=document.createElement("div");e.setAttribute("id","wcfSystemConfirmation"),e.classList.add("systemConfirmation"),s=document.createElement("p"),e.appendChild(s),a=document.createElement("div"),a.setAttribute("id","wcfSystemConfirmationContent"),e.appendChild(a);var i=document.createElement("div");i.classList.add("formSubmit"),e.appendChild(i),r=document.createElement("button"),r.classList.add("buttonPrimary"),r.textContent=t.get("wcf.global.confirmation.confirm"),r.addEventListener("click",this._confirm.bind(this)),i.appendChild(r);var o=document.createElement("button");o.textContent=t.get("wcf.global.confirmation.cancel"),o.addEventListener("click",function(){n.close("wcfSystemConfirmation")}),i.appendChild(o),document.body.appendChild(e)},_confirm:function(){"function"==typeof o.legacyCallback?o.legacyCallback("confirm",o.parameters):o.confirm(o.parameters),i=!1,n.close("wcfSystemConfirmation")},_onClose:function(){i&&(r.blur(),i=!1,"function"==typeof o.legacyCallback?o.legacyCallback("cancel",o.parameters):"function"==typeof o.cancel&&o.cancel(o.parameters))},_onShow:function(){r.blur(),r.focus()}};return l}),define("WoltLab/WCF/UI/Dialog.js",["enquire","Ajax","Core","Dictionary","Environment","Language","ObjectMap","DOM/ChangeListener","DOM/Util","UI/Confirmation"],function(e,t,n,i,r,a,o,s,l,c){"use strict";var u=null,d=null,h=new i,f=new o,p=!1,m=null,g={setup:function(){void 0===t&&(t=require("Ajax")),d=document.createElement("div"),d.classList.add("dialogOverlay"),d.setAttribute("aria-hidden","true"),d.addEventListener("click",this._closeOnBackdrop.bind(this)),document.body.appendChild(d),m=function(e){return 27===e.keyCode&&"INPUT"!==e.target.nodeName&&"TEXTAREA"!==e.target.nodeName?(this.close(u),!1):!0}.bind(this),e.register("screen and (max-width: 800px)",{match:function(){p=!0},unmatch:function(){p=!1},setup:function(){p=!0},deferSetup:!0})},open:function(e,i){var r=f.get(e);if(n.isPlainObject(r))return this.openStatic(r.id,i);if("function"!=typeof e._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");var a=e._dialogSetup();if(!n.isPlainObject(a))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");r={id:a.id};var o=!0;if(void 0===a.source){var s=document.getElementById(a.id);if(null===s)throw new Error("Element id '"+a.id+"' is invalid and no source attribute was given.");a.source=document.createDocumentFragment(),a.source.appendChild(s)}else if(null===a.source)a.source=i;else if("function"==typeof a.source)a.source();else if(n.isPlainObject(a.source))t.api(this,a.source.data,function(t){t.returnValues&&"string"==typeof t.returnValues.template&&(this.open(e,t.returnValues.template),"function"==typeof a.source.after&&a.source.after(h.get(a.id).content,t))}.bind(this));else{if("string"==typeof a.source){var s=document.createElement("div");s.setAttribute("id",a.id),s.innerHTML=a.source,a.source=document.createDocumentFragment(),a.source.appendChild(s)}if(!a.source.nodeType||a.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");o=!1}return f.set(e,r),this.openStatic(a.id,a.source,a.options,o)},openStatic:function(e,t,i){return h.has(e)?this._updateDialog(e,t):(i=n.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:a.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,disposeOnClose:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},i),i.closable||(i.backdropCloseOnClick=!1),i.closeConfirmMessage&&(i.onBeforeClose=function(e){c.show({confirm:this.close.bind(this,e),message:i.closeConfirmMessage})}.bind(this)),this._createDialog(e,t,i)),h.get(e)},setTitle:function(e,t){var n=h.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");var i=DOMTraverse.childrenByTag(n.dialog,"HEADER");DOMTraverse.childrenByTag(i[0],"SPAN").textContent=t},_createDialog:function(e,t,n,i){var r=null;if(null===t&&(r=document.getElementById(e),null===r))throw new Error("Expected either a HTML string or an existing element id.");var a=document.createElement("div");a.classList.add("dialogContainer"),a.setAttribute("aria-hidden","true"),a.setAttribute("role","dialog"),a.setAttribute("data-id",e),n.disposeOnClose&&a.setAttribute("data-dispose-on-close",!0);var o=document.createElement("header");if(a.appendChild(o),n.title){var s=l.getUniqueId();a.setAttribute("aria-labelledby",s);var c=document.createElement("span");c.classList.add("dialogTitle"),c.textContent=n.title,c.setAttribute("id",s),o.appendChild(c)}if(n.closable){var u=document.createElement("a");u.className="dialogCloseButton jsTooltip",u.setAttribute("title",n.closeButtonLabel),u.setAttribute("aria-label",n.closeButtonLabel),u.addEventListener("click",this._close.bind(this)),o.appendChild(u);var f=document.createElement("span");f.textContent=n.closeButtonLabel,u.appendChild(f)}var p=document.createElement("div");p.classList.add("dialogContent"),n.disableContentPadding&&p.classList.add("dialogContentNoPadding"),a.appendChild(p);var m;null===r?(m=document.createElement("div"),"string"==typeof t?m.innerHTML=t:t instanceof DocumentFragment&&("div"!==t.children[0].nodeName||t.childElementCount>1?m.appendChild(t):m=t.children[0]),m.id=e):m=r,p.appendChild(m),"none"===m.style.getPropertyValue("display")&&m.style.removeProperty("display"),h.set(e,{backdropCloseOnClick:n.backdropCloseOnClick,content:m,dialog:a,header:o,onBeforeClose:n.onBeforeClose,onClose:n.onClose,onShow:n.onShow}),l.prepend(a,d),i!==!0&&this._updateDialog(e,null)},_updateDialog:function(e,t){var n=h.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t){n.content.innerHTML="";var i=document.createElement("div");i.innerHTML=t,n.content.appendChild(i)}"true"===n.dialog.getAttribute("aria-hidden")&&("true"===d.getAttribute("aria-hidden")&&window.addEventListener("keyup",m),n.dialog.setAttribute("aria-hidden","false"),d.setAttribute("aria-hidden","false"),d.setAttribute("data-close-on-click",n.backdropCloseOnClick?"true":"false"),u=e,this.rebuild(e),"function"==typeof n.onShow&&n.onShow(e)),s.trigger()},rebuild:function(e){var t=h.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("true"!==t.dialog.getAttribute("aria-hidden")){var n=t.content.parentNode,i=t.content.querySelector(".formSubmit"),a=0;null!==i?(n.classList.add("dialogForm"),i.classList.add("dialogFormSubmit"),a+=l.outerHeight(i),n.style.setProperty("margin-bottom",a+"px")):n.classList.remove("dialogForm"),a+=l.outerHeight(t.header);var o=window.innerHeight*(p?1:.8)-a;n.style.setProperty("max-height",~~o+"px"),"chrome"===r.browser()&&(t.content.scrollHeight>o?t.content.style.setProperty("margin-right","-1px"):t.content.style.removeProperty("margin-right"))}},_close:function(e){e.preventDefault();var t=h.get(u);return"function"==typeof t.onBeforeClose?(t.onBeforeClose(u),!1):void this.close(u)},_closeOnBackdrop:function(e){return e.target!==d?!0:void("true"===d.getAttribute("data-close-on-click")?this._close(e):e.preventDefault())},close:function(e){if("object"==typeof e){var t=f.get(e);void 0!==t&&(e=t.id)}var n=h.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");"function"==typeof n.onClose&&n.onClose(e),n.dialog.getAttribute("data-dispose-on-close")?setTimeout(function(){"true"===n.dialog.getAttribute("aria-hidden")&&(d.removeChild(n.dialog),h["delete"](e))},5e3):n.dialog.setAttribute("aria-hidden","true"),u=null;for(var i=0;i<d.childElementCount;i++){var r=d.children[i];if("false"===r.getAttribute("aria-hidden")){u=r.getAttribute("data-id");break}}null===u?(d.setAttribute("aria-hidden","true"),d.setAttribute("data-close-on-click","false"),window.removeEventListener("keyup",m)):(n=h.get(u),d.setAttribute("data-close-on-click",n.backdropCloseOnClick?"true":"false"))},getDialog:function(e){return h.get(e)},_ajaxSetup:function(){return{}}};return g}),define("WoltLab/WCF/Ajax/Status.js",["Language"],function(e){"use strict";var t=0,n=null,i=null,r={_init:function(){n=document.createElement("div"),n.classList.add("spinner");var t=document.createElement("span");t.className="icon icon48 fa-spinner",n.appendChild(t);var i=document.createElement("span");i.textContent=e.get("wcf.global.loading"),n.appendChild(i),document.body.appendChild(n)},show:function(){null===n&&this._init(),t++,null===i&&(i=window.setTimeout(function(){t&&n.classList.add("active"),i=null},250))},hide:function(){t--,0===t&&(null!==i&&window.clearTimeout(i),n.classList.remove("active"))}};return r}),define("WoltLab/WCF/Ajax/Request.js",["Core","Language","DOM/ChangeListener","DOM/Util","UI/Dialog","WoltLab/WCF/Ajax/Status"],function(e,t,n,i,r,a){"use strict";function o(e){this._data=null,this._options={},this._previousXhr=null,this._xhr=null,this._init(e)}var s=!1,l=!1;return o.prototype={_init:function(t){this._options=e.extend({data:{},responseType:"application/json",type:"POST",url:"",autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,failure:null,finalize:null,success:null,callbackObject:null},t),"object"==typeof t.callbackObject&&(this._options.callbackObject=t.callbackObject),this._options.url=e.convertLegacyUrl(this._options.url),this._options.pinData&&(this._data=e.extend({},this._options.data)),null!==this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject))),s===!1&&(s=!0,window.addEventListener("beforeunload",function(){l=!0}))},sendRequest:function(t){(t===!0||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||a.show(),this._xhr instanceof XMLHttpRequest&&(this._previousXhr=this._xhr),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._xhr.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest");var n=this,i=e.clone(this._options);if(this._xhr.onload=function(){this.readyState===XMLHttpRequest.DONE&&(this.status>=200&&this.status<300||304===this.status?i.responseType&&i.responseType!==this.getResponseHeader("Content-Type")?n._failure(this,i):n._success(this,i):n._failure(this,i))},this._xhr.onerror=function(){n._failure(this,i)},"POST"===this._options.type){var r=this._options.data;"object"==typeof r&&(r=e.serialize(r)),this._xhr.send(r)}else this._xhr.send()},abortPrevious:function(){null!==this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=null,this._options.silent||a.hide())},setOption:function(e,t){this._options[e]=t},getOption:function(e){return this._options.hasOwnProperty(e)?this._options[e]:null},setData:function(t){null!==this._data&&(t=e.extend(this._data,t)),this._options.data=t},_success:function(e,t){if(t.silent||a.hide(),"function"==typeof t.success){var n=null;if("application/json"===e.getResponseHeader("Content-Type")){try{n=JSON.parse(e.responseText)}catch(i){return void this._failure(e,t)}n.returnValues&&void 0!==n.returnValues.template&&(n.returnValues.template=n.returnValues.template.trim())}t.success(n,e.responseText,e,t.data)}this._finalize(t)},_failure:function(e,n){if(!l){n.silent||a.hide();var o=null;try{o=JSON.parse(e.responseText)}catch(s){}var c=!0;if("function"==typeof n.failure&&(c=n.failure(o,e.responseText,e,n.data)),n.ignoreError!==!0&&c!==!1){var u="",d="";if(null!==o?(o.stacktrace?u="<br /><p>Stacktrace:</p><p>"+o.stacktrace+"</p>":o.exceptionID&&(u="<br /><p>Exception ID: <code>"+o.exceptionID+"</code></p>"),d=o.message):d=e.responseText,!d||"undefined"===d)return;var h='<div class="ajaxDebugMessage"><p>'+d+"</p>"+u+"</div>";r.openStatic(i.getUniqueId(),h,{title:t.get("wcf.global.error.title")})}this._finalize(n)}},_finalize:function(e){"function"==typeof e.finalize&&e.finalize(this._xhr),this._previousXhr=null,n.trigger();for(var t=document.querySelectorAll('a[href*="#"]'),i=0,r=t.length;r>i;i++){var a=t[i],o=a.getAttribute("href");(-1!==o.indexOf("AJAXProxy")||-1!==o.indexOf("ajax-proxy"))&&(o=o.substr(o.indexOf("#")),a.setAttribute("href",document.location.toString().replace(/#.*/,"")+o))}}},o}),function(){var e=function(e){"use strict";function t(e){if(e.paused||e.ended||g)return!1;try{u.clearRect(0,0,l,s),u.drawImage(e,0,0,l,s)}catch(n){}y=setTimeout(t,D.duration,e),M.setIcon(c)}function n(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,n,i){return t+t+n+n+i+i});var n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return n?{r:parseInt(n[1],16),g:parseInt(n[2],16),b:parseInt(n[3],16)}:!1}function i(e,t){var n,i={};for(n in e)i[n]=e[n];for(n in t)i[n]=t[n];return i}function r(){return document.hidden||document.msHidden||document.webkitHidden||document.mozHidden}e=e?e:{};var a,o,s,l,c,u,d,h,f,p,m,g,v,b,y,w={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:!1,dataUrl:!1};v={},v.ff="undefined"!=typeof InstallTrigger,v.chrome=!!window.chrome,v.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0,v.ie=!1,v.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,v.supported=v.chrome||v.ff||v.opera;var _=[];m=function(){},h=g=!1;var E=function(){a=i(w,e),a.bgColor=n(a.bgColor),a.textColor=n(a.textColor),a.position=a.position.toLowerCase(),a.animation=D.types[""+a.animation]?a.animation:w.animation;var t=a.position.indexOf("up")>-1,r=a.position.indexOf("left")>-1;if(t||r)for(var h=0;h<D.types[""+a.animation].length;h++){var f=D.types[""+a.animation][h];t&&(f.y=f.y<.6?f.y-.4:f.y-2*f.y+(1-f.w)),r&&(f.x=f.x<.6?f.x-.4:f.x-2*f.x+(1-f.h)),D.types[""+a.animation][h]=f}a.type=x[""+a.type]?a.type:w.type,o=M.getIcon(),c=document.createElement("canvas"),d=document.createElement("img"),o.hasAttribute("href")?(d.setAttribute("src",o.getAttribute("href")),d.onload=function(){s=d.height>0?d.height:32,l=d.width>0?d.width:32,c.height=s,c.width=l,u=c.getContext("2d"),C.ready()}):(d.setAttribute("src",""),s=32,l=32,d.height=s,d.width=l,c.height=s,c.width=l,u=c.getContext("2d"),C.ready())},C={};C.ready=function(){h=!0,C.reset(),m()},C.reset=function(){h&&(_=[],f=!1,p=!1,u.clearRect(0,0,l,s),u.drawImage(d,0,0,l,s),M.setIcon(c),window.clearTimeout(b),window.clearTimeout(y))},C.start=function(){if(h&&!p){var e=function(){f=_[0],p=!1,_.length>0&&(_.shift(),C.start())};if(_.length>0){p=!0;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in _[0].options&&(a[e]=_[0].options[e])}),D.run(_[0].options,function(){e()},!1)};f?D.run(f.options,function(){t()},!0):t()}}};var x={},L=function(e){return e.n="number"==typeof e.n?Math.abs(0|e.n):e.n,e.x=l*e.x,e.y=s*e.y,e.w=l*e.w,e.h=s*e.h,e.len=(""+e.n).length,e};x.circle=function(e){e=L(e);var t=!1;2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),u.clearRect(0,0,l,s),u.drawImage(d,0,0,l,s),u.beginPath(),u.font=a.fontStyle+" "+Math.floor(e.h*(e.n>99?.85:1))+"px "+a.fontFamily,u.textAlign="center",t?(u.moveTo(e.x+e.w/2,e.y),u.lineTo(e.x+e.w-e.h/2,e.y),u.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),u.lineTo(e.x+e.w,e.y+e.h-e.h/2),u.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),u.lineTo(e.x+e.h/2,e.y+e.h),u.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),u.lineTo(e.x,e.y+e.h/2),u.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):u.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),u.fillStyle="rgba("+a.bgColor.r+","+a.bgColor.g+","+a.bgColor.b+","+e.o+")",u.fill(),u.closePath(),u.beginPath(),u.stroke(),u.fillStyle="rgba("+a.textColor.r+","+a.textColor.g+","+a.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?u.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):u.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),u.closePath()},x.rectangle=function(e){e=L(e);var t=!1;2===e.len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,t=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,t=!0),u.clearRect(0,0,l,s),u.drawImage(d,0,0,l,s),u.beginPath(),u.font=a.fontStyle+" "+Math.floor(e.h*(e.n>99?.9:1))+"px "+a.fontFamily,u.textAlign="center",u.fillStyle="rgba("+a.bgColor.r+","+a.bgColor.g+","+a.bgColor.b+","+e.o+")",u.fillRect(e.x,e.y,e.w,e.h),u.fillStyle="rgba("+a.textColor.r+","+a.textColor.g+","+a.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?u.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):u.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),u.closePath()};var k=function(e,t){t=("string"==typeof t?{animation:t}:t)||{},m=function(){try{if("number"==typeof e?e>0:""!==e){var i={type:"badge",options:{n:e}};if("animation"in t&&D.types[""+t.animation]&&(i.options.animation=""+t.animation),"type"in t&&x[""+t.type]&&(i.options.type=""+t.type),["bgColor","textColor"].forEach(function(e){e in t&&(i.options[e]=n(t[e]))}),["fontStyle","fontFamily"].forEach(function(e){e in t&&(i.options[e]=t[e])}),_.push(i),_.length>100)throw"Too many badges requests in queue.";C.start()}else C.reset()}catch(r){throw"Error setting badge. Message: "+r.message}},h&&m()},A=function(e){m=function(){try{var t=e.width,n=e.height,i=document.createElement("img"),r=n/s>t/l?t/l:n/s;i.setAttribute("src",e.getAttribute("src")),i.height=n/r,i.width=t/r,u.clearRect(0,0,l,s),u.drawImage(i,0,0,l,s),M.setIcon(c)}catch(a){throw"Error setting image. Message: "+a.message}},h&&m()},T=function(e){m=function(){try{if("stop"===e)return g=!0,C.reset(),void(g=!1);e.addEventListener("play",function(){t(this)},!1)}catch(n){throw"Error setting video. Message: "+n.message}},h&&m()},S=function(e){if(window.URL&&window.URL.createObjectURL||(window.URL=window.URL||{},window.URL.createObjectURL=function(e){return e}),v.supported){var n=!1;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia,m=function(){try{if("stop"===e)return g=!0,C.reset(),void(g=!1);n=document.createElement("video"),n.width=l,n.height=s,navigator.getUserMedia({video:!0,audio:!1},function(e){n.src=URL.createObjectURL(e),n.play(),t(n)},function(){})}catch(i){throw"Error setting webcam. Message: "+i.message}},h&&m()}},M={};M.getIcon=function(){var e=!1,t=function(){for(var e=document.getElementsByTagName("head")[0].getElementsByTagName("link"),t=e.length,n=t-1;n>=0;n--)if(/(^|\s)icon(\s|$)/i.test(e[n].getAttribute("rel")))return e[n];return!1};return a.element?e=a.element:a.elementId?(e=document.getElementById(a.elementId),e.setAttribute("href",e.getAttribute("src"))):(e=t(),e===!1&&(e=document.createElement("link"),e.setAttribute("rel","icon"),document.getElementsByTagName("head")[0].appendChild(e))),e.setAttribute("type","image/png"),e},M.setIcon=function(e){var t=e.toDataURL("image/png");if(a.dataUrl&&a.dataUrl(t),a.element)a.element.setAttribute("src",t);
+else if(a.elementId)document.getElementById(a.elementId).setAttribute("src",t);else if(v.ff||v.opera){var n=o;o=document.createElement("link"),v.opera&&o.setAttribute("rel","icon"),o.setAttribute("rel","icon"),o.setAttribute("type","image/png"),document.getElementsByTagName("head")[0].appendChild(o),o.setAttribute("href",t),n.parentNode&&n.parentNode.removeChild(n)}else o.setAttribute("href",t)};var D={};return D.duration=40,D.types={},D.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],D.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],D.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],D.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],D.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],D.run=function(e,t,n,o){var s=D.types[r()?"none":a.animation];return o=n===!0?"undefined"!=typeof o?o:s.length-1:"undefined"!=typeof o?o:0,t=t?t:function(){},o<s.length&&o>=0?(x[a.type](i(e,s[o])),b=setTimeout(function(){n?o-=1:o+=1,D.run(e,t,n,o)},D.duration),M.setIcon(c),void 0):void t()},E(),{badge:k,video:T,image:A,webcam:S,reset:C.reset,browser:{supported:v.supported}}};"undefined"!=typeof define&&define.amd?define("favico",[],function(){return e}):"undefined"!=typeof module&&module.exports?module.exports=e:this.Favico=e}(),function e(t,n,i){function r(o,s){if(!n[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[o]={exports:{}};t[o][0].call(u.exports,function(e){var n=t[o][1][e];return r(n?n:e)},u,u.exports,e,t,n,i)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(e){"use strict";var t=e("../main");"function"==typeof define&&define.amd?define("perfect-scrollbar",t):(window.PerfectScrollbar=t,"undefined"==typeof window.Ps&&(window.Ps=t))},{"../main":7}],2:[function(e,t,n){"use strict";function i(e,t){var n=e.className.split(" ");n.indexOf(t)<0&&n.push(t),e.className=n.join(" ")}function r(e,t){var n=e.className.split(" "),i=n.indexOf(t);i>=0&&n.splice(i,1),e.className=n.join(" ")}n.add=function(e,t){e.classList?e.classList.add(t):i(e,t)},n.remove=function(e,t){e.classList?e.classList.remove(t):r(e,t)},n.list=function(e){return e.classList?e.classList:e.className.split(" ")}},{}],3:[function(e,t,n){"use strict";function i(e,t){return window.getComputedStyle(e)[t]}function r(e,t,n){return"number"==typeof n&&(n=n.toString()+"px"),e.style[t]=n,e}function a(e,t){for(var n in t){var i=t[n];"number"==typeof i&&(i=i.toString()+"px"),e.style[n]=i}return e}n.e=function(e,t){var n=document.createElement(e);return n.className=t,n},n.appendTo=function(e,t){return t.appendChild(e),e},n.css=function(e,t,n){return"object"==typeof t?a(e,t):"undefined"==typeof n?i(e,t):r(e,t,n)},n.matches=function(e,t){return"undefined"!=typeof e.matches?e.matches(t):"undefined"!=typeof e.matchesSelector?e.matchesSelector(t):"undefined"!=typeof e.webkitMatchesSelector?e.webkitMatchesSelector(t):"undefined"!=typeof e.mozMatchesSelector?e.mozMatchesSelector(t):"undefined"!=typeof e.msMatchesSelector?e.msMatchesSelector(t):void 0},n.remove=function(e){"undefined"!=typeof e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}},{}],4:[function(e,t){"use strict";var n=function(e){this.element=e,this.events={}};n.prototype.bind=function(e,t){"undefined"==typeof this.events[e]&&(this.events[e]=[]),this.events[e].push(t),this.element.addEventListener(e,t,!1)},n.prototype.unbind=function(e,t){var n="undefined"!=typeof t;this.events[e]=this.events[e].filter(function(i){return n&&i!==t?!0:(this.element.removeEventListener(e,i,!1),!1)},this)},n.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var i=function(){this.eventElements=[]};i.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return"undefined"==typeof t&&(t=new n(e),this.eventElements.push(t)),t},i.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},i.prototype.unbind=function(e,t,n){this.eventElement(e).unbind(t,n)},i.prototype.unbindAll=function(){for(var e=0;e<this.eventElements.length;e++)this.eventElements[e].unbindAll()},i.prototype.once=function(e,t,n){var i=this.eventElement(e),r=function(e){i.unbind(t,r),n(e)};i.bind(t,r)},t.exports=i},{}],5:[function(e,t){"use strict";t.exports=function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return function(){return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}}()},{}],6:[function(e,t,n){"use strict";var i=e("./class"),r=e("./dom");n.toInt=function(e){return"string"==typeof e?parseInt(e,10):~~e},n.clone=function(e){if(null===e)return null;if("object"==typeof e){var t={};for(var n in e)t[n]=this.clone(e[n]);return t}return e},n.extend=function(e,t){var n=this.clone(e);for(var i in t)n[i]=this.clone(t[i]);return n},n.isEditable=function(e){return r.matches(e,"input,[contenteditable]")||r.matches(e,"select,[contenteditable]")||r.matches(e,"textarea,[contenteditable]")||r.matches(e,"button,[contenteditable]")},n.removePsClasses=function(e){for(var t=i.list(e),n=0;n<t.length;n++){var r=t[n];0===r.indexOf("ps-")&&i.remove(e,r)}},n.outerWidth=function(e){return this.toInt(r.css(e,"width"))+this.toInt(r.css(e,"paddingLeft"))+this.toInt(r.css(e,"paddingRight"))+this.toInt(r.css(e,"borderLeftWidth"))+this.toInt(r.css(e,"borderRightWidth"))},n.startScrolling=function(e,t){i.add(e,"ps-in-scrolling"),"undefined"!=typeof t?i.add(e,"ps-"+t):(i.add(e,"ps-x"),i.add(e,"ps-y"))},n.stopScrolling=function(e,t){i.remove(e,"ps-in-scrolling"),"undefined"!=typeof t?i.remove(e,"ps-"+t):(i.remove(e,"ps-x"),i.remove(e,"ps-y"))},n.env={isWebKit:"WebkitAppearance"in document.documentElement.style,supportsTouch:"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch,supportsIePointer:null!==window.navigator.msMaxTouchPoints}},{"./class":2,"./dom":3}],7:[function(e,t){"use strict";var n=e("./plugin/destroy"),i=e("./plugin/initialize"),r=e("./plugin/update");t.exports={initialize:i,update:r,destroy:n}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":20}],8:[function(e,t){"use strict";t.exports={wheelSpeed:1,wheelPropagation:!1,swipePropagation:!0,minScrollbarLength:null,maxScrollbarLength:null,useBothWheelAxes:!1,useKeyboard:!0,suppressScrollX:!1,suppressScrollY:!1,scrollXMarginOffset:0,scrollYMarginOffset:0}},{}],9:[function(e,t){"use strict";var n=e("../lib/dom"),i=e("../lib/helper"),r=e("./instances");t.exports=function(e){var t=r.get(e);t.event.unbindAll(),n.remove(t.scrollbarX),n.remove(t.scrollbarY),n.remove(t.scrollbarXRail),n.remove(t.scrollbarYRail),i.removePsClasses(e),r.remove(e)}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(e,t){"use strict";function n(e,t){function n(e){return e.getBoundingClientRect()}var r=window.Event.prototype.stopPropagation.bind;t.event.bind(t.scrollbarY,"click",r),t.event.bind(t.scrollbarYRail,"click",function(r){var o=i.toInt(t.scrollbarYHeight/2),s=r.pageY-n(t.scrollbarYRail).top-o,l=t.containerHeight-t.scrollbarYHeight,c=s/l;0>c?c=0:c>1&&(c=1),e.scrollTop=(t.contentHeight-t.containerHeight)*c,a(e)}),t.event.bind(t.scrollbarX,"click",r),t.event.bind(t.scrollbarXRail,"click",function(r){var o=i.toInt(t.scrollbarXWidth/2),s=r.pageX-n(t.scrollbarXRail).left-o;console.log(r.pageX,t.scrollbarXRail.offsetLeft);var l=t.containerWidth-t.scrollbarXWidth,c=s/l;0>c?c=0:c>1&&(c=1),e.scrollLeft=(t.contentWidth-t.containerWidth)*c,a(e)})}var i=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],11:[function(e,t){"use strict";function n(e,t){function n(n){var r=i+n,o=t.containerWidth-t.scrollbarXWidth;t.scrollbarXLeft=0>r?0:r>o?o:r;var s=a.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.scrollbarXWidth));e.scrollLeft=s}var i=null,o=null,l=function(t){n(t.pageX-o),s(e),t.stopPropagation(),t.preventDefault()},c=function(){a.stopScrolling(e,"x"),t.event.unbind(t.ownerDocument,"mousemove",l)};t.event.bind(t.scrollbarX,"mousedown",function(n){o=n.pageX,i=a.toInt(r.css(t.scrollbarX,"left")),a.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",l),t.event.once(t.ownerDocument,"mouseup",c),n.stopPropagation(),n.preventDefault()})}function i(e,t){function n(n){var r=i+n,o=t.containerHeight-t.scrollbarYHeight;t.scrollbarYTop=0>r?0:r>o?o:r;var s=a.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.scrollbarYHeight));e.scrollTop=s}var i=null,o=null,l=function(t){n(t.pageY-o),s(e),t.stopPropagation(),t.preventDefault()},c=function(){a.stopScrolling(e,"y"),t.event.unbind(t.ownerDocument,"mousemove",l)};t.event.bind(t.scrollbarY,"mousedown",function(n){o=n.pageY,i=a.toInt(r.css(t.scrollbarY,"top")),a.startScrolling(e,"y"),t.event.bind(t.ownerDocument,"mousemove",l),t.event.once(t.ownerDocument,"mouseup",c),n.stopPropagation(),n.preventDefault()})}var r=e("../../lib/dom"),a=e("../../lib/helper"),o=e("../instances"),s=e("../update-geometry");t.exports=function(e){var t=o.get(e);n(e,t),i(e,t)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19}],12:[function(e,t){"use strict";function n(e,t){function n(n,i){var r=e.scrollTop;if(0===n){if(!t.scrollbarYActive)return!1;if(0===r&&i>0||r>=t.contentHeight-t.containerHeight&&0>i)return!t.settings.wheelPropagation}var a=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===a&&0>n||a>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}var r=!1;t.event.bind(e,"mouseenter",function(){r=!0}),t.event.bind(e,"mouseleave",function(){r=!1});var o=!1;t.event.bind(t.ownerDocument,"keydown",function(s){if((!s.isDefaultPrevented||!s.isDefaultPrevented())&&r){var l=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(l){for(;l.shadowRoot;)l=l.shadowRoot.activeElement;if(i.isEditable(l))return}var c=0,u=0;switch(s.which){case 37:c=-30;break;case 38:u=30;break;case 39:c=30;break;case 40:u=-30;break;case 33:u=90;break;case 32:case 34:u=-90;break;case 35:u=s.ctrlKey?-t.contentHeight:-t.containerHeight;break;case 36:u=s.ctrlKey?e.scrollTop:t.containerHeight;break;default:return}e.scrollTop=e.scrollTop-u,e.scrollLeft=e.scrollLeft+c,a(e),o=n(c,u),o&&s.preventDefault()}})}var i=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],13:[function(e,t){"use strict";function n(e,t){function n(n,i){var r=e.scrollTop;if(0===n){if(!t.scrollbarYActive)return!1;if(0===r&&i>0||r>=t.contentHeight-t.containerHeight&&0>i)return!t.settings.wheelPropagation}var a=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===a&&0>n||a>=t.contentWidth-t.containerWidth&&n>0)return!t.settings.wheelPropagation}return!0}function r(e){var t=e.deltaX,n=-1*e.deltaY;return("undefined"==typeof t||"undefined"==typeof n)&&(t=-1*e.wheelDeltaX/6,n=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,n*=10),t!==t&&n!==n&&(t=0,n=e.wheelDelta),[t,n]}function o(t,n){var i=e.querySelector("textarea:hover");if(i){var r=i.scrollHeight-i.clientHeight;if(r>0&&!(0===i.scrollTop&&n>0||i.scrollTop===r&&0>n))return!0;var a=i.scrollLeft-i.clientWidth;if(a>0&&!(0===i.scrollLeft&&0>t||i.scrollLeft===a&&t>0))return!0}return!1}function s(s){if(i.env.isWebKit||!e.querySelector("select:focus")){var c=r(s),u=c[0],d=c[1];o(u,d)||(l=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(e.scrollTop=d?e.scrollTop-d*t.settings.wheelSpeed:e.scrollTop+u*t.settings.wheelSpeed,l=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(e.scrollLeft=u?e.scrollLeft+u*t.settings.wheelSpeed:e.scrollLeft-d*t.settings.wheelSpeed,l=!0):(e.scrollTop=e.scrollTop-d*t.settings.wheelSpeed,e.scrollLeft=e.scrollLeft+u*t.settings.wheelSpeed),a(e),l=l||n(u,d),l&&(s.stopPropagation(),s.preventDefault()))}}var l=!1;"undefined"!=typeof window.onwheel?t.event.bind(e,"wheel",s):"undefined"!=typeof window.onmousewheel&&t.event.bind(e,"mousewheel",s)}var i=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],14:[function(e,t){"use strict";function n(e,t){t.event.bind(e,"scroll",function(){r(e)})}var i=e("../instances"),r=e("../update-geometry");t.exports=function(e){var t=i.get(e);n(e,t)}},{"../instances":18,"../update-geometry":19}],15:[function(e,t){"use strict";function n(e,t){function n(){var e=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===e.toString().length?null:e.getRangeAt(0).commonAncestorContainer}function o(){l||(l=setInterval(function(){return r.get(e)?(e.scrollTop=e.scrollTop+c.top,e.scrollLeft=e.scrollLeft+c.left,void a(e)):void clearInterval(l)},50))}function s(){l&&(clearInterval(l),l=null),i.stopScrolling(e)}var l=null,c={top:0,left:0},u=!1;t.event.bind(t.ownerDocument,"selectionchange",function(){e.contains(n())?u=!0:(u=!1,s())}),t.event.bind(window,"mouseup",function(){u&&(u=!1,s())}),t.event.bind(window,"mousemove",function(t){if(u){var n={x:t.pageX,y:t.pageY},r={left:e.offsetLeft,right:e.offsetLeft+e.offsetWidth,top:e.offsetTop,bottom:e.offsetTop+e.offsetHeight};n.x<r.left+3?(c.left=-5,i.startScrolling(e,"x")):n.x>r.right-3?(c.left=5,i.startScrolling(e,"x")):c.left=0,n.y<r.top+3?(c.top=r.top+3-n.y<5?-5:-20,i.startScrolling(e,"y")):n.y>r.bottom-3?(c.top=n.y-r.bottom+3<5?5:20,i.startScrolling(e,"y")):c.top=0,0===c.top&&0===c.left?s():o()}})}var i=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],16:[function(e,t){"use strict";function n(e,t,n,a){function o(n,i){var r=e.scrollTop,a=e.scrollLeft,o=Math.abs(n),s=Math.abs(i);if(s>o){if(0>i&&r===t.contentHeight-t.containerHeight||i>0&&0===r)return!t.settings.swipePropagation}else if(o>s&&(0>n&&a===t.contentWidth-t.containerWidth||n>0&&0===a))return!t.settings.swipePropagation;return!0}function s(t,n){e.scrollTop=e.scrollTop-n,e.scrollLeft=e.scrollLeft-t,r(e)}function l(){y=!0}function c(){y=!1}function u(e){return e.targetTouches?e.targetTouches[0]:e}function d(e){return e.targetTouches&&1===e.targetTouches.length?!0:e.pointerType&&"mouse"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_MOUSE?!0:!1}function h(e){if(d(e)){w=!0;var t=u(e);m.pageX=t.pageX,m.pageY=t.pageY,g=(new Date).getTime(),null!==b&&clearInterval(b),e.stopPropagation()}}function f(e){if(!y&&w&&d(e)){var t=u(e),n={pageX:t.pageX,pageY:t.pageY},i=n.pageX-m.pageX,r=n.pageY-m.pageY;s(i,r),m=n;var a=(new Date).getTime(),l=a-g;l>0&&(v.x=i/l,v.y=r/l,g=a),o(i,r)&&(e.stopPropagation(),e.preventDefault())}}function p(){!y&&w&&(w=!1,clearInterval(b),b=setInterval(function(){return i.get(e)?Math.abs(v.x)<.01&&Math.abs(v.y)<.01?void clearInterval(b):(s(30*v.x,30*v.y),v.x*=.8,void(v.y*=.8)):void clearInterval(b)},10))}var m={},g=0,v={},b=null,y=!1,w=!1;n&&(t.event.bind(window,"touchstart",l),t.event.bind(window,"touchend",c),t.event.bind(e,"touchstart",h),t.event.bind(e,"touchmove",f),t.event.bind(e,"touchend",p)),a&&(window.PointerEvent?(t.event.bind(window,"pointerdown",l),t.event.bind(window,"pointerup",c),t.event.bind(e,"pointerdown",h),t.event.bind(e,"pointermove",f),t.event.bind(e,"pointerup",p)):window.MSPointerEvent&&(t.event.bind(window,"MSPointerDown",l),t.event.bind(window,"MSPointerUp",c),t.event.bind(e,"MSPointerDown",h),t.event.bind(e,"MSPointerMove",f),t.event.bind(e,"MSPointerUp",p)))}var i=e("../instances"),r=e("../update-geometry");t.exports=function(e,t,r){var a=i.get(e);n(e,a,t,r)}},{"../instances":18,"../update-geometry":19}],17:[function(e,t){"use strict";var n=e("../lib/class"),i=e("../lib/helper"),r=e("./instances"),a=e("./update-geometry"),o=e("./handler/click-rail"),s=e("./handler/drag-scrollbar"),l=e("./handler/keyboard"),c=e("./handler/mouse-wheel"),u=e("./handler/native-scroll"),d=e("./handler/selection"),h=e("./handler/touch");t.exports=function(e,t){t="object"==typeof t?t:{},n.add(e,"ps-container");var f=r.add(e);f.settings=i.extend(f.settings,t),o(e),s(e),c(e),u(e),d(e),(i.env.supportsTouch||i.env.supportsIePointer)&&h(e,i.env.supportsTouch,i.env.supportsIePointer),f.settings.useKeyboard&&l(e),a(e)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(e,t,n){"use strict";function i(e){var t=this;t.settings=d.clone(l),t.containerWidth=null,t.containerHeight=null,t.contentWidth=null,t.contentHeight=null,t.isRtl="rtl"===s.css(e,"direction"),t.event=new c,t.ownerDocument=e.ownerDocument||document,t.scrollbarXRail=s.appendTo(s.e("div","ps-scrollbar-x-rail"),e),t.scrollbarX=s.appendTo(s.e("div","ps-scrollbar-x"),t.scrollbarXRail),t.scrollbarXActive=null,t.scrollbarXWidth=null,t.scrollbarXLeft=null,t.scrollbarXBottom=d.toInt(s.css(t.scrollbarXRail,"bottom")),t.isScrollbarXUsingBottom=t.scrollbarXBottom===t.scrollbarXBottom,t.scrollbarXTop=t.isScrollbarXUsingBottom?null:d.toInt(s.css(t.scrollbarXRail,"top")),t.railBorderXWidth=d.toInt(s.css(t.scrollbarXRail,"borderLeftWidth"))+d.toInt(s.css(t.scrollbarXRail,"borderRightWidth")),t.railXMarginWidth=d.toInt(s.css(t.scrollbarXRail,"marginLeft"))+d.toInt(s.css(t.scrollbarXRail,"marginRight")),t.railXWidth=null,t.scrollbarYRail=s.appendTo(s.e("div","ps-scrollbar-y-rail"),e),t.scrollbarY=s.appendTo(s.e("div","ps-scrollbar-y"),t.scrollbarYRail),t.scrollbarYActive=null,t.scrollbarYHeight=null,t.scrollbarYTop=null,t.scrollbarYRight=d.toInt(s.css(t.scrollbarYRail,"right")),t.isScrollbarYUsingRight=t.scrollbarYRight===t.scrollbarYRight,t.scrollbarYLeft=t.isScrollbarYUsingRight?null:d.toInt(s.css(t.scrollbarYRail,"left")),t.scrollbarYOuterWidth=t.isRtl?d.outerWidth(t.scrollbarY):null,t.railBorderYWidth=d.toInt(s.css(t.scrollbarYRail,"borderTopWidth"))+d.toInt(s.css(t.scrollbarYRail,"borderBottomWidth")),t.railYMarginHeight=d.toInt(s.css(t.scrollbarYRail,"marginTop"))+d.toInt(s.css(t.scrollbarYRail,"marginBottom")),t.railYHeight=null}function r(e){return"undefined"==typeof e.dataset?e.getAttribute("data-ps-id"):e.dataset.psId}function a(e,t){"undefined"==typeof e.dataset?e.setAttribute("data-ps-id",t):e.dataset.psId=t}function o(e){"undefined"==typeof e.dataset?e.removeAttribute("data-ps-id"):delete e.dataset.psId}var s=e("../lib/dom"),l=e("./default-setting"),c=e("../lib/event-manager"),u=e("../lib/guid"),d=e("../lib/helper"),h={};n.add=function(e){var t=u();return a(e,t),h[t]=new i(e),h[t]},n.remove=function(e){delete h[r(e)],o(e)},n.get=function(e){return h[r(e)]}},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(e,t){"use strict";function n(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function i(e,t){var n={width:t.railXWidth};n.left=t.isRtl?e.scrollLeft+t.containerWidth-t.contentWidth:e.scrollLeft,t.isScrollbarXUsingBottom?n.bottom=t.scrollbarXBottom-e.scrollTop:n.top=t.scrollbarXTop+e.scrollTop,a.css(t.scrollbarXRail,n);var i={top:e.scrollTop,height:t.railYHeight};t.isScrollbarYUsingRight?i.right=t.isRtl?t.contentWidth-e.scrollLeft-t.scrollbarYRight-t.scrollbarYOuterWidth:t.scrollbarYRight-e.scrollLeft:i.left=t.isRtl?e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:t.scrollbarYLeft+e.scrollLeft,a.css(t.scrollbarYRail,i),a.css(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),a.css(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}var r=e("../lib/class"),a=e("../lib/dom"),o=e("../lib/helper"),s=e("./instances");t.exports=function(e){var t=s.get(e);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||a.appendTo(t.scrollbarXRail,e),e.contains(t.scrollbarYRail)||a.appendTo(t.scrollbarYRail,e),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset<t.contentWidth?(t.scrollbarXActive=!0,t.railXWidth=t.containerWidth-t.railXMarginWidth,t.scrollbarXWidth=n(t,o.toInt(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=o.toInt(e.scrollLeft*(t.railXWidth-t.scrollbarXWidth)/(t.contentWidth-t.containerWidth))):(t.scrollbarXActive=!1,t.scrollbarXWidth=0,t.scrollbarXLeft=0,e.scrollLeft=0),!t.settings.suppressScrollY&&t.containerHeight+t.settings.scrollYMarginOffset<t.contentHeight?(t.scrollbarYActive=!0,t.railYHeight=t.containerHeight-t.railYMarginHeight,t.scrollbarYHeight=n(t,o.toInt(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=o.toInt(e.scrollTop*(t.railYHeight-t.scrollbarYHeight)/(t.contentHeight-t.containerHeight))):(t.scrollbarYActive=!1,t.scrollbarYHeight=0,t.scrollbarYTop=0,e.scrollTop=0),t.scrollbarXLeft>=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),i(e,t),r[t.scrollbarXActive?"add":"remove"](e,"ps-active-x"),r[t.scrollbarYActive?"add":"remove"](e,"ps-active-y")}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18}],20:[function(e,t){"use strict";var n=e("../lib/dom"),i=e("./instances"),r=e("./update-geometry");t.exports=function(e){var t=i.get(e);n.css(t.scrollbarXRail,"display","none"),n.css(t.scrollbarYRail,"display","none"),r(e),n.css(t.scrollbarXRail,"display","block"),n.css(t.scrollbarYRail,"display","block")}},{"../lib/dom":3,"./instances":18,"./update-geometry":19}]},{},[1]),define("WoltLab/WCF/Date/Util.js",["Language"],function(e){"use strict";var t={formatDate:function(t){return this.format(t,e.get("wcf.date.dateFormat"))},formatTime:function(t){return this.format(t,e.get("wcf.date.timeFormat"))},formatDateTime:function(t){return this.format(t,e.get("wcf.date.dateTimeFormat").replace(/%date%/,e.get("wcf.date.dateFormat")).replace(/%time%/,e.get("wcf.date.timeFormat")))},format:function(t,n){var i,r="";"c"===n&&(n="Y-m-dTH:i:sP");for(var a=0,o=n.length;o>a;a++){switch(n[a]){case"s":i=("0"+t.getSeconds().toString()).slice(-2);break;case"i":i=t.getMinutes();break;case"a":i=t.getHours()>11?"pm":"am";break;case"g":i=t.getHours(),0===i?i=12:i>12&&(i-=12);break;case"h":i=t.getHours(),0===i?i=12:i>12&&(i-=12),i=("0"+i.toString()).slice(-2);break;case"A":i=t.getHours()>11?"PM":"AM";break;case"G":i=t.getHours();break;case"H":i=t.getHours(),i=("0"+i.toString()).slice(-2);break;case"d":i=t.getDate(),i=("0"+i.toString()).slice(-2);break;case"j":i=t.getDate();break;case"l":i=e.get("__days")[t.getDay()];break;case"D":i=e.get("__daysShort")[t.getDay()];break;case"S":i="";break;case"m":i=t.getMonth()+1,i=("0"+i.toString()).slice(-2);break;case"n":i=t.getMonth()+1;break;case"F":i=e.get("__months")[t.getMonth()];break;case"M":i=e.get("__monthsShort")[t.getMonth()];break;case"y":i=t.getYear().toString().replace(/^\d{2}/,"");break;case"Y":i=t.getFullYear();break;case"P":var s=t.getTimezoneOffset();i=s>0?"-":"+",s=Math.abs(s),i+=("0"+(~~(s/60)).toString()).slice(-2),i+=":",i+=("0"+(s%60).toString()).slice(-2);break;case"r":i=t.toString();break;case"U":i=Math.round(t.getTime()/1e3);break;default:i=n[a]}r+=i}return r},gmdate:function(){return date instanceof Date||(date=new Date),Math.round(Date.UTC(date.getUTCFullYear(),date.getUTCMonth(),date.getUTCDay(),date.getUTCHours(),date.getUTCMinutes(),date.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var n=new Date(e),i=6e4*n.getTimezoneOffset();return new Date(e+i+t)}};return t}),define("WoltLab/WCF/Timer/Repeating.js",[],function(){"use strict";function e(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(0>t||t>864e5)throw new RangeError("Invalid delta "+t+". Delta must be in the interval [0, 86400000].");this._callback=e.bind(void 0,this),this._delta=t,this._timer=void 0,this.restart()}return e.prototype={restart:function(){this.stop(),this._timer=setInterval(this._callback,this._delta)},stop:function(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)},setDelta:function(e){this._delta=e,this.restart()}},e}),define("WoltLab/WCF/Date/Time/Relative.js",["DOM/ChangeListener","Language","WoltLab/WCF/Date/Util","WoltLab/WCF/Timer/Repeating"],function(e,t,n,i){"use strict";var r=document.getElementsByTagName("time"),a=null,o={setup:function(){this._refresh(),new i(this._refresh.bind(this),6e4),e.add("WoltLab/WCF/Date/Time/Relative",this._refresh.bind(this))},_refresh:function(){var e=new Date,i=(e.getTime()-e.getMilliseconds())/1e3;null===a&&(a=i-TIME_NOW);for(var o=0,s=r.length;s>o;o++){var l=r[o];if(l.classList.contains("datetime")&&!l.getAttribute("data-is-future-date")){l.getAttribute("title")||l.setAttribute("title",l.textContent.trim());var c=~~l.getAttribute("data-timestamp")+a,u=l.getAttribute("data-date"),d=l.getAttribute("data-time"),h=l.getAttribute("data-offset");if(c>=i||c+60>i)l.textContent=t.get("wcf.date.relative.now");else if(c+3540>i){var f=Math.max(Math.round((i-c)/60),1);l.textContent=t.get("wcf.date.relative.minutes",{minutes:f})}else if(c+86400>i){var p=Math.round((i-c)/3600);l.textContent=t.get("wcf.date.relative.hours",{hours:p})}else if(c+518400>i){var m=new Date(e.getFullYear(),e.getMonth(),e.getDate()),g=Math.ceil((m/1e3-c)/86400),v=n.getTimezoneDate(1e3*c,1e3*h),b=v.getDay(),y=t.get("__days")[b];l.textContent=t.get("wcf.date.relative.pastDays",{days:g,day:y,time:d})}else l.textContent=t.get("wcf.date.shortDateTimeFormat").replace(/\%date\%/,u).replace(/\%time\%/,d)}}}};return o}),define("WoltLab/WCF/DOM/Traverse.js",["DOM/Util"],function(e){"use strict";var t=0,n=1,i=2,r=3,a=[function(){return!0},function(t,n){return e.matches(t,n)},function(e,t){return e.classList.contains(t)},function(e,t){return e.nodeName===t}],o=function(e,t,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");for(var i=[],r=0;r<e.childElementCount;r++)a[t](e.children[r],n)&&i.push(e.children[r]);return i},s=function(e,t,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");for(e=e.parentNode;e instanceof Element;){if(a[t](e,n))return e;e=e.parentNode}return null},l=function(e,t,n,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");return e instanceof Element&&null!==e[t]&&a[n](e[t],i)?e[t]:null},c={childBySel:function(e,t){return o(e,n,t)[0]||null},childByClass:function(e,t){return o(e,i,t)[0]||null},childByTag:function(e,t){return o(e,r,t)[0]||null},childrenBySel:function(e,t){return o(e,n,t)},childrenByClass:function(e,t){return o(e,i,t)},childrenByTag:function(e,t){return o(e,r,t)},parentBySel:function(e,t){return s(e,n,t)},parentByClass:function(e,t){return s(e,i,t)},parentByTag:function(e,t){return s(e,r,t)},next:function(e){return l(e,"nextElementSibling",t,null)},nextBySel:function(e,t){return l(e,"nextElementSibling",n,t)},nextByClass:function(e,t){return l(e,"nextElementSibling",i,t)},nextByTag:function(e){return l(e,"nextElementSibling",i,className)},prev:function(e){return l(e,"previousElementSibling",t,null)},prevBySel:function(e,t){return l(e,"previousElementSibling",n,t)},prevByClass:function(e,t){return l(e,"previousElementSibling",i,t)},prevByTag:function(e){return l(e,"previousElementSibling",i,className)}};return c}),define("WoltLab/WCF/UI/Alignment.js",["Core","Language","DOM/Traverse","DOM/Util"],function(e,t,n,i){"use strict";var r={set:function(r,a,o){o=e.extend({verticalOffset:7,pointer:!1,pointerOffset:4,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},o),Array.isArray(o.pointerClassNames)&&o.pointerClassNames.length===(o.pointer?1:2)||(o.pointerClassNames=[]),-1===["left","right","center"].indexOf(o.horizontal)&&(o.horizontal="left"),"bottom"!==o.vertical&&(o.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(o.allowFlip)&&(o.allowFlip="both"),i.setStyles(r,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important"});var s=i.outerDimensions(r),l=i.outerDimensions(o.refDimensionsElement instanceof Element?o.refDimensionsElement:a),c=i.offset(a),u=window.innerHeight,d=document.body.clientWidth,h={result:null},f=!1;if("center"===o.horizontal&&(f=!0,h=this._tryAlignmentHorizontal(o.horizontal,s,l,c,d),h.result||("both"===o.allowFlip||"horizontal"===o.allowFlip?o.horizontal="left":h.result=!0)),"rtl"===t.get("wcf.global.pageDirection")&&(o.horizontal="left"===o.horizontal?"right":"left"),!h.result){var p=h;if(h=this._tryAlignmentHorizontal(o.horizontal,s,l,c,d),!h.result&&("both"===o.allowFlip||"horizontal"===o.allowFlip)){var m=this._tryAlignmentHorizontal("left"===o.horizontal?"right":"left",s,l,c,d);m.result?h=m:f&&(h=p)}}var g=h.left,v=h.right,b=this._tryAlignmentVertical(o.vertical,s,l,c,u,o.verticalOffset);if(!b.result&&("both"===o.allowFlip||"vertical"===o.allowFlip)){var y=this._tryAlignmentVertical("top"===o.vertical?"bottom":"top",s,l,c,u,o.verticalOffset);y.result&&(b=y)}var w=b.bottom,_=b.top;if(o.pointer){var E=n.childrenByClass(r,"elementPointer");if(E=E[0]||null,null===E)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===h.align?(E.classList.add("center"),E.classList.remove("left"),E.classList.remove("right")):(E.classList.add(h.align),E.classList.remove("center"),E.classList.remove("left"===h.align?"right":"left")),"top"===b.align?E.classList.add("flipVertical"):E.classList.remove("flipVertical")}else if(2===o.pointerClassNames.length){var C=0,x=1;r.classList["auto"===_?"add":"remove"](o.pointerClassNames[x]),r.classList["auto"===g?"add":"remove"](o.pointerClassNames[C])}i.setStyles(r,{bottom:w+("auto"!==w?"px":""),left:g+("auto"!==g?"px":""),right:v+("auto"!==v?"px":""),top:_+("auto"!==_?"px":"")})},_tryAlignmentHorizontal:function(e,t,n,i,r){var a="auto",o="auto",s=!0;return"left"===e?(a=i.left,a+t.width>r&&(s=!1)):"right"===e?(o=r-(i.left+n.width),0>o&&(s=!1)):(a=i.left+n.width/2-t.width/2,a=~~a,(0>a||a+t.width>r)&&(s=!1)),{align:e,left:a,right:o,result:s}},_tryAlignmentVertical:function(e,t,n,i,r,a){var o="auto",s="auto",l=!0;if("top"===e){var c=document.body.clientHeight;o=c-i.top+a,c-(o+t.height)<document.body.scrollTop&&(l=!1)}else s=i.top+n.height+a,s+t.height>r&&(l=!1);return{align:e,bottom:o,top:s,result:l}}};return r}),define("WoltLab/WCF/UI/CloseOverlay.js",["CallbackList"],function(e){"use strict";var t=new e,n={setup:function(){document.body.addEventListener("click",this.execute.bind(this))},add:t.add.bind(t),remove:t.remove.bind(t),execute:function(){t.forEach(null,function(e){e()})}};return n.setup(),n}),define("WoltLab/WCF/UI/Dropdown/Simple.js",["CallbackList","Core","Dictionary","UI/Alignment","DOM/ChangeListener","DOM/Traverse","DOM/Util","UI/CloseOverlay"],function(e,t,n,i,r,a,o,s){"use strict";
+var l=null,c=new e,u=!1,d=new n,h=new n,f=null,p={setup:function(){u||(u=!0,f=document.createElement("div"),f.setAttribute("id","dropdownMenuContainer"),document.body.appendChild(f),l=document.getElementsByClassName("dropdownToggle"),this.initAll(),s.add("WoltLab/WCF/UI/Dropdown/Simple",this.closeAll.bind(this)),r.add("WoltLab/WCF/UI/Dropdown/Simple",this.initAll.bind(this)),document.addEventListener("scroll",this._onScroll.bind(this)),window.bc_wcfSimpleDropdown=this)},initAll:function(){for(var e=0,t=l.length;t>e;e++)this.init(l[e],!1)},init:function(e,n){if(this.setup(),e.classList.contains("jsDropdownEnabled")||e.getAttribute("data-target"))return!1;var i=a.parentByClass(e,"dropdown");if(null===i)throw new Error("Invalid dropdown passed, button '"+o.identify(e)+"' does not have a parent with .dropdown.");var r=a.nextByClass(e,"dropdownMenu");if(null===r)throw new Error("Invalid dropdown passed, button '"+o.identify(e)+"' does not have a menu as next sibling.");f.appendChild(r);var s=o.identify(i);d.has(s)||(e.classList.add("jsDropdownEnabled"),e.addEventListener("click",this._toggle.bind(this)),d.set(s,i),h.set(s,r),s.match(/^wcf\d+$/)||r.setAttribute("data-source",s)),e.setAttribute("data-target",s),n&&setTimeout(function(){t.triggerEvent(e,"click")},10)},initFragment:function(e,t){if(this.setup(),!d.has(e)){var n=o.identify(e);d.set(n,e),f.appendChild(t),h.set(n,t)}},registerCallback:function(e,t){c.add(e,t)},getDropdown:function(e){return d.get(e)},getDropdownMenu:function(e){return h.get(e)},toggleDropdown:function(e){this._toggle(null,e)},setAlignment:function(e,t){var n=e.querySelector(".dropdownToggle"),r=null;null!==n&&n.classList.contains("dropdownCaptionTextarea")&&(r=n),i.set(t,e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:r})},setAlignmentById:function(e){var t=d.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");var n=h.get(e);this.setAlignment(t,n)},isOpen:function(e){var t=h.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")?!0:!1},open:function(e){var t=h.get(e);void 0===t||t.classList.contains("dropdownOpen")||this.toggleDropdown(e)},close:function(e){var t=d.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),h.get(e).classList.remove("dropdownOpen"))},closeAll:function(){d.forEach(function(e,t){e.classList.contains("dropdownOpen")&&(e.classList.remove("dropdownOpen"),h.get(t).classList.remove("dropdownOpen"),this._notifyCallbacks(t,"close"))}.bind(this))},destroy:function(e){if(!d.has(e))return!1;this.close(e);var t=h.get(e);return h.parentNode.removeChild(t),h["delete"](e),d["delete"](e),!0},_onDialogScroll:function(e){for(var t=e.currentTarget,n=t.querySelectorAll(".dropdown.dropdownOpen"),i=0,r=n.length;r>i;i++){var a=n[i],s=o.identify(a),l=o.offset(a),c=o.offset(t);l.top+a.clientHeight<=c.top?this.toggleDropdown(s):l.top>=c.top+t.offsetHeight?this.toggleDropdown(s):l.left<=c.left?this.toggleDropdown(s):l.left>=c.left+t.offsetWidth?this.toggleDropdown(s):this.setAlignment(s,h.get(s))}},_onScroll:function(){d.forEach(function(e,t){e.getAttribute("data-is-overlay-dropdown-button")===!0&&e.classList.contains("dropdownOpen")&&this.setAlignment(e,h.get(t))}.bind(this))},_notifyCallbacks:function(e,t){c.forEach(e,function(n){n(e,t)})},_toggle:function(e,t){null!==e&&(e.preventDefault(),e.stopPropagation(),t=e.currentTarget.getAttribute("data-target"));var n=d.get(t);if(void 0!==n&&null===n.getAttribute("data-is-overlay-dropdown-button")){var i=a.parentByClass(n,"dialogContent");n.setAttribute("data-is-overlay-dropdown-button",null!==i),null!==i&&i.addEventListener("scroll",this._onDialogScroll.bind(this))}return d.forEach(function(e,n){var i=h.get(n);e.classList.contains("dropdownOpen")?(e.classList.remove("dropdownOpen"),i.classList.remove("dropdownOpen"),this._notifyCallbacks(n,"close")):n===t&&i.childElementCount>0&&(e.classList.add("dropdownOpen"),i.classList.add("dropdownOpen"),this._notifyCallbacks(n,"open"),this.setAlignment(e,i))}.bind(this)),WCF.Dropdown.Interactive.Handler.closeAll(),null===e}};return p}),define("WoltLab/WCF/UI/Mobile.js",["enquire","Environment","Language","DOM/ChangeListener","DOM/Traverse","UI/CloseOverlay"],function(e,t,n,i,r,a){"use strict";var o=null,s=!1,l=null,c=null,u={setup:function(){o=document.getElementsByClassName("buttonGroupNavigation"),l=document.getElementById("main"),c=l.querySelector("#main > div > div > .sidebar"),t.touch()&&document.documentElement.classList.add("touch"),"desktop"!==t.platform()&&document.documentElement.classList.add("mobile"),e.register("screen and (max-width: 800px)",{match:this.enable.bind(this),unmatch:this.disable.bind(this),setup:this._init.bind(this),deferSetup:!0}),"microsoft"===t.browser()&&null!==c&&c.clientWidth>305&&this._fixSidebarIE()},enable:function(){s=!0,"microsoft"===t.browser()&&this._fixSidebarIE()},disable:function(){s=!1,"microsoft"===t.browser()&&this._fixSidebarIE()},_fixSidebarIE:function(){null!==c&&(c.style.setProperty("display","none"),c.style.removeProperty("display"))},_init:function(){this._initSidebarToggleButtons(),this._initSearchBar(),this._initButtonGroupNavigation(),a.add("WoltLab/WCF/UI/Mobile",this._closeAllMenus.bind(this)),i.add("WoltLab/WCF/UI/Mobile",this._initButtonGroupNavigation.bind(this))},_initSidebarToggleButtons:function(){if(null!==c){var e=l.classList.contains("sidebarOrientationLeft")?"Left":"";if(e=e?e:l.classList.contains("sidebarOrientationRight")?"Right":""){var t="wcf.global.sidebar.show"+e+"Sidebar";(t===n.get(t)||""===n.get(t))&&(t=document.createElement("span"),t.className="icon icon16 fa-angle-double-"+e.toLowerCase());var i="wcf.global.sidebar.hide"+e+"Sidebar";(i===n.get(i)||""===n.get(i))&&(i=document.createElement("span"),i.className="icon icon16 fa-angle-double-"+("Left"===e?"right":"left"));var r=document.createElement("span");r.className="button small mobileSidebarToggleButton",r.addEventListener("click",function(){l.classList.add("mobileShowSidebar")}),t instanceof Element?r.appendChild(t):r.textContent=t;var a=document.createElement("span");a.className="button small mobileSidebarToggleButton",a.addEventListener("click",function(){l.classList.remove("mobileShowSidebar")}),i instanceof Element?a.appendChild(i):a.textContent=i,document.querySelector(".content").appendChild(r),c.appendChild(a)}}},_initSearchBar:function(){var e=document.querySelector(".searchBar");e.addEventListener("click",function(){return s?(e.classList.add("searchBarOpen"),!1):!1}),l.addEventListener("click",function(){e.classList.remove("searchBarOpen")})},_initButtonGroupNavigation:function(){for(var e=0,t=o.length;t>e;e++){var n=o[e];if(!n.classList.contains("jsMobileButtonGroupNavigation")){n.classList.add("jsMobileButtonGroupNavigation");var i=document.createElement("a");i.classList.add("dropdownLabel");var a=document.createElement("span");a.className="icon icon24 fa-list",i.appendChild(a),i.addEventListener("click",function(e){var t=r.next(i);return null!==t?(t.classList.toggle("open"),e.stopPropagation(),!1):!0}),n.insertBefore(i,n.firstChild)}}},_closeAllMenus:function(){for(var e=document.querySelectorAll(".jsMobileButtonGroupNavigation > ul.open"),t=0,n=e.length;n>t;t++)e[t].classList.remove("open")}};return u}),define("WoltLab/WCF/Event/Handler.js",["Core","Dictionary"],function(e,t){"use strict";var n=new t,i={add:function(i,r,a){if("function"!=typeof a)throw new TypeError("[WoltLab/WCF/Event/Handler] Expected a valid callback for '"+r+"@"+i+"'.");var o=n.get(i);void 0===o&&(o=new t,n.set(i,o));var s=o.get(r);void 0===s&&(s=new t,o.set(r,s));var l=e.getUuid();return s.set(l,a),l},fire:function(e,t,i){i=i||{};var r=n.get(e);if(void 0!==r){var a=r.get(t);void 0!==a&&a.forEach(function(e){e(i)})}},remove:function(e,t,i){var r=n.get(e);if(void 0!==r){var a=r.get(t);void 0!==a&&a["delete"](i)}},removeAll:function(e,t){"string"!=typeof t&&(t=void 0);var i=n.get(e);void 0!==i&&("undefined"==typeof t?n["delete"](e):i["delete"](t))}};return i}),define("WoltLab/WCF/UI/TabMenu/Simple.js",["Dictionary","DOM/Traverse","DOM/Util","EventHandler"],function(e,t,n,i){"use strict";function r(t,n){this._container=n,this._containers=new e,this._containerId=t,this._isLegacy=null,this._isParent=!1,this._parent=null,this._tabs=new e}return r.prototype={validate:function(){if(!this._container.classList.contains("tabMenuContainer"))return!1;var e=t.childByTag(this._container,"NAV");if(null===e)return!1;var i=e.getElementsByTagName("li");if(null===i.length)return!1;for(var r=t.childrenByTag(this._container,"DIV"),a=0,o=r.length;o>a;a++){var s=r[a],l=s.getAttribute("data-name");l||(l=n.identify(s)),s.setAttribute("data-name",l),this._containers.set(l,s)}for(var a=0,o=i.length;o>a;a++){var c=i[a],l=this._getTabName(c);if(l){if(this._tabs.has(l))throw new Error("Tab names must be unique, li[data-name='"+l+"'] (tab menu id: '"+this._containerId+"') exists more than once.");var s=this._containers.get(l);if(void 0===s)throw new Error("Expected content element for li[data-name='"+l+"'] (tab menu id: '"+this._containerId+"').");if(s.parentNode!==this._container)throw new Error("Expected content element '"+l+"' (tab menu id: '"+this._containerId+"') to be a direct children.");if(1!==c.childElementCount||"A"!==c.children[0].nodeName)throw new Error("Expected exactly one <a> as children for li[data-name='"+l+"'] (tab menu id: '"+this._containerId+"').");this._tabs.set(l,c)}}if(!this._tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+this._containerId+"').");return this._isLegacy&&(this._container.setAttribute("data-is-legacy",!0),this._tabs.forEach(function(e,t){e.setAttribute("aria-controls",t)})),!0},init:function(e){if(e=e||null,this._tabs.forEach(function(t){(null===e||e.get(t.getAttribute("data-name"))!==t)&&t.children[0].addEventListener("click",this._onClick.bind(this))}.bind(this)),null===e){var t=this._container.getAttribute("data-preselect");if(("true"===t||null===t||""===t)&&(t=!0),"false"===t&&(t=!1),this._containers.forEach(function(e){e.classList.add("hidden")}),t!==!1)if(t!==!0){var n=this._tabs.get(t);void 0!==n&&this.select(null,n,!0)}else{var i=null;this._tabs.forEach(function(e){null===i&&null===e.previousElementSibling&&(i=e)}),null!==i&&this.select(null,i,!0)}}},select:function(e,t,n){if(t=t||this._tabs.get(e)||null,null===t){if(~~e==e){e=~~e;var r=0;this._tabs.forEach(function(n){r===e&&(t=n),r++})}if(null===t)throw new Error("Expected a valid tab name, '"+e+"' given (tab menu id: '"+this._containerId+"').")}e||(e=t.getAttribute("data-name"));var a=document.querySelector("#"+this._containerId+" > nav > ul > li.active"),o=null;null!==a&&(a.classList.remove("active"),o=this._containers.get(a.getAttribute("data-name")),o.classList.remove("active"),o.classList.add("hidden"),this._isLegacy&&(a.classList.remove("ui-state-active"),o.classList.remove("ui-state-active"))),t.classList.add("active");var s=this._containers.get(e);s.classList.add("active"),this._isLegacy&&(t.classList.add("ui-state-active"),s.classList.add("ui-state-active"),s.classList.remove("hidden")),n!==!0&&(i.fire("com.woltlab.wcf.simpleTabMenu_"+this._containerId,"select",{active:t,previous:a}),this._isLegacy&&"function"==typeof window.jQuery&&window.jQuery(this._container).trigger("wcftabsbeforeactivate",{newTab:window.jQuery(t),oldTab:window.jQuery(a),newPanel:window.jQuery(s),oldPanel:window.jQuery(o)}))},rebuild:function(){var e=this._tabs;this.validate(),this.init(e)},_onClick:function(e){e.preventDefault();var t=e.currentTarget.parentNode;this.select(null,t)},_getTabName:function(e){var t=e.getAttribute("data-name");if(!t&&1===e.childElementCount&&"A"===e.children[0].nodeName){var n=e.children[0].getAttribute("href");n.match(/#([^#]+)$/)&&(t=RegExp.$1,null===document.getElementById(t)?t=null:(this._isLegacy=!0,e.setAttribute("data-name",t)))}return t},getContainers:function(){return this._containers},getTabs:function(){return this._tabs}},r}),define("WoltLab/WCF/UI/TabMenu.js",["Dictionary","DOM/ChangeListener","DOM/Util","./TabMenu/Simple"],function(e,t,n,i){"use strict";var r=new e,a={setup:function(){this._init(),this._selectErroneousTabs(),t.add("WoltLab/WCF/UI/TabMenu",this._init.bind(this))},_init:function(){for(var e=document.querySelectorAll(".tabMenuContainer:not(.staticTabMenuContainer)"),t=0,a=e.length;a>t;t++){var o=e[t],s=n.identify(o);if(!r.has(s)){var l=new i(s,o);l.validate()&&(l.init(),r.set(s,l))}}},_selectErroneousTabs:function(){r.forEach(function(e){var t=!1;e.getContainers().forEach(function(n){!t&&n.getElementsByClassName("formError").length&&(t=!0,e.select(n.id))})})},getTabMenu:function(e){return r.get(e)}};return a}),define("WoltLab/WCF/UI/FlexibleMenu.js",["Core","Dictionary","DOM/ChangeListener","DOM/Traverse","DOM/Util","UI/SimpleDropdown"],function(e,t,n,i,r,a){"use strict";var o=new t,s=new t,l=new t,c=new t,u={setup:function(){null!==document.getElementById("mainMenu")&&this.register("mainMenu");var e=document.querySelector(".navigationHeader");null!==e&&this.register(r.identify(e)),window.addEventListener("resize",this.rebuildAll.bind(this)),n.add("WoltLab/WCF/UI/FlexibleMenu",this.registerTabMenus.bind(this))},register:function(e){var t=document.getElementById(e);if(null===t)throw"Expected a valid element id, '"+e+"' does not exist.";if(!o.has(e)){var n=i.childByTag(t,"UL");if(null===n)throw"Expected an <ul> element as child of container '"+e+"'.";o.set(e,t),c.set(e,n),this.rebuild(e)}},registerTabMenus:function(){for(var e=document.querySelectorAll(".tabMenuContainer:not(.jsFlexibleMenuEnabled), .messageTabMenu:not(.jsFlexibleMenuEnabled)"),t=0,n=e.length;n>t;t++){var a=e[t],o=i.childByTag(a,"NAV");null!==o&&(a.classList.add("jsFlexibleMenuEnabled"),this.register(r.identify(o)))}},rebuildAll:function(){o.forEach(function(e,t){this.rebuild(t)}.bind(this))},rebuild:function(t){var n=o.get(t);if(void 0===n)throw"Expected a valid element id, '"+t+"' is unknown.";var u=window.getComputedStyle(n),d=n.parentNode.clientWidth;d-=r.styleAsInt(u,"margin-left"),d-=r.styleAsInt(u,"margin-right");var h=c.get(t),f=i.childrenByTag(h,"LI"),p=s.get(t),m=0;if(void 0!==p){for(var g=0,v=f.length;v>g;g++){var b=f[g];b.classList.contains("dropdown")||b.style.removeProperty("display")}null!==p.parentNode&&(m=r.outerWidth(p))}var y=h.scrollWidth-m,w=[];if(y>d)for(var g=f.length-1;g>=0;g--){var b=f[g];if(!(b.classList.contains("dropdown")||b.classList.contains("active")||b.classList.contains("ui-state-active"))&&(w.push(b),b.style.setProperty("display","none"),h.scrollWidth<d))break}if(w.length){var _;if(void 0===p){p=document.createElement("li"),p.className="dropdown jsFlexibleMenuDropdown";var E=document.createElement("a");E.className="icon icon16 fa-list",p.appendChild(E),_=document.createElement("ul"),_.classList.add("dropdownMenu"),p.appendChild(_),s.set(t,p),l.set(t,_),a.init(E)}else _=l.get(t);null===p.parentNode&&h.appendChild(p);var C=document.createDocumentFragment(),x=this;w.forEach(function(n){var i=document.createElement("li");i.innerHTML=n.innerHTML,i.addEventListener("click",function(i){i.preventDefault(),e.triggerEvent(n.querySelector("a"),"click"),setTimeout(function(){x.rebuild(t)},59)}.bind(this)),C.appendChild(i)}),_.innerHTML="",_.appendChild(C)}else void 0!==p&&null!==p.parentNode&&p.parentNode.removeChild(p)}};return u}),define("WoltLab/WCF/UI/Tooltip.js",["Environment","DOM/ChangeListener","UI/Alignment"],function(e,t,n){"use strict";var i=null,r=null,a=null,o=null,s={setup:function(){"desktop"===e.platform()&&(o=document.createElement("div"),o.setAttribute("id","balloonTooltip"),o.classList.add("balloonTooltip"),a=document.createElement("span"),a.setAttribute("id","balloonTooltipText"),o.appendChild(a),r=document.createElement("span"),r.classList.add("elementPointer"),r.appendChild(document.createElement("span")),o.appendChild(r),document.body.appendChild(o),i=document.getElementsByClassName("jsTooltip"),this.init(),t.add("WoltLab/WCF/UI/Tooltip",this.init.bind(this)))},init:function(){for(;i.length;){var e=i[0];e.classList.remove("jsTooltip");var t=e.getAttribute("title");t="string"==typeof t?t.trim():"",t.length&&(e.setAttribute("data-tooltip",t),e.removeAttribute("title"),e.addEventListener("mouseenter",this._mouseEnter.bind(this)),e.addEventListener("mouseleave",this._mouseLeave.bind(this)),e.addEventListener("click",this._mouseLeave.bind(this)))}},_mouseEnter:function(e){var t=e.currentTarget,i=t.getAttribute("title");return i="string"==typeof i?i.trim():"",""!==i&&(t.setAttribute("data-tooltip",i),t.removeAttribute("title")),i=t.getAttribute("data-tooltip"),o.style.removeProperty("top"),o.style.removeProperty("left"),i.length?(o.classList.add("active"),a.textContent=i,void n.set(o,t,{horizontal:"center",pointer:!0,pointerClassNames:["inverse"],vertical:"top"})):void o.classList.remove("active")},_mouseLeave:function(){o.classList.remove("active")}};return s}),define("WoltLab/WCF/Date/Picker.js",["DateUtil","Language","ObjectMap","DOM/ChangeListener","UI/Alignment","WoltLab/WCF/UI/CloseOverlay"],function(e,t,n,i,r,a){"use strict";var o=!1,s=0,l=new n,c=null,u=0,d=0,h=[],f=null,p=null,m=null,g=null,v=null,b=null,y=null,w=null,_=null,E=null,C={init:function(){this._setup();for(var t=document.querySelectorAll('input[type="date"]:not(.inputDatePicker), input[type="datetime"]:not(.inputDatePicker)'),n=new Date,i=0,r=t.length;r>i;i++){var a=t[i];a.classList.add("inputDatePicker"),a.readOnly=!0;var o="datetime"===a.getAttribute("type");a.setAttribute("data-is-date-time",o);var s=null,c=a.getAttribute("value")||"";a.getAttribute("value")&&(s=new Date(c),a.setAttribute("data-value",s.getTime()),c=e["formatDate"+(o?"Time":"")](s));var u=0===c.length;if(a.classList.contains("birthday")&&(a.setAttribute("data-min-date","100"),a.setAttribute("data-max-date","now")),this._initDateRange(a,n,!0),this._initDateRange(a,n,!1),a.getAttribute("data-min-date")===a.getAttribute("data-max-date"))throw new Error("Minimum and maximum date cannot be the same (element id '"+a.id+"').");a.type="text",a.value=c,a.setAttribute("data-empty",u),a.getAttribute("data-placeholder")&&a.setAttribute("placeholder",a.getAttribute("data-placeholder"));var d=document.createElement("input");d.id=a.id+"DatePicker",d.name=a.name,d.type="hidden",null!==s&&(d.value=e.format(s,o?"c":"Y-m-d")),a.parentNode.insertBefore(d,a),a.removeAttribute("name"),a.addEventListener("click",E);var h=document.createElement("div");h.className="inputAddon";var f=document.createElement("a");f.className="inputSuffix",f.addEventListener("click",E),h.appendChild(f);var p=document.createElement("span");p.className="icon icon16 fa-calendar",f.appendChild(p),a.parentNode.insertBefore(h,a),h.insertBefore(a,f),l.set(a,{shadow:d,isDateTime:o,isEmpty:u,onClose:null})}},_initDateRange:function(e,t,n){var i="data-"+(n?"min":"max")+"-date",r=e.hasAttribute(i)?e.getAttribute(i).trim():"";if(r.match(/^(\d{4})-(\d{2})-(\d{2})$/))r=new Date(r).getTime();else if("now"===r)r=t.getTime();else if(r.match(/^\d{1,3}$/)){var a=new Date(t.getTime());a.setFullYear(a.getFullYear()+~~r*(n?-1:1)),r=a.getTime()}else if(r.match(/^datePicker-(.+)$/)){if(r=RegExp.$1,null===document.getElementById(r))throw new Error("Reference date picker identified by '"+r+"' does not exists (element id: '"+e.id+"').")}else r=new Date(n?1970:2038,0,1).getTime();e.setAttribute(i,r)},_setup:function(){o||(o=!0,s=~~t.get("wcf.date.firstDayOfTheWeek"),E=this._open.bind(this),i.add("WoltLab/WCF/Date/Picker",this.init.bind(this)),a.add("WoltLab/WCF/Date/Picker",this._close.bind(this)))},_open:function(e){e.preventDefault(),e.stopPropagation(),this._createPicker();var t="INPUT"===e.currentTarget.nodeName?e.currentTarget:e.currentTarget.previousElementSibling;if(t!==c){c=t;var n,i=l.get(c),a=c.getAttribute("data-value");a?(n=new Date(+a),"Invalid Date"===n.toString()&&(n=new Date)):n=new Date,d=c.getAttribute("data-min-date"),d.match(/^datePicker-(.+)$/)&&(d=document.getElementById(RegExp.$1).getAttribute("data-value")),d=new Date(+d),u=c.getAttribute("data-max-date"),u.match(/^datePicker-(.+)$/)&&(u=document.getElementById(RegExp.$1).getAttribute("data-value")),u=new Date(+u),i.isDateTime&&(p.value=n.getHours(),m.value=n.getMinutes()),this._renderPicker(n.getDate(),n.getMonth(),n.getFullYear()),r.set(_,c,{pointer:!0})}},_close:function(){if(null!==_&&_.classList.contains("active")){_.classList.remove("active");var e=l.get(c);"function"==typeof e.onClose&&e.onClose(),c=null,d=0,u=0}},_renderPicker:function(e,t,n){this._renderGrid(e,t,n);for(var i="",r=d.getFullYear(),a=u.getFullYear();a>=r;r++)i+='<option value="'+r+'">'+r+"</option>";w.innerHTML=i,w.value=n,g.value=t,_.classList.add("active")},_renderGrid:function(e,t,n){var i,r=void 0!==e,a=void 0!==t;if(e=~~e||~~f.getAttribute("data-day"),t=~~t,n=~~n,a||n){var o=0!==n,l=document.createDocumentFragment();l.appendChild(f),a||(t=~~f.getAttribute("data-month")),n=n||~~f.getAttribute("data-year");var c=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(d>c?(n=d.getFullYear(),t=d.getMonth(),e=d.getDate(),g.value=t,w.value=n,o=!0):c>u&&(n=u.getFullYear(),t=u.getMonth(),e=u.getDate(),g.value=t,w.value=n,o=!0),c=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-01");c.getDay()!==s;)c.setDate(c.getDate()-1);for(var p,m=0;35>m;m++)i=h[m],i.textContent=c.getDate(),p=c.getMonth()===t,p&&(d>c?p=!1:c>u&&(p=!1)),i.classList[p?"remove":"add"]("otherMonth"),c.setDate(c.getDate()+1);if(f.setAttribute("data-month",t),f.setAttribute("data-year",n),_.insertBefore(l,y),!r&&(c=new Date(n,t,e),c.getDate()!==e)){for(;c.getMonth()!==t;)c.setDate(c.getDate()-1);e=c.getDate()}if(o){for(var m=0;12>m;m++){var E=g.children[m];E.disabled=n===d.getFullYear()&&E.value<d.getMonth()||n===u.getFullYear()&&E.value>u.getMonth()}var C=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-01");C.setMonth(C.getMonth()+1),v.classList[u>C?"add":"remove"]("active");var x=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-01");x.setDate(x.getDate()-1),b.classList[x>d?"add":"remove"]("active")}}if(e){for(var m=0;35>m;m++)i=h[m],i.classList[i.classList.contains("otherMonth")||~~i.textContent!==e?"remove":"add"]("active");f.setAttribute("data-day",e)}this._formatValue()},_formatValue:function(){var t,n,i,r=l.get(c);"true"!==c.getAttribute("data-empty")&&(r.isDateTime?(t=new Date(f.getAttribute("data-year"),f.getAttribute("data-month"),f.getAttribute("data-day"),p.value,m.value),n=e.formatDateTime(t),i=e.format(t,"c")):(t=new Date(f.getAttribute("data-year"),f.getAttribute("data-month"),f.getAttribute("data-day")),n=e.formatDate(t),i=e.format(t,"Y-m-d")),c.value=n,c.setAttribute("data-value",t.getTime()),r.shadow.value=i)},_createPicker:function(){if(null===_){_=document.createElement("div"),_.className="datePicker",_.addEventListener("click",function(e){e.stopPropagation()});var n=document.createElement("span");n.className="elementPointer",n.innerHTML="<span></span>",_.appendChild(n);var i=document.createElement("header");_.appendChild(i),b=document.createElement("a"),b.className="icon icon16 fa-arrow-left previous",b.addEventListener("click",this.previousMonth.bind(this)),i.appendChild(b);var r=document.createElement("span");i.appendChild(r),g=document.createElement("select"),g.className="month",g.addEventListener("change",this._changeMonth.bind(this)),r.appendChild(g);for(var a="",o=t.get("__monthsShort"),l=0;12>l;l++)a+='<option value="'+l+'">'+o[l]+"</option>";g.innerHTML=a,w=document.createElement("select"),w.className="year",w.addEventListener("change",this._changeYear.bind(this)),r.appendChild(w),v=document.createElement("a"),v.className="icon icon16 fa-arrow-right next",v.addEventListener("click",this.nextMonth.bind(this)),i.appendChild(v),f=document.createElement("ul"),_.appendChild(f);var c=document.createElement("li");c.className="weekdays",f.appendChild(c);for(var u,d=t.get("__daysShort"),l=0;7>l;l++){var E=l+s;E>6&&(E-=7),u=document.createElement("span"),u.textContent=d[E],c.appendChild(u)}for(var C,x,L=this._click.bind(this),l=0;5>l;l++){x=document.createElement("li"),f.appendChild(x);for(var k=0;7>k;k++)C=document.createElement("a"),C.addEventListener("click",L),h.push(C),x.appendChild(C)}y=document.createElement("footer"),_.appendChild(y),p=document.createElement("select"),p.className="hour",p.addEventListener("change",this._formatValue.bind(this));for(var A="",T=new Date(2e3,0,1),S=t.get("wcf.date.timeFormat").replace(/:/,"").replace(/[isu]/g,""),l=0;24>l;l++)T.setHours(l),A+='<option value="'+l+'">'+e.format(T,S)+"</option>";p.innerHTML=A,y.appendChild(p),y.appendChild(document.createTextNode(" : ")),m=document.createElement("select"),m.className="minute",m.addEventListener("change",this._formatValue.bind(this));for(var A="",l=0;60>l;l++)A+='<option value="'+l+'">'+(10>l?"0"+l.toString():l)+"</option>";m.innerHTML=A,y.appendChild(m),document.body.appendChild(_)}},previousMonth:function(){"0"===g.value?(g.value=11,w.value=~~w.value-1):g.value=~~g.value-1,this._renderGrid(void 0,g.value,w.value)},nextMonth:function(){"11"===g.value?(g.value=0,w.value=~~w.value+1):g.value=~~g.value+1,this._renderGrid(void 0,g.value,w.value)},_changeMonth:function(e){this._renderGrid(void 0,e.currentTarget.value)},_changeYear:function(e){this._renderGrid(void 0,void 0,e.currentTarget.value)},_click:function(e){e.currentTarget.classList.contains("otherMonth")||(c.setAttribute("data-empty",!1),this._renderGrid(e.currentTarget.textContent),this._close())},getDate:function(e){return e=this._getElement(e),e.hasAttribute("data-value")?new Date(+e.getAttribute("data-value")):null},setDate:function(t,n){t=this._getElement(t);var i=l.get(t);t.setAttribute("data-value",n.getTime()),t.value=e["formatDate"+(i.isDateTime?"Time":"")](n),i.shadow.value=e.format(n,i.isDateTime?"c":"Y-m-d")},clear:function(e){e=this._getElement(e);var t=l.get(e);e.removeAttribute("data-value"),e.value="",t.isEmpty=!0,t.shadow.value=""},destroy:function(e){e=this._getElement(e);var t=l.get(e),n=e.parentNode;n.parentNode.insertBefore(e,n),n.parentNode.removeChild(n),e.setAttribute("type","date"+(t.isDateTime?"time":"")),e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener("click",E),t.shadow.parentNode.removeChild(t.shadow),e.classList.remove("inputDatePicker"),e.readOnly=!1,l["delete"](e)},setCloseCallback:function(e,t){e=this._getElement(e),l.get(e).onClose=t},_getElement:function(e){if("string"==typeof e&&(e=document.getElementById(e)),!(e instanceof Element&&e.classList.contains("inputDatePicker")&&l.has(e)))throw new Error("Expected a valid date picker input element or id.");return e}};return window.__wcf_bc_datePicker=C,C}),define("WoltLab/WCF/Bootstrap",["favico","enquire","perfect-scrollbar","WoltLab/WCF/Date/Time/Relative","UI/SimpleDropdown","WoltLab/WCF/UI/Mobile","WoltLab/WCF/UI/TabMenu","WoltLab/WCF/UI/FlexibleMenu","UI/Dialog","WoltLab/WCF/UI/Tooltip","WoltLab/WCF/Language","WoltLab/WCF/Environment","WoltLab/WCF/Date/Picker"],function(e,t,n,i,r,a,o,s,l,c,u,d,h){"use strict";window.Favico=e,window.enquire=t,null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=u.get,window.WCF.Language.add=u.add,window.WCF.Language.addObject=u.addObject;var f={setup:function(){d.setup(),i.setup(),h.init(),r.setup(),a.setup(),o.setup(),s.setup(),l.setup(),c.setup();for(var e=document.querySelectorAll("form[method=get]"),t=0,n=e.length;n>t;t++)e[t].setAttribute("method","post");"microsoft"===d.browser()&&(window.onbeforeunload=function(){});var u=0;u=window.setInterval(function(){"function"==typeof window.jQuery&&(window.clearInterval(u),window.jQuery.holdReady(!1))},20)}};return f}),define("WoltLab/WCF/Controller/Sitemap.js",["Ajax","EventHandler","Language","DOM/Util","UI/Dialog","UI/TabMenu"],function(e,t,n,i,r,a){"use strict";var o=[],s={setup:function(){document.getElementById("sitemap").addEventListener("click",this._click.bind(this))},_click:function(e){e.preventDefault(),r.open(this)},_ajaxSetup:function(){return{data:{actionName:"getSitemap",className:"wcf\\data\\sitemap\\SitemapAction"}}},_ajaxSuccess:function(e){o.push(e.returnValues.sitemapName),document.getElementById("sitemap_"+e.returnValues.sitemapName).innerHTML=e.returnValues.template},_dialogSetup:function(){return{id:"sitemapDialog",options:{disableContentPadding:!0,title:n.get("wcf.page.sitemap")},source:{data:{actionName:"getSitemap",className:"wcf\\data\\sitemap\\SitemapAction"},after:function(e,n){o.push(n.returnValues.sitemapName);var r=e.querySelector(".tabMenuContainer"),s=i.identify(r);a.getTabMenu(s).select("sitemap_"+n.returnValues.sitemapName),t.add("com.woltlab.wcf.simpleTabMenu_"+s,"select",this.showTab.bind(this))}.bind(this)}}},showTab:function(t){var n=t.active.getAttribute("data-name").replace(/^sitemap_/,"");-1===o.indexOf(n)&&e.api(this,{parameters:{sitemapName:n}})}};return s}),define("WoltLab/WCF/Controller/Style/Changer.js",["Ajax","Language","UI/Dialog"],function(e,t,n){"use strict";var i={setup:function(){var e=document.querySelector("#footerNavigation > ul.navigationItems");if(null!==e){var n=document.createElement("li");n.classList.add("styleChanger"),n.addEventListener("click",this.showDialog.bind(this));var i=document.createElement("a");i.setAttribute("href","#"),i.textContent=t.get("wcf.style.changeStyle"),n.appendChild(i),e.appendChild(n)}},showDialog:function(e){e.preventDefault(),n.open(this)},_dialogSetup:function(){return{id:"styleChanger",options:{disableContentPadding:!0,title:t.get("wcf.style.changeStyle")},source:{data:{actionName:"getStyleChooser",className:"wcf\\data\\style\\StyleAction"},after:function(e){for(var t=e.querySelectorAll(".styleList > li"),n=0,i=t.length;i>n;n++){var r=t[n];r.classList.add("pointer"),r.addEventListener("click",this._click.bind(this))}}.bind(this)}}},_click:function(t){t.preventDefault(),e.apiOnce({data:{actionName:"changeStyle",className:"wcf\\data\\style\\StyleAction",objectIDs:[t.currentTarget.getAttribute("data-style-id")]},success:function(){window.location.reload()}})}};return i}),define("WoltLab/WCF/Controller/Popover.js",["Ajax","Dictionary","Environment","DOM/ChangeListener","DOM/Util","UI/Alignment"],function(e,t,n,i,r,a){"use strict";var o=null,s=0,l=new t,c=new t,u=new t,d=null,h=!1,f=null,p=null,m=null,g=null,v=null,b=null,y=null,w=null,_=null,E=0,C=1,x=2,L=800,k=500,A={_setup:function(){if(null===m){m=document.createElement("div"),m.classList.add("popover"),g=document.createElement("div"),g.classList.add("popoverContent"),m.appendChild(g);var e=document.createElement("span");e.classList.add("elementPointer"),e.appendChild(document.createElement("span")),m.appendChild(e),v=document.createElement("span"),v.className="icon icon32 fa-spinner",m.appendChild(v),document.body.appendChild(m),b=this._hide.bind(this),w=this._mouseEnter.bind(this),_=this._mouseLeave.bind(this),m.addEventListener("mouseenter",this._popoverMouseEnter.bind(this)),m.addEventListener("mouseleave",_),g.addEventListener("transitionend",function(e){"height"===e.propertyName&&g.classList.remove("loading")}),m.addEventListener("transitionend",this._clearContent.bind(this)),window.addEventListener("beforeunload",function(){h=!0,null!==f&&window.clearTimeout(f),this._hide(!0)}.bind(this)),i.add("WoltLab/WCF/Controller/Popover",this._init.bind(this))}},init:function(e){"desktop"===n.platform()&&(e.attributeName=e.attributeName||"data-object-id",e.legacy=e.legacy===!0,this._setup(),u.has(e.identifier)||(u.set(e.identifier,{attributeName:e.attributeName,elements:e.legacy?e.className:document.getElementsByClassName(e.className),legacy:e.legacy,loadCallback:e.loadCallback}),this._init(e.identifier)))},_init:function(e){"string"==typeof e&&e.length?this._initElements(u.get(e),e):u.forEach(this._initElements.bind(this))},_initElements:function(e,t){for(var n=e.legacy?document.querySelectorAll(e.elements):e.elements,i=0,a=n.length;a>i;i++){var o=n[i],s=r.identify(o);if(l.has(s))return;var u=e.legacy?s:~~o.getAttribute(e.attributeName);
+if(0!==u){o.addEventListener("mouseenter",w),o.addEventListener("mouseleave",_),"A"===o.nodeName&&o.getAttribute("href")&&o.addEventListener("click",b);var d=t+"-"+u;o.setAttribute("data-cache-id",d),c.set(s,{element:o,identifier:t,objectId:u}),l.has(d)||l.set(t+"-"+u,{content:null,state:E})}}},setContent:function(e,t,n){var i=e+"-"+t,a=l.get(i);if(void 0===a)throw new Error("Unable to find element for object id '"+t+"' (identifier: '"+e+"').");if(a.content=r.createFragmentFromHtml(n),a.state=x,o){var s=c.get(o).element;s.getAttribute("data-cache-id")===i&&this._show()}},_mouseEnter:function(e){if(!h){null!==f&&(window.clearTimeout(f),f=null);var t=r.identify(e.currentTarget);o===t&&null!==p&&(window.clearTimeout(p),p=null),d=t,f=window.setTimeout(function(){f=null,d===t&&this._show()}.bind(this),L)}},_mouseLeave:function(){d=null,null===p&&(null===y&&(y=this._hide.bind(this)),null!==p&&window.clearTimeout(p),p=window.setTimeout(y,k))},_popoverMouseEnter:function(){null!==p&&(window.clearTimeout(p),p=null)},_show:function(){null!==p&&(window.clearTimeout(p),p=null);var e=null!==o&&o!==d;m.classList.contains("active")&&this._hide(e),o=d;var t=c.get(o),n=l.get(t.element.getAttribute("data-cache-id"));n.state===x?g.appendChild(n.content):n.state===E&&g.classList.add("loading"),this._rebuild(o),n.state===E&&(n.state=C,u.get(t.identifier).loadCallback(t.objectId,this))},_hide:function(e){null!==p&&(window.clearTimeout(p),p=null),m.classList.remove("active"),"boolean"==typeof e&&e===!0&&(m.classList.add("disableAnimation"),m.offsetHeight,this._clearContent())},_clearContent:function(){if(o&&g.childElementCount&&!m.classList.contains("active")){for(var e=l.get(c.get(o).element.getAttribute("data-cache-id"));g.childNodes.length;)e.content.appendChild(g.childNodes[0]);g.style.removeProperty("height")}},_rebuild:function(){if(!m.classList.contains("active")){if(m.classList.add("active"),m.classList.remove("disableAnimation"),g.classList.contains("loading"))if(0===g.childElementCount)0===s&&(s=g.offsetHeight),g.style.setProperty("height",s+"px");else{g.style.removeProperty("height");var e=g.offsetHeight;g.style.setProperty("height",s+"px"),g.offsetHeight,g.style.setProperty("height",e+"px")}a.set(m,c.get(o).element,{pointer:!0,vertical:"top",verticalOffset:3})}},_ajaxSetup:function(){return{}},ajaxApi:function(t,n,i){if("function"!=typeof n)throw new TypeError("Expected a valid callback for parameter 'success'.");e.api(this,t,n,i)}};return A}),define("WoltLab/WCF/BootstrapFrontend.js",["Ajax","WoltLab/WCF/Bootstrap","WoltLab/WCF/Controller/Sitemap","WoltLab/WCF/Controller/Style/Changer","WoltLab/WCF/Controller/Popover"],function(e,t,n,i,r){"use strict";var a={setup:function(e){t.setup(),n.setup(),e.styleChanger&&i.setup(),this._initUserPopover()},_initUserPopover:function(){r.init({attributeName:"data-user-id",className:"userLink",identifier:"com.woltlab.wcf.user",loadCallback:function(e,t){var n=function(n){t.setContent("com.woltlab.wcf.user",e,n.returnValues.template)};t.ajaxApi({actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]},n,n)}})}};return a}),define("WoltLab/WCF/List",[],function(){"use strict";function e(){this._set=t?new Set:[]}var t=window.hasOwnProperty("Set")&&"function"==typeof window.Set;return e.prototype={add:function(e){t?this._set.add(e):this.has(e)||this._set.push(e)},clear:function(){t?this._set.clear():this._set=[]},"delete":function(e){if(t)return this._set["delete"](e);var n=this._set.indexOf(n);return-1===n?!1:(this._set.splice(n,1),!0)},forEach:function(e){if(t)this._set.forEach(e);else for(var n=0,i=this._set.length;i>n;n++)e(this._set[n])},has:function(e){return t?this._set.has(e):-1!==this._set.indexOf(e)}},Object.defineProperty(e.prototype,"size",{enumerable:!1,configurable:!0,get:function(){return _hasMap?this._set.size:this._set.length}}),e}),define("WoltLab/WCF/ACP/Bootstrap.js",["WoltLab/WCF/Bootstrap"],function(e){"use strict";var t={setup:function(){e.setup()}};return t}),define("WoltLab/WCF/Ajax/Jsonp.js",["Core"],function(e){"use strict";var t={send:function(t,n,i,r){if(t="string"==typeof t?t.trim():"",0===t.length)throw new Error("Expected a non-empty string for parameter 'url'.");if("function"!=typeof n)throw new TypeError("Expected a valid callback function for parameter 'success'.");r=e.extend({parameterName:"callback",timeout:10},r||{});var a="wcf_jsonp_"+e.getUuid().replace(/-/g,"").substr(0,8),o=window.setTimeout(function(){window[a]=function(){},"function"==typeof i&&i()},1e3*(~~r.timeout||10));window[a]=function(){window.clearTimeout(o),n.apply(null,arguments)},t+=-1===t.indexOf("?")?"?":"&",t+=r.parameterName+"="+a;var s=document.createElement("script");s.async=!0,s.setAttribute("src",t),document.head.appendChild(s)}};return t}),define("WoltLab/WCF/Controller/Clipboard.js",["Ajax","Core","Dictionary","EventHandler","Language","List","ObjectMap","DOM/ChangeListener","DOM/Traverse","DOM/Util","UI/Confirmation","UI/SimpleDropdown"],function(e,t,n,i,r,a,o,s,l,c,u,d){"use strict";var h=new n,f=new n,p=document.getElementsByClassName("jsClipboardContainer"),m=new o,g=new a,v={},b=null,y=null,w=null,_={setup:function(e){if(b=this._mark.bind(this),y=this._executeAction.bind(this),w=this._unmarkAll.bind(this),v=t.extend({hasMarkedItems:!1,pageClassName:"",pageObjectId:0},e),!v.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");this._initContainers(),this._initEditors(),v.hasMarkedItems&&p.length&&this._loadMarkedItems(),s.add("WoltLab/WCF/Controller/Clipboard",this._initContainers.bind(this))},reload:function(){h.size&&this._loadMarkedItems()},_initContainers:function(){for(var e=0,t=p.length;t>e;e++){var n=p[e],i=c.identify(n),r=h.get(i);if(void 0===r){var o=n.querySelector(".jsClipboardMarkAll");null!==o&&(o.setAttribute("data-container-id",i),o.addEventListener("click",this._markAll.bind(this))),r={checkboxes:n.getElementsByClassName("jsClipboardItem"),element:n,markAll:o,markedObjectIds:new a},h.set(i,r)}for(var s=0,l=r.checkboxes.length;l>s;s++){var u=r.checkboxes[s];g.has(u)||(u.setAttribute("data-container-id",i),u.addEventListener("click",b),g.add(u))}}},_initEditors:function(){for(var e=function(e){try{var t=e.getAttribute("data-types");if("string"==typeof t)return JSON.parse('{ "types": '+t.replace(/'/g,'"')+"}").types}catch(n){throw new Error("Expected a valid 'data-type' attribute for element '"+c.identify(e)+"'.")}return[]},t=document.getElementsByClassName("jsClipboardEditor"),n=0,i=t.length;i>n;n++)for(var r=t[n],a=e(r),o=0,s=a.length;s>o;o++)f.set(a[o],r)},_loadMarkedItems:function(){e.api(this,{actionName:"getMarkedItems",parameters:{pageClassName:v.pageClassName,pageObjectID:v.pageObjectId}})},_markAll:function(e){for(var t=e.currentTarget,n="INPUT"!==t.nodeName||t.checked,i=[],r=t.getAttribute("data-container-id"),a=h.get(r),o=a.element.getAttribute("data-type"),s=0,c=a.checkboxes.length;c>s;s++){var u=a.checkboxes[s],d=~~u.getAttribute("data-object-id");n?u.checked||(u.checked=!0,a.markedObjectIds.add(d),i.push(d)):u.checked&&(u.checked=!1,a.markedObjectIds["delete"](d),i.push(d));var f=l.parentByClass(t,"jsClipboardObject");null!==f&&f.classList[n?"addClass":"removeClass"]("jsMarked")}this._saveState(o,i,n)},_mark:function(e){var t=e.currentTarget,n=~~t.getAttribute("data-object-id"),i=t.checked,r=t.getAttribute("data-container-id"),a=h.get(r),o=a.element.getAttribute("data-type"),s=l.parentByClass(t,"jsClipboardObject");a.markedObjectIds[i?"add":"delete"](n),s.classList[i?"add":"remove"]("jsMarked");for(var c=!0,u=0,d=a.checkboxes.length;d>u;u++)if(!a.checkboxes[u].checked){c=!1;break}a.markAll.checked=c,this._saveState(o,[n],i)},_saveState:function(t,n,i){e.api(this,{actionName:i?"mark":"unmark",parameters:{pageClassName:v.pageClassName,pageObjectID:v.pageObjectId,objectIDs:n,objectType:t}})},_executeAction:function(e){var t=e.currentTarget,n=m.get(t);if(n.url)return void(window.location.href=n.url);var r=function(){var e=t.getAttribute("data-type");i.fire("com.woltlab.wcf.clipboard",e,{data:n,listItem:t,responseData:null}),"function"==typeof window.jQuery&&window.jQuery(f.get(e)).trigger("clipboardAction",[e,n.actionName,n.parameters])},a="string"==typeof n.internalData.confirmMessage?n.internalData.confirmMessage:"",o=!0;if("object"==typeof n.parameters&&n.parameters.actionName&&n.parameters.className){if("unmarkAll"===n.parameters.actionName||Array.isArray(n.parameters.objectIDs))if(a.length){var s="string"==typeof n.internalData.template?n.internalData.template:"";u.show({confirm:function(){var e={};if(s.length)for(var i=u.getContentElement().querySelectorAll("input, select, textarea"),r=0,a=i.length;a>r;r++){var o=i[r],l=o.getAttribute("name");switch(o.nodeName){case"INPUT":o.checked&&(e[l]=o.getAttribute("value"));break;case"SELECT":e[l]=o.value;break;case"TEXTAREA":e[l]=o.value.trim()}}this._executeProxyAction(t,n,e)}.bind(this),message:a,template:s})}else this._executeProxyAction(t,n)}else a.length&&(o=!1,u.show({confirm:r,message:a}));o&&r()},_executeProxyAction:function(t,n,r){r=r||{};var a="unmarkAll"!==n.parameters.actionName?n.parameters.objectIDs:[],o={data:r};if("object"==typeof n.internalData.parameters)for(var s in n.internalData.parameters)n.internalData.parameters.hasOwnProperty(s)&&(o[s]=n.internalData.parameters[s]);e.api(this,{actionName:n.parameters.actionName,className:n.parameters.className,objectIDs:a,parameters:o},function(e){if("unmarkAll"!==n.actionName){var r=t.getAttribute("data-type");i.fire("com.woltlab.wcf.clipboard",r,{data:n,listItem:t,responseData:e}),"function"==typeof window.jQuery&&window.jQuery(f.get(r)).trigger("clipboardActionResponse",[e,r,n.actionName,n.parameters])}this._loadMarkedItems()}.bind(this))},_unmarkAll:function(t){var n=t.currentTarget.getAttribute("data-type");e.api(this,{actionName:"unmarkAll",parameters:{objectType:n}})},_ajaxSetup:function(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}},_ajaxSuccess:function(e){if("unmarkAll"===e.actionName)return void h.forEach(function(t){if(t.element.getAttribute("data-type")===e.returnValues.objectType){for(var n=t.element.getElementsByClassName("jsMarked");n.length;)n[0].classList.remove("jsMarked");t.markAll.checked=!1;for(var i=0,r=t.checkboxes.length;r>i;i++)t.checkboxes[i].checked=!1;f.get(e.returnValues.objectType).innerHTML=""}}.bind(this));if(f.forEach(function(e){e.innerHTML=""}),m=new o,h.forEach(function(t){var n=t.element.getAttribute("data-type"),i=e.returnValues.markedItems&&e.returnValues.markedItems.hasOwnProperty(n)?e.returnValues.markedItems[n]:[];this._rebuildMarkings(t,i)}.bind(this)),e.returnValues&&e.returnValues.items){var t=document.createDocumentFragment();for(var n in e.returnValues.items)if(e.returnValues.items.hasOwnProperty(n)&&f.has(n)){var i=e.returnValues.items[n],a=f.get(n),s=l.childrenByTag(a,"UL"),c=s[0]||null;null===c&&(c=document.createElement("ul")),t.appendChild(c);var u=document.createElement("li");u.classList.add("dropdown"),c.appendChild(u);var p=document.createElement("span");p.className="dropdownToggle button",p.textContent=i.label,u.appendChild(p);var g=document.createElement("ol");g.classList.add("dropdownMenu");for(var v in i.items)if(i.items.hasOwnProperty(v)){var b=i.items[v],_=document.createElement("li"),E=document.createElement("span");E.textContent=b.label,_.appendChild(E),g.appendChild(_),_.setAttribute("data-type",n),_.addEventListener("click",y),m.set(_,b)}var C=document.createElement("li");C.classList.add("dropdownDivider"),g.appendChild(C);var x=document.createElement("li");x.setAttribute("data-type",n);var E=document.createElement("span");E.textContent=r.get("wcf.clipboard.item.unmarkAll"),x.appendChild(E),g.appendChild(x),u.appendChild(g),x.addEventListener("click",w),a.appendChild(t),d.init(p,!1)}}},_rebuildMarkings:function(e,t){for(var n=!0,i=0,r=e.checkboxes.length;r>i;i++){var a=e.checkboxes[i],o=l.parentByClass(a,"jsClipboardObject"),s=-1!==t.indexOf(~~a.getAttribute("data-object-id"));s||(n=!1),a.checked=s,o.classList[s?"add":"remove"]("jsMarked")}e.markAll.checked=n}};return _}),define("WoltLab/WCF/Language/Input.js",["Dictionary","Language","ObjectMap","StringUtil","DOM/Traverse","DOM/Util","UI/SimpleDropdown"],function(e,t,n,i,r,a,o){"use strict";var s=new e,l=!1,c=new n,u=new e,d=null,h=null,f={init:function(t,n,r,a){if(!u.has(t)){var o=document.getElementById(t);if(null===o)throw new Error("Expected a valid element id, cannot find '"+t+"'.");this._setup();var s=new e;for(var l in n)n.hasOwnProperty(l)&&s.set(~~l,i.unescapeHTML(n[l]));u.set(t,s),this._initElement(t,o,s,r,a)}},_setup:function(){l||(l=!0,d=this._dropdownToggle.bind(this),h=this._submit.bind(this))},_initElement:function(e,n,i,l,u){var f=n.parentNode;f.classList.contains("inputAddon")||(f=document.createElement("div"),f.className="inputAddon"+("TEXTAREA"===n.nodeName?" inputAddonTextarea":""),f.setAttribute("data-input-id",e),n.parentNode.insertBefore(f,n),f.appendChild(n)),f.classList.add("dropdown");var p=document.createElement("span");p.className="button dropdownToggle inputPrefix";var m=document.createElement("span");m.textContent=t.get("wcf.global.button.disabledI18n"),p.appendChild(m),f.insertBefore(p,n);var g=document.createElement("ul");g.className="dropdownMenu",a.insertAfter(g,p);var v=function(t,n){var i=~~t.currentTarget.getAttribute("data-language-id"),a=r.childByClass(g,"active");null!==a&&a.classList.remove("active"),i&&t.currentTarget.classList.add("active"),this._select(e,i,t.currentTarget.children[0].textContent,n||!1)}.bind(this);for(var b in l)if(l.hasOwnProperty(b)){var y=document.createElement("li");y.setAttribute("data-language-id",b),m=document.createElement("span"),m.textContent=l[b],y.appendChild(m),y.addEventListener("click",v),g.appendChild(y)}if(u!==!0){var y=document.createElement("li");y.className="dropdownDivider",y.setAttribute("data-language-id",0),g.appendChild(y),y=document.createElement("li"),m=document.createElement("span"),m.textContent=t.get("wcf.global.button.disabledI18n"),y.appendChild(m),y.addEventListener("click",v),g.appendChild(y)}var w=null;if(u===!0||i.size)for(var _=0,E=g.childElementCount;E>_;_++)if(~~g.children[_].getAttribute("data-language-id")===LANGUAGE_ID){w=g.children[_];break}o.init(p),o.registerCallback(f.id,d),s.set(e,{buttonLabel:p.children[0],element:n,languageId:0});var C=r.parentByTag(n,"FORM");if(null!==C){C.addEventListener("submit",h);var x=c.get(C);void 0===x&&(x=[],c.set(C,x)),x.push(e)}null!==w&&v({currentTarget:w},!0)},_select:function(t,n,i,r){var a=s.get(t);if(a.languageId!==n){var o=u.get(t);a.languageId&&o.set(a.languageId,a.element.value),0===n?u.set(t,new e):(a.buttonLabel.classList.contains("active")||r===!0)&&(a.element.value=o.has(n)?o.get(n):""),a.buttonLabel.textContent=i,a.buttonLabel.classList[n?"add":"remove"]("active"),a.languageId=n}a.element.blur(),a.element.focus()},_dropdownToggle:function(e,t){if("open"===t)for(var n,i,r=o.getDropdownMenu(e),a=document.getElementById(e).getAttribute("data-input-id"),s=u.get(a),l=0,c=r.childElementCount;c>l;l++)n=r.children[l],i=~~n.getAttribute("data-language-id"),i&&n.classList[s.has(i)||!s.size?"remove":"add"]("missingValue")},_submit:function(e){for(var t,n,i,r,a=c.get(e.currentTarget),o=0,l=a.length;l>o;o++)n=a[o],t=s.get(n),r=u.get(n),t.languageId&&r.set(t.languageId,t.element.value),r.size&&(r.forEach(function(t,r){i=document.createElement("input"),i.type="hidden",i.name=n+"_i18n["+r+"]",i.value=t,e.currentTarget.appendChild(i)}),t.element.removeAttribute("name"))}};return f}),define("WoltLab/WCF/UI/Suggestion.js",["Ajax","Core","UI/SimpleDropdown"],function(e,t,n){"use strict";function i(e,t){this.init(e,t)}return i.prototype={init:function(e,n){if(this._dropdownMenu=null,this._value="",this._element=document.getElementById(e),null===this._element)throw new Error("Expected a valid element id.");if(this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{}}},callbackSelect:null,excludedSearchValues:[],treshold:3},n),"function"!=typeof this._options.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this._element.addEventListener("click",function(e){e.stopPropagation()}),this._element.addEventListener("keydown",this._keyDown.bind(this)),this._element.addEventListener("keyup",this._keyUp.bind(this))},addExcludedValue:function(e){-1===this._options.excludedSearchValues.indexOf(e)&&this._options.excludedSearchValues.push(e)},removeExcludedValue:function(e){var t=this._options.excludedSearchValues.indexOf(e);-1!==t&&this._options.excludedSearchValues.splice(t,1)},_keyDown:function(e){if(null===this._dropdownMenu||!n.isOpen(this._element.id))return!0;if(13!==e.keyCode&&27!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode)return!0;for(var t,i=0,r=this._dropdownMenu.childElementCount;r>i&&(t=this._dropdownMenu.children[i],!t.classList.contains("active"));)i++;if(13===e.keyCode)n.close(this._element.id),this._select(t);else if(27===e.keyCode){if(!n.isOpen(this._element.id))return!0;n.close(this._element.id)}else{var a=0;38===e.keyCode?a=(0===i?r:i)-1:40===e.keyCode&&(a=i+1,a===r&&(a=0)),a!==i&&(t.classList.remove("active"),this._dropdownMenu.children[a].classList.add("active"))}return e.preventDefault(),!1},_select:function(e){var t=e instanceof Event;t&&(e=e.currentTarget.parentNode),this._options.callbackSelect(this._element.id,{objectId:e.children[0].getAttribute("data-object-id"),value:e.textContent}),t&&this._element.focus()},_keyUp:function(t){var i=t.currentTarget.value.trim();if(this._value!==i){if(i.length<this._options.treshold)return null!==this._dropdownMenu&&n.close(this._element.id),void(this._value=i);this._value=i,e.api(this,{parameters:{data:{excludedSearchValues:this._options.excludedSearchValues,searchString:i}}})}},_ajaxSetup:function(){return{data:this._options.ajax}},_ajaxSuccess:function(e){if(null===this._dropdownMenu?(this._dropdownMenu=document.createElement("div"),this._dropdownMenu.className="dropdownMenu",n.initFragment(this._element,this._dropdownMenu)):this._dropdownMenu.innerHTML="",e.returnValues.length){for(var t,i,r,a=0,o=e.returnValues.length;o>a;a++)i=e.returnValues[a],t=document.createElement("a"),t.textContent=i.label,t.setAttribute("data-object-id",i.objectID),t.addEventListener("click",this._select.bind(this)),r=document.createElement("li"),0===a&&(r.className="active"),r.appendChild(t),this._dropdownMenu.appendChild(r);n.open(this._element.id)}else n.close(this._element.id)}},i}),define("WoltLab/WCF/UI/ItemList",["Core","Dictionary","Language","DOM/Traverse","WoltLab/WCF/UI/Suggestion"],function(e,t,n,i,r){"use strict";var a="",o=new t,s=!1,l=null,c=null,u=null,d=null,h={init:function(t,n,a){var s=document.getElementById(t);if(null===s)throw new Error("Expected a valid element id.");a=e.extend({ajax:{actionName:"getSearchResultList",className:"",data:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},a);var l=i.parentByTag(s,"FORM");if(null!==l&&a.isCSV===!1){if(!a.submitFieldName.length&&"function"!=typeof a.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");l.addEventListener("submit",function(){var e=this.getValues(t);if(a.submitFieldName.length)for(var n,i=0,r=e.length;r>i;i++)n=document.createElement("input"),n.type="hidden",n.name=a.submitFieldName.replace(/{$objectId}/,e[i].objectId),n.value=e[i].value,l.appendChild(n);else a.callbackSubmit(l,e)}.bind(this))}this._setup();var c=this._createUI(s,a,n),u=new r(t,{ajax:a.ajax,callbackSelect:this._addItem.bind(this),excludedSearchValues:a.excludedSearchValues});if(o.set(t,{dropdownMenu:null,element:c.element,list:c.list,listItem:c.element.parentNode,options:a,shadow:c.shadow,suggestion:u}),n=c.values.length?c.values:n,Array.isArray(n))for(var d,h=0,f=n.length;f>h;h++)d=n[h],"string"==typeof d&&(d={objectId:0,value:d}),this._addItem(t,d)},getValues:function(e){if(!o.has(e))throw new Error("Element id '"+e+"' is unknown.");for(var t,n,r=o.get(e),a=i.childrenByClass(r.list,"item"),s=[],l=0,c=a.length;c>l;l++)n=a[l],t={objectId:n.getAttribute("data-object-id"),value:i.childByTag(n,"SPAN").textContent},s.push(t);return s},_setup:function(){s||(s=!0,l=this._keyDown.bind(this),c=this._keyPress.bind(this),u=this._keyUp.bind(this),d=this._removeItem.bind(this))},_createUI:function(e,t){var n=document.createElement("ol");n.className="inputItemList",n.setAttribute("data-element-id",e.id),n.addEventListener("click",function(t){t.target===n&&e.focus()});var i=document.createElement("li");i.className="input",n.appendChild(i),e.addEventListener("keydown",l),e.addEventListener("keypress",c),e.addEventListener("keyup",u),e.parentNode.insertBefore(n,e),i.appendChild(e),-1!==t.maxLength&&e.setAttribute("maxLength",t.maxLength);var r=null,a=[];if(t.isCSV&&(r=document.createElement("input"),r.className="itemListInputShadow",r.type="hidden",r.name=e.name,e.removeAttribute("name"),n.parentNode.insertBefore(r,n),"TEXTAREA"===e.nodeName)){for(var o,s=e.value.split(","),d=0,h=s.length;h>d;d++)o=s[d].trim(),o.length&&a.push(o);var f=document.createElement("input");e.parentNode.insertBefore(f,e),f.id=e.id,e.parentNode.removeChild(e),e=f}return{element:e,list:n,shadow:r,values:a}},_handleLimit:function(e){var t=o.get(e);-1!==t.options.maxItems&&(t.list.childElementCount-1<t.options.maxItems?t.element.disabled&&(t.element.disabled=!1,t.element.removeAttribute("placeholder")):t.element.disabled||(t.element.disabled=!0,t.element.setAttribute("placeholder",n.get("wcf.global.form.input.maxItems"))))},_keyDown:function(e){var t=e.currentTarget,n=t.parentNode.previousElementSibling;a=t.id,8===e.keyCode?0===t.value.length&&null!==n&&(n.classList.contains("active")?this._removeItem(null,n):n.classList.add("active")):27===e.keyCode&&null!==n&&n.classList.contains("active")&&n.classList.remove("active")},_keyPress:function(e){if(13===e.charCode||44===e.charCode){if(e.preventDefault(),o.get(e.currentTarget.id).options.restricted)return;var t=e.currentTarget.value.trim();t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}},_keyUp:function(e){var t=e.currentTarget;if(t.value.length>0){var n=t.parentNode.previousElementSibling;null!==n&&n.classList.remove("active")}},_addItem:function(e,t){var n=o.get(e),i=document.createElement("li");i.className="item";var r=document.createElement("span");r.className="content",r.setAttribute("data-object-id",t.objectId),r.textContent=t.value;var a=document.createElement("a");a.className="icon icon16 fa-times",a.addEventListener("click",d),i.appendChild(r),i.appendChild(a),n.list.insertBefore(i,n.listItem),n.suggestion.addExcludedValue(t.value),n.element.value="",this._handleLimit(e);var s=this._syncShadow(n);"function"==typeof n.options.callbackChange&&(null===s&&(s=this.getValues(e)),n.options.callbackChange(e,s))},_removeItem:function(e,t){t=null===e?t:e.currentTarget.parentNode;var n=t.parentNode,i=n.getAttribute("data-element-id"),r=o.get(i);r.suggestion.removeExcludedValue(t.children[0].textContent),n.removeChild(t),r.element.focus(),this._handleLimit(i);var a=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===a&&(a=this.getValues(i)),r.options.callbackChange(i,a))},_syncShadow:function(e){if(!e.options.isCSV)return null;for(var t="",n=this.getValues(e.element.id),i=0,r=n.length;r>i;i++)t+=(t.length?",":"")+n[i].value;return e.shadow.value=t,n}};return h}),define("WoltLab/WCF/Controller/Notice/Dismiss.js",["Ajax"],function(e){"use strict";var t={setup:function(){var e=document.getElementsByClassName("jsDismissNoticeButton");if(e.length)for(var t=this._click.bind(this),n=0,i=e.length;i>n;n++)e[n].addEventListener("click",t)},_click:function(t){var n=t.currentTarget;e.apiOnce({data:{actionName:"dismiss",className:"wcf\\data\\notice\\NoticeAction",objectIDs:[n.getAttribute("data-object-id")]},success:function(){var e=n.parentNode;e.addEventListener("transitionend",function(){e.parentNode.removeChild(e)}),e.classList.remove("active")}})}};return t}),define("WoltLab/WCF/UI/ItemList/User.js",["WoltLab/WCF/UI/ItemList"],function(e){"use strict";var t={init:function(t,n){e.init(t,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:~~n.includeUserGroups}}},callbackChange:"function"==typeof n.callbackChange?n.callbackChange:null,excludedSearchValues:Array.isArray(n.excludedSearchValues)?n.excludedSearchValues:[],isCSV:!0,maxItems:~~n.maxItems||-1,restricted:!0})},getValues:function(t){return e.getValues(t)}};return t}),define("WoltLab/WCF/Controller/User/Notification/Settings.js",["Dictionary","Language","DOM/Traverse","UI/SimpleDropdown"],function(e,t,n,i){"use strict";var r=new e,a=null,o=null,s={setup:function(){a=this._click.bind(this),o=this._selectType.bind(this);for(var e,t,n=document.querySelectorAll("#notificationSettings .flexibleButtonGroup"),i=0,r=n.length;r>i;i++)e=n[i],t=e.querySelector(".notificationSettingsEmail"),null!==t&&this._initGroup(e,t)},_initGroup:function(e,t){var i=~~e.getAttribute("data-object-id"),o=document.getElementById("settings_"+i+"_disabled");o.addEventListener("click",function(){t.classList.remove("active")});var s=document.getElementById("settings_"+i+"_enabled");s.addEventListener("click",function(){t.classList.add("active")});var l=n.childByTag(t,"INPUT"),c=n.childByTag(t,"A");c.setAttribute("data-object-id",i),c.addEventListener("click",a),r.set(i,{button:c,dropdownMenu:null,mailSetting:t,mailValue:l})},_click:function(e){e.preventDefault();var t=e.currentTarget,a=~~t.getAttribute("data-object-id"),o=r.get(a);if(null===o.dropdownMenu)o.dropdownMenu=this._createDropdown(a,o.mailValue.value),t.parentNode.classList.add("dropdown"),t.parentNode.appendChild(o.dropdownMenu),i.init(t,!0);else for(var s=n.childrenByTag(o.dropdownMenu,"LI"),l=o.mailValue.value,c=0;4>c;c++)s[c].classList[s[c].getAttribute("data-value")===l?"add":"remove"]("active")},_createDropdown:function(e,n){var i=document.createElement("ul");i.className="dropdownMenu",i.setAttribute("data-object-id",e);for(var r,a,s,l=["instant","daily","divider","none"],c=0;4>c;c++)s=l[c],a=document.createElement("li"),"divider"===s?a.className="dropdownDivider":(r=document.createElement("a"),r.textContent=t.get("wcf.user.notification.mailNotificationType."+s),a.appendChild(r),a.setAttribute("data-value",s),a.addEventListener("click",o),n===s&&(a.className="active")),i.appendChild(a);return i},_selectType:function(e){var n=e.currentTarget.getAttribute("data-value"),i=~~e.currentTarget.parentNode.getAttribute("data-object-id"),a=r.get(i);a.mailValue.value=n,a.mailSetting.querySelector("span.title").textContent=t.get("wcf.user.notification.mailNotificationType."+n),a.button.classList["none"===n?"remove":"add"]("yellow"),a.button.classList["none"===n?"remove":"add"]("active")}};return s}),requirejs.config({paths:{enquire:"3rdParty/enquire",favico:"3rdParty/favico","perfect-scrollbar":"3rdParty/perfect-scrollbar"},shim:{enquire:{exports:"enquire"},favico:{exports:"Favico"},"perfect-scrollbar":{exports:"PerfectScrollbar"}},map:{"*":{Ajax:"WoltLab/WCF/Ajax",AjaxJsonp:"WoltLab/WCF/Ajax/Jsonp",AjaxRequest:"WoltLab/WCF/Ajax/Request",CallbackList:"WoltLab/WCF/CallbackList",Core:"WoltLab/WCF/Core",DateUtil:"WoltLab/WCF/Date/Util",Dictionary:"WoltLab/WCF/Dictionary","DOM/ChangeListener":"WoltLab/WCF/DOM/Change/Listener","DOM/Traverse":"WoltLab/WCF/DOM/Traverse","DOM/Util":"WoltLab/WCF/DOM/Util",Environment:"WoltLab/WCF/Environment",EventHandler:"WoltLab/WCF/Event/Handler",Language:"WoltLab/WCF/Language",List:"WoltLab/WCF/List",ObjectMap:"WoltLab/WCF/ObjectMap",StringUtil:"WoltLab/WCF/StringUtil","UI/Alignment":"WoltLab/WCF/UI/Alignment","UI/CloseOverlay":"WoltLab/WCF/UI/CloseOverlay","UI/Confirmation":"WoltLab/WCF/UI/Confirmation","UI/Dialog":"WoltLab/WCF/UI/Dialog","UI/SimpleDropdown":"WoltLab/WCF/UI/Dropdown/Simple","UI/TabMenu":"WoltLab/WCF/UI/TabMenu"}}}),define("require.config",function(){});
\ No newline at end of file