Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Fri, 4 Mar 2016 17:25:40 +0000 (18:25 +0100)
committerwoltlab.com <woltlab@woltlab.com>
Fri, 4 Mar 2016 17:25:40 +0000 (18:25 +0100)
wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js
wcfsetup/install/files/js/WCF.Combined.min.js
wcfsetup/install/files/js/WCF.Core.min.js [deleted file]

index 43efd6b82d400f095e621201c154ca5fa737c2bc..7671d77905b7042b9ea38971bafc575b9b4ea49f 100644 (file)
@@ -1,20 +1,20 @@
 // 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 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()}}}};
+
 // wautosave.js
-if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wautosave=function(){"use strict";var e=!1,t="",a=null,s=null,o=!1,i=null,n=null;return{init:function(){i=this.$textarea[0],this.wutil.getOption("woltlab.autosave").active&&(this.wautosave.enable(),this.wutil.getOption("woltlab.autosave").saveOnInit||this.$textarea.data("saveOnInit")?this.wutil.setOption("woltlab.autosaveOnce",!0):this.wautosave.restore()),this.wutil.setOption("autosave",!1);var e=this.core.destroy;this.core.destroy=function(){this.wautosave.disable(),e.call(this)}.bind(this)},enable:function(e){this.wutil.getOption("woltlab.autosave").active||this.wutil.setOption("woltlab.autosave",{active:!0,key:e}),null===n&&(this.wautosave.purgeOutdated(),n=new WCF.PeriodicalExecuter(this.wautosave.save.bind(this),15e3))},save:function(a){a!==!0&&(a=!1);var i=this.wutil.getText();if(t!==i||a)try{localStorage.setItem(this.wutil.getOption("woltlab.autosave").key,JSON.stringify({content:i,timestamp:Date.now()})),t=i,e=!0,null===s&&(s=new WCF.PeriodicalExecuter(function(t){if(o!==!0){if(e===!1)return t.stop(),void(s=null);this.wautosave.showNotice("saved"),e=!1}}.bind(this),12e4))}catch(e){console.debug("[wautosave.save] Unable to access local storage: "+e.message)}},disable:function(){this.wutil.getOption("woltlab.autosave").active&&(n.stop(),n=null,this.wutil.setOption("woltlab.autosave",{active:!1,key:""}))},purge:function(){try{localStorage.removeItem(this.wutil.getOption("woltlab.autosave").key)}catch(e){console.debug("[wautosave.purge] Unable to access local storage: "+e.message)}},restore:function(){var e=this.wutil.getOption("woltlab.autosave"),t=null;try{t=localStorage.getItem(e.key)}catch(e){console.debug("[wutil.autosaveRestore] Unable to access local storage: "+e.message)}try{null!==t&&(t=JSON.parse(t))}catch(e){t=null}return null!==t&&t.content?e.lastEditTime&&1e3*e.lastEditTime>t.timestamp?(this.wautosave.purge(),!1):e.prompt?(this.autosave.showNotice("prompt",t),!1):(this.wutil.inWysiwygMode()?this.wutil.setOption("woltlab.originalValue",t.content):i.value=t.content,this.wautosave.showNotice("restored",{timestamp:t.timestamp}),!0):!1},showNotice:function(e,t){if(null===a){a=$('<div class="redactorAutosaveNotice"><span class="redactorAutosaveMessage" /></div>'),a.appendTo(this.$box);var s=function(e){(null===e||"opacity"===e.originalEvent.propertyName)&&(a.hasClass("open")&&null!==e?a.data("callbackOpen")&&a.data("callbackOpen")():(a.data("callbackClose")&&a.data("callbackClose")(),a.removeData("callbackClose"),a.removeData("callbackOpen"),a.removeClass("redactorAutosaveNoticeIcons"),a.empty(),$('<span class="redactorAutosaveMessage" />').appendTo(a)))}.bind(this);a.on("transitionend webkitTransitionEnd",s)}var o="",n="";switch(e){case"prompt":$('<span class="icon icon16 fa-info blue jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.version",{date:new Date(t.timestamp).toLocaleString()})+'"></span>').prependTo(a);var l=$('<span class="icon icon16 fa-check green pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.prompt.confirm")+'"></span>').appendTo(a),c=$('<span class="icon icon16 fa-times red pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.prompt.discard")+'"></span>').appendTo(a);l.click(function(){this.wutil.replaceText(t.content),s(null),this.wautosave.showNotice("restored",t)}.bind(this)),c.click(function(){this.wautosave.purge(),a.removeClass("open")}.bind(this)),o=WCF.Language.get("wcf.message.autosave.prompt"),a.addClass("redactorAutosaveNoticeIcons"),n=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+i.id,function(){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+i.id,n),setTimeout(function(){a.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(t.timestamp).toLocaleString()})+'"></span>').prependTo(a);var l=$('<span class="icon icon16 fa-check green pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.confirm")+'"></span>').appendTo(a),c=$('<span class="icon icon16 fa-times red pointer jsTooltip" title="'+WCF.Language.get("wcf.message.autosave.restored.revert")+'"></span>').appendTo(a);l.click(function(){a.removeClass("open")}),c.click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.message.autosave.restored.revert.confirmMessage"),function(e){"confirm"===e&&(this.wutil.reset(),this.wautosave.purge(),a.removeClass("open"))}.bind(this))}.bind(this)),o=WCF.Language.get("wcf.message.autosave.restored"),a.addClass("redactorAutosaveNoticeIcons"),n=WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+i.id,function(){WCF.System.Event.removeListener("com.woltlab.wcf.redactor","keydown_"+i.id,n),setTimeout(function(){l.trigger("click")},3e3)}.bind(this));break;case"saved":if(a.hasClass("open"))return;setTimeout(function(){a.removeClass("open")},2e3),o=WCF.Language.get("wcf.message.autosave.saved")}a.children("span.redactorAutosaveMessage").text(o),a.addClass("open"),"saved"!==e&&WCF.DOMNodeInsertedHandler.execute()},purgeOutdated:function(){var e=0,t=this.wutil.getOption("woltlab.autosave").prefix,a=t+"_wcf_master";try{e=localStorage.getItem(a)}catch(e){console.debug("[wautosave.purgeOutdated] Unable to access local storage: "+e.message)}if(0!==e){var s,o=Date.now()-6048e5;if(null===e||o>e){var i=new RegExp("^"+t+"_");for(var n in localStorage)if(n.match(i)&&n!==a){s=localStorage.getItem(n);try{s=JSON.parse(s)}catch(e){s={timestamp:0}}if(null===s||!s.timestamp||s.timestamp<o)try{localStorage.removeItem(n)}catch(e){console.debug("[wautosave.purgeOutdated] Unable to access local storage: "+e.message)}}try{localStorage.setItem(a,Date.now())}catch(e){console.debug("[wautosave.purgeOutdated] Unable to access local storage: "+e.message)}}}},pause:function(){o=!0},resume:function(){o=!1}}};
+
 // wbbcode.js
-if(!RedactorPlugins)var RedactorPlugins={};RedactorPlugins.wbbcode=function(){"use strict";var e=!1;return{init:function(){var t=this.$textarea.wcfIdentify();this.opts.initCallback=function(){window.addEventListener("unload",function(){this.code.startSync(),this.$textarea.val(this.wbbcode.convertFromHtml(this.$textarea.val()))}.bind(this)),$.browser.msie&&this.$editor.addClass("msie"),this.$textarea[0].setAttribute("data-is-dirty",!0);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();var t=this.$editor[0],i=this.$textarea[0];setTimeout(function(){$.browser.iOS&&0===t.scrollHeight&&(document.activeElement===t||document.activeElement===i)&&document.activeElement.blur()},10)}.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 o=a.data("dropdown");o.find(".redactor-dropdown-add_head").parent().remove(),o.find(".redactor-dropdown-delete_head").parent().remove(),$('<li class="dropdownDivider" />').insertBefore(o.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")),r=function(e){for(var t=e[0].querySelectorAll("br:not(:empty)"),i=0,a=t.length;a>i;i++)t[0].innerHTML=""};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"),n.text(WCF.Language.get("wcf.bbcode.button.toggleHTML"));else{if(this.$textarea.val(this.wbbcode.convertToHtml(this.$textarea.val())),this.code.offset=this.$textarea.val().length,this.code.showVisual(),this.wutil.fixDOM(),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(),r(this.$editor),/ Edge\//.test(navigator.userAgent)){var e=this.$editor[0];window.dtdesign=e,e.childElementCount>1&&"​"===e.children[0].innerHTML&&e.removeChild(e.children[0])}this.wutil.saveSelection()}}.bind(this),this.wutil.setOption("clickCallback",function(e){e.target===this.$editor[0]&&this.$editor[0].lastElementChild&&"BLOCKQUOTE"===this.$editor[0].lastElementChild.tagName&&this.wutil.setCaretAfter($(this.$editor[0].lastElementChild)),setTimeout(this.wutil.saveSelection.bind(this),10)}.bind(this));var l=this.opts.verifiedTags.indexOf("ul");l>-1&&this.opts.verifiedTags.splice(l,1),WCF.System.Event.addListener("com.woltlab.wcf.redactor","observe_load_"+t,function(){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 o=a.find("> li > .redactor-dropdown-insert_table").parent();"TD"==i.tagName?o.hide():o.nextAll().hide()}},insertSmiley:function(e,t,i){if(i&&this.wbbcode.registerSmiley(e,t),this.opts.visual){this.wutil.restoreSelection();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 o=document.getElementById("redactorSmiley");if(o.removeAttribute("id"),null!==a){var n=window.getSelection().getRangeAt(0).startContainer;n.nodeType===Node.TEXT_NODE&&(n=n.parentElement),a!==n&&a.appendChild(o)}var r=function(e){return null===e?!1:(e.nodeType===Node.ELEMENT_NODE&&"SPAN"===e.nodeName||e.nodeType===Node.TEXT_NODE)&&" "===e.textContent?!0:!1},l=o.parentElement;if(!r(o.previousSibling)){var s=document.createTextNode(" ");l.insertBefore(s,o)}if(!r(o.nextSibling)){var s=document.createTextNode(" ");l.lastChild===o?l.appendChild(s):l.insertBefore(s,o.nextSibling)}this.wutil.saveSelection()}else this.wutil.insertAtCaret(" "+e+" ")},registerSmiley:function(e,t){return __REDACTOR_SMILIES[e]?!1:(__REDACTOR_SMILIES[e]=t,!0)},convertFromHtml:function(e){var t={html:e};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertFromHtml",t),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","convertFromHtml",t),t.html=__REDACTOR_AMD_DEPENDENCIES.BbcodeFromHTML.convert(t.html),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertFromHtml",t),t.html},convertToHtml:function(e){var t={data:e};return WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertToHtml",t),t.data=__REDACTOR_AMD_DEPENDENCIES.BbcodeToHTML.convert(t.data,{attachments:{images:this.wbbcode._getImageAttachments(),thumbnailUrl:this.wutil.getOption("woltlab.attachmentThumbnailUrl"),url:this.wutil.getOption("woltlab.attachmentUrl")}}),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",t),t.data},_pasteBeforeCallback:function(e){var t=document.createElement("div");t.innerHTML=e,document.body.appendChild(t);for(var i,a,o,n,r={1:24,2:22,3:18,4:14,5:12,6:10},l=1;6>=l;l++)for(a=t.getElementsByTagName("H"+l);a.length;)i=a[0],o=r[l],i.style.fontSize&&(n=window.getComputedStyle(i),o=Math.round(n.getPropertyValue("font-size").replace(/px$/,"")),o=o>24?24:o>22?22:o>18?22:o>14?14:o>12?14:o>10?12:10),i.outerHTML='<span style="font-size: '+o+'pt" data-verified="redactor" rel="font-size: '+o+'pt">'+i.innerHTML+"</span>";document.body.removeChild(t),a=t.querySelectorAll("div,p,span");for(var l=0,s=a.length;s>l;l++)a[0].className&&(a[0].className="");for(a=t.getElementsByTagName("WBR");a.length;)a[0].parentNode.removeChild(a[0]);return t.innerHTML},_pasteCallback:function(e){return e=e.replace(/style="([^"]+)"/,function(e,t){for(var i=t.split(";"),a=[],o=0,n=i.length;n>o;o++){var r=i[o];r.match(/^\s*background-color/)||a.push(r)}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 o="";t&&(o=' 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+'"'+o+" />","[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 $.ui.keyCode.RIGHT: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 o=!1;if(a.length){for(var n=!0,r=0;r<a[0].children.length;r++){var l=a[0].children[r];if("DIV"===l.tagName&&l.textContent.replace(/\u200b/,"").length){n=!1;break}}if(n)o=!0;else{var s=null===this.selection.implicitRange?this.range:this.selection.implicitRange;if(0===s.startOffset)for(var c,d=s.startContainer;null!==(d=d.parentNode);)if(c=d.previousSibling,null!==c){c.nodeType===Node.ELEMENT_NODE&&"HEADER"===c.nodeName&&(o=!0);break}}}if(o){var h=window.getSelection();h.rangeCount&&h.removeAllRanges();var u=document.createRange();u.selectNode(a[0]||a),h.addRange(u),e.cancel=!0}}break;case $.ui.keyCode.DELETE:if(this.wutil.isCaret()&&this.wutil.isEndOfElement(t)){var v=t.nextElementSibling;if(v&&"BLOCKQUOTE"===v.tagName){var h=window.getSelection();h.rangeCount&&h.removeAllRanges();var u=document.createRange();u.selectNode(v),h.addRange(u),e.cancel=!0}}break;case $.ui.keyCode.DOWN:var m=$(t);if(m.next("blockquote").length)this.caret.setStart(m.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 g=m.closest("div",a[0]);g.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):"KBD"===t.nodeName&&(e.cancel=!0);break;case $.ui.keyCode.UP:if(!i||!a.length)return;var g=$(t).closest("div",a[0]),f=g.prev();if("DIV"===f[0].tagName)return;if("BLOCKQUOTE"===f[0].tagName)return;var b=a.prev();0===b.length?this.wutil.setCaretBefore(a):"BLOCKQUOTE"===b[0].tagName?this.caret.sendEnd(b.children("div:last")):(""==$.trim(b.html())&&b.html(this.opts.invisibleSpace),this.caret.setEnd(b)),e.cancel=!0;break;case $.ui.keyCode.RIGHT:var s=window.getSelection().getRangeAt(0);if(s.startContainer.nodeType===Node.TEXT_NODE&&s.startContainer.length===s.startOffset){if(t=t.parentNode,"KBD"!==t.nodeName)return;var w=this.$editor[0];t.nextElementSibling===w.lastElementChild&&(t=t.nextElementSibling,""===t.textContent&&(t.textContent="​")),t===w.lastElementChild&&this.wutil.selectionEndOfEditor()}break;case 83:if($.browser.mobile)return;var p=!1;if(navigator.platform.match(/^Mac/)?e.event.ctrlKey&&e.event.altKey&&(p=!0):e.event.altKey&&!e.event.ctrlKey&&(p=!0),p){var C={cancel:!1};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","submitEditor_"+this.$textarea.wcfIdentify(),C),C.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 o=a.parentNode,n=document.createTextNode("​");o.appendChild(n),o.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 o=this.wbbcode.insertQuoteBBCode(t,i,a);null!==o&&(a.length||($.browser.mozilla&&o.children("br[type=_moz]").replaceWith("<div>"+this.opts.invisibleSpace+"</div>"),this.caret.setStart(o.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 o="[quote]",n="[/quote]";e&&(o=t?"[quote='"+e+"','"+t+"']":"[quote='"+e+"']");var r=null;if(this.wutil.inWysiwygMode()){var l=WCF.getUUID(),s="";a?s=this.wbbcode.convertToHtml(o+a+n):(s=this.wbbcode.convertToHtml(o+l+n),s=s.replace(l,i.replace(/^<p>/,"").replace(/<\/p>$/,""))),s=s.replace(/^<p>/,"").replace(/<\/p>$/,""),s=s.replace(/<blockquote/,'<blockquote id="'+l+'"'),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 c=window.getSelection().getRangeAt(0),d=c.startContainer;d;){var h=d.parentNode;if(h===this.$editor[0])break;d=h}if(d&&d.parentNode===this.$editor[0]&&d.innerHTML.length&&("​"===d.innerHTML?this.caret.setEnd(d):this.wutil.setCaretAfter(d)),this.insert.html(s,!1),r=this.$editor.find("#"+l),r.length){var u=r.find("> div");if(1==u.length)""===u[0].innerHTML&&(u[0].innerHTML=this.opts.invisibleSpace);else if($.browser.mozilla){var v=r.find("> div > br[type=_moz]");v.length&&($("<div>"+this.opts.invisibleSpace+"</div>").insertBefore(v),v.remove())}r.removeAttr("id"),this.wutil.setCaretAfter(r[0]);var m=r[0].previousElementSibling;null!==m&&"P"===m.nodeName&&"​"===m.innerHTML&&(m=m.previousElementSibling,null===m||"P"!==m.nodeName||"​"!==m.innerHTML&&"<br>"!==m.innerHTML||m.parentNode.removeChild(m.nextElementSibling))}this.wbbcode.observeQuotes(),this.wbbcode.fixBlockLevelElements(),this.$toolbar.find("a.re-__wcf_quote").removeClass("redactor-button-disabled")}else this.wutil.insertAtCaret(o+a+n);return this.wutil.saveSelection(),r},_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 o=$("#redactorCodeBox").focus();o.val(a),i.click($.proxy(function(){var e=$("#redactorCodeBox"),t=$("#redactorCodeFilename"),i=$("#redactorCodeHighlighter"),a=$("#redactorCodeLineNumber"),o=e.val().replace(/^\n+/,"").replace(/\n+$/,"");if(0===$.trim(o).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,"")),r="[code="+i.val()+","+a.val()+(n.length?",'"+n+"'":"")+"]";r.match(/\[code=([^,]+),(\d+)\]/)&&(r="[code="+RegExp.$2+","+RegExp.$1+"]"),r+=o,r+="[/code]",this.wutil.adjustSelectionForBlockElement(),this.wutil.saveSelection();var l=this.wbbcode.convertToHtml(r);this.buffer.set(),this.insert.html(l,!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 o=$("#redactorCodeBox").focus(),r=$("#redactorCodeFilename"),l=$("#redactorCodeHighlighter"),s=$("#redactorCodeLineNumber");l.val(e.data("highlighter")),r.val(e.data("filename")||"");var c=e.find("> div > ol");s.val(parseInt(c.prop("start")));var d="";c.children("li").each(function(e,t){d+=$(t).text().replace(/^\u200b$/,"")+"\n"}),o.val(d.replace(/^\n+/,"").replace(/\n+$/,"")),i.click($.proxy(function(){var t=o.val().replace(/^\n+/,"").replace(/\n+$/,"");if(0===$.trim(t).length)return void(o.next("small.innerError").length||$('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(o));var i=l.val();e.data("highlighter",i),e.attr("data-highlighter",i);var a=__REDACTOR_CODE_HIGHLIGHTERS[i],n=$.trim(r.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",l.val()),e.find("> div > div > h3").html(a);var c=e.find("> div > ol").empty(),d=parseInt(s.val());c.prop("start",d>1?d:1),t=t.split("\n");for(var h="",u=0;u<t.length;u++)h+="<li>"+WCF.String.escapeHTML(t[u])+"</li>";c.append($(h)),this.modal.close()},this))}},fixBlockLevelElements:function(){return},fixFormatting:function(){for(var e=function(t){t.style.removeProperty("text-align");for(var i=0;i<t.children.length;i++)e(t.children[i])},t=0;t<this.alignment.blocks.length;t++){var i=this.alignment.blocks[t];switch(i.tagName){case"BLOCKQUOTE":i.style.removeProperty("text-align"),e(i.children[0]);break;case"DIV":/\bcodeBox\b/.test(i.className)&&e(i)}}}}};
+
 // wbutton.js
-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"},i={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")},a=this.wutil.getOption("buttons"),o="",t=0,e=a.length;e>t;t++){var s=a[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,i[s]?i[s]:null,n[s]?n[s]:null,o),o=s}else this.button.get(o).parent().addClass("separator")}if(this.button.addCallback(this.button.get("image"),$.proxy(this.wbutton.insertImage,this)),this.utils.isDesktop()){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,i){var a={title:null===e?t:e};("subscript"===t||"superscript"===t)&&(a.command=t);var o=this.button.build(t,a);$("<li />").append(o).insertAfter(this.button.get(i).parent()),null!==n&&this.button.setAwesome(t,n)},_addBBCodeButton:function(t){var e="__wcf_"+t.name,n=this.button.add(e,t.label);if("tt"===t.name){var i=this.button.build(e,{command:"kbd",title:t.label});$("<li />").append(i).insertAfter(n.parent()),n.parent().remove(),n=i}else 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 i=this.selection.getHtml();if(i=i.replace(/<p>@@@wcf_empty_line@@@<\/p>/g,"<p><br></p>"),this.buffer.set(),this.utils.browser("mozilla")&&!i.length){var a=getSelection().getRangeAt(0).startContainer;a.nodeType===Node.ELEMENT_NODE&&"P"===a.tagName&&"<br>"===a.innerHTML&&a.removeChild(a.children[0])}this._bbcodes[t].voidElement?this.insert.html(i+this.selection.getMarkerAsHtml()+"["+e+"]",!1):this.insert.html("["+e+"]"+i+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(),i="";("left"===n||"right"===n)&&(i=' style="float: '+n+'"'),this.insert.html('<img src="'+e+'"'+i+">",!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(){"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(){"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(){"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(){"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(){function e(e){var t=o(e),i=window.getComputedStyle(e);return{bottom:t.top+e.offsetHeight+parseInt(i.marginBottom),top:t.top-parseInt(i.marginTop)}}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 i=!1;this.$editor.on("mousedown.wmonkeypatch",function(){i=!0}.bind(this)),$(document).on("mouseup.wmonkeypatch",function(){i&&(i=!1,this.wutil.saveSelection())}.bind(this));var n=function(e){return"BLOCKQUOTE"===e.nodeName?!0:"DIV"===e.nodeName&&e.classList.contains("codeBox")?!0:!1},o=function(e){var t=e.getBoundingClientRect();return{left:t.left+document.body.scrollLeft,top:t.top+document.body.scrollTop}},a=function(e,t){var i;if(t)if(i=e.previousSibling,null===i){var n=this.utils.createSpaceElement();e.parentNode.insertBefore(n,e),this.caret.setEnd(n)}else this.caret[i.nodeType===Node.ELEMENT_NODE&&"BR"===i.nodeName?"setBefore":"setAfter"](i);else if(i=e.nextSibling,null===i||i===e.nextElementSibling&&"BR"===i.nodeName){var n=this.utils.createSpaceElement();null===e.nextSibling?e.parentNode.appendChild(n):e.parentNode.insertBefore(n,e.nextSibling),this.caret.setAfter(n)}else this.caret.setBefore(i)}.bind(this),s=this.$editor[0];this.$editor.on("click.wmonkeypatch",function(t){var i=window.getSelection().rangeCount?window.getSelection().getRangeAt(0):null;if(t.target===s){for(var r,l,d=0,c=s.childElementCount;c>d;d++)if(l=s.children[d],n(l)&&(r=e(l),!(t.pageY>r.bottom))){if(t.pageY<r.top)break;if(t.pageY>=r.top&&t.pageY<=r.bottom){for(var h=t.pageY-r.top,u=r.bottom-r.top,m=u/2>=h,p=l[m?"previousSibling":"nextSibling"];null!==p;){if(p.nodeType===Node.TEXT_NODE&&""!==p.textContent)return;if(p.nodeType===Node.ELEMENT_NODE&&!n(p))return;p=p[m?"previousSibling":"nextSibling"]}a(l,m)}}if(i=window.getSelection().rangeCount?window.getSelection().getRangeAt(0):null,null!==i){var f=i.startContainer;f.nodeType===Node.TEXT_NODE&&(f=f.parentNode),"KBD"===f.nodeName&&(f.nextElementSibling===s.lastElementChild?"SPAN"===s.lastElementChild.nodeName&&""===s.lastElementChild.textContent&&s.removeChild(s.lastElementChild):f.nextSibling===f.nextElementSibling&&("KBD"===f.nextElementSibling.nodeName||"BR"===f.nextElementSibling.nodeName)&&a(f,!1),f===s.lastElementChild&&a(f,!1))}return!1}if("LI"===t.target.nodeName){var g=!1;if(null!==i&&i.collapsed)for(var b=i.startContainer;null!==b&&b!==s;){if("LI"===b.nodeName){g=!0;break}b=b.parentNode}if(!g||null===i){var v=document.createTextNode("​"),w=t.target.children[0];w.appendChild(v),this.caret.setEnd(w)}}else if("BLOCKQUOTE"===t.target.nodeName&&null!==i&&i.collapsed){for(var y=null,b=i.startContainer;null!==b&&b!==s;){if("BLOCKQUOTE"===b.nodeName){y=b;break}b=b.parentNode}null!==y&&y!==t.target&&(t.pageY<=o(y).top?a(y,!0):a(y,!1))}}.bind(this))},alignment:function(){var e=this.alignment.setBlocks;this.alignment.setBlocks=function(t){e.call(this,t),WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","fixFormatting_"+this.$textarea.wcfIdentify())}.bind(this)},button:function(){var e=this.button.addDropdown;this.button.addDropdown=function(t,i){var n=e.call(this,t,i);return i||n.addClass("dropdownMenu"),n}.bind(this)},caret:function(){this.caret.set=function(e,t,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()),e=e[0]||e,i=i[0]||i,this.utils.isBlockTag(e.tagName)&&""===e.innerHTML&&(e.innerHTML=this.opts.invisibleSpace),"BR"==e.tagName&&this.opts.linebreaks===!1){var o=$(this.opts.emptyHtml)[0];$(e).replaceWith(o),e=o,i=e}this.selection.get();try{this.range.setStart(e,t),this.range.setEnd(i,n)}catch(e){}this.selection.addRange()}.bind(this),this.caret.setOffset=function(e,t){"undefined"==typeof t&&(t=e),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>e||e===t&&a===e)&&(n.setStart(i,i.nodeValue.length+e-a),e=1/0),a>=t){n.setEnd(i,i.nodeValue.length+t-a);break}o.removeAllRanges(),o.addRange(n)}.bind(this)},clean:function(){var e=function(e){return e=e.replace(/\u201D/g,"__wcf_preserve_character_1__"),e=e.replace(/\u201C/g,"__wcf_preserve_character_2__"),e=e.replace(/\u2018/g,"__wcf_preserve_character_3__"),e=e.replace(/\u2019/g,"__wcf_preserve_character_4__")},t=function(e){return e=e.replace(/__wcf_preserve_character_1__/g,"”"),e=e.replace(/__wcf_preserve_character_2__/g,"“"),e=e.replace(/__wcf_preserve_character_3__/g,"‘"),e=e.replace(/__wcf_preserve_character_4__/g,"’")},i=this.clean.onPaste;this.clean.onPaste=function(n,o){return this.opts.replaceDivs=!0,n=e(n),n=i.call(this,n,o),this.opts.replaceDivs=!1,t(n)}.bind(this),this.clean.onPasteRemoveEmpty=function(e){return e.replace(/<br\s?\/?>$/i,"")};var n=this.clean.removeSpaces;this.clean.removeSpaces=function(e){return e=e.replace(/\u200C/g,"__wcf_zwnj__"),e=e.replace(/\u200D/g,"__wcf_zwj__"),e=n.call(this,e),e=e.replace(/__wcf_zwnj__/g,"‌"),e.replace(/__wcf_zwj__/g,"‍")};var o=this.clean.onSet;this.clean.onSet=function(i){return i=e(i),i=o.call(this,i),t(i)}.bind(this)},code:function(){var e=this.code.startSync;this.code.startSync=function(){this.code.syncCode=void 0,e.call(this)}.bind(this);var t=this.code.textareaIndenting;this.code.textareaIndenting=function(e){return 9!==e.keyCode||e.ctrlKey?!0:t.call(this,e)}.bind(this);var i=this.code.showCode;this.code.showCode=function(){var e=this.$editor.innerHeight(),t=null;this.$textarea.is(":visible")||(t=this.$textarea.parentsUntil(":visible").last(),t.show()),i.call(this),this.$textarea[0].style.setProperty("height",e+"px"),null!==t&&t.hide()}.bind(this)},dropdown:function(){this.dropdown.build=function(e,t,i){t.addClass("dropdownMenu"),$.each(i,function(e,i){if("dropdownDivider"==e)$('<li class="dropdownDivider" />').appendTo(t);else{var n=$("<li />"),o=$('<a href="#" class="redactor-dropdown-'+e+'">'+i.title+"</a>");o.on("click",$.proxy(function(t){t.preventDefault();var n="func",o=i.func;i.command?(n="command",o=i.command):i.dropdown&&(n="dropdown",o=i.dropdown),this.button.onClick(t,e,n,o),this.dropdown.hideAll()},this)),o.appendTo(n),n.appendTo(t)}}.bind(this))}.bind(this);var e=this.dropdown.show;this.dropdown.show=$.proxy(function(i,n){var o=this.button.get(n).data("dropdown");t(o),$.browser.iOS&&this.wutil.saveSelection(),e.call(this,i,n),o.off("mouseover mouseout")},this);var t=function(e){if(!e.hasClass("dropdownMenu")){e.addClass("dropdownMenu");for(var t=e.children("a").detach(),i=0;i<t.length;i++){var n=$("<li />").appendTo(e);n.append(t[i])}}}},image:function(){var e=this.image.setEditable;this.image.setEditable=function(t){t.hasClass("smiley")||(t.off("click.redactor touchstart.redactor"),e.call(this,t))}.bind(this);var t=this.image.loadEditableControls;this.image.loadEditableControls=function(e){if("redactor-image-box"===e[0].parentNode.id)return $("#redactor-image-resizer",this.$editor[0]);var i=t.call(this,e);return e.hasClass("redactorDisableResize")&&i!==!1&&i.hide(),i}.bind(this),this.image.show=function(){this.modal.load("image",this.lang.get("image"),0);var e=this.modal.createActionButton(this.lang.get("insert"));e.click($.proxy(this.wbutton._insertImage,this)),$("#redactorImageLinkHrefContainer").hide(),this.selection.save(),this.modal.show()}.bind(this),this.image.showEdit=function(e){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(e)}.bind(this));var t=e.closest("a",this.$editor[0]);$("#redactor-image-link-source").val(e.attr("src")),$("#redactor-image-link-href").val(t.length?t.attr("href"):""),$("#redactor-image-align").val(e.css("float")),this.modal.show(),setTimeout(function(){$(".redactor-link-tooltip").remove()},1)}.bind(this),this.image.update=function(e){this.image.hideResize(),this.buffer.set(),e.attr("src",$("#redactor-image-link-source").val()),this.image.setFloating(e);var t=$("#redactor-image-link-href").val().trim(),i=e.closest("a",this.$editor[0]);if(i.length)if(""===t){i=i[0];for(var n=i.children.length,o=i.parentNode;n--;)o.insertBefore(i.children[0],i);o.removeChild(i)}else i.attr("href",t);else""!==t&&(i=document.createElement("a"),i.href=t,e[0].parentNode.insertBefore(i,e[0]),i.appendChild(e[0]));this.modal.close(),this.observe.images()}.bind(this)},indent:function(){var e=this.indent.increase;this.indent.increase=function(){var t=this.selection.getBlock();t&&"LI"===t.tagName&&t.parentElement.firstChild!==t&&e.call(this)}.bind(this)},inline:function(){var e=this.inline.format;this.inline.format=function(t,i,n){$.browser.iOS&&this.wutil.restoreSelection(),e.call(this,t,i,n)}.bind(this);var t=this.inline.removeStyleRule;this.inline.removeStyleRule=function(e){$.browser.iOS&&this.wuil.restoreSelection(),t.call(this,e)}.bind(this)},insert:function(){var e=$.browser.webkit||document.documentElement.style.hasOwnProperty("WebkitAppearance")||window.hasOwnProperty("chrome"),t=function(){var e=this.$editor.html();this.utils.isEmpty(e)?(this.$editor.focus(),this.wutil.selectionEndOfEditor()):document.activeElement!==this.$editor[0]&&this.wutil.restoreSelection()}.bind(this),i=function(){for(var e=!1,t=this.$editor[0].querySelector('span:not([data-verified="redactor"])'),i=0,n=t.length;n>i;i++)t[i].outerHTML=t[i].innerHTML,e=!0;e&&this.wutil.saveSelection()}.bind(this),n=this.insert.html;if(this.insert.html=function(o,a){t(o),n.call(this,o,a),this.wutil.saveSelection(),e&&setTimeout(function(){i()},10)}.bind(this),navigator.userAgent.match(/safari/i)){var o=this.insert.execHtml;this.insert.execHtml=function(e){try{o.call(this,e)}catch(e){console.debug("[Redactor.wmonkeypatch] Suppressed error in Safari: "+e.message)}}.bind(this)}},keydown:function(){this.keydown.enterWithinBlockquote=!1;var e=this.keydown.onTab;this.keydown.onTab=function(t,i){var n=this.selection.getBlock();return n&&"LI"===n.nodeName?e.call(this,t,i):!0}.bind(this);var t=this.keydown.replaceDivToParagraph;this.keydown.replaceDivToParagraph=function(){this.keydown.enterWithinBlockquote?this.keydown.enterWithinBlockquote=!1:t.call(this)}.bind(this);var i=this.keydown.setupBuffer;this.keydown.setupBuffer=function(e,t){return!this.keydown.ctrl||89!==t||e.shiftKey||e.altKey||0===this.opts.rebuffer.length?void i.call(this,e,t):(e.preventDefault(),void this.buffer.redo())}.bind(this)},keyup:function(){var e=this.keyup.replaceToParagraph;this.keyup.replaceToParagraph=function(t){"DIV"===this.keyup.current.nodeName&&this.keyup.current.parentNode&&"BLOCKQUOTE"===this.keyup.current.parentNode.nodeName||e.call(this,t)}.bind(this)},link:function(){var e=this.link.insert;this.link.insert=function(){e.call(this),this.selection.get();var t=this.selection.getCurrent();t.nodeType===Node.TEXT_NODE&&(t=t.parentNode),"A"===t.nodeName&&this.caret.setAfter(t)}.bind(this)},modal:function(){this.modal.dialog=null;var e=this.modal.addTemplate;this.modal.addTemplate=function(t,i){"table"!==t&&e.call(this,t,i)}.bind(this),this.modal.build=function(){},this.modal.load=function(e,t){this.modal.templateName=e,this.modal.title=t,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 t=this.modal.createButton;this.modal.createButton=function(e,i){return null===this.$modalFooter&&(this.$modalFooter=$('<div class="formSubmit" />').appendTo(this.modal.dialog),this.modal.dialog.addClass("dialogForm")),t.call(this,e,i)}.bind(this),this.modal.close=function(){if(null!==this.modal.dialog){try{this.modal.dialog.wcfDialog("close")}catch(e){}finally{if(this.modal.dialog){var e=this.modal.dialog.parents(".dialogContainer:eq(0)");e.length&&setTimeout(function(){e.remove()},500)}}this.modal.dialog=null}}.bind(this),this.modal.createCancelButton=function(){return $()},this.modal.createDeleteButton=function(){return $()}},observe:function(){var e=function(e,t,i,n,o,a){var s=this.$toolbar.find(i);if(e&&0!=e.closest(t,this.$editor[0]).length)s[n?"removeClass":"addClass"](o);else{if(a&&!this.opts.visual)return;s[n?"addClass":"removeClass"](o)}}.bind(this),t=this.observe.buttons;this.observe.buttons=function(i,n){t.call(this,i,n);var o=this.selection.getCurrent();o!==!1&&(o.nodeType===Node.TEXT_NODE&&(o=o.parentNode),o!==this.$editor[0]&&(o=$(o),e(o,"ul, ol","a.re-indent, a.re-outdent",!0,"redactor-button-disabled"),e(o,"kbd","a.re-__wcf_tt",!1,"redactor-act"),e(o,"blockquote.quoteBox","a.re-__wcf_quote",!1,"redactor-button-disabled",!0),e(o,"sub","a.re-subscript",!1,"redactor-act"),e(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(e){var t=$(e.target);t.hasClass("redactorQuoteEdit")||n.call(this,e)}.bind(this)},paste:function(){var e=this.paste.createPasteBox;this.paste.createPasteBox=function(){if($.browser.iOS){var t=0;if(window.getSelection().rangeCount){var i=window.getSelection().getRangeAt(0).endContainer;i.nodeType!==Node.ELEMENT_NODE&&(i=i.parentElement),i=$(i),t=$(i).offset().top}else t=$(window).scrollTop();this.$pasteBox=$("<div>").html("").attr("contenteditable","true").css({position:"fixed",top:t+"px",fontSize:"16px"}),this.$box.parent().append(this.$pasteBox),this.$pasteBox.focus()}else e.call(this)}.bind(this);var t=function(){var e=window.getSelection();if(e.rangeCount){var t=e.getRangeAt(0);if(t.collapsed){var i=t.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=t.startContainer.childNodes[t.startContainer.childNodes.length-1],a=document.createRange();a.setStart(t.startContainer.childNodes[0],0),a.setEnd(o,o.length),a.collapse(!1),e.removeAllRanges(),e.addRange(a)}}}}},i=this.paste.insert;this.paste.insert=function(e){t(),i.call(this,e),setTimeout(function(){if(this.wutil.fixDOM(),$.browser.msie)getSelection().getRangeAt(0).collapse(!1);else if($.browser.mozilla){var e=getSelection().getRangeAt(0);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 e=function(e,t){var i=t.nextSibling;null!==i&&i.nodeType===Node.TEXT_NODE&&0===i.length&&$(i).remove();var n=null;("selection-marker-1"===t.id&&!this.$editor.find("#selection-marker-2").length||"nodes-marker-1"===t.id&&!this.$editor.find("#nodes-marker-2").length)&&(n=t.previousSibling),t.innerHTML.length?t.outerHTML=t.innerHTML:t.parentNode.removeChild(t),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(e)}.bind(this),this.selection.removeNodesMarkers=function(){$(document).find("span.redactor-nodes-marker").each(e),this.$editor.find("span.redactor-nodes-marker").each(e)}.bind(this)},utils:function(){this.utils.removeEmpty=function(){}},rebuildTemplates:function(){this.opts.modal.image='<fieldset id="redactor-modal-image-edit"><dl><dt><label for="redactor-image-link-source">'+WCF.Language.get("wcf.bbcode.image.source")+'</label></dt><dd><input type="text" id="redactor-image-link-source" class="long"  /></dd></dl><dl id="redactorImageLinkHrefContainer"><dt><label for="redactor-image-link-href">'+this.lang.get("link")+'</label></dt><dd><input type="text" id="redactor-image-link-href" 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 e="";$.each(__REDACTOR_CODE_HIGHLIGHTERS,function(t,i){return"plain"===t?!0:void(e+='<option value="'+t+'">'+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>"+e+"</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 monospace" 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(){"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(){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(){"use strict";var t=null,e=null,n=null;return{_autosaveWorker:null,init:function(){t=this.$editor[0],n=this.$textarea[0],this.$textarea.parents("form").submit($.proxy(this.wutil.submit,this))},saveSelection:function(t){var n=window.getSelection();n.rangeCount?e=n.getRangeAt(0):t&&(e=null)},restoreSelection:function(){if(document.activeElement!==t&&t.focus(),null!==e){var n=window.getSelection();n.removeAllRanges(),n.addRange(e),e=null}},clearSelection:function(){e=null},getSelection:function(){return e},insertAtCaret:function(t){if(this.opts.visual)return console.debug("insertAtCaret() failed: Editor is in WYSIWYG-mode."),!1;n.focus();var e=this.$textarea.getCaret();-1==e&&console.debug("insertAtCaret() failed: Source is not input[type=text], input[type=password] or textarea.");var i=n.value;return i=i.substr(0,e)+t+i.substr(e),n.value=i,!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(){return this.wutil.inWysiwygMode()&&(this.code.startSync(),n.value=this.wbbcode.convertFromHtml(n.value).trim()),n.value.trim()},isEmptyEditor:function(){return this.opts.visual?this.utils.isEmpty(t.innerHTML):""===n.value.trim()},submit:function(){this.wutil.inWysiwygMode()&&(this.code.startSync(),n=this.wbbcode.convertFromHtml(n.value).trim()),this.wautosave.purge()},reset:function(){this.opts.visual&&(t.innerHTML="",this.wutil.saveSelection()),n.value="",WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","reset",{wysiwygContainerID:n.id})},autosaveEnable:function(t){this.wautosave.enable(t)},saveTextToStorage:function(t){this.wautosave.save(t)},autosaveDisable:function(){return this.wautosave.disable()},autosavePurge:function(){this.wautosave.purge()},autosaveRestore:function(){return this.wautosave.restore()},autosaveShowNotice:function(t,e){this.wautosave.showNotice(t,e)},autosavePurgeOutdated:function(){this.wautosave.purgeOutdated()},autosavePause:function(){this.wautosave.pause()},autosaveResume:function(){this.wautosave.resume()},buttonReplace:function(t,e,n,i,o){var r=this.buttonGet(t),s=this.buttonAddAfter(t,e,n,i,o);return r.parent().hasClass("separator")&&s.parent().addClass("separator"),r.parent().remove(),s},removeZeroWidthSpace:function(t){return t.replace(/\u200b/g,"")},getSource:function(){return this.$textarea},getName:function(){return n.id},selectionEndOfEditor:function(){var e=t.lastElementChild;if(null===e||"BLOCKQUOTE"===e.nodeName||"DIV"===e.nodeName&&e.classList.contains("codeBox")||"KBD"===e.nodeName){var n=this.utils.createSpaceElement();t.appendChild(n),this.caret.setEnd(n),this.wutil.saveSelection()}else this.focus.setEnd()},adjustSelectionForBlockElement:function(){if(document.activeElement!==t&&this.wutil.restoreSelection(),window.getSelection().rangeCount){var e=window.getSelection().getRangeAt(0);if(e.collapsed){var n=e.startContainer;if(n.nodeType===Node.TEXT_NODE&&n.parentNode&&n.parentNode.parentNode===t)return;for(;n&&n!==t;)n=n.parentNode;n.parentNode===t?this.caret.setAfter(n):this.wutil.selectionEndOfEditor()}}},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===Node.TEXT_NODE&&e.endOffset<e.endContainer.length)return!1;if(!this.wutil.isNodeWithin(e.endContainer,t))return!1;for(var n=e.endContainer;n!==t;){if(n.nextSibling)return!1;n=n.parentNode}return!0},isNodeWithin:function(e,n){for(;e&&e!==t;){if(e===n)return!0;e=e.parentNode}return!1},containsTag:function(t,e){if(t.nodeType===Node.ELEMENT_NODE){if(t.nodeName===e)return!0}else if(t.nodeType===Node.DOCUMENT_FRAGMENT_NODE)for(var n=0,i=t.childElementCount;i>n;n++)if(this.wutil.containsTag(t.childNodes[n],e))return!0;return!1},replaceText:function(t){var e=$(document),i=e.scrollTop(),o=!1;this.wutil.inWysiwygMode()&&(this.code.toggle(),o=!0),n.value=t,o&&(this.code.toggle(),e.scrollTop(i)),e.trigger("resize")},setCaretBefore:function(t){this.caret.setBefore(t)},setCaretAfter:function(t){this.caret.setAfter(t)},_setCaret:function(t,e){this.caret[e?"setBefore":"setAfter"](t)},fixDOM:function(){for(var e,n=t.querySelectorAll("li:empty"),i=0,o=n.length;o>i;i++)e=n[i].parentNode,e.childElementCount>1&&e.removeChild(n[i]);for(n=t.getElementsByTagName("INPUT");n.length;)n[0].parentNode.removeChild(n[0])}}};
+
index 803a409b561a6b803a5acaf141c41129bb456716..39b989385bdcaa1b3f2ece3b0fbb8e0746ee9c11 100755 (executable)
@@ -61,52 +61,47 @@ i&&i.element!==s.element[0]&&("touch"===n.tolerance?l=!(i.left>r||a>i.right||i.t
  })(this);
 
 // WCF.Assets.js
-(function (window, undefined) {!function(){var e=!1,t=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/;this.Class=function(){},Class.extend=function(n){function i(){!e&&this.init&&this.init.apply(this,arguments)}var r=this.prototype;e=!0;var o=new this;e=!1;for(var a in n)o[a]="function"==typeof n[a]&&"function"==typeof r[a]&&t.test(n[a])?function(e,t){return function(){var n=this._super;this._super=r[e];var i=t.apply(this,arguments);return this._super=n,i}}(a,n[a]):n[a];return i.prototype=o,i.prototype.constructor=i,i.extend=arguments.callee,i}}(),function(e,t){"use strict";function n(){}function i(e,t){if(e){"object"==typeof e&&(e=[].slice.call(e));for(var n=0,i=e.length;i>n;n++)t.call(e,e[n],n)}}function r(e,n){var i=Object.prototype.toString.call(n).slice(8,-1);return n!==t&&null!==n&&i===e}function o(e){return r("Function",e)}function a(e){return r("Array",e)}function u(e){var t=e.split("/"),n=t[t.length-1],i=n.indexOf("?");return-1!==i?n.substring(0,i):n}function l(e){e=e||n,e._done||(e(),e._done=1)}function s(e,t,i,r){var o="object"==typeof e?e:{test:e,success:t?a(t)?t:[t]:!1,failure:i?a(i)?i:[i]:!1,callback:r||n},u=!!o.test;return u&&o.success?(o.success.push(o.callback),A.load.apply(null,o.success)):u||!o.failure?r():(o.failure.push(o.callback),A.load.apply(null,o.failure)),A}function c(e){var t,n,i={};if("object"==typeof e)for(t in e)!e[t]||(i={name:t,url:e[t]});else i={name:u(e),url:e};return n=M[i.name],n&&n.url===i.url?n:(M[i.name]=i,i)}function d(e){e=e||M;for(var t in e)if(e.hasOwnProperty(t)&&e[t].state!==R)return!1;return!0}function p(e){e.state=I,i(e.onpreload,function(e){e.call()})}function f(e){e.state===t&&(e.state=P,e.onpreload=[],w({url:e.url,type:"cache"},function(){p(e)}))}function h(){var e=arguments,t=e[e.length-1],n=[].slice.call(e,1),r=n[0];return o(t)||(t=null),a(e[0])?(e[0].push(t),A.load.apply(null,e[0]),A):(r?(i(n,function(e){o(e)||!e||f(c(e))}),v(c(e[0]),o(r)?r:function(){A.load.apply(null,n)})):v(c(e[0])),A)}function g(){var e=arguments,t=e[e.length-1],n={};return o(t)||(t=null),a(e[0])?(e[0].push(t),A.load.apply(null,e[0]),A):(i(e,function(e){e!==t&&(e=c(e),n[e.name]=e)}),i(e,function(e){e!==t&&(e=c(e),v(e,function(){d(n)&&l(t)}))}),A)}function v(e,t){return t=t||n,e.state===R?void t():e.state===D?void A.ready(e.name,t):e.state===P?void e.onpreload.push(function(){v(e,t)}):(e.state=D,void w(e,function(){e.state=R,t(),i(O[e.name],function(e){l(e)}),E&&d()&&i(O.ALL,function(e){l(e)})}))}function m(e){e=e||"";var t=e.split("?")[0].split(".");return t[t.length-1].toLowerCase()}function w(t,i){function r(t){t=t||e.event,u.onload=u.onreadystatechange=u.onerror=null,i()}function o(n){n=n||e.event,("load"===n.type||/loaded|complete/.test(u.readyState)&&(!S.documentMode||S.documentMode<9))&&(e.clearTimeout(t.errorTimeout),e.clearTimeout(t.cssTimeout),u.onload=u.onreadystatechange=u.onerror=null,i())}function a(){if(t.state!==R&&t.cssRetries<=20){for(var n=0,i=S.styleSheets.length;i>n;n++)if(S.styleSheets[n].href===u.href)return void o({type:"load"});t.cssRetries++,t.cssTimeout=e.setTimeout(a,250)}}var u,l,s;i=i||n,l=m(t.url),"css"===l?(u=S.createElement("link"),u.type="text/"+(t.type||"css"),u.rel="stylesheet",u.href=t.url,t.cssRetries=0,t.cssTimeout=e.setTimeout(a,500)):(u=S.createElement("script"),u.type="text/"+(t.type||"javascript"),u.src=t.url),u.onload=u.onreadystatechange=o,u.onerror=r,u.async=!1,u.defer=!1,t.errorTimeout=e.setTimeout(function(){r({type:"timeout"})},7e3),s=S.head||S.getElementsByTagName("head")[0],s.insertBefore(u,s.lastChild)}function b(){for(var e,t=S.getElementsByTagName("script"),n=0,i=t.length;i>n;n++)if(e=t[n].getAttribute("data-headjs-load"),!!e)return void A.load(e)}function y(e,t){var n,r,u;return e===S?(E?l(t):L.push(t),A):(o(e)&&(t=e,e="ALL"),a(e)?(n={},i(e,function(e){n[e]=M[e],A.ready(e,function(){d(n)&&l(t)})}),A):"string"==typeof e&&o(t)?(r=M[e],r&&r.state===R||"ALL"===e&&d()&&E?(l(t),A):(u=O[e],u?u.push(t):u=O[e]=[t],A)):A)}function T(){return S.body?void(E||(E=!0,b(),i(L,function(e){l(e)}))):(e.clearTimeout(A.readyTimeout),void(A.readyTimeout=e.setTimeout(T,50)))}function x(){S.addEventListener?(S.removeEventListener("DOMContentLoaded",x,!1),T()):"complete"===S.readyState&&(S.detachEvent("onreadystatechange",x),T())}var E,k,S=e.document,L=[],O={},M={},z="async"in S.createElement("script")||"MozAppearance"in S.documentElement.style||e.opera,j=e.head_conf&&e.head_conf.head||"head",A=e[j]=e[j]||function(){A.ready.apply(null,arguments)},P=1,I=2,D=3,R=4;if("complete"===S.readyState)T();else if(S.addEventListener)S.addEventListener("DOMContentLoaded",x,!1),e.addEventListener("load",T,!1);else{S.attachEvent("onreadystatechange",x),e.attachEvent("onload",T),k=!1;try{k=!e.frameElement&&S.documentElement}catch(e){}k&&k.doScroll&&function t(){if(!E){try{k.doScroll("left")}catch(n){return e.clearTimeout(A.readyTimeout),void(A.readyTimeout=e.setTimeout(t,50))}T()}}()}A.load=A.js=z?g:h,A.test=s,A.ready=y,A.ready(S,function(){d()&&i(O.ALL,function(e){l(e)}),A.feature&&A.feature("domloaded",!0)})}(window),function(e){"function"==typeof define&&define.amd&&define.amd.jQuery?define(["jquery"],e):e(jQuery)}(function(e){function t(t){return!t||void 0!==t.allowPageScroll||void 0===t.swipe&&void 0===t.swipeStatus||(t.allowPageScroll=s),void 0!==t.click&&void 0===t.tap&&(t.tap=t.click),t||(t={}),t=e.extend({},e.fn.swipe.defaults,t),this.each(function(){var i=e(this),r=i.data(O);r||(r=new n(this,t),i.data(O,r))})}function n(t,n){function M(t){if(!(se()||e(t.target).closest(n.excludedElements,Be).length>0)){var i,r=t.originalEvent?t.originalEvent:t,o=k?r.touches[0]:r;return Fe=y,k?We=r.touches.length:t.preventDefault(),Re=0,_e=null,qe=null,Ne=0,Ue=0,Ce=0,He=1,Qe=0,Ye=he(),Xe=me(),ue(),!k||We===n.fingers||n.fingers===w||X()?(de(0,o),Ve=Le(),2==We&&(de(1,r.touches[1]),Ue=Ce=ye(Ye[0].start,Ye[1].start)),(n.swipeStatus||n.pinchStatus)&&(i=R(r,Fe))):i=!1,i===!1?(Fe=E,R(r,Fe),i):(n.hold&&(et=setTimeout(e.proxy(function(){Be.trigger("hold",[r.target]),n.hold&&(i=n.hold.call(Be,r,r.target))},this),n.longTapThreshold)),ce(!0),null)}}function z(e){var t=e.originalEvent?e.originalEvent:e;if(Fe!==x&&Fe!==E&&!le()){var i,r=k?t.touches[0]:t,o=pe(r);if(Ge=Le(),k&&(We=t.touches.length),n.hold&&clearTimeout(et),Fe=T,2==We&&(0==Ue?(de(1,t.touches[1]),Ue=Ce=ye(Ye[0].start,Ye[1].start)):(pe(t.touches[1]),Ce=ye(Ye[0].end,Ye[1].end),qe=xe(Ye[0].end,Ye[1].end)),He=Te(Ue,Ce),Qe=Math.abs(Ue-Ce)),We===n.fingers||n.fingers===w||!k||X()){if(_e=Se(o.start,o.end),Q(e,_e),Re=Ee(o.start,o.end),Ne=be(),ge(_e,Re),(n.swipeStatus||n.pinchStatus)&&(i=R(t,Fe)),!n.triggerOnTouchEnd||n.triggerOnTouchLeave){var a=!0;if(n.triggerOnTouchLeave){var u=Oe(this);a=Me(o.end,u)}!n.triggerOnTouchEnd&&a?Fe=D(T):n.triggerOnTouchLeave&&!a&&(Fe=D(x)),(Fe==E||Fe==x)&&R(t,Fe)}}else Fe=E,R(t,Fe);i===!1&&(Fe=E,R(t,Fe))}}function j(e){var t=e.originalEvent;return k&&t.touches.length>0?(ae(),!0):(le()&&(We=Je),Ge=Le(),Ne=be(),U()||!N()?(Fe=E,R(t,Fe)):n.triggerOnTouchEnd||0==n.triggerOnTouchEnd&&Fe===T?(e.preventDefault(),Fe=x,R(t,Fe)):!n.triggerOnTouchEnd&&Z()?(Fe=x,_(t,Fe,f)):Fe===T&&(Fe=E,R(t,Fe)),ce(!1),null)}function A(){We=0,Ge=0,Ve=0,Ue=0,Ce=0,He=1,ue(),ce(!1)}function P(e){var t=e.originalEvent;n.triggerOnTouchLeave&&(Fe=D(x),R(t,Fe))}function I(){Be.unbind(je,M),Be.unbind(De,A),Be.unbind(Ae,z),Be.unbind(Pe,j),Ie&&Be.unbind(Ie,P),ce(!1)}function D(e){var t=e,i=H(),r=N(),o=U();return!i||o?t=E:!r||e!=T||n.triggerOnTouchEnd&&!n.triggerOnTouchLeave?!r&&e==x&&n.triggerOnTouchLeave&&(t=E):t=x,t}function R(e,t){var n=void 0;return Y()||W()?n=_(e,t,d):(B()||X())&&n!==!1&&(n=_(e,t,p)),re()&&n!==!1?n=_(e,t,h):oe()&&n!==!1?n=_(e,t,g):ie()&&n!==!1&&(n=_(e,t,f)),t===E&&A(e),t===x&&(k?0==e.touches.length&&A(e):A(e)),n}function _(t,s,c){var v=void 0;if(c==d){if(Be.trigger("swipeStatus",[s,_e||null,Re||0,Ne||0,We,Ye]),n.swipeStatus&&(v=n.swipeStatus.call(Be,t,s,_e||null,Re||0,Ne||0,We,Ye),v===!1))return!1;if(s==x&&F()){if(Be.trigger("swipe",[_e,Re,Ne,We,Ye]),n.swipe&&(v=n.swipe.call(Be,t,_e,Re,Ne,We,Ye),v===!1))return!1;switch(_e){case i:Be.trigger("swipeLeft",[_e,Re,Ne,We,Ye]),n.swipeLeft&&(v=n.swipeLeft.call(Be,t,_e,Re,Ne,We,Ye));break;case r:Be.trigger("swipeRight",[_e,Re,Ne,We,Ye]),n.swipeRight&&(v=n.swipeRight.call(Be,t,_e,Re,Ne,We,Ye));break;case o:Be.trigger("swipeUp",[_e,Re,Ne,We,Ye]),n.swipeUp&&(v=n.swipeUp.call(Be,t,_e,Re,Ne,We,Ye));break;case a:Be.trigger("swipeDown",[_e,Re,Ne,We,Ye]),n.swipeDown&&(v=n.swipeDown.call(Be,t,_e,Re,Ne,We,Ye))}}}if(c==p){if(Be.trigger("pinchStatus",[s,qe||null,Qe||0,Ne||0,We,He,Ye]),n.pinchStatus&&(v=n.pinchStatus.call(Be,t,s,qe||null,Qe||0,Ne||0,We,He,Ye),v===!1))return!1;if(s==x&&q())switch(qe){case u:Be.trigger("pinchIn",[qe||null,Qe||0,Ne||0,We,He,Ye]),n.pinchIn&&(v=n.pinchIn.call(Be,t,qe||null,Qe||0,Ne||0,We,He,Ye));break;case l:Be.trigger("pinchOut",[qe||null,Qe||0,Ne||0,We,He,Ye]),n.pinchOut&&(v=n.pinchOut.call(Be,t,qe||null,Qe||0,Ne||0,We,He,Ye))}}return c==f?(s===E||s===x)&&(clearTimeout($e),clearTimeout(et),J()&&!ee()?(Ke=Le(),$e=setTimeout(e.proxy(function(){Ke=null,Be.trigger("tap",[t.target]),n.tap&&(v=n.tap.call(Be,t,t.target))},this),n.doubleTapThreshold)):(Ke=null,Be.trigger("tap",[t.target]),n.tap&&(v=n.tap.call(Be,t,t.target)))):c==h?(s===E||s===x)&&(clearTimeout($e),Ke=null,Be.trigger("doubletap",[t.target]),n.doubleTap&&(v=n.doubleTap.call(Be,t,t.target))):c==g&&(s===E||s===x)&&(clearTimeout($e),Ke=null,Be.trigger("longtap",[t.target]),n.longTap&&(v=n.longTap.call(Be,t,t.target))),v}function N(){var e=!0;return null!==n.threshold&&(e=Re>=n.threshold),e}function U(){var e=!1;return null!==n.cancelThreshold&&null!==_e&&(e=ve(_e)-Re>=n.cancelThreshold),e}function C(){return null!==n.pinchThreshold?Qe>=n.pinchThreshold:!0}function H(){var e;return e=n.maxTimeThreshold&&Ne>=n.maxTimeThreshold?!1:!0}function Q(e,t){if(n.allowPageScroll===s||X())e.preventDefault();else{var u=n.allowPageScroll===c;switch(t){case i:(n.swipeLeft&&u||!u&&n.allowPageScroll!=v)&&e.preventDefault();break;case r:(n.swipeRight&&u||!u&&n.allowPageScroll!=v)&&e.preventDefault();break;case o:(n.swipeUp&&u||!u&&n.allowPageScroll!=m)&&e.preventDefault();break;case a:(n.swipeDown&&u||!u&&n.allowPageScroll!=m)&&e.preventDefault()}}}function q(){var e=V(),t=G(),n=C();return e&&t&&n}function X(){return!!(n.pinchStatus||n.pinchIn||n.pinchOut)}function B(){return!(!q()||!X())}function F(){var e=H(),t=N(),n=V(),i=G(),r=U(),o=!r&&i&&n&&t&&e;return o}function W(){return!!(n.swipe||n.swipeStatus||n.swipeLeft||n.swipeRight||n.swipeUp||n.swipeDown)}function Y(){return!(!F()||!W())}function V(){return We===n.fingers||n.fingers===w||!k}function G(){return 0!==Ye[0].end.x}function Z(){return!!n.tap}function J(){return!!n.doubleTap}function K(){return!!n.longTap}function $(){if(null==Ke)return!1;var e=Le();return J()&&e-Ke<=n.doubleTapThreshold}function ee(){return $()}function te(){return(1===We||!k)&&(isNaN(Re)||Re<n.threshold)}function ne(){return Ne>n.longTapThreshold&&b>Re}function ie(){return!(!te()||!Z())}function re(){return!(!$()||!J())}function oe(){return!(!ne()||!K())}function ae(){Ze=Le(),Je=event.touches.length+1}function ue(){Ze=0,Je=0}function le(){var e=!1;if(Ze){var t=Le()-Ze;t<=n.fingerReleaseThreshold&&(e=!0)}return e}function se(){return!(Be.data(O+"_intouch")!==!0)}function ce(e){e===!0?(Be.bind(Ae,z),Be.bind(Pe,j),Ie&&Be.bind(Ie,P)):(Be.unbind(Ae,z,!1),Be.unbind(Pe,j,!1),Ie&&Be.unbind(Ie,P,!1)),Be.data(O+"_intouch",e===!0)}function de(e,t){var n=void 0!==t.identifier?t.identifier:0;return Ye[e].identifier=n,Ye[e].start.x=Ye[e].end.x=t.pageX||t.clientX,Ye[e].start.y=Ye[e].end.y=t.pageY||t.clientY,Ye[e]}function pe(e){var t=void 0!==e.identifier?e.identifier:0,n=fe(t);return n.end.x=e.pageX||e.clientX,n.end.y=e.pageY||e.clientY,n}function fe(e){for(var t=0;t<Ye.length;t++)if(Ye[t].identifier==e)return Ye[t]}function he(){for(var e=[],t=0;5>=t;t++)e.push({start:{x:0,y:0},end:{x:0,y:0},identifier:0});return e}function ge(e,t){t=Math.max(t,ve(e)),Xe[e].distance=t}function ve(e){return Xe[e]?Xe[e].distance:void 0}function me(){var e={};return e[i]=we(i),e[r]=we(r),e[o]=we(o),e[a]=we(a),e}function we(e){return{direction:e,distance:0}}function be(){return Ge-Ve}function ye(e,t){var n=Math.abs(e.x-t.x),i=Math.abs(e.y-t.y);return Math.round(Math.sqrt(n*n+i*i))}function Te(e,t){var n=t/e*1;return n.toFixed(2)}function xe(){return 1>He?l:u}function Ee(e,t){return Math.round(Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)))}function ke(e,t){var n=e.x-t.x,i=t.y-e.y,r=Math.atan2(i,n),o=Math.round(180*r/Math.PI);return 0>o&&(o=360-Math.abs(o)),o}function Se(e,t){var n=ke(e,t);return 45>=n&&n>=0?i:360>=n&&n>=315?i:n>=135&&225>=n?r:n>45&&135>n?a:o}function Le(){var e=new Date;return e.getTime()}function Oe(t){t=e(t);var n=t.offset(),i={left:n.left,right:n.left+t.outerWidth(),top:n.top,bottom:n.top+t.outerHeight()};return i}function Me(e,t){return e.x>t.left&&e.x<t.right&&e.y>t.top&&e.y<t.bottom}var ze=k||L||!n.fallbackToMouseEvents,je=ze?L?S?"MSPointerDown":"pointerdown":"touchstart":"mousedown",Ae=ze?L?S?"MSPointerMove":"pointermove":"touchmove":"mousemove",Pe=ze?L?S?"MSPointerUp":"pointerup":"touchend":"mouseup",Ie=ze?null:"mouseleave",De=L?S?"MSPointerCancel":"pointercancel":"touchcancel",Re=0,_e=null,Ne=0,Ue=0,Ce=0,He=1,Qe=0,qe=0,Xe=null,Be=e(t),Fe="start",We=0,Ye=null,Ve=0,Ge=0,Ze=0,Je=0,Ke=0,$e=null,et=null;try{Be.bind(je,M),Be.bind(De,A)}catch(t){e.error("events not supported "+je+","+De+" on jQuery.swipe")}this.enable=function(){return Be.bind(je,M),Be.bind(De,A),Be},this.disable=function(){return I(),Be},this.destroy=function(){return I(),Be.data(O,null),Be},this.option=function(t,i){if(void 0!==n[t]){if(void 0===i)return n[t];n[t]=i}else e.error("Option "+t+" does not exist on jQuery.swipe.options");return null}}var i="left",r="right",o="up",a="down",u="in",l="out",s="none",c="auto",d="swipe",p="pinch",f="tap",h="doubletap",g="longtap",v="horizontal",m="vertical",w="all",b=10,y="start",T="move",x="end",E="cancel",k="ontouchstart"in window,S=window.navigator.msPointerEnabled&&!window.navigator.pointerEnabled,L=window.navigator.pointerEnabled||window.navigator.msPointerEnabled,O="TouchSwipe",M={fingers:1,threshold:75,cancelThreshold:null,pinchThreshold:20,maxTimeThreshold:null,fingerReleaseThreshold:250,longTapThreshold:500,doubleTapThreshold:200,swipe:null,swipeLeft:null,swipeRight:null,swipeUp:null,swipeDown:null,swipeStatus:null,pinchIn:null,pinchOut:null,pinchStatus:null,click:null,tap:null,doubleTap:null,longTap:null,hold:null,triggerOnTouchEnd:!0,triggerOnTouchLeave:!1,allowPageScroll:"auto",fallbackToMouseEvents:!0,excludedElements:"label, button, input, select, textarea, a, .noSwipe"};e.fn.swipe=function(n){var i=e(this),r=i.data(O);if(r&&"string"==typeof n){if(r[n])return r[n].apply(this,Array.prototype.slice.call(arguments,1));e.error("Method "+n+" does not exist on jQuery.swipe")}else if(!(r||"object"!=typeof n&&n))return t.apply(this,arguments);return i},e.fn.swipe.defaults=M,e.fn.swipe.phases={PHASE_START:y,PHASE_MOVE:T,PHASE_END:x,PHASE_CANCEL:E},e.fn.swipe.directions={LEFT:i,RIGHT:r,UP:o,DOWN:a,IN:u,OUT:l},e.fn.swipe.pageScroll={NONE:s,HORIZONTAL:v,VERTICAL:m,AUTO:c},e.fn.swipe.fingers={ONE:1,TWO:2,THREE:3,ALL:w}}),function(e){(jQuery.browser=jQuery.browser||{}).mobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od|ad)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(e.substr(0,4))}(navigator.userAgent||navigator.vendor||window.opera),function(e){var t={init:function(){var t=["paddingTop","paddingRight","paddingBottom","paddingLeft","fontSize","lineHeight","fontFamily","width","fontWeight","border-top-width","border-right-width","border-bottom-width","border-left-width","-moz-box-sizing","-webkit-box-sizing","box-sizing"];return this.each(function(){function n(){for(var e=0;e<t.length;e++)a.css(t[e],o.css(t[e]))}function i(){var e=o.val().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&/g,"&").replace(/\n/g,"<br/>");a.html(e+"&nbsp;"),r()}function r(){var e=a.height(),t="hidden",n=u?e+c+l:e+c;n>p?(n=p,t="auto"):d>n&&(n=d),o.height()!==n&&o.css({overflow:t,height:n+"px"})}if("textarea"!==this.type)return!1;var o=e(this).css({resize:"none",overflow:"hidden"}),a=e("<div></div>").css({position:"absolute",display:"none","word-wrap":"break-word","white-space":"pre-wrap","border-style":"solid"}).appendTo(document.body);n();var u="border-box"==o.css("box-sizing")||"border-box"==o.css("-moz-box-sizing")||"border-box"==o.css("-webkit-box-sizing"),l=parseInt(o.css("border-top-width"))+parseInt(o.css("padding-top"))+parseInt(o.css("padding-bottom"))+parseInt(o.css("border-bottom-width")),s=parseInt(o.css("height"),10),c=parseInt(o.css("line-height"),10)||parseInt(o.css("font-size"),10),d=2*c>s?2*c:s,p=parseInt(o.css("max-height"),10)>-1?parseInt(o.css("max-height"),10):Number.MAX_VALUE;o.bind("keyup change cut paste",function(){i()}),e(window).bind("resize",function(){var e=parseInt(o.width(),10);a.width()!==e&&(a.css({width:e+"px"}),i())}),o.bind("blur",function(){r()}),o.bind("updateHeight",function(){n(),i()}),e(function(){i()})})}};e.fn.flexible=function(n){return t[n]?t[n].apply(this,Array.prototype.slice.call(arguments,1)):"object"!=typeof n&&n?void e.error("Method "+n+" does not exist on jQuery.flexible"):t.init.apply(this,arguments)}}(jQuery); })(this);
+(function (window, undefined) { })(this);
 
 // WCF.js
-(function (window, undefined) {"use strict";function wcfEval(expression){return eval(expression)}!function(){var e=jQuery.fn.data;jQuery.fn.data=function(t){if(t)switch(typeof t){case"object":for(var i in t)if(i.match(/ID$/)){var n=t[i];delete t[i],i=i.replace(/ID$/,"-id"),t[i]=n}arguments[0]=t;break;case"string":t.match(/ID$/)&&(arguments[0]=t.replace(/ID$/,"-id"))}var s=e.apply(this,arguments);if(void 0===t)for(var i in s)i.match(/Id$/)&&(s[i.replace(/Id$/,"ID")]=s[i],delete s[i]);return s},window.console||(window.console={});for(var t=["log","info","warn","exception","assert","dir","dirxml","trace","group","groupEnd","groupCollapsed","profile","profileEnd","count","clear","time","timeEnd","timeStamp","table","error"],i=0;i<t.length;i++)"undefined"==typeof console[t[i]]&&(console[t[i]]=function(){});"undefined"==typeof console.debug&&(console.debug=function(e){console.log(e)})}(),String.prototype.hashCode=function(){var e,t=0;if(this.length)for(var i=0,n=this.length;n>i;i++)e=this.charCodeAt(i),t=(t<<5)-t+e,t&=t;return t},window.shuffle=function(e){for(var t,i,n=e.length;0!==n;)i=Math.floor(Math.random()*n),n-=1,t=e[n],e[n]=e[i],e[i]=t;return this},function(e){var t=navigator.userAgent.toLowerCase(),i=/(chrome)[ \/]([\w.]+)/.exec(t)||/(webkit)[ \/]([\w.]+)/.exec(t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(t)||/(msie) ([\w.]+)/.exec(t)||t.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(t)||[],n={browser:i[1]||"",version:i[2]||"0"},s={};n.browser&&(s[n.browser]=!0,s.version=n.version),s.chrome?s.webkit=!0:s.webkit&&(s.safari=!0),e.browser=e.browser||{},e.browser=$.extend(e.browser,s),e.browser.touch=!!("ontouchstart"in window)||!!("msMaxTouchPoints"in window.navigator)&&window.navigator.msMaxTouchPoints>0,e.browser.smartphone="bottom"==$("html").css("caption-side"),e.browser.mozilla&&t.match(/trident/)&&(e.browser.mozilla=!1,e.browser.msie=!0),e.browser.iOS=/\((ipad|iphone|ipod);/.test(t),e.browser.iOS&&$("html").addClass("iOS"),e.browser.android=-1!==t.indexOf("android"),e.browser.editor="redactor",e.browser.ckeditor=!1,e.browser.redactor=!0,e.browser.iOS&&(e.fn.focus=function(e,t){return arguments.length>0?this.on("focus",null,e,t):this.trigger("focus")})}(jQuery),null==window.WCF&&(window.WCF={}),$.extend(!0,{removeArrayValue:function(e,t){return $.grep(e,function(e){return t!==e})},wcfEscapeID:function(e){return e.replace(/(:|\.)/g,"\\$1")},wcfIsset:function(e){return!!$("#"+$.wcfEscapeID(e)).length},getLength:function(e){var t=0;for(var i in e)e.hasOwnProperty(i)&&t++;return t}}),$.fn.extend({getTagName:function(){return this.length?this.get(0).tagName.toLowerCase():""},getDimensions:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"inner":i={height:this.innerHeight(),width:this.innerWidth()};break;case"outer":i={height:this.outerHeight(),width:this.outerWidth()};break;default:i={height:this.height(),width:this.width()}}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},getOffsets:function(e){var t={},i={},n=!1;switch(this.is(":hidden")&&(t=WCF.getInlineCSS(this),n=!0,this.css({display:"block",visibility:"hidden"})),e){case"offset":i=this.offset();break;case"position":default:i=this.position()}return n&&WCF.revertInlineCSS(this,t,["display","visibility"]),i},makePositioned:function(e,t){"absolute"!=e&&"fixed"!=e&&(e="absolute");var i=this.getOffsets("position");return this.css({position:e,left:i.left,margin:0,top:i.top}),t&&this.remove().appentTo("body"),this},disable:function(){return this.attr("disabled","disabled")},enable:function(){return this.removeAttr("disabled")},wcfIdentify:function(){return window.bc_wcfDomUtil.identify(this[0])},getCaret:function(){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return-1}else if(!this.is("textarea"))return-1;var e=0,t=this.get(0);if(document.selection){this.focus();var i=document.selection.createRange();i.moveStart("character",-this.val().length),e=i.text.length}else(t.selectionStart||"0"==t.selectionStart)&&(e=parseInt(t.selectionStart));return e},setCaret:function(e){if(this.is("input")){if("text"!=this.attr("type")&&"password"!=this.attr("type"))return!1}else if(!this.is("textarea"))return!1;var t=this.get(0);if(this.focus(),document.selection){var i=document.selection.createRange();i.moveStart("character",e),i.moveEnd("character",0),i.select()}else(t.selectionStart||"0"==t.selectionStart)&&(t.selectionStart=e,t.selectionEnd=e);return!0},wcfDropIn:function(e,t,i){return e||(e="up"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfDropOut:function(e,t,i){return e||(e="down"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"drop"),{direction:e},i,t)},wcfBlindIn:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.show(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfBlindOut:function(e,t,i){return e||(e="vertical"),i&&parseInt(i)||(i=200),this.hide(WCF.getEffect(this,"blind"),{direction:e},i,t)},wcfHighlight:function(e,t){return this.effect("highlight",e,600,t)},wcfFadeIn:function(e,t){return t&&parseInt(t)||(t=200),this.show(WCF.getEffect(this,"fade"),{},t,e)},wcfFadeOut:function(e,t){return t&&parseInt(t)||(t=200),this.hide(WCF.getEffect(this,"fade"),{},t,e)},cssAsNumber:function(e){if(this.length){var t=this.css(e);if(void 0!==t)return parseInt(t.replace(/px$/,""))}return 0},perfectScrollbar:function(e){var t=require("perfect-scrollbar");return this.each(function(){if("object"==typeof e||"undefined"==typeof e){var i=e;$(this).data("psID")||t.initialize(this,i)}else{var n=e;"update"===n?t.update(this):"destroy"===n&&t.destroy(this)}return jQuery(this)})}}),$.extend(WCF,{activeDialogs:0,_idCounter:0,getRandomID:function(){return window.bc_wcfDomUtil.getUniqueId()},inArray:function(e,t){return-1!=$.inArray(e,t)},getEffect:function(e,t){return e.is("tr")?"highlight":t},getInlineCSS:function(e){var t={},i=e.attr("style");if(!i)return{};i=i.split(";");for(var n=0,s=i.length;s>n;n++){var a=$.trim(i[n]);""!=a&&(a=a.split(":"),t[$.trim(a[0])]=$.trim(a[1]))}return t},revertInlineCSS:function(e,t,i){for(var n=0,s=i.length;s>n;n++){var a=i[n];t[a]?e.css(a,t[a]):e.css(a,"")}},getUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,i="x"==e?t:3&t|8;return i.toString(16)})},base64toBlob:function(e,t,i){t=t||"",i=i||512;for(var n=atob(e),s=[],a=0;a<n.length;a+=i){for(var o=n.slice(a,a+i),r=new Array(o.length),l=0;l<o.length;l++)r[l]=o.charCodeAt(l);var c=new Uint8Array(r);s.push(c)}return new Blob(s,{type:t})},convertLegacyURL:function(e){return URL_LEGACY_MODE?e:e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){for(var i=t.split(/([A-Z][a-z0-9]+)/),n="",s=0,a=i.length;a>s;s++){var o=i[s].trim();o.length&&(n.length&&(n+="-"),n+=o.toLowerCase())}return"index.php?"+n+"/&"})}}),WCF.Browser={_isChrome:null,isChrome:function(){return null===this._isChrome&&(this._isChrome=!1,/chrom(e|ium)/.test(navigator.userAgent.toLowerCase())&&(this._isChrome=!0)),this._isChrome}},WCF.Dropdown={init:function(){window.bc_wcfSimpleDropdown.initAll()},initDropdown:function(e,t){window.bc_wcfSimpleDropdown.init(e[0],t)},removeDropdown:function(e){window.bc_wcfSimpleDropdown.remove(e)},initDropdownFragment:function(e,t){window.bc_wcfSimpleDropdown.initFragment(e[0],t[0])},registerCallback:function(e,t){window.bc_wcfSimpleDropdown.registerCallback(e,t)},_toggle:function(e,t){window.bc_wcfSimpleDropdown._toggle(e,t)},toggleDropdown:function(e){window.bc_wcfSimpleDropdown._toggle(null,e)},getDropdown:function(e){var t=window.bc_wcfSimpleDropdown.getDropdown(e);return t?$(t):null},getDropdownMenu:function(e){var t=window.bc_wcfSimpleDropdown.getDropdownMenu(e);return t?$(t):null},setAlignmentByID:function(e){window.bc_wcfSimpleDropdown.setAlignmentById(e)},setAlignment:function(e,t){window.bc_wcfSimpleDropdown.setAlignment(e[0],t[0])},_closeAll:function(){window.bc_wcfSimpleDropdown.closeAll()},close:function(e){window.bc_wcfSimpleDropdown.close(e)},destroy:function(e){window.bc_wcfSimpleDropdown.destroy(e)}},WCF.Dropdown.Interactive={},WCF.Dropdown.Interactive.Handler={_dropdownContainer:null,_dropdownMenus:{},create:function(e,t,i){null===this._dropdownContainer&&(this._dropdownContainer=$('<div class="dropdownMenuContainer" />').appendTo(document.body),WCF.CloseOverlayHandler.addCallback("WCF.Dropdown.Interactive.Handler",$.proxy(this.closeAll,this)));var n=new WCF.Dropdown.Interactive.Instance(this._dropdownContainer,e,t,i);return this._dropdownMenus[t]=n,n},open:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].open(),!0):!1},close:function(e){return this._dropdownMenus[e]?(this._dropdownMenus[e].close(),!0):!1},closeAll:function(){$.each(this._dropdownMenus,function(e,t){t.close()})}},WCF.Dropdown.Interactive.Instance=Class.extend({_container:null,_itemList:null,_linkList:null,_options:{},_pointer:null,_triggerElement:null,init:function(e,t,i,n){this._options=n||{},this._triggerElement=t;var s=null;if(n.staticDropdown===!0)this._container=this._triggerElement.find(".interactiveDropdownStatic:eq(0)").data("source",i).click(function(e){e.stopPropagation()});else{this._container=$('<div class="interactiveDropdown" data-source="'+i+'" />').click(function(e){e.stopPropagation()});var a=$('<div class="interactiveDropdownHeader" />').appendTo(this._container);$('<span class="interactiveDropdownTitle">'+n.title+"</span>").appendTo(a),this._linkList=$('<ul class="interactiveDropdownLinks"></ul>').appendTo(a),s=$('<div class="interactiveDropdownItemsContainer" />').appendTo(this._container),this._itemList=$('<ul class="interactiveDropdownItems" />').appendTo(s),$('<a href="'+n.showAllLink+'" class="interactiveDropdownShowAll">'+WCF.Language.get("wcf.user.panel.showAll")+"</a>").appendTo(this._container)}this._pointer=$('<span class="pointer"><span /></span>').appendTo(this._container),$.browser.mobile||null===s||s.perfectScrollbar({suppressScrollX:!0}),this._container.appendTo(e)},getContainer:function(){return this._container},getItemList:function(){return this._itemList},getLinkList:function(){return this._linkList},open:function(){WCF.Dropdown._closeAll(),this._container.addClass("open"),this.render()},close:function(){this._container.removeClass("open")},toggle:function(){return this._container.hasClass("open")?(this.close(),!1):(WCF.Dropdown.Interactive.Handler.closeAll(),this.open(),!0)},resetItems:function(){this._itemList.empty(),this.close()},render:function(){var e=WCF.Language.get("wcf.global.pageDirection");"bottom"===$("html").css("caption-side")?this._renderMobile(e):this._renderDesktop(e)},rebuildScrollbar:function(){if(!$.browser.mobile){var e=this._itemList.parent();e.perfectScrollbar("destroy"),e.perfectScrollbar({suppressScrollX:!0})}},_renderMobile:function(){var e=this._triggerElement.getDimensions("outer"),t=Math.floor(e.width/2),i=this._triggerElement.getOffsets("offset"),n=Math.floor(this._pointer.outerWidth()/2);this._container.css({top:i.top+e.height+"px"}),this._pointer.css({left:i.left+t-n+"px"})},_renderDesktop:function(e){var t=this._triggerElement.getDimensions("outer"),i=this._triggerElement.getOffsets("offset"),n=this._container.getDimensions(),s=$(window).width(),a=null,o=null;"ltr"===e?(a=this._getPositionLeft(i,n,s),a.result||(o=this._getPositionRight(i,n,t,s),o.result?a=null:o=null)):(o=this._getPositionRight(i,n,t,s),o.result||(a=this._getPositionLeft(i,n,s),a.result?o=null:a=null)),null===o?(this._container.css({left:a.left+"px",top:i.top+t.height+"px"}),this._pointer.css({left:this._options.pointerOffset?this._options.pointerOffset:"4px"})):(this._container.css({right:o.right+"px",top:i.top+t.height+"px"}),this._pointer.css({right:this._options.pointerOffset?this._options.pointerOffset:"4px"}))},_getPositionLeft:function(e,t,i){var n=e.left,s=e.left+t.width;return{left:n,result:i>s}},_getPositionRight:function(e,t,i,n){var s=e.left+i.width-t.width,a=n-(e.left+i.width);return{result:s>0,right:a}}}),WCF.Clipboard={init:function(e,t,i,n){require(["WoltLab/WCF/Controller/Clipboard"],function(i){i.setup({hasMarkedItems:t>0,pageClassName:e,pageObjectId:n})})},reload:function(){require(["WoltLab/WCF/Controller/Clipboard"],function(e){e.reload()})}},WCF.PeriodicalExecuter=Class.extend({_callback:null,_delay:0,_intervalID:null,_isExecuting:!1,init:function(e,t){return $.isFunction(e)?(this._callback=e,this._interval=t,void this.resume()):void console.debug("[WCF.PeriodicalExecuter] Given callback is invalid, aborting.")},_execute:function(){if(!this._isExecuting)try{this._isExecuting=!0,this._callback(this),this._isExecuting=!1}catch(e){throw this._isExecuting=!1,e}},stop:function(){this._intervalID&&clearInterval(this._intervalID)},resume:function(){this.restart()},restart:function(){this._intervalID&&this.stop(),this._intervalID=setInterval($.proxy(this._execute,this),this._interval)},setInterval:function(e){this._interval=e,this.restart()}}),WCF.LoadingOverlayHandler={show:function(){require(["WoltLab/WCF/Ajax/Status"],function(e){e.show()})},hide:function(){require(["WoltLab/WCF/Ajax/Status"],function(e){e.hide()})},updateIcon:function(e,t){var i=void 0===t||t?"addClass":"removeClass";e.find(".icon")[i]("icon-spinner"),e.hasClass("icon")&&e[i]("icon-spinner")}},WCF.Action={},WCF.Action.Proxy=Class.extend({_ajaxRequest:null,init:function(e){this._ajaxRequest=null,e=$.extend(!0,{autoSend:!1,data:{},dataType:"json",after:null,init:null,jsonp:"callback",async:!0,failure:null,showLoadingOverlay:!0,success:null,suppressErrors:!1,type:"POST",url:"index.php/AJAXProxy/?t="+SECURITY_TOKEN+SID_ARG_2ND,aborted:null,autoAbortPrevious:!1},e),"jsonp"===e.dataType?require(["AjaxJsonp"],function(t){t.send(e.url,e.success,e.failure,{parameterName:e.jsonp})}):require(["AjaxRequest"],function(t){this._ajaxRequest=new t({data:e.data,type:e.type,url:e.url,autoAbort:e.autoAbortPrevious,ignoreError:e.suppressErrors,silent:!e.showLoadingOverlay,failure:e.failure,finalize:e.after,success:e.success}),e.autoSend&&this._ajaxRequest.sendRequest()}.bind(this))},sendRequest:function(e){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.sendRequest(e)}.bind(this))},abortPrevious:function(){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.abortPrevious()}.bind(this))},setOption:function(e,t){require(["AjaxRequest"],function(){null!==this._ajaxRequest&&this._ajaxRequest.setOption(e,t)}.bind(this))},showLoadingOverlayOnce:function(){},suppressErrors:function(){},_failure:function(){},_success:function(){},_after:function(){}}),WCF.Action.SimpleProxy=Class.extend({init:function(e,t){this.options=$.extend(!0,{action:"",className:"",elements:null,eventName:"click"},e),this.callbacks=$.extend(!0,{after:null,failure:null,init:null,success:null},t),this.options.elements&&(this.proxy=new WCF.Action.Proxy(this.callbacks),this.options.elements.each($.proxy(function(e,t){$(t).bind(this.options.eventName,$.proxy(this._handleEvent,this))},this)))},_handleEvent:function(e){this.proxy.setOption("data",{actionName:this.options.action,className:this.options.className,objectIDs:[$(e.target).data("objectID")]}),this.proxy.sendRequest()}}),WCF.Action.Delete=Class.extend({_buttonSelector:"",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i?i:".jsDeleteButton",this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Delete"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each(function(e,t){var i=$(t),n=i.wcfIdentify();if(!WCF.inArray(n,this._containers)){var s=i.find(this._buttonSelector);s.length&&(this._containers.push(n),s.click($.proxy(this._click,this)))}}.bind(this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy(this._execute,this),{target:t}):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_didTriggerEffect:function(){},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"delete",className:this._className,interfaceName:"wcf\\data\\IDeleteAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e){this.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);if(WCF.inArray(n.data("objectID"),e)){var s=this;i.wcfBlindOut("up",function(){var e=$(this).remove();s._containers.splice(s._containers.indexOf(e.wcfIdentify()),1),s._didTriggerEffect(e),n.data("eventName")&&WCF.System.Event.fireEvent("com.woltlab.wcf.action.delete",n.data("eventName"),{button:n,container:e})})}}}}),WCF.Action.NestedDelete=WCF.Action.Delete.extend({triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]);if(WCF.inArray(i.find(this._buttonSelector).data("objectID"),e))if(i.has("ol").has("li").length)i.is(":only-child")?i.parent().replaceWith(i.find("> ol")):i.replaceWith(i.find("> ol > li")),this._containers.splice(this._containers.indexOf(i.wcfIdentify()),1),this._didTriggerEffect(i);else{var n=this;i.wcfBlindOut("up",function(){$(this).remove(),n._containers.splice(n._containers.indexOf($(this).wcfIdentify()),1),n._didTriggerEffect($(this))})}}}}),WCF.Action.Toggle=Class.extend({_buttonSelector:".jsToggleButton",_className:"",_containerSelector:"",_containers:[],init:function(e,t,i){this._containerSelector=t,this._className=e,this._buttonSelector=i?i:".jsToggleButton",this._containers=[];var n={success:$.proxy(this._success,this)};this.proxy=new WCF.Action.Proxy(n),this._initElements(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Action.Toggle"+this._className.hashCode(),$.proxy(this._initElements,this))},_initElements:function(){$(this._containerSelector).each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();WCF.inArray(n,this._containers)||(this._containers.push(n),i.find(this._buttonSelector).click($.proxy(this._click,this)))},this))},_click:function(e){var t=$(e.currentTarget);e.preventDefault(),t.data("confirmMessage")?WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy(this._execute,this),{target:t}):(WCF.LoadingOverlayHandler.updateIcon(t),this._sendRequest(t))},_execute:function(e,t){"cancel"!==e&&(WCF.LoadingOverlayHandler.updateIcon(t.target),this._sendRequest(t.target))},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"toggle",className:this._className,interfaceName:"wcf\\data\\IToggleAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e){this.triggerEffect(e.objectIDs)},triggerEffect:function(e){for(var t in this._containers){var i=$("#"+this._containers[t]),n=i.find(this._buttonSelector);WCF.inArray(n.data("objectID"),e)&&(i.wcfHighlight(),this._toggleButton(i,n))}},_toggleButton:function(e,t){var i="";WCF.LoadingOverlayHandler.updateIcon(t,!1),t.hasClass("icon-check-empty")?(t.removeClass("icon-check-empty").addClass("icon-check"),i=t.data("disableTitle")?t.data("disableTitle"):WCF.Language.get("wcf.global.button.disable"),t.attr("title",i)):(t.removeClass("icon-check").addClass("icon-check-empty"),i=t.data("enableTitle")?t.data("enableTitle"):WCF.Language.get("wcf.global.button.enable"),t.attr("title",i)),e.toggleClass("disabled")}}),WCF.Action.Scroll=Class.extend({_callback:null,_reference:null,_target:null,_threshold:0,init:function(e,t,i,n){return this._threshold=parseInt(e),0===this._threshold?void console.debug("[WCF.Action.Scroll] Given threshold is invalid, aborting."):($.isFunction(t)&&(this._callback=t),null===this._callback?void console.debug("[WCF.Action.Scroll] Given callback is invalid, aborting."):(this._reference=$(i?i:window),this._target=$(n?n:document),this.start(),void this._scroll()))},_scroll:function(){var e=this._target.height(),t=this._reference.scrollTop(),i=this._reference.height();e-(i+t)<this._threshold&&this._callback(this)},start:function(){this._reference.on("scroll",$.proxy(this._scroll,this))},stop:function(){this._reference.off("scroll")}}),WCF.Date={},WCF.Date.Picker={init:function(){}},WCF.Date.Util={gmdate:function(e){var t=e?e:new Date;return Math.round(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDay(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())/1e3)},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}},WCF.Dictionary=Class.extend({_variables:{},init:function(){this._variables={}},add:function(e,t){this._variables[e]=t},addObject:function(e){for(var t in e)this.add(t,e[t])},addDictionary:function(e){e.each($.proxy(function(e){this.add(e.key,e.value)},this))},get:function(e){return this.isset(e)?this._variables[e]:null},isset:function(e){return this._variables.hasOwnProperty(e)},remove:function(e){delete this._variables[e]},each:function(e){if($.isFunction(e))for(var t in this._variables){var i=this._variables[t],n={key:t,value:i};e(n)}},count:function(){return $.getLength(this._variables)},isEmpty:function(){return!this.count()}}),null==window.WCF.Language&&(WCF.Language={add:function(e,t){require(["WoltLab/WCF/Language"],function(i){i.add(e,t)})},addObject:function(e){require(["WoltLab/WCF/Language"],function(t){t.addObject(e)})},get:function(e){throw new Error('Call to deprecated WCF.Language.get("'+e+'")')}}),WCF.MultipleLanguageInput=Class.extend({_availableLanguages:{},_button:null,_didInit:!1,_element:null,_insertedDataAfterInit:!1,_isEnabled:!1,_forceSelection:!1,_languageID:0,_list:null,_values:null,init:function(e,t,i,n){if(this._button=null,this._element=$("#"+$.wcfEscapeID(e)),this._forceSelection=t,this._values=i,this._availableLanguages=n,$.getLength(this._values))for(var s in this._values)this._values[s]=WCF.String.unescapeHTML(this._values[s]);if(this._languageID=LANGUAGE_ID,0==this._element.length)return void console.debug("[WCF.MultipleLanguageInput] element id '"+e+"' is unknown");var a=$.getLength(this._values)>0?!0:!1;this._insertedDataAfterInit=a,this._prepareElement(a),this._element.parents("form").submit($.proxy(this._submit,this)),this._didInit=!0},_prepareElement:function(e){this._element.wrap('<div class="dropdown preInput" />');var t=this._element.parent();this._button=$('<p class="button dropdownToggle"><span>'+WCF.Language.get("wcf.global.button.disabledI18n")+"</span></p>").prependTo(t),this._list=$('<ul class="dropdownMenu"></ul>').insertAfter(this._button),this._button.addClass(this._button.nextAll("textarea").length?"dropdownCaptionTextarea":"dropdownCaption");for(var i in this._availableLanguages)$("<li><span>"+this._availableLanguages[i]+"</span></li>").data("languageID",i).click($.proxy(this._changeLanguage,this)).appendTo(this._list);this._forceSelection||($('<li class="dropdownDivider" />').appendTo(this._list),$("<li><span>"+WCF.Language.get("wcf.global.button.disabledI18n")+"</span></li>").click($.proxy(this._disable,this)).appendTo(this._list)),WCF.Dropdown.initDropdown(this._button,e),(e||this._forceSelection)&&(this._isEnabled=!0,this._list.children("li").each($.proxy(function(e,t){var i=$(t);i.data("languageID")==this._languageID&&i.trigger("click")},this))),WCF.Dropdown.registerCallback(t.wcfIdentify(),$.proxy(this._handleAction,this))},_handleAction:function(e,t){"open"===t?this._enable():this._closeSelection()},_enable:function(){if(!this._isEnabled){var e=this._button.is("p")?this._button.children("span:eq(0)"):this._button;e.addClass("active"),this._isEnabled=!0}this._list.is(":visible")&&this._showSelection()},_showSelection:function(){this._isEnabled&&this._list.children("li").each($.proxy(function(e,t){var i=$(t),n=i.data("languageID");n&&(this._values[n]&&""!=this._values[n]?i.removeClass("missingValue"):i.addClass("missingValue"))},this))},_closeSelection:function(){this._disable()},_changeLanguage:function(e){var t=$(e.currentTarget);this._insertedDataAfterInit=!0,this._didInit&&(this._values[this._languageID]=this._element.val()),this._languageID=t.data("languageID"),this._element.val(this._values[this._languageID]?this._values[this._languageID]:""),this._list.children("li").removeClass("active"),t.addClass("active"),this._button.children("span").addClass("active").text(this._availableLanguages[this._languageID]),this._didInit&&this._element.blur().focus()},_disable:function(e){void 0===e&&this._insertedDataAfterInit&&(e=null),!this._forceSelection&&this._list&&null!==e&&(this._button.children("span").removeClass("active").text(WCF.Language.get("wcf.global.button.disabledI18n")),this._values[LANGUAGE_ID]?this._element.val(this._values[LANGUAGE_ID]):this._element.val(),e&&(this._list.children("li").removeClass("active"),$(e.currentTarget).addClass("active")),this._element.blur().focus(),this._insertedDataAfterInit=!1,this._isEnabled=!1,this._values={})},_submit:function(){if(!this._isEnabled)return 3735928559;this._languageID&&(this._values[this._languageID]=this._element.val());var e=$(this._element.parents("form")[0]),t=this._element.wcfIdentify();for(var i in this._availableLanguages)void 0===this._values[i]&&(this._values[i]=""),$('<input type="hidden" name="'+t+"_i18n["+i+']" value="'+WCF.String.escapeHTML(this._values[i])+'" />').appendTo(e);this._element.removeAttr("name")}}),WCF.Number={round:function(e,t){return t=Math.pow(10,t||0),Math.round(e*t)/t}},WCF.String={addThousandsSeparator:function(e){return String(e).replace(/(^-?\d{1,3}|\d{3})(?=(?:\d{3})+(?:$|\.))/g,"$1"+WCF.Language.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(e,t){e=String(WCF.Number.round(e,t||2));var i=e.split(".");return e=this.addThousandsSeparator(i[0]),i.length>1&&(e+=WCF.Language.get("wcf.global.decimalPoint")+i[1]),e=e.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,">")}},WCF.TabMenu={_containers:{},_didInit:!1,init:function(){return void require(["WoltLab/WCF/Ui/TabMenu"],function(e){e.setup()})},reload:function(){this._containers={},this.init()},_selectErroneousTab:function(){var e=!1;for(var t in this._containers){var i=this._containers[t];if(i.find(".formError").length&&(e=!0,!i.data("isParent"))){for(;;){if(i.data("parent")===!1)break;i=i.data("parent").wcfTabs("selectTab",i.wcfIdentify())}return!0}}if(e)for(var t in this._containers){var i=this._containers[t],n=i.find(".formError:eq(0)");if(n.length){for(i.wcfTabs("selectTab",n.parents(".tabMenuContent").wcfIdentify());;){if(i.data("parent")===!1)break;i=i.data("parent").wcfTabs("selectTab",i.wcfIdentify())}return!0}}return!1},_selectActiveTab:function(){for(var e in this._containers){var t=this._containers[e];if(t.data("active")){var i=t.data("active"),n=null;if(/-/.test(i)){var s=i.split("-");i=s[0],n=s[1]}t.find(".tabMenuContent").each(function(e,s){var a=$(s);return a.wcfIdentify()==i?(t.wcfTabs("select",e),null!==n&&(a.hasClass("tabMenuContainer")?a.wcfTabs("selectTab",t.data("active")):t.wcfTabs("selectTab",t.data("active"))),!1):void 0})}}},selectTabs:function(){if(location.hash){var e=location.hash.substr(1),t=$("#"+$.wcfEscapeID(e));if(1===t.length&&t.hasClass("ui-tabs-panel")&&(t=t.parent(".ui-tabs"),t.length))return t.wcfTabs("selectTab",e),t.hasClass("ui-tabs-panel")&&(e=t.wcfIdentify(),t=t.parent(".ui-tabs"),t.length&&t.wcfTabs("selectTab",e)),!0}return!1}},WCF.Template=Class.extend({init:function(e){var t=new WCF.Dictionary,i=0;e=e.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n"),e=e.replace(/\{literal\}(.*?)\{\/literal\}/g,$.proxy(function(e){var i="@@@@@@@@@@@"+Math.random()+"@@@@@@@@@@@";return t.add(i,e.replace(/\{\/?literal\}/g,"")),i},this)),e=e.replace(/\{\*.*?\*\}/g,"");var n=function(e){for(var t=e.split(""),i={},n=!0,s="",a="",o=!1,r=!1,l=!1,c=0,h=t.length;h>c;c++){var d=t[c];n&&"="!=d&&" "!=d?s+=d:n&&"="==d?(n=!1,r=!1,o=!1,l=!1):n||r||o||" "!=d?n||!r||l||"'"!=d?n||r||o||"'"!=d?n||!o||l||'"'!=d?n||r||o||'"'!=d?n||!o&&!r||l||"\\"!=d?n||(l=!1,a+=d):(l=!0,a+=d):(o=!0,a+=d):(o=!1,a+=d):(r=!0,a+=d):(r=!1,a+=d):(n=!0,i[s]=a,a=s="")}if(i[s]=a,o||r||l)throw new Error('Syntax error in parameterList: "'+e+'"');return i},s=function(e){return e.replace(/\\n/g,"\n").replace(/\\\\/g,"\\").replace(/\\'/g,"'")};e=e.replace(/\{(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.escapeHTML("+t+") + '"}).replace(/\{#(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + WCF.String.formatNumeric("+t+") + '"}).replace(/\{@(\$[^\}]+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"' + "+t+" + '"}).replace(/\{lang\}(.+?)\{\/lang\}/g,function(e,t){return"' + WCF.Language.get('"+t+"', v) + '"}).replace(/\{include (.+?)\}/g,function(e,t){t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var i=n(t);if("undefined"==typeof i.file)throw new Error("Missing file attribute in include-tag");return i.file=i.file.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"' + "+i.file+".fetch(v) + '"}).replace(/\{if (.+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\nif ("+t+") {\n     $output += '"}).replace(/\{else ?if (.+?)\}/g,function(e,t){return t=s(t.replace(/\$([^.\[\(\)\]\s]+)/g,"(v['$1'])")),"';\n}\nelse if ("+t+") {\n       $output += '"}).replace(/\{implode (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var s=n(t);if("undefined"==typeof s.from)throw new Error("Missing from attribute in implode-tag");if("undefined"==typeof s.item)throw new Error("Missing item attribute in implode-tag");return"undefined"==typeof s.glue&&(s.glue="', '"),s.from=s.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\nvar $implode_"+i+" = false;\nfor ($implodeKey_"+i+" in "+s.from+") {\n      v["+s.item+"] = "+s.from+"[$implodeKey_"+i+"];\n"+("undefined"!=typeof s.key?"          v["+s.key+"] = $implodeKey_"+i+";\n":"")+"      if ($implode_"+i+") $output += "+s.glue+";\n    $implode_"+i+" = true;\n        $output += '"}).replace(/\{foreach (.+?)\}/g,function(e,t){i++,t=t.replace(/\\\\/g,"\\").replace(/\\'/g,"'");var s=n(t);if("undefined"==typeof s.from)throw new Error("Missing from attribute in foreach-tag");if("undefined"==typeof s.item)throw new Error("Missing item attribute in foreach-tag");return s.from=s.from.replace(/\$([^.\[\(\)\]\s]+)/g,"(v.$1)"),"';\n$foreach_"+i+" = false;\nfor ($foreachKey_"+i+" in "+s.from+") {\n     $foreach_"+i+" = true;\n        break;\n}\nif ($foreach_"+i+") {\n      for ($foreachKey_"+i+" in "+s.from+") {\n               v["+s.item+"] = "+s.from+"[$foreachKey_"+i+"];\n"+("undefined"!=typeof s.key?"          v["+s.key+"] = $foreachKey_"+i+";\n":"")+"              $output += '"}).replace(/\{foreachelse\}/g,"';\n        }\n}\nelse {\n  {\n             $output += '").replace(/\{\/foreach\}/g,"';\n   }\n}\n$output += '").replace(/\{else\}/g,"';\n}\nelse {\n       $output += '").replace(/\{\/(if|implode)\}/g,"';\n}\n$output += '");for(var a in WCF.Template.callbacks)e=WCF.Template.callbacks[a](e);e=e.replace("{ldelim}","{").replace("{rdelim}","}"),t.each(function(t){e=e.replace(t.key,t.value)}),e="$output += '"+e+"';";try{this.fetch=new Function("v","v = window.$.extend({}, v, { __wcf: window.WCF, __window: window }); var $output = ''; "+e+" return $output;")}catch(t){throw console.debug("var $output = ''; "+e+" return $output;"),t}},fetch:function(){}}),WCF.Template.callbacks=[],WCF.ToggleOptions=Class.extend({_element:null,_showItems:[],_hideItems:[],
-_callback:null,init:function(e,t,i,n){this._element=$("#"+e),this._showItems=t,this._hideItems=i,void 0!==n&&(this._callback=n),this._element.click($.proxy(this._toggle,this)),this._toggle()},_toggle:function(){if(this._element.prop("checked")){for(var e=0,t=this._showItems.length;t>e;e++){var i=this._showItems[e];$("#"+i).show()}for(var e=0,t=this._hideItems.length;t>e;e++){var i=this._hideItems[e];$("#"+i).hide()}null!==this._callback&&this._callback()}}}),WCF.Collapsible={},WCF.Collapsible.Simple={init:function(){$(".jsCollapsible").each($.proxy(function(e,t){this._initButton(t)},this))},_initButton:function(e){var t=$(e),i=t.data("isOpen");i||$("#"+t.data("collapsibleContainer")).hide(),t.click($.proxy(this._toggle,this))},_toggle:function(e){var t=$(e.currentTarget),i=t.data("isOpen"),n=$("#"+$.wcfEscapeID(t.data("collapsibleContainer")));return i?(n.stop().wcfBlindOut("vertical",$.proxy(function(){this._toggleImage(t)},this)),i=!1):(n.stop().wcfBlindIn("vertical",$.proxy(function(){this._toggleImage(t)},this)),i=!0),t.data("isOpen",i),e.stopPropagation(),!1},_toggleImage:function(e){var t=e.find("span.icon");e.data("isOpen")?t.removeClass("icon-chevron-right").addClass("icon-chevron-down"):t.removeClass("icon-chevron-down").addClass("icon-chevron-right")}},WCF.Collapsible.Remote=Class.extend({_className:"",_containers:{},_containerData:{},_proxy:null,init:function(e){this._className=e,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Collapsible.Remote",$.proxy(this._init,this))},_init:function(){this._getContainers().each($.proxy(function(e,t){var i=$(t),n=i.wcfIdentify();void 0===this._containers[n]&&(this._containers[n]=i,this._initContainer(n))},this))},_initContainer:function(e){var t=this._getTarget(e),i=this._getButtonContainer(e),n=this._createButton(e,i);this._containerData[e]={button:n,buttonContainer:i,isOpen:this._containers[e].data("isOpen"),target:t},this._containers[e].data("isOpen")||$("#"+e).addClass("jsCollapsed")},_getContainers:function(){},_getTarget:function(){},_getButtonContainer:function(){},_createButton:function(e,t){var i=this._containers[e].data("isOpen"),n=$('<span class="collapsibleButton jsTooltip pointer icon icon16 icon-'+(i?"chevron-down":"chevron-right")+'" title="'+WCF.Language.get("wcf.global.button.collapsible")+'">').prependTo(t);return n.data("containerID",e).click($.proxy(this._toggleContainer,this)),n},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,s=n?"open":"close",a=n?"close":"open";this._proxy.setOption("data",{actionName:"loadContainer",className:this._className,interfaceName:"wcf\\data\\ILoadableContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:s,newState:a},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),$("#"+i).toggleClass("jsCollapsed")},_exchangeIcon:function(e,t){t=t||"spinner",e.removeClass("icon-chevron-down icon-chevron-right icon-spinner").addClass("icon-"+t)},_getObjectID:function(e){return $("#"+e).data("objectID")},_getAdditionalParameters:function(){return{}},_updateContent:function(e,t){this._containerData[e].target.html(t)},_success:function(e){if(e.returnValues.containerID){var t=e.returnValues.containerID;if(this._containers[t]){this._containerData[t].isOpen=e.returnValues.isOpen?!0:!1;var i=e.returnValues.isOpen?"open":"close";this._updateContent(t,$.trim(e.returnValues.content),i),this._exchangeIcon(this._containerData[t].button,e.returnValues.isOpen?"chevron-down":"chevron-right")}}}}),WCF.Collapsible.SimpleRemote=WCF.Collapsible.Remote.extend({init:function(e){this._super(e),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1})},_initContainer:function(e){this._super(e),this._containerData[e].isOpen||(this._containerData[e].target.hide(),this._exchangeIcon(this._containerData[e].button,"chevron-right"))},_toggleContainer:function(e){var t=$(e.currentTarget),i=t.data("containerID"),n=this._containerData[i].isOpen,s=n?"open":"close",a=n?"close":"open";this._proxy.setOption("data",{actionName:"toggleContainer",className:this._className,interfaceName:"wcf\\data\\IToggleContainerAction",objectIDs:[this._getObjectID(i)],parameters:$.extend(!0,{containerID:i,currentState:s,newState:a},this._getAdditionalParameters(i))}),this._proxy.sendRequest(),this._exchangeIcon(this._containerData[i].button,"open"===a?"chevron-down":"chevron-right"),"open"===a?this._containerData[i].target.show():this._containerData[i].target.hide(),$("#"+i).toggleClass("jsCollapsed"),this._containerData[i].isOpen="open"===a?!0:!1}}),WCF.User={userID:0,username:"",init:function(e,t){this.userID=e,this.username=t}},WCF.Effect={},WCF.Effect.Scroll=Class.extend({scrollTo:function(e,t,i){if(!e.length)return!0;var n=e.getOffsets("offset").top,s=$(document).height(),a=$(window).height();return n>s-a&&(n=s-a,0>n&&(n=0)),i===!0?$("html,body").scrollTop(n):$("html,body").animate({scrollTop:n},400,function(e,t,i,n,s){return-n*((t=t/s-1)*t*t*t-1)+i}),!1}}),WCF.Effect.SmoothScroll=WCF.Effect.Scroll.extend({init:function(){var e=this;$(document).on("click","a[href$=#top],a[href$=#bottom]",function(){var t=$(this.hash);return e.scrollTo(t,!0),!1})}}),WCF.CloseOverlayHandler={addCallback:function(e,t){require(["Ui/CloseOverlay"],function(i){i.add(e,t)})},removeCallback:function(e){require(["Ui/CloseOverlay"],function(t){t.remove(e)})},forceExecution:function(){require(["Ui/CloseOverlay"],function(e){e.execute()})}},WCF.DOMNodeInsertedHandler={addCallback:function(e,t){require(["WoltLab/WCF/Dom/Change/Listener"],function(e){e.add("__legacy__",t)})},_executeCallbacks:function(){require(["WoltLab/WCF/Dom/Change/Listener"],function(e){e.trigger()})},execute:function(){this._executeCallbacks()}},WCF.DOMNodeRemovedHandler={_callbacks:new WCF.Dictionary,_isExecuting:!1,_isListening:!1,addCallback:function(e,t){return this._bindListener(),this._callbacks.isset(e)?(console.debug("[WCF.DOMNodeRemovedHandler] identifier '"+e+"' is already bound to a callback"),!1):void this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){if(window.MutationObserver){var e=new MutationObserver(function(e){var t=!1;e.forEach(function(e){e.removedNodes.length&&(t=!0)}.bind(this)),t&&this._executeCallbacks({})}.bind(this));e.observe(document.body,{childList:!0,subtree:!0})}else $(document).bind("DOMNodeRemoved",$.proxy(this._executeCallbacks,this));this._isListening=!0}},_executeCallbacks:function(e){this._isExecuting||(this._isExecuting=!0,this._callbacks.each(function(t){t.value(e)}),this._isExecuting=!1)}},WCF.Option={},WCF.Option.Handler=Class.extend({init:function(){this._initOptions(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Option.Handler",$.proxy(this._initOptions,this))},_initOptions:function(){$(".jsEnablesOptions").each($.proxy(this._initOption,this))},_initOption:function(e,t){this._change(t),$(t).change($.proxy(this._handleChange,this))},_handleChange:function(e){this._change($(e.target))},_change:function(option){option=$(option);var $disableOptions=eval(option.data("disableOptions")),$enableOptions=eval(option.data("enableOptions"));switch(option.getTagName()){case"input":switch(option.attr("type")){case"checkbox":this._execute(option.prop("checked"),$disableOptions,$enableOptions);break;case"radio":if(option.prop("checked")){var isActive=!0;option.data("isBoolean")&&1!=option.val()&&(isActive=!1),this._execute(isActive,$disableOptions,$enableOptions)}}break;case"select":var $value=option.val(),$disableOptions=$enableOptions=[];if(option.data("disableOptions").length>0)for(var $index in option.data("disableOptions")){var $item=option.data("disableOptions")[$index];$item.value==$value&&$disableOptions.push($item.option)}if(option.data("enableOptions").length>0)for(var $index in option.data("enableOptions")){var $item=option.data("enableOptions")[$index];$item.value==$value&&$enableOptions.push($item.option)}this._execute(!0,$disableOptions,$enableOptions)}},_execute:function(e,t,i){if(t.length>0)for(var n=0,s=t.length;s>n;n++){var a=t[n];if($.wcfIsset(a))this._enableOption(a,!e);else{var o=$("."+a+"Input");o.length&&this._enableOptions(o.children("dd").find("input, select, textarea"),!e)}}if(i.length>0)for(var n=0,s=i.length;s>n;n++){var a=i[n];if($.wcfIsset(a))this._enableOption(a,e);else{var o=$("."+a+"Input");o.length&&this._enableOptions(o.children("dd").find("input, select, textarea"),e)}}},_enableOption:function(e,t){this._enableOptionElement($("#"+$.wcfEscapeID(e)),t)},_enableOptionElement:function(e,t){e=$(e);var i=e.getTagName();"select"==i||"input"==i&&("checkbox"==e.attr("type")||"file"==e.attr("type")||"radio"==e.attr("type"))?t?e.enable():e.disable():t?e.removeAttr("readonly"):e.attr("readonly",!0),t?e.closest("dl").removeClass("disabled"):e.closest("dl").addClass("disabled")},_enableOptions:function(e,t){for(var i=0,n=e.length;n>i;i++)this._enableOptionElement(e[i],t)}}),WCF.PageVisibilityHandler={_callbacks:new WCF.Dictionary,_isListening:!1,_hiddenFieldName:"",addCallback:function(e,t){return this._bindListener(),this._callbacks.isset(e)?(console.debug("[WCF.PageVisibilityHandler] identifier '"+e+"' is already bound to a callback"),!1):void this._callbacks.add(e,t)},removeCallback:function(e){this._callbacks.isset(e)&&this._callbacks.remove(e)},_bindListener:function(){if(!this._isListening){var e=null;"undefined"!=typeof document.hidden?(this._hiddenFieldName="hidden",e="visibilitychange"):"undefined"!=typeof document.mozHidden?(this._hiddenFieldName="mozHidden",e="mozvisibilitychange"):"undefined"!=typeof document.msHidden?(this._hiddenFieldName="msHidden",e="msvisibilitychange"):"undefined"!=typeof document.webkitHidden&&(this._hiddenFieldName="webkitHidden",e="webkitvisibilitychange"),null===e?console.debug("[WCF.PageVisibilityHandler] This browser does not support the page visibility API."):$(document).on(e,$.proxy(this._executeCallbacks,this)),this._isListening=!0}},_executeCallbacks:function(){if(!this._isExecuting){this._isExecuting=!0;var e=document[this._hiddenFieldName];this._callbacks.each(function(t){t.value(e)}),this._isExecuting=!1}}},WCF.Table={},WCF.Table.EmptyTableHandler=Class.extend({_options:{},_rowClassName:"",init:function(e,t,i){this._rowClassName=t,this._tableContainer=e,this._options=$.extend(!0,{emptyMessage:null,messageType:"info",refreshPage:!1,updatePageNumber:!1},i||{}),WCF.DOMNodeRemovedHandler.addCallback("WCF.Table.EmptyTableHandler."+t,$.proxy(this._remove,this))},_getRowCount:function(){return this._tableContainer.find("table tr."+this._rowClassName).length},_handleEmptyTable:function(){if(this._options.emptyMessage)this._tableContainer.replaceWith($("<p />").addClass(this._options.messageType).text(this._options.emptyMessage));else if(this._options.refreshPage)if(this._options.updatePageNumber){var e=window.location.href.match(/(\?|&)pageNo=(\d+)/g);if(e){var t=e[e.length-1].match(/\d+/g);this._options.updatePageNumber>0?t++:t--,window.location=window.location.href.replace(e[e.length-1],e[e.length-1][0]+"pageNo="+t)}}else window.location.reload();else this._tableContainer.remove()},_remove:function(e){if($.getLength(e)){var t=$(e.target);if(t.hasClass(this._rowClassName)){var i=t.parents("tbody:eq(0)");1==i.children("tr").length&&this._handleEmptyTable()}}else this._getRowCount()||this._handleEmptyTable()}}),WCF.Search={},WCF.Search.Base=Class.extend({_callback:null,_caretAt:-1,_className:"",_commaSeperated:!1,_delay:0,_excludedSearchValues:[],_itemCount:0,_itemIndex:-1,_list:null,_oldSearchString:[],_proxy:null,_searchInput:null,_triggerLength:3,_timer:null,init:function(e,t,i,n,s){return null===t||void 0===t||$.isFunction(t)?(this._callback=t?t:null,this._caretAt=-1,this._delay=0,this._excludedSearchValues=[],i&&(this._excludedSearchValues=i),this._searchInput=$(e),this._searchInput.length?(this._searchInput.keydown($.proxy(this._keyDown,this)).keyup($.proxy(this._keyUp,this)).wrap('<span class="dropdown" />'),$.browser.mozilla&&$.browser.touch&&this._searchInput.on("input",$.proxy(this._keyUp,this)),this._list=$('<ul class="dropdownMenu" />').insertAfter(this._searchInput),this._commaSeperated=n?!0:!1,this._oldSearchString=[],this._itemCount=0,this._itemIndex=-1,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:s!==!0?!1:!0,success:$.proxy(this._success,this),autoAbortPrevious:!0}),this._searchInput.is("input")&&this._searchInput.attr("autocomplete","off"),this._searchInput.blur($.proxy(this._blur,this)),void WCF.Dropdown.initDropdownFragment(this._searchInput.parent(),this._list)):void console.debug("[WCF.Search.Base] Selector '"+e+"' for search input is invalid, aborting.")):void console.debug("[WCF.Search.Base] The given callback is invalid, aborting.")},_blur:function(){var e=this;new WCF.PeriodicalExecuter(function(t){e._list.is(":visible")&&e._clearList(!1),t.stop()},250)},_keyDown:function(e){if(e.which===$.ui.keyCode.ENTER){var t=this._searchInput.parents(".dropdown");t.data("disableAutoFocus")?-1!==this._itemIndex&&e.preventDefault():(t.data("preventSubmit")||-1!==this._itemIndex)&&e.preventDefault()}},_keyUp:function(e){switch(e.which){case 37:case 39:return;case 38:return void this._selectPreviousItem();case 40:return void this._selectNextItem();case 13:return this._selectElement(e)}var t=this._getSearchString(e);if(""===t)this._clearList(!1);else if(t.length>=this._triggerLength){var i={data:{excludedSearchValues:this._excludedSearchValues,searchString:t}};if(this._delay){null!==this._timer&&this._timer.stop();var n=this;this._timer=new WCF.PeriodicalExecuter(function(){n._queryServer(i),n._timer.stop(),n._timer=null},this._delay)}else this._queryServer(i)}else this._clearList(!1)},_queryServer:function(e){this._searchInput.parents(".searchBar").addClass("loading"),this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters(e)}),this._proxy.sendRequest()},setDelay:function(e){this._delay=e},_selectNextItem:function(){0!==this._itemCount&&(this._itemIndex++,this._itemIndex===this._itemCount&&(this._itemIndex=0),this._highlightSelectedElement())},_selectPreviousItem:function(){0!==this._itemCount&&(this._itemIndex--,-1===this._itemIndex&&(this._itemIndex=this._itemCount-1),this._highlightSelectedElement())},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:eq("+this._itemIndex+")").addClass("dropdownNavigationItem")},_selectElement:function(){return 0===this._itemCount?!0:(this._list.find("li.dropdownNavigationItem").trigger("click"),!1)},_getSearchString:function(e){var t=$.trim(this._searchInput.val());if(this._commaSeperated){var i=e.keyCode||e.which;if(i==$.ui.keyCode.COMMA)return"";for(var n=t.split(","),s=n.length,a=0;s>a;a++)n[a]=$.trim(n[a]);for(var a=0;s>a;a++){var o=n[a];if(!this._oldSearchString[a]){t=o;break}if(o!=this._oldSearchString[a]){t=o,this._caretAt=a;break}}this._oldSearchString=n}return t},_getParameters:function(e){return e},_success:function(e){if(this._clearList(!1),this._searchInput.parents(".searchBar").removeClass("loading"),$.getLength(e.returnValues))for(var t in e.returnValues){var i=e.returnValues[t];this._createListItem(i)}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var n=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(n).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(n),this._itemIndex=-1,WCF.Dropdown.getDropdown(n).data("disableAutoFocus")||this._selectNextItem()},_handleEmptyResult:function(){return!1},_createListItem:function(e){var t=$("<li><span>"+WCF.String.escapeHTML(e.label)+"</span></li>").appendTo(this._list);return t.data("objectID",e.objectID).data("label",e.label).click($.proxy(this._executeCallback,this)),this._itemCount++,t},_executeCallback:function(e){var t=!1,i=$(e.currentTarget);if(this._commaSeperated){var n=i.data("label");this._oldSearchString[this._caretAt]=n,this._searchInput.val(this._oldSearchString.join(", ")),$.browser.webkit&&this._searchInput.css({display:"block"});var s=this._searchInput.val().toLowerCase().indexOf(n.toLowerCase())+n.length;this._searchInput.focus().setCaret(s)}else null===this._callback?this._searchInput.val(i.data("label")):t=this._callback(i.data())===!0?!0:!1;this._clearList(t)},_clearList:function(e){e&&!this._commaSeperated&&this._searchInput.val(""),WCF.Dropdown.getDropdown(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()).removeClass("dropdownOpen"),this._list.end().empty(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1},addExcludedSearchValue:function(e){WCF.inArray(e,this._excludedSearchValues)||this._excludedSearchValues.push(e)},removeExcludedSearchValue:function(e){var t=$.inArray(e,this._excludedSearchValues);-1!=t&&this._excludedSearchValues.splice(t,1)}}),WCF.Search.User=WCF.Search.Base.extend({_className:"wcf\\data\\user\\UserAction",_includeUserGroups:!1,init:function(e,t,i,n,s){this._includeUserGroups=i,this._super(e,t,n,s)},_getParameters:function(e){return e.data.includeUserGroups=this._includeUserGroups?1:0,e},_createListItem:function(e){var t=this._super(e),i=null;if(e.icon?i=$(e.icon):this._includeUserGroups&&"group"===e.type&&(i=$('<span class="icon icon16 icon-group" />')),i){var n=t.find("span").detach(),s=$("<div />").addClass("box16").appendTo(t);s.append(i),s.append($("<div />").append(n))}return t.data("type",e.type),t}}),WCF.System={},WCF.System.Dependency={},WCF.System.Dependency.Manager={_callbacks:{},_loaded:[],_setupCallbacks:{},register:function(e,t){return $.isFunction(t)?void(WCF.inArray(e,this._loaded)?setTimeout(function(){t()},1):(this._callbacks[e]||(this._callbacks[e]=[]),this._callbacks[e].push(t))):void console.debug("[WCF.System.Dependency.Manager] Callback for identifier '"+e+"' is invalid, aborting.")},setup:function(e,t){return $.isFunction(t)?(this._setupCallbacks[e]||(this._setupCallbacks[e]=[]),void this._setupCallbacks[e].push(t)):void console.debug("[WCF.System.Dependency.Manager] Setup callback for identifier '"+e+"' is invalid, aborting.")},invoke:function(e){if(this._setupCallbacks[e]){for(var t=0,i=this._setupCallbacks[e].length;i>t;t++)this._setupCallbacks[e][t]();delete this._setupCallbacks[e]}if(this._loaded.push(e),this._callbacks[e]){for(var t=0,i=this._callbacks[e].length;i>t;t++)this._callbacks[e][t]();delete this._callbacks[e]}}},WCF.System.FlexibleMenu={init:function(){},registerMenu:function(e){require(["WoltLab/WCF/Ui/FlexibleMenu"],function(t){t.register(e)})},rebuild:function(e){require(["WoltLab/WCF/Ui/FlexibleMenu"],function(t){t.rebuild(e)})}},WCF.System.Mobile={},WCF.System.ObjectStore={_objects:{},add:function(e,t){void 0===this._objects[e]&&(this._objects[e]=[]),this._objects[e].push(t)},invoke:function(e,t){if(this._objects[e])for(var i=0;i<this._objects[e].length;i++)t(this._objects[e][i])}},WCF.System.Captcha={_captchas:{},addCallback:function(e,t){return $.isFunction(t)?void(this._captchas[e]=t):void console.debug("[WCF.System.Captcha] Given callback is no function")},getData:function(e){return void 0===this._captchas[e]?void console.debug('[WCF.System.Captcha] Unknow captcha id "'+e+'"'):this._captchas[e]()},removeCallback:function(e){delete this._captchas[e]}},WCF.System.Page={},WCF.System.Page.Multiple=Class.extend({_cache:{},_options:{},_pageNo:1,_pages:0,_previousPageNo:0,init:function(e){this._options=$.extend({container:null,pagination:null,loadItems:null},e),this._cache={},this._pageNo=1,this._pages=0,this._previousPageNo=0,this._pagination.data("pages")&&this._pagination.wcfPages({maxPage:this._pagination.data("pages")}).on("wcfpagesswitched",$.proxy(this._showPage,this))},_showPage:function(e,t){t&&t.activePage&&(t.template||(this._previousPageNo=this._pageNo),this._pageNo=t.activePage),this._cache[this._pageNo]||t&&t.template?(this._cache[this._previousPageNo]=this._list.children().detach(),t&&t.template?this._list.html(t.template):this._list.append(this._cache[this._pageNo])):this._options.loadItems()},showPage:function(e,t){this._showPage(null,{activePage:e,template:t})},getPageNo:function(){return this._pageNo}}),WCF.System.Notification=Class.extend({_callback:null,_cssClassNames:"",_message:"",_overlay:null,_timer:null,init:function(e,t){this._cssClassNames=t||"success",this._message=e||WCF.Language.get("wcf.global.success"),this._overlay=$("#systemNotification"),this._timer=null,this._overlay.length||(this._overlay=$('<div id="systemNotification"><p></p></div>').hide().appendTo(document.body),this._overlay.children("p").click(function(){this._hide()}.bind(this)))},show:function(e,t,i,n){t=parseInt(t),t||(t=2e3),e&&$.isFunction(e)&&(this._callback=e),this._overlay.children("p").html(i||this._message),this._overlay.children("p").removeClass().addClass(n||this._cssClassNames),this._timer=new WCF.PeriodicalExecuter($.proxy(this._hide,this),t),this._overlay.wcfFadeIn(void 0,300)},_hide:function(e){e=e?e:this._timer,null!==this._callback&&this._callback(),this._overlay.wcfFadeOut(void 0,300),e.stop(),e=null}}),WCF.System.Confirmation={show:function(e,t,i,n){require(["Ui/Confirmation"],function(s){s.show({legacyCallback:t,message:e,parameters:i,template:"object"==typeof n?n.html():""})})}},WCF.System.DisableScrolling={_depth:0,_oldOverflow:null,disable:function(){$.browser.touch||(0===this._depth&&(this._oldOverflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden")),this._depth++)},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$(document.body).css("overflow",this._oldOverflow))}},WCF.System.DisableZoom={_depth:0,_oldViewportSettings:null,disable:function(){if(0===this._depth){var e=$("meta[name=viewport]");this._oldViewportSettings=e.attr("content"),e.attr("content",this._oldViewportSettings+",maximum-scale=1")}this._depth++},enable:function(){0!==this._depth&&(this._depth--,0===this._depth&&$("meta[name=viewport]").attr("content",this._oldViewportSettings))}},WCF.System.Fullscreen={enterFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)},toggleFullscreen:function(e){null===this.getFullscreenElement()?this.enterFullscreen(e):this.exitFullscreen()},getFullscreenElement:function(){return document.fullscreenElement?document.fullscreenElement:document.mozFullScreenElement?document.mozFullScreenElement:document.webkitFullscreenElement?document.webkitFullscreenElement:document.msFullscreenElement?document.msFullscreenElement:null},exitFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()},isSupported:function(){return document.documentElement.requestFullscreen||document.documentElement.msRequestFullscreen||document.documentElement.mozRequestFullScreen||document.documentElement.webkitRequestFullscreen?!0:!1}},WCF.System.PageNavigation={_button:null,_description:null,_dialog:null,_elementID:"",_elements:{},_pageNo:null,init:function(e,t){var i=$(e);if(i.length)return t=t||null,null===t||$.isFunction(t)?void this._initElements(i,t):void console.debug("[WCF.System.PageNavigation] Callback for selector '"+e+"' is invalid, aborting.")},_initElements:function(e,t){var i=this;e.each(function(e,t){var n=$(t),s=n.wcfIdentify();void 0===i._elements[s]&&(i._elements[s]=n,n.find("li.jumpTo").data("elementID",s).click($.proxy(i._click,i)))}).data("callback",t)},_click:function(e){if(this._elementID=$(e.currentTarget).data("elementID"),null===this._dialog){this._dialog=$('<div id="pageNavigationOverlay" />').hide().appendTo(document.body);var t=$("<fieldset><legend>"+WCF.Language.get("wcf.global.page.jumpTo")+"</legend></fieldset>").appendTo(this._dialog);$('<dl><dt><label for="jsPageNavigationPageNo">'+WCF.Language.get("wcf.global.page.jumpTo")+"</label></dt><dd></dd></dl>").appendTo(t),this._pageNo=$('<input type="number" id="jsPageNavigationPageNo" value="1" min="1" max="1" class="tiny" />').keyup($.proxy(this._keyUp,this)).appendTo(t.find("dd")),this._description=$("<small></small>").insertAfter(this._pageNo);var i=$('<div class="formSubmit" />').appendTo(this._dialog);this._button=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.submit")+"</button>").click($.proxy(this._submit,this)).appendTo(i)}this._button.enable(),this._description.html(WCF.Language.get("wcf.global.page.jumpTo.description").replace(/#pages#/,this._elements[this._elementID].data("pages"))),this._pageNo.val(this._elements[this._elementID].data("pages")).attr("max",this._elements[this._elementID].data("pages")),this._dialog.wcfDialog({title:WCF.Language.get("wcf.global.page.pageNavigation")})},_keyUp:function(e){if(e.which==$.ui.keyCode.ENTER&&!this._button.prop("disabled"))return void this._submit();var t=parseInt(this._pageNo.val())||0;1>t||t>this._pageNo.attr("max")?this._button.disable():this._button.enable()},_submit:function(){var e=this._elements[this._elementID];if(null===e.data("callback")){var t=e.data("link").replace(/pageNo=%d/,"pageNo="+this._pageNo.val());window.location=t}else e.data("callback")(this._pageNo.val()),this._dialog.wcfDialog("close")}},WCF.System.KeepAlive=Class.extend({init:function(e){new WCF.PeriodicalExecuter(function(e){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"keepAlive",className:"wcf\\data\\session\\SessionAction"},failure:function(){e.stop()},showLoadingOverlay:!1,success:function(e){WCF.System.PushNotification.executeCallbacks(e)},suppressErrors:!0})},1e3*e)}}),WCF.System.PushNotification={_callbacks:{},addCallback:function(e,t){void 0===this._callbacks[e]&&(this._callbacks[e]=[]),this._callbacks[e].push(t)},executeCallbacks:function(e){for(var t in e.returnValues)if(void 0!==this._callbacks[t])for(var i=0;i<this._callbacks[t].length;i++)this._callbacks[t][i](e.returnValues[t])}},WCF.System.Event={_listeners:{},addListener:function(e,t,i){"undefined"==typeof this._listeners[e]&&(this._listeners[e]={}),"undefined"==typeof this._listeners[e][t]&&(this._listeners[e][t]=[]);var n=WCF.getUUID();return this._listeners[e][t].push({callback:i,uuid:n}),n},removeListener:function(e,t,i){if(this._listeners[e]&&this._listeners[e][t])for(var n=0;n<this._listeners[e][t].length;n++)if(this._listeners[e][t][n].uuid==i)return this._listeners[e][t].splice(n,1),!0;return!1},removeAllListeners:function(e,t){return this._listeners[e]&&this._listeners[e][t]?(delete this._listeners[e][t],!0):!1},fireEvent:function(e,t,i){if(i=i||{},this._listeners[e]&&this._listeners[e][t])for(var n=0;n<this._listeners[e][t].length;n++)this._listeners[e][t][n].callback(i)}},WCF.System.Worker=Class.extend({_aborted:!1,_actionName:"",_callback:null,_className:"",_dialog:null,_proxy:null,_title:"",init:function(e,t,i,n,s){this._aborted=!1,this._actionName=e,this._callback=s||null,this._className=t,this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{actionName:this._actionName,className:this._className,parameters:n||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._title=i},_success:function(e){if(null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.worker.abort.confirmMessage"),closeViaModal:!1,onClose:$.proxy(function(){this._aborted=!0,this._proxy.abortPrevious(),window.location.reload()},this),title:this._title})),!this._aborted)if(e.returnValues.template&&this._dialog.html(e.returnValues.template),this._dialog.find("progress").attr("value",e.returnValues.progress).text(e.returnValues.progress+"%").next("span").text(e.returnValues.progress+"%"),e.returnValues.progress<100){var t=e.returnValues.parameters||{};t.loopCount=e.returnValues.loopCount,this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:t}),this._proxy.sendRequest()}else if(null!==this._callback)this._callback(this,e);else{this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check green"),this._dialog.find(".boxHeadline h1").text(WCF.Language.get("wcf.global.worker.completed"));var i=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(i).focus().click(function(){e.returnValues.redirectURL?window.location=e.returnValues.redirectURL:window.location.reload()}),this._dialog.wcfDialog("render")}}}),WCF.InlineEditor=Class.extend({_callbacks:[],_dropdowns:{},_elements:{},_notification:null,_options:[],_proxy:null,_triggerElements:{},_updateData:[],init:function(e){var t=$(e);if(t.length){this._setOptions();for(var i="",n=0,s=this._options.length;s>n;n++)if(this._options[n].isQuickOption){i=this._options[n].optionName;break}var a=this;t.each(function(e,t){var n=$(t),s=n.wcfIdentify(),o=a._getTriggerElement(n);null!==o&&1===o.length&&(o.click($.proxy(a._show,a)).data("elementID",s),i&&o.disableSelection().data("optionName",i).dblclick($.proxy(a._click,a)),a._elements[s]=n)}),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),WCF.CloseOverlayHandler.addCallback("WCF.InlineEditor",$.proxy(this._closeAll,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")}},_closeAll:function(){for(var e in this._elements)this._hide(e)},_setOptions:function(){this._options=[]},registerCallback:function(e){$.isFunction(e)&&this._callbacks.push(e)},_getTriggerElement:function(){return null},_show:function(e){e.preventDefault();var t=$(e.currentTarget).data("elementID"),i=null;this._dropdowns[t]||(this._triggerElements[t]=i=this._getTriggerElement(this._elements[t]).addClass("dropdownToggle").wrap('<span class="dropdown" />'),this._dropdowns[t]=$('<ul class="dropdownMenu" />').insertAfter(i)),this._dropdowns[t].empty();for(var n=!1,s="",a=0,o=this._options.length;o>a;a++){var r=this._options[a];if("divider"===r.optionName)""!==s&&"divider"!==s&&($('<li class="dropdownDivider" />').appendTo(this._dropdowns[t]),s=r.optionName);else if(this._validate(t,r.optionName)||this._validateCallbacks(t,r.optionName)){var l=$("<li><span>"+r.label+"</span></li>").appendTo(this._dropdowns[t]);l.data("elementID",t).data("optionName",r.optionName).data("isQuickOption",r.isQuickOption?!0:!1).click($.proxy(this._click,this)),n=!0,s=r.optionName}}if(n){var c=this._dropdowns[t].children().last();c.hasClass("dropdownDivider")&&c.remove();var h=null,d=0;if(this._dropdowns[t].children().each(function(e,t){var i=$(t);i.hasClass("dropdownDivider")||(i.data("isQuickOption")?h=i:d++)}),!d)return h.trigger("click"),this._triggerElements[t]&&WCF.Dropdown.close(this._triggerElements[t].parents(".dropdown").wcfIdentify()),!1}return null!==i&&WCF.Dropdown.initDropdown(i,!0),!1},_validate:function(){return!1},_validateCallbacks:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;i>n;n++)if(this._callbacks[n].validate(this._elements[e],t))return!0;return!1},_success:function(e){var t=this._updateData.length;t&&(this._updateState(e),this._updateData=[])},_updateState:function(){},_click:function(e){var t=$(e.currentTarget),i=t.data("elementID"),n=t.data("optionName");this._execute(i,n)||this._executeCallback(i,n),this._hide(i)},_execute:function(){return!1},_executeCallback:function(e,t){var i=this._callbacks.length;if(i)for(var n=0;i>n;n++)if(this._callbacks[n].execute(this._elements[e],t))return!0;return!1;
-
-},_hide:function(e){this._dropdowns[e]&&this._dropdowns[e].empty().removeClass("dropdownOpen")}}),WCF.Upload=Class.extend({_name:"__files[]",_buttonSelector:null,_fileListSelector:null,_fileUpload:null,_className:"",_iframe:null,_internalFileID:0,_options:{},_uploadMatrix:[],_supportsAJAXUpload:!0,_overlay:null,init:function(e,t,i,n){this._buttonSelector=e,this._fileListSelector=t,this._className=i,this._internalFileID=0,this._options=$.extend(!0,{action:"upload",multiple:!1,url:"index.php/AJAXUpload/?t="+SECURITY_TOKEN+SID_ARG_2ND},n||{}),this._options.url=WCF.convertLegacyURL(this._options.url);var s=new XMLHttpRequest;this._supportsAJAXUpload=s&&"upload"in s&&"onprogress"in s.upload,this._createButton()},_createButton:function(){if(this._supportsAJAXUpload){this._fileUpload=$('<input type="file" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/>"),this._fileUpload.change($.proxy(this._upload,this));var e=$('<p class="button uploadButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>");e.prepend(this._fileUpload)}else{var e=$('<p class="button uploadFallbackButton"><span>'+WCF.Language.get("wcf.global.button.upload")+"</span></p>");e.click($.proxy(this._showOverlay,this))}this._insertButton(e)},_insertButton:function(e){this._buttonSelector.prepend(e)},_removeButton:function(){var e=".uploadButton";this._supportsAJAXUpload||(e=".uploadFallbackButton"),this._buttonSelector.find(e).remove()},_upload:function(e,t,i){var n=null,s=[];if(t)s.push(t);else if(i){var a="";switch(i.type){case"image/png":a=".png";break;case"image/jpeg":a=".jpg";break;case"image/gif":a=".gif"}s.push({name:"pasted-from-clipboard"+a})}else s=this._fileUpload.prop("files");if(s.length){var o=new FormData;if(n=this._createUploadMatrix(s),!this._uploadMatrix[n].length)return null;for(var r=0,l=s.length;l>r;r++)if(this._uploadMatrix[n][r]){var c=this._uploadMatrix[n][r].data("internalFileID");i?o.append("__files["+c+"]",i,s[r].name):o.append("__files["+c+"]",s[r])}o.append("actionName",this._options.action),o.append("className",this._className);var h=this._getParameters();for(var d in h)o.append("parameters["+d+"]",h[d]);var u=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:o,contentType:!1,processData:!1,success:function(e){u._success(n,e)},error:$.proxy(this._error,this),xhr:function(){var e=$.ajaxSettings.xhr();return e&&e.upload.addEventListener("progress",function(e){u._progress(n,e)},!1),e}})}return n},_createUploadMatrix:function(e){if(e.length){var t=this._uploadMatrix.length;this._uploadMatrix[t]=[];for(var i=0,n=e.length;n>i;i++){var s=e[i],a=this._initFile(s);a.hasClass("uploadFailed")||(a.data("filename",s.name).data("internalFileID",this._internalFileID++),this._uploadMatrix[t][i]=a)}return t}return null},_success:function(){},_error:function(){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);for(var n in this._uploadMatrix[e])this._uploadMatrix[e][n].find("progress").attr("value",i)},_getParameters:function(){return{}},_initFile:function(e){return $("<li>"+e.name+" ("+e.size+')<progress max="100" /></li>').appendTo(this._fileListSelector)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix([e]),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)},_getFilename:function(){return $("#__fileUpload").val().split("\\").pop()}}),WCF.Upload.Parallel=WCF.Upload.extend({init:function(e,t,i,n){n=$.extend(!0,n||{},{multiple:!0}),this._super(e,t,i,n)},_upload:function(){for(var e=this._fileUpload.prop("files"),t=0,i=e.length;i>t;t++){var n=e[t],s=new FormData,a=this._createUploadMatrix(n);if(this._uploadMatrix[a].length){s.append("__files["+a+"]",n),s.append("actionName",this._options.action),s.append("className",this._className);var o=this._getParameters();for(var r in o)s.append("parameters["+r+"]",o[r]);this._sendRequest(a,s)}}},_sendRequest:function(e,t){var i=this;$.ajax({type:"POST",url:this._options.url,enctype:"multipart/form-data",data:t,contentType:!1,processData:!1,success:function(t){i._success(e,t)},error:$.proxy(this._error,this),xhr:function(){var t=$.ajaxSettings.xhr();return t&&t.upload.addEventListener("progress",function(t){i._progress(e,t)},!1),t}})},_createUploadMatrix:function(e){var t=this._initFile(e);return t.hasClass("uploadFailed")?null:(t.data("filename",e.name).data("internalFileID",this._internalFileID),this._uploadMatrix[this._internalFileID++]=t,this._internalFileID-1)},_success:function(){},_progress:function(e,t){var i=Math.round(100*t.loaded/t.total);this._uploadMatrix[e].find("progress").attr("value",i)},_showOverlay:function(){if(null===this._iframe&&(this._iframe=$('<iframe name="__fileUploadIFrame" />').hide().appendTo(document.body)),!this._overlay){this._overlay=$('<div><form enctype="multipart/form-data" method="post" action="'+this._options.url+'" target="__fileUploadIFrame" /></div>').hide().appendTo(document.body);var e=this._overlay.find("form");$('<dl class="wide"><dd><input type="file" id="__fileUpload" name="'+this._name+'" '+(this._options.multiple?'multiple="true" ':"")+"/></dd></dl>").appendTo(e),$('<div class="formSubmit"><input type="submit" value="Upload" accesskey="s" /></div></form>').appendTo(e),$('<input type="hidden" name="isFallback" value="1" />').appendTo(e),$('<input type="hidden" name="actionName" value="'+this._options.action+'" />').appendTo(e),$('<input type="hidden" name="className" value="'+this._className+'" />').appendTo(e);var t=this._getParameters();for(var i in t)$('<input type="hidden" name="'+i+'" value="'+t[i]+'" />').appendTo(e);e.submit($.proxy(function(){var e={name:this._getFilename(),size:""},t=this._createUploadMatrix(e),i=this;this._iframe.data("loading",!0).off("load").load(function(){i._evaluateResponse(t)}),this._overlay.wcfDialog("close")},this))}this._overlay.wcfDialog({title:WCF.Language.get("wcf.global.button.upload")})},_evaluateResponse:function(e){var t=$.parseJSON(this._iframe.contents().find("pre").html());this._success(e,t)}}),WCF.Sortable={},WCF.Sortable.List=Class.extend({_additionalParameters:{},_className:"",_containerID:"",_container:null,_notification:null,_offset:0,_options:{},_proxy:null,_structure:{},init:function(e,t,i,n,s,a){if(this._additionalParameters=a||{},this._containerID=$.wcfEscapeID(e),this._container=$("#"+this._containerID),this._className=t,this._offset=i?i:0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._structure={},this._options=$.extend(!0,{axis:"y",connectWith:"#"+this._containerID+" .sortableList",disableNesting:"sortableNoNesting",doNotClear:!0,errorClass:"sortableInvalidTarget",forcePlaceholderSize:!0,helper:"clone",items:"li:not(.sortableNoSorting)",opacity:.6,placeholder:"sortablePlaceholder",tolerance:"pointer",toleranceElement:"> span"},n||{}),s?$("#"+this._containerID+" .sortableList").sortable(this._options):$("#"+this._containerID+" > .sortableList").nestedSortable(this._options),this._className){var o=this._container.find(".formSubmit");if(!o.length&&(o=this._container.next(".formSubmit"),!o.length))return void console.debug("[WCF.Sortable.Simple] Unable to find form submit for saving, aborting.");o.children('button[data-type="submit"]').click($.proxy(this._submit,this))}},_submit:function(){this._structure={},this._container.find(".sortableList").each($.proxy(function(e,t){var i=$(t),n=i.data("objectID");void 0!==n&&i.children(this._options.items).each($.proxy(function(e,t){var i=$(t).data("objectID");this._structure[n]||(this._structure[n]=[]),this._structure[n].push(i)},this))},this));var e=$.extend(!0,{data:{offset:this._offset,structure:this._structure}},this._additionalParameters);this._proxy.setOption("data",{actionName:"updatePosition",className:this._className,interfaceName:"wcf\\data\\ISortableAction",parameters:e}),this._proxy.sendRequest()},_success:function(){null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show()}}),WCF.Popover=Class.extend({_activeElementID:"",_identifier:"",_popoverObj:null,init:function(e){$.browser.mobile||(this._activeElementID="",this._identifier=e,require(["WoltLab/WCF/Controller/Popover"],function(t){t.init({attributeName:"legacy",className:e,identifier:this._identifier,legacy:!0,loadCallback:this._legacyLoad.bind(this)})}.bind(this)))},_initContainers:function(){},_legacyLoad:function(e,t){this._activeElementID=e,this._popoverObj=t,this._loadContent()},_insertContent:function(e,t){this._popoverObj.setContent(this._identifier,e,t)}}),WCF.EditableItemList=Class.extend({_allowCustomInput:!1,_className:"",_data:{},_form:null,_itemList:null,_objectID:0,_objectTypeID:0,_search:null,_searchInput:null,init:function(e,t){if(this._itemList=$(e),this._searchInput=$(t),this._data={},!this._itemList.length||!this._searchInput.length)return void console.debug("[WCF.EditableItemList] Item list and/or search input do not exist, aborting.");if(this._objectID=this._getObjectID(),this._objectTypeID=this._getObjectTypeID(),this._itemList.find(".jsEditableItem").click($.proxy(this._click,this)),this._itemList.children("ul").length||$("<ul />").appendTo(this._itemList),this._itemList=this._itemList.children("ul"),this._form=this._itemList.parents("form").submit($.proxy(this._submit,this)),this._allowCustomInput){var i=this;this._searchInput.keydown($.proxy(this._keyDown,this)).keypress($.proxy(this._keyPress,this)).on("paste",function(){setTimeout(function(){i._onPaste()},100)})}this._searchInput.parents(".dropdown").data("preventSubmit",!0)},_keyDown:function(e){return null===e?this._keyPress(null):!0},_keyPress:function(e){if(null===e||44===e.charCode||e.charCode===$.ui.keyCode.ENTER||$.browser.mozilla&&e.keyCode===$.ui.keyCode.ENTER){if(null!==e&&e.charCode===$.ui.keyCode.ENTER&&this._search&&-1!==this._search._itemIndex)return!1;var t=$.trim(this._searchInput.val());return e&&44===e.charCode&&(t=t.substring(0,this._searchInput.getCaret())),""===t?!0:(this.addItem({objectID:0,label:t}),this._searchInput.val(e&&44===e.charCode?$.trim(this._searchInput.val().substr(this._searchInput.getCaret())):""),null!==e&&e.stopPropagation(),!1)}return!0},_onPaste:function(){var e=$.trim(this._searchInput.val());e=e.split(",");for(var t=0,i=e.length;i>t;t++){var n=$.trim(e[t]);""!==n&&this.addItem({objectID:0,label:n})}this._searchInput.val("")},load:function(){},_click:function(e){var t=$(e.currentTarget),i=t.data("objectID"),n=t.data("label");return this._search&&this._search.removeExcludedSearchValue(n),this._removeItem(i,n),t.remove(),e.stopPropagation(),!1},_getObjectID:function(){return 0},_getObjectTypeID:function(){return 0},addItem:function(e){if(this._data[e.objectID]&&(0!==e.objectID||!this._allowCustomInput))return!0;var t=$('<li class="badge">'+WCF.String.escapeHTML(e.label)+"</li>").data("objectID",e.objectID).data("label",e.label).appendTo(this._itemList);return t.click($.proxy(this._click,this)),this._search&&this._search.addExcludedSearchValue(e.label),this._addItem(e.objectID,e.label),!0},clearList:function(){this._itemList.children("li").each($.proxy(function(e,t){var i=$(t);this._search&&this._search.removeExcludedSearchValue(i.data("label")),i.remove(),this._removeItem(i.data("objectID"),i.data("label"))},this))},_submit:function(){this._keyDown(null)},_addItem:function(e,t){this._data[e]=t},_removeItem:function(e){delete this._data[e]},getSearchInput:function(){return this._searchInput}}),WCF.Language.Chooser=Class.extend({_callback:null,_dropdown:null,_input:null,init:function(e,t,i,n,s,a){var o=$("#"+e);if(1!=o.length)return void console.debug("[WCF.Language.Chooser] Invalid container id '"+e+"' given");if(this._input=$("#"+t),this._input.length||(this._input=$('<input type="hidden" name="'+t+'" value="'+i+'" />').appendTo(o)),void 0!==s){if(!$.isFunction(s))return void console.debug("[WCF.Language.Chooser] Given callback is invalid");this._callback=s}this._dropdown=$('<div class="dropdown" id="'+e+'-languageChooser" />').appendTo(o),$('<div class="dropdownToggle boxFlag box24" data-toggle="'+e+'-languageChooser"></div>').appendTo(this._dropdown);var r=$('<ul class="dropdownMenu" />').appendTo(this._dropdown);for(var l in n){var c=n[l],h=$('<li class="boxFlag"><a class="box24"><div class="framed"><img src="'+c.iconPath+'" alt="" class="iconFlag" /></div> <div><h3>'+c.languageName+"</h3></div></a></li>").appendTo(r);if(h.data("languageID",l).click($.proxy(this._click,this)),l==i){var d=$(""+h.html()),u=d.children().detach();this._dropdown.children(".dropdownToggle").empty().append(u)}}if(a){$('<li class="dropdownDivider" />').appendTo(r);var h=$("<li><a>"+WCF.Language.get("wcf.global.language.noSelection")+"</a></li>").data("languageID",0).click($.proxy(this._click,this)).appendTo(r);0===i&&this._dropdown.children(".dropdownToggle").empty().append(h.html())}else if(0===i){var p=$('<div><span class="icon icon24 fa-question" /></div> <div><h3>'+WCF.Language.get("wcf.global.language.noSelection")+"</h3></div>");this._dropdown.children(".dropdownToggle").empty().append(p)}WCF.Dropdown.destroy(e+"-languageChooser"),WCF.Dropdown.init()},_click:function(e){var t=$(e.currentTarget),i=t.data("languageID");this._input.val(i);var n=$(""+t.html()),s=0===i?n:n.children().detach();this._dropdown.children(".dropdownToggle").empty().append(s),null!==this._callback&&this._callback(t)}}),WCF.Style={},WCF.UserPanel=Class.extend({_container:null,_didLoad:!1,_link:null,_noItems:"",_revertOnEmpty:!0,init:function(e){return this._container=$("#"+e),this._didLoad=!1,this._revertOnEmpty=!0,1!=this._container.length?void console.debug("[WCF.UserPanel] Unable to find container identfied by '"+e+"', aborting."):void this._convert()},_convert:function(){this._container.addClass("dropdown"),this._link=this._container.children("a").remove();var e=$('<a href="'+this._link.attr("href")+'" class="dropdownToggle">'+this._link.html()+"</a>").appendTo(this._container).click($.proxy(this._click,this)),t=$('<ul class="dropdownMenu" />').appendTo(this._container);$('<li class="jsDropdownPlaceholder"><span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t),this._addDefaultItems(t),this._container.dblclick($.proxy(function(){return window.location=this._link.attr("href"),!1},this)),WCF.Dropdown.initDropdown(e,!1)},_addDefaultItems:function(){},_addDivider:function(e){$('<li class="dropdownDivider" />').appendTo(e)},_click:function(e){e.preventDefault(),this._didLoad||(new WCF.Action.Proxy({autoSend:!0,data:this._getParameters(),success:$.proxy(this._success,this)}),this._didLoad=!0)},_getParameters:function(){return{}},_success:function(e){var t=WCF.Dropdown.getDropdownMenu(this._container.wcfIdentify());t.children(".jsDropdownPlaceholder").remove(),e.returnValues&&e.returnValues.template?($(""+e.returnValues.template).prependTo(t),this._updateBadge(e.returnValues.totalCount),this._after(t)):($("<li><span>"+WCF.Language.get(this._noItems)+"</span></li>").prependTo(t),this._updateBadge(0))},_updateBadge:function(e){if(e=parseInt(e)||0){var t=this._container.find(".badge");t.length||(t=$('<span class="badge badgeInverse" />').appendTo(this._container.children(".dropdownToggle")),t.before(" ")),t.html(e)}else this._container.find(".badge").remove()},_after:function(){}}),jQuery.fn.extend({wcfDialog:function(e){var t=arguments;require(["Dom/Util","Ui/Dialog"],function(i,n){var s=i.identify(this[0]);"close"===e?n.close(s):"render"===e?n.rebuild(s):"option"===e?3===t.length&&"title"===t[1]&&"string"==typeof t[2]&&n.setTitle(s,t[2]):(this[0].parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&document.body.appendChild(this[0]),n.openStatic(s,null,1===t.length&&"object"==typeof t[0]?t[0]:{}))}.bind(this))}}),$.widget("ui.wcfSlideshow",{_buttonList:null,_count:0,_index:0,_itemList:null,_items:null,_timer:null,_width:0,options:{cycle:!0,cycleInterval:5,itemGap:50},_create:function(){this._itemList=this.element.children("ul"),this._items=this._itemList.children("li"),this._count=this._items.length,this._index=0,this._count>1&&this._initSlideshow()},_initSlideshow:function(){var e=$(this._items.get(0)).outerHeight();this._items.addClass("slideshowItem"),this._width=this.element.css("height",e).innerWidth(),this._itemList.addClass("slideshowItemList").css("left",0),this._items.each($.proxy(function(t,i){$(i).show().css({height:e,left:(this._width+this.options.itemGap)*t,width:this._width})},this)),this.element.css({height:e,width:this._width}).hover($.proxy(this._hoverIn,this),$.proxy(this._hoverOut,this)),this._buttonList=$('<ul class="slideshowButtonList" />').appendTo(this.element);for(var t=0;t<this._count;t++){var i=$('<li><a><span class="icon icon16 icon-circle" /></a></li>').data("index",t).click($.proxy(this._click,this)).appendTo(this._buttonList);0==t&&i.find(".icon").addClass("active")}this._resetTimer(),$(window).resize($.proxy(this._resize,this))},rebuildHeight:function(){var e=$(this._items.get(0)).css("height","auto"),t=e.outerHeight();this._items.css("height",t+"px"),this.element.css("height",t+"px")},_resize:function(){this._width=this.element.css("width","auto").innerWidth(),this._items.each($.proxy(function(e,t){$(t).css({left:(this._width+this.options.itemGap)*e,width:this._width})},this)),this._index--,this.moveTo(null)},_hoverIn:function(){null!==this._timer&&this._timer.stop()},_hoverOut:function(){this._resetTimer()},_resetTimer:function(){if(this.options.cycle){null!==this._timer&&this._timer.stop();var e=this;this._timer=new WCF.PeriodicalExecuter(function(){e.moveTo(null)},1e3*this.options.cycleInterval)}},_click:function(e){this.moveTo($(e.currentTarget).data("index")),this._resetTimer()},moveTo:function(e){this._index=null===e?this._index+1:e,this._index==this._count&&(this._index=0),$(this._buttonList.find(".icon").removeClass("active").get(this._index)).addClass("active"),this._itemList.css("left",this._index*(this._width+this.options.itemGap)*-1),this._trigger("moveTo",null,{index:this._index})},getItem:function(e){return this._items[e]?this._items[e]:null}}),jQuery.fn.extend({datepicker:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);switch(e){case"destroy":window.__wcf_bc_datePicker.destroy(t);break;case"getDate":return window.__wcf_bc_datePicker.getDate(t);case"option":if("onClose"===i[0])return function(){};console.warn("datepicker('option') supports only 'onClose'.");break;case"setDate":window.__wcf_bc_datePicker.setDate(t,i[0]);break;case"setOption":"onClose"===i[0]?window.__wcf_bc_datePicker.setCloseCallback(t,i[1]):console.warn("datepicker('setOption') supports only 'onClose'.");break;default:console.debug("Unsupported method '"+e+"' for datepicker()")}}}),jQuery.fn.extend({wcfTabs:function(e){var t=this[0],i=Array.prototype.slice.call(arguments,1);require(["Dom/Util","WoltLab/WCF/Ui/TabMenu"],function(n,s){var a=s.getTabMenu(n.identify(t));null!==a&&a[e].apply(a,i)})}}),$.widget("ui.wcfPages",{SHOW_LINKS:11,SHOW_SUB_LINKS:20,options:{activePage:1,maxPage:1,nextPage:null,previousPage:null},_create:function(){null===this.options.nextPage&&(this.options.nextPage=WCF.Language.get("wcf.global.page.next")),null===this.options.previousPage&&(this.options.previousPage=WCF.Language.get("wcf.global.page.previous")),this.element.addClass("pageNavigation"),this._render()},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.children().remove()},_render:function(){if(!this.options.disabled&&this.options.maxPage>1){var e=!1;this.element.hasClass("hidden")&&this.element.removeClass("hidden"),this.element.show(),this.element.children().remove();var t=$("<ul />");this.element.append(t);var i=$('<li class="button skip" />');if(t.append(i),this.options.activePage>1){var n=$("<a"+(null!=this.options.previousPage?' title="'+this.options.previousPage+'"':"")+"></a>");i.append(n),this._bindSwitchPage(n,this.options.activePage-1);var s=$('<span class="icon icon16 icon-double-angle-left" />');n.append(s)}else{var s=$('<span class="icon icon16 icon-double-angle-left" />');i.append(s),i.addClass("disabled").removeClass("button"),s.addClass("disabled")}t.append(this._renderLink(1));var a=this.SHOW_LINKS-4,o=this.options.activePage-2;0>o&&(o=0);var r=this.options.maxPage-(this.options.activePage+1);0>r&&(r=0),this.options.activePage>1&&this.options.activePage<this.options.maxPage&&a--;var l=a/2,c=this.options.activePage,h=this.options.activePage;1>c&&(c=1),1>h&&(h=1),h>this.options.maxPage-1&&(h=this.options.maxPage-1),o>=l?c-=l:(c-=o,h+=l-o),r>=l?h+=l:(h+=r,c-=l-r),h=Math.ceil(h),c=Math.ceil(c),1>c&&(c=1),h>this.options.maxPage&&(h=this.options.maxPage),c>1&&(2>c-1?t.append(this._renderLink(2)):($('<li class="button jumpTo"><a title="'+WCF.Language.get("wcf.global.page.jumpTo")+'" class="jsTooltip">...</a></li>').appendTo(t),e=!0));for(var d=c+1;h>d;d++)t.append(this._renderLink(d));h<this.options.maxPage&&(this.options.maxPage-h<2?t.append(this._renderLink(this.options.maxPage-1)):($('<li class="button jumpTo"><a title="'+WCF.Language.get("wcf.global.page.jumpTo")+'" class="jsTooltip">...</a></li>').appendTo(t),e=!0)),t.append(this._renderLink(this.options.maxPage));var u=$('<li class="button skip" />');if(t.append(u),this.options.activePage<this.options.maxPage){var p=$("<a"+(null!=this.options.nextPage?' title="'+this.options.nextPage+'"':"")+"></a>");u.append(p),this._bindSwitchPage(p,this.options.activePage+1);var _=$('<span class="icon icon16 icon-double-angle-right" />');p.append(_)}else{var _=$('<span class="icon icon16 icon-double-angle-right" />');u.append(_),u.addClass("disabled").removeClass("button"),_.addClass("disabled")}e&&(t.data("pages",this.options.maxPage),WCF.System.PageNavigation.init("#"+t.wcfIdentify(),$.proxy(function(e){this.switchPage(e)},this)))}else this.element.hide()},_renderLink:function(e,t){var i=$('<li class="button"></li>');if(void 0!=t&&t&&i.addClass("break"),e!=this.options.activePage){var n=$("<a>"+WCF.String.addThousandsSeparator(e)+"</a>");i.append(n),this._bindSwitchPage(n,e)}else{i.addClass("active");var s=$("<span>"+WCF.String.addThousandsSeparator(e)+'</span><span class="invisible">'+WCF.Language.get("wcf.page.pagePosition",{pageNo:e,pages:this.options.maxPage})+"</span>");i.append(s)}return i},_bindSwitchPage:function(e,t){var i=this;e.click(function(){i.switchPage(t)})},switchPage:function(e){this._setOption("activePage",e)},_setOption:function(e,t){if("activePage"==e){if(t!=this.options[e]&&t>0&&t<=this.options.maxPage){var i=this._trigger("shouldSwitch",void 0,{nextPage:t});i||void 0!==i?(this.options[e]=t,this._render(),this._trigger("switched",void 0,{activePage:t})):this._trigger("notSwitched",void 0,{activePage:t})}}else this.options[e]=t,"disabled"==e?t?this.element.children().remove():this._render():"maxPage"==e&&this._render();return this},_startInput:function(e){var t=$(e.currentTarget);t.is("a")||(t=t.parent("a")),t.hide();var i=t.parent("li").children("input").css("display","block").val("");i.focus()},_stopInput:function(e){var t=$(e.currentTarget);t.css("display","none");var i=t.parent("li");void 0!=i&&null!=i&&i.children("a").show()},_handleInput:function(e){var t=$.browser.msie&&"7.0"==$.browser.version;("keyup"!=e.type||t)&&(t&&(13!=e.which&&27!=e.which||"keyup"!=e.type)||(13==e.which&&this.switchPage(parseInt($(e.currentTarget).val())),(13==e.which||27==e.which)&&(this._stopInput(e),e.stopPropagation())))}}),WCF.Category={},WCF.Category.NestedList=Class.extend({_categories:{},init:function(){var e=this;$(".jsCategory").each(function(t,i){var n=$(i).data("parentCategoryID",null).change($.proxy(e._updateSelection,e));e._categories[n.val()]=n;var s=[];n.parents("li").find(".jsChildCategory").each(function(t,i){var a=$(i).data("parentCategoryID",n.val()).change($.proxy(e._updateSelection,e));e._categories[a.val()]=a,s.push(a.val()),a.is(":checked")&&n.prop("checked","checked")}),n.data("childCategoryIDs",s)})},_updateSelection:function(e){var t=$(e.currentTarget),i=t.data("parentCategoryID");if(t.is(":checked"))null!==i&&this._categories[i].prop("checked","checked");else if(null===i)for(var n=t.data("childCategoryIDs"),s=0,a=n.length;a>s;s++)this._categories[n[s]].prop("checked",!1)}}),WCF.Category.FlexibleCategoryList=Class.extend({_list:null,_categories:{},init:function(e){return this._list=$("#"+e),this._buildStructure(),this._list.find("input:checked").each(function(){$(this).trigger("change")}),this._list.children("li").length<2?void this._list.addClass("flexibleCategoryListDisabled"):void 0},_buildStructure:function(){var e=this;this._list.find(".jsCategory").each(function(t,i){var n=$(i).change(e._updateSelection.bind(e)),s=parseInt(n.val()),a=[];n.parents("li:eq(0)").find(".jsChildCategory").each(function(t,i){var s=$(i);s.data("parentCategory",n).change(e._updateSelection.bind(e));var o=parseInt(s.val());a.push(s);var r=[];s.parents("li:eq(0)").find(".jsSubChildCategory").each(function(t,i){var n=$(i);n.data("parentCategory",s).change(e._updateSelection.bind(e)),r.push(n)}),e._categories[o]=r}),e._categories[s]=a})},_updateSelection:function(e){var t=$(e.currentTarget),i=parseInt(t.val()),n=t.data("parentCategory");if(t.is(":checked"))n&&(n.prop("checked","checked"),n=n.data("parentCategory"),n&&n.prop("checked","checked"));else{if(this._categories[i])for(var s=0,a=this._categories[i].length;a>s;s++){var o=this._categories[i][s];o.prop("checked",!1);var r=parseInt(o.val());if(this._categories[r])for(var l=0,c=this._categories[r].length;c>l;l++)this._categories[r][l].prop("checked",!1)}if(n){for(var h=parseInt(n.val()),s=0,a=this._categories[h].length;a>s;s++)if(this._categories[h][s].prop("checked"))return;if(n=n.data("parentCategory")){h=parseInt(n.val());for(var s=0,a=this._categories[h].length;a>s;s++)if(this._categories[h][s].prop("checked"))return}}}}}),WCF.Condition={},WCF.Condition.PageControllerDependence=Class.extend({_pageControllerSelection:null,_supportedPageObjectTypeIDs:[],init:function(e,t){this._supportedPageObjectTypeIDs=t,this._pageControllerSelection=$("#pageControllers").change($.proxy(this._checkVisibility,this)),this._pageControllerContainer=this._pageControllerSelection.parents("dl:eq(0)"),this._fieldset=this._pageControllerContainer.parent("fieldset"),this._nextFieldset=this._fieldset.next("fieldset"),this._nextFieldset&&this._nextFieldset.data("margin-top",this._nextFieldset.css("margin-top")),this._input=$("#"+e),this._inputContainer=this._input.parents("dl:eq(0)"),this._checkVisibility()},_checkVisibility:function(){var e=this._pageControllerSelection.val()||[],t=!0;if(e.length){for(var i=0,n=e.length;n>i;i++)if(-1==this._supportedPageObjectTypeIDs.indexOf(parseInt(e[i]))){t=!1;break}}else t=!1;t?(this._inputContainer.show(),this._input.enable(),this._fieldset.show(),this._nextFieldset&&this._nextFieldset.css("margin-top",this._nextFieldset.data("margin-top"))):(this._inputContainer.hide(),this._input.disable(),this._fieldset.children("dl:visible").length||(this._fieldset.hide(),this._nextFieldset&&this._nextFieldset.css("margin-top",0)))}}),WCF.Notice={}; })(this);
+(function (window, undefined) { })(this);
 
 // WCF.Like.js
-(function (window, undefined) {"use strict";WCF.Like=Class.extend({_allowForOwnContent:!1,_canLike:!1,_containers:{},_containerData:{},_enableDislikes:!0,_isBusy:!1,_likeDetails:{},_proxy:null,_showSummary:!0,init:function(t,e,i,a){this._canLike=t,this._enableDislikes=e,this._isBusy=!1,this._likeDetails={},this._showSummary=i,this._allowForOwnContent=a;var s=this._getContainers();this._initContainers(s),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)});var n=new Date,o=n.toString().hashCode+n.getUTCMilliseconds();WCF.DOMNodeInsertedHandler.addCallback("WCF.Like"+o,$.proxy(this._domNodeInserted,this))},_domNodeInserted:function(){var t=this._getContainers();this._initContainers(t)},_initContainers:function(containers){var $createdWidgets=!1;containers.each($.proxy(function(index,container){var $container=$(container),$containerID=$container.wcfIdentify();this._containers[$containerID]||(this._containers[$containerID]=$container,this._containerData[$containerID]={likeButton:null,badge:null,dislikeButton:null,likes:$container.data("like-likes"),dislikes:$container.data("like-dislikes"),objectType:$container.data("objectType"),objectID:this._getObjectID($containerID),users:eval($container.data("like-users")),liked:$container.data("like-liked")},this._createWidget($containerID),$createdWidgets=!0)},this)),$createdWidgets&&new WCF.PeriodicalExecuter(function(t){t.stop(),WCF.DOMNodeInsertedHandler.execute()},250)},_getContainers:function(){},_getWidgetContainer:function(){},_getObjectID:function(){},_addWidget:function(t,e){var i=this._getWidgetContainer(t);e.appendTo(i)},_buildWidget:function(t,e,i,a){var s=$('<aside class="likesWidget"><ul></ul></aside>');this._canLike&&(e.appendTo(s.find("ul")),i.appendTo(s.find("ul"))),a.appendTo(s),this._addWidget(t,s)},_createWidget:function(t){var e=$('<li class="wcfLikeButton"><a href="#" title="'+WCF.Language.get("wcf.like.button.like")+'" class="jsTooltip"><span class="icon icon16 icon-thumbs-up-alt" /> <span class="invisible">'+WCF.Language.get("wcf.like.button.like")+"</span></a></li>"),i=$('<li class="wcfDislikeButton"><a href="#" title="'+WCF.Language.get("wcf.like.button.dislike")+'" class="jsTooltip"><span class="icon icon16 icon-thumbs-down-alt" /> <span class="invisible">'+WCF.Language.get("wcf.like.button.dislike")+"</span></a></li>");this._enableDislikes||i.hide(),this._allowForOwnContent||WCF.User.userID!=this._containers[t].data("userID")||(e=$(""),i=$(""));var a=$('<a class="badge jsTooltip likesBadge" />').data("containerID",t).click($.proxy(this._showLikeDetails,this)),s=null;this._showSummary&&(s=$('<p class="likesSummary"><span class="pointer" /></p>'),s.children("span").data("containerID",t).click($.proxy(this._showLikeDetails,this))),this._buildWidget(t,e,i,a,s),this._containerData[t].likeButton=e,this._containerData[t].dislikeButton=i,this._containerData[t].badge=a,this._containerData[t].summary=s,e.data("containerID",t).data("type","like").click($.proxy(this._click,this)),i.data("containerID",t).data("type","dislike").click($.proxy(this._click,this)),this._setActiveState(e,i,this._containerData[t].liked),this._updateBadge(t),this._showSummary&&this._updateSummary(t)},_showLikeDetails:function(t,e){var i=null===t?e:$(t.currentTarget).data("containerID");void 0===this._likeDetails[i]&&(this._likeDetails[i]=new WCF.User.List("wcf\\data\\like\\LikeAction",WCF.Language.get("wcf.like.details"),{data:{containerID:i,objectID:this._containerData[i].objectID,objectType:this._containerData[i].objectType}})),this._likeDetails[i].open()},_click:function(t){t.preventDefault();var e=$(t.currentTarget);return null===e?void console.debug("[WCF.Like] Unable to find target button, aborting."):void this._sendRequest(e.data("containerID"),e.data("type"))},_sendRequest:function(t,e){this._isBusy||(this._isBusy=!0,this._proxy.setOption("data",{actionName:e,className:"wcf\\data\\like\\LikeAction",parameters:{data:{containerID:t,objectID:this._containerData[t].objectID,objectType:this._containerData[t].objectType}}}),this._proxy.sendRequest())},_success:function(t){var e=t.returnValues.containerID;if(this._containers[e])switch(t.actionName){case"dislike":case"like":this._containerData[e].likes=parseInt(t.returnValues.likes),this._containerData[e].dislikes=parseInt(t.returnValues.dislikes),this._containerData[e].users=t.returnValues.users,$.each(this._containerData[e].users,function(t,e){e.username=WCF.String.escapeHTML(e.username)}),this._updateBadge(e),this._showSummary&&this._updateSummary(e);var i=this._containerData[e].likeButton,a=this._containerData[e].dislikeButton,s=0;t.returnValues.isLiked?s=1:t.returnValues.isDisliked&&(s=-1),this._setActiveState(i,a,s),void 0!==this._likeDetails[e]&&delete this._likeDetails[e],this._isBusy=!1}},_updateBadge:function(t){if(this._containerData[t].likes||this._containerData[t].dislikes){this._containerData[t].badge.show();var e=this._containerData[t].likes-this._containerData[t].dislikes,i=this._containerData[t].badge;i.removeClass("green red"),e>0?(i.text("+"+WCF.String.formatNumeric(e)),i.addClass("green")):0>e?(i.text(WCF.String.formatNumeric(e)),i.addClass("red")):i.text("±0");var a=this._containerData[t].likes,s=this._containerData[t].dislikes;i.data("tooltip",WCF.Language.get("wcf.like.tooltip",{likes:a,dislikes:s}))}else this._containerData[t].badge.hide()},_updateSummary:function(t){if(this._containerData[t].likes){this._containerData[t].summary.show();var e=this._containerData[t].users,i=[];for(var a in e)i.push(e[a].username);var s=this._containerData[t].likes-i.length;this._containerData[t].summary.children("span").html(WCF.Language.get("wcf.like.summary",{users:i,others:s}))}else this._containerData[t].summary.hide()},_setActiveState:function(t,e,i){t.removeClass("active"),e.removeClass("active"),1==i?t.addClass("active"):-1==i&&e.addClass("active")}}); })(this);
+(function (window, undefined) { })(this);
 
 // WCF.ACL.js
-(function (window, undefined) {"use strict";WCF.ACL={},WCF.ACL.List=Class.extend({_categoryName:"",_container:null,_containerElements:{},_objectID:0,_objectTypeID:null,_options:{},_proxy:null,_search:null,_values:{group:{},user:{}},init:function(e,t,n,i,a,s){this._objectID=i||0,this._objectTypeID=t,this._categoryName=n,void 0===a&&(a=!0),this._values={group:{},user:{}},this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._container=$(e).hide().addClass("aclContainer");var r=this._container.children("dd"),c=$('<ul class="aclList container" />').appendTo(r),l=$('<input type="text" class="long" placeholder="'+WCF.Language.get("wcf.acl.search."+(a?"":"user.")+"description")+'" />').appendTo(r),o=$('<ul class="aclPermissionList container" />').hide().appendTo(r);this._containerElements={aclList:c,denyAll:null,grantAll:null,permissionList:o,searchInput:l},this._search=new WCF.Search.User(l,$.proxy(this.addObject,this),a);var h=this._container.parents("form:eq(0)");h.submit($.proxy(this.submit,this));var p=h.find("input[type=reset]:eq(0)");p.length&&p.click($.proxy(this._reset,this)),s?this._success(s):this._loadACL()},_reset:function(){this._values={group:{},user:{}},this._containerElements.aclList.empty(),this._containerElements.searchInput.val(""),this._containerElements.permissionList.hide().find("input[type=checkbox]").prop("checked",!1)},_loadACL:function(){this._proxy.setOption("data",{actionName:"loadAll",className:"wcf\\data\\acl\\option\\ACLOptionAction",parameters:{categoryName:this._categoryName,objectID:this._objectID,objectTypeID:this._objectTypeID}}),this._proxy.sendRequest()},addObject:function(e){var t=this._createListItem(e.objectID,e.label,e.type);this._savePermissions(),this._containerElements.aclList.children("li").removeClass("active"),t.addClass("active"),this._search.addExcludedSearchValue(e.label),this._containerElements.permissionList.find("input[type=checkbox]").prop("checked",!1),this._containerElements.searchInput.val(""),this._containerElements.permissionList.show(),WCF.DOMNodeInsertedHandler.execute()},_createListItem:function(e,t,n){var i=$('<li><span class="icon icon16 icon-'+("group"===n?"group":"user")+'" /> <span>'+t+"</span></li>").appendTo(this._containerElements.aclList);return i.data("objectID",e).data("type",n).data("label",t).click($.proxy(this._click,this)),$('<span class="icon icon16 icon-remove jsTooltip pointer" title="'+WCF.Language.get("wcf.global.button.delete")+'" />').click($.proxy(this._removeItem,this)).appendTo(i),i},_removeItem:function(e){var t=$(e.currentTarget).parent(),n=t.data("type"),i=t.data("objectID");this._search.removeExcludedSearchValue(t.data("label")),t.remove(),this._values[n][i]&&delete this._values[n][i],this._selectFirstEntry()},_selectFirstEntry:function(){var e=this._containerElements.aclList.children("li:eq(0)");e.length?this._select(e,!1):this._reset()},_success:function(e){if($.getLength(e.returnValues.options)){var t=0,n={};for(var i in e.returnValues.options){var a=e.returnValues.options[i],s=$("<li><span>"+a.label+"</span></li>").data("optionID",i).data("optionName",a.optionName),r=$('<input type="checkbox" id="grant'+i+'" />').appendTo(s).wrap('<label for="grant'+i+'" class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.grant")+'" />'),c=$('<input type="checkbox" id="deny'+i+'" />').appendTo(s).wrap('<label for="deny'+i+'" class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.deny")+'" />');r.data("type","grant").data("optionID",i).change($.proxy(this._change,this)),c.data("type","deny").data("optionID",i).change($.proxy(this._change,this)),n[a.categoryName]||(n[a.categoryName]=[]),""===a.categoryName?s.appendTo(this._containerElements.permissionList):n[a.categoryName].push(s),t++}if(t>1){var s=$('<li class="aclFullAccess"><span>'+WCF.Language.get("wcf.acl.option.fullAccess")+"</span></li>").prependTo(this._containerElements.permissionList);this._containerElements.grantAll=$('<input type="checkbox" id="grantAll_'+this._container.attr("id")+'" />').appendTo(s).wrap('<label class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.grant")+'" />'),this._containerElements.denyAll=$('<input type="checkbox" id="denyAll_'+this._container.attr("id")+'" />').appendTo(s).wrap('<label class="jsTooltip" title="'+WCF.Language.get("wcf.acl.option.deny")+'" />'),this._containerElements.grantAll.data("type","grant").change($.proxy(this._changeAll,this)),this._containerElements.denyAll.data("type","deny").change($.proxy(this._changeAll,this))}if($.getLength(n))for(var l in n){var o=n[l];e.returnValues.categories[l]&&$('<li class="aclCategory">'+e.returnValues.categories[l]+"</li>").appendTo(this._containerElements.permissionList);for(var h=0,p=o.length;p>h;h++)o[h].appendTo(this._containerElements.permissionList)}this._parseData(e,"group"),this._parseData(e,"user"),this._container.show(),this._selectFirstEntry()}},_parseData:function(e,t){if($.getLength(e.returnValues[t].option)){for(var n in e.returnValues[t].label)this._createListItem(n,e.returnValues[t].label[n],t),this._search.addExcludedSearchValue(e.returnValues[t].label[n]);this._values[t]=e.returnValues[t].option,WCF.DOMNodeInsertedHandler.execute()}},_click:function(e){var t=$(e.currentTarget);t.hasClass("active")||this._select(t,!0)},_select:function(e,t){t&&this._savePermissions(),this._containerElements.aclList.children("li").removeClass("active"),e.addClass("active"),this._setupPermissions(e.data("type"),e.data("objectID"))},_change:function(e){var t=$(e.currentTarget),n=t.data("optionID"),i=t.data("type");t.is(":checked")?"deny"===i?($("#grant"+n).prop("checked",!1),null!==this._containerElements.grantAll&&this._containerElements.grantAll.prop("checked",!1)):($("#deny"+n).prop("checked",!1),null!==this._containerElements.denyAll&&this._containerElements.denyAll.prop("checked",!1)):"deny"===i&&null!==this._containerElements.denyAll?this._containerElements.denyAll.prop("checked",!1):"grant"===i&&null!==this._containerElements.grantAll&&this._containerElements.grantAll.prop("checked",!1);var a=!0;this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);return n.data("type")!==i||n.attr("id")===i+"All_"+this._container.attr("id")||n.is(":checked")?void 0:(a=!1,!1)},this)),"deny"==i?null!==this._containerElements.denyAll&&(a?this._containerElements.denyAll.prop("checked",!0):this._containerElements.denyAll.prop("checked",!1)):null!==this._containerElements.grantAll&&(a?this._containerElements.grantAll.prop("checked",!0):this._containerElements.grantAll.prop("checked",!1))},_changeAll:function(e){var t=$(e.currentTarget),n=t.data("type");t.is(":checked")?"deny"===n?(this._containerElements.grantAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);"deny"===n.data("type")&&n.attr("id")!=="denyAll_"+this._container.attr("id")&&n.prop("checked",!0).trigger("change")},this))):(this._containerElements.denyAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);"grant"===n.data("type")&&n.attr("id")!=="grantAll_"+this._container.attr("id")&&n.prop("checked",!0).trigger("change")},this))):"deny"===n?(this._containerElements.grantAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);"deny"===n.data("type")&&n.attr("id")!=="denyAll_"+this._container.attr("id")&&n.prop("checked",!1).trigger("change")},this))):(this._containerElements.denyAll.prop("checked",!1),this._containerElements.permissionList.find("input[type=checkbox]").each($.proxy(function(e,t){var n=$(t);"grant"===n.data("type")&&n.attr("id")!=="grantAll_"+this._container.attr("id")&&n.prop("checked",!1).trigger("change")},this)))},_setupPermissions:function(e,t){if(this._containerElements.permissionList.find("input[type='checkbox']").prop("checked",!1),this._values[e]&&this._values[e][t])for(var n in this._values[e][t])1==this._values[e][t][n]?$("#grant"+n).prop("checked",!0).trigger("change"):$("#deny"+n).prop("checked",!0).trigger("change");this._containerElements.permissionList.show()},_savePermissions:function(){var e=this._containerElements.aclList.find("li.active");if(e.length){var t=e.data("objectID"),n=e.data("type");this._values[n][t]={},this._containerElements.permissionList.find("input[type='checkbox']").each(function(e,i){var a=$(i);if(a.attr("id")!="grantAll_"+this._container.attr("id")&&a.attr("id")!="denyAll_"+this._container.attr("id")){var s="deny"===a.data("type")?0:1,r=a.data("optionID");a.is(":checked")?(this._values[n][t][r]=s,a.prop("checked",!1)):this._values[n]&&this._values[n][t]&&this._values[n][t][r]&&this._values[n][t][r]==s&&delete this._values[n][t][r]}}.bind(this))}},submit:function(){this._savePermissions(),this._save("group"),this._save("user")},_save:function(e){if($.getLength(this._values[e])){var t=this._container.parents("form:eq(0)");for(var n in this._values[e]){var i=this._values[e][n];for(var a in i)$('<input type="hidden" name="aclValues['+e+"]["+n+"]["+a+']" value="'+i[a]+'" />').appendTo(t)}}}}); })(this);
+(function (window, undefined) { })(this);
 
 // WCF.Attachment.js
-(function (window, undefined) {"use strict";WCF.Attachment={},WCF.Attachment.Upload=WCF.Upload.extend({_autoInsert:[],_insertAllButton:null,_objectType:"",_objectID:0,_tmpHash:"",_parentObjectID:0,_wysiwygContainerID:"",init:function(t,e,a,i,n,s,r,l){this._super(t,e,"wcf\\data\\attachment\\AttachmentAction",{multiple:!0,maxUploads:r}),this._autoInsert=[],this._objectType=a,this._objectID=parseInt(i),this._tmpHash=n,this._parentObjectID=parseInt(s),this._wysiwygContainerID=l,this._buttonSelector.children("p.button").click($.proxy(this._validateLimit,this)),this._fileListSelector.find(".jsButtonInsertAttachment").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertThumbnail").click($.proxy(this._insert,this)),this._fileListSelector.find(".jsButtonAttachmentInsertFull").click($.proxy(this._insert,this)),WCF.System.Event.addListener("com.woltlab.wcf.action.delete","attachment_"+this._wysiwygContainerID,$.proxy(this._removeLimitError,this)),this._makeSortable(),this._insertAllButton=$('<p class="button jsButtonAttachmentInsertAll">'+WCF.Language.get("wcf.attachment.insertAll")+"</p>").hide().appendTo(this._buttonSelector),this._insertAllButton.click($.proxy(this._insertAll,this)),this._fileListSelector.children("li:not(.uploadFailed)").length&&this._insertAllButton.show(),this._wysiwygContainerID&&(WCF.System.Event.addListener("com.woltlab.wcf.messageOptionsInline","submit_"+this._wysiwygContainerID,$.proxy(this._submitInline,this)),WCF.System.Event.addListener("com.woltlab.wcf.messageOptionsInline","prepareExtended_"+this._wysiwygContainerID,$.proxy(this._prepareExtended,this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","reset",$.proxy(this._reset,this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","upload_"+this._wysiwygContainerID,$.proxy(this._editorUpload,this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","getImageAttachments_"+this._wysiwygContainerID,$.proxy(this._getImageAttachments,this)))},_editorUpload:function(t){var e;this._fileListSelector.closest(".messageTabMenu").messageTabMenu("showTab","attachments",!0),e=t.file?this._upload(void 0,t.file):this._upload(void 0,void 0,t.blob),this._autoInsert.push(e),t.uploadID=e},_getImageAttachments:function(t){this._fileListSelector.children("li").each(function(e,a){var i=$(a);i.children("img.attachmentTinyThumbnail").length&&(t.imageAttachments[parseInt(i.data("objectID"))]={height:parseInt(i.data("height")),width:parseInt(i.data("width"))})})},_submitInline:function(t){this._tmpHash&&(t.tmpHash=this._tmpHash)},_prepareExtended:function(t){!this._objectID&&this._tmpHash&&this._fileListSelector.children("li:not(.uploadFailed)").length&&(t.tmpHash=this._tmpHash)},_reset:function(){this._fileListSelector.hide().empty(),this._insertAllButton.hide(),this._validateLimit()},_validateLimit:function(){var t=this._buttonSelector.next("small.innerError"),e=this._options.maxUploads-this._fileListSelector.children("li:not(.uploadFailed)").length,a=this._fileUpload?this._fileUpload.prop("files").length:0;if(0>=e||a>e){var i=0>=e?WCF.Language.get("wcf.attachment.upload.error.reachedLimit"):WCF.Language.get("wcf.attachment.upload.error.reachedRemainingLimit").replace(/#remaining#/,e);return t.length||(t=$('<small class="innerError" />').insertAfter(this._buttonSelector)),t.html(i),!1}return t.remove(),!0},_removeLimitError:function(t){var e=this._fileListSelector.children("li");e.filter(":not(.uploadFailed)").length||this._insertAllButton.hide(),e.length||setTimeout(function(){this._fileListSelector.wcfBlindOut()}.bind(this),250),this._wysiwygContainerID&&$("#"+this._wysiwygContainerID).redactor("wbbcode.removeAttachment",t.button.data("objectID"))},_upload:function(t,e,a){var i=void 0;return this._validateLimit()&&(i=this._super(t,e,a)),this._fileUpload&&(this._removeButton(),this._createButton()),i},_createUploadMatrix:function(t){return this._fileListSelector.children("li.uploadFailed").remove(),this._super(t)},_getParameters:function(){return{objectType:this._objectType,objectID:this._objectID,tmpHash:this._tmpHash,parentObjectID:this._parentObjectID}},_initFile:function(t){var e=$('<li class="box64"><span class="icon icon48 icon-spinner" /><div><div><p>'+t.name+'</p><small><progress max="100"></progress></small></div><ul></ul></div></li>').data("filename",t.name);return this._fileListSelector.append(e),this._fileListSelector.show(),this._buttonSelector.data("maxSize")<t.size&&(e.find("progress").remove(),e.children(".icon-spinner").removeClass("icon-spinner").addClass("icon-ban-circle"),e.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error.tooLarge")+"</small>")),e.addClass("uploadFailed")),e},_success:function(t,e){for(var a in this._uploadMatrix[t]){var i=this._uploadMatrix[t][a];i.find("progress").remove();var n=i.data("filename"),s=i.data("internalFileID");if(e.returnValues&&e.returnValues.attachments[s]){e.returnValues.attachments[s].tinyURL?(i.children(".icon-spinner").replaceWith($('<img src="'+e.returnValues.attachments[s].tinyURL+'" alt="" class="attachmentTinyThumbnail" />')),i.data("height",e.returnValues.attachments[s].height),i.data("width",e.returnValues.attachments[s].width)):i.children(".icon-spinner").removeClass("icon-spinner").addClass("icon-paper-clip");var r=$('<a href=""></a>');r.text(n).attr("href",e.returnValues.attachments[s].url),0!=e.returnValues.attachments[s].isImage&&r.addClass("jsImageViewer").attr("title",n),i.find("p").empty().append(r),i.find("small").append(e.returnValues.attachments[s].formattedFilesize);var l=i.find("ul").addClass("buttonGroup"),o=$('<li><span class="button small jsDeleteButton" data-object-id="'+e.returnValues.attachments[s].attachmentID+'" data-confirm-message="'+WCF.Language.get("wcf.attachment.delete.sure")+'" data-event-name="attachment_'+this._wysiwygContainerID+'">'+WCF.Language.get("wcf.global.button.delete")+"</span></li>");if(l.append(o),i.data("objectID",e.returnValues.attachments[s].attachmentID),this._wysiwygContainerID)if(e.returnValues.attachments[s].tinyURL){var c=$('<li><span class="button small jsButtonAttachmentInsertThumbnail" data-object-id="'+e.returnValues.attachments[s].attachmentID+'">'+WCF.Language.get("wcf.attachment.insertThumbnail")+"</span></li>").appendTo(l),h=$('<li><span class="button small jsButtonAttachmentInsertFull" data-object-id="'+e.returnValues.attachments[s].attachmentID+'">'+WCF.Language.get("wcf.attachment.insertFull")+"</span></li>").appendTo(l);c.children("span.button").click($.proxy(this._insert,this)),h.children("span.button").click($.proxy(this._insert,this))}else{var d=$('<li><span class="button small jsButtonAttachmentInsertPlain" data-object-id="'+e.returnValues.attachments[s].attachmentID+'">'+WCF.Language.get("wcf.attachment.insert")+"</span></li>");d.appendTo(l).children("span.button").click($.proxy(this._insert,this))}}else{i.children(".icon-spinner").removeClass("icon-spinner").addClass("icon-ban-circle");var u="";u=e.returnValues&&e.returnValues.errors[s]?e.returnValues.errors[s].errorType:"uploadFailed",i.find("div > div").append($('<small class="innerError">'+WCF.Language.get("wcf.attachment.upload.error."+u)+"</small>")),i.addClass("uploadFailed")}i.css("display","block"),WCF.inArray(t,this._autoInsert)&&(this._autoInsert.splice(this._autoInsert.indexOf(t),1),i.hasClass("uploadFailed")||WCF.System.Event.fireEvent("com.woltlab.wcf.attachment","autoInsert_"+this._wysiwygContainerID,{attachment:"[attach="+e.returnValues.attachments[s].attachmentID+"][/attach]",uploadID:t}))}this._makeSortable(),this._fileListSelector.children("li:not(.uploadFailed)").length?this._insertAllButton.show():this._insertAllButton.hide(),WCF.DOMNodeInsertedHandler.execute()},_insert:function(t,e){var a=null===t?e:$(t.currentTarget).data("objectID"),i=null!==t?$(t.currentTarget).hasClass("jsButtonAttachmentInsertFull"):!1;$.browser.redactor&&$("#"+this._wysiwygContainerID).redactor("wbbcode.insertAttachment",a,i)},_insertAll:function(){this._fileListSelector.children("li:not(.uploadFailed)").each($.proxy(function(t,e){this._insert(null,$(e).data("objectID"))},this))},_error:function(t){this._fileListSelector.find("li").each(function(e,a){var i=$(a);i.children(".icon-spinner").length&&(i.addClass("uploadFailed").children(".icon-spinner").removeClass("icon-spinner").addClass("icon-ban-circle"),i.find("div > div").append($('<small class="innerError">'+(t.responseJSON&&t.responseJSON.message?t.responseJSON.message:WCF.Language.get("wcf.attachment.upload.error.uploadFailed"))+"</small>")))})},_makeSortable:function(){var t=this._fileListSelector.children("li:not(.uploadFailed)");if(t.length&&(t.addClass("sortableAttachment").children("img").addClass("sortableNode"),!this._fileListSelector.hasClass("sortableList"))){this._fileListSelector.addClass("sortableList");var e=this;new WCF.Sortable.List(this._fileListSelector.parent().wcfIdentify(),"",0,{axis:!1,items:"li.sortableAttachment",toleranceElement:null,update:function(){var t=[];e._fileListSelector.children("li:not(.uploadFailed)").each(function(e,a){t.push($(a).data("objectID"))}),t.length&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"updatePosition",className:"wcf\\data\\attachment\\AttachmentAction",parameters:{attachmentIDs:t,objectID:e._objectID,objectType:e._objectType,tmpHash:e._tmpHash}}})}},!0)}}}); })(this);
+(function (window, undefined) { })(this);
 
 // WCF.ColorPicker.js
-(function (window, undefined) {"use strict";WCF.ColorPicker=Class.extend({_bar:null,_barActive:!1,_barSelector:null,_dialog:null,_didInit:!1,_elementID:"",_gradient:null,_gradientActive:!1,_gradientSelector:null,_hex:null,_hsv:{},_newColor:null,_oldColor:null,_rgba:{},_rgbaRegExp:null,init:function(t){this._elementID="",this._hsv={h:0,s:100,v:100},this._position={};var a=$(t);return a.length?void a.click($.proxy(this._open,this)):void console.debug("[WCF.ColorPicker] Selector does not match any element, aborting.")},_open:function(t){this._didInit||(this._initColorPicker(),this._didInit=!0);var a=$(t.currentTarget);this._elementID=a.wcfIdentify(),this._parseColor(a);var s=this.hsvToRgb(this._hsv.h,this._hsv.s,this._hsv.v);this._oldColor.css({backgroundColor:"rgba("+s.r+", "+s.g+", "+s.b+", "+this._rgba.a.val()/100+")"}),this._dialog.wcfDialog({title:WCF.Language.get("wcf.style.colorPicker")}),this._hex.focus()},_parseColor:function(t){if(t.data("hsv")&&t.data("rgb")){var a=t.data("hsv");for(var s in a)this._hsv[s]=a[s];this._updateValues(t.data("rgb"),!0,!0),this._rgba.a.val(parseInt(t.data("alpha")))}else{null===this._rgbaRegExp&&(this._rgbaRegExp=new RegExp("^rgba\\((\\d{1,3}), ?(\\d{1,3}), ?(\\d{1,3}), ?(1|1\\.00?|0|0?\\.[0-9]{1,2})\\)$")),this._rgbaRegExp.exec(t.data("color"));var i=RegExp.$4;0===i.indexOf(".")&&(i="0"+i),i*=100,this._updateValues({r:RegExp.$1,g:RegExp.$2,b:RegExp.$3,a:Math.round(i)},!0,!0)}},_initColorPicker:function(){this._dialog=$('<div id="colorPickerContainer" />').hide().appendTo(document.body),this._gradient=$('<div id="colorPickerGradient" />').appendTo(this._dialog),this._gradientSelector=$('<span id="colorPickerGradientSelector"><span></span></span>').appendTo(this._gradient),this._bar=$('<div id="colorPickerBar" />').appendTo(this._dialog),this._barSelector=$('<span id="colorPickerBarSelector" />').appendTo(this._bar),this._gradient.mousedown($.proxy(this._mouseDownGradient,this)),this._bar.mousedown($.proxy(this._mouseDownBar,this));var t=this;$(document).mouseup(function(a){t._barActive?(t._barActive=!1,t._mouseBar(a)):t._gradientActive&&(t._gradientActive=!1,t._mouseGradient(a))}).mousemove(function(a){t._barActive?t._mouseBar(a):t._gradientActive&&t._mouseGradient(a)}),this._initColorPickerForm()},_initColorPickerForm:function(){var t=$('<div id="colorPickerForm" />').appendTo(this._dialog);$("<small>"+WCF.Language.get("wcf.style.colorPicker.new")+"</small>").appendTo(t);var a=$('<ul class="colors" />').appendTo(t);this._newColor=$('<li class="new"><span /></li>').appendTo(a).children("span"),this._oldColor=$('<li class="old"><span /></li>').appendTo(a).children("span"),$("<small>"+WCF.Language.get("wcf.style.colorPicker.current")+"</small>").appendTo(t);var s=$('<ul class="rgba" />').appendTo(t);this._createInputElement("r","R",0,255).appendTo(s),this._createInputElement("g","G",0,255).appendTo(s),this._createInputElement("b","B",0,255).appendTo(s),this._createInputElement("a","a",0,100).appendTo(s);var i=$('<ul class="hex"><li><label><span>#</span></label></li></ul>').appendTo(t);this._hex=$('<input type="text" maxlength="6" />').appendTo(i.find("label")),this._rgba.r.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._rgba.g.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._rgba.b.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._rgba.a.blur($.proxy(this._blurRgba,this)).keyup($.proxy(this._keyUpRGBA,this)),this._hex.blur($.proxy(this._blurHex,this)).keyup($.proxy(this._keyUpHex,this));var e=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.style.colorPicker.button.apply")+"</button>").appendTo(e).click($.proxy(this._submit,this));var r=this;this._hex.on("paste",function(){r._hex.attr("maxlength","7"),setTimeout(function(){var t=r._hex.val();"#"==t.substring(0,1)&&(t=t.substr(1)),t.length>6&&(t=t.substring(0,6)),r._hex.attr("maxlength","6").val(t)},50)}),t.find("input").focus(function(){this.select()})},_keyUpRGBA:function(t){13==t.which&&(this._blurRgba(),this._submit())},_keyUpHex:function(t){13==t.which&&(this._blurHex(),this._submit())},_submit:function(){var t=this.hsvToRgb(this._hsv.h,this._hsv.s,this._hsv.v),a={};for(var s in this._hsv)a[s]=this._hsv[s];var i=$("#"+this._elementID);i.data("hsv",a).css({backgroundColor:"rgba("+t.r+", "+t.g+", "+t.b+", "+this._rgba.a.val()/100+")"}).data("alpha",parseInt(this._rgba.a.val())),i.data("rgb",{r:this._rgba.r.val(),g:this._rgba.g.val(),b:this._rgba.b.val()}),$("#"+i.data("store")).val("rgba("+this._rgba.r.val()+", "+this._rgba.g.val()+", "+this._rgba.b.val()+", "+this._rgba.a.val()/100+")").trigger("change"),this._dialog.wcfDialog("close")},_createInputElement:function(t,a,s,i){var e=$('<li class="'+t+'" />'),r=$("<label />").appendTo(e);return $("<span>"+a+"</span>").appendTo(r),this._rgba[t]=$('<input type="number" value="0" min="'+s+'" max="'+i+'" step="1" />').appendTo(r),e},_mouseDownGradient:function(t){this._gradientActive=!0,this._mouseGradient(t)},_mouseGradient:function(t){var a=this._gradient.getOffsets("offset"),s=Math.max(Math.min(t.pageX-a.left,255),0),i=Math.max(Math.min(t.pageY-a.top,255),0);this._hsv.s=100*Math.max(0,Math.min(1,s/255)),this._hsv.v=100*Math.max(0,Math.min(1,(255-i)/255)),this._updateValues(null)},_mouseDownBar:function(t){this._barActive=!0,this._mouseBar(t)},_mouseBar:function(t){var a=this._bar.getOffsets("offset"),s=Math.max(Math.min(t.pageY-a.top,255),0);this._barSelector.css({top:s+"px"}),this._hsv.h=Math.max(0,Math.min(359,Math.round((255-s)/255*360))),this._updateValues(null)},_blurRgba:function(){for(var t in this._rgba){var a=parseInt(this._rgba[t].val())||0;this._rgba[t].val("a"===t?Math.max(0,Math.min(100,a)):Math.max(0,Math.min(255,a)))}this._updateValues({r:this._rgba.r.val(),g:this._rgba.g.val(),b:this._rgba.b.val()},!0,!0)},_blurHex:function(){var t=this.hexToRgb(this._hex.val());t!==Number.NaN&&this._updateValues(t,!0,!0)},_updateValues:function(t,a,s){a=a===!0?!0:!1,s=s===!0?!0:!1,null===t&&(t=this.hsvToRgb(this._hsv.h,this._hsv.s,this._hsv.v),0==this._rgba.a.val()&&(t.a=100)),void 0===t.a&&(t.a=this._rgba.a.val());for(var i in t)this._rgba[i].val(t[i]);if(this._hex.val(this.rgbToHex(t.r,t.g,t.b)),a||s){var e=this.rgbToHsv(t.r,t.g,t.b);a&&(this._hsv.h=e.h),s&&(this._hsv.s=e.s,this._hsv.v=e.v)}var r=Math.max(0,Math.min(255,255-this._hsv.h/360*255));this._barSelector.css({top:r+"px"});var h=Math.max(0,Math.min(255,this._hsv.s/100*255)),r=Math.max(0,Math.min(255,255-this._hsv.v/100*255));this._gradientSelector.css({left:h-6+"px",top:r-6+"px"}),this._newColor.css({backgroundColor:"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a/100+")"});var n=this.hsvToRgb(this._hsv.h,100,100);this._gradient.css({backgroundColor:"rgb("+n.r+", "+n.g+", "+n.b+")"})},hsvToRgb:function(t,a,s){var i,e,r,h,n,o={r:0,g:0,b:0};if(i=Math.floor(t/60),e=t/60-i,a/=100,s/=100,r=s*(1-a),h=s*(1-a*e),n=s*(1-a*(1-e)),0==a)o.r=o.g=o.b=s;else switch(i){case 1:o.r=h,o.g=s,o.b=r;break;case 2:o.r=r,o.g=s,o.b=n;break;case 3:o.r=r,o.g=h,o.b=s;break;case 4:o.r=n,o.g=r,o.b=s;break;case 5:o.r=s,o.g=r,o.b=h;break;case 0:case 6:o.r=s,o.g=n,o.b=r}return{r:Math.round(255*o.r),g:Math.round(255*o.g),b:Math.round(255*o.b)}},rgbToHsv:function(t,a,s){var i,e,r,h,n,o;if(t/=255,a/=255,s/=255,h=Math.max(Math.max(t,a),s),n=Math.min(Math.min(t,a),s),o=h-n,i=0,h!==n){switch(h){case t:i=60*(0+(a-s)/o);break;case a:i=60*(2+(s-t)/o);break;case s:i=60*(4+(t-a)/o)}0>i&&(i+=360)}return e=0===h?0:o/h,r=h,{h:Math.round(i),s:Math.round(100*e),v:Math.round(100*r)}},hexToRgb:function(t){return/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(t)?(t=t.split(""),"#"===t[0]&&t.shift(),3===t.length?{r:parseInt(t[0]+""+t[0],16),g:parseInt(t[1]+""+t[1],16),b:parseInt(t[2]+""+t[2],16)}:{r:parseInt(t[0]+""+t[1],16),g:parseInt(t[2]+""+t[3],16),b:parseInt(t[4]+""+t[5],16)}):Number.NaN},rgbToHex:function(t,a,s){return"0123456789ABCDEF".charAt((t-t%16)/16)+""+"0123456789ABCDEF".charAt(t%16)+("0123456789ABCDEF".charAt((a-a%16)/16)+""+"0123456789ABCDEF".charAt(a%16))+("0123456789ABCDEF".charAt((s-s%16)/16)+""+"0123456789ABCDEF".charAt(s%16))}}); })(this);
+(function (window, undefined) { })(this);
 
 // WCF.Comment.js
-(function (window, undefined) {"use strict";WCF.Comment={},WCF.Comment.Handler=Class.extend({_commentAdd:null,_commentButtonList:{},_comments:{},_container:null,_containerID:"",_displayedComments:0,_loadNextComments:null,_loadNextResponses:{},_proxy:null,_responses:{},_userAvatar:"",_commentData:{},_guestDialog:null,init:function(e,t){this._commentAdd=null,this._commentButtonList={},this._comments={},this._containerID=e,this._displayedComments=0,this._loadNextComments=null,this._loadNextResponses={},this._responses={},this._userAvatar=t,this._container=$("#"+$.wcfEscapeID(this._containerID)),this._container.length||console.debug("[WCF.Comment.Handler] Unable to find container identified by '"+this._containerID+"'"),this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),this._initComments(),this._initResponses(),this._container.data("canAdd")&&this._initAddComment(),WCF.DOMNodeInsertedHandler.execute(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Comment.Handler",$.proxy(this._domNodeInserted,this)),WCF.System.ObjectStore.add("WCF.Comment.Handler",this)},_handleLoadNextComments:function(){this._displayedComments<this._container.data("comments")?(null===this._loadNextComments&&(this._loadNextComments=$('<li class="commentLoadNext"><button class="small">'+WCF.Language.get("wcf.comment.more")+"</button></li>").appendTo(this._container),this._loadNextComments.children("button").click($.proxy(this._loadComments,this))),this._loadNextComments.children("button").enable()):null!==this._loadNextComments&&this._loadNextComments.remove()},_handleLoadNextResponses:function(e){var t=this._comments[e];if(t.data("displayedResponses",t.find("ul.commentResponseList > li").length),t.data("displayedResponses")<t.data("responses")){if(void 0===this._loadNextResponses[e]){var n=t.data("responses")-t.data("displayedResponses");this._loadNextResponses[e]=$('<li class="jsCommentLoadNextResponses"><a>'+WCF.Language.get("wcf.comment.response.more",{count:n})+"</a></li>").appendTo(this._commentButtonList[e]),this._loadNextResponses[e].children("a").data("commentID",e).click($.proxy(this._loadResponses,this)),this._commentButtonList[e].parent().show()}}else if(void 0!==this._loadNextResponses[e]){var s=this._loadNextResponses[e].next();this._loadNextResponses[e].remove(),s.length&&s.trigger("click")}},_loadComments:function(){this._loadNextComments.children("button").disable(),this._proxy.setOption("data",{actionName:"loadComments",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID"),lastCommentTime:this._container.data("lastCommentTime")}}}),this._proxy.sendRequest()},_loadResponses:function(e){this._loadResponsesExecute($(e.currentTarget).disable().data("commentID"),!1)},_loadResponsesExecute:function(e,t){this._proxy.setOption("data",{actionName:"loadResponses",className:"wcf\\data\\comment\\response\\CommentResponseAction",parameters:{data:{commentID:e,lastResponseTime:this._comments[e].data("lastResponseTime"),loadAllResponses:t?1:0}}}),this._proxy.sendRequest()},_domNodeInserted:function(){this._initComments(),this._initResponses()},_initComments:function(){var e=this,t=!1;this._container.find(".jsComment").each(function(n,s){var a=$(s).removeClass("jsComment"),o=a.data("commentID");e._comments[o]=a;var i=a.find("ul.commentResponseList");i.length||(i=a.find(".commentContent"));var r=$('<div class="commentOptionContainer" />').hide().insertAfter(i);e._commentButtonList[o]=$("<ul />").appendTo(r),e._handleLoadNextResponses(o),e._initComment(o,a),e._displayedComments++,t=!0}),t&&this._handleLoadNextComments()},_initComment:function(e,t){if(this._container.data("canAdd")&&this._initAddResponse(e,t),t.data("canEdit")){var n=$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 icon-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>");n.data("commentID",e).appendTo(t.find("ul.commentOptions:eq(0)")).click($.proxy(this._prepareEdit,this))}if(t.data("canDelete")){var s=$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 icon-remove" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>");s.data("commentID",e).appendTo(t.find("ul.commentOptions:eq(0)")).click($.proxy(this._delete,this))}},_initResponses:function(){var e=this;this._container.find(".jsCommentResponse").each(function(t,n){var s=$(n).removeClass("jsCommentResponse"),a=s.data("responseID");e._responses[a]=s,e._initResponse(a,s)})},_initResponse:function(e,t){if(t.data("canEdit")){var n=$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.edit")+'"><span class="icon icon16 icon-pencil" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.edit")+"</span></a></li>"),s=this;n.data("responseID",e).appendTo(t.find("ul.commentOptions:eq(0)")).click(function(e){s._prepareEdit(e,!0)})}if(t.data("canDelete")){var a=$('<li><a href="#" class="jsTooltip" title="'+WCF.Language.get("wcf.global.button.delete")+'"><span class="icon icon16 icon-remove" /> <span class="invisible">'+WCF.Language.get("wcf.global.button.delete")+"</span></a></li>"),s=this;a.data("responseID",e).appendTo(t.find("ul.commentOptions:eq(0)")).click(function(e){s._delete(e,!0)})}},_initAddComment:function(){this._commentAdd=$('<li class="box32 jsCommentAdd"><span class="framed">'+this._userAvatar+"</span><div /></li>").prependTo(this._container);var e=this._commentAdd.children("div"),t=$('<textarea placeholder="'+WCF.Language.get("wcf.comment.add")+'" maxlength="65535" class="long" />').appendTo(e).flexible();$('<button class="small">'+WCF.Language.get("wcf.global.button.submit")+"</button>").click($.proxy(this._save,this)).appendTo(e),t.keyup($.proxy(this._keyUp,this))},_initAddResponse:function(e,t){var n=$('<li class="jsCommentShowAddResponse"><a>'+WCF.Language.get("wcf.comment.button.response.add")+"</a></li>").data("commentID",e).click($.proxy(this._showAddResponse,this)).appendTo(this._commentButtonList[e]),s=$('<div class="box32 commentResponseAdd jsCommentResponseAdd"><span class="framed">'+this._userAvatar+"</span><div /></div>").hide();s.appendTo(this._commentButtonList[e].parent().show());var a=s.children("div"),o=$('<textarea placeholder="'+WCF.Language.get("wcf.comment.response.add")+'" maxlength="65535" class="long" />').data("commentID",e).appendTo(a).flexible();$('<button class="small">'+WCF.Language.get("wcf.global.button.submit")+"</button>").click($.proxy(function(e){this._save(e,!0)},this)).appendTo(a);var i=this;o.keyup(function(e){i._keyUp(e,!0)}),t.data("responsePlaceholder",n).data("responseInput",s)},_prepareEdit:function(e,t){e.preventDefault();var n=$(e.currentTarget),s={objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID")};t===!0?s.responseID=n.data("responseID"):s.commentID=n.data("commentID"),this._proxy.setOption("data",{actionName:"prepareEdit",className:"wcf\\data\\comment\\CommentAction",parameters:{data:s}}),this._proxy.sendRequest()},_showAddResponse:function(e){var t=$(e.currentTarget),n=t.data("commentID");t.prev().hasClass("jsCommentLoadNextResponses")&&(this._loadResponsesExecute(n,!0),t.parent().children(".button").disable()),t.remove();var s=this._comments[n].data("responseInput").show();s.find("textarea").focus(),s.parents(".commentOptionContainer").addClass("jsAddResponseActive")},_keyUp:function(e,t){return e.which===$.ui.keyCode.ESCAPE?void $(e.currentTarget).val("").trigger("blur",e).trigger("updateHeight"):e.which===$.ui.keyCode.ENTER&&e.ctrlKey?(this._save(null,t,$(e.currentTarget)),!1):void 0},_save:function(e,t,n){var s=null===e?n:$(e.currentTarget).parent().children("textarea");s.next("small.innerError").remove();var a=$.trim(s.val());if(""!=a){var o="addComment",i={message:a,objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID")};t===!0&&(o="addResponse",i.commentID=s.data("commentID")),WCF.User.userID?new WCF.Action.Proxy({autoSend:!0,data:{actionName:o,className:"wcf\\data\\comment\\CommentAction",parameters:{data:i}},success:$.proxy(this._success,this),failure:function(e,t,n,a){return e.returnValues&&e.returnValues.fieldName&&"text"===e.returnValues.fieldName&&e.returnValues.errorType?($('<small class="innerError">'+e.returnValues.errorType+"</small>").insertAfter(s),!1):void this._failure(e,t,n,a)}.bind(this)}):(this._commentData=i,this._proxy.setOption("data",{actionName:"getGuestDialog",className:"wcf\\data\\comment\\CommentAction",parameters:{data:{message:a,objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID")}}}),this._proxy.sendRequest())}},_delete:function(e,t){e.preventDefault(),WCF.System.Confirmation.show(WCF.Language.get("wcf.comment.delete.confirmMessage"),$.proxy(function(n){if("confirm"===n){var s={objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID")};t!==!0?s.commentID=$(e.currentTarget).data("commentID"):s.responseID=$(e.currentTarget).data("responseID"),this._proxy.setOption("data",{actionName:"remove",className:"wcf\\data\\comment\\CommentAction",parameters:{data:s}}),this._proxy.sendRequest()}},this))},_failure:function(){return!WCF.User.userID&&this._guestDialog&&this._guestDialog.find('input[type="submit"]').enable(),!0},_success:function(e){switch(e.actionName){case"addComment":e.returnValues.guestDialog?this._createGuestDialog(e.returnValues.guestDialog,e.returnValues.useCaptcha):(this._commentAdd.find("textarea").val("").blur().trigger("updateHeight"),$(e.returnValues.template).insertAfter(this._commentAdd).wcfFadeIn(),WCF.User.userID||this._guestDialog.wcfDialog("close"));break;case"addResponse":if(e.returnValues.guestDialog)this._createGuestDialog(e.returnValues.guestDialog,e.returnValues.useCaptcha);else{var t=this._comments[e.returnValues.commentID];t.find(".jsCommentResponseAdd textarea").val("").blur().trigger("updateHeight");var n=t.find("ul.commentResponseList");n.length||(n=$('<ul class="commentResponseList" />').insertBefore(t.find(".commentOptionContainer"))),$(e.returnValues.template).appendTo(n).wcfFadeIn(),WCF.User.userID||this._guestDialog.wcfDialog("close")}break;case"edit":this._update(e);break;case"loadComments":this._insertComments(e);break;case"loadResponses":this._insertResponses(e);break;case"prepareEdit":this._edit(e);break;case"remove":this._remove(e);break;case"getGuestDialog":this._createGuestDialog(e.returnValues.template,e.returnValues.useCaptcha)}WCF.DOMNodeInsertedHandler.execute()},_insertComments:function(e){$(e.returnValues.template).insertBefore(this._loadNextComments),this._container.data("lastCommentTime",e.returnValues.lastCommentTime)},_insertResponses:function(e){var t=this._comments[e.returnValues.commentID];$(e.returnValues.template).appendTo(t.find("ul.commentResponseList")),t.data("lastResponseTime",e.returnValues.lastResponseTime),this._handleLoadNextResponses(e.returnValues.commentID)},_remove:function(e){if(e.returnValues.commentID)this._comments[e.returnValues.commentID].remove(),delete this._comments[e.returnValues.commentID];else{var t=this._responses[e.returnValues.responseID],n=this._comments[t.parents("li.comment:eq(0)").data("commentID")];n.data("responses",parseInt(n.data("responses"))-1);var s=t.parent();t.remove(),s.children().length||s.empty(),delete this._responses[e.returnValues.responseID]}},_edit:function(e){var t;t=e.returnValues.commentID?this._comments[e.returnValues.commentID].find(".commentContent:eq(0) .userMessage:eq(0)"):this._responses[e.returnValues.responseID].find(".commentContent:eq(0) .userMessage:eq(0)"),t.html($.proxy(function(t,n){var s=$('<textarea class="long" maxlength="65535" />').val(e.returnValues.message);return s.data("__html",n).keyup($.proxy(this._keyUpEdit,this)),e.returnValues.commentID?s.data("commentID",e.returnValues.commentID):s.data("responseID",e.returnValues.responseID),s},this));var n=t.children("textarea");$('<button class="small">'+WCF.Language.get("wcf.global.button.submit")+"</button>").insertAfter(n).click($.proxy(this._saveEdit,this)),n.focus().flexible(),t.parent().find(".containerHeadline:eq(0)").hide(),t.parent().find(".buttonGroupNavigation:eq(0)").hide()},_update:function(e){var t;t=e.returnValues.commentID?this._comments[e.returnValues.commentID].find(".commentContent:eq(0) .userMessage:eq(0) > textarea"):this._responses[e.returnValues.responseID].find(".commentContent:eq(0) .userMessage:eq(0) > textarea"),t.data("__html",e.returnValues.message),this._cancelEdit(t)},_createGuestDialog:function(e,t){!!this._guestDialog;this._guestDialog||(this._guestDialog=$('<div id="commentAddGuestDialog" />').hide().appendTo(document.body)),this._guestDialog.html(e),this._guestDialog.data("useCaptcha",t),this._guestDialog.find('input[type="submit"]').click($.proxy(this._submit,this)),this._guestDialog.find('input[type="text"]').keydown($.proxy(this._keyDown,this)),this._guestDialog.wcfDialog({title:WCF.Language.get("wcf.comment.guestDialog.title")})},_keyDown:function(e){e.which===$.ui.keyCode.ENTER&&this._submit()},_submit:function(){var e={actionName:this._commentData.commentID?"addResponse":"addComment",className:"wcf\\data\\comment\\CommentAction"},t=this._commentData;t.username=this._guestDialog.find('input[name="username"]').val(),e.parameters={data:t},e=$.extend(WCF.System.Captcha.getData("commentAdd"),e),this._proxy.setOption("data",e),this._proxy.sendRequest()},_keyUpEdit:function(e){return e.which===$.ui.keyCode.ESCAPE?void this._cancelEdit($(e.currentTarget)):e.which===$.ui.keyCode.ENTER&&e.ctrlKey?(this._saveEdit(e),!1):void 0},_saveEdit:function(e){var t=$(e.currentTarget);t.is("button")&&(t.prev("small.innerError").remove(),t=t.prev("textarea"));var n=$.trim(t.val());if(""!==n){var s={message:n,objectID:this._container.data("objectID"),objectTypeID:this._container.data("objectTypeID")};t.data("commentID")?s.commentID=t.data("commentID"):s.responseID=t.data("responseID"),new WCF.Action.Proxy({autoSend:!0,data:{actionName:"edit",className:"wcf\\data\\comment\\CommentAction",parameters:{data:s}},success:$.proxy(this._success,this),failure:function(e,n,s,a){return e.returnValues&&e.returnValues.fieldName&&"text"===e.returnValues.fieldName&&e.returnValues.errorType?($('<small class="innerError">'+e.returnValues.errorType+"</small>").insertAfter(t),!1):void this._failure(e,n,s,a)}.bind(this)})}},_cancelEdit:function(e){e.parent().prev(".containerHeadline:eq(0)").show(),e.parent().next(".buttonGroupNavigation:eq(0)").show(),e.parent().html(e.data("__html"))}}),WCF.Comment.Like=WCF.Like.extend({_getContainers:function(){return $(".commentList > li.comment")},_getObjectID:function(e){return this._containers[e].data("commentID")},_buildWidget:function(e,t,n,s){this._containers[e].find(".containerHeadline:eq(0) > h3").append(s),this._canLike&&(t.appendTo(this._containers[e].find(".commentOptions:eq(0)")),n.appendTo(this._containers[e].find(".commentOptions:eq(0)")))},_getWidgetContainer:function(){},_addWidget:function(){}}),WCF.Comment.Response={},WCF.Comment.Response.Like=WCF.Like.extend({_addWidget:function(){},_buildWidget:function(e,t,n,s){this._containers[e].find(".containerHeadline:eq(0) > h3").append(s),this._canLike&&(t.appendTo(this._containers[e].find(".commentOptions:eq(0)")),n.appendTo(this._containers[e].find(".commentOptions:eq(0)")))},_getContainers:function(){return $(".commentResponseList > li.commentResponse")},_getObjectID:function(e){return this._containers[e].data("responseID")},_getWidgetContainer:function(){}}); })(this);
+(function (window, undefined) { })(this);
 
 // WCF.ImageViewer.js
-(function (window, undefined) {"use strict";WCF.ImageViewer=Class.extend({_triggerElement:null,init:function(){this._triggerElement=$('<span class="wcfImageViewerTriggerElement" />').data("disableSlideshow",!0).hide().appendTo(document.body),this._triggerElement.wcfImageViewer({enableSlideshow:0,imageSelector:".jsImageViewerEnabled",staticViewer:!0}),WCF.DOMNodeInsertedHandler.addCallback("WCF.ImageViewer",$.proxy(this._domNodeInserted,this)),WCF.DOMNodeInsertedHandler.execute()},_domNodeInserted:function(){this._initImageSizeCheck(),this._rebuildImageViewer()},_rebuildImageViewer:function(){var i=$("a.jsImageViewer");i.length&&i.removeClass("jsImageViewer").addClass("jsImageViewerEnabled").click($.proxy(this._click,this))},_click:function(i){i.preventDefault(),i.stopPropagation(),this._triggerElement.wcfImageViewer("open",null,$(i.currentTarget).wcfIdentify())},_initImageSizeCheck:function(){$(".jsResizeImage").each($.proxy(function(i,e){e.complete&&this._checkImageSize({currentTarget:e})},this)),$(".jsResizeImage").on("load",$.proxy(this._checkImageSize,this))},_checkImageSize:function(i){var e=$(i.currentTarget);if(!e.is(":visible"))return void e.off("load");if(e.removeClass("jsResizeImage"),!e.closest(".messageSignature").length){var t=new Image;t.src=e.attr("src");var s=e.closest("div.messageText, div.messageTextPreview").width();s<t.width?e.parents("a").length||(e.wrap('<a href="'+e.attr("src")+'" class="jsImageViewerEnabled embeddedImageLink" />'),e.parent().click($.proxy(this._click,this)),"right"==e.css("float")?e.parent().addClass("messageFloatObjectRight"):"left"==e.css("float")&&e.parent().addClass("messageFloatObjectLeft"),e[0].style.removeProperty("float"),e[0].style.removeProperty("margin")):e.removeClass("embeddedAttachmentLink")}}}),$.widget("ui.wcfImageViewer",{_active:-1,_activeImage:null,_container:null,_didInit:!1,_disableSlideshow:!1,_eventNamespace:"",_images:[],_isMobile:!1,_isOpen:!1,_items:-1,_maxDimensions:{height:0,width:0},_proxy:null,_slideshowEnabled:!1,_thumbnailContainerWidth:0,_thumbnailMarginRight:0,_thumbnailOffset:0,_thumbnailWidth:0,_timer:null,_ui:{buttonNext:null,buttonPrevious:null,header:null,image:null,imageContainer:null,imageList:null,slideshow:{container:null,enlarge:null,next:null,previous:null,toggle:null}},options:{shiftBy:5,enableSlideshow:1,speed:5,className:"",imageSelector:"",staticViewer:!1},_create:function(){this._active=-1,this._activeImage=null,this._container=null,this._didInit=!1,this._disableSlideshow=this.element.data("disableSlideshow"),this._eventNamespace=this.element.wcfIdentify(),this._images=[],this._isMobile=!1,this._isOpen=!1,this._items=-1,this._maxDimensions={height:document.documentElement.clientHeight,width:document.documentElement.clientWidth},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._slideshowEnabled=!1,this._thumbnailContainerWidth=0,this._thumbnailMarginRight=0,this._thumbnailOffset=0,this._thumbnaiLWidth=0,this._timer=null,this._ui={},this.element.click($.proxy(this.open,this))},open:function(i,e){if(i&&i.preventDefault(),this._isOpen)return!1;if(this.options.staticViewer){var t=this._getStaticImages();this._initUI(),this._createThumbnails(t,!0),this._render(!0,void 0,e),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable(),$.browser.touch&&setTimeout($.proxy(function(){this._isMobile&&!this._container.hasClass("maximized")&&this._toggleView()},this),500)}else 0===this._images.length?this._loadNextImages(!0):(this._render(!1,this.element.data("targetImageID")),this._items>1&&this._slideshowEnabled&&this.startSlideshow(),this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable());return this._bindListener(),!0},close:function(i){return i&&i.preventDefault(),this._isOpen?(this._container.removeClass("open"),null!==this._timer&&this._timer.stop(),this._unbindListener(),this._isOpen=!1,WCF.System.DisableScrolling.enable(),WCF.System.DisableZoom.enable(),!0):!1},startSlideshow:function(){return this._disableSlideshow||this._slideshowEnabled?!1:(null===this._timer?this._timer=new WCF.PeriodicalExecuter($.proxy(function(){var i=this._active+1;i==this._items&&(i=0),this.showImage(i)},this),1e3*this.options.speed):this._timer.resume(),this._slideshowEnabled=!0,this._ui.slideshow.toggle.children("span").removeClass("icon-play").addClass("icon-pause"),!0)},stopSlideshow:function(i){return this._slideshowEnabled?(this._timer.stop(),i&&this._ui.slideshow.toggle.children("span").removeClass("icon-pause").addClass("icon-play"),this._slideshowEnabled=!1,!0):!1},_bindListener:function(){$(document).on("keydown."+this._eventNamespace,$.proxy(this._keyDown,this)),$(window).on("resize."+this._eventNamespace,$.proxy(this._renderImage,this))},_unbindListener:function(){$(document).off("keydown."+this._eventNamespace),$(window).off("resize."+this._eventNamespace)},_keyDown:function(i){switch(i.which){case $.ui.keyCode.ESCAPE:this.close();break;case $.ui.keyCode.LEFT:this._previousImage();break;case $.ui.keyCode.RIGHT:this._nextImage();break;case $.ui.keyCode.UP:this._container.hasClass("maximized")||this._toggleView();break;case $.ui.keyCode.DOWN:this._container.hasClass("maximized")&&this._toggleView();break;case $.ui.keyCode.ENTER:var e=this._ui.header.find("> div > h1 > a");1==e.length?window.location=e.prop("href"):this._ui.slideshow.full.trigger("click");break;case 80:this._ui.slideshow.toggle.trigger("click");break;default:return!0}return!1},_render:function(i,e,t){this._container.addClass("open");var s=null;if(i&&(s=this._ui.imageList.children("li:eq(0)"),this._thumbnailMarginRight=parseInt(s.css("marginRight").replace(/px$/,""))||0,this._thumbnailWidth=s.outerWidth(!0),this._thumbnailContainerWidth=this._ui.imageList.parent().innerWidth(),this._items>1&&this.options.enableSlideshow&&!e&&!t&&this.startSlideshow()),e)this._ui.imageList.children("li").each($.proxy(function(i,t){var s=$(t);return s.data("objectID")==e?(s.trigger("click"),this.moveToImage(s.data("index")),!1):void 0},this));else if(null!==t){var a=0;$(this.options.imageSelector).each(function(i,e){return $(e).wcfIdentify()==t?(a=i,!1):void 0});var n=this._ui.imageList.children("li:eq("+a+")");if(-1!==this._active){var h=!1;this._active!=n.data("index")&&(h=!0),this._ui.images[this._activeImage].prop("src")!=this._images[this._active].image.url&&(h=!0),h&&(this._active=-1)}n.trigger("click"),this.moveToImage(n.data("index"))}else null!==s&&s.trigger("click");this._toggleButtons(),this._preload()},_preload:function(){if(this._images.length<this._items){var i=this._images.length*this._thumbnailWidth;i-this._thumbnailOffset<this._thumbnailContainerWidth&&this._loadNextImages(!1)}},_showImage:function(i){this.showImage($(i.currentTarget).data("index"),!0)},showImage:function(i,e){if(this._active==i)return!1;this.stopSlideshow(e||!1),-1!=this._active&&this._images[this._active].listItem.removeClass("active"),this._active=i;var t=this._images[i];this._ui.imageList.children("li").removeClass("active"),t.listItem.addClass("active");var s=this._ui.imageContainer.getDimensions("inner"),a=this._activeImage?0:1;null!==this._activeImage&&this._ui.images[this._activeImage].removeClass("active"),this._activeImage=a;var n=this._active;if(this._ui.imageContainer.addClass("loading"),this._ui.images[a].off("load").prop("src","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="),this._ui.images[a].on("load",$.proxy(function(){this._imageOnLoad(n,a)},this)),this._renderImage(a,t,s),!this.options.staticViewer){var h=this._ui.header.find("> div > a").prop("href",t.user.link).prop("title",t.user.username);h.children("img").prop("src",t.user.avatarURL)}var o=WCF.String.escapeHTML(t.image.title);if(t.image.link&&(o='<a href="'+t.image.link+'">'+o+"</a>"),this._ui.header.find("> div > h1").html(o),!this.options.staticViewer){var l=t.series&&t.series.title?WCF.String.escapeHTML(t.series.title):"";t.series.link&&(l='<a href="'+t.series.link+'">'+l+"</a>"),this._ui.header.find("> div > h2").html(l)}return this._ui.header.find("> div > h3").text(WCF.Language.get("wcf.imageViewer.seriesIndex").replace(/{x}/,t.listItem.data("index")+1).replace(/{y}/,this._items)),this._ui.slideshow.full.data("link",t.image.fullURL?t.image.fullURL:t.image.url),this.moveToImage(t.listItem.data("index")),this._toggleButtons(),!0},_imageOnLoad:function(i,e){i==this._active&&(this._ui.imageContainer.removeClass("loading"),this._ui.images[e].addClass("active"),this.options.staticViewer&&this._renderImage(e,null),this.startSlideshow())},_renderImage:function(i,e,t){var s=!0;e||(i=this._activeImage,e=this._images[this._active],t={height:$(window).height()-(this._container.hasClass("maximized")||this._container.hasClass("wcfImageViewerMobile")?0:200),width:this._ui.imageContainer.innerWidth()},s=!1),t.height-=22,t.width-=20;var a=this._ui.images[i];if(a.prop("src")!==e.image.url&&a.prop("src",e.image.url),s&&a[0].complete&&a.trigger("load"),this.options.staticViewer&&!e.image.height&&a[0].complete)if($.browser.mozilla){var n=new Image;n.src=e.image.url,e.image.height=n.height,e.image.width=n.width}else a.css({height:"auto",width:"auto"}),e.image.height=a[0].height,e.image.width=a[0].width;var h=e.image.height,o=e.image.width,l=0;h>t.height&&(l=t.height/h,h=t.height,o=Math.floor(o*l)),o>t.width&&(l=t.width/o,o=t.width,h=Math.floor(h*l));var r=Math.floor((t.width-o)/2);this._ui.images[i].css({height:h+"px",left:r+10+"px",marginTop:-1*Math.round(h/2)+"px",width:o+"px"})},_initUI:function(){if(this._didInit)return!1;this._didInit=!0,this._container=$('<div class="wcfImageViewer'+(this.options.staticViewer?" wcfImageViewerStatic":"")+'" />').appendTo(document.body);var i=$("<div><img /><img /></div>").appendTo(this._container),e=$('<footer><span class="wcfImageViewerButtonPrevious icon icon-double-angle-left" /><div><ul /></div><span class="wcfImageViewerButtonNext icon icon-double-angle-right" /></footer>').appendTo(this._container),t=$("<ul />").appendTo(i),s=$('<li class="wcfImageViewerSlideshowButtonPrevious"><span class="icon icon48 icon-angle-left" /></li>').appendTo(t),a=$('<li class="wcfImageViewerSlideshowButtonToggle pointer"><span class="icon icon48 icon-play" /></li>').appendTo(t),n=$('<li class="wcfImageViewerSlideshowButtonNext"><span class="icon icon48 icon-angle-right" /></li>').appendTo(t),h=$('<li class="wcfImageViewerSlideshowButtonEnlarge pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.enlarge")+'"><span class="icon icon48 icon-resize-full" /></li>').appendTo(t),o=$('<li class="wcfImageViewerSlideshowButtonFull pointer jsTooltip" title="'+WCF.Language.get("wcf.imageViewer.button.full")+'"><span class="icon icon48 icon-external-link" /></li>').appendTo(t);return this._ui={buttonNext:e.children("span.wcfImageViewerButtonNext"),buttonPrevious:e.children("span.wcfImageViewerButtonPrevious"),header:$("<header><div"+(this.options.staticViewer?">":' class="box64"><a class="framed jsTooltip"><img /></a>')+"<h1 /><h2 /><h3 /></div></header>").appendTo(this._container),imageContainer:i,images:[i.children("img:eq(0)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",function(){$(this).removeClass("animateTransformation")}),i.children("img:eq(1)").on("webkitTransitionEnd transitionend msTransitionEnd oTransitionEnd",function(){$(this).removeClass("animateTransformation")})],imageList:e.find("> div > ul"),slideshow:{container:t,enlarge:h,full:o,next:n,previous:s,toggle:a}},this._ui.buttonNext.click($.proxy(this._next,this)),this._ui.buttonPrevious.click($.proxy(this._previous,this)),n.click($.proxy(this._nextImage,this)),s.click($.proxy(this._previousImage,this)),h.click($.proxy(this._toggleView,this)),a.click($.proxy(function(){this._items<2||(this._slideshowEnabled?this.stopSlideshow(!0):(this._disableSlideshow=!1,this.startSlideshow()))},this)),o.click(function(i){window.location=$(i.currentTarget).data("link")}),$('<span class="wcfImageViewerButtonClose icon icon48 icon-remove pointer jsTooltip" title="'+WCF.Language.get("wcf.global.button.close")+'" />').appendTo(this._ui.header).click($.proxy(this.close,this)),$.browser.mobile||i.click(function(e){e.target===i[0]&&this.close()}.bind(this)),WCF.DOMNodeInsertedHandler.execute(),enquire.register("screen and (max-width: 800px)",{match:$.proxy(this._enableMobileView,this),unmatch:$.proxy(this._disableMobileView,this)}),!0},_enableMobileView:function(){this._container.addClass("wcfImageViewerMobile");var i=this;this._ui.imageContainer.swipe({swipeLeft:function(e){i._container.hasClass("maximized")&&i._nextImage(e)},swipeRight:function(e){i._container.hasClass("maximized")&&i._previousImage(e)},tap:function(e,t){switch(t.tagName){case"DIV":case"IMG":i._toggleView()}}}),this._isMobile=!0},_disableMobileView:function(){this._container.removeClass("wcfImageViewerMobile"),this._ui.imageContainer.swipe("destroy"),this._isMobile=!1},_toggleView:function(){this._ui.images[this._activeImage].addClass("animateTransformation"),this._container.toggleClass("maximized"),this._ui.slideshow.enlarge.toggleClass("active").children("span").toggleClass("icon-resize-full").toggleClass("icon-resize-small"),this._renderImage(null,void 0,null)},_next:function(i,e){if(this._ui.buttonNext.hasClass("pointer")){void 0==e&&this.stopSlideshow(!0);var t=Math.max(this._items*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight,0);this._thumbnailOffset=Math.min(this._thumbnailOffset+this._thumbnailWidth*(e?e:this.options.shiftBy),t),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)}this._preload(),this._toggleButtons()},_previous:function(i,e){this._ui.buttonPrevious.hasClass("pointer")&&(void 0==e&&this.stopSlideshow(!0),this._thumbnailOffset=Math.max(this._thumbnailOffset-this._thumbnailWidth*(e?e:this.options.shiftBy),0),this._ui.imageList.css("marginLeft",-1*this._thumbnailOffset)),this._toggleButtons()},_nextImage:function(i){this._ui.slideshow.next.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active+1),i&&(i.preventDefault(),i.stopPropagation()))},_previousImage:function(i){this._ui.slideshow.previous.hasClass("pointer")&&(this._disableSlideshow=!0,this.stopSlideshow(!0),this.showImage(this._active-1),i&&(i.preventDefault(),i.stopPropagation()))},moveToImage:function(i){var e=(i-3)*this._thumbnailWidth,t=e+5*this._thumbnailWidth,s=this._thumbnailOffset,a=this._thumbnailOffset+this._thumbnailContainerWidth,n=!1;if((s>e||t>a)&&(n=!0),n){var h=0;if(s>e){for(;s>e;)h++,s-=this._thumbnailWidth;this._previous(null,h)}else{for(;t>a;)h++,a+=this._thumbnailWidth;this._next(null,h)}}},_toggleButtons:function(){this._thumbnailOffset>0?this._ui.buttonPrevious.addClass("pointer"):this._ui.buttonPrevious.removeClass("pointer");var i=this._images.length*this._thumbnailWidth-this._thumbnailContainerWidth-this._thumbnailMarginRight;this._thumbnailOffset>=i?this._ui.buttonNext.removeClass("pointer"):this._ui.buttonNext.addClass("pointer"),this._active>0?this._ui.slideshow.previous.addClass("pointer"):this._ui.slideshow.previous.removeClass("pointer"),this._active+1<this._images.length?this._ui.slideshow.next.addClass("pointer"):this._ui.slideshow.next.removeClass("pointer"),this._items<2?this._ui.slideshow.toggle.removeClass("pointer"):this._ui.slideshow.toggle.addClass("pointer")},_createThumbnails:function(i){this.options.staticViewer&&(this._images=[],this._ui.imageList.empty());for(var e=0,t=i.length;t>e;e++){var s=i[e],a=$('<li class="loading pointer"><img src="'+s.thumbnail.url+'" /></li>').appendTo(this._ui.imageList);a.data("index",this._images.length).data("objectID",s.objectID).click($.proxy(this._showImage,this));var n=a.children("img");if(n.get(0).complete)a.removeClass("loading"),this.options.staticViewer&&this._fixThumbnailDimensions(n);else{var h=this;n.on("load",function(){var i=$(this);i.parent().removeClass("loading"),h.options.staticViewer&&h._fixThumbnailDimensions(i)})}s.listItem=a,this._images.push(s)}},_fixThumbnailDimensions:function(i){var e=new Image;e.src=i.prop("src");var t=e.height,s=e.width;if(t==s)t=s=80;else if(s>t){var a=80/s;s=80,t*=a}else{var a=80/t;t=80,s*=a}i.css({height:t+"px",width:s+"px"})},_loadNextImages:function(i){this._proxy.setOption("data",{actionName:"loadNextImages",className:this.options.className,interfaceName:"wcf\\data\\IImageViewerAction",objectIDs:[this.element.data("objectID")],parameters:{maximumHeight:this._maxDimensions.height,maximumWidth:this._maxDimensions.width,offset:this._images.length,targetImageID:i&&this.element.data("targetImageID")?this.element.data("targetImageID"):0}}),this._proxy.setOption("showLoadingOverlay",!1),this._proxy.sendRequest()},_getStaticImages:function(){var i=[];return $(this.options.imageSelector).each(function(e,t){var s=$(t),a=s.children("img");a.length||(a=s.parentsUntil(".formAttachmentList").last().find(".attachmentTinyThumbnail")),i.push({image:{fullURL:a.data("source")?a.data("source").replace(/\\\//g,"/"):s.prop("href"),link:"",title:s.prop("title"),url:s.prop("href")},series:null,thumbnail:{url:a.prop("src")},user:null})}),this._items=i.length,i},_success:function(i){i.returnValues.items&&(this._items=i.returnValues.items);var e=this._initUI();this._createThumbnails(i.returnValues.images);var t=i.returnValues.targetImageID?i.returnValues.targetImageID:0;this._render(e,t),this._isOpen||(this._isOpen=!0,WCF.System.DisableScrolling.disable(),WCF.System.DisableZoom.disable())}}); })(this);
+(function (window, undefined) { })(this);
 
 // WCF.Label.js
-(function (window, undefined) {"use strict";WCF.Label={},WCF.Label.ACPList=Class.extend({_labelInput:null,_labelList:[],init:function(){this._labelInput=$("#label").keydown($.proxy(this._keyPressed,this)).keyup($.proxy(this._keyPressed,this)).blur($.proxy(this._keyPressed,this)),$.browser.mozilla&&$.browser.touch&&this._labelInput.on("input",$.proxy(this._keyPressed,this)),$("#labelList").find('input[type="radio"]').each($.proxy(function(t,e){var i=$(e);"custom"!==i.prop("value")&&this._labelList.push($(i.next("span")))},this))},_keyPressed:function(){var t=this._labelInput.prop("value");""===t&&(t=WCF.Language.get("wcf.acp.label.defaultValue"));for(var e=0,i=this._labelList.length;i>e;e++)this._labelList[e].text(t)}}),WCF.Label.ACPList.Connect=Class.extend({init:function(){var t=$("#connect .structuredList li");t.length&&t.each($.proxy(function(t,e){$(e).find('input[type="checkbox"]').click($.proxy(this._click,this))},this))},_click:function(t){var e=$(t.currentTarget);if(e.is(":checked")){e=e.parents("li");for(var i=e.data("depth");;){if(e=e.next(),!e.length)return!0;if(e.data("depth")<=i)return!0;e.find('input[type="checkbox"]').prop("checked","checked")}}}}),WCF.Label.Chooser=Class.extend({_container:null,_groups:{},_showWithoutSelection:!1,init:function(t,e,i,a){if(this._container=null,this._groups={},this._showWithoutSelection=a===!0,this._initContainers(e),$.getLength(t))for(var n in t){var l=this._groups[n];l&&WCF.Dropdown.getDropdownMenu(l.wcfIdentify()).find("> ul > li:not(.dropdownDivider)").each($.proxy(function(e,i){var a=$(i),l=a.data("labelID")||0;l&&t[n]==l&&this._selectLabel(a,!0)},this))}for(var o in this._containers){var s=this._containers[o];void 0===s.data("labelID")&&s.data("labelID",0)}this._container=$(e),i?$(i).click($.proxy(this._submit,this)):this._container.is("form")&&this._container.submit($.proxy(this._submit,this))},_initContainers:function(t){$(t).find(".labelChooser").each($.proxy(function(t,e){var i=$(e),a=i.data("groupID");if(!this._groups[a]){var n=i.wcfIdentify(),l=WCF.Dropdown.getDropdownMenu(n);null===l&&(WCF.Dropdown.initDropdown(i.find(".dropdownToggle")),l=WCF.Dropdown.getDropdownMenu(n));var o=l;if("div"==l.getTagName()&&l.children(".scrollableDropdownMenu").length&&(o=$("<ul />").appendTo(l),l=l.children(".scrollableDropdownMenu")),this._groups[a]=i,l.children("li").data("groupID",a).click($.proxy(this._click,this)),(!i.data("forceSelection")||this._showWithoutSelection)&&$('<li class="dropdownDivider" />').appendTo(o),this._showWithoutSelection&&$('<li data-label-id="-1"><span><span class="badge label">'+WCF.Language.get("wcf.label.withoutSelection")+"</span></span></li>").data("groupID",a).appendTo(o).click($.proxy(this._click,this)),!i.data("forceSelection")){var s=$('<li data-label-id="0"><span><span class="badge label">'+WCF.Language.get("wcf.label.none")+"</span></span></li>").data("groupID",a).appendTo(o);s.click($.proxy(this._click,this))}}},this))},_click:function(t){this._selectLabel($(t.currentTarget),!1)},_selectLabel:function(t,e){var i=this._groups[t.data("groupID")];e&&void 0!==i.data("labelID")||(t.data("labelID")?i.data("labelID",t.data("labelID")):i.data("labelID",0),t=t.find("span > span"),i.find(".dropdownToggle > span").removeClass().addClass(t.attr("class")).text(t.text()))},_submit:function(){var t=this._container.find(".formSubmit");t.find('input[type="hidden"]').each(function(t,e){var i=$(e);0===i.attr("name").indexOf("labelIDs[")&&i.remove()});for(var e in this._groups){var i=this._groups[e];i.data("labelID")&&$('<input type="hidden" name="labelIDs['+e+']" value="'+i.data("labelID")+'" />').appendTo(t)}}}); })(this);
+(function (window, undefined) { })(this);
 
 // WCF.Location.js
-(function (window, undefined) {"use strict";WCF.Location={},WCF.Location.Util={getLocation:function(t,e){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition(function(e){t(e.coords.latitude,e.coords.longitude)},function(){t(void 0,void 0)},{timeout:e||5e3}):t(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&enquire.register("screen and (max-width: 800px)",{setup:$.proxy(this._addSidebarMapListener,this),deferSetup:!0}),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy(function(){e.open(this._map,t)},this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;case"hybrid":default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});if(s&&a.setIcon(s),i){var n=new google.maps.InfoWindow({content:i});this._addInfoWindowEventListener(a,n),a.infoWindow=n}return this._markers.push(a),a},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t=null,e=null,o=null,s=null;for(var i in this._markers){var a=this._markers[i],n=a.getPosition().lat(),r=a.getPosition().lng();null===t?(t=e=n,o=s=r):(t>n?t=n:n>e&&(e=n),o>n?o=n:r>s&&(s=r))}this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(t,o),new google.maps.LatLng(e,s)))},removeMarkers:function(){for(var t in this._markers)this._markers[t].setMap(null);this._markers=[]},setBounds:function(t,e){this._map.fitBounds(new google.maps.LatLngBounds(new google.maps.LatLng(e.latitude,e.longitude),new google.maps.LatLng(t.latitude,t.longitude)))},setCenter:function(t,e){this._map.setCenter(new google.maps.LatLng(t,e))}}),WCF.Location.GoogleMaps.LargeMap=WCF.Location.GoogleMaps.Map.extend({_actionClassName:null,_additionalParameters:{},_locationSearch:null,_locationSearchInputSelector:null,_markerClusterer:null,_objectIDs:[],_previousNorthEast:null,_previousSouthWest:null,init:function(t,e,o,s,i){this._super(t,e),this._actionClassName=o,this._locationSearchInputSelector=s||"",this._additionalParameters=i||{},this._objectIDs=[],this._locationSearchInputSelector&&(this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(s,$.proxy(this._centerMap,this))),this._markerClusterer=new MarkerClusterer(this._map,this._markers,{maxZoom:17,imagePath:"//google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/images/m"}),this._markerSpiderfier=new OverlappingMarkerSpiderfier(this._map,{keepSpiderfied:!0,markersWontHide:!0,markersWontMove:!0}),this._markerSpiderfier.addListener("click",$.proxy(function(t){t.infoWindow&&t.infoWindow.open(this._map,t)},this)),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._previousNorthEast=null,this._previousSouthWest=null,google.maps.event.addListener(this._map,"idle",$.proxy(this._loadMarkers,this))},_addInfoWindowEventListener:function(){},_centerMap:function(t){this.setCenter(t.location.lat(),t.location.lng()),$(this._locationSearchInputSelector).val(t.label)},_loadMarkers:function(){var t=this._map.getBounds().getNorthEast(),e=this._map.getBounds().getSouthWest();return this._previousNorthEast&&this._previousNorthEast.lat()>=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng()?!1:(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),!0)},_success:function(t){if(t.returnValues&&t.returnValues.markers)for(var e in t.returnValues.markers){var o=t.returnValues.markers[e];this.addMarker(o.latitude,o.longitude,o.title,null,o.infoWindow),o.objectID?this._objectIDs.push(o.objectID):o.objectIDs&&(this._objectIDs=this._objectIDs.concat(o.objectIDs))}},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('<div class="gmnoprint googleMapsCustomControlContainer"><div class="gm-style-mtc"><div class="googleMapsCustomControl">'+WCF.Language.get("wcf.map.showLocationSuggestions")+"</div></div></div>");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a=$(i),n=$('<a class="googleMapsUseLocationSuggestionLink" />').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);a.append($('<p class="marginTopTiny" />').append(n));var r=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",a.get(0));return n.data("marker",r),r},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t);for(var e=[],o=0,s=this._markers.length;s>o;o++){var i=this._markers[o];i.draggable||(i.setVisible(t),t&&e.push(i))}this._markerClusterer.clearMarkers(),t&&this._markerClusterer.addMarkers(e),this._loadMarkers()}}),WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i),this.setDelay(500),this._geocoder=new google.maps.Geocoder},_createListItem:function(t){var e=$("<li><span>"+WCF.String.escapeHTML(t.formatted_address)+"</span></li>").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy(function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null},this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){var o=0;for(var s in t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var i=this._searchInput.parents(".dropdown").wcfIdentify();WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy(function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))},this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy(function(t){null!==t&&$(this._searchInput).val(t)},this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(t,e,o,s,i){e&&(o=e.getPosition().lat(),s=e.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(o,s);this._geocoder.geocode({latLng:a},function(e,o){t(o==google.maps.GeocoderStatus.OK?i?e:e[0].formatted_address:null)})}}; })(this);
+(function (window, undefined) { })(this);
 
 // WCF.Message.js
-(function (window, undefined) {"use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({_dialog:null,init:function(){this._dialog=null,this._initCodeBoxes(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.BBCode.CodeViewer",$.proxy(this._initCodeBoxes,this)),WCF.DOMNodeInsertedHandler.execute()},_initCodeBoxes:function(){$(".codeBox:not(.jsCodeViewer)").each($.proxy(function(e,t){var i=$(t).addClass("jsCodeViewer");$('<span class="icon icon16 icon-copy pointer jsTooltip" title="'+WCF.Language.get("wcf.message.bbcode.code.copy")+'" />').appendTo(i.find("div > h3")).click($.proxy(this._click,this))},this))},_click:function(e){var t="";$(e.currentTarget).parents("div").next("ol").children("li").each(function(e,i){t&&(t+="\n"),t+=$(i).text().replace(/\n+$/,"")}),null===this._dialog?(this._dialog=$('<div><textarea cols="60" rows="12" readonly="readonly" /></div>').hide().appendTo(document.body),this._dialog.children("textarea").val(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.bbcode.code.copy")})):(this._dialog.children("textarea").val(t),this._dialog.wcfDialog("open")),this._dialog.children("textarea").select()}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,i,s){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=i,this._buttonSelector=s?s:".jsRevertButton",this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var e=this;this._newIDInputs.change(function(){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),e._oldIDInputs.each(function(){var e=parseInt($(this).val());"current"===$(this).val()&&(e=1/0),e>=t?$(this).disable():$(this).enable()})}),this._oldIDInputs.change(function(){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),e._newIDInputs.each(function(){var e=parseInt($(this).val());"current"===$(this).val()&&(e=1/0),t>=e?$(this).disable():$(this).enable()})}),this._oldIDInputs.filter(":checked").change(),this._newIDInputs.filter(":checked").change()},_initElements:function(){var e=this;$(this._containerSelector).each(function(t,i){var s=$(i);s.find(e._buttonSelector).click($.proxy(e._click,e))})},_click:function(e){var t=$(e.currentTarget);if(e.preventDefault(),t.data("confirmMessage")){var i=this;WCF.System.Confirmation.show(t.data("confirmMessage"),function(e){"cancel"!==e&&i._sendRequest(t)})}else this._sendRequest(t)},_sendRequest:function(e){this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(){window.location.reload(!0)}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit(function(){$(this).find(".formSubmit input[type=submit]").disable()});$(window).unload(function(){e.find(".formSubmit input[type=submit]").enable()})}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:null,_proxy:null,_previewButton:null,_previewButtonLabel:"",init:function(e,t,i){return this._className=e,this._messageFieldID=$.wcfEscapeID(t),this._messageField=$("#"+this._messageFieldID),this._messageField.length?(i=$.wcfEscapeID(i),this._previewButton=$("#"+i),this._previewButton.length?(this._previewButton.click($.proxy(this._click,this)),void(this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}))):void console.debug("[WCF.Message.Preview] Unable to find preview button identified by '"+i+"'")):void console.debug("[WCF.Message.Preview] Unable to find message field identified by '"+this._messageFieldID+"'")},_click:function(e){var t=this._getMessage();return null===t?void console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '"+this._messageFieldID+"'"):(this._proxy.setOption("data",{actionName:"getMessagePreview",className:this._className,parameters:this._getParameters(t)}),this._proxy.sendRequest(),this._previewButtonLabel=this._previewButton.html(),this._previewButton.html(WCF.Language.get("wcf.global.loading")).disable(),e.stopPropagation(),!1)},_getParameters:function(e){var t={};return $("#settings_"+this._messageFieldID).find("input[type=checkbox]").each(function(e,i){var s=$(i);s.is(":checked")&&(t[s.prop("name")]=s.prop("value"))}),{data:{message:e},options:t}},_getMessage:function(){return $.browser.redactor?this._messageField.data("redactor")?this._messageField.redactor("wutil.getText"):null:$.trim(this._messageField.val())},_success:function(e){this._previewButton.html(this._previewButtonLabel).enable(),this._messageField.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(){},_failure:function(e){if(null===e||void 0===e.returnValues||void 0===e.returnValues.errorType)return!0;this._previewButton.html(this._previewButtonLabel).enable();var t=this._messageField.next("small.innerError").empty();return t.length||(t=$('<small class="innerError" />').appendTo(this._messageField.parent())),t.html(e.returnValues.errorType),!1}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_attachmentObjectType:null,_attachmentObjectID:null,_tmpHash:null,init:function(e,t,i){this._super("wcf\\data\\bbcode\\MessagePreviewAction","text","previewButton"),this._attachmentObjectType=e||null,this._attachmentObjectID=t||null,this._tmpHash=i||null},_handleResponse:function(e){var t=$("#previewContainer");t.length||(t=$('<div class="container containerPadding marginTop" id="previewContainer"><fieldset><legend>'+WCF.Language.get("wcf.global.preview")+'</legend><div class="messageTextPreview"></div></fieldset>').prependTo($("#messageContainer")).wcfFadeIn()),t.find("div:eq(0)").html(e.returnValues.message),(new WCF.Effect.Scroll).scrollTo(t)},_getParameters:function(e){var t=this._super(e);return null!=this._attachmentObjectType&&(t.attachmentObjectType=this._attachmentObjectType,t.attachmentObjectID=this._attachmentObjectID,t.tmpHash=this._tmpHash),t}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:null,init:function(e,t,i){if(this._availableLanguages=t,this._languageID=e||0,this._languageInput=$("#languageID"),this._updateLabel(),this._languageInput.find(".dropdownMenu > li").click($.proxy(this._click,this)),!i){var s=this._languageInput.find(".dropdownMenu");$('<li class="dropdownDivider" />').appendTo(s),$('<li><span><span class="badge">'+this._availableLanguages[0]+"</span></span></li>").click($.proxy(this._disable,this)).appendTo(s)}this._languageInput.parents("form").submit($.proxy(this._submit,this))},_click:function(e){this._languageID=$(e.currentTarget).data("languageID"),this._updateLabel()},_disable:function(){this._languageID=0,this._updateLabel()},_updateLabel:function(){this._languageInput.find(".dropdownToggle > span").text(this._availableLanguages[this._languageID])},_submit:function(){this._languageInput.next("input[name=languageID]").prop("value",this._languageID)}}),WCF.Message.SmileyCategories=Class.extend({_cache:[],_proxy:null,_wysiwygSelector:"",init:function(e){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._wysiwygSelector=e,$("#smilies-"+this._wysiwygSelector).on("messagetabmenushow",$.proxy(this._click,this))},_click:function(e,t){var i=parseInt(t.activeTab.tab.data("smileyCategoryID"));if(i&&!t.activeTab.container.children("ul.smileyList").length){if(void 0!==this._cache[i])return void t.activeTab.container.html(this._cache[i]);this._proxy.setOption("data",{actionName:"getSmilies",className:"wcf\\data\\smiley\\category\\SmileyCategoryAction",objectIDs:[i]}),this._proxy.sendRequest()}},_success:function(e){var t=parseInt(e.returnValues.smileyCategoryID);this._cache[t]=e.returnValues.template,$("#smilies-"+this._wysiwygSelector+"-"+t).html(e.returnValues.template)}}),WCF.Message.Smilies=Class.extend({_redactor:null,_wysiwygSelector:"",init:function(e){this._wysiwygSelector=e,WCF.System.Dependency.Manager.register("Redactor_"+this._wysiwygSelector,$.proxy(function(){this._redactor=$("#"+this._wysiwygSelector).redactor("core.getObject"),$(".messageTabMenu[data-wysiwyg-container-id="+this._wysiwygSelector+"]").on("click",".jsSmiley",$.proxy(this._smileyClick,this))},this))},_smileyClick:function(e){var t=$(e.currentTarget),i=t.data("smileyCode"),s=t.data("smileyPath");this._redactor.wbbcode.insertSmiley(i,s,!0)}}),WCF.Message.QuickReply=Class.extend({_container:null,_messageField:null,_notification:null,_pendingSave:!1,_proxy:null,_quickReplyButtons:null,_quoteManager:null,_scrollHandler:null,_successMessageNonVisible:"",init:function(e,t){if(this._container=$("#messageQuickReply"),this._container.children(".message").addClass("jsInvalidQuoteTarget"),this._messageField=$("#text"),this._pendingSave=!1,this._container&&this._messageField){var i=this._container.find(".formSubmit"),s=i.find("button[data-type=save]").removeAttr("accesskey").click($.proxy(this._save,this));e&&i.find("button[data-type=extended]").click($.proxy(this._prepareExtended,this)),i.find("button[data-type=cancel]").click($.proxy(this._cancel,this)),t&&(this._quoteManager=t),this._quickReplyButtons=$(".jsQuickReply").data("__api",this).click($.proxy(this.click,this)),this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._scroll=new WCF.Effect.Scroll,this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.add")),this._successMessageNonVisible="",WCF.System.Event.addListener("com.woltlab.wcf.redactor","submitEditor_text",function(e){e.cancel=!0,s.trigger("click")})}},click:function(e){if(this._container.toggle(),this._container.is(":visible")&&(this._quickReplyButtons.each(function(){var e=$(this);"LI"===e.parent()[0].tagName?e.parent().hide():e.hide()}),setTimeout(function(){$(document).trigger("resize"),$.browser.mobile&&$.browser.chrome||this._scroll.scrollTo(this._container,!0)}.bind(this),100),WCF.Message.Submit.registerButton("text",this._container.find(".formSubmit button[data-type=save]")),this._quoteManager)){var t=!0;$.browser.redactor?this._messageField.data("redactor")&&this._editorCallback(this._messageField.redactor("wutil.isEmptyEditor")):(t=!this._messageField.val().length,this._editorCallback(t))}return null!==e?(e.stopPropagation(),!1):void 0},_editorCallback:function(e){e&&this._quoteManager.insertQuotes(this._getClassName(),this._getObjectID(),$.proxy(this._insertQuotes,this)),$.browser.redactor?this._messageField.redactor("wutil.selectionEndOfEditor"):this._messageField.focus()},getContainer:function(){return this._container},_insertQuotes:function(e){if(e.returnValues.template)if($.browser.redactor){var t=WCF.String.unescapeHTML(e.returnValues.template);t=this._messageField.redactor("wbbcode.convertToHtml",t),t=t.replace(/<p><blockquote/,"<blockquote"),t=t.replace(/blockquote><\/p>/,"blockquote>"),this._messageField.redactor("focus.setEnd"),this._messageField.redactor("wutil.insertDynamic",t,e.returnValues.template),this._messageField.redactor("wutil.selectionEndOfEditor"),this._messageField.redactor("wbbcode.observeQuotes")}else this._messageField.val(e.returnValues.template)},_save:function(){if(!this._pendingSave){var e="";e=$.browser.redactor?this._messageField.redactor("wutil.getText"):$.trim(this._messageField.val());var t=this._messageField.parent().find("small.innerError");if(""===e||"0"===e)return t.length||(t=$('<small class="innerError" />').appendTo(this._messageField.parent())),void t.html(WCF.Language.get("wcf.global.form.error.empty"));t.remove(),this._pendingSave=!0,this._proxy.setOption("data",{actionName:"quickReply",className:this._getClassName(),interfaceName:"wcf\\data\\IMessageQuickReplyAction",parameters:this._getParameters(e)}),this._proxy.sendRequest();var i=this._container.find(".messageQuickReplyContent .messageBody");$('<span class="icon icon48 icon-spinner" />').appendTo(i);var s=i.children(".redactor-box").hide();s.next().hide(),i.next().hide()}},_getParameters:function(e){var t={objectID:this._getObjectID(),data:{message:e},lastPostTime:this._container.data("lastPostTime"),pageNo:this._container.data("pageNo"),removeQuoteIDs:null===this._quoteManager?[]:this._quoteManager.getQuotesMarkedForRemoval()};return this._container.data("anchor")&&(t.anchor=this._container.data("anchor")),WCF.System.Event.fireEvent("com.woltlab.wcf.messageOptionsInline","submit_"+this._messageField.wcfIdentify(),t.data),t},_cancel:function(){this._revertQuickReply(!0),$.browser.redactor?this._messageField.redactor("wutil.reset"):this._messageField.val("")},_revertQuickReply:function(e){var t=this._container.find(".messageQuickReplyContent .messageBody");e&&(this._container.hide(),t.children("small.innerError").remove()),t.children(".icon-spinner").remove(),t.children(".redactor-box").show().next().show(),t.next().show(),this._quickReplyButtons.each(function(){var e=$(this);"LI"===e.parent()[0].tagName?e.parent().show():e.show()})},_prepareExtended:function(){this._pendingSave=!0,null!==this._quoteManager&&this._quoteManager.markQuotesForRemoval();var e="";$.browser.redactor?(e=this._messageField.redactor("wutil.getText"),e.length?this._messageField.redactor("wutil.saveTextToStorage",!0):this._messageField.redactor("wutil.autosavePurge")):e=$.trim(this._messageField.val());var t={containerID:this._getObjectID(),message:e};WCF.System.Event.fireEvent("com.woltlab.wcf.messageOptionsInline","prepareExtended_"+this._messageField.wcfIdentify(),t),new WCF.Action.Proxy({autoSend:!0,data:{actionName:"jumpToExtended",className:this._getClassName(),interfaceName:"wcf\\data\\IExtendedMessageQuickReplyAction",parameters:t},success:function(e){this._messageField.redactor("wutil.saveTextToStorage"),window.location=e.returnValues.url}.bind(this)})},_success:function(e){if($.browser.redactor&&(this._messageField.redactor("wutil.autosavePause"),this._messageField.redactor("wutil.autosavePurge")),e.returnValues.url)window.location=e.returnValues.url;else{if(e.returnValues.template){var t=$(""+e.returnValues.template);"DESC"==this._container.data("sortOrder")?t.insertAfter(this._container):t.insertBefore(this._container),this._container.data("lastPostTime",e.returnValues.lastPostTime),this._notification.show(void 0,void 0,WCF.Language.get("wcf.global.success.add")),this._updateHistory(t.wcfIdentify())}else{var t=this._successMessageNonVisible?this._successMessageNonVisible:"wcf.global.success.add";this._notification.show(void 0,5e3,WCF.Language.get(t))}$.browser.redactor?(this._messageField.redactor("wutil.reset"),this._messageField.redactor("wutil.autosaveResume")):this._messageField.val(""),this._revertQuickReply(!0),null!==this._quoteManager&&this._quoteManager.countQuotes(),this._pendingSave=!1}},_failure:function(e){if(this._pendingSave=!1,this._revertQuickReply(!1),null===e||void 0===e.returnValues||void 0===e.returnValues.errorType)return!0;var t=this._container.find(".messageQuickReplyContent .messageBody"),i=t.children("small.innerError").empty();return i.length||(i=$('<small class="innerError" />').appendTo(t)),i.html(e.returnValues.errorType),!1},_getClassName:function(){return""},_getObjectID:function(){return 0},_updateHistory:function(e){window.location.hash=e}}),WCF.Message.InlineEditor=Class.extend({_activeElementID:"",_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",_notification:null,_proxy:null,_quoteManager:null,_supportExtendedForm:!1,init:function(e,t,i){this._activeElementID="",this._container={},this._containerID=parseInt(e),this._dropdowns={},this._quoteManager=i||null,this._supportExtendedForm=t?!0:!1,this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit")),this.initContainers(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.InlineEditor",$.proxy(this.initContainers,this))},initContainers:function(){$(this._messageContainerSelector).each($.proxy(function(e,t){var i=$(t),s=i.wcfIdentify();if(!this._container[s])if(this._container[s]=i,i.data("canEditInline")){var n=i.find(".jsMessageEditButton:eq(0)").data("containerID",s).click($.proxy(this._clickInline,this));i.data("canEdit")&&n.dblclick($.proxy(this._click,this))}else i.data("canEdit")&&i.find(".jsMessageEditButton:eq(0)").data("containerID",s).click($.proxy(this._click,this))},this))},_click:function(e,t){var i=null===e?t:$(e.currentTarget).data("containerID");if(""===this._activeElementID)this._activeElementID=i,this._prepare(),this._proxy.setOption("data",{actionName:"beginEdit",className:this._getClassName(),interfaceName:"wcf\\data\\IMessageInlineEditorAction",parameters:{containerID:this._containerID,objectID:this._container[i].data("objectID")}}),this._proxy.setOption("failure",$.proxy(function(){this._cancel()},this)),this._proxy.sendRequest();else{var s=new WCF.System.Notification(WCF.Language.get("wcf.message.error.editorAlreadyInUse"),"warning");s.show()}return this._dropdowns[this._container[i].data("objectID")]&&this._dropdowns[this._container[i].data("objectID")].removeClass("dropdownOpen"),null!==e?(e.stopPropagation(),!1):void 0},_clickInline:function(e){var t=$(e.currentTarget);if(!t.hasClass("dropdownToggle")){var i=t.data("containerID");t.addClass("dropdownToggle").parent().addClass("dropdown");var s=$('<ul class="dropdownMenu" />').insertAfter(t);this._initDropdownMenu(i,s),WCF.DOMNodeInsertedHandler.execute(),this._dropdowns[this._container[i].data("objectID")]=s,WCF.Dropdown.registerCallback(t.parent().wcfIdentify(),$.proxy(this._toggleDropdown,this)),t.trigger("click")}return e.stopPropagation(),!1},_failure:function(e){if(this._revertEditor(),null===e||void 0===e.returnValues||void 0===e.returnValues.errorType)return!0;var t=this._container[this._activeElementID].find(".messageBody .messageInlineEditor"),i=t.children("small.innerError").empty();return i.length||(i=$('<small class="innerError" />').insertBefore(t.children(".formSubmit"))),i.html(e.returnValues.errorType),!1},_toggleDropdown:function(e){WCF.Dropdown.getDropdown(e).parents(".messageOptions").toggleClass("forceOpen")},_initDropdownMenu:function(){},_prepare:function(){var e=this._container[this._activeElementID].find(".messageBody");$('<span class="icon icon48 icon-spinner" />').appendTo(e);var t=e.find(".messageText").hide();t.parent().children(".jsInlineEditorHideContent").hide(),e.children(".attachmentThumbnailList, .attachmentFileList").hide()},_cancel:function(){var e=this._container[this._activeElementID].removeClass("jsInvalidQuoteTarget");this._destroyEditor();var t=e.find(".messageBody");t.children(".icon-spinner").remove(),t.find(".messageText").show(),t.children(".attachmentThumbnailList, .attachmentFileList").show(),t.find(".jsInlineEditorHideContent").show(),this._container[this._activeElementID].find(".messageOptions").removeClass("forceHidden"),this._activeElementID="",this._quoteManager&&this._quoteManager.clearAlternativeEditor()},_success:function(e){switch(e.returnValues.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}},_showEditor:function(e){this._proxy.setOption("failure",$.proxy(this._failure,this));var t=this._messageEditorIDPrefix+this._container[this._activeElementID].data("objectID"),i=this._container[this._activeElementID].addClass("jsInvalidQuoteTarget").find(".messageBody");i.children(".icon-spinner").remove();var s=i.children("div:eq(0)");$(""+e.returnValues.template).appendTo(s);var n=s.find(".formSubmit"),a=n.find("button[data-type=save]").click($.proxy(this._save,this));this._supportExtendedForm&&n.find("button[data-type=extended]").click($.proxy(this._prepareExtended,this)),n.find("button[data-type=cancel]").click($.proxy(this._cancel,this)),WCF.Message.Submit.registerButton(this._messageEditorIDPrefix+this._container[this._activeElementID].data("objectID"),a),WCF.System.Event.addListener("com.woltlab.wcf.redactor","submitEditor_"+t,function(e){e.cancel=!0,a.trigger("click")}),this._container[this._activeElementID].find(".messageOptions").addClass("forceHidden");var o=$("#"+t);$.browser.redactor?new WCF.PeriodicalExecuter($.proxy(function(e){e.stop(),this._quoteManager&&this._quoteManager.setAlternativeEditor(o),(new WCF.Effect.Scroll).scrollTo(this._container[this._activeElementID],!0)},this),250):o.focus()},_revertEditor:function(){var e=this._container[this._activeElementID].removeClass("jsInvalidQuoteTarget").find(".messageBody");e.children("span.icon-spinner").remove(),e.children("div:eq(0)").children(":not(.messageText)").show(),e.children(".attachmentThumbnailList, .attachmentFileList").show(),e.find(".jsInlineEditorHideContent").show(),this._quoteManager&&this._quoteManager.clearAlternativeEditor()},_save:function(){var e=this._container[this._activeElementID],t=e.data("objectID"),i="";i=$.browser.redactor?$("#"+this._messageEditorIDPrefix+t).redactor("wutil.getText"):$("#"+this._messageEditorIDPrefix+t).val();var s={containerID:this._containerID,data:{message:i},objectID:t,removeQuoteIDs:null===this._quoteManager?[]:this._quoteManager.getQuotesMarkedForRemoval()};WCF.System.Event.fireEvent("com.woltlab.wcf.messageOptionsInline","submit_"+this._messageEditorIDPrefix+t,s),this._proxy.setOption("data",{actionName:"save",className:this._getClassName(),interfaceName:"wcf\\data\\IMessageInlineEditorAction",parameters:s}),this._proxy.sendRequest(),this._hideEditor()},_prepareExtended:function(){var e=this._container[this._activeElementID],t=e.data("objectID"),i="";i=$.browser.redactor?$("#"+this._messageEditorIDPrefix+t).redactor("wutil.getText"):$("#"+this._messageEditorIDPrefix+t).val(),new WCF.Action.Proxy({autoSend:!0,data:{actionName:"jumpToExtended",className:this._getClassName(),parameters:{containerID:this._containerID,message:i,messageID:t}},success:function(e){window.location=e.returnValues.url}})},_hideEditor:function(){var e=this._container[this._activeElementID].removeClass("jsInvalidQuoteTarget").find(".messageBody");$('<span class="icon icon48 icon-spinner" />').appendTo(e),e.children("div:eq(0)").children().hide(),e.children(".attachmentThumbnailList, .attachmentFileList").show(),e.find(".jsInlineEditorHideContent").show(),this._quoteManager&&this._quoteManager.clearAlternativeEditor()},_showMessage:function(e){var t=this._container[this._activeElementID].removeClass("jsInvalidQuoteTarget"),i=t.find(".messageBody");i.children(".icon-spinner").remove();var s=i.children("div:eq(0)");s.parent().children(".jsInlineEditorHideContent").show(),this._container[this._activeElementID].find(".messageOptions").removeClass("forceHidden"),this._destroyEditor(),s.children(".messageText").html(e.returnValues.message).show(),void 0==e.returnValues.attachmentList?i.children(".attachmentThumbnailList, .attachmentFileList").show():(i.children(".attachmentThumbnailList, .attachmentFileList").remove(),e.returnValues.attachmentList&&$(e.returnValues.attachmentList).insertAfter(i.children("div:eq(0)"))),this._activeElementID="",this._updateHistory(this._getHash(t.data("objectID"))),this._notification.show(),this._quoteManager&&(this._quoteManager.clearAlternativeEditor(),this._quoteManager.countQuotes())},_destroyEditor:function(){var e=this._container[this._activeElementID];if($.browser.redactor){var t=$("#"+this._messageEditorIDPrefix+e.data("objectID"));t.redactor("wutil.autosavePause"),t.redactor("wutil.autosavePurge"),t.redactor("core.destroy")}e.find(".messageBody > div > .messageInlineEditor").remove(),WCF.System.Event.removeAllListeners("com.woltlab.wcf.messageOptionsInline","submit_"+this._messageEditorIDPrefix+e.data("objectID"))},_getClassName:function(){return""},_getHash:function(e){return"#message"+e},_updateHistory:function(e){window.location.hash=e}}),WCF.Message.Submit={_buttons:{},registerButton:function(e,t){WCF.Browser.isChrome()&&(this._buttons[e]=$(t))},execute:function(e){this._buttons[e]&&this._buttons[e].trigger("click")}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:null,_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:null,_quoteManager:null,init:function(e,t,i,s,n,a,o){return this._className=t,""==this._className?void console.debug("[WCF.Message.QuoteManager] Empty class name given, aborting."):(this._objectType=i,""==this._objectType?void console.debug("[WCF.Message.QuoteManager] Empty object type name given, aborting."):(this._containerSelector=s,this._message="",this._messageBodySelector=n,this._messageContentSelector=a,this._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initContainers(),o=o&&e.supportPaste()?!0:!1,this._initCopyQuote(o),$(document).mouseup($.proxy(this._mouseUp,this)),this._quoteManager=e,this._quoteManager.register(this._objectType,this),void WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Quote.Handler"+i.hashCode(),$.proxy(this._initContainers,this))))},_initContainers:function(){var e=this;$(this._containerSelector).each(function(t,i){var s=$(i),n=s.wcfIdentify();if(!e._containers[n]){if(e._containers[n]=s,s.hasClass("jsInvalidQuoteTarget"))return!0;null!==e._messageBodySelector&&(s=s.find(e._messageBodySelector).data("containerID",n)),s.mousedown($.proxy(e._mouseDown,e)),e._containers[n].find(".jsQuoteMessage").click($.proxy(e._saveFullQuote,e))}})},_mouseDown:function(e){this._copyQuote.hide();var t=$(e.currentTarget);if(this._messageBodySelector&&(t=this._containers[t.data("containerID")]),t.hasClass("jsInvalidQuoteTarget"))return void(this._activeContainerID="");for(var i=e.target;i!==t[0];){if("BLOCKQUOTE"===i.tagName)return void(this._activeContainerID="");i=i.parentElement}this._activeContainerID=t.wcfIdentify(),$.browser.mozilla&&t.find("img").each(function(){var e=$(this);e.data("__alt",e.attr("alt")).removeAttr("alt")})},_getNodeText:function(e){var t=function(e){switch(e.tagName){case"BLOCKQUOTE":case"H3":case"SCRIPT":return NodeFilter.FILTER_REJECT;default:return NodeFilter.FILTER_ACCEPT}};t.acceptNode=t;for(var i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,t,!0),s="";i.nextNode();){var n=i.currentNode;if(n.nodeType===Node.ELEMENT_NODE)switch(n.tagName){case"BR":case"LI":case"UL":s+="\n";break;case"TD":$.browser.msie||(s+="\n")}else s+=n.nodeValue.replace(/\n/g,"")}return s},_mouseUp:function(e){if(""==this._activeContainerID)return void this._copyQuote.hide();var t=this._containers[this._activeContainerID],i=this._getSelectedText(),s=$.trim(i);if(""==s)return void this._copyQuote.hide();for(var n=this._messageBodySelector?t.find(this._messageContentSelector)[0]:t[0],a=e.target;a!==t[0];){if(null===a||"BLOCKQUOTE"===a.tagName)return void this._copyQuote.hide();a=a.parentElement}var o=window.getSelection().getRangeAt(0);if(!this._elementInsideContainer(o.startContainer,n)||!this._elementInsideContainer(o.endContainer,n))return void this._copyQuote.hide();var r=this._getNodeText(n);if(-1!==this._normalize(r).indexOf(this._normalize(s))){this._copyQuote.show();var l=this._getBoundingRectangle(t,window.getSelection()),c=this._copyQuote.getDimensions("outer"),d=(l.right-l.left)/2-c.width/2+l.left;this._copyQuote.css({top:l.top-c.height-7+"px",left:d+"px"}),this._copyQuote.hide(),this._activeContainerID="";var h=this;new WCF.PeriodicalExecuter(function(e){e.stop();var i=$.trim(h._getSelectedText());""!=i&&(h._copyQuote.show(),h._message=i,h._objectID=t.data("objectID"),$.browser.mozilla&&t.find("img").each(function(){var e=$(this);e.attr("alt",e.data("__alt"))}))},10)}},_elementInsideContainer:function(e,t){for(e.nodeType===Node.TEXT_NODE&&(e=e.parentNode);e;){if(e===t)return!0;e=e.parentNode}return!1},_normalize:function(e){return e.replace(/\r?\n|\r/g,"\n").replace(/\s/g," ").replace(/\s{2,}/g," ")},_getOffset:function(e,t){e.collapse(t);var i=WCF.getRandomID(),s=document.createElement("span");s.innerHTML='<span id="'+i+'"></span>';for(var n,a=document.createDocumentFragment();n=s.firstChild;)a.appendChild(n);e.insertNode(a),s=$("#"+i);var o=s.offset();return o.top=o.top-$(window).scrollTop(),s.remove(),o},_getBoundingRectangle:function(e,t){var i=null;if(document.createRange&&"undefined"!=typeof document.createRange().getBoundingClientRect){if(t.rangeCount>0){var s=t.getRangeAt(0).getBoundingClientRect();i={left:s.left,right:s.right,top:s.top+$(document).scrollTop()}}}else if(document.selection&&"Control"!=document.selection.type){var n=document.selection.createRange();i={left:n.boundingLeft,right:n.boundingRight,top:n.boundingTop}}return i},_saveSelection:function(e){if(window.getSelection&&document.createRange){var t=window.getSelection().getRangeAt(0),i=t.cloneRange();i.selectNodeContents(e),i.setEnd(t.startContainer,t.startOffset);var s=i.toString().length;return{start:s,end:s+t.toString().length}}var n=document.selection.createRange(),a=document.body.createTextRange();a.moveToElementText(e),a.setEndPoint("EndToStart",n);var s=a.text.length;return{start:s,end:s+n.text.length}},_restoreSelection:function(e,t){if(window.getSelection&&document.createRange){var i=0,s=document.createRange();s.setStart(e,0),s.collapse(!0);for(var n,a=[e],o=!1,r=!1;!r&&(n=a.pop());)if(n.nodeType==Node.TEXT_NODE){var l=i+n.length;!o&&t.start>=i&&t.start<=l&&(s.setStart(n,t.start-i),o=!0),o&&t.end>=i&&t.end<=l&&(s.setEnd(n,t.end-i),r=!0),i=l}else for(var c=n.childNodes.length;c--;)a.push(n.childNodes[c]);var d=window.getSelection();d.removeAllRanges(),d.addRange(s)}else{var h=document.body.createTextRange();h.moveToElementText(e),h.collapse(!0),h.moveEnd("character",t.end),h.moveStart("character",t.start),h.select()}},_initCopyQuote:function(e){if(this._copyQuote=$("#quoteManagerCopy"),!this._copyQuote.length){this._copyQuote=$('<div id="quoteManagerCopy" class="balloonTooltip"><span class="jsQuoteManagerStore">'+WCF.Language.get("wcf.message.quote.quoteSelected")+'</span><span class="pointer"><span></span></span></div>').hide().appendTo(document.body);var t=this._copyQuote.children("span.jsQuoteManagerStore").click($.proxy(this._saveQuote,this));e&&$('<span class="jsQuoteManagerQuoteAndInsert">'+WCF.Language.get("wcf.message.quote.quoteAndReply")+"</span>").click($.proxy(this._saveAndInsertQuote,this)).insertAfter(t)}},_getSelectedText:function(){var e=window.getSelection();return e.rangeCount?this._getNodeText(e.getRangeAt(0).cloneContents()):""},_saveFullQuote:function(e){var t=$(e.currentTarget);this._proxy.setOption("data",{actionName:"saveFullQuote",className:this._className,interfaceName:"wcf\\data\\IMessageQuoteAction",objectIDs:[t.data("objectID")]}),this._proxy.sendRequest(),t.data("isQuoted")?t.data("isQuoted",!1).children("a").removeClass("active"):t.data("isQuoted",!0).children("a").addClass("active");var i=t.parents(".buttonGroupNavigation");return i.hasClass("jsMobileButtonGroupNavigation")&&i.children(".dropdownLabel").trigger("click"),e.stopPropagation(),!1},_saveQuote:function(e){e=e===!0?!0:!1,this._proxy.setOption("data",{actionName:"saveQuote",className:this._className,interfaceName:"wcf\\data\\IMessageQuoteAction",objectIDs:[this._objectID],parameters:{message:this._message,renderQuote:e}}),this._proxy.sendRequest()},_saveAndInsertQuote:function(){this._saveQuote(!0)},_success:function(e){if(void 0!==e.returnValues.count){void 0!==e.returnValues.fullQuoteMessageIDs&&(e.returnValues.fullQuoteObjectIDs=e.returnValues.fullQuoteMessageIDs);var t=void 0!==e.returnValues.fullQuoteObjectIDs?e.returnValues.fullQuoteObjectIDs:{};this._quoteManager.updateCount(e.returnValues.count,t)}switch(e.actionName){case"saveQuote":case"saveFullQuote":e.returnValues.renderedQuote&&WCF.System.Event.fireEvent("com.woltlab.wcf.message.quote","insert",{
-forceInsert:"saveQuote"===e.actionName?!0:!1,quote:e.returnValues.renderedQuote})}},updateFullQuoteObjectIDs:function(e){for(var t in this._containers)this._containers[t].find(".jsQuoteMessage").each(function(t,i){var s=$(i).data("isQuoted",0);s.children("a").removeClass("active"),WCF.inArray(s.data("objectID"),e)&&s.data("isQuoted",1).children("a").addClass("active")})}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:null,_editorElement:null,_editorElementAlternative:null,_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_showQuotes:null,_supportPaste:!1,init:function(e,t,i,s){this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorElement=null,this._editorElementAlternative=null,this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._showQuotes=null,this._supportPaste=!1,t&&(this._editorElement=$("#"+t),this._editorElement.length&&(this._supportPaste=!0,this._form=this._editorElement.parents("form:eq(0)"),this._form.length?(this._form.submit($.proxy(this._submit,this)),this._removeOnSubmit=s||[]):(this._form=null,this._supportPaste=i===!0?!0:!1))),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php/MessageQuote/?t="+SECURITY_TOKEN+SID_ARG_2ND}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){this._insertQuote(null,void 0,e)}.bind(this))},setAlternativeEditor:function(e){this._editorElementAlternative=e},clearAlternativeEditor:function(){this._editorElementAlternative=null},register:function(e,t){this._handlers[e]=t},updateCount:function(e,t){this._count=parseInt(e)||0,this._toggleShowQuotes();for(var i in this._handlers){var s=t[i]||[];this._handlers[i].updateFullQuoteObjectIDs(s)}},insertQuotes:function(e,t,i){return this._insertQuotes?void new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:i}):void(this._insertQuotes=!0)},_toggleShowQuotes:function(){if(this._count){null===this._showQuotes&&(this._showQuotes=$("#showQuotes"),this._showQuotes.length||(this._showQuotes=$('<div id="showQuotes" class="balloonTooltip" />').click($.proxy(this._click,this)).appendTo(document.body)));var e=WCF.Language.get("wcf.message.quote.showQuotes").replace(/#count#/,this._count);this._showQuotes.text(e).show()}else null!==this._showQuotes&&this._showQuotes.hide();this._hasTemplate=!1},_click:function(){this._hasTemplate?this._dialog.wcfDialog("open"):(this._proxy.showLoadingOverlayOnce(),this._proxy.setOption("data",{actionName:"getQuotes",supportPaste:this._supportPaste}),this._proxy.sendRequest())},renderDialog:function(e){null===this._dialog&&(this._dialog=$("#messageQuoteList"),this._dialog.length||(this._dialog=$('<div id="messageQuoteList" />').hide().appendTo(document.body))),this._dialog.html(e);var t=$('<div class="formSubmit" />').appendTo(this._dialog);this._supportPaste&&(this._buttons.insert=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.message.quote.insertAllQuotes")+"</button>").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$("<button>"+WCF.Language.get("wcf.message.quote.removeAllQuotes")+"</button>").click($.proxy(this._removeSelected,this)).appendTo(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.quote.manageQuotes")}),this._dialog.wcfDialog("render"),this._hasTemplate=!0;var i=this._dialog.find(".jsInsertQuote");if(this._supportPaste?i.click($.proxy(this._insertQuote,this)):i.hide(),this._dialog.find("input.jsCheckbox").change($.proxy(this._changeButtons,this)),this._removeOnSubmit.length){var s=this;this._dialog.find("input.jsRemoveQuote").each(function(e,t){var i=$(t).change($.proxy(this._change,this));WCF.inArray(i.parent("li").attr("data-quote-id"),s._removeOnSubmit)&&i.attr("checked","checked")})}},_changeButtons:function(){this._dialog.find("input.jsCheckbox:checked").length?(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertSelectedQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeSelectedQuotes"))):(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertAllQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeAllQuotes")))},_change:function(e){var t=$(e.currentTarget),i=t.parent("li").attr("data-quote-id");if(t.prop("checked"))this._removeOnSubmit.push(i);else for(var s in this._removeOnSubmit)if(this._removeOnSubmit[s]==i){delete this._removeOnSubmit[s];break}},_insertSelected:function(){if(null===this._editorElementAlternative){var e=$(".jsQuickReply:eq(0)").data("__api");e&&!e.getContainer().is(":visible")&&(this._insertQuotes=!1,e.click(null))}this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),this._dialog.find("input.jsCheckbox:checked").each($.proxy(function(e,t){this._insertQuote(null,t)},this)),this._dialog.wcfDialog("close")},_insertQuote:function(e,t,i){var s,n,a,o=null;if(void 0===i){o=null===e?$(t).parents("li"):$(e.currentTarget).parents("li"),s=$.trim(o.children("div.jsFullQuote").text());var r=o.parents("article.message");n=r.attr("data-username"),a=r.data("link"),i={forceInsert:!0}}else s=i.quote.text,n=i.quote.username,a=i.quote.link;if($.browser.redactor)if(null===this._editorElementAlternative){var l=!0;if(null!==e||null!==i){var c=$(".jsQuickReply:eq(0)").data("__api");c&&!c.getContainer().is(":visible")&&(i.forceInsert?(this._insertQuotes=!1,c.click(null)):l=!1)}l&&this._editorElement.length&&this._editorElement.redactor("wbbcode.insertQuoteBBCode",n,a,s,s)}else this._editorElementAlternative.redactor("wbbcode.insertQuoteBBCode",n,a,s,s);else{s="[quote='"+n+"','"+a+"']"+s+"[/quote]";var d=null===this._editorElementAlternative?this._editorElement:this._editorElementAlternative,h=d.val();if(s+="\n\n",0==h.length)d.val(s);else{var u=d.getCaret();d.val(h.substr(0,u)+s+h.substr(u))}}null!==o&&this._removeOnSubmit.push(o.attr("data-quote-id")),null!==e&&this._dialog.wcfDialog("close")},_removeSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked");var e=[];if(this._dialog.find("input.jsCheckbox:checked").each(function(t,i){e.push($(i).parents("li").attr("data-quote-id"))}),e.length){var t=[];for(var i in this._handlers)t.push(i);this._proxy.setOption("data",{actionName:"remove",getFullQuoteObjectIDs:this._handlers.length>0,objectTypes:t,quoteIDs:e}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")}},_submit:function(){if(this._supportPaste&&this._removeOnSubmit.length>0){var e=this._form.find(".formSubmit");for(var t in this._removeOnSubmit)$('<input type="hidden" name="__removeQuoteIDs[]" value="'+this._removeOnSubmit[t]+'" />').appendTo(e)}},getQuotesMarkedForRemoval:function(){return this._removeOnSubmit},markQuotesForRemoval:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"markForRemoval",quoteIDs:this._removeOnSubmit}),this._proxy.suppressErrors(),this._proxy.sendRequest())},removeMarkedQuotes:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"removeMarkedQuotes",getFullQuoteObjectIDs:this._handlers.length>0}),this._proxy.sendRequest())},countQuotes:function(){var e=[];for(var t in this._handlers)e.push(t);this._proxy.setOption("data",{actionName:"count",getFullQuoteObjectIDs:e.length>0,objectTypes:e}),this._proxy.sendRequest()},_success:function(e){if(null!==e){if(void 0!==e.count){var t=void 0!==e.fullQuoteObjectIDs?e.fullQuoteObjectIDs:{};this.updateCount(e.count,t)}void 0!==e.template&&(""==$.trim(e.template)?this.updateCount(0,{}):this.renderDialog(e.template))}},supportPaste:function(){return this._supportPaste}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,init:function(){this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){e.preventDefault();var t=$(e.currentTarget),i=t.prop("href"),s=t.data("linkTitle")?t.data("linkTitle"):i,n=i.hashCode();if(void 0===this._cache[n]){var a=!1;null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),a=!0):this._dialog.empty();var o=$('<fieldset><legend><label for="__sharePermalink">'+WCF.Language.get("wcf.message.share.permalink")+"</label></legend></fieldset>").appendTo(this._dialog);$('<input type="text" id="__sharePermalink" class="long" readonly="readonly" />').attr("value",i).appendTo(o);var o=$('<fieldset><legend><label for="__sharePermalinkBBCode">'+WCF.Language.get("wcf.message.share.permalink.bbcode")+"</label></legend></fieldset>").appendTo(this._dialog);$('<input type="text" id="__sharePermalinkBBCode" class="long" readonly="readonly" />').attr("value","[url='"+i+"']"+s+"[/url]").appendTo(o);var o=$('<fieldset><legend><label for="__sharePermalinkHTML">'+WCF.Language.get("wcf.message.share.permalink.html")+"</label></legend></fieldset>").appendTo(this._dialog);$('<input type="text" id="__sharePermalinkHTML" class="long" readonly="readonly" />').attr("value",'<a href="'+i+'">'+WCF.String.escapeHTML(s)+"</a>").appendTo(o),this._cache[n]=this._dialog.html(),this._dialog.wcfDialog(a?{title:WCF.Language.get("wcf.message.share")}:"open")}else this._dialog.html(this._cache[n]).wcfDialog("open");this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click(function(){$(this).select()});navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown(function(){return!1}).removeAttr("readonly").click(function(){this.setSelectionRange(0,9999)})}}),WCF.Message.Share.Page=Class.extend({_dialog:null,_fetchObjectCount:!1,_pageDescription:"",_pageURL:"",_privacySettings:{},_provider:{},_proxy:null,init:function(e,t){this._dialog=null,this._fetchObjectCount=e===!0?!0:!1,this._pageDescription=encodeURIComponent($('meta[property="og:title"]').prop("content")),this._pageURL=encodeURIComponent($('meta[property="og:url"]').prop("content")),this._privacySettings=$.extend({facebook:!1,google:!1,twitter:!1,reddit:!1},t||{}),this._proxy=null,this._initProvider()},_initProvider:function(){var e=$(".messageShareButtons"),t=this;if(this._provider={facebook:{fetch:function(){t._fetchFacebook()},link:e.find(".jsShareFacebook"),share:function(){t._share("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0)}},google:{fetch:void 0,link:e.find(".jsShareGoogle"),share:function(){t._share("google","https://plus.google.com/share?url={pageURL}",!0)}},reddit:{fetch:function(){t._fetchReddit()},link:e.find(".jsShareReddit"),share:function(){t._share("reddit","https://ssl.reddit.com/submit?url={pageURL}",!0)}},twitter:{fetch:void 0,link:e.find(".jsShareTwitter"),share:function(){t._share("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1)}}},$.each(this._provider,function(e,i){t._privacySettings[e]?t._fetchObjectCount&&i.fetch&&i.fetch():i.link.addClass("disabled"),i.link.data("provider",e).click($.proxy(t._click,t))}),WCF.User.userID&&!e.find(".jsShowPrivacySettings").length){var i=$('<li class="jsShowPrivacySettings"><a><span class="icon icon32 fa-gear jsTooltip" title="'+WCF.Language.get("wcf.message.share.privacy")+'" /></a></li>');i.appendTo(e.children("ul")).children("a").click($.proxy(this._openPrivacySettings,this))}},_click:function(e){var t=$(e.currentTarget),i=t.data("provider");t.hasClass("disabled")?WCF.User.userID?this._openPrivacySettings():t.removeClass("disabled"):this._provider[i].share()},_openPrivacySettings:function(){null===this._proxy&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})),this._proxy.setOption("data",{actionName:"getSocialNetworkPrivacySettings",className:"wcf\\data\\user\\UserAction"}),this._proxy.sendRequest()},_success:function(e){switch(e.actionName){case"getSocialNetworkPrivacySettings":this._renderDialog(e);break;case"saveSocialNetworkPrivacySettings":this._updatePrivacySettings(e)}},_renderDialog:function(e){null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.template),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share.privacy")})):(this._dialog.html(e.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find("input[type=submit]").click($.proxy(this._save,this))},_save:function(){this._proxy.setOption("data",{actionName:"saveSocialNetworkPrivacySettings",className:"wcf\\data\\user\\UserAction",parameters:{facebook:this._dialog.find("input[name=facebook]").is(":checked"),google:this._dialog.find("input[name=google]").is(":checked"),reddit:this._dialog.find("input[name=reddit]").is(":checked"),twitter:this._dialog.find("input[name=twitter]").is(":checked")}}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")},_updatePrivacySettings:function(e){this._privacySettings=$.extend(this._privacySettings,e.returnValues.settings);var t=this;$.each(e.returnValues.settings,function(e,i){t._privacySettings[e]=i?!0:!1,i?(t._provider[e].link.removeClass("disabled"),t._fetchObjectCount&&t._provider[e].fetch&&t._provider[e].fetch()):t._provider[e].link.addClass("disabled")}),(new WCF.System.Notification).show()},_share:function(e,t,i){window.open(t.replace(/{pageURL}/,this._pageURL).replace(/{text}/,this._pageDescription+(i?" "+this._pageURL:"")),e,"height=600,width=600")},_fetchCount:function(e,t,i){var s={autoSend:!0,dataType:"jsonp",showLoadingOverlay:!1,success:t,suppressErrors:!0,type:"GET",url:e.replace(/{pageURL}/,this._pageURL)};i&&(s.jsonp=i),new WCF.Action.Proxy(s)},_fetchFacebook:function(){this._fetchCount("https://graph.facebook.com/?id={pageURL}",$.proxy(function(e){e.shares&&this._provider.facebook.link.children("span.badge").show().text(e.shares)},this))},_fetchReddit:function(){window.location.protocol.match(/^https/)||this._fetchCount("http://www.reddit.com/api/info.json?url={pageURL}",$.proxy(function(e){e.data.children.length&&this._provider.reddit.link.children("span.badge").show().text(e.data.children[0].data.score)},this),"jsonp")}}),WCF.Message.UserMention=Class.extend({_caretPosition:null,_className:"wcf\\data\\user\\UserAction",_dropdown:null,_dropdownMenu:null,_itemIndex:-1,_lineHeight:null,_mentionStart:"",_redactor:null,_timer:null,init:function(e){$.browser.mobile&&$.browser.mozilla||(this._textarea=$("#"+e),this._redactor=this._textarea.redactor("core.getObject"),this._dropdown=this._textarea.redactor("core.getEditor"),this._dropdownMenu=$('<ul class="dropdownMenu userSuggestionList" />').appendTo(this._textarea.parent()),WCF.Dropdown.initDropdownFragment(this._dropdown,this._dropdownMenu),this._proxy=new WCF.Action.Proxy({autoAbortPrevious:!0,success:$.proxy(this._success,this)}),WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+e,$.proxy(this._keydown,this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor","keyup_"+e,$.proxy(this._keyup,this)))},_clearList:function(){this._hideList(),this._dropdownMenu.empty()},_click:function(e){if($.browser.mozilla&&"P"==this._caretPosition.startContainer.nodeName){var t=this._caretPosition.startContainer.childNodes[this._caretPosition.startOffset-1];this._caretPosition=document.createRange(),this._caretPosition.selectNodeContents(t),this._caretPosition.collapse()}this._redactor.wutil.replaceRangesWith(this._caretPosition),this._setUsername($(e.currentTarget).data("username"))},_createListItem:function(e){var t=$("<li />").data("username",e.label).click($.proxy(this._click,this)).appendTo(this._dropdownMenu),i=$("<div />").addClass("box16").appendTo(t);i.append($(e.icon).addClass("framed")),i.append($("<div />").append($("<span />").text(e.label)))},_getDropdownMenuPosition:function(){var e=getSelection().getRangeAt(0).cloneRange(),t=document.createRange();t.setStart(e.startContainer,e.startOffset-(this._mentionStart.length+1)),t.setEnd(e.startContainer,e.startOffset),this._redactor.wutil.replaceRangesWith(t);var i=getSelection().getRangeAt(0),s=i.getBoundingClientRect(),n=$(window),a={top:Math.round(s.bottom)+n.scrollTop(),left:Math.round(s.left)+n.scrollLeft()};return null===this._lineHeight&&(this._lineHeight=Math.round(s.bottom-s.top)),this._redactor.wutil.replaceRangesWith(e),this._caretPosition=e,a},_setUsername:function(e){null!==this._timer&&(this._timer.stop(),this._timer=null),this._proxy.abortPrevious();var t=getSelection().getRangeAt(0).cloneRange();this._redactor.buffer.set();var i=t.startContainer,s=t.startOffset-(this._mentionStart.length+1);0>s&&(i=i.previousSibling,s=i.length-(this._mentionStart.length+1)-(t.startOffset-1));var n=document.createRange();n.setStart(i,s),n.setEnd(t.startContainer,t.startOffset),this._redactor.wutil.replaceRangesWith(n);var a=getSelection().getRangeAt(0);a.deleteContents(),a.collapse(!0),-1!==e.indexOf("'")&&(e=e.replace(/'/g,"''")),e="'"+e+"'";var o=document.createTextNode("@"+e);a.insertNode(o);var n=document.createRange();n.setStart(o,e.length+1),n.setEnd(o,e.length+1),this._redactor.wutil.replaceRangesWith(n),this._hideList()},_getParameters:function(){return{data:{includeUserGroups:!1,searchString:this._mentionStart}}},_getTextLineInFrontOfCaret:function(){if(this._redactor.selection.getHtml().length)return"";var e=getSelection().getRangeAt(0);$.browser.mozilla&&3==e.startContainer.nodeType&&e.startContainer.parentNode.normalize();var t=e.startContainer.textContent.substr(0,e.startOffset),i=t;t="";for(var s=!1,n=0;n<i.length;n++){var a=i.charCodeAt(n).toString(16);"200b"==a||/\s/.test(i[n])&&("a0"!=a&&"20"!=a||s)?(s=!1,t=""):(("a0"==a||"20"==a)&&(s=!0),"@"===i[n]&&n&&/\s/.test(i[n-1])&&(s=!1,t=""),t+=i[n])}return t},_hideList:function(){this._dropdown.removeClass("dropdownOpen"),this._dropdownMenu.removeClass("dropdownOpen"),this._itemIndex=-1},_keydown:function(e){if(!this._redactor.wutil.inPlainMode()&&this._dropdownMenu.is(":visible"))switch(e.event.which){case $.ui.keyCode.ENTER:e.event.preventDefault(),e.cancel=!0,this._dropdownMenu.children("li").eq(this._itemIndex).trigger("click");break;case $.ui.keyCode.UP:e.cancel=!0,e.event.preventDefault(),this._selectItem(this._itemIndex-1);break;case $.ui.keyCode.DOWN:e.cancel=!0,e.event.preventDefault(),this._selectItem(this._itemIndex+1)}},_keyup:function(e){if(this._redactor.wutil.inPlainMode())return!0;if(null!==this._timer&&(this._timer.stop(),this._timer=null),this._proxy.abortPrevious(),e.event.which!==$.ui.keyCode.ENTER&&!(this._dropdownMenu.is(":visible")&&e.event.which in{13:1,38:1,40:1})){var t=this._getTextLineInFrontOfCaret();if(t){var i=t.match(/@([^,]{3,})$/);i?(!i.index||t[i.index-1].match(/\s/))&&(this._mentionStart=i[1],null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy(function(){this._proxy.setOption("data",{actionName:"getSearchResultList",className:this._className,interfaceName:"wcf\\data\\ISearchAction",parameters:this._getParameters()}),this._proxy.sendRequest(),this._timer.stop(),this._timer=null},this),500)):this._hideList()}else this._hideList()}},_selectItem:function(e){var t=this._dropdownMenu.children("li");0>e?e=t.length-1:e+1>t.length&&(e=0),t.removeClass("dropdownNavigationItem"),t.eq(e).addClass("dropdownNavigationItem"),this._itemIndex=e},_showList:function(){this._dropdown.addClass("dropdownOpen"),this._dropdownMenu.addClass("dropdownOpen")},_success:function(e){if(this._clearList(!1),$.getLength(e.returnValues)){for(var t in e.returnValues){var i=e.returnValues[t];this._createListItem(i)}this._updateSuggestionListPosition(),this._showList()}},_updateSuggestionListPosition:function(){try{var e=this._getDropdownMenuPosition();e.top+=5,this._dropdownMenu.css(e),this._selectItem(0),e.top+this._dropdownMenu.outerHeight()+10>$(window).height()+$(document).scrollTop()?(this._dropdownMenu.addClass("dropdownArrowBottom"),this._dropdownMenu.css({top:e.top-this._dropdownMenu.outerHeight()-2*this._lineHeight+5})):this._dropdownMenu.removeClass("dropdownArrowBottom")}catch(e){}}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e=this.element.find("> nav > ul > li:not(.jsFlexibleMenuDropdown)"),t=this.element.find("> div, > fieldset");if(e.length!=t.length)return void console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.");var i=this.element.data("preselect");this._tabs=[],this._tabsByName={};for(var s=0;s<e.length;s++){var n=$(e[s]),a=$(t[s]),o=n.data("name");if(void 0===o){var r=n.children("a").prop("href");void 0!==r&&r.match(/#([a-zA-Z_-]+)$/)&&(o=RegExp.$1),void 0===o&&(o=n.wcfIdentify(),console.debug("[wcf.messageTabMenu] Missing name attribute, assuming generic ID '"+o+"'"))}this._tabs.push({container:a,name:o,tab:n}),this._tabsByName[o]=s;var l=n.children("a").data("index",s).click($.proxy(this._showTab,this));i==o&&l.trigger("click")}i===!0&&this._tabs.length&&this._tabs[0].tab.children("a").trigger("click");var c=this.element.data("collapsible");void 0!==c&&(this.options.collapsible=c)},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments),this.element.remove()},_showTab:function(e,t,i){var s=null===e?t:$(e.currentTarget).data("index");i=this.options.collapsible&&i!==!0?!1:!0;for(var n=null,a=0;a<this._tabs.length;a++){var o=this._tabs[a];if(a==s){if(!o.tab.hasClass("active")){o.tab.addClass("active"),o.container.addClass("active"),n=o;continue}if(i===!0)continue}o.tab.removeClass("active"),o.container.removeClass("active")}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==n&&this._trigger("show",{},{activeTab:n}),$(window).trigger("resize")},showTab:function(e,t){return $.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0===this._tabs[e]?void console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'"):void this._showTab(null,e,t)},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this);
+(function (window, undefined) { })(this);
 
 // WCF.Poll.js
-(function (window, undefined) {"use strict";WCF.Poll={},WCF.Poll.Management=Class.extend({_container:null,_count:0,_inputSize:0,_maxOptions:0,init:function(t,i,e){if(this._count=0,this._maxOptions=e||-1,this._container=$("#"+t).children("ol:eq(0)"),!this._container.length)return void console.debug("[WCF.Poll.Management] Invalid container id given, aborting.");i=i||[],this._createOptionList(i),$(window).resize($.proxy(this._resize,this)),this._container.parents("form").submit($.proxy(this._submit,this)),new WCF.Sortable.List(t,"",void 0,void 0,!0),this._resize();var n=this;this._container.closest(".messageTabMenu").on("messagetabmenushow",function(t,i){"poll"==i.activeTab.name&&n._resize()})},_createOptionList:function(t){for(var i=0,e=t.length;e>i;i++){var n=t[i];this._createOption(n.optionValue,n.optionID)}this._createOption()},_createOption:function(t,i,e){t=t||"",i=parseInt(i)||0,e=e||null;var n=$('<li class="sortableNode" />').data("optionID",i);null===e?n.appendTo(this._container):n.insertAfter(e);var o=$('<span class="sortableButtonContainer" />').appendTo(n);$('<span class="icon icon16 icon-plus jsTooltip jsAddOption pointer" title="'+WCF.Language.get("wcf.poll.button.addOption")+'" />').click($.proxy(this._addOption,this)).appendTo(o),$('<span class="icon icon16 icon-remove jsTooltip jsDeleteOption pointer" title="'+WCF.Language.get("wcf.poll.button.removeOption")+'" />').click($.proxy(this._removeOption,this)).appendTo(o);var s=$('<input type="text" value="'+t+'" maxlength="255" />').css({width:this._inputSize+"px"}).keydown($.proxy(this._keyDown,this)).appendTo(n);s.click(function(){document.activeElement!==this&&this.focus()}),null!==e&&s.focus(),WCF.DOMNodeInsertedHandler.execute(),this._count++,this._count===this._maxOptions&&this._container.find("span.jsAddOption").removeClass("pointer").addClass("disabled")},_keyDown:function(t){return 13!==t.which?!0:($(t.currentTarget).prev(".sortableButtonContainer").children(".jsAddOption").trigger("click"),t.preventDefault(),t.stopPropagation(),!1)},_addOption:function(t){if(this._count===this._maxOptions)return!1;var i=$(t.currentTarget).parents("li");this._createOption(void 0,void 0,i)},_removeOption:function(t){$(t.currentTarget).parents("li").remove(),this._count--,this._container.find("span.jsAddOption").addClass("pointer").removeClass("disabled"),0==this._container.children("li").length&&this._createOption()},_resize:function(){var t=this._container.innerWidth(),i=this._container.children("li:eq(0)"),e=i.children(".sortableButtonContainer").outerWidth(),n=t-e;n!=this._inputSize&&(this._inputSize=n,this._container.find("li > input").css({width:this._inputSize+"px"}))},_submit:function(){var t=[];if(this._container.children("li").each(function(i,e){var n=$(e),o=$.trim(n.children("input").val());""!=o&&t.push({optionID:n.data("optionID"),optionValue:o})}),t.length)for(var i=this._container.parents("form").find(".formSubmit"),e=0,n=t.length;n>e;e++){var o=t[e];$('<input type="hidden" name="pollOptions['+e+']" />').val(o.optionID+"_"+o.optionValue).appendTo(i)}}}),WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(t){var i=$(t);if(!i.length)return void console.debug("[WCF.Poll.Manager] Given selector '"+t+"' does not match, aborting.");this._cache={},this._canViewParticipants={},this._canViewResult={},this._inputElements={},this._participants={},this._polls={},this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),url:"index.php/Poll/?t="+SECURITY_TOKEN+SID_ARG_2ND});var e=this;i.each(function(t,i){var n=$(i),o=n.data("pollID");void 0===e._polls[o]&&(e._cache[o]={result:"",vote:""},e._polls[o]=n,e._canViewParticipants[o]=n.data("canViewParticipants")?!0:!1,e._canViewResult[o]=n.data("canViewResult")?!0:!1,e._canVote[o]=n.data("canVote")?!0:!1,e._bindListeners(o),n.data("inVote")&&e._prepareVote(o),e._toggleButtons(o))})},_bindListeners:function(t){this._polls[t].find(".jsButtonPollShowParticipants").data("pollID",t).click($.proxy(this._showParticipants,this)),this._polls[t].find(".jsButtonPollShowResult").data("pollID",t).click($.proxy(this._showResult,this)),this._polls[t].find(".jsButtonPollShowVote").data("pollID",t).click($.proxy(this._showVote,this)),this._polls[t].find(".jsButtonPollVote").data("pollID",t).click($.proxy(this._vote,this))},_showResult:function(t,i){var e=null===t?i:$(t.currentTarget).data("pollID");this._canViewResult[e]&&this._polls[e].data("inVote")&&(this._cache[e].result?(this._polls[e].find(".pollInnerContainer").html(this._cache[e].result),this._polls[e].data("inVote",!1),this._toggleButtons(e)):(this._proxy.setOption("data",{actionName:"getResult",pollID:e}),this._proxy.sendRequest()))},_showParticipants:function(t){var i=$(t.currentTarget).data("pollID");this._participants[i]||(this._participants[i]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[i].data("question"),{pollID:i})),this._participants[i].open()},_showVote:function(t,i){var e=null===t?i:$(t.currentTarget).data("pollID");this._canVote[e]&&(this._polls[e].data("inVote")||(this._cache[e].vote?(this._polls[e].find(".pollInnerContainer").html(this._cache[e].vote),this._polls[e].data("inVote",!0),this._prepareVote(e),this._toggleButtons(e)):(this._proxy.setOption("data",{actionName:"getVote",pollID:e}),this._proxy.sendRequest())))},_success:function(t){if(t&&t.actionName){var i=t.pollID;switch(t.resultTemplate&&(this._cache[i].result=t.resultTemplate),t.voteTemplate&&(this._cache[i].vote=t.voteTemplate),t.actionName){case"getResult":this._showResult(null,i);break;case"getVote":this._showVote(null,i);break;case"vote":this._canViewResult[i]=!0,this._canVote[i]=t.canVote?!0:!1,this._showResult(null,i)}}},_prepareVote:function(t){this._polls[t].find(".jsButtonPollVote").disable();var i=this._polls[t].find(".pollInnerContainer > .jsPollVote"),e=this;this._inputElements[t]=i.find("input").change(function(){e._handleVoteButton(t)}),this._handleVoteButton(t);var n=i.data("maxVotes");this._inputElements[t].filter("[type=checkbox]").length&&(this._inputElements[t].change(function(){e._enforceMaxVotes(t,n)}),this._enforceMaxVotes(t,n))},_enforceMaxVotes:function(t,i){var e=this._inputElements[t];e.filter(":checked").length==i?e.filter(":not(:checked)").disable():e.enable()},_handleVoteButton:function(t){var i=this._inputElements[t],e=this._polls[t].find(".jsButtonPollVote");i.filter(":checked").length?e.enable():e.disable()},_toggleButtons:function(t){var i=this._polls[t].children(".formSubmit");i.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide();var e=!0;this._polls[t].data("inVote")?(e=!1,i.find(".jsButtonPollVote").show(),this._canViewResult[t]&&i.find(".jsButtonPollShowResult").show()):(this._canVote[t]&&(e=!1,i.find(".jsButtonPollShowVote").show()),this._canViewParticipants[t]&&(e=!1,i.find(".jsButtonPollShowParticipants").show())),e&&i.hide()},_vote:function(t){var i=$(t.currentTarget).data("pollID");if(this._canVote[i]){var e=[];this._inputElements[i].each(function(t,i){var n=$(i);n.is(":checked")&&e.push(n.data("optionID"))}),e.length&&(this._proxy.setOption("data",{actionName:"vote",optionIDs:e,pollID:i}),this._proxy.sendRequest())}}}); })(this);
+(function (window, undefined) { })(this);
 
 // WCF.Search.Message.js
-(function (window, undefined) {"use strict";WCF.Search.Message={},WCF.Search.Message.KeywordList=WCF.Search.Base.extend({_className:"wcf\\data\\search\\keyword\\SearchKeywordAction",_divider:null,_forceSubmit:!1,init:function(e,i,t){if(!$.isFunction(i))return void console.debug("[WCF.Search.Message.KeywordList] The given callback is invalid, aborting.");this._callback=i,this._excludedSearchValues=[],t&&(this._excludedSearchValues=t),this._searchInput=$(e).keyup($.proxy(this._keyUp,this)).keydown($.proxy(function(e){13===e.which&&this._itemCount&&-1!==this._itemIndex&&e.preventDefault()},this));var s=WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()),r=s.find("li.dropdownDivider").last();this._divider=$('<li class="dropdownDivider" />').hide().insertBefore(r),this._list=$('<li class="dropdownList"><ul /></li>').hide().insertBefore(r).children("ul"),s.find("input, label").on("click",function(e){e.stopPropagation()}),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)})},_createListItem:function(e){this._divider.show(),this._list.parent().show(),this._super(e)},_clearList:function(e){e&&this._searchInput.val(""),this._divider.hide(),this._list.empty().parent().hide(),WCF.CloseOverlayHandler.removeCallback("WCF.Search.Base"),this._itemCount=0,this._itemIndex=-1}}),WCF.Search.Message.SearchArea=Class.extend({_searchArea:null,init:function(e){this._searchArea=e;var i=new WCF.Search.Message.KeywordList(this._searchArea.find("input[type=search]"),$.proxy(this._callback,this));i.setDelay(500);var t=this,s=this._searchArea.find("input[type=search]");if(this._searchArea.click(function(e){return e.target==t._searchArea[0]?(s.focus().trigger("click"),!1):void 0}),this._searchArea.hasClass("dropdown")){var r=this._searchArea.wcfIdentify(),a=this._searchArea.find("form");a.submit(function(){var e=WCF.Dropdown.getDropdownMenu(r);e.find("input[type=hidden]").appendTo(a),e.find("input[type=checkbox]:checked").each(function(e,i){var t=$(i);$('<input type="hidden" name="'+t.attr("name")+'" value="'+t.attr("value")+'" />').appendTo(a)})})}},_callback:function(e){return this._searchArea.find("input[type=search]").val(e.label),this._searchArea.find("form").submit(),!1}}); })(this);
+(function (window, undefined) { })(this);
 
 // WCF.User.js
-(function (window, undefined) {"use strict";WCF.User.Login=Class.extend({_loginSubmitButton:null,_password:null,_passwordContainer:null,_useCookies:null,_useCookiesContainer:null,init:function(t){this._loginSubmitButton=$("#loginSubmitButton"),this._password=$("#password"),this._passwordContainer=this._password.parents("dl"),this._useCookies=$("#useCookies"),this._useCookiesContainer=this._useCookies.parents("dl");var e=$("#loginForm");e.find("input[name=action]").change($.proxy(this._change,this)),t&&WCF.User.QuickLogin.init()},_change:function(t){"register"===$(t.currentTarget).val()?this._setState(!1,WCF.Language.get("wcf.user.button.register")):this._setState(!0,WCF.Language.get("wcf.user.button.login"))},_setState:function(t,e){t?(this._password.enable(),this._passwordContainer.removeClass("disabled"),this._useCookies.enable(),this._useCookiesContainer.removeClass("disabled")):(this._password.disable(),this._passwordContainer.addClass("disabled"),this._useCookies.disable(),this._useCookiesContainer.addClass("disabled")),this._loginSubmitButton.val(e)}}),WCF.User.Panel={},WCF.User.Panel.Abstract=Class.extend({_badge:null,_dropdown:null,_identifier:"",_loadData:!0,_markAllAsReadLink:null,_options:{},_proxy:null,_triggerElement:null,init:function(t,e,i){if(this._dropdown=null,this._loadData=!0,this._identifier=e,this._triggerElement=t,this._options=i,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this)}),this._triggerElement.click($.proxy(this.toggle,this)),this._options.showAllLink&&this._triggerElement.dblclick($.proxy(this._dblClick,this)),this._options.staticDropdown===!0)this._loadData=!1;else{var s=this._triggerElement.find("span.badge");s.length&&(this._badge=s)}},toggle:function(t){if(t.preventDefault(),null===this._dropdown&&(this._dropdown=this._initDropdown()),this._dropdown.toggle()){if(!this._loadData&&null!==this._badge){var e=parseInt(this._badge.text())||0;e&&!this._dropdown.getItemList().children(".interactiveDropdownItemOutstanding").length&&(this._loadData=!0)}this._loadData&&(this._loadData=!1,this._load())}return!1},_dblClick:function(t){return t.preventDefault(),window.location=this._options.showAllLink,!1},_initDropdown:function(){var t=WCF.Dropdown.Interactive.Handler.create(this._triggerElement,this._identifier,this._options);return $('<li class="loading"><span class="icon icon24 fa-spinner" /> <span>'+WCF.Language.get("wcf.global.loading")+"</span></li>").appendTo(t.getItemList()),t},_load:function(){},_success:function(t){if(void 0!==t.returnValues.template){var e=this._dropdown.getItemList().empty();if($(t.returnValues.template).appendTo(e),e.children().length||$('<li class="noItems">'+this._options.noItems+"</li>").appendTo(e),this._options.enableMarkAsRead){var i=this._dropdown.getItemList().children(".interactiveDropdownItemOutstanding");if(null===this._markAllAsReadLink&&i.length&&this._options.markAllAsReadConfirmMessage){var s=this._markAllAsReadLink=$('<li class="interactiveDropdownItemMarkAllAsRead"><a href="#" title="'+WCF.Language.get("wcf.user.panel.markAllAsRead")+'" class="jsTooltip"><span class="icon icon16 fa-check" /></a></li>').appendTo(this._dropdown.getLinkList());s.click(function(){return this._dropdown.close(),WCF.System.Confirmation.show(this._options.markAllAsReadConfirmMessage,function(t){"confirm"===t&&this._markAllAsRead()}.bind(this)),!1}.bind(this))}i.each(function(t,e){var i=$(e).addClass("interactiveDropdownItemOutstandingIcon"),s=i.data("objectID"),a=$('<div class="interactiveDropdownItemMarkAsRead"><a href="#" title="'+WCF.Language.get("wcf.user.panel.markAsRead")+'" class="jsTooltip"><span class="icon icon16 fa-check" /></a></div>').appendTo(i);a.click(function(t){return this._markAsRead(t,s),!1}.bind(this))}.bind(this))}this._dropdown.getItemList().children().each(function(t,e){var i=$(e),s=i.data("link");s&&($.browser.msie?i.click(function(t){return"A"!==t.target.tagName?(window.location=s,!1):void 0}):(i.addClass("interactiveDropdownItemShadow"),$('<a href="'+s+'" class="interactiveDropdownItemShadowLink" />').appendTo(i)),i.data("linkReplaceAll")&&i.find("> .box32 a:not(.userLink)").prop("href",s))}),this._dropdown.rebuildScrollbar()}if(void 0!==t.returnValues.totalCount&&this.updateBadge(t.returnValues.totalCount),this._options.enableMarkAsRead)if(t.returnValues.markAsRead){var a=this._dropdown.getItemList().children("li[data-object-id="+t.returnValues.markAsRead+"]");a.length&&(a.removeClass("interactiveDropdownItemOutstanding").data("isRead",!0),a.children(".interactiveDropdownItemMarkAsRead").remove())}else t.returnValues.markAllAsRead&&(this.resetItems(),this.updateBadge(0))},_markAsRead:function(){},_markAllAsRead:function(){},updateBadge:function(t){t=parseInt(t)||0,t?(null===this._badge&&(this._badge=$('<span class="badge badgeInverse" />').appendTo(this._triggerElement.children("a")),this._badge.before(" ")),this._badge.text(t)):null!==this._badge&&(this._badge.remove(),this._badge=null),this._options.enableMarkAsRead&&(t||null===this._markAllAsReadLink||(this._markAllAsReadLink.remove(),this._markAllAsReadLink=null))},resetItems:function(){this._dropdown.resetItems()}}),WCF.User.Panel.Notification=WCF.User.Panel.Abstract.extend({_favico:null,init:function(t){t.enableMarkAsRead=!0,this._super($("#userNotifications"),"userNotifications",t);try{if(this._favico=new Favico({animation:"none",type:"circle"}),null!==this._badge){var e=parseInt(this._badge.text())||0;this._favico.badge(e)}}catch(t){console.debug("[WCF.User.Panel.Notification] Failed to initialized Favico: "+t.message)}WCF.System.PushNotification.addCallback("userNotificationCount",$.proxy(this.updateUserNotificationCount,this))},_initDropdown:function(){var t=this._super();return $('<li><a href="'+this._options.settingsLink+'" title="'+WCF.Language.get("wcf.user.panel.settings")+'" class="jsTooltip"><span class="icon icon16 fa-cog" /></a></li>').appendTo(t.getLinkList()),t},_load:function(){this._proxy.setOption("data",{actionName:"getOutstandingNotifications",className:"wcf\\data\\user\\notification\\UserNotificationAction"}),this._proxy.sendRequest()},_markAsRead:function(t,e){this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest()},_markAllAsRead:function(){this._proxy.setOption("data",{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"}),this._proxy.sendRequest()},resetItems:function(){this._super(),this._markAllAsReadLink&&(this._markAllAsReadLink.remove(),this._markAllAsReadLink=null)},updateBadge:function(t){t=parseInt(t)||0,null!==this._favico&&this._favico.badge(t),this._super(t)},updateUserNotificationCount:function(t){null!==this._dropdown&&this._dropdown.resetItems(),this.updateBadge(t)}}),WCF.User.Panel.UserMenu=WCF.User.Panel.Abstract.extend({init:function(){this._super($("#userMenu"),"userMenu",{pointerOffset:"13px",staticDropdown:!0})}}),WCF.User.QuickLogin={init:function(){require(["Ui/Dialog"],function(t){for(var e=document.getElementById("loginForm"),i=document.getElementsByClassName("loginLink"),s=0,a=i.length;a>s;s++)i[s].addEventListener("click",function(i){i.preventDefault(),e.style.removeProperty("display"),t.openStatic("loginForm",null,{title:WCF.Language.get("wcf.user.login")})});var n=e.querySelector("#loginForm input[name=url]");null!==n&&n.setAttribute("value",window.location.protocol+"//"+window.location.host+n.getAttribute("value"))})}},WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("<div>"+this._cache[t]+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.Follow=Class.extend({_button:null,_following:!1,_proxy:null,_userID:0,init:function(t,e){this._following=e,this._userID=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._createButton(),this._showButton()},_createButton:function(){this._button=$('<li id="followUser"><a href="#" class="button jsTooltip" title="'+WCF.Language.get("wcf.user.button."+(this._following?"un":"")+"follow")+'"><span class="icon icon16 icon-plus"></span> <span class="invisible">'+WCF.Language.get("wcf.user.button."+(this._following?"un":"")+"follow")+"</span></a></li>").prependTo($("#profileButtonContainer")),this._button.click($.proxy(this._execute,this))},_execute:function(t){t.preventDefault();var e=this._following?"unfollow":"follow";this._proxy.setOption("data",{actionName:e,className:"wcf\\data\\user\\follow\\UserFollowAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_showButton:function(){this._following?this._button.find(".button").data("tooltip",WCF.Language.get("wcf.user.button.unfollow")).addClass("active").children(".icon").removeClass("icon-plus").addClass("icon-minus"):this._button.find(".button").data("tooltip",WCF.Language.get("wcf.user.button.follow")).removeClass("active").children(".icon").removeClass("icon-minus").addClass("icon-plus")},_success:function(t){this._following=t.returnValues.following,this._showButton();var e=new WCF.System.Notification;e.show()}}),WCF.User.Profile.IgnoreUser=Class.extend({_button:null,_isIgnoredUser:!1,_proxy:null,_userID:0,init:function(t,e){this._userID=t,this._isIgnoredUser=e,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._updateButton(),this._button.click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=this._isIgnoredUser?"unignore":"ignore";this._proxy.setOption("data",{actionName:e,className:"wcf\\data\\user\\ignore\\UserIgnoreAction",parameters:{data:{ignoreUserID:this._userID}}}),this._proxy.sendRequest()},_success:function(t){this._isIgnoredUser=t.returnValues.isIgnoredUser,this._updateButton();var e=new WCF.System.Notification;e.show()},_updateButton:function(){null===this._button&&(this._button=$('<li id="ignoreUser"><a href="#" class="button jsTooltip" title="'+WCF.Language.get("wcf.user.button."+(this._isIgnoredUser?"un":"")+"ignore")+'"><span class="icon icon16 icon-ban-circle"></span> <span class="invisible">'+WCF.Language.get("wcf.user.button."+(this._isIgnoredUser?"un":"")+"ignore")+"</span></a></li>").prependTo($("#profileButtonContainer"))),this._button.find(".button").data("tooltip",WCF.Language.get("wcf.user.button."+(this._isIgnoredUser?"un":"")+"ignore")),this._isIgnoredUser?this._button.find(".button").addClass("active").children(".icon").removeClass("icon-ban-circle").addClass("icon-circle-blank"):this._button.find(".button").removeClass("active").children(".icon").removeClass("icon-circle-blank").addClass("icon-ban-circle")}}),WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){this._profileContent=$("#profileContent"),this._userID=t;var e=this._profileContent.data("active"),i=!1;this._profileContent.find("div.tabMenuContent").each($.proxy(function(t,s){var a=$(s).wcfIdentify();e===a?this._hasContent[a]=!0:(this._hasContent[a]=!1,i=!0)},this)),i&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy(function(t,e){var i=$(e);return i.hasClass("ui-state-active")?(t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1):void 0},this)))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(t){var e=t.returnValues.containerID;this._hasContent[e]=!0;var i=this._profileContent.find("#"+e);$("<div>"+t.returnValues.template+"</div>").hide().appendTo(i),i.children("div").wcfBlindIn()}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_buttons:{},_cachedTemplate:"",_proxy:null,_tab:null,_userID:0,init:function(t,e){this._actionName="",this._cachedTemplate="",this._tab=$("#about"),this._userID=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),e&&this._beginEdit()},_initButtons:function(){var t=$("#profileButtonContainer");this._buttons={beginEdit:$('<li><a class="button"><span class="icon icon16 icon-pencil" /> <span>'+WCF.Language.get("wcf.user.editProfile")+"</span></a></li>").click($.proxy(this._beginEdit,this)).appendTo(t)}},_beginEdit:function(){this._actionName="beginEdit",this._buttons.beginEdit.hide(),$("#profileContent").wcfTabs("select","about"),this._proxy.setOption("data",{actionName:"beginEdit",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID]}),this._proxy.sendRequest()},_save:function(){this._actionName="save";var t=/values\[([a-zA-Z0-9._-]+)\]/,e={};this._tab.find("input, textarea, select").each(function(i,s){var a=$(s),n=null;switch(a.getTagName()){case"input":var o=a.attr("type");if(("radio"===o||"checkbox"===o)&&!a.prop("checked"))return;break;case"textarea":a.data("redactor")&&(n=a.redactor("wutil.getText"))}var r=a.attr("name");if(t.test(r)){var l=RegExp.$1;null===n&&(n=a.val()),"checkbox"===a.attr("type")&&/\[\]$/.test(r)?(Array.isArray(e[l])||(e[l]=[]),e[l].push(n)):e[l]=n}}),this._proxy.setOption("data",{actionName:"save",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID],parameters:{values:e}}),this._proxy.sendRequest()},_restore:function(){this._actionName="restore",this._buttons.beginEdit.show(),this._destroyEditor(),this._tab.html(this._cachedTemplate).children().css({height:"auto"})},_success:function(t){switch(this._actionName){case"beginEdit":this._prepareEdit(t);break;case"save":t.returnValues.success?(this._cachedTemplate=t.returnValues.template,this._restore()):this._prepareEdit(t,!0)}},_prepareEdit:function(t,e){this._destroyEditor();var i=this;this._tab.html(function(s,a){return e!==!0&&(i._cachedTemplate=a),t.returnValues.template}),this._tab.find("input[type=text]").attr("autocomplete","off"),this._tab.find(".formSubmit > button[data-type=save]").click($.proxy(this._save,this)),this._tab.find(".formSubmit > button[data-type=restore]").click($.proxy(this._restore,this)),this._tab.find("input").keyup(function(t){return t.which===$.ui.keyCode.ENTER?(i._save(),t.preventDefault(),!1):void 0})},_destroyEditor:function(){this._tab.find("textarea").each(function(t,e){var i=$(e);i.data("redactor")&&i.redactor("core.destroy")})}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(){var t=this._element.val();if(!t)return this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"));if(null!==this._confirmElement){var e=this._confirmElement.val();if(""!=e&&t!=e)return this._showError(this._confirmElement,this._errorMessages.notEqual)}this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){var e=this._confirmElement.val();return e?void this._blur(t):this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"))},_success:function(t){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("<small />").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return t.length<this._options.minlength||t.length>this._options.maxlength?(this._showError(this._element,WCF.Language.get("wcf.user.username.error.notValid")),!1):!0},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.User.Registration.Validation.Password=WCF.User.Registration.Validation.extend({_actionName:"validatePassword",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{password:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.password.error.",notEqual:WCF.Language.get("wcf.user.confirmPassword.error.notEqual")}}}),WCF.User.Registration.LostPassword=Class.extend({_email:null,_username:null,init:function(){this._email=$("#emailInput"),this._username=$("#usernameInput"),this._email.keyup($.proxy(this._checkEmail,this)),this._username.keyup($.proxy(this._checkUsername,this)),$.browser.mozilla&&$.browser.touch&&(this._email.on("input",$.proxy(this._checkEmail,this)),this._username.on("input",$.proxy(this._checkUsername,this))),this._checkEmail(),this._checkUsername()},_checkEmail:function(){""==this._email.val()?(this._username.enable(),this._username.parents("dl:eq(0)").removeClass("disabled")):(this._username.disable(),this._username.parents("dl:eq(0)").addClass("disabled"))},_checkUsername:function(){""==this._username.val()?(this._email.enable(),this._email.parents("dl:eq(0)").removeClass("disabled")):(this._email.disable(),this._email.parents("dl:eq(0)").addClass("disabled"))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".contentNavigation .jsMarkAllAsConfirmed").click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.user.notification.markAllAsConfirmed.confirmMessage"),function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"},success:function(){window.location.reload()}})})}),this._convertList()},_convertList:function(){$(".userNotificationItemList > .notificationItem").each(function(t,e){var i=$(e);if(!i.data("isRead")){i.find("a:not(.userLink)").prop("href",i.data("link"));var s=$('<a href="#" class="icon icon24 fa-check notificationItemMarkAsConfirmed jsTooltip" title="'+WCF.Language.get("wcf.user.notification.markAsConfirmed")+'" />').appendTo(i);s.click($.proxy(this._markAsConfirmed,this))}i.find("a:not(.notificationItemMarkAsConfirmed)").length||i.find(".details > p:eq(0)").html(function(t,e){return'<a href="'+i.data("link")+'">'+e+"</a>"})}.bind(this)),WCF.DOMNodeInsertedHandler.execute()},_markAsConfirmed:function(t){t.preventDefault();var e=$(t.currentTarget).parents(".notificationItem:eq(0)").data("objectID");return this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest(),!1},_success:function(t){var e=$(".userNotificationItemList > .notificationItem[data-object-id="+t.returnValues.markAsRead+"]");e.data("isRead",!0),e.find(".newContentBadge").remove(),e.find(".notificationItemMarkAsConfirmed").remove(),e.removeClass("notificationUnconfirmed")}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(t){var e=$("#previewContainer");e.length||(e=$('<fieldset id="previewContainer"><legend>'+WCF.Language.get("wcf.global.preview")+"</legend><div></div></fieldset>").insertBefore($("#signatureContainer")).wcfFadeIn()),e.children("div").first().html(t.returnValues.message)}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){return this._container=$("#recentActivities"),this._filteredByFollowedUsers=e===!0,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('<li class="recentActivitiesMore showMore"><button class="small">'+WCF.Language.get("wcf.user.recentActivity.more")+"</button></li>").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('<li class="recentActivitiesMore showMore"><small>'+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small></li>").appendTo(this._container),void(WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this)))):void console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($("<small>"+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"</small>").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.LikeLoader=Class.extend({_container:null,_likeType:"received",_likeValue:1,_loadButton:null,_noMoreEntries:null,_proxy:null,_userID:0,init:function(t){if(this._container=$("#likeList"),this._userID=t,!this._userID)return void console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.");this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)});var e=$('<li class="likeListMore recentActivitiesMore showMore"><button class="small">'+WCF.Language.get("wcf.like.likes.more")+"</button><small>"+WCF.Language.get("wcf.like.likes.noMoreEntries")+"</small></li>").appendTo(this._container);this._loadButton=e.children("button").click($.proxy(this._click,this)),this._noMoreEntries=e.children("small").hide(),2==this._container.find("> li").length&&(this._loadButton.hide(),this._noMoreEntries.show()),$("#likeType .button").click($.proxy(this._clickLikeType,this)),$("#likeValue .button").click($.proxy(this._clickLikeValue,this))},_clickLikeType:function(t){var e=$(t.currentTarget);this._likeType!=e.data("likeType")&&(this._likeType=e.data("likeType"),$("#likeType .button").removeClass("active"),e.addClass("active"),this._reload())},_clickLikeValue:function(t){var e=$(t.currentTarget);this._likeValue!=e.data("likeValue")&&(this._likeValue=e.data("likeValue"),$("#likeValue .button").removeClass("active"),e.addClass("active"),$("#likeType > li:first-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesReceived")),$("#likeType > li:last-child > .button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likesGiven")),this._reload())},_reload:function(){this._container.find("> li:not(:first-child):not(:last-child)").remove(),this._container.data("lastLikeTime",0),this._click()},_click:function(){this._loadButton.enable();var t={lastLikeTime:this._container.data("lastLikeTime"),userID:this._userID,likeType:this._likeType,likeValue:this._likeValue};this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\like\\LikeAction",parameters:t}),this._proxy.sendRequest()},_success:function(t){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastLikeTime",t.returnValues.lastLikeTime),this._noMoreEntries.hide(),this._loadButton.show().enable()):(this._noMoreEntries.show(),this._loadButton.hide())}}),WCF.User.ProfilePreview=WCF.Popover.extend({_proxy:null,_userProfiles:{},init:function(){this._super(".userLink"),this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1}),WCF.System.ObjectStore.add("WCF.User.ProfilePreview",this)},_loadContent:function(){var t=$("#"+this._activeElementID),e=t.data("userID");if(this._userProfiles[e])this._insertContent(this._activeElementID,this._userProfiles[e],!0);else{this._proxy.setOption("data",{actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]});var i=this._activeElementID,s=this;this._proxy.setOption("success",function(t){s._userProfiles[e]=t.returnValues.template,s._insertContent(i,t.returnValues.template,!0)}),this._proxy.setOption("failure",function(t){return s._userProfiles[e]=t.message,s._insertContent(i,t.message,!0),!1}),this._proxy.sendRequest()}},purge:function(t){delete this._userProfiles[t],this._data={}}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:null,_followButtonSelector:".jsFollowButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._followButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy(function(t,e){$(e).find(this._followButtonSelector).click($.proxy(this._click,this))},this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("following")?"unfollow":"follow",className:"wcf\\data\\user\\follow\\UserFollowAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t){this._containerList.each($.proxy(function(e,i){var s=$(i).find(this._followButtonSelector).get(0);return s&&$(s).data("objectID")==this._userID?(s=$(s),t.returnValues.following?s.data("tooltip",WCF.Language.get("wcf.user.button.unfollow")).children(".icon").removeClass("icon-plus").addClass("icon-minus"):s.data("tooltip",WCF.Language.get("wcf.user.button.follow")).children(".icon").removeClass("icon-minus").addClass("icon-plus"),s.data("following",t.returnValues.following),!1):void 0},this));var e=new WCF.System.Notification;e.show();var i=this;WCF.System.ObjectStore.invoke("WCF.User.ProfilePreview",function(t){t.purge(i._userID)})}}),WCF.User.Action.Ignore=Class.extend({_containerList:null,_ignoreButtonSelector:".jsIgnoreButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._ignoreButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy(function(t,e){$(e).find(this._ignoreButtonSelector).click($.proxy(this._click,this))},this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("ignored")?"unignore":"ignore",className:"wcf\\data\\user\\ignore\\UserIgnoreAction",parameters:{data:{ignoreUserID:this._userID}}}),this._proxy.sendRequest()},_success:function(t){this._containerList.each($.proxy(function(e,i){var s=$(i).find(this._ignoreButtonSelector).get(0);return s&&$(s).data("objectID")==this._userID?(s=$(s),t.returnValues.isIgnoredUser?s.data("tooltip",WCF.Language.get("wcf.user.button.unignore")).children(".icon").removeClass("icon-ban-circle").addClass("icon-circle-blank"):s.data("tooltip",WCF.Language.get("wcf.user.button.ignore")).children(".icon").removeClass("icon-circle-blank").addClass("icon-ban-circle"),s.data("ignored",t.returnValues.isIgnoredUser),!1):void 0},this));var e=new WCF.System.Notification;e.show();var i=this;WCF.System.ObjectStore.invoke("WCF.User.ProfilePreview",function(t){t.purge(i._userID)})}}),WCF.User.Avatar={},WCF.User.Avatar.Crop=Class.extend({_cropX:0,_cropY:0,_dialog:null,_proxy:null,MAX_THUMBNAIL_SIZE:128,init:function(t){this._avatarID=t,this._dialog&&this.destroy(),this._dialog=null,this._proxy||(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})),$(".userAvatarCrop").click($.proxy(this._showCropDialog,this))},destroy:function(){this._dialog.remove()},_crop:function(){this._proxy.setOption("data",{actionName:"cropAvatar",className:"wcf\\data\\user\\avatar\\UserAvatarAction",objectIDs:[this._avatarID],parameters:{cropX:this._cropX,cropY:this._cropY}}),this._proxy.sendRequest()},_getCropDialog:function(t){this._dialog||(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.avatar.type.custom.crop")})),this._dialog.html(t.returnValues.template),this._dialog.find('button[data-type="save"]').click($.proxy(this._crop,this)),this._cropX=t.returnValues.cropX,this._cropY=t.returnValues.cropY;var e=$("#userAvatarCropSelection > img");$("#userAvatarCropSelection").css({height:e.height()+"px",width:e.width()+"px"}),$("#userAvatarCropOverlaySelection").css({"background-image":"url("+e.attr("src")+")","background-position":-this._cropX+"px "+-this._cropY+"px",left:this._cropX+"px",top:this._cropY+"px"}).draggable({containment:"parent",drag:$.proxy(this._updateSelection,this),stop:$.proxy(this._updateSelection,this)}),this._dialog.find('button[data-type="save"]').click($.proxy(this._save,this)),this._dialog.wcfDialog("render")},_showCropDialog:function(){this._dialog?this._dialog.wcfDialog("open"):(this._proxy.setOption("data",{actionName:"getCropDialog",className:"wcf\\data\\user\\avatar\\UserAvatarAction",objectIDs:[this._avatarID]}),this._proxy.sendRequest())},_success:function(t){switch(t.actionName){case"getCropDialog":this._getCropDialog(t);break;case"cropAvatar":
-$("#avatarUpload > dt > img").replaceWith($('<img src="'+t.returnValues.url+'" alt="" class="userAvatarCrop jsTooltip" title="'+WCF.Language.get("wcf.user.avatar.type.custom.crop")+'" />').css({width:"96px",height:"96px"}).click($.proxy(this._showCropDialog,this))),WCF.DOMNodeInsertedHandler.execute(),this._dialog.wcfDialog("close");var e=new WCF.System.Notification;e.show()}},_updateSelection:function(t,e){this._cropX=e.position.left,this._cropY=e.position.top,$("#userAvatarCropOverlaySelection").css({"background-position":-e.position.left+"px "+-e.position.top+"px"})}}),WCF.User.Avatar.Upload=WCF.Upload.extend({_avatarCrop:null,_userID:0,init:function(t,e){this._super($("#avatarUpload > dd > div"),void 0,"wcf\\data\\user\\avatar\\UserAvatarAction"),this._userID=t||0,this._avatarCrop=e,$("#avatarForm input[type=radio]").change(function(){"custom"==$(this).val()?$("#avatarUpload > dd > div").show():$("#avatarUpload > dd > div").hide()}),$("#avatarForm input[type=radio][value=custom]:checked").length||$("#avatarUpload > dd > div").hide()},_initFile:function(){return $("#avatarUpload > dt > img")},_success:function(t,e){if(e.returnValues.url){this._updateImage(e.returnValues.url,e.returnValues.canCrop),e.returnValues.canCrop?this._avatarCrop?this._avatarCrop.init(e.returnValues.avatarID):this._avatarCrop=new WCF.User.Avatar.Crop(e.returnValues.avatarID):this._avatarCrop&&(this._avatarCrop.destroy(),this._avatarCrop=null),$("#avatarUpload > dd > .innerError").remove();var i=new WCF.System.Notification(WCF.Language.get("wcf.user.avatar.upload.success"));i.show()}else e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.user.avatar.upload.error."+e.returnValues.errorType))},_updateImage:function(t,e){$("#avatarUpload > dt > img").remove();var i=$('<img src="'+t+'" alt="" />').css({height:"auto","max-height":"96px","max-width":"96px",width:"auto"});e&&(i.addClass("userAvatarCrop").addClass("jsTooltip"),i.attr("title",WCF.Language.get("wcf.user.avatar.type.custom.crop"))),$("#avatarUpload > dt").prepend(i),WCF.DOMNodeInsertedHandler.execute()},_getInnerErrorElement:function(){var t=$("#avatarUpload > dd > .innerError");return t.length||(t=$('<small class="innerError"></span>'),$("#avatarUpload > dd").append(t)),t},_getParameters:function(){return{userID:this._userID}}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){if(e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))return void console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount);if(this._cache[this._pageNo]){var i=!1;null===this._dialog&&(this._dialog=$('<div id="userList'+this._className.hashCode()+'" />').hide().appendTo(document.body),i=!0),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),this._pageCount>1&&this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)),i?this._dialog.wcfDialog({title:this._dialogTitle}):this._dialog.wcfDialog("open").wcfDialog("render"),WCF.DOMNodeInsertedHandler.execute()}else this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest()},_success:function(t){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:".jsSubscribeButton",_buttons:{},_dialog:null,_notification:null,_reloadOnUnsubscribe:!1,init:function(t){this._buttons={},this._notification=null,this._reloadOnUnsubscribe=t===!0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(this._buttonSelector).each($.proxy(function(t,e){var i=$(e),s=i.data("objectID");this._buttons[s]=i.click($.proxy(this._click,this))},this)),WCF.System.Event.addListener("com.woltlab.wcf.objectWatch","update",$.proxy(this._updateSubscriptionStatus,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget);this._proxy.setOption("data",{actionName:"manageSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{objectID:e.data("objectID"),objectType:e.data("objectType")}}),this._proxy.sendRequest()},_success:function(t){if("manageSubscription"===t.actionName){null===this._dialog?(this._dialog=$("<div>"+t.returnValues.template+"</div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.objectWatch.manageSubscription")})):(this._dialog.html(t.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find(".formSubmit > .jsButtonSave").data("objectID",t.returnValues.objectID).click($.proxy(this._save,this));var e=this._dialog.find("input[name=enableNotification]").disable();this._dialog.find("input[name=subscribe]").change(function(t){var i=$(t.currentTarget);1==i.val()?e.enable():e.disable()});var i=this._dialog.find("input[name=subscribe]:checked");i.length&&1==i.val()&&e.enable()}else"saveSubscription"===t.actionName&&this._dialog.is(":visible")&&(this._dialog.wcfDialog("close"),this._updateSubscriptionStatus({isSubscribed:t.returnValues.subscribe,objectID:t.returnValues.objectID}),null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show())},_save:function(t){var e=this._buttons[$(t.currentTarget).data("objectID")],i=this._dialog.find("input[name=subscribe]:checked").val(),s=this._dialog.find("input[name=enableNotification]").is(":checked")?1:0;this._proxy.setOption("data",{actionName:"saveSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{enableNotification:s,objectID:e.data("objectID"),objectType:e.data("objectType"),subscribe:i}}),this._proxy.sendRequest()},_updateSubscriptionStatus:function(t){var e=$(this._buttonSelector+"[data-object-id="+t.objectID+"]"),i=e.children(".icon");if(t.isSubscribed)i.removeClass("icon-bookmark-empty").addClass("icon-bookmark"),e.data("isSubscribed",!0);else if(i.removeClass("icon-bookmark").addClass("icon-bookmark-empty"),e.data("isSubscribed",!1),this._reloadOnUnsubscribe)return void window.location.reload();WCF.System.Event.fireEvent("com.woltlab.wcf.objectWatch","updatedSubscription",t)}}),WCF.User.InlineEditor=WCF.InlineEditor.extend({_additionalOptions:{},_dialog:null,_permissions:{},init:function(t){this._super(t),WCF.System.ObjectStore.add("WCF.User.InlineEditor",this)},_execute:function(t,e){if(!this._validate(t,e))return!1;var i={},s=$("#"+t);if(void 0!==this._additionalOptions[e])this._additionalOptions[e].callback(t);else switch(e){case"unban":case"enableAvatar":case"enableSignature":switch(e){case"unban":i.banned=0;break;case"enableAvatar":i.disableAvatar=0;break;case"enableSignature":i.disableSignature=0}this._proxy.setOption("data",{actionName:e,className:"wcf\\data\\user\\UserAction",objectIDs:[s.data("objectID")]}),this._proxy.sendRequest();break;case"ban":case"disableAvatar":case"disableSignature":"ban"==e?i.banned=1:i[e]=1,this._showReasonDialog(s.data("objectID"),e);break;case"advanced":window.location=this._getTriggerElement(s).attr("href")}$.getLength(i)&&this._updateData.push({data:i,elementID:t})},_executeReasonAction:function(){var t=this._dialog.data("optionName");this._dialog.find(".innerError").remove();var e="";if(!$("#"+t+"NeverExpires").is(":checked")&&(e=$("#"+t+"ExpiresDatePicker").val(),!e))return void this._dialog.find("#"+t+"ExpiresSettings > dd > small").prepend($('<small class="innerError" />').text(WCF.Language.get("wcf.global.form.error.empty")));var i={};i[t+"Reason"]=$("#"+t+"Reason").val(),i[t+"Expires"]=e,this._proxy.setOption("data",{actionName:t,className:"wcf\\data\\user\\UserAction",objectIDs:[this._dialog.data("userID")],parameters:i}),this._proxy.sendRequest()},_getPermission:function(t){return this._permissions[t]?this._permissions[t]:0},_getTriggerElement:function(t){return t.find(".jsUserInlineEditor")},_setOptions:function(){this._options=[{label:WCF.Language.get("wcf.user.ban"),optionName:"ban"},{label:WCF.Language.get("wcf.user.unban"),optionName:"unban"},{label:WCF.Language.get("wcf.user.disableAvatar"),optionName:"disableAvatar"},{label:WCF.Language.get("wcf.user.enableAvatar"),optionName:"enableAvatar"},{label:WCF.Language.get("wcf.user.disableSignature"),optionName:"disableSignature"},{label:WCF.Language.get("wcf.user.enableSignature"),optionName:"enableSignature"}];for(var t in this._additionalOptions)this._options.push({label:this._additionalOptions[t].label,optionName:t});this._options.push({optionName:"divider"}),this._options.push({label:WCF.Language.get("wcf.user.edit"),optionName:"advanced"})},_show:function(t){var e=$(t.currentTarget),i=e.data("elementID");if(!this._dropdowns[i]){var s=e.next(".dropdownMenu");s&&(this._dropdowns[i]=s,WCF.Dropdown.initDropdown(this._getTriggerElement(this._elements[i]),!0))}return this._super(t)},_showReasonDialog:function(t,e){this._dialog&&this._dialog.remove(),this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.append($('<fieldset><dl><dt><label for="'+e+'Reason">'+WCF.Language.get("wcf.global.reason")+'</label></dt><dd><textarea id="'+e+'Reason" cols="40" rows="3" />'+(WCF.Language.get("wcf.user."+e+".reason.description")!="wcf.user."+e+".reason.description"?"<small>"+WCF.Language.get("wcf.user."+e+".reason.description")+"</small>":"")+'</dd></dl><dl><dt></dt><dd><label for="'+e+'NeverExpires"><input type="checkbox" name="'+e+'NeverExpires" id="'+e+'NeverExpires" checked="checked" /> '+WCF.Language.get("wcf.user."+e+".neverExpires")+'</label></dd></dl><dl id="'+e+'ExpiresSettings" style="display: none;"><dt><label for="'+e+'Expires">'+WCF.Language.get("wcf.user."+e+".expires")+'</label></dt><dd><input type="date" name="'+e+'Expires" id="'+e+'Expires" class="medium" min="'+new Date(1e3*TIME_NOW).toISOString()+'" data-ignore-timezone="true" /><small>'+WCF.Language.get("wcf.user."+e+".expires.description")+"</small></dd></dl></fieldset>")),this._dialog.append($('<div class="formSubmit"><button class="buttonPrimary" accesskey="s">'+WCF.Language.get("wcf.global.button.submit")+"</button></div>")),this._dialog.data("optionName",e).data("userID",t),this._dialog.find("#"+e+"NeverExpires").change(function(){$("#"+e+"ExpiresSettings").toggle()}),this._dialog.find("button").click($.proxy(this._executeReasonAction,this)),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user."+e+".confirmMessage")})},_updateState:function(t){this._notification.show();for(var e=0,i=this._updateData.length;i>e;e++){var s=this._updateData[e],a=$("#"+s.elementID);for(var n in s.data)a.data(n,s.data[n])}("ban"==t.actionName||"disableAvatar"==t.actionName||"disableSignature"==t.actionName)&&this._dialog.wcfDialog("close"),"unban"==t.actionName&&$(".userHeadline .jsUserBanned").remove()},_validate:function(t,e){var i=$("#"+t);if(void 0!==this._additionalOptions[e])return!0;switch(e){case"ban":case"unban":return this._getPermission("canBanUser")?"ban"==e?!i.data("banned"):i.data("banned"):!1;case"disableAvatar":case"enableAvatar":return this._getPermission("canDisableAvatar")?"disableAvatar"==e?!i.data("disableAvatar"):i.data("disableAvatar"):!1;case"disableSignature":case"enableSignature":return this._getPermission("canDisableSignature")?"disableSignature"==e?!i.data("disableSignature"):i.data("disableSignature"):!1;case"advanced":return this._getPermission("canEditUser")}return!1},addOption:function(t,e,i){$.isFunction(i)||console.debug("[WCF.User.InlineEditor] Missing callback"),void 0!==this._additionalOptions[e]&&console.debug('[WCF.User.InlineEditor] Additional option with name "'+e+"' already exists"),this._additionalOptions[e]={callback:i,label:t},this._setOptions()},setPermission:function(t,e){this._permissions[t]=e},setPermissions:function(t){for(var e in t)this.setPermission(e,t[e])}}); })(this);
+(function (window, undefined) { })(this);
 
 // WCF.Moderation.js
-(function (window, undefined) {"use strict";WCF.Moderation={},WCF.Moderation.Management=Class.extend({_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:null,_languageItem:"",_proxy:null,_queueID:0,_redirectURL:"",init:function(e,t,a){return this._buttonSelector?this._className?(this._dialog=null,this._queueID=e,this._redirectURL=t,this._languageItem=a,this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),$(this._buttonSelector).click($.proxy(this._click,this)),void $("<a>"+WCF.Language.get("wcf.moderation.assignedUser.change")+"</a>").click($.proxy(this._clickAssignedUser,this)).insertAfter($("#moderationAssignedUserContainer > dd > span"))):void console.debug("[WCF.Moderation.Management] Missing class name, aborting."):void console.debug("[WCF.Moderation.Management] Missing button selector, aborting.")},_click:function(e){var t=$(e.currentTarget).wcfIdentify(),a="";this._confirmationTemplate[t]&&(a=this._confirmationTemplate[t]),WCF.System.Confirmation.show(WCF.Language.get(this._languageItem.replace(/{actionName}/,t)),$.proxy(function(e){if("confirm"===e){var i={actionName:t,className:this._className,objectIDs:[this._queueID]};this._confirmationTemplate[t]&&(i.parameters={},a.find("input, textarea").each(function(e,t){var a=$(t),o=a.val();"input"===a.getTagName()&&"checkbox"===a.attr("type")&&(a.is(":checked")||(o=null)),null!==o&&(i.parameters[a.attr("name")]=o)})),this._proxy.setOption("data",i),this._proxy.sendRequest(),$(this._buttonSelector).disable()}},this),{},a)},_clickAssignedUser:function(){this._proxy.setOption("data",{actionName:"getAssignUserForm",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[this._queueID]}),this._proxy.sendRequest()},_success:function(e){switch(e.actionName){case"getAssignUserForm":null===this._dialog?(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.html(e.returnValues.template).wcfDialog({title:WCF.Language.get("wcf.moderation.assignedUser")})):this._dialog.html(e.returnValues.template).wcfDialog("open"),this._dialog.find("button[data-type=submit]").click($.proxy(this._assignUser,this));break;case"assignUser":var t=$("#moderationAssignedUserContainer > dd > span").empty();e.returnValues.userID?$('<a href="'+e.returnValues.link+'" data-user-id="'+e.returnValues.userID+'" class="userLink">'+WCF.String.escapeHTML(e.returnValues.username)+"</a>").appendTo(t):t.append(e.returnValues.username),t.append(" "),e.returnValues.newStatus&&$("#moderationStatusContainer > dd").text(WCF.Language.get("wcf.moderation.status."+e.returnValues.newStatus)),this._dialog.wcfDialog("close"),(new WCF.System.Notification).show();break;default:var a=new WCF.System.Notification(WCF.Language.get("wcf.global.success")),i=this;a.show(function(){window.location=i._redirectURL})}},_failure:function(e){if(e.returnValues&&e.returnValues.fieldName&&"assignedUsername"==e.returnValues.fieldName){this._dialog.find("small.innerError").remove();var t="";switch(e.returnValues.errorType){case"empty":t=WCF.Language.get("wcf.global.form.error.empty");break;case"notAffected":t=WCF.Language.get("wcf.moderation.assignedUser.error.notAffected");break;default:t=WCF.Language.get("wcf.user.username.error."+e.returnValues.errorType,{username:this._dialog.find("#assignedUsername").val()})}return $('<small class="innerError">'+t+"</small>").insertAfter(this._dialog.find("#assignedUsername")),!1}return!0},_assignUser:function(){var e=this._dialog.find("input[name=assignedUserID]:checked").val(),t="";return-1==e&&(t=$.trim(this._dialog.find("#assignedUsername").val())),-1==e&&0==t.length?(this._dialog.find("small.innerError").remove(),void $('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(this._dialog.find("#assignedUsername"))):(this._proxy.setOption("data",{actionName:"assignUser",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[this._queueID],parameters:{assignedUserID:e,assignedUsername:t}}),void this._proxy.sendRequest())}}),WCF.Moderation.Queue={},WCF.Moderation.Queue.MarkAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(document).on("dblclick",".moderationList .new .columnAvatar",$.proxy(this._dblclick,this))},_dblclick:function(e){this._proxy.setOption("data",{actionName:"markAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[$(e.currentTarget).parents("tr:eq(0)").data("queueID")]}),this._proxy.sendRequest()},_success:function(e){$(".moderationList .new").each(function(t,a){var i=$(a);WCF.inArray(i.data("queueID"),e.objectIDs)&&(i.removeClass("new"),i.find(".columnAvatar").off("dblclick"))})}}),WCF.Moderation.Queue.MarkAllAsRead=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".markAllAsReadButton").click($.proxy(this._click,this))},_click:function(e){e.preventDefault(),this._proxy.setOption("data",{actionName:"markAllAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},_success:function(){var e=$(".moderationList");e.find(".new").removeClass("new"),e.find(".columnAvatar").off("dblclick")}}),WCF.Moderation.Activation={},WCF.Moderation.Activation.Management=WCF.Moderation.Management.extend({init:function(e,t){this._buttonSelector="#enableContent, #removeContent",this._className="wcf\\data\\moderation\\queue\\ModerationQueueActivationAction",this._super(e,t,"wcf.moderation.activation.{actionName}.confirmMessage")}}),WCF.Moderation.Report={},WCF.Moderation.Report.Content=Class.extend({_buttons:{},_buttonSelector:"",_dialog:null,_notification:null,_objectID:0,_objectType:"",_proxy:null,init:function(e,t){this._objectType=e,this._buttonSelector=t,this._buttons={},this._notification=null,this._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Moderation.Report"+this._objectType.hashCode(),$.proxy(this._initButtons,this))},_initButtons:function(){var e=this;$(this._buttonSelector).each(function(t,a){var i=$(a),o=i.wcfIdentify();e._buttons[o]||(e._buttons[o]=i,i.click($.proxy(e._click,e)))})},_click:function(e){e.preventDefault(),this._objectID=$(e.currentTarget).data("objectID"),this._proxy.setOption("data",{actionName:"prepareReport",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()},_success:function(e){e.returnValues.reported?(null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.moderation.report.success"))),this._dialog.wcfDialog("close"),this._notification.show()):e.returnValues.template&&(this._showDialog(e.returnValues.template),e.returnValues.alreadyReported||this._dialog.find(".jsSubmitReport").click($.proxy(this._submit,this)))},_showDialog:function(e){null===this._dialog&&(this._dialog=$("#moderationReport"),this._dialog.length||(this._dialog=$('<div id="moderationReport" />').hide().appendTo(document.body))),this._dialog.html(e).wcfDialog({title:WCF.Language.get("wcf.moderation.report.reportContent")}).wcfDialog("render")},_submit:function(){var e=this._dialog.find(".jsReportMessage").val();return""==$.trim(e)?(this._dialog.find("fieldset > dl").addClass("formError"),void(this._dialog.find(".innerError").length||this._dialog.find(".jsReportMessage").after($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>")))):(this._proxy.setOption("data",{actionName:"report",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{message:e,objectID:this._objectID,objectType:this._objectType}}),void this._proxy.sendRequest())}}),WCF.Moderation.Report.Management=WCF.Moderation.Management.extend({init:function(e,t){this._buttonSelector="#removeContent, #removeReport",this._className="wcf\\data\\moderation\\queue\\ModerationQueueReportAction",this._super(e,t,"wcf.moderation.report.{actionName}.confirmMessage"),this._confirmationTemplate.removeContent=$('<fieldset><dl><dt><label for="message">'+WCF.Language.get("wcf.moderation.report.removeContent.reason")+'</label></dt><dd><textarea name="message" id="message" cols="40" rows="3" /></dd></dl></fieldset>')}}),WCF.User.Panel.Moderation=WCF.User.Panel.Abstract.extend({init:function(e){e.enableMarkAsRead=!0,this._super($("#outstandingModeration"),"outstandingModeration",e)},_initDropdown:function(){var e=this._super();return $('<li><a href="'+this._options.deletedContentLink+'" title="'+this._options.deletedContent+'" class="jsTooltip"><span class="icon icon16 fa-trash-o" /></a></li>').appendTo(e.getLinkList()),e},_load:function(){this._proxy.setOption("data",{actionName:"getOutstandingQueues",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},_markAsRead:function(e,t){this._proxy.setOption("data",{actionName:"markAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[t]}),this._proxy.sendRequest()},_markAllAsRead:function(){this._proxy.setOption("data",{actionName:"markAllAsRead",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction"}),this._proxy.sendRequest()},resetItems:function(){this._super(),this._loadData=!0}}); })(this);
+(function (window, undefined) { })(this);
 
diff --git a/wcfsetup/install/files/js/WCF.Core.min.js b/wcfsetup/install/files/js/WCF.Core.min.js
deleted file mode 100644 (file)
index dd47e79..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-var requirejs,require,define;!function(global){function isFunction(e){return"[object Function]"===ostring.call(e)}function isArray(e){return"[object Array]"===ostring.call(e)}function each(e,t){if(e){var n;for(n=0;n<e.length&&(!e[n]||!t(e[n],n,e));n+=1);}}function eachReverse(e,t){if(e){var n;for(n=e.length-1;n>-1&&(!e[n]||!t(e[n],n,e));n-=1);}}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return hasProp(e,t)&&e[t]}function eachProp(e,t){var n;for(n in e)if(hasProp(e,n)&&t(e[n],n))break}function mixin(e,t,n,i){return t&&eachProp(t,function(t,r){(n||!hasProp(e,r))&&(!i||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[r]=t:(e[r]||(e[r]={}),mixin(e[r],t,n,i)))}),e}function bind(e,t){return function(){return t.apply(e,arguments)}}function scripts(){return document.getElementsByTagName("script")}function defaultOnError(e){throw e}function getGlobal(e){if(!e)return e;var t=global;return each(e.split("."),function(e){t=t[e]}),t}function makeError(e,t,n,i){var r=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return r.requireType=e,r.requireModules=i,n&&(r.originalError=n),r}function newContext(e){function t(e){var t,n;for(t=0;t<e.length;t++)if(n=e[t],"."===n)e.splice(t,1),t-=1;else if(".."===n){if(0===t||1===t&&".."===e[2]||".."===e[t-1])continue;t>0&&(e.splice(t-1,2),t-=2)}}function n(e,n,i){var r,a,o,s,l,c,u,d,h,p,f,m,g=n&&n.split("/"),v=x.map,b=v&&v["*"];if(e&&(e=e.split("/"),u=e.length-1,x.nodeIdCompat&&jsSuffixRegExp.test(e[u])&&(e[u]=e[u].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&g&&(m=g.slice(0,g.length-1),e=m.concat(e)),t(e),e=e.join("/")),i&&v&&(g||b)){o=e.split("/");e:for(s=o.length;s>0;s-=1){if(c=o.slice(0,s).join("/"),g)for(l=g.length;l>0;l-=1)if(a=getOwn(v,g.slice(0,l).join("/")),a&&(a=getOwn(a,c))){d=a,h=s;break e}!p&&b&&getOwn(b,c)&&(p=getOwn(b,c),f=s)}!d&&p&&(d=p,h=f),d&&(o.splice(0,h,d),e=o.join("/"))}return r=getOwn(x.pkgs,e),r?r:e}function i(e){isBrowser&&each(scripts(),function(t){return t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===w.contextName?(t.parentNode.removeChild(t),!0):void 0})}function r(e){var t=getOwn(x.paths,e);return t&&isArray(t)&&t.length>1?(t.shift(),w.require.undef(e),w.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,c,u=null,d=t?t.name:null,h=e,p=!0,f="";return e||(p=!1,e="_@r"+(D+=1)),c=a(e),u=c[0],e=c[1],u&&(u=n(u,d,r),s=getOwn(k,u)),e&&(u?f=s&&s.normalize?s.normalize(e,function(e){return n(e,d,r)}):-1===e.indexOf("!")?n(e,d,r):e:(f=n(e,d,r),c=a(f),u=c[0],f=c[1],i=!0,o=w.nameToUrl(f))),l=!u||s||i?"":"_unnormalized"+(N+=1),{prefix:u,name:f,parentMap:t,unnormalized:!!l,url:o,originalName:h,isDefine:p,id:(u?u+"!"+f:f)+l}}function s(e){var t=e.id,n=getOwn(L,t);return n||(n=L[t]=new w.Module(e)),n}function l(e,t,n){var i=e.id,r=getOwn(L,i);!hasProp(k,i)||r&&!r.defineEmitComplete?(r=s(e),r.error&&"error"===t?n(r.error):r.on(t,n)):"defined"===t&&n(k[i])}function c(e,t){var n=e.requireModules,i=!1;t?t(e):(each(n,function(t){var n=getOwn(L,t);n&&(n.error=e,n.events.error&&(i=!0,n.emit("error",e)))}),i||req.onError(e))}function u(){globalDefQueue.length&&(apsp.apply(A,[A.length,0].concat(globalDefQueue)),globalDefQueue=[])}function d(e){delete L[e],delete E[e]}function h(e,t,n){var i=e.map.id;e.error?e.emit("error",e.error):(t[i]=!0,each(e.depMaps,function(i,r){var a=i.id,o=getOwn(L,a);!o||e.depMatched[r]||n[a]||(getOwn(t,a)?(e.defineDep(r,k[a]),e.check()):h(o,t,n))}),n[i]=!0)}function p(){var e,t,n=1e3*x.waitSeconds,a=n&&w.startTime+n<(new Date).getTime(),o=[],s=[],l=!1,u=!0;if(!b){if(b=!0,eachProp(E,function(e){var n=e.map,c=n.id;if(e.enabled&&(n.isDefine||s.push(e),!e.error))if(!e.inited&&a)r(c)?(t=!0,l=!0):(o.push(c),i(c));else if(!e.inited&&e.fetched&&n.isDefine&&(l=!0,!n.prefix))return u=!1}),a&&o.length)return e=makeError("timeout","Load timeout for modules: "+o,null,o),e.contextName=w.contextName,c(e);u&&each(s,function(e){h(e,{},{})}),a&&!t||!l||!isBrowser&&!isWebWorker||C||(C=setTimeout(function(){C=0,p()},50)),b=!1}}function f(e){hasProp(k,e[0])||s(o(e[0],null,!0)).init(e[1],e[2])}function m(e,t,n,i){e.detachEvent&&!isOpera?i&&e.detachEvent(i,t):e.removeEventListener(n,t,!1)}function g(e){var t=e.currentTarget||e.srcElement;return m(t,w.onScriptLoad,"load","onreadystatechange"),m(t,w.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function v(){var e;for(u();A.length;){if(e=A.shift(),null===e[0])return c(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));f(e)}}var b,y,w,_,C,x={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},L={},E={},T={},A=[],k={},S={},M={},D=1,N=1;return _={require:function(e){return e.require?e.require:e.require=w.makeRequire(e.map)},exports:function(e){return e.usingExports=!0,e.map.isDefine?e.exports?k[e.map.id]=e.exports:e.exports=k[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 getOwn(x.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},y=function(e){this.events=getOwn(T,e.id)||{},this.map=e,this.shim=getOwn(x.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},y.prototype={init:function(e,t,n,i){i=i||{},this.inited||(this.factory=t,n?this.on("error",n):this.events.error&&(n=bind(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,w.startTime=(new Date).getTime();var e=this.map;return this.shim?void w.makeRequire(this.map,{enableBuildCallback:!0})(this.shim.deps||[],bind(this,function(){return e.prefix?this.callPlugin():this.load()})):e.prefix?this.callPlugin():this.load()}},load:function(){var e=this.map.url;S[e]||(S[e]=!0,w.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,n=this.map.id,i=this.depExports,r=this.exports,a=this.factory;if(this.inited){if(this.error)this.emit("error",this.error);else if(!this.defining){if(this.defining=!0,this.depCount<1&&!this.defined){if(isFunction(a)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{r=w.execCb(n,a,i,r)}catch(o){e=o}else r=w.execCb(n,a,i,r);if(this.map.isDefine&&void 0===r&&(t=this.module,t?r=t.exports:this.usingExports&&(r=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 r=a;this.exports=r,this.map.isDefine&&!this.ignore&&(k[n]=r,req.onResourceLoad&&req.onResourceLoad(w,this.map,this.depMaps)),d(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,t=e.id,i=o(e.prefix);this.depMaps.push(i),l(i,"defined",bind(this,function(i){var r,a,u,h=getOwn(M,this.map.id),p=this.map.name,f=this.map.parentMap?this.map.parentMap.name:null,m=w.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(i.normalize&&(p=i.normalize(p,function(e){return n(e,f,!0)})||""),a=o(e.prefix+"!"+p,this.map.parentMap),l(a,"defined",bind(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),u=getOwn(L,a.id),void(u&&(this.depMaps.push(a),this.events.error&&u.on("error",bind(this,function(e){this.emit("error",e)})),u.enable()))):h?(this.map.url=w.nameToUrl(h),void this.load()):(r=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),r.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(L,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&d(e.map.id)}),c(e)}),r.fromText=bind(this,function(n,i){var a=e.name,l=o(a),u=useInteractive;i&&(n=i),u&&(useInteractive=!1),s(l),hasProp(x.config,t)&&(x.config[a]=x.config[t]);try{req.exec(n)}catch(d){return c(makeError("fromtexteval","fromText eval for "+t+" failed: "+d,d,[t]))}u&&(useInteractive=!0),this.depMaps.push(l),w.completeLoad(a),m([a],r)}),void i.load(e.name,m,r,x))})),w.enable(i,this),this.pluginMaps[i.id]=i},enable:function(){E[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var n,i,r;if("string"==typeof e){if(e=o(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,r=getOwn(_,e.id))return void(this.depExports[t]=r(this));this.depCount+=1,l(e,"defined",bind(this,function(e){this.undefed||(this.defineDep(t,e),this.check())})),this.errback?l(e,"error",bind(this,this.errback)):this.events.error&&l(e,"error",bind(this,function(e){this.emit("error",e)}))}n=e.id,i=L[n],hasProp(_,n)||!i||i.enabled||w.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(L,e.id);t&&!t.enabled&&w.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){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},w={config:x,contextName:e,registry:L,defined:k,urlFetched:S,defQueue:A,Module:y,makeModuleMap:o,nextTick:req.nextTick,onError:c,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");var t=x.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(x[t]||(x[t]={}),mixin(x[t],e,!0,!0)):x[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(M[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,n){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=w.makeShimExports(e)),t[n]=e}),x.shim=t),e.packages&&each(e.packages,function(e){var t,n;e="string"==typeof e?{name:e}:e,n=e.name,t=e.location,t&&(x.paths[n]=e.location),x.pkgs[n]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(L,function(e,t){e.inited||e.map.unnormalized||(e.map=o(t,null,!0))}),(e.deps||e.callback)&&w.require(e.deps||[],e.callback)},makeShimExports:function(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t},makeRequire:function(t,r){function a(n,i,l){var u,d,h;return r.enableBuildCallback&&i&&isFunction(i)&&(i.__requireJsBuild=!0),"string"==typeof n?isFunction(i)?c(makeError("requireargs","Invalid require call"),l):t&&hasProp(_,n)?_[n](L[t.id]):req.get?req.get(w,n,t,a):(d=o(n,t,!1,!0),u=d.id,hasProp(k,u)?k[u]:c(makeError("notloaded",'Module name "'+u+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(v(),w.nextTick(function(){v(),h=s(o(null,t)),h.skipMap=r.skipMap,h.init(n,i,l,{enabled:!0}),p()}),a)}return r=r||{},mixin(a,{isBrowser:isBrowser,toUrl:function(e){var i,r=e.lastIndexOf("."),a=e.split("/")[0],o="."===a||".."===a;return-1!==r&&(!o||r>1)&&(i=e.substring(r,e.length),e=e.substring(0,r)),w.nameToUrl(n(e,t&&t.id,!0),i,!0)},defined:function(e){return hasProp(k,o(e,t,!1,!0).id)},specified:function(e){return e=o(e,t,!1,!0).id,hasProp(k,e)||hasProp(L,e)}}),t||(a.undef=function(e){u();var n=o(e,t,!0),r=getOwn(L,e);r.undefed=!0,i(e),delete k[e],delete S[n.url],delete T[e],eachReverse(A,function(t,n){t[0]===e&&A.splice(n,1)}),r&&(r.events.defined&&(T[e]=r.events),d(e))}),a},enable:function(e){var t=getOwn(L,e.id);t&&s(e).enable()},completeLoad:function(e){var t,n,i,a=getOwn(x.shim,e)||{},o=a.exports;for(u();A.length;){if(n=A.shift(),null===n[0]){if(n[0]=e,t)break;t=!0}else n[0]===e&&(t=!0);f(n)}if(i=getOwn(L,e),!t&&!hasProp(k,e)&&i&&!i.inited){if(!(!x.enforceDefine||o&&getGlobal(o)))return r(e)?void 0:c(makeError("nodefine","No define call for "+e,null,[e]));f([e,a.deps||[],a.exportsFn])}p()},nameToUrl:function(e,t,n){var i,r,a,o,s,l,c,u=getOwn(x.pkgs,e);if(u&&(e=u),c=getOwn(M,e))return w.nameToUrl(c,t,n);if(req.jsExtRegExp.test(e))s=e+(t||"");else{for(i=x.paths,r=e.split("/"),a=r.length;a>0;a-=1)if(o=r.slice(0,a).join("/"),l=getOwn(i,o)){isArray(l)&&(l=l[0]),r.splice(0,a,l);break}s=r.join("/"),s+=t||(/^data\:|\?/.test(s)||n?"":".js"),s=("/"===s.charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":x.baseUrl)+s}return x.urlArgs?s+((-1===s.indexOf("?")?"?":"&")+x.urlArgs):s},load:function(e,t){req.load(w,e,t)},execCb:function(e,t,n,i){return t.apply(i,n)},onScriptLoad:function(e){if("load"===e.type||readyRegExp.test((e.currentTarget||e.srcElement).readyState)){interactiveScript=null;var t=g(e);w.completeLoad(t.id)}},onScriptError:function(e){var t=g(e);return r(t.id)?void 0:c(makeError("scripterror","Script error for: "+t.id,e,[t.id]))}},w.require=w.makeRequire(),w}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(e){return"interactive"===e.readyState?interactiveScript=e:void 0}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.1.19",commentRegExp=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,ap=Array.prototype,apsp=ap.splice,isBrowser=!("undefined"==typeof window||"undefined"==typeof navigator||!window.document),isWebWorker=!isBrowser&&"undefined"!=typeof importScripts,readyRegExp=isBrowser&&"PLAYSTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/,defContextName="_",isOpera="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),contexts={},cfg={},globalDefQueue=[],useInteractive=!1;if("undefined"==typeof define){if("undefined"!=typeof requirejs){if(isFunction(requirejs))return;cfg=requirejs,requirejs=void 0}"undefined"==typeof require||isFunction(require)||(cfg=require,require=void 0),req=requirejs=function(e,t,n,i){var r,a,o=defContextName;return isArray(e)||"string"==typeof e||(a=e,isArray(t)?(e=t,t=n,n=i):e=[]),a&&a.context&&(o=a.context),r=getOwn(contexts,o),r||(r=contexts[o]=req.s.newContext(o)),a&&r.configure(a),r.require(e,t,n)},req.config=function(e){return req(e)},req.nextTick="undefined"!=typeof setTimeout?function(e){setTimeout(e,4)}:function(e){e()},require||(require=req),req.version=version,req.jsExtRegExp=/^\/|:|\?|\.js$/,req.isBrowser=isBrowser,s=req.s={contexts:contexts,newContext:newContext},req({}),each(["toUrl","undef","defined","specified"],function(e){req[e]=function(){var t=contexts[defContextName];return t.require[e].apply(t,arguments)}}),isBrowser&&(head=s.head=document.getElementsByTagName("head")[0],baseElement=document.getElementsByTagName("base")[0],baseElement&&(head=s.head=baseElement.parentNode)),req.onError=defaultOnError,req.createNode=function(e,t,n){var i=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return i.type=e.scriptType||"text/javascript",i.charset="utf-8",i.async=!0,i},req.load=function(e,t,n){var i,r=e&&e.config||{};if(isBrowser)return i=req.createNode(r,t,n),r.onNodeCreated&&r.onNodeCreated(i,r,t,n),i.setAttribute("data-requirecontext",e.contextName),i.setAttribute("data-requiremodule",t),!i.attachEvent||i.attachEvent.toString&&i.attachEvent.toString().indexOf("[native code")<0||isOpera?(i.addEventListener("load",e.onScriptLoad,!1),i.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,i.attachEvent("onreadystatechange",e.onScriptLoad)),i.src=n,currentlyAddingScript=i,baseElement?head.insertBefore(i,baseElement):head.appendChild(i),currentlyAddingScript=null,i;if(isWebWorker)try{importScripts(n),e.completeLoad(t)}catch(a){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+n,a,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){return head||(head=e.parentNode),dataMain=e.getAttribute("data-main"),dataMain?(mainScript=dataMain,cfg.baseUrl||(src=mainScript.split("/"),mainScript=src.pop(),subPath=src.length?src.join("/")+"/":"./",cfg.baseUrl=subPath),mainScript=mainScript.replace(jsSuffixRegExp,""),req.jsExtRegExp.test(mainScript)&&(mainScript=dataMain),cfg.deps=cfg.deps?cfg.deps.concat(mainScript):[mainScript],!0):void 0}),define=function(e,t,n){var i,r;"string"!=typeof e&&(n=t,t=e,e=null),isArray(t)||(n=t,t=null),!t&&isFunction(n)&&(t=[],n.length&&(n.toString().replace(commentRegExp,"").replace(cjsRequireRegExp,function(e,n){t.push(n)}),t=(1===n.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(i=currentlyAddingScript||getInteractiveScript(),i&&(e||(e=i.getAttribute("data-requiremodule")),r=contexts[i.getAttribute("data-requirecontext")])),(r?r.defQueue:globalDefQueue).push([e,t,n])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this),define("requireLib",function(){}),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(){}),function(e,t){e.elAttr=function(e,t,n){return void 0===n?e.getAttribute(t)||"":void e.setAttribute(t,n)},e.elByClass=function(e,n){return(n||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,n){return(n||t).querySelector(e)},e.elBySelAll=function(e,n){return(n||t).querySelectorAll(e)},e.elByTag=function(e,n){return(n||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.objOwns=function(e,t){return e.hasOwnProperty(t)}}(window,document),define("wcf.globalHelper",function(){}),define("WoltLab/WCF/Core",[],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)&&(Array.isArray(r[a])||"object"!=typeof r[a]?t[a]=r[a]:this.isPlainObject(r[a])?t[a]=this.extend(e[a],r[a]):t[a]=r[a])}return t},inherit:function(e,t,i){if(void 0===e||null===e)throw new TypeError("The constructor must not be undefined or null.");if(void 0===t||null===t)throw new TypeError("The super constructor must not be undefined or null.");if(void 0===t.prototype)throw new TypeError("The super constructor must have a prototype.");e._super=t,e.prototype=n.extend(Object.create(t.prototype,{constructor:{configurable:!0,enumerable:!1,value:e,writable:!0}}),i||{})},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];"object"==typeof a?n.push(this.serialize(a,r)):n.push(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",[],function(){"use strict";function e(){this._dictionary=t?new Map:{}}var t=objOwns(window,"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",["require"],function(e){var t=function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},n=[2,47],i=[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],r=[1,33],a=[1,37],o=[1,38],s=[1,39],l=[1,42],c=[1,40],u=[1,44],d=[11,12,14,15,17,20,21,22,23],h=[11,12,14,15,16,17,18,19,20,21,22,23],p=[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],m=[12,14],g={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,o){var s=a.length-1;switch(r){case 1:return a[s-1]+";";case 2:var l=a[s].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]);l[1]&&(l[0]+="'"),this.$=l[0];break;case 3:case 4:this.$={encode:!0,value:a[s].replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")};break;case 5:this.$={encode:!1,value:a[s]};break;case 8:this.$=a[s-1]+a[s];break;case 19:this.$="(function() { if ("+a[s-5]+") { return "+a[s-3]+"; } "+a[s-2].join(" ")+" "+(a[s-1]||"")+" return ''; })()";break;case 20:if(!a[s-1].file)throw new Error("Missing parameter file");this.$=a[s-1].file+".fetch(v)";break;case 21:if(!a[s-3].from)throw new Error("Missing parameter from");if(!a[s-3].item)throw new Error("Missing parameter item");a[s-3].glue||(a[s-3].glue="', '"),this.$="(function() { return "+a[s-3].from+".map(function(item) { v["+a[s-3].item+"] = item; return "+a[s-1]+"; }).join("+a[s-3].glue+"); })()";break;case 22:if(!a[s-4].from)throw new Error("Missing parameter from");if(!a[s-4].item)throw new Error("Missing parameter item");this.$="(function() {var looped = false, result = '';if ("+a[s-4].from+" instanceof Array) {for (var i = 0; i < "+a[s-4].from+".length; i++) { looped = true;v["+a[s-4].key+"] = i;v["+a[s-4].item+"] = "+a[s-4].from+"[i];result += "+a[s-2]+";}} else {for (var key in "+a[s-4].from+") {if (!"+a[s-4].from+".hasOwnProperty(key)) continue;looped = true;v["+a[s-4].key+"] = key;v["+a[s-4].item+"] = "+a[s-4].from+"[key];result += "+a[s-2]+";}}return (looped ? result : "+(a[s-1]||"''")+"); })()";break;case 23:this.$="Language.get("+a[s-1]+")";break;case 24:this.$="StringUtil.escapeHTML("+a[s-1]+")";break;case 25:this.$="StringUtil.formatNumeric("+a[s-1]+")";break;case 26:this.$=a[s-1];break;case 27:this.$="'{'";break;case 28:this.$="'}'";break;case 29:this.$="else { return "+a[s]+"; }";break;case 30:this.$="else if ("+a[s-2]+") { return "+a[s]+"; }";break;case 31:this.$=a[s];break;case 32:this.$="v['"+a[s-1]+"']"+a[s].join("");break;case 33:this.$=a[s-2]+a[s-1]+a[s];break;case 34:this.$="['"+a[s]+"']";break;case 35:this.$=a[s-2]+(a[s-1]||"")+a[s];break;case 36:this.$=a[s],this.$[a[s-4]]=a[s-2];break;case 37:this.$={},this.$[a[s-2]]=a[s];break;case 40:this.$=a[s].join("");break;case 47:case 49:case 55:this.$=[];break;case 48:case 50:case 56:case 60:a[s-1].push(a[s]);break;case 59:this.$=[a[s]]}},table:[t([5,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,36,39,40,41,42],n,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},t([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]},t(i,[2,48]),t(i,[2,3]),t(i,[2,4]),t(i,[2,5]),t(i,[2,6]),t(i,[2,7]),{14:[1,31],21:r,38:32},t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),t(i,[2,13]),t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),t(i,[2,17]),t(i,[2,18]),{11:a,14:o,20:s,21:r,22:l,23:c,25:34,38:41,53:35,54:36},{22:u,30:43},{22:u,30:45},{22:u,30:46},t([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,36,37,39,40,41,42],n,{6:3,4:47}),{21:r,38:48},{21:r,38:49},t(i,[2,27]),t(i,[2,28]),t(i,[2,8]),{12:[1,50]},{22:[1,51]},{12:[1,52]},t([12,15,17],[2,40],{38:41,54:53,11:a,14:o,20:s,21:r,22:l,23:c}),t(d,[2,59]),t(d,[2,41]),t(d,[2,42]),t(d,[2,43]),t(d,[2,44]),t(d,[2,45]),t(d,[2,46]),{12:[1,54]},{20:[1,55]},{12:[1,56]},{12:[1,57]},{37:[1,58]},{12:[1,59]},{12:[1,60]},t(i,[2,24]),t(h,[2,55],{49:61}),t(p,n,{6:3,4:62}),t(d,[2,60]),t(i,[2,20]),{21:r,23:[1,64],38:65,52:63},t([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,32,33,36,39,40,41,42],n,{6:3,4:66}),t([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],n,{6:3,4:67}),t(i,[2,23]),t(i,[2,25]),t(i,[2,26]),t(d,[2,32],{50:68,16:[1,69],18:[1,71],19:[1,70]}),t(f,[2,49],{26:72}),{12:[2,37],14:[1,73]},t(m,[2,38]),t(m,[2,39]),{32:[1,74]},{34:75,35:[2,53],47:76,48:[1,77]},t(h,[2,56]),{11:a,14:o,20:s,21:r,22:l,23:c,25:78,38:41,53:35,54:36},{22:[1,79]},{11:a,14:o,17:[2,57],20:s,21:r,22:l,23:c,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:u,30:87},t(i,[2,21]),{35:[1,88]},{35:[2,54]},t([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,29,31,33,35,36,39,40,41,42],n,{6:3,4:89}),{15:[1,90]},t(h,[2,34]),{17:[1,91]},{17:[2,58]},{28:[1,92]},t(f,[2,50]),{28:[2,52]},{11:a,14:o,20:s,21:r,22:l,23:c,25:93,38:41,53:35,54:36},t([9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,28,29,31,33,36,39,40,41,42],n,{6:3,4:94}),{12:[2,36]},t(i,[2,22]),{35:[2,31]},t(h,[2,33]),t(h,[2,35]),t(i,[2,19]),{12:[1,95]},{28:[2,29]},t(p,n,{6:3,4:96}),t(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=f.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,p=a.slice.call(arguments,1),f=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]);f.setInput(e,m.yy),m.yy.lexer=f,m.yy.parser=this,"undefined"==typeof f.yylloc&&(f.yylloc={});var v=f.yylloc;a.push(v);var b=f.options&&f.options.ranges;"function"==typeof m.yy.parseError?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,w,_,C,x,L,E,T,A,k={};;){if(_=i[i.length-1],this.defaultActions[_]?C=this.defaultActions[_]:((null===y||"undefined"==typeof y)&&(y=t()),C=o[_]&&o[_][y]),"undefined"==typeof C||!C.length||!C[0]){var S="";A=[];for(L in o[_])this.terminals_[L]&&L>d&&A.push("'"+this.terminals_[L]+"'");S=f.showPosition?"Parse error on line "+(l+1)+":\n"+f.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:f.match,token:this.terminals_[y]||y,line:f.yylineno,loc:v,expected:A})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+y);switch(C[0]){case 1:i.push(y),r.push(f.yytext),a.push(f.yylloc),i.push(C[1]),y=null,w?(y=w,w=null):(c=f.yyleng,s=f.yytext,l=f.yylineno,v=f.yylloc,u>0&&u--);break;case 2:if(E=this.productions_[C[1]][1],k.$=r[r.length-E],k._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},b&&(k._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),x=this.performAction.apply(k,[s,c,l,m.yy,C[1],r,a].concat(p)),"undefined"!=typeof x)return x;E&&(i=i.slice(0,-1*E*2),r=r.slice(0,-1*E),a=a.slice(0,-1*E)),i.push(this.productions_[C[1]][0]),r.push(k.$),a.push(k._$),T=o[i[i.length-2]][i[i.length-1]],i.push(T);break;case 3:return!0}}return!0}},v=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 g.lexer=v,g}),define("WoltLab/WCF/NumberUtil",[],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?NaN:(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",["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",["./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(e){throw new Error("WCF.Template.callbacks is no longer supported")}}),r.prototype={fetch:function(e){throw new Error("This Template is not initialized.")}},r}),define("WoltLab/WCF/Language",["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?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",["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,n){e.forEach(t)});else{var n=this._dictionary.get(e);void 0!==n&&n.forEach(t)}}},t}),define("WoltLab/WCF/Dom/Change/Listener",["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",[],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=elCreate("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!==elById(e));return e},identify:function(e){if(!(e&&e instanceof Element))return null;var t=elAttr(e,"id");return t||(t=this.getUniqueId(),elAttr(e,"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/Environment",[],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",[],function(){"use strict";function e(){this._map=t?new WeakMap:{key:[],value:[]}}var t=objOwns(window,"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",["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(void 0===n&&(n=require("Ui/Dialog")),!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=elCreate("div");elAttr(e,"id","wcfSystemConfirmation"),e.classList.add("systemConfirmation"),s=elCreate("p"),e.appendChild(s),a=elCreate("div"),elAttr(a,"id","wcfSystemConfirmationContent"),e.appendChild(a);var i=elCreate("div");i.classList.add("formSubmit"),e.appendChild(i),r=elCreate("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=elCreate("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",["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,p=new o,f=!1,m=null,g=elByClass("jsStaticDialog"),v={setup:function(){void 0===t&&(t=require("Ajax")),d=elCreate("div"),d.classList.add("dialogOverlay"),elAttr(d,"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(){f=!0},unmatch:function(){f=!1},setup:function(){f=!0},deferSetup:!0}),this._initStaticDialogs(),s.add("Ui/Dialog",this._initStaticDialogs.bind(this))},_initStaticDialogs:function(){for(var e,t,n;g.length;)e=g[0],e.classList.remove("jsStaticDialog"),n=elAttr(e,"data-dialog-id"),n&&(t=elById(n))&&function(e,t){t.classList.remove("jsStaticDialogContent"),t.style.setProperty("display","none"),e.addEventListener("click",this.openStatic.bind(this,t.id,null,{title:elAttr(t,"data-title")}))}.bind(this)(e,t)},open:function(e,i){var r=p.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=elById(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=elCreate("div");elAttr(s,"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 p.set(e,r),this.openStatic(a.id,a.source,a.options,o)},openStatic:function(e,t,i,r){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=elById(e),null===r))throw new Error("Expected either a HTML string or an existing element id.");var a=elCreate("div");a.classList.add("dialogContainer"),elAttr(a,"aria-hidden","true"),elAttr(a,"role","dialog"),elAttr(a,"data-id",e),n.disposeOnClose&&elAttr(a,"data-dispose-on-close",!0);var o=elCreate("header");if(a.appendChild(o),n.title){var s=l.getUniqueId();elAttr(a,"aria-labelledby",s);var c=elCreate("span");c.classList.add("dialogTitle"),c.textContent=n.title,elAttr(c,"id",s),o.appendChild(c)}if(n.closable){var u=elCreate("a");u.className="dialogCloseButton jsTooltip",elAttr(u,"title",n.closeButtonLabel),elAttr(u,"aria-label",n.closeButtonLabel),u.addEventListener("click",this._close.bind(this)),o.appendChild(u);var p=elCreate("span");p.textContent=n.closeButtonLabel,u.appendChild(p)}var f=elCreate("div");f.classList.add("dialogContent"),n.disableContentPadding&&f.classList.add("dialogContentNoPadding"),a.appendChild(f);var m;null===r?(m=elCreate("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,f.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=elCreate("div");i.innerHTML=t,n.content.appendChild(i)}"true"===elAttr(n.dialog,"aria-hidden")&&("true"===elAttr(d,"aria-hidden")&&window.addEventListener("keyup",m),elAttr(n.dialog,"aria-hidden","false"),elAttr(d,"aria-hidden","false"),elAttr(d,"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"!==elAttr(t.dialog,"aria-hidden")){var n=t.content.parentNode,i=elBySel(".formSubmit",t.content),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*(f?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"===elAttr(d,"data-close-on-click")?this._close(e):e.preventDefault())},close:function(e){if("object"==typeof e){var t=p.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),elAttr(n.dialog,"data-dispose-on-close")?setTimeout(function(){"true"===elAttr(n.dialog,"aria-hidden")&&(d.removeChild(n.dialog),h["delete"](e))},5e3):elAttr(n.dialog,"aria-hidden","true"),u=null;for(var i=0;i<d.childElementCount;i++){var r=d.children[i];if("false"===elAttr(r,"aria-hidden")){u=elAttr(r,"data-id");break}}null===u?(elAttr(d,"aria-hidden","true"),elAttr(d,"data-close-on-click","false"),window.removeEventListener("keyup",m)):(n=h.get(u),elAttr(d,"data-close-on-click",n.backdropCloseOnClick?"true":"false"))},getDialog:function(e){return h.get(e)},_ajaxSetup:function(){return{}}};return v}),define("WoltLab/WCF/Ajax/Status",["Language"],function(e){"use strict";var t=0,n=null,i=null,r={_init:function(){n=elCreate("div"),n.classList.add("spinner");var t=elCreate("span");t.className="icon icon48 fa-spinner",n.appendChild(t);var i=elCreate("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",["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:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,failure:null,finalize:null,success:null,progress:null,uploadProgress: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)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.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._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),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)},this._options.progress&&(this._xhr.onprogress=this._options.progress),this._options.uploadProgress&&(this._xhr.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){var r=this._options.data;"object"==typeof r&&"FormData"!==e.getType(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&&"FormData"!==e.getType(t)&&(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&&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>";void 0===r&&(r=require("Ui/Dialog")),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=elBySelAll('a[href*="#"]'),i=0,r=t.length;r>i;i++){var a=t[i],o=elAttr(a,"href");(-1!==o.indexOf("AJAXProxy")||-1!==o.indexOf("ajax-proxy"))&&(o=o.substr(o.indexOf("#")),elAttr(a,"href",document.location.toString().replace(/#.*/,"")+o))}}},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}),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,p,f,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 C=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 p=D.types[""+a.animation][h];t&&(p.y<.6?p.y=p.y-.4:p.y=p.y-2*p.y+(1-p.w)),r&&(p.x<.6?p.x=p.x-.4:p.x=p.x-2*p.x+(1-p.h)),D.types[""+a.animation][h]=p}a.type=L[""+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"),x.ready()}):(d.setAttribute("src",""),s=32,l=32,d.height=s,d.width=l,c.height=s,c.width=l,u=c.getContext("2d"),x.ready())},x={};x.ready=function(){h=!0,x.reset(),m()},x.reset=function(){h&&(_=[],
-p=!1,f=!1,u.clearRect(0,0,l,s),u.drawImage(d,0,0,l,s),M.setIcon(c),window.clearTimeout(b),window.clearTimeout(y))},x.start=function(){if(h&&!f){var e=function(){p=_[0],f=!1,_.length>0&&(_.shift(),x.start())};if(_.length>0){f=!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)};p?D.run(p.options,function(){t()},!0):t()}}};var L={},E=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};L.circle=function(e){e=E(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()},L.rectangle=function(e){e=E(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 T=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&&L[""+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.";x.start()}else x.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()},k=function(e){m=function(){try{if("stop"===e)return g=!0,x.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,x.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?(L[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()},C(),{badge:T,video:k,image:A,webcam:S,reset:x.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,t,n){"use strict";var i=e("../main");"function"==typeof define&&define.amd?define("perfect-scrollbar",i):(window.PerfectScrollbar=i,"undefined"==typeof window.Ps&&(window.Ps=i))},{"../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,n){"use strict";var i=function(e){this.element=e,this.events={}};i.prototype.bind=function(e,t){"undefined"==typeof this.events[e]&&(this.events[e]=[]),this.events[e].push(t),this.element.addEventListener(e,t,!1)},i.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)},i.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var r=function(){this.eventElements=[]};r.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return"undefined"==typeof t&&(t=new i(e),this.eventElements.push(t)),t},r.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},r.prototype.unbind=function(e,t,n){this.eventElement(e).unbind(t,n)},r.prototype.unbindAll=function(){for(var e=0;e<this.eventElements.length;e++)this.eventElements[e].unbindAll()},r.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=r},{}],5:[function(e,t,n){"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,n){"use strict";var i=e("./plugin/destroy"),r=e("./plugin/initialize"),a=e("./plugin/update");t.exports={initialize:r,update:a,destroy:i}},{"./plugin/destroy":9,"./plugin/initialize":17,"./plugin/update":20}],8:[function(e,t,n){"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,n){"use strict";var i=e("../lib/dom"),r=e("../lib/helper"),a=e("./instances");t.exports=function(e){var t=a.get(e);t.event.unbindAll(),i.remove(t.scrollbarX),i.remove(t.scrollbarY),i.remove(t.scrollbarXRail),i.remove(t.scrollbarYRail),r.removePsClasses(e),a.remove(e)}},{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(e,t,n){"use strict";function i(e,t){function n(e){return e.getBoundingClientRect()}var i=window.Event.prototype.stopPropagation.bind;t.event.bind(t.scrollbarY,"click",i),t.event.bind(t.scrollbarYRail,"click",function(i){var a=r.toInt(t.scrollbarYHeight/2),s=i.pageY-n(t.scrollbarYRail).top-a,l=t.containerHeight-t.scrollbarYHeight,c=s/l;0>c?c=0:c>1&&(c=1),e.scrollTop=(t.contentHeight-t.containerHeight)*c,o(e)}),t.event.bind(t.scrollbarX,"click",i),t.event.bind(t.scrollbarXRail,"click",function(i){var a=r.toInt(t.scrollbarXWidth/2),s=i.pageX-n(t.scrollbarXRail).left-a;console.log(i.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,o(e)})}var r=e("../../lib/helper"),a=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=a.get(e);i(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],11:[function(e,t,n){"use strict";function i(e,t){function n(n){var r=i+n,a=t.containerWidth-t.scrollbarXWidth;0>r?t.scrollbarXLeft=0:r>a?t.scrollbarXLeft=a:t.scrollbarXLeft=r;var s=o.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.scrollbarXWidth));e.scrollLeft=s}var i=null,r=null,s=function(t){n(t.pageX-r),l(e),t.stopPropagation(),t.preventDefault()},c=function(){o.stopScrolling(e,"x"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarX,"mousedown",function(n){r=n.pageX,i=o.toInt(a.css(t.scrollbarX,"left")),o.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),n.stopPropagation(),n.preventDefault()})}function r(e,t){function n(n){var r=i+n,a=t.containerHeight-t.scrollbarYHeight;0>r?t.scrollbarYTop=0:r>a?t.scrollbarYTop=a:t.scrollbarYTop=r;var s=o.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.scrollbarYHeight));e.scrollTop=s}var i=null,r=null,s=function(t){n(t.pageY-r),l(e),t.stopPropagation(),t.preventDefault()},c=function(){o.stopScrolling(e,"y"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarY,"mousedown",function(n){r=n.pageY,i=o.toInt(a.css(t.scrollbarY,"top")),o.startScrolling(e,"y"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),n.stopPropagation(),n.preventDefault()})}var a=e("../../lib/dom"),o=e("../../lib/helper"),s=e("../instances"),l=e("../update-geometry");t.exports=function(e){var t=s.get(e);i(e,t),r(e,t)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19}],12:[function(e,t,n){"use strict";function i(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 i=!1;t.event.bind(e,"mouseenter",function(){i=!0}),t.event.bind(e,"mouseleave",function(){i=!1});var a=!1;t.event.bind(t.ownerDocument,"keydown",function(s){if((!s.isDefaultPrevented||!s.isDefaultPrevented())&&i){var l=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(l){for(;l.shadowRoot;)l=l.shadowRoot.activeElement;if(r.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,o(e),a=n(c,u),a&&s.preventDefault()}})}var r=e("../../lib/helper"),a=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=a.get(e);i(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],13:[function(e,t,n){"use strict";function i(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 i(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 a(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(r.env.isWebKit||!e.querySelector("select:focus")){var c=i(s),u=c[0],d=c[1];a(u,d)||(l=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(d?e.scrollTop=e.scrollTop-d*t.settings.wheelSpeed:e.scrollTop=e.scrollTop+u*t.settings.wheelSpeed,l=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(u?e.scrollLeft=e.scrollLeft+u*t.settings.wheelSpeed:e.scrollLeft=e.scrollLeft-d*t.settings.wheelSpeed,l=!0):(e.scrollTop=e.scrollTop-d*t.settings.wheelSpeed,e.scrollLeft=e.scrollLeft+u*t.settings.wheelSpeed),o(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 r=e("../../lib/helper"),a=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=a.get(e);i(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],14:[function(e,t,n){"use strict";function i(e,t){t.event.bind(e,"scroll",function(){a(e)})}var r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.get(e);i(e,t)}},{"../instances":18,"../update-geometry":19}],15:[function(e,t,n){"use strict";function i(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 i(){l||(l=setInterval(function(){return a.get(e)?(e.scrollTop=e.scrollTop+c.top,e.scrollLeft=e.scrollLeft+c.left,void o(e)):void clearInterval(l)},50))}function s(){l&&(clearInterval(l),l=null),r.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},a={left:e.offsetLeft,right:e.offsetLeft+e.offsetWidth,top:e.offsetTop,bottom:e.offsetTop+e.offsetHeight};n.x<a.left+3?(c.left=-5,r.startScrolling(e,"x")):n.x>a.right-3?(c.left=5,r.startScrolling(e,"x")):c.left=0,n.y<a.top+3?(a.top+3-n.y<5?c.top=-5:c.top=-20,r.startScrolling(e,"y")):n.y>a.bottom-3?(n.y-a.bottom+3<5?c.top=5:c.top=20,r.startScrolling(e,"y")):c.top=0,0===c.top&&0===c.left?s():i()}})}var r=e("../../lib/helper"),a=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=a.get(e);i(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],16:[function(e,t,n){"use strict";function i(e,t,n,i){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,a(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 p(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 f(){!y&&w&&(w=!1,clearInterval(b),b=setInterval(function(){return r.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",p),t.event.bind(e,"touchend",f)),i&&(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",p),t.event.bind(e,"pointerup",f)):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",p),t.event.bind(e,"MSPointerUp",f)))}var r=e("../instances"),a=e("../update-geometry");t.exports=function(e,t,n){var a=r.get(e);i(e,a,t,n)}},{"../instances":18,"../update-geometry":19}],17:[function(e,t,n){"use strict";var i=e("../lib/class"),r=e("../lib/helper"),a=e("./instances"),o=e("./update-geometry"),s=e("./handler/click-rail"),l=e("./handler/drag-scrollbar"),c=e("./handler/keyboard"),u=e("./handler/mouse-wheel"),d=e("./handler/native-scroll"),h=e("./handler/selection"),p=e("./handler/touch");t.exports=function(e,t){t="object"==typeof t?t:{},i.add(e,"ps-container");var n=a.add(e);n.settings=r.extend(n.settings,t),s(e),l(e),u(e),d(e),h(e),(r.env.supportsTouch||r.env.supportsIePointer)&&p(e,r.env.supportsTouch,r.env.supportsIePointer),n.settings.useKeyboard&&c(e),o(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,n){"use strict";function i(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 r(e,t){var n={width:t.railXWidth};t.isRtl?n.left=e.scrollLeft+t.containerWidth-t.contentWidth:n.left=e.scrollLeft,t.isScrollbarXUsingBottom?n.bottom=t.scrollbarXBottom-e.scrollTop:n.top=t.scrollbarXTop+e.scrollTop,o.css(t.scrollbarXRail,n);var i={top:e.scrollTop,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?i.right=t.contentWidth-e.scrollLeft-t.scrollbarYRight-t.scrollbarYOuterWidth:i.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?i.left=e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:i.left=t.scrollbarYLeft+e.scrollLeft,o.css(t.scrollbarYRail,i),o.css(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),o.css(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}var a=e("../lib/class"),o=e("../lib/dom"),s=e("../lib/helper"),l=e("./instances");t.exports=function(e){var t=l.get(e);t.containerWidth=e.clientWidth,t.containerHeight=e.clientHeight,t.contentWidth=e.scrollWidth,t.contentHeight=e.scrollHeight,e.contains(t.scrollbarXRail)||o.appendTo(t.scrollbarXRail,e),e.contains(t.scrollbarYRail)||o.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=i(t,s.toInt(t.railXWidth*t.containerWidth/t.contentWidth)),t.scrollbarXLeft=s.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=i(t,s.toInt(t.railYHeight*t.containerHeight/t.contentHeight)),t.scrollbarYTop=s.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),r(e,t),a[t.scrollbarXActive?"add":"remove"](e,"ps-active-x"),a[t.scrollbarYActive?"add":"remove"](e,"ps-active-y")}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18}],20:[function(e,t,n){"use strict";var i=e("../lib/dom"),r=e("./instances"),a=e("./update-geometry");t.exports=function(e){var t=r.get(e);i.css(t.scrollbarXRail,"display","none"),i.css(t.scrollbarYRail,"display","none"),a(e),i.css(t.scrollbarXRail,"display","block"),i.css(t.scrollbarYRail,"display","block")}},{"../lib/dom":3,"./instances":18,"./update-geometry":19}]},{},[1]),define("WoltLab/WCF/Date/Util",["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(e){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",[],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",["Dom/ChangeListener","Language","WoltLab/WCF/Date/Util","WoltLab/WCF/Timer/Repeating"],function(e,t,n,i){"use strict";var r=elByTag("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")&&!elAttr(l,"data-is-future-date")){l.getAttribute("title")||elAttr(l,"title",l.textContent.trim());var c=~~l.getAttribute("data-timestamp")+a,u=elAttr(l,"data-date"),d=elAttr(l,"data-time"),h=elAttr(l,"data-offset");if(c>=i||c+60>i)l.textContent=t.get("wcf.date.relative.now");else if(c+3540>i){var p=Math.max(Math.round((i-c)/60),1);l.textContent=t.get("wcf.date.relative.minutes",{minutes:p})}else if(c+86400>i){var f=Math.round((i-c)/3600);l.textContent=t.get("wcf.date.relative.hours",{hours:f})}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",["Dom/Util"],function(e){"use strict";var t=0,n=1,i=2,r=3,a=[function(e,t){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,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");
-for(e=e.parentNode;e instanceof Element;){if(e===i)return null;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,i){return s(e,n,t,i)},parentByClass:function(e,t,n){return s(e,i,t,n)},parentByTag:function(e,t,n){return s(e,r,t,n)},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,t){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,t){return l(e,"previousElementSibling",i,className)}};return c}),define("WoltLab/WCF/Ui/Alignment",["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},p=!1;if("center"===o.horizontal&&(p=!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 f=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:p&&(h=f)}}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 C=n.childrenByClass(r,"elementPointer");if(C=C[0]||null,null===C)throw new Error("Expected the .elementPointer element to be a direct children.");"center"===h.align?(C.classList.add("center"),C.classList.remove("left"),C.classList.remove("right")):(C.classList.add(h.align),C.classList.remove("center"),C.classList.remove("left"===h.align?"right":"left")),"top"===b.align?C.classList.add("flipVertical"):C.classList.remove("flipVertical")}else if(2===o.pointerClassNames.length){var x=0,L=1;r.classList["auto"===_?"add":"remove"](o.pointerClassNames[L]),r.classList["auto"===g?"add":"remove"](o.pointerClassNames[x])}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",["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",["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,p=null,f={setup:function(){u||(u=!0,p=elCreate("div"),elAttr(p,"id","dropdownMenuContainer"),document.body.appendChild(p),l=elByClass("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")||elAttr(e,"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.");p.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+$/)||elAttr(r,"data-source",s)),elAttr(e,"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),p.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=elBySel(".dropdownToggle",e),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=elBySelAll(".dropdown.dropdownOpen",t),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){elAttr(e,"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=elAttr(e.currentTarget,"data-target"));var n=d.get(t);if(void 0!==n&&null===elAttr(n,"data-is-overlay-dropdown-button")){var i=a.parentByClass(n,"dialogContent");elAttr(n,"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 f}),define("WoltLab/WCF/Ui/Mobile",["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=elByClass("buttonGroupNavigation"),l=elById("main"),c=elBySel("#main > div > div > .sidebar",l),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=elCreate("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=elCreate("span"),i.className="icon icon16 fa-angle-double-"+("Left"===e?"right":"left"));var r=elCreate("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=elCreate("span");a.className="button small mobileSidebarToggleButton",a.addEventListener("click",function(){l.classList.remove("mobileShowSidebar")}),i instanceof Element?a.appendChild(i):a.textContent=i,elBySel(".content").appendChild(r),c.appendChild(a)}}},_initSearchBar:function(){var e=elBySel(".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=elCreate("a");i.classList.add("dropdownLabel");var a=elCreate("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=elBySelAll(".jsMobileButtonGroupNavigation > ul.open"),t=0,n=e.length;n>t;t++)e[t].classList.remove("open")}};return u}),define("WoltLab/WCF/Event/Handler",["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",["Dictionary","Dom/Traverse","Dom/Util","EventHandler"],function(e,t,n,i){"use strict";function r(t){this._container=t,this._containers=new e,this._isLegacy=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=elByTag("li",e);if(null===i.length)return!1;for(var r,a,o=t.childrenByTag(this._container,"DIV"),s=0,l=o.length;l>s;s++)r=o[s],a=elAttr(r,"data-name"),a||(a=n.identify(r)),elAttr(r,"data-name",a),this._containers.set(a,r);for(var c,u=this._container.id,s=0,l=i.length;l>s;s++)if(c=i[s],a=this._getTabName(c)){if(this._tabs.has(a))throw new Error("Tab names must be unique, li[data-name='"+a+"'] (tab menu id: '"+u+"') exists more than once.");if(r=this._containers.get(a),void 0===r)throw new Error("Expected content element for li[data-name='"+a+"'] (tab menu id: '"+u+"').");if(r.parentNode!==this._container)throw new Error("Expected content element '"+a+"' (tab menu id: '"+u+"') 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='"+a+"'] (tab menu id: '"+u+"').");this._tabs.set(a,c)}if(!this._tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+u+"').");return this._isLegacy&&(elAttr(this._container,"data-is-legacy",!0),this._tabs.forEach(function(e,t){elAttr(e,"aria-controls",t)})),!0},init:function(e){e=e||null,this._tabs.forEach(function(t){e&&e.get(elAttr(t,"data-name"))===t||t.children[0].addEventListener("click",this._onClick.bind(this))}.bind(this));var t=null;if(!e){var n=window.location.hash.replace(/^#/,""),i=null;if(""!==n&&(i=this._tabs.get(n),i&&this._container.parentNode.classList.contains("tabMenuContainer")&&(t=this._container)),!i){var r=elAttr(this._container,"data-preselect");"true"!==r&&r||(r=!0),r===!0?this._tabs.forEach(function(e){i||e.previousElementSibling||(i=e)}):"false"!==r&&(i=this._tabs.get(r))}i&&(this._containers.forEach(function(e){e.classList.add("hidden")}),this.select(null,i,!0))}return t},select:function(e,t,n){if(t=t||this._tabs.get(e),!t){if(~~e==e){e=~~e;var r=0;this._tabs.forEach(function(n){r===e&&(t=n),r++})}if(!t)throw new Error("Expected a valid tab name, '"+e+"' given (tab menu id: '"+this._container.id+"').")}e=e||elAttr(t,"data-name");var a=this.getActiveTab(),o=null;a&&(a.classList.remove("active"),o=this._containers.get(elAttr(a,"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);if(s.classList.add("active"),this._isLegacy&&(t.classList.add("ui-state-active"),s.classList.add("ui-state-active"),s.classList.remove("hidden")),!n){i.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"select",{active:t,activeName:e,previous:a,previousName:a?elAttr(a,"data-name"):null});var l=this._isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;l&&l(this._container).trigger("wcftabsbeforeactivate",{newTab:l(t),oldTab:l(a),newPanel:l(s),oldPanel:l(o)}),window.history.replaceState(void 0,void 0,window.location.href.replace(/#[^#]+$/,"")+"#"+e)}},rebuild:function(){var t=new e;t.merge(this._tabs),this.validate(),this.init(t)},_onClick:function(e){e.preventDefault(),this.select(null,e.currentTarget.parentNode)},_getTabName:function(e){var t=elAttr(e,"data-name");return t||1===e.childElementCount&&"A"===e.children[0].nodeName&&e.children[0].href.match(/#([^#]+)$/)&&(t=RegExp.$1,null===elById(t)?t=null:(this._isLegacy=!0,elAttr(e,"data-name",t))),t},getActiveTab:function(){return elBySel("#"+this._container.id+" > nav > ul > li.active")},getContainers:function(){return this._containers},getTabs:function(){return this._tabs}},r}),define("WoltLab/WCF/Ui/TabMenu",["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,t,a,o,s=elBySelAll(".tabMenuContainer:not(.staticTabMenuContainer)"),l=0,c=s.length;c>l;l++)e=s[l],t=n.identify(e),r.has(t)||(o=new i(e),o.validate()&&(a=o.init(),r.set(t,o),a instanceof Element&&(o=this.getTabMenu(a.parentNode.id),o.select(a.id,null,!0))))},_selectErroneousTabs:function(){r.forEach(function(e){var t=!1;e.getContainers().forEach(function(n){!t&&elByClass("formError",n).length&&(t=!0,e.select(n.id))})})},getTabMenu:function(e){return r.get(e)}};return a}),define("WoltLab/WCF/Ui/FlexibleMenu",["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!==elById("mainMenu")&&this.register("mainMenu");var e=elBySel(".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=elById(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=elBySelAll(".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),p=i.childrenByTag(h,"LI"),f=s.get(t),m=0;if(void 0!==f){for(var g=0,v=p.length;v>g;g++){var b=p[g];b.classList.contains("dropdown")||b.style.removeProperty("display")}null!==f.parentNode&&(m=r.outerWidth(f))}var y=h.scrollWidth-m,w=[];if(y>d)for(var g=p.length-1;g>=0;g--){var b=p[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===f){f=elCreate("li"),f.className="dropdown jsFlexibleMenuDropdown";var C=elCreate("a");C.className="icon icon16 fa-list",f.appendChild(C),_=elCreate("ul"),_.classList.add("dropdownMenu"),f.appendChild(_),s.set(t,f),l.set(t,_),a.init(C)}else _=l.get(t);null===f.parentNode&&h.appendChild(f);var x=document.createDocumentFragment(),L=this;w.forEach(function(n){var i=elCreate("li");i.innerHTML=n.innerHTML,i.addEventListener("click",function(i){i.preventDefault(),e.triggerEvent(n.querySelector("a"),"click"),setTimeout(function(){L.rebuild(t)},59)}.bind(this)),x.appendChild(i)}),_.innerHTML="",_.appendChild(x)}else void 0!==f&&null!==f.parentNode&&f.parentNode.removeChild(f)}};return u}),define("WoltLab/WCF/Ui/Tooltip",["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=elCreate("div"),elAttr(o,"id","balloonTooltip"),o.classList.add("balloonTooltip"),a=elCreate("span"),elAttr(a,"id","balloonTooltipText"),o.appendChild(a),r=elCreate("span"),r.classList.add("elementPointer"),r.appendChild(elCreate("span")),o.appendChild(r),document.body.appendChild(o),i=elByClass("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=elAttr(e,"title");t="string"==typeof t?t.trim():"",t.length&&(elAttr(e,"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=elAttr(t,"title");return i="string"==typeof i?i.trim():"",""!==i&&(elAttr(t,"data-tooltip",i),t.removeAttribute("title")),i=elAttr(t,"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(e){o.classList.remove("active")}};return s}),define("WoltLab/WCF/Date/Picker",["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=[],p=null,f=null,m=null,g=null,v=null,b=null,y=null,w=null,_=null,C=null,x={init:function(){this._setup();for(var t=elBySelAll('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"===elAttr(a,"type");elAttr(a,"data-is-date-time",o);var s=null,c=elAttr(a,"value");elAttr(a,"value")&&(s=new Date(c),elAttr(a,"data-value",s.getTime()),c=e["formatDate"+(o?"Time":"")](s));var u=0===c.length;if(a.classList.contains("birthday")&&(elAttr(a,"data-min-date","100"),elAttr(a,"data-max-date","now")),this._initDateRange(a,n,!0),this._initDateRange(a,n,!1),elAttr(a,"data-min-date")===elAttr(a,"data-max-date"))throw new Error("Minimum and maximum date cannot be the same (element id '"+a.id+"').");a.type="text",a.value=c,elAttr(a,"data-empty",u),elAttr(a,"data-placeholder")&&elAttr(a,"placeholder",elAttr(a,"data-placeholder"));var d=elCreate("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",C);var h=elCreate("div");h.className="inputAddon";var p=elCreate("a");p.className="inputSuffix",p.addEventListener("click",C),h.appendChild(p);var f=elCreate("span");f.className="icon icon16 fa-calendar",p.appendChild(f),a.parentNode.insertBefore(h,a),h.insertBefore(a,p),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)?elAttr(e,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===elById(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();elAttr(e,i,r)},_setup:function(){o||(o=!0,s=~~t.get("wcf.date.firstDayOfTheWeek"),C=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=elAttr(c,"data-value");a?(n=new Date(+a),"Invalid Date"===n.toString()&&(n=new Date)):n=new Date,d=elAttr(c,"data-min-date"),d.match(/^datePicker-(.+)$/)&&(d=elById(RegExp.$1).getAttribute("data-value")),d=new Date(+d),u=elAttr(c,"data-max-date"),u.match(/^datePicker-(.+)$/)&&(u=elById(RegExp.$1).getAttribute("data-value")),u=new Date(+u),i.isDateTime&&(f.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||~~p.getAttribute("data-day"),t=~~t,n=~~n,a||n){var o=0!==n,l=document.createDocumentFragment();l.appendChild(p),a||(t=~~p.getAttribute("data-month")),n=n||~~p.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 f,m=0;35>m;m++)i=h[m],i.textContent=c.getDate(),f=c.getMonth()===t,f&&(d>c?f=!1:c>u&&(f=!1)),i.classList[f?"remove":"add"]("otherMonth"),c.setDate(c.getDate()+1);if(elAttr(p,"data-month",t),elAttr(p,"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 C=g.children[m];C.disabled=n===d.getFullYear()&&C.value<d.getMonth()||n===u.getFullYear()&&C.value>u.getMonth()}var x=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-01");x.setMonth(x.getMonth()+1),v.classList[u>x?"add":"remove"]("active");var L=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-01");L.setDate(L.getDate()-1),b.classList[L>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");elAttr(p,"data-day",e)}this._formatValue()},_formatValue:function(){var t,n,i,r=l.get(c);"true"!==elAttr(c,"data-empty")&&(r.isDateTime?(t=new Date(elAttr(p,"data-year"),elAttr(p,"data-month"),elAttr(p,"data-day"),f.value,m.value),n=e.formatDateTime(t),i=e.format(t,"c")):(t=new Date(elAttr(p,"data-year"),elAttr(p,"data-month"),elAttr(p,"data-day")),n=e.formatDate(t),i=e.format(t,"Y-m-d")),c.value=n,elAttr(c,"data-value",t.getTime()),r.shadow.value=i)},_createPicker:function(){if(null===_){_=elCreate("div"),_.className="datePicker",_.addEventListener("click",function(e){e.stopPropagation()});var n=elCreate("span");n.className="elementPointer",n.innerHTML="<span></span>",_.appendChild(n);var i=elCreate("header");_.appendChild(i),b=elCreate("a"),b.className="icon icon16 fa-arrow-left previous",b.addEventListener("click",this.previousMonth.bind(this)),i.appendChild(b);var r=elCreate("span");i.appendChild(r),g=elCreate("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=elCreate("select"),w.className="year",w.addEventListener("change",this._changeYear.bind(this)),r.appendChild(w),v=elCreate("a"),v.className="icon icon16 fa-arrow-right next",v.addEventListener("click",this.nextMonth.bind(this)),i.appendChild(v),p=elCreate("ul"),_.appendChild(p);var c=elCreate("li");c.className="weekdays",p.appendChild(c);for(var u,d=t.get("__daysShort"),l=0;7>l;l++){var C=l+s;C>6&&(C-=7),u=elCreate("span"),u.textContent=d[C],c.appendChild(u)}for(var x,L,E=this._click.bind(this),l=0;5>l;l++){L=elCreate("li"),p.appendChild(L);for(var T=0;7>T;T++)x=elCreate("a"),x.addEventListener("click",E),h.push(x),L.appendChild(x)}y=elCreate("footer"),_.appendChild(y),f=elCreate("select"),f.className="hour",f.addEventListener("change",this._formatValue.bind(this));for(var A="",k=new Date(2e3,0,1),S=t.get("wcf.date.timeFormat").replace(/:/,"").replace(/[isu]/g,""),l=0;24>l;l++)k.setHours(l),A+='<option value="'+l+'">'+e.format(k,S)+"</option>";f.innerHTML=A,y.appendChild(f),y.appendChild(document.createTextNode(" : ")),m=elCreate("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")||(elAttr(c,"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);elAttr(t,"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),elAttr(e,"type","date"+(t.isDateTime?"time":"")),e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener("click",C),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=elById(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=x,x}),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 p={setup:function(){d.setup(),i.setup(),h.init(),r.setup(),a.setup(),o.setup(),s.setup(),l.setup(),c.setup();for(var e=elBySelAll("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 p}),define("WoltLab/WCF/Controller/Sitemap",["Ajax","EventHandler","Language","Dom/Util","Ui/Dialog","Ui/TabMenu"],function(e,t,n,i,r,a){"use strict";var o=[],s={setup:function(){elById("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),elById("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=elBySel(".tabMenuContainer",e),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=elAttr(t.active,"data-name").replace(/^sitemap_/,"");-1===o.indexOf(n)&&e.api(this,{parameters:{sitemapName:n}})}};return s}),define("WoltLab/WCF/Controller/Style/Changer",["Ajax","Language","Ui/Dialog"],function(e,t,n){"use strict";var i={setup:function(){var e=elBySel("#footerNavigation > ul.navigationItems");if(null!==e){var n=elCreate("li");n.classList.add("styleChanger"),n.addEventListener("click",this.showDialog.bind(this));var i=elCreate("a");elAttr(i,"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=elBySelAll(".styleList > li",e),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:[elAttr(t.currentTarget,"data-style-id")]},success:function(){window.location.reload()}})}};return i}),define("WoltLab/WCF/Controller/Popover",["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,p=null,f=null,m=null,g=null,v=null,b=null,y=null,w=null,_=null,C=0,x=1,L=2,E=800,T=500,A={_setup:function(){if(null===m){m=elCreate("div"),m.classList.add("popover"),g=elCreate("div"),g.classList.add("popoverContent"),m.appendChild(g);var e=elCreate("span");e.classList.add("elementPointer"),e.appendChild(elCreate("span")),m.appendChild(e),v=elCreate("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!==p&&window.clearTimeout(p),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:elByClass(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?elBySelAll(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&&elAttr(o,"href")&&o.addEventListener("click",b);var d=t+"-"+u;elAttr(o,"data-cache-id",d),c.set(s,{element:o,identifier:t,objectId:u}),l.has(d)||l.set(t+"-"+u,{content:null,state:C})}}},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=L,o){var s=c.get(o).element;elAttr(s,"data-cache-id")===i&&this._show()}},_mouseEnter:function(e){if(!h){null!==p&&(window.clearTimeout(p),p=null);var t=r.identify(e.currentTarget);o===t&&null!==f&&(window.clearTimeout(f),f=null),d=t,p=window.setTimeout(function(){p=null,d===t&&this._show()}.bind(this),E)}},_mouseLeave:function(e){d=null,null===f&&(null===y&&(y=this._hide.bind(this)),null!==f&&window.clearTimeout(f),f=window.setTimeout(y,T))},_popoverMouseEnter:function(e){null!==f&&(window.clearTimeout(f),f=null)},_show:function(){null!==f&&(window.clearTimeout(f),f=null);var e=null!==o&&o!==d;m.classList.contains("active")&&this._hide(e),o=d;var t=c.get(o),n=l.get(elAttr(t.element,"data-cache-id"));n.state===L?g.appendChild(n.content):n.state===C&&g.classList.add("loading"),this._rebuild(o),n.state===C&&(n.state=x,u.get(t.identifier).loadCallback(t.objectId,this))},_hide:function(e){null!==f&&(window.clearTimeout(f),f=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",["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=0,o={setup:function(e){t.setup(),n.setup(),e.styleChanger&&i.setup(),this._initUserPopover(),this._invokeBackgroundQueue(e.backgroundQueue.url,e.backgroundQueue.force)},_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)}})},_invokeBackgroundQueue:function(t,n){var i=this._invokeBackgroundQueue.bind(this,t,!0);(Math.random()<.1||n)&&e.apiOnce({url:t,ignoreError:!0,silent:!0,success:function(e){a++,e>0&&5>a&&setTimeout(i,1e3)}.bind(this)})}};return o}),define("WoltLab/WCF/List",[],function(){"use strict";function e(){this._set=t?new Set:[]}var t=objOwns(window,"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/Permission",["Dictionary"],function(e){"use strict";var t=new e,n={add:function(e,n){if("boolean"!=typeof n)throw new TypeError("Permission value has to be boolean.");t.set(e,n)},addObject:function(e){for(var t in e)e.hasOwnProperty(t)&&this.addPermission(t,e[t])},get:function(e){return t.has(e)?t.get(e):!1}};return n}),define("WoltLab/WCF/Upload",["AjaxRequest","Core","Dom/ChangeListener","Language","Dom/Util"],function(e,t,n,i,r){"use strict";function a(e,n,i){if(i=i||{},void 0===i.className)throw new Error("Missing class name.");if(this._options=t.extend({action:"upload",multiple:!1,name:"__files[]",singleFileRequests:!1,url:"index.php/AJAXUpload/?t="+SECURITY_TOKEN+SID_ARG_2ND},i),this._options.url=WCF.convertLegacyURL(this._options.url),this._buttonContainer=elById(e),null===this._buttonContainer)throw new Error("Element id '"+e+"' is unknown.");if(this._target=elById(n),null===n)throw new Error("Element id '"+n+"' is unknown.");if(i.multiple&&"UL"!==this._target.nodeName&&"OL"!==this._target.nodeName)throw new Error("Target element has to be list when allowing upload of multiple files.");this._fileElements=[],this._internalFileId=0,this._createButton()}return a.prototype={_createButton:function(){this._fileUpload=elCreate("input"),elAttr(this._fileUpload,"type","file"),elAttr(this._fileUpload,"name",this._options.name),this._options.multiple&&elAttr(this._fileUpload,"multiple","true"),this._fileUpload.addEventListener("change",this._upload.bind(this)),this._button=elCreate("p"),this._button.classList.add("button"),this._button.classList.add("uploadButton");var e=elCreate("span");e.textContent=i.get("wcf.global.button.upload"),this._button.appendChild(e),r.prepend(this._fileUpload,this._button),this._insertButton(),n.trigger()},_createFileElement:function(e){var t=elCreate("progress");if(elAttr(t,"max",100),"OL"===this._target.nodeName||"UL"===this._target.nodeName){var n=elCreate("li");return n.innerText=e.name,n.appendChild(t),this._target.appendChild(n),n}var i=elCreate("p");return i.appendChild(t),this._target.appendChild(i),i},_createFileElements:function(e){if(e.length){var t=this._fileElements.length;this._fileElements[t]=[];for(var i=0,r=e.length;r>i;i++){var a=e[i],o=this._createFileElement(a);o.classList.contains("uploadFailed")||(elAttr(o,"data-filename",a.name),elAttr(o,"data-internal-file-id",this._internalFileId++),this._fileElements[t][i]=o)}return n.trigger(),t}return null},_failure:function(e,t,n,i,r){return!0},_getParameters:function(){return{}},_insertButton:function(){r.prepend(this._button,this._buttonContainer)},_progress:function(e,t){var n=Math.round(t.loaded/t.total*100);for(var i in this._fileElements[e]){var r=elByTag("PROGRESS",this._fileElements[e][i]);1===r.length&&elAttr(r[0],"value",n)}},_removeButton:function(){this._button.parentNode.removeChild(this._button),n.trigger()},_success:function(e,t,n,i,r){},_upload:function(e,t,n){var i=null,r=[];if(t)r.push(t);else if(n){var a="";switch(n.type){case"image/jpeg":a=".jpg";break;case"image/gif":a=".gif";break;case"image/png":a=".png"}r.push({name:"pasted-from-clipboard"+a})}else r=this._fileUpload.files;if(r.length)if(this._options.singleFileRequests){i=[];for(var o=0,s=r.length;s>o;o++)i.push(this._uploadFiles([r[o]],n))}else i=this._uploadFiles(r,n);return this._removeButton(),this._createButton(),i},_uploadFiles:function(t,n){var i=this._createFileElements(t);if(!this._fileElements[i].length)return null;for(var r=new FormData,a=0,o=t.length;o>a;a++)if(this._fileElements[i][a]){var s=elAttr(this._fileElements[i][a],"data-internal-file-id");n?r.append("__files["+s+"]",n,t[a].name):r.append("__files["+s+"]",t[a])}r.append("actionName",this._options.action),r.append("className",this._options.className);var l=this._getParameters();for(var c in l)r.append("parameters["+c+"]",l[c]);var u=new e({data:r,contentType:!1,failure:this._failure.bind(this,i),success:this._success.bind(this,i),uploadProgress:this._progress.bind(this,i),url:this._options.url});return u.sendRequest(),i}},a}),define("WoltLab/WCF/Ajax/Jsonp",["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=elCreate("script");s.async=!0,elAttr(s,"src",t),document.head.appendChild(s)}};return t}),define("WoltLab/WCF/Bbcode/FromHtml",["EventHandler","StringUtil","Dom/Traverse"],function(e,t,n){"use strict";function i(e,t){var n=e[t?"previousSibling":"nextSibling"];return null!==n&&n.nodeType===Node.TEXT_NODE&&/\s$/.test(n.textContent)?!1:!0}var r=[],a={},o=[],s={convert:function(t){t.length&&this._setup();var n=elCreate("div");n.innerHTML=t;for(var i=elByTag("P",n);i.length;)i[0].outerHTML=i[0].innerHTML;for(i=elByTag("BR",n);i.length;)i[0].outerHTML="\n";var a=this._preserveSourceElements(n);e.fire("com.woltlab.wcf.bbcode.fromHtml","beforeConvert",{container:n});for(var o=0,s=r.length;s>o;o++)this._convert(n,r[o]);for(e.fire("com.woltlab.wcf.bbcode.fromHtml","afterConvert",{container:n}),this._restoreSourceElements(n,a),i=elByTag("*",n);i.length;)i[0].outerHTML=i[0].innerHTML;return t=this._convertSpecials(n.innerHTML)},_preserveSourceElements:function(e){for(var t,n,i=[],r=0,a=o.length;a>r;r++){t=elBySelAll(o[r].selector,e),n=[];for(var s=0,l=t.length;l>s;s++)this._preserveSourceElement(t[s],n);i.push(n)}return i},_preserveSourceElement:function(e,t){var n=elCreate("var");elAttr(n,"data-source","wcf"),e.parentNode.insertBefore(n,e);var i=document.createDocumentFragment();i.appendChild(e),t.push({fragment:i,placeholder:n})},_restoreSourceElements:function(e,t){for(var n,i,r,a=0,s=t.length;s>a;a++)if(i=t[a],0!==i.length)for(var l=0,c=i.length;c>l;l++)n=i[l],r=n.placeholder,r.parentNode.insertBefore(n.fragment,r),o[a].callback(r.previousElementSibling),r.parentNode.removeChild(r)},_convertSpecials:function(e){return e=e.replace(/&amp;/g,"&"),e=e.replace(/&lt;/g,"<"),e=e.replace(/&gt;/g,">")},_setup:function(){r.length||(r=[{tagName:"STRONG",bbcode:"b"},{tagName:"DEL",bbcode:"s"},{tagName:"EM",bbcode:"i"},{tagName:"SUB",bbcode:"sub"},{tagName:"SUP",bbcode:"sup"},{tagName:"U",bbcode:"u"},{tagName:"KBD",bbcode:"tt"},{tagName:"A",callback:this._convertUrl.bind(this)},{tagName:"IMG",callback:this._convertImage.bind(this)},{tagName:"LI",callback:this._convertListItem.bind(this)},{tagName:"OL",callback:this._convertList.bind(this)},{tagName:"TABLE",callback:this._convertTable.bind(this)},{tagName:"UL",callback:this._convertList.bind(this)},{tagName:"BLOCKQUOTE",callback:this._convertBlockquote.bind(this)},{tagName:"SPAN",callback:this._convertSpan.bind(this)},{tagName:"DIV",callback:this._convertDiv.bind(this)}],a={span:[{style:"color",callback:this._convertInlineColor.bind(this)},{style:"font-size",callback:this._convertInlineFontSize.bind(this)},{style:"font-family",callback:this._convertInlineFontFamily.bind(this)}],div:[{style:"text-align",callback:this._convertInlineTextAlign.bind(this)}]},o=[{selector:"div.codeBox",callback:this._convertSourceCodeBox.bind(this)}],e.fire("com.woltlab.wcf.bbcode.fromHtml","init",{converter:r,inlineConverter:a,sourceConverter:o}))},_convert:function(e,t){if("function"==typeof t)return void t(e);for(var n,i=elByTag(t.tagName,e);i.length;)n=i[0],t.bbcode?n.outerHTML="["+t.bbcode+"]"+n.innerHTML+"[/"+t.bbcode+"]":t.callback(n)},_convertBlockquote:function(e){var i=elAttr(e,"data-author"),r=elAttr(e,"cite"),a="[quote]";i&&(i=t.escapeHTML(i).replace(/(\\)?'/g,function(e,t){return t?e:"\\'"}),a=r?"[quote='"+i+"','"+t.escapeHTML(r)+"']":"[quote='"+i+"']");var o=n.childByTag(e,"HEADER");null!==o&&e.removeChild(o);for(var s=n.childrenByTag(e,"DIV"),l=0,c=s.length;c>l;l++)s[l].outerHTML=s[l].innerHTML+"\n";e.outerHTML=a+e.innerHTML.replace(/^\n*/,"").replace(/\n*$/,"")+"[/quote]\n"},_convertImage:function(e){if(e.classList.contains("smiley"))return void(e.outerHTML=(i(e,!0)?" ":"")+elAttr(e,"alt")+(i(e,!1)?" ":""));var t=e.style.getPropertyValue("float")||"none",n=e.style.getPropertyValue("width");if(n="string"==typeof n?~~n.replace(/px$/,""):0,e.classList.contains("redactorEmbeddedAttachment")){var r=elAttr(e,"data-attachment-id");n>0?e.outerHTML="[attach="+r+","+t+","+n+"][/attach]":"none"!==t?e.outerHTML="[attach="+r+","+t+"][/attach]":e.outerHTML="[attach="+r+"][/attach]"}else{var a=e.src.trim();n>0?e.outerHTML="[img='"+a+"',"+t+","+n+"][/img]":"none"!==t?e.outerHTML="[img='"+a+"',"+t+"][/img]":e.outerHTML="[img]"+a+"[/img]"}},_convertList:function(e){var t;if("OL"===e.nodeName)t="[list=1]";else{var n=e.style.getPropertyValue("list-style-type")||"";t=""===n?"[list]":"[list="+("lower-latin"===n?"a":n)+"]"}e.outerHTML=t+e.innerHTML+"[/list]"},_convertListItem:function(e){"UL"!==e.parentNode.nodeName&&"OL"!==e.parentNode.nodeName?e.outerHTML=e.innerHTML:e.outerHTML="[*]"+e.innerHTML},_convertSpan:function(e){if(e.style.length||e.className)for(var t,n,i=0,r=a.span.length;r>i;i++)t=a.span[i],t.style?(n=e.style.getPropertyValue(t.style)||"",n&&t.callback(e,n)):e.classList.contains(t.className)&&t.callback(e);e.outerHTML=e.innerHTML},_convertDiv:function(e){if(e.className.length||e.style.length)for(var t,n,i=0,r=a.div.length;r>i;i++)t=a.div[i],t.className&&e.classList.contains(t.className)?t.callback(e):t.style&&(n=e.style.getPropertyValue(t.style)||"",n&&t.callback(e,n));e.outerHTML=e.innerHTML},_convertInlineColor:function(e,t){if(t.match(/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/i)){var n=RegExp.$1,i=RegExp.$2,r=RegExp.$3,a="0123456789ABCDEF";t="#"+(a.charAt((n-n%16)/16)+""+a.charAt(n%16))+(a.charAt((i-i%16)/16)+""+a.charAt(i%16))+(a.charAt((r-r%16)/16)+""+a.charAt(r%16))}e.innerHTML="[color="+t+"]"+e.innerHTML+"[/color]"},_convertInlineFontSize:function(e,t){t.match(/^(\d+)pt$/)?t=RegExp.$1:t.match(/^(\d+)(px|em|rem|%)$/)?(t=window.getComputedStyle(t).fontSize.replace(/^(\d+).*$/,"$1"),t=Math.round(t)):t="",t&&(t=Math.min(Math.max(t,8),36),e.innerHTML="[size="+t+"]"+e.innerHTML+"[/size]")},_convertInlineFontFamily:function(e,t){e.innerHTML="[font="+t.replace(/'/g,"")+"]"+e.innerHTML+"[/font]"},_convertInlineTextAlign:function(e,t){-1!==["center","justify","left","right"].indexOf(t)&&(e.innerHTML="[align="+t+"]"+e.innerHTML+"[/align]")},_convertTable:function(e){for(var t=elByTag("TD",e);t.length;)t[0].outerHTML="[td]"+t[0].innerHTML+"[/td]\n";for(t=elByTag("TR",e);t.length;)t[0].outerHTML="\n[tr]\n"+t[0].innerHTML+"[/tr]";var i=n.childByTag(e,"TBODY"),r=null===i?e.innerHTML:i.innerHTML;e.outerHTML="\n[table]"+r+"\n[/table]\n"},_convertUrl:function(e){var t=e.textContent.trim(),n=e.href.trim(),i="url";return""===n||""===t?void(e.outerHTML=e.innerHTML):(0===n.indexOf("mailto:")&&(n=n.substr(7),i="email"),void(n===t?e.outerHTML="["+i+"]"+n+"[/"+i+"]":e.outerHTML="["+i+"='"+n+"']"+e.innerHTML+"[/"+i+"]"))},_convertSourceCodeBox:function(e){var t=elAttr(e,"data-filename").trim()||"",i=elAttr(e,"data-highlighter");window.dtdesign=e;for(var r=n.childByTag(e.children[0],"OL"),a=~~r.getAttribute("start")||1,o="",s=0,l=r.childElementCount;l>s;s++)o&&(o+="\n"),o+=r.children[s].textContent;var c="[code='"+i+"',"+a+",'"+t+"']";e.outerHTML=c+o+"[/code]"}};return s}),define("WoltLab/WCF/Bbcode/Parser",[],function(){"use strict";var e={parse:function(e){var t=this._splitTags(e);return this._buildLinearTree(t),t},_splitTags:function(e){for(var t,n,i=__REDACTOR_BBCODES.join("|"),r="(\\[(?:/(?:"+i+")|(?:"+i+")(?:=(?:\\'[^\\'\\\\]*(?:\\\\.[^\\'\\\\]*)*\\'|[^,\\]]*)(?:,(?:\\'[^\\'\\\\]*(?:\\\\.[^\\'\\\\]*)*'|[^,\\]]*))*)?)\\])",a=new RegExp("^"+r+"$","i"),o=e.split(new RegExp(r,"i")),s=[],l=0,c=o.length;c>l;l++)t=o[l],""!==t&&(t.match(a)?(n={name:"",closing:!1,attributes:[],source:t},"/"===t[1]?(n.name=t.substring(2,t.length-1),n.closing=!0):t.match(/^\[([a-z0-9]+)=?(.*)\]$/i)&&(n.name=RegExp.$1,RegExp.$2&&(n.attributes=this._parseAttributes(RegExp.$2))),s.push(n)):s.push(t));return s},_buildLinearTree:function(e){for(var t,n,i=[],r="",a=0;a<e.length;a++)if(t=e[a],"object"==typeof t){if(r.length&&(t.name!==r||!t.closing)){e[a]=t.source;continue}if(t.closing){if(this._hasOpenTag(i,t.name)){n=this._closeUnclosedTags(e,i,t.name);for(var o=0,s=n.length;s>o;o++)e.splice(a,n[o]),a++;i.pop().pair=a}else e[a]=t.source;r===t.name&&(r="")}else i.push(t),-1!==__REDACTOR_SOURCE_BBCODES.indexOf(t.name)&&(r=t.name)}this._closeUnclosedTags(e,i,"")},_closeUnclosedTags:function(e,t,n){for(var i,r,a=[],o=t.length-1;o>=0&&(i=t[o],i.name!==n);o--)r={name:i.name,closing:!0,attributes:i.attributes.slice(),source:"[/"+i.name+"]"},i.pair=e.length,e.push(r),t.pop(),a.push({name:i.name,closing:!1,attributes:i.attributes.slice(),source:i.source});return a.reverse()},_hasOpenTag:function(e,t){for(var n=e.length-1;n>=0;n--)if(e[n].name===t)return!0;return!1},_parseAttributes:function(e){for(var t,n=e.split(/(?:^|,)('[^'\\\\]*(?:\\\\.[^'\\\\]*)*'|[^,]*)/g),i=[],r=0,a=n.length;a>r;r++)t=n[r],""!==t&&("'"===t.charAt(0)&&"'"===t.substr(-1)?i.push(t.substring(1,t.length-1).trim()):i.push(t.trim()));return i}};return e}),define("WoltLab/WCF/Bbcode/ToHtml",["Core","EventHandler","Language","StringUtil","WoltLab/WCF/Bbcode/Parser"],function(e,t,n,i,r){"use strict";function a(e){return e&&e==~~e}function o(e){return-1!==e.indexOf(".")||!a(e)&&!s(e)}function s(e){return objOwns(__REDACTOR_CODE_HIGHLIGHTERS,e)}var l=null,c={},u=[],d=[],h={convert:function(n,i){c=e.extend({attachments:{images:{},thumbnailUrl:"",url:""}},i),this._convertSpecials(n);var a=r.parse(n);a.length&&this._initBBCodes(),t.fire("com.woltlab.wcf.bbcode.toHtml","beforeConvert",{stack:a});for(var o,s,l=0,u=a.length;u>l;l++)o=a[l],"object"==typeof o&&(s=this._convert(a,o,l),Array.isArray(s)?(a[l]=null===s[0]?o.source:s[0],a[o.pair]=null===s[1]?a[o.pair].source:s[1]):a[l]=s);return t.fire("com.woltlab.wcf.bbcode.toHtml","afterConvert",{stack:a}),n=a.join(""),n=n.replace(/\n/g,"<br>")},_convertSpecials:function(e){return e=e.replace(/&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;")},_initBBCodes:function(){null===l&&(l={b:"strong",i:"em",u:"u",s:"del",sub:"sub",sup:"sup",table:"table",td:"td",tr:"tr",tt:"kbd",align:this._convertAlignment.bind(this),attach:this._convertAttachment.bind(this),color:this._convertColor.bind(this),code:this._convertCode.bind(this),email:this._convertEmail.bind(this),list:this._convertList.bind(this),quote:this._convertQuote.bind(this),size:this._convertSize.bind(this),url:this._convertUrl.bind(this),img:this._convertImage.bind(this)},u=["quote","table","td","tr"],d=["table","td","tr"],t.fire("com.woltlab.wcf.bbcode.toHtml","init",{bbcodes:l,removeNewlineAfter:u,removeNewlineBefore:d}))},_convert:function(e,t,n){var i,r=l[t.name];return void 0===r?[null,null]:(-1!==u.indexOf(t.name)&&(i=e[n+1],"string"==typeof i&&(e[n+1]=i.replace(/^\n/,"")),e.length>t.pair+1&&(i=e[t.pair+1],"string"==typeof i&&(e[t.pair+1]=i.replace(/^\n/,"")))),-1!==d.indexOf(t.name)&&(n-1>=0&&(i=e[n-1],"string"==typeof i&&(e[n-1]=i.replace(/\n$/,""))),i=e[t.pair-1],"string"==typeof i&&(e[t.pair-1]=i.replace(/\n$/,""))),this._convertSmilies(e),"string"==typeof r?["<"+r+">","</"+r+">"]:r(e,t,n))},_convertAlignment:function(e,t,n){var i=t.attributes.length?t.attributes[0]:"";return-1===["center","justify","left","right"].indexOf(i)?[null,null]:['<div style="text-align: '+i+'">',"</div>"]},_convertAttachment:function(e,t,n){var i=0,r=t.attributes,a=r.length;if(c.attachments.url?a>0&&(i=~~r[0],c.attachments.images.hasOwnProperty(i)||(a=0)):a=0,0===a)return[null,null];var o=~~c.attachments.images[i].height,s=~~c.attachments.images[i].width,l=["max-height: "+o+"px","max-width: "+s+"px"];a>1&&("left"===t.attributes[1]||"right"===r[1])&&(l.push("float: "+r[1]),l.push("margin: "+("left"===r[1]?"0 15px 7px 0":"0 0 7px 15px")));var u=c.attachments.thumbnailUrl;return a>2&&(width=~~r[2]||0,width&&(width>s&&(width=s),l.push("width: "+width+"px"),u=c.attachments.url)),['<img src="'+u.replace(/987654321/,i)+'" class="redactorEmbeddedAttachment redactorDisableResize" data-attachment-id="'+i+'"'+(l.length?' style="'+l.join(";")+'"':"")+">",""]},_convertCode:function(e,t,n){var r=t.attributes,l="",c="auto",u=0;switch(r.length){case 1:a(r[0])?u=~~r[0]:o(r[0])?l=r[0]:s(r[0])&&(c=r[0]);break;case 2:a(r[0])?(u=~~r[0],s(r[1])?c=r[1]:o(r[1])&&(l=r[1])):(s(r[0])&&(c=r[0]),o(r[1])&&(l=r[1]));break;case 3:s(r[0])&&(c=r[0]),a(r[1])&&(u=~~r[1]),o(r[2])&&(l=r[2])}for(var d,h,p=!0,f=-1,m=n+1;m<t.pair;m++){if(h=e[m],""===h.trim()){if(p){e[m]="";continue}-1===f&&(f=m)}else p=!1,f=-1;d=h.split("\n");for(var g=0,v=d.length;v>g;g++)d[g]="<li>"+(d[g]?i.escapeHTML(d[g]):"​")+"</li>";e[m]=d.join("")}if(!p&&-1!==f)for(var m=t.pair-1;m>=f;m--)e[m]="";return['<div class="codeBox container" contenteditable="false" data-highlighter="'+c+'" data-filename="'+(l?i.escapeHTML(l):"")+'"><div><div><h3>'+__REDACTOR_CODE_HIGHLIGHTERS[c]+(l?": "+i.escapeHTML(l):"")+'</h3></div><ol start="'+(u>1?u:1)+'">',"</ol></div></div>"]},_convertColor:function(e,t,n){return t.attributes.length&&t.attributes[0].match(/^[a-z0-9#]+$/i)?['<span style="color: '+i.escapeHTML(t.attributes[0])+'">',"</span>"]:[null,null]},_convertEmail:function(e,t,n){var r="";if(t.attributes.length)r=t.attributes[0];else{for(var a,o=n+1;o<t.pair;o++){if(a=e[o],"object"==typeof a){r="";break}r+=a}if(""===r.trim())return[null,null]}return['<a href="mailto:'+i.escapeHTML(r)+'">',"</a>"]},_convertImage:function(e,t,n){var r="none",a="",o=0;switch(t.attributes.length){case 0:if(!(n+1<t.pair&&"string"==typeof e[n+1]))return"";a=e[n+1],e[n+1]="";break;case 1:a=t.attributes[0];break;case 2:a=t.attributes[0],r=t.attributes[1];break;case 3:a=t.attributes[0],r=t.attributes[1],o=~~t.attributes[2]}"left"!==r&&"right"!==r&&(r="none");var s=[];return o>0&&s.push("width: "+o+"px"),"none"!==r&&(s.push("float: "+r),s.push("margin: "+("left"===r?"0 15px 7px 0":"0 0 7px 15px"))),['<img src="'+i.escapeHTML(a)+'"'+(s.length?' style="'+s.join(";")+'"':"")+">",""]},_convertList:function(e,t,n){for(var i=items.attributes.length?t.attributes[0]:"",r=n+1;r<t.pair;r++)"string"==typeof e[r]&&(e[r]=e[r].replace(/\[\*\]/g,"<li>"));return"1"==i||"decimal"===i?["<ol>","</ol>"]:i.length&&i.match(/^(?:none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)$/)?['<ul style="list-style-type: '+i+'">',"</ul>"]:["<ul>","</ul>"]},_convertQuote:function(e,t,r){var a="",o="";t.attributes.length>1?(a=t.attributes[0],o=t.attributes[1]):1===t.attributes.length&&(a=t.attributes[0]);for(var s=t.pair-1;s>r;s--)if("string"==typeof e[s]){e[s]=e[s].replace(/\n$/,"");break}var l="";return a?(o&&(l='<a href="'+i.escapeHTML(o)+'" tabindex="-1">'),l+=n.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:a.replace(/\\'/g,"'")}),o&&(l+="</a>")):l="<small>"+n.get("wcf.bbcode.quote.title.clickToSet")+"</small>",['<blockquote class="quoteBox container containerPadding quoteBoxSimple" cite="'+i.escapeHTML(o)+'" data-author="'+i.escapeHTML(a)+'"><header contenteditable="false"><h3>'+l+'</h3><a class="redactorQuoteEdit"></a></header><div>​',"</div></blockquote>"]},_convertSmilies:function(e){for(var t,n,r,a=0,o=e.length;o>a;a++)if(n=e[a],"string"==typeof n){for(var s in __REDACTOR_SMILIES)__REDACTOR_SMILIES.hasOwnProperty(s)&&(t=s.replace(/</g,"&lt;").replace(/>/g,"&gt;"),r=new RegExp("(\\s|^)"+i.escapeRegExp(s)+"(?=\\s|$)","gi"),n=n.replace(r,'$1<img src="'+__REDACTOR_SMILIES[s]+'" class="smiley" alt="'+t+'">'));e[a]=n}else-1!==__REDACTOR_SOURCE_BBCODES.indexOf(n.name)&&(a=n.pair)},_convertSize:function(e,t,n){return t.attributes.length&&0!==~~t.attributes[0]?['<span style="font-size: '+~~t.attributes[0]+'pt">',"</span>"]:[null,null]},_convertUrl:function(e,t,n){return t.attributes.length?['<a href="'+i.escapeHTML(t.attributes[0])+'">',"</a>"]:[null,null]}};return h}),define("WoltLab/WCF/Controller/Clipboard",["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,p=new n,f=elByClass("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&&f.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=f.length;t>e;e++){var n=f[e],i=c.identify(n),r=h.get(i);if(void 0===r){var o=elBySel(".jsClipboardMarkAll",n);null!==o&&(elAttr(o,"data-container-id",i),o.addEventListener("click",this._markAll.bind(this))),r={checkboxes:elByClass("jsClipboardItem",n),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)||(elAttr(u,"data-container-id",i),u.addEventListener("click",b),g.add(u))}}},_initEditors:function(){for(var e=function(e){try{var t=elAttr(e,"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=elByClass("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++)p.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=elAttr(t,"data-container-id"),a=h.get(r),o=elAttr(a.element,"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 p=l.parentByClass(t,"jsClipboardObject");null!==p&&p.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=elAttr(t,"data-container-id"),a=h.get(r),o=elAttr(a.element,"data-type"),s=l.parentByClass(t,"jsClipboardObject");if(a.markedObjectIds[i?"add":"delete"](n),s.classList[i?"add":"remove"]("jsMarked"),null!==a.markAll){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=elAttr(t,"data-type");i.fire("com.woltlab.wcf.clipboard",e,{data:n,listItem:t,responseData:null}),"function"==typeof window.jQuery&&window.jQuery(p.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=elAttr(o,"name");switch(o.nodeName){case"INPUT":o.checked&&(e[l]=elAttr(o,"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=elAttr(t,"data-type");i.fire("com.woltlab.wcf.clipboard",r,{data:n,listItem:t,responseData:e}),"function"==typeof window.jQuery&&window.jQuery(p.get(r)).trigger("clipboardActionResponse",[e,r,n.actionName,n.parameters])}this._loadMarkedItems()}.bind(this))},_unmarkAll:function(t){var n=elAttr(t.currentTarget,"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(elAttr(t.element,"data-type")===e.returnValues.objectType){for(var n=elByClass("jsMarked",t.element);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;p.get(e.returnValues.objectType).innerHTML=""}}.bind(this));if(p.forEach(function(e){e.innerHTML=""}),m=new o,h.forEach(function(t){var n=elAttr(t.element,"data-type"),i=e.returnValues.markedItems&&objOwns(e.returnValues.markedItems,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)&&p.has(n)){var i=e.returnValues.items[n],a=p.get(n),s=l.childrenByTag(a,"UL"),c=s[0]||null;null===c&&(c=elCreate("ul")),t.appendChild(c);var u=elCreate("li");u.classList.add("dropdown"),c.appendChild(u);var f=elCreate("span");f.className="dropdownToggle button",f.textContent=i.label,u.appendChild(f);var g=elCreate("ol");g.classList.add("dropdownMenu");for(var v in i.items)if(i.items.hasOwnProperty(v)){var b=i.items[v],_=elCreate("li"),C=elCreate("span");C.textContent=b.label,_.appendChild(C),g.appendChild(_),elAttr(_,"data-type",n),_.addEventListener("click",y),m.set(_,b)}var x=elCreate("li");x.classList.add("dropdownDivider"),g.appendChild(x);var L=elCreate("li");elAttr(L,"data-type",n);var C=elCreate("span");C.textContent=r.get("wcf.clipboard.item.unmarkAll"),L.appendChild(C),g.appendChild(L),u.appendChild(g),L.addEventListener("click",w),a.appendChild(t),d.init(f,!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")}null!==e.markAll&&(e.markAll.checked=n)}};return _}),define("WoltLab/WCF/Language/Input",["Core","Dictionary","Language","ObjectMap","StringUtil","Dom/Traverse","Dom/Util","Ui/SimpleDropdown"],function(e,t,n,i,r,a,o,s){"use strict";var l=new t,c=!1,u=new i,d=new t,h=null,p=null,f={init:function(e,n,i,a){if(!d.has(e)){var o=elById(e);if(null===o)throw new Error("Expected a valid element id, cannot find '"+e+"'.");this._setup();var s=new t;for(var l in n)n.hasOwnProperty(l)&&s.set(~~l,r.unescapeHTML(n[l]));d.set(e,s),this._initElement(e,o,s,i,a)}},_setup:function(){c||(c=!0,h=this._dropdownToggle.bind(this),p=this._submit.bind(this))},_initElement:function(e,t,i,r,c){var d=t.parentNode;d.classList.contains("inputAddon")||(d=elCreate("div"),d.className="inputAddon"+("TEXTAREA"===t.nodeName?" inputAddonTextarea":""),elAttr(d,"data-input-id",e),t.parentNode.insertBefore(d,t),d.appendChild(t)),d.classList.add("dropdown");var f=elCreate("span");f.className="button dropdownToggle inputPrefix";var m=elCreate("span");m.textContent=n.get("wcf.global.button.disabledI18n"),f.appendChild(m),d.insertBefore(f,t);var g=elCreate("ul");g.className="dropdownMenu",o.insertAfter(g,f);var v=function(t,n){var i=~~t.currentTarget.getAttribute("data-language-id"),r=a.childByClass(g,"active");null!==r&&r.classList.remove("active"),i&&t.currentTarget.classList.add("active"),this._select(e,i,n||!1)}.bind(this);for(var b in r)if(r.hasOwnProperty(b)){var y=elCreate("li");elAttr(y,"data-language-id",b),m=elCreate("span"),m.textContent=r[b],y.appendChild(m),y.addEventListener("click",v),g.appendChild(y)}if(c!==!0){var y=elCreate("li");y.className="dropdownDivider",g.appendChild(y),y=elCreate("li"),elAttr(y,"data-language-id",0),m=elCreate("span"),m.textContent=n.get("wcf.global.button.disabledI18n"),y.appendChild(m),y.addEventListener("click",v),g.appendChild(y)}var w=null;if(c===!0||i.size)for(var _=0,C=g.childElementCount;C>_;_++)if(~~g.children[_].getAttribute("data-language-id")===LANGUAGE_ID){w=g.children[_];break}s.init(f),s.registerCallback(d.id,h),l.set(e,{buttonLabel:f.children[0],element:t,languageId:0,isEnabled:!0,forceSelection:c});var x=a.parentByTag(t,"FORM");if(null!==x){x.addEventListener("submit",p);var L=u.get(x);void 0===L&&(L=[],u.set(x,L)),L.push(e)}null!==w&&v({currentTarget:w},!0)},_select:function(e,n,i){for(var r,a=l.get(e),o=s.getDropdownMenu(a.element.parentNode.id),c="",u=0,h=o.childElementCount;h>u;u++){r=o.children[u];var p=elAttr(r,"data-language-id");p.length&&n===~~p&&(c=r.children[0].textContent)}if(a.languageId!==n){var f=d.get(e);a.languageId&&f.set(a.languageId,a.element.value),0===n?d.set(e,new t):(a.buttonLabel.classList.contains("active")||i===!0)&&(a.element.value=f.has(n)?f.get(n):""),a.buttonLabel.textContent=c,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=s.getDropdownMenu(e),a=elById(e).getAttribute("data-input-id"),o=d.get(a),l=0,c=r.childElementCount;c>l;l++)n=r.children[l],i=~~n.getAttribute("data-language-id"),i&&n.classList[o.has(i)||!o.size?"remove":"add"]("missingValue")},_submit:function(e){for(var t,n,i,r,a=u.get(e.currentTarget),o=0,s=a.length;s>o;o++)n=a[o],t=l.get(n),t.isEnabled&&(r=d.get(n),t.languageId&&r.set(t.languageId,t.element.value),r.size&&(r.forEach(function(t,r){i=elCreate("input"),i.type="hidden",i.name=n+"_i18n["+r+"]",i.value=t,e.currentTarget.appendChild(i)}),t.element.removeAttribute("name")))},getValues:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");var n=d.get(e);return n.set(t.languageId,t.element.value),n},setValues:function(n,i){var r=l.get(n);if(void 0===r)throw new Error("Expected a valid i18n input element, '"+n+"' is not i18n input field.");e.isPlainObject(i)&&(i=t.fromObject(i)),r.element.value="",i.has(0)&&(r.element.value=i.get(0),i["delete"](0)),d.set(n,i),r.languageId=0,this._select(n,LANGUAGE_ID,!0)},disable:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");if(t.isEnabled){t.isEnabled=!1,t.buttonLabel.parentNode.style.setProperty("display","none");var n=t.buttonLabel.parentNode.parentNode;n.classList.remove("inputAddon"),n.classList.remove("dropdown")}},enable:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");if(!t.isEnabled){t.isEnabled=!0,t.buttonLabel.parentNode.style.removeProperty("display");var n=t.buttonLabel.parentNode.parentNode;n.classList.add("inputAddon"),n.classList.add("dropdown")}},isEnabled:function(e){var t=l.get(e);if(void 0===t)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");return t.isEnabled},validate:function(e,t){var n=l.get(e);if(void 0===n)throw new Error("Expected a valid i18n input element, '"+e+"' is not i18n input field.");if(!n.isEnabled)return!0;var i=d.get(e),r=s.getDropdownMenu(n.element.parentNode.id);n.languageId&&i.set(n.languageId,n.element.value);for(var a,o,c=!1,u=!1,h=0,p=r.childElementCount;p>h;h++)if(a=r.children[h],o=~~a.getAttribute("data-language-id"))if(i.has(o)&&0!==i.get(o).length){if(c)return!1;u=!0}else{if(u)return!1;c=!0}return c&&!t?!1:!0}};return f}),define("WoltLab/WCF/Ui/Suggestion",["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=elById(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=elCreate("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=elCreate("a"),t.textContent=i.label,elAttr(t,"data-object-id",i.objectID),t.addEventListener("click",this._select.bind(this)),r=elCreate("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=elById(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=elCreate("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,p=n.length;p>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:elAttr(n,"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=elCreate("ol");n.className="inputItemList",elAttr(n,"data-element-id",e.id),n.addEventListener("click",function(t){t.target===n&&e.focus()});var i=elCreate("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&&elAttr(e,"maxLength",t.maxLength);var r=null,a=[];if(t.isCSV&&(r=elCreate("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 p=elCreate("input");e.parentNode.insertBefore(p,e),p.id=e.id,e.parentNode.removeChild(e),e=p}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,elAttr(t.element,"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=elCreate("li");i.className="item";var r=elCreate("span");r.className="content",elAttr(r,"data-object-id",t.objectId),r.textContent=t.value;var a=elCreate("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=elAttr(n,"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",["Ajax"],function(e){"use strict";var t={setup:function(){var e=elByClass("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:[elAttr(n,"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/Collapsible/Sidebar",["Ajax","Language","Dom/Util"],function(e,t,n){"use strict";var i=!1,r=null,a="",o={setup:function(){var e=elBySel(".sidebar");null!==e&&(i="true"===elAttr(e,"data-is-open"),r=elById("main"),a=elAttr(e,"data-sidebar-name"),this._createUI(e),r.classList[i?"remove":"add"]("sidebarCollapsed"))},_createUI:function(e){var i=elCreate("a");i.href="#",i.className="collapsibleButton jsTooltip",elAttr(i,"title",t.get("wcf.global.button.collapsible"));var r=elCreate("span");r.appendChild(i),n.prepend(r,e),i.addEventListener("click",this._click.bind(this))},_click:function(t){t.preventDefault(),i=i===!1,e.api(this,{isOpen:~~i})},_ajaxSetup:function(){return{data:{actionName:"toggle",className:"wcf\\system\\user\\collapsible\\content\\UserCollapsibleSidebarHandler",sidebarName:a},url:"index.php/AJAXInvoke/?t="+SECURITY_TOKEN+SID_ARG_2ND}},_ajaxSuccess:function(e){r.classList[i?"remove":"add"]("sidebarCollapsed")}};return o}),define("WoltLab/WCF/Ui/ItemList/User",["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",["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=elBySelAll("#notificationSettings .flexibleButtonGroup"),i=0,r=n.length;r>i;i++)e=n[i],t=elBySel(".notificationSettingsEmail",e),null!==t&&this._initGroup(e,t)},_initGroup:function(e,t){var i=~~e.getAttribute("data-object-id"),o=elById("settings_"+i+"_disabled");o.addEventListener("click",function(){t.classList.remove("active")});var s=elById("settings_"+i+"_enabled");s.addEventListener("click",function(){t.classList.add("active")});var l=n.childByTag(t,"INPUT"),c=n.childByTag(t,"A");elAttr(c,"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=elCreate("ul");i.className="dropdownMenu",elAttr(i,"data-object-id",e);for(var r,a,s,l=["instant","daily","divider","none"],c=0;4>c;c++)s=l[c],a=elCreate("li"),"divider"===s?a.className="dropdownDivider":(r=elCreate("a"),r.textContent=t.get("wcf.user.notification.mailNotificationType."+s),a.appendChild(r),elAttr(a,"data-value",s),a.addEventListener("click",o),n===s&&(a.className="active")),i.appendChild(a);return i},_selectType:function(e){var n=elAttr(e.currentTarget,"data-value"),i=~~e.currentTarget.parentNode.getAttribute("data-object-id"),a=r.get(i);a.mailValue.value=n,elBySel("span.title",a.mailSetting).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}),function(e){function t(){for(;i.length&&"function"==typeof i[0];)i.shift()()}var n=e.require,i=[],r=0;e.require=function(a,o){if(!Array.isArray(a))return n.apply(e,arguments);var s=r++;i.push(s),n(a,function(){var n=arguments;i[i.indexOf(s)]=function(){o.apply(e,n)},t()})}}(window),define("require.linearExecution",function(){});
\ No newline at end of file