From 87e2379299df8e0e33150b0a3abb371a8ea2f1f4 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 9 Jun 2017 16:55:06 +0200 Subject: [PATCH] Updating minified JavaScript files --- wcfsetup/install/files/acp/js/WCF.ACP.min.js | 4 ++-- .../redactor2/redactor.combined.min.js | 18 +++++++-------- wcfsetup/install/files/js/WCF.Combined.min.js | 10 ++++----- .../install/files/js/WCF.Combined.tiny.min.js | 6 ++--- .../install/files/js/WoltLabSuite.Core.min.js | 22 +++++++++---------- .../files/js/WoltLabSuite.Core.tiny.min.js | 16 +++++++------- 6 files changed, 38 insertions(+), 38 deletions(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.min.js b/wcfsetup/install/files/acp/js/WCF.ACP.min.js index d3bedb6459..f1783fc7fe 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.min.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.min.js @@ -1,2 +1,2 @@ -WCF.ACP={},WCF.ACP.Application={},WCF.ACP.Cronjob={},WCF.ACP.Cronjob.ExecutionHandler=Class.extend({_notification:null,_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsCronjobRow .jsExecuteButton").click($.proxy(this._click,this)),this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success"),"success")},_click:function(e){this._proxy.setOption("data",{actionName:"execute",className:"wcf\\data\\cronjob\\CronjobAction",objectIDs:[$(e.target).data("objectID")]}),this._proxy.sendRequest()},_success:function(e,t,a){$(".jsCronjobRow").each($.proxy(function(t,a){var i=$(a).find(".jsExecuteButton"),s=i.data("objectID");if(WCF.inArray(s,e.objectIDs))return e.returnValues[s]&&($(a).find("td.columnNextExec").html(e.returnValues[s].formatted),$(a).wcfHighlight()),this._notification.show(),!1},this))}}),WCF.ACP.Cronjob.LogList=Class.extend({_dialog:null,init:function(){$(".jsCronjobLogDelete").click(function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.cronjob.log.clear.confirm"),function(e){"confirm"==e&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"clearAll",className:"wcf\\data\\cronjob\\log\\CronjobLogAction"},success:function(){window.location.reload()}})})}),$(".jsCronjobError").click($.proxy(this._showError,this))},_showError:function(e){var t=$(e.currentTarget);null===this._dialog?(this._dialog=$('
'+t.next().html()+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.cronjob.log.error.details")})):(this._dialog.html("
"+t.next().html()+"
"),this._dialog.wcfDialog("open"))}}),WCF.ACP.Package={},WCF.ACP.Package.Installation=Class.extend({_actionName:"InstallPackage",_allowRollback:!1,_dialog:null,_dialogTitle:"",_proxy:null,_queueID:0,_shouldRender:!1,init:function(e,t,a,i){switch(this._actionName=t||"InstallPackage",this._allowRollback=!0===a,this._queueID=e,this._actionName){case"InstallPackage":this._dialogTitle="wcf.acp.package."+(i?"update":"install")+".title";break;case"UninstallPackage":this._dialogTitle="wcf.acp.package.uninstallation.title"}this._initProxy(),this._init()},_initProxy:function(){for(var e="",t=this._actionName.split(/([A-Z][a-z0-9]+)/),a=0,i=t.length;a').appendTo($("#packageInstallationInnerContent"));$('").appendTo(e).click($.proxy(this._rollback,this)),$("#packageInstallationInnerContentContainer").show(),this._dialog.wcfDialog("render")},this))},_rollback:function(e){this._setIcon("spinner"),e&&$(e.currentTarget).disable(),this._executeStep("rollback")},prepareInstallation:function(){document.activeElement&&document.activeElement.blur(),this._proxy.setOption("data",this._getParameters()),this._proxy.sendRequest()},_getParameters:function(){return{queueID:this._queueID,step:"prepare"}},_success:function(e,t,a){if(this._shouldRender=!1,null===this._dialog&&(this._dialog=$('
').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get(this._dialogTitle)})),this._setIcon("spinner"),"rollback"==e.step)return this._dialog.wcfDialog("close"),this._dialog.remove(),void new WCF.PeriodicalExecuter(function(t){t.stop(),(new WCF.ACP.Package.Uninstallation).start(e.packageID)},200);if(e.queueID&&(this._queueID=e.queueID),e.template&&!e.ignoreTemplate&&(this._dialog.html(e.template),this._shouldRender=!0),e.progress&&($("#packageInstallationProgress").attr("value",e.progress).text(e.progress+"%"),$("#packageInstallationProgressLabel").text(e.progress+"%")),e.currentAction&&$("#packageInstallationAction").html(e.currentAction),"success"===e.step)return this._setIcon("check"),void this._purgeTemplateContent($.proxy(function(){var t=$('
').appendTo($("#packageInstallationInnerContent")),a=$('").appendTo(t).click(function(){$(this).disable(),window.location=e.redirectLocation});$("#packageInstallationInnerContentContainer").show(),$(document).keydown(function(e){e.which===$.ui.keyCode.ENTER&&a.trigger("click")}),this._dialog.wcfDialog("render")},this));if(e.innerTemplate){var i=this;if($("#packageInstallationInnerContent").html(e.innerTemplate).find("input").keyup(function(t){t.keyCode===$.ui.keyCode.ENTER&&i._submit(e)}),e.step&&e.node){$("#packageInstallationProgress").removeAttr("value"),this._setIcon("question");var s=$('
').appendTo($("#packageInstallationInnerContent"));$('").appendTo(s).click($.proxy(function(t){$(t.currentTarget).disable(),this._submit(e)},this))}return $("#packageInstallationInnerContentContainer").show(),void this._dialog.wcfDialog("render")}this._purgeTemplateContent($.proxy(function(){this._shouldRender&&this._dialog.wcfDialog("render"),e.step&&e.node&&this._executeStep(e.step,e.node)},this))},_submit:function(e){this._setIcon("spinner");var t={};$("#packageInstallationInnerContent input").each(function(e,a){var i=$(a),s=i.attr("type");if("checkbox"!=s&&"radio"!=s||i.prop("checked")){var n=i.attr("name");n.match(/(.*)\[([^[]*)\]$/)?(n=RegExp.$1,$key=RegExp.$2,void 0===t[n]&&($key?t[n]={}:t[n]=[]),$key?t[n][$key]=i.val():t[n].push(i.val())):t[n]=i.val()}}),this._executeStep(e.step,e.node,t)},_purgeTemplateContent:function(e){$("#packageInstallationInnerContent").children().length&&($("#packageInstallationInnerContentContainer").hide(),$("#packageInstallationInnerContent").empty(),this._shouldRender=!0),e()},_executeStep:function(e,t,a){a||(a={});var i=$.extend({node:t,queueID:this._queueID,step:e},a);this._proxy.setOption("data",i),this._proxy.sendRequest()},_setIcon:function(e){this._dialog.find(".jsPackageInstallationStatus").removeClass("fa-check fa-question fa-times fa-spinner").addClass("fa-"+e)}}),WCF.ACP.Package.Installation.Cancel=Class.extend({init:function(e){$("#backButton").click(function(){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"cancelInstallation",className:"wcf\\data\\package\\installation\\queue\\PackageInstallationQueueAction",objectIDs:[e]},success:function(e){window.location=e.returnValues.url}})})}}),WCF.ACP.Package.Uninstallation=WCF.ACP.Package.Installation.extend({_elements:null,_packageID:0,_wcfPackageListURL:"",init:function(e,t){this._elements=e,this._packageID=0,this._wcfPackageListURL=t,void 0!==this._elements&&this._elements.length&&this._super(0,"UninstallPackage")},start:function(e){this._actionName="UninstallPackage",this._packageID=e,this._queueID=0,this._dialogTitle="wcf.acp.package.uninstallation.title",this._initProxy(),this.prepareInstallation()},_init:function(){this._elements.click($.proxy(this._showConfirmationDialog,this))},_showConfirmationDialog:function(e){var t=$(e.currentTarget);if(t.data("isApplication")&&this._wcfPackageListURL)return void(window.location=WCF.String.unescapeHTML(this._wcfPackageListURL.replace(/{packageID}/,t.data("objectID"))));var a=this;WCF.System.Confirmation.show(t.data("confirmMessage"),function(e){"confirm"===e&&(a._packageID=t.data("objectID"),a.prepareInstallation())},void 0,void 0,!0)},_getParameters:function(){return{packageID:this._packageID,step:"prepare"}}}),WCF.ACP.Package.Search=Class.extend({_button:null,_cache:{},_container:null,_dialog:null,_package:null,_packageDescription:null,_packageName:null,_packageSearchResultContainer:null,_packageSearchResultList:null,_pageCount:0,_pageNo:1,_proxy:null,_searchID:0,_selectedPackage:"",_selectedPackageVersion:"",init:function(){this._button=null,this._cache={},this._container=$("#packageSearch"),this._dialog=null,this._package=null,this._packageName=null,this._packageSearchResultContainer=$("#packageSearchResultContainer"),this._packageSearchResultList=$("#packageSearchResultList"),this._pageCount=0,this._pageNo=1,this._searchDescription=null,this._searchID=0,this._selectedPackage="",this._selectedPackageVersion="",this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initElements()},_initElements:function(){this._button=this._container.find(".formSubmit > button.jsButtonPackageSearch").disable().click($.proxy(this._search,this)),this._package=$("#package").keyup($.proxy(this._keyUp,this)),this._packageDescription=$("#packageDescription").keyup($.proxy(this._keyUp,this)),this._packageName=$("#packageName").keyup($.proxy(this._keyUp,this))},_keyUp:function(e){""===this._package.val()&&""===this._packageDescription.val()&&""===this._packageName.val()?this._button.disable():(this._button.enable(),13===e.which&&this._button.trigger("click"))},_search:function(){var e=this._getSearchValues();if(!this._validate(e))return!1;e.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"search",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:e}),this._proxy.sendRequest()},_getSearchValues:function(){return{package:$.trim(this._package.val()),packageDescription:$.trim(this._packageDescription.val()),packageName:$.trim(this._packageName.val())}},_validate:function(e){return""!==e.package||""!==e.packageDescription||""!==e.packageName},_success:function(e,t,a){switch(e.actionName){case"getResultList":this._insertTemplate(e.returnValues.template);break;case"prepareInstallation":if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1).prepareInstallation()}else e.returnValues.template&&(null===this._dialog?(this._dialog=$("
"+e.returnValues.template+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.unauthorized")})):this._dialog.html(e.returnValues.template).wcfDialog("open"),this._dialog.find(".formSubmit > button").click($.proxy(this._submitAuthentication,this)));break;case"search":this._pageCount=e.returnValues.pageCount,this._searchID=e.returnValues.searchID,this._insertTemplate(e.returnValues.template,void 0===e.returnValues.count?void 0:e.returnValues.count),this._setupPagination()}},_submitAuthentication:function(e){var t=$("#packageUpdateServerUsername"),a=$("#packageUpdateServerPassword");t.next("small.innerError").remove(),a.next("small.innerError").remove();var i=!0;""===$.trim(t.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(t),i=!1),""===$.trim(a.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(a),i=!1),i&&this._prepareInstallation($(e.currentTarget).data("packageUpdateServerID"))},_insertTemplate:function(e,t){this._packageSearchResultContainer.show(),this._packageSearchResultList.html(e),void 0===t&&(this._content[this._pageNo]=e),void 0!==t&&(this._content={1:e},this._packageSearchResultContainer.find("h2.sectionTitle > .badge").html(t)),this._packageSearchResultList.find(".jsInstallPackage").click($.proxy(this._click,this))},_click:function(e){var t=$(e.currentTarget);WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy(function(e){"confirm"===e&&(this._selectedPackage=t.data("package"),this._selectedPackageVersion=t.data("packageVersion"),this._prepareInstallation())},this),void 0,void 0,!0)},_prepareInstallation:function(e){var t={packages:{}};t.packages[this._selectedPackage]=this._selectedPackageVersion,e&&(t.authData={packageUpdateServerID:e,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:!!$("#packageUpdateServerSaveCredentials:checked").length,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareInstallation",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:t}),this._proxy.sendRequest()},_setupPagination:function(){this._content={1:this._packageSearchResultList.html()},this._packageSearchResultContainer.find(".pagination").wcfPages("destroy").remove(),this._pageCount>1&&$('
').insertAfter(this._packageSearchResultList).wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this))},_showPage:function(e,t){if(t&&t.activePage&&(this._pageNo=t.activePage),this._pageNo<1||this._pageNo>this._pageCount)return void console.debug("[WCF.ACP.Package.Search] Cannot access page "+this._pageNo+" of "+this._pageCount);void 0===this._content[this._pageNo]?(this._proxy.setOption("data",{actionName:"getResultList",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:{pageNo:this._pageNo,searchID:this._searchID}}),this._proxy.sendRequest()):(this._packageSearchResultList.html(this._content[this._pageNo]),WCF.DOMNodeInsertedHandler.execute())}}),WCF.ACP.Package.Server={},WCF.ACP.Package.Server.Installation=Class.extend({_proxy:null,_selectedPackage:"",init:function(){this._dialog=null,this._selectedPackage=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},bind:function(){$(".jsButtonPackageInstall").removeClass("jsButtonPackageInstall").click($.proxy(this._click,this))},_click:function(e){var t=$(e.currentTarget);WCF.System.Confirmation.show(t.data("confirmMessage"),$.proxy(function(e){"confirm"===e&&(this._selectedPackage=t.data("package"),this._selectedPackageVersion=t.data("packageVersion"),this._prepareInstallation())},this),void 0,void 0,!0)},_success:function(e){if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1).prepareInstallation()}else e.returnValues.template&&(null===this._dialog?(this._dialog=$("
"+e.returnValues.template+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.unauthorized")})):this._dialog.html(e.returnValues.template).wcfDialog("open"),this._dialog.find(".formSubmit > button").click($.proxy(this._submitAuthentication,this)))},_submitAuthentication:function(e){var t=$("#packageUpdateServerUsername"),a=$("#packageUpdateServerPassword");t.next("small.innerError").remove(),a.next("small.innerError").remove();var i=!0;""===$.trim(t.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(t),i=!1),""===$.trim(a.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(a),i=!1),i&&this._prepareInstallation($(e.currentTarget).data("packageUpdateServerID"))},_prepareInstallation:function(e){var t={packages:{}};t.packages[this._selectedPackage]=this._selectedPackageVersion,e&&(t.authData={packageUpdateServerID:e,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:!!$("#packageUpdateServerSaveCredentials:checked").length,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareInstallation",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:t}),this._proxy.sendRequest()}}),WCF.ACP.Package.Update={},WCF.ACP.Package.Update.Manager=Class.extend({_dialog:null,_proxy:null,_submitButton:null,init:function(){this._dialog=null,this._submitButton=$(".formSubmit > button").click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsPackageUpdate").each($.proxy(function(e,t){var a=$(t);a.find("input[type=checkbox]").data("packageUpdate",a).change($.proxy(this._change,this))},this))},_change:function(e){var t=$(e.currentTarget);t.is(":checked")?(t.data("packageUpdate").find("select").enable(),t.data("packageUpdate").find("dl").removeClass("disabled"),this._submitButton.enable()):(t.data("packageUpdate").find("select").disable(),t.data("packageUpdate").find("dl").addClass("disabled"),$("input[type=checkbox]:checked").length?this._submitButton.enable():this._submitButton.disable())},_click:function(e,t){var a={};if($(".jsPackageUpdate").each($.proxy(function(e,t){var i=$(t);i.find("input[type=checkbox]:checked").length&&(a[i.data("package")]=i.find("select").val())},this)),$.getLength(a)){this._submitButton.disable();var i={packages:a};t&&(i.authData={packageUpdateServerID:t,password:$.trim($("#packageUpdateServerPassword").val()),saveCredentials:!!$("#packageUpdateServerSaveCredentials:checked").length,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareUpdate",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:i}),this._proxy.sendRequest()}},_success:function(e,t,a){if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1,!0).prepareInstallation()}else e.returnValues.excludedPackages?(null===this._dialog?(this._dialog=$("
"+e.returnValues.template+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.excludedPackages")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.package.update.excludedPackages")),this._dialog.html(e.returnValues.template).wcfDialog("open")),this._submitButton.enable()):e.returnValues.template&&(null===this._dialog?(this._dialog=$("
"+e.returnValues.template+"
").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.update.unauthorized")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.package.update.unauthorized")),this._dialog.html(e.returnValues.template).wcfDialog("open")),this._dialog.find(".formSubmit > button").click($.proxy(this._submitAuthentication,this)))},_submitAuthentication:function(e){var t=$("#packageUpdateServerUsername"),a=$("#packageUpdateServerPassword");t.next("small.innerError").remove(),a.next("small.innerError").remove();var i=!0;""===$.trim(t.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(t),i=!1),""===$.trim(a.val())&&($(''+WCF.Language.get("wcf.global.form.error.empty")+"").insertAfter(a),i=!1),i&&this._click(void 0,$(e.currentTarget).data("packageUpdateServerID"))}}),WCF.ACP.Package.Update.Search=Class.extend({_dialog:null,init:function(e){if(this._dialog=null,!0===e)$(".jsButtonPackageUpdate").click($.proxy(this._click,this));else{$('
  • '+WCF.Language.get("wcf.acp.package.searchForUpdates")+"
  • ").click(this._click.bind(this)).prependTo($(".contentHeaderNavigation > ul"))}},_click:function(){null===this._dialog?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"searchForUpdates",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:{ignoreCache:1}},success:$.proxy(this._success,this)}):this._dialog.wcfDialog("open")},_success:function(e,t,a){e.returnValues.url?window.location=e.returnValues.url:(this._dialog=$("
    "+WCF.Language.get("wcf.acp.package.searchForUpdates.noResults")+"
    ").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.package.searchForUpdates")}))}}),WCF.ACP.PluginStore={},WCF.ACP.PluginStore.PurchasedItems={},WCF.ACP.PluginStore.PurchasedItems.Search=Class.extend({_dialog:null,_proxy:null,init:function(){this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$('
  • '+WCF.Language.get("wcf.acp.pluginStore.purchasedItems.button.search")+"
  • ").prependTo($(".contentHeaderNavigation > ul")).click($.proxy(this._click,this))},_click:function(){this._proxy.setOption("data",{actionName:"searchForPurchasedItems",className:"wcf\\data\\package\\PackageAction"}),this._proxy.sendRequest()},_success:function(e,t,a){if(e.returnValues.template){null===this._dialog?(this._dialog=$("
    ").hide().appendTo(document.body),this._dialog.html(e.returnValues.template).wcfDialog({title:WCF.Language.get("wcf.acp.pluginStore.authorization")})):(this._dialog.html(e.returnValues.template),this._dialog.wcfDialog("open"));var i=this._dialog.find("button").click($.proxy(this._submit,this));this._dialog.find("input").keyup(function(e){if(e.which==$.ui.keyCode.ENTER)return i.trigger("click"),!1})}else e.returnValues.noResults?null===this._dialog?(this._dialog=$("
    ").hide().appendTo(document.body),this._dialog.html(e.returnValues.noResults).wcfDialog({title:WCF.Language.get("wcf.acp.pluginStore.purchasedItems")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.acp.pluginStore.purchasedItems")),this._dialog.html(e.returnValues.noResults),this._dialog.wcfDialog("open")):e.returnValues.noSSL?null===this._dialog?(this._dialog=$("
    ").hide().appendTo(document.body),this._dialog.html(e.returnValues.noSSL).wcfDialog({title:WCF.Language.get("wcf.global.error.title")})):(this._dialog.wcfDialog("option","title",WCF.Language.get("wcf.global.error.title")),this._dialog.html(e.returnValues.noSSL),this._dialog.wcfDialog("open")):e.returnValues.redirectURL&&(window.location=e.returnValues.redirectURL)},_submit:function(){this._dialog.wcfDialog("close"),this._proxy.setOption("data",{actionName:"searchForPurchasedItems",className:"wcf\\data\\package\\PackageAction",parameters:{password:$("#pluginStorePassword").val(),username:$("#pluginStoreUsername").val()}}),this._proxy.sendRequest()}}),WCF.ACP.Worker=Class.extend({_aborted:!1,_callback:null,_dialogID:null,_dialog:null,_proxy:null,_title:"",init:function(e,t,a,i,s){this._aborted=!1,this._callback=s||null,this._dialogID=e+"Worker",this._dialog=null,this._proxy=new WCF.Action.Proxy({autoSend:!0,data:{className:t,parameters:i||{}},showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?worker-proxy/&t="+SECURITY_TOKEN}),this._title=a},_success:function(e){if(null===this._dialog&&(this._dialog=$('
    ').hide().appendTo(document.body),this._dialog.wcfDialog({closeConfirmMessage:WCF.Language.get("wcf.acp.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.template&&this._dialog.html(e.template),this._dialog.find("progress").attr("value",e.progress).text(e.progress+"%").next("span").text(e.progress+"%"),e.progress<100)this._proxy.setOption("data",{className:e.className,loopCount:e.loopCount,parameters:e.parameters}),this._proxy.sendRequest();else if(null!==this._callback)this._callback(this,e);else{this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check");var t=$('
    ').appendTo(this._dialog);$('").appendTo(t).focus().click(function(){window.location=e.proceedURL}),this._dialog.wcfDialog("render")}}}),WCF.ACP.Category={},WCF.ACP.Category.Collapsible=WCF.Collapsible.SimpleRemote.extend({init:function(e){var t=$('.formSubmit > button[data-type="submit"]');t&&t.click($.proxy(this._sort,this)),this._super(e)},_getButtonContainer:function(e){return $("#"+e+" > .buttons")},_getContainers:function(){return $(".jsCategory").has("ol").has("li")},_getTarget:function(e){return $("#"+e+" > ol")},_sort:function(){$(".collapsibleButton").remove(),this._containers={},this._containerData={};var e=this._getContainers();0==e.length&&console.debug("[WCF.ACP.Category.Collapsible] Empty container set given, aborting."),e.each($.proxy(function(e,t){var a=$(t),i=a.wcfIdentify();this._containers[i]=a,this._initContainer(i)},this))}}),WCF.ACP.Search=WCF.Search.Base.extend({_providerName:"",init:function(){this._className="wcf\\data\\acp\\search\\provider\\ACPSearchProviderAction",this._super("#pageHeaderSearch input[name=q]"),$("#pageHeaderSearch > form").on("submit",function(e){e.preventDefault()}),WCF.Dropdown.getDropdownMenu("pageHeaderSearchType").find("a[data-provider-name]").on("click",$.proxy(function(e){e.preventDefault();var t=$(e.target);$(".pageHeaderSearchType > .button").text(t.text());var a=this._providerName;if(this._providerName="everywhere"!=t.data("providerName")?t.data("providerName"):"",a!=this._providerName){var i=$.trim(this._searchInput.val());if(i){var s={data:{excludedSearchValues:this._excludedSearchValues,searchString:i}};this._queryServer(s)}}},this))},_createListItem:function(e){this._list.children("li").length>0&&$('").appendTo(this._list);for(var t in e.items){var a=e.items[t];$('
  • '+WCF.String.escapeHTML(a.title)+""+(a.subtitle?""+WCF.String.escapeHTML(a.subtitle)+"":"")+"
  • ").appendTo(this._list),this._itemCount++}},_openDropdown:function(){this._list.find("small").each(function(e,t){for(;t.scrollWidth>t.clientWidth;)t.innerText="… "+t.innerText.substr(3)})},_handleEmptyResult:function(){return $('").appendTo(this._list),!0},_highlightSelectedElement:function(){this._list.find("li").removeClass("dropdownNavigationItem"),this._list.find("li:not(.dropdownDivider):not(.dropdownText)").eq(this._itemIndex).addClass("dropdownNavigationItem")},_selectElement:function(e){if(-1===this._itemIndex)return!1;window.location=this._list.find("li.dropdownNavigationItem > a").attr("href")},_success:function(e){this._super(e),this._list.addClass("acpSearchDropdown")},_getParameters:function(e){return e.data.providerName=this._providerName,e}}),WCF.ACP.User={},WCF.ACP.User.BanHandler={_callback:null,_dialog:null,_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsBanButton").click($.proxy(function(e){var t=$(e.currentTarget);t.data("banned")?this.unban([t.data("objectID")]):this.ban([t.data("objectID")])},this)),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.user",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.user.ban"===e.data.actionName&&this.ban(e.data.parameters.objectIDs)},unban:function(e){this._proxy.setOption("data",{actionName:"unban",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},ban:function(e){null===this._dialog?(this._dialog=$("
    ").hide().appendTo(document.body),this._dialog.append($('
    ').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"));var i=this._dialog.children("textarea")[0],s=function(){i.selectionStart=0,i.selectionEnd=i.value.length};i.addEventListener("mouseup",s),window.setTimeout(s,10)}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,i,s,n){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=i,this._buttonSelector=s||".jsRevertButton",this._options=$.extend({isVersionTracker:!1,versionTrackerObjectType:"",versionTrackerObjectId:0,redirectUrl:""},n),this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var e=this;this._newIDInputs.change(function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._oldIDInputs.each(function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t>=i?$(this).disable():$(this).enable()})}),this._oldIDInputs.change(function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._newIDInputs.each(function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t<=i?$(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){$(i).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)},void 0,void 0,!0)}else this._sendRequest(t)},_sendRequest:function(e){this._options.isVersionTracker?(this.proxy.setOption("url",window.WSC_API_URL+"index.php?ajax-invoke/&t="+window.SECURITY_TOKEN),this.proxy.setOption("data",{actionName:"revert",className:"wcf\\system\\version\\VersionTracker",parameters:{objectType:this._options.versionTrackerObjectType,objectID:this._options.versionTrackerObjectId,versionID:$(e).data("objectID")}})):this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._options.redirectUrl?(new WCF.System.Notification).show(function(){window.location=this._options.redirectUrl}.bind(this)):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).on("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._textarea=$("#"+this._messageFieldID),this._textarea.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 this._textarea.redactor("code.get")},_success:function(e,t,i){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(e){},_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._textarea.parent().children("small.innerError").empty();return t.length||(t=$('').appendTo(this._textarea.parent())),t.html("empty"===e.returnValues.errorType?WCF.Language.get("wcf.global.form.error.empty"):e.returnValues.errorMessage),!1}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:null,_options:{},init:function(e){if(arguments.length>1&&"string"==typeof e)throw new Error("Outdated API call, please update your implementation.");if(this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFieldID:"",previewButtonID:"",messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFieldID,this._options.previewButtonID)},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'
    '+e.returnValues.message+"
    ")}.bind(this))},_getParameters:function(e){var t=this._super(e);for(var i in this._options)this._options.hasOwnProperty(i)&&"messageFieldID"!==i&&"previewButtonID"!==i&&(t[i]=this._options[i]);return t},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),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");$('
  • '+this._availableLanguages[0]+"
  • ").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){e.preventDefault();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,t,i){var s=parseInt(e.returnValues.smileyCategoryID);this._cache[s]=e.returnValues.template,$("#smilies-"+this._wysiwygSelector+"-"+s).html(e.returnValues.template)}}),WCF.Message.Smilies=Class.extend({_editorId:"",init:function(e){this._editorId=e,$(".messageTabMenu[data-wysiwyg-container-id="+this._editorId+"]").on("mousedown",".jsSmiley",this._smileyClick.bind(this))},_smileyClick:function(e){e.preventDefault(),require(["EventHandler"],function(t){t.fire("com.woltlab.wcf.redactor2","insertSmiley_"+this._editorId,{img:e.currentTarget.children[0]})}.bind(this))}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(e,t,i){require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(t){new t({className:this._getClassName(),containerId:e,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(e,t){},_callbackDropdownInit:function(e,t){return this._initDropdownMenu($(e).wcfIdentify(),$(t)),null},_getClassName:function(){return""}}),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._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initContainers(),o=o&&e.supportPaste(),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;e._messageBodySelector&&s.data("body",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.removeClass("active"),this._activeContainerID=e.currentTarget.classList.contains("jsInvalidQuoteTarget")?"":e.currentTarget.id},_getNodeText:function(e){var t=function(e){switch(e.tagName){case"BLOCKQUOTE":case"IMG":case"SCRIPT":return NodeFilter.FILTER_REJECT;default:return NodeFilter.FILTER_ACCEPT}};t.acceptNode=t;for(var i,s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,t,!0),n="",a=[];s.nextNode();){var o=s.currentNode;if(o.nodeType===Node.ELEMENT_NODE)switch(o.tagName){case"A":if(i=o.textContent,i.indexOf("…")>0){var r=i.split(/\u2026/);if(2===r.length){var l=o.href;0===l.indexOf(r[0])&&l.substr(-1*r[1].length)===r[1]&&(n+=l,a.push(o))}}break;case"BR":case"LI":case"UL":n+="\n";break;case"TD":$.browser.msie||(n+="\n");break;case"P":n+="\n\n"}else{if("A"===o.parentNode.nodeName&&-1!==a.indexOf(o.parentNode))continue;n+=o.nodeValue.replace(/\n/g,"")}}return n},_mouseUp:function(){if(""===this._activeContainerID)return void this._copyQuote.removeClass("active");var e=window.getSelection();if(1!==e.rangeCount||e.isCollapsed)return void this._copyQuote.removeClass("active");var t=this._containers[this._activeContainerID],i=t.data("objectID");t=t.data("body")||t;for(var s=e.anchorNode;s&&s!==t[0];)s=s.parentNode;if(s!==t[0])return void this._copyQuote.removeClass("active");var n=this._getSelectedText(),a=$.trim(n);if(""==a)return void this._copyQuote.removeClass("active");var o=e.getRangeAt(0),r=o.startContainer.nodeType===Node.TEXT_NODE?o.startContainer.parentNode:o.startContainer,l=o.endContainer.nodeType===Node.TEXT_NODE?o.endContainer.parentNode:o.endContainer;if(r.closest("blockquote")||l.closest("blockquote"))return void this._copyQuote.removeClass("active");var c=this._getNodeText(t[0]);if(-1!==this._normalize(c).indexOf(this._normalize(a))){this._copyQuote.addClass("active");var u=this._getBoundingRectangle(t,window.getSelection()),d=this._copyQuote.getDimensions("outer"),h=(u.right-u.left)/2-d.width/2+u.left;this._copyQuote.css({top:u.top-d.height-7+"px",left:h+"px"}),this._copyQuote.removeClass("active"),this._activeContainerID="";var _=this;window.setTimeout(function(){var e=$.trim(_._getSelectedText());""!=e&&(_._copyQuote.addClass("active"),_._message=e,_._objectID=i)},10)}},_normalize:function(e){return e.replace(/\r?\n|\r/g,"\n").replace(/\s/g," ").replace(/\s{2,}/g," ")},_getBoundingRectangle:function(e,t){var i=null;if(t.rangeCount>0){var s=t.getRangeAt(0).getBoundingClientRect();i={left:s.left,right:s.right,top:s.top+$(document).scrollTop()}}return i},_initCopyQuote:function(e){if(this._copyQuote=$("#quoteManagerCopy"),!this._copyQuote.length){this._copyQuote=$('
    '+WCF.Language.get("wcf.message.quote.quoteSelected")+"
    ").appendTo(document.body);var t=this._copyQuote.children("span.jsQuoteManagerStore").click($.proxy(this._saveQuote,this));e&&$(''+WCF.Language.get("wcf.message.quote.quoteAndReply")+"").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){e.preventDefault();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");i.hasClass("jsMobileButtonGroupNavigation")&&i.children(".dropdownLabel").trigger("click")},_saveQuote:function(e){this._proxy.setOption("data",{actionName:"saveQuote",className:this._className,interfaceName:"wcf\\data\\IMessageQuoteAction",objectIDs:[this._objectID],parameters:{message:this._message,renderQuote:!0===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,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,_editorId:"",_editorIdAlternative:"",_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_supportPaste:!1,init:function(e,t,i,s){if(this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorId="",this._editorIdAlternative="",this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._supportPaste=!1,t){var n=$("#"+t);n.length&&(this._editorId=t,this._supportPaste=!0,this._form=n.parents("form:eq(0)"),this._form.length?(this._form.submit(this._submit.bind(this)),this._removeOnSubmit=s||[]):(this._form=null,this._supportPaste=!0===i))}this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?message-quote/&t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.quote","reload",this.countQuotes.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertQuote_"+(this._editorIdAlternative?this._editorIdAlternative:this._editorId),{author:e.quote.username,content:e.quote.text,isText:!e.quote.isFullQuote,link:e.quote.link})}.bind(this))},setAlternativeEditor:function(e){"object"==typeof e&&(e=e[0].id),this._editorIdAlternative=e},clearAlternativeEditor:function(){this._editorIdAlternative=""},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)if(this._handlers.hasOwnProperty(i)){var s=t[i]||[];this._handlers[i].updateFullQuoteObjectIDs(s)}},insertQuotes:function(e,t,i){if(!this._insertQuotes)return void(this._insertQuotes=!0);new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:i})},_toggleShowQuotes:function(){require(["WoltLabSuite/Core/Ui/Page/Action"],function(e){if(this._count){var t=e.get("showQuotes");void 0===t&&(t=elCreate("a"),t.addEventListener("mousedown",this._click.bind(this)),e.add("showQuotes",t)),t.textContent=WCF.Language.get("wcf.message.quote.showQuotes").replace(/#count#/,this._count),e.show("showQuotes")}else e.hide("showQuotes");this._hasTemplate=!1}.bind(this))},_click:function(){var e=document.activeElement;e.classList.contains("redactor-layer")&&$("#"+elData(e,"element-id")).redactor("selection.save"),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=$('
    ').hide().appendTo(document.body))),this._dialog.html(e);var t=$('
    ').appendTo(this._dialog);this._supportPaste&&(this._buttons.insert=$('").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$("").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{var s=this._removeOnSubmit.indexOf(i);-1!==s&&this._removeOnSubmit.splice(s,1)}},_insertSelected:function(){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){var i=$(e?e.currentTarget:t).parents("li:eq(0)"),s=i.children(".jsFullQuote")[0].textContent.trim(),n=i.parents(".message:eq(0)"),a=n.data("username"),o=n.data("link"),r=!elDataBool(i[0],"is-full-quote");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertQuote_"+(this._editorIdAlternative?this._editorIdAlternative:this._editorId),{author:a,content:s,isText:r,link:o}),this._removeOnSubmit.push(i.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)this._handlers.hasOwnProperty(i)&&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)for(var e=this._form.find(".formSubmit"),t=0,i=this._removeOnSubmit.length;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)this._handlers.hasOwnProperty(t)&&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=$("
    ").hide().appendTo(document.body),a=!0):this._dialog.empty();var o=$('

    ").appendTo(this._dialog);$('').attr("value",i).appendTo(o);var o=$('

    ").appendTo(this._dialog);$('').attr("value","[url='"+i+"']"+s+"[/url]").appendTo(o);var o=$('

    ").appendTo(this._dialog);$('').attr("value",''+WCF.String.escapeHTML(s)+"").appendTo(o),this._cache[n]=this._dialog.html(),a?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("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({init:function(){require(["WoltLabSuite/Core/Ui/Message/Share"],function(e){e.init()})}}),WCF.Message.UserMention=Class.extend({init:function(){throw new Error("Support for mentions in Redactor are now enabled by adding the attribute 'data-support-mention=\"true\"' to the textarea element.")}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e=this.element.find("> nav"),t=e.find("> ul > li:not(.jsFlexibleMenuDropdown)"),i=this.element.find("> div, > fieldset");if(t.length!=i.length)return void console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.");var s=this.element.data("preselect");i.each(function(e,i){if(null!==elBySel(".innerError",i))return s=$(t[e]).data("name"),!1}),this._tabs=[],this._tabsByName={};for(var n=0;n').appendTo(i.find(".codeBoxHeader")).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+$/,"").replace(/\u200B/g,"").replace(/\xa0/," ")}),null===this._dialog?(this._dialog=$('
    ').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"));var i=this._dialog.children("textarea")[0];"rtl"===document.documentElement.dir&&(i.dir="ltr",i.style.setProperty("text-align","left",""));var s=function(){i.selectionStart=0,i.selectionEnd=i.value.length};i.addEventListener("mouseup",s),window.setTimeout(s,10)}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,i,s,n){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=i,this._buttonSelector=s||".jsRevertButton",this._options=$.extend({isVersionTracker:!1,versionTrackerObjectType:"",versionTrackerObjectId:0,redirectUrl:""},n),this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var e=this;this._newIDInputs.change(function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._oldIDInputs.each(function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t>=i?$(this).disable():$(this).enable()})}),this._oldIDInputs.change(function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._newIDInputs.each(function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t<=i?$(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){$(i).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)},void 0,void 0,!0)}else this._sendRequest(t)},_sendRequest:function(e){this._options.isVersionTracker?(this.proxy.setOption("url",window.WSC_API_URL+"index.php?ajax-invoke/&t="+window.SECURITY_TOKEN),this.proxy.setOption("data",{actionName:"revert",className:"wcf\\system\\version\\VersionTracker",parameters:{objectType:this._options.versionTrackerObjectType,objectID:this._options.versionTrackerObjectId,versionID:$(e).data("objectID")}})):this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._options.redirectUrl?(new WCF.System.Notification).show(function(){window.location=this._options.redirectUrl}.bind(this)):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).on("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._textarea=$("#"+this._messageFieldID),this._textarea.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 this._textarea.redactor("code.get")},_success:function(e,t,i){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(e){},_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._textarea.parent().children("small.innerError").empty();return t.length||(t=$('').appendTo(this._textarea.parent())),t.html("empty"===e.returnValues.errorType?WCF.Language.get("wcf.global.form.error.empty"):e.returnValues.errorMessage),!1}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:null,_options:{},init:function(e){if(arguments.length>1&&"string"==typeof e)throw new Error("Outdated API call, please update your implementation.");if(this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFieldID:"",previewButtonID:"",messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFieldID,this._options.previewButtonID)},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'
    '+e.returnValues.message+"
    ")}.bind(this))},_getParameters:function(e){var t=this._super(e);for(var i in this._options)this._options.hasOwnProperty(i)&&"messageFieldID"!==i&&"previewButtonID"!==i&&(t[i]=this._options[i]);return t},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),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");$('
  • '+this._availableLanguages[0]+"
  • ").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){e.preventDefault();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,t,i){var s=parseInt(e.returnValues.smileyCategoryID);this._cache[s]=e.returnValues.template,$("#smilies-"+this._wysiwygSelector+"-"+s).html(e.returnValues.template)}}),WCF.Message.Smilies=Class.extend({_editorId:"",init:function(e){this._editorId=e,$(".messageTabMenu[data-wysiwyg-container-id="+this._editorId+"]").on("mousedown",".jsSmiley",this._smileyClick.bind(this))},_smileyClick:function(e){e.preventDefault(),require(["EventHandler"],function(t){t.fire("com.woltlab.wcf.redactor2","insertSmiley_"+this._editorId,{img:e.currentTarget.children[0]})}.bind(this))}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(e,t,i){require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(t){new t({className:this._getClassName(),containerId:e,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(e,t){},_callbackDropdownInit:function(e,t){return this._initDropdownMenu($(e).wcfIdentify(),$(t)),null},_getClassName:function(){return""}}),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._objectID=0,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initContainers(),o=o&&e.supportPaste(),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;e._messageBodySelector&&s.data("body",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.removeClass("active"),this._activeContainerID=e.currentTarget.classList.contains("jsInvalidQuoteTarget")?"":e.currentTarget.id},_getNodeText:function(e){var t=function(e){switch(e.tagName){case"BLOCKQUOTE":case"IMG":case"SCRIPT":return NodeFilter.FILTER_REJECT;default:return NodeFilter.FILTER_ACCEPT}};t.acceptNode=t;for(var i,s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,t,!0),n="",a=[];s.nextNode();){var o=s.currentNode;if(o.nodeType===Node.ELEMENT_NODE)switch(o.tagName){case"A":if(i=o.textContent,i.indexOf("…")>0){var r=i.split(/\u2026/);if(2===r.length){var l=o.href;0===l.indexOf(r[0])&&l.substr(-1*r[1].length)===r[1]&&(n+=l,a.push(o))}}break;case"BR":case"LI":case"UL":n+="\n";break;case"TD":$.browser.msie||(n+="\n");break;case"P":n+="\n\n"}else{if("A"===o.parentNode.nodeName&&-1!==a.indexOf(o.parentNode))continue;n+=o.nodeValue.replace(/\n/g,"")}}return n},_mouseUp:function(){if(""===this._activeContainerID)return void this._copyQuote.removeClass("active");var e=window.getSelection();if(1!==e.rangeCount||e.isCollapsed)return void this._copyQuote.removeClass("active");var t=this._containers[this._activeContainerID],i=t.data("objectID");t=t.data("body")||t;for(var s=e.anchorNode;s&&s!==t[0];)s=s.parentNode;if(s!==t[0])return void this._copyQuote.removeClass("active");var n=this._getSelectedText(),a=$.trim(n);if(""==a)return void this._copyQuote.removeClass("active");var o=e.getRangeAt(0),r=o.startContainer.nodeType===Node.TEXT_NODE?o.startContainer.parentNode:o.startContainer,l=o.endContainer.nodeType===Node.TEXT_NODE?o.endContainer.parentNode:o.endContainer;if(r.closest("blockquote")||l.closest("blockquote"))return void this._copyQuote.removeClass("active");var c=this._getNodeText(t[0]);if(-1!==this._normalize(c).indexOf(this._normalize(a))){this._copyQuote.addClass("active");var u=this._getBoundingRectangle(t,window.getSelection()),d=this._copyQuote.getDimensions("outer"),h=(u.right-u.left)/2-d.width/2+u.left;this._copyQuote.css({top:u.top-d.height-7+"px",left:h+"px"}),this._copyQuote.removeClass("active"),this._activeContainerID="";var _=this;window.setTimeout(function(){var e=$.trim(_._getSelectedText());""!=e&&(_._copyQuote.addClass("active"),_._message=e,_._objectID=i)},10)}},_normalize:function(e){return e.replace(/\r?\n|\r/g,"\n").replace(/\s/g," ").replace(/\s{2,}/g," ")},_getBoundingRectangle:function(e,t){var i=null;if(t.rangeCount>0){var s=t.getRangeAt(0).getBoundingClientRect();i={left:s.left,right:s.right,top:s.top+$(document).scrollTop()}}return i},_initCopyQuote:function(e){if(this._copyQuote=$("#quoteManagerCopy"),!this._copyQuote.length){this._copyQuote=$('
    '+WCF.Language.get("wcf.message.quote.quoteSelected")+"
    ").appendTo(document.body);var t=this._copyQuote.children("span.jsQuoteManagerStore").click($.proxy(this._saveQuote,this));e&&$(''+WCF.Language.get("wcf.message.quote.quoteAndReply")+"").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){e.preventDefault();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");i.hasClass("jsMobileButtonGroupNavigation")&&i.children(".dropdownLabel").trigger("click")},_saveQuote:function(e){this._proxy.setOption("data",{actionName:"saveQuote",className:this._className,interfaceName:"wcf\\data\\IMessageQuoteAction",objectIDs:[this._objectID],parameters:{message:this._message,renderQuote:!0===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,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,_editorId:"",_editorIdAlternative:"",_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_supportPaste:!1,init:function(e,t,i,s){if(this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorId="",this._editorIdAlternative="",this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._supportPaste=!1,t){var n=$("#"+t);n.length&&(this._editorId=t,this._supportPaste=!0,this._form=n.parents("form:eq(0)"),this._form.length?(this._form.submit(this._submit.bind(this)),this._removeOnSubmit=s||[]):(this._form=null,this._supportPaste=!0===i))}this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?message-quote/&t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.quote","reload",this.countQuotes.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertQuote_"+(this._editorIdAlternative?this._editorIdAlternative:this._editorId),{author:e.quote.username,content:e.quote.text,isText:!e.quote.isFullQuote,link:e.quote.link})}.bind(this))},setAlternativeEditor:function(e){"object"==typeof e&&(e=e[0].id),this._editorIdAlternative=e},clearAlternativeEditor:function(){this._editorIdAlternative=""},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)if(this._handlers.hasOwnProperty(i)){var s=t[i]||[];this._handlers[i].updateFullQuoteObjectIDs(s)}},insertQuotes:function(e,t,i){if(!this._insertQuotes)return void(this._insertQuotes=!0);new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:i})},_toggleShowQuotes:function(){require(["WoltLabSuite/Core/Ui/Page/Action"],function(e){if(this._count){var t=e.get("showQuotes");void 0===t&&(t=elCreate("a"),t.addEventListener("mousedown",this._click.bind(this)),e.add("showQuotes",t)),t.textContent=WCF.Language.get("wcf.message.quote.showQuotes").replace(/#count#/,this._count),e.show("showQuotes")}else e.hide("showQuotes");this._hasTemplate=!1}.bind(this))},_click:function(){var e=document.activeElement;e.classList.contains("redactor-layer")&&$("#"+elData(e,"element-id")).redactor("selection.save"),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=$('
    ').hide().appendTo(document.body))),this._dialog.html(e);var t=$('
    ').appendTo(this._dialog);this._supportPaste&&(this._buttons.insert=$('").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$("").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{var s=this._removeOnSubmit.indexOf(i);-1!==s&&this._removeOnSubmit.splice(s,1)}},_insertSelected:function(){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){var i=$(e?e.currentTarget:t).parents("li:eq(0)"),s=i.children(".jsFullQuote")[0].textContent.trim(),n=i.parents(".message:eq(0)"),a=n.data("username"),o=n.data("link"),r=!elDataBool(i[0],"is-full-quote");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor2","insertQuote_"+(this._editorIdAlternative?this._editorIdAlternative:this._editorId),{author:a,content:s,isText:r,link:o}),this._removeOnSubmit.push(i.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)this._handlers.hasOwnProperty(i)&&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)for(var e=this._form.find(".formSubmit"),t=0,i=this._removeOnSubmit.length;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)this._handlers.hasOwnProperty(t)&&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=$("
    ").hide().appendTo(document.body),a=!0):this._dialog.empty();var o=$('

    ").appendTo(this._dialog);$('').attr("value",i).appendTo(o);var o=$('

    ").appendTo(this._dialog);$('').attr("value","[url='"+i+"']"+s+"[/url]").appendTo(o);var o=$('

    ").appendTo(this._dialog);$('').attr("value",''+WCF.String.escapeHTML(s)+"").appendTo(o),this._cache[n]=this._dialog.html(),a?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("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({init:function(){require(["WoltLabSuite/Core/Ui/Message/Share"],function(e){e.init()})}}),WCF.Message.UserMention=Class.extend({init:function(){throw new Error("Support for mentions in Redactor are now enabled by adding the attribute 'data-support-mention=\"true\"' to the textarea element.")}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e=this.element.find("> nav"),t=e.find("> ul > li:not(.jsFlexibleMenuDropdown)"),i=this.element.find("> div, > fieldset");if(t.length!=i.length)return void console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.");var s=this.element.data("preselect");i.each(function(e,i){if(null!==elBySel(".innerError",i))return s=$(t[e]).data("name"),!1}),this._tabs=[],this._tabsByName={};for(var n=0;n ul > li[data-name] > a",r);null!==l&&$(l).trigger("mousedown")}continue}if(!0===i)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){if($.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0===this._tabs[e])return void console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'");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); // WCF.Poll.js -(function (window, undefined) { "use strict";WCF.Poll={},WCF.Poll.Management=Class.extend({_container:null,_count:0,_editorId:"",_maxOptions:0,init:function(t,e,i,n){if(this._count=0,this._maxOptions=i||-1,this._container=$("#"+t).children("ol:eq(0)"),!this._container.length)return void console.debug("[WCF.Poll.Management] Invalid container id given, aborting.");e=e||[],this._createOptionList(e),n?(this._editorId=n,WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+n,this._reset.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","submit_"+n,this._submit.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+n,this._validate.bind(this))):this._container.closest("form").submit($.proxy(this._submit,this)),require(["WoltLabSuite/Core/Ui/Sortable/List"],function(e){new e({containerId:t,options:{toleranceElement:"> div"}})})},_createOptionList:function(t){for(var e=0,i=t.length;e').data("optionID",e);null===i?n.appendTo(this._container):n.insertAfter(i);var o=$('
    ').appendTo(n);$('').appendTo(o),$('').click($.proxy(this._addOption,this)).appendTo(o),$('').click($.proxy(this._removeOption,this)).appendTo(o);var s=$('').keydown($.proxy(this._keyDown,this)).appendTo(o);s.click(function(){document.activeElement!==this&&this.focus()}),null!==i&&s.focus(),WCF.DOMNodeInsertedHandler.execute(),++this._count===this._maxOptions&&this._container.find("span.jsAddOption").removeClass("pointer").addClass("disabled")},_keyDown:function(t){13===t.which&&($(t.currentTarget).parent().children(".jsAddOption").trigger("click"),t.preventDefault())},_addOption:function(t){if(this._count===this._maxOptions)return!1;var e=$(t.currentTarget).closest("li",this._container[0]);this._createOption(void 0,void 0,e)},_removeOption:function(t){$(t.currentTarget).closest("li",this._container[0]).remove(),this._count--,this._container.find("span.jsAddOption").addClass("pointer").removeClass("disabled"),0==this._container.children("li").length&&this._createOption()},_submit:function(t){var e=[];if(this._container.children("li").each(function(t,i){var n=$(i),o=$.trim(n.find("input").val());""!=o&&e.push(n.data("optionID")+"_"+o)}),"object"==typeof t.originalEvent&&t.originalEvent instanceof Event){if(e.length)for(var i=this._container.parents("form").find(".formSubmit"),n=0,o=e.length;n').val(e[n]).appendTo(i)}else{t.poll={pollOptions:e};this._container.parents(".messageTabMenuContent:eq(0)").find("input").each(function(e,i){i.name&&("checkbox"!==i.type||i.checked)&&(t.poll[i.name]=i.value)})}},_reset:function(){for(var t=this._container[0];t.childElementCount>1;)t.removeChild(t.children[1]);elBySel("input",t.children[0]).value="",this._container.parents(".messageTabMenuContent:eq(0)").find("input").each(function(t,e){e.name&&("checkbox"===e.type?e.checked=!1:"text"===e.type?e.value="":"number"===e.type&&(e.value=e.min))}),require(["WoltLabSuite/Core/Date/Picker"],function(t){t.clear("pollEndTime_"+this._editorId)}.bind(this))},_validate:function(t){if(""!==elById("pollQuestion_"+this._editorId).value.trim()){var e=0;if(elBySelAll('li input[type="text"]',this._container[0],function(t){""!==t.value.trim()&&e++}),0===e)t.api.throwError(this._container[0],WCF.Language.get("wcf.global.form.error.empty")),t.valid=!1;else{var i=elById("pollMaxVotes_"+this._editorId),n=~~i.value;n&&n>e&&(t.api.throwError(i,WCF.Language.get("wcf.poll.maxVotes.error.invalid")),t.valid=!1)}}}}),WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(t){var e=$(t);if(!e.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});var i=this;e.each(function(t,e){var n=$(e),o=n.data("pollID");void 0===i._polls[o]&&(i._cache[o]={result:"",vote:""},i._polls[o]=n,i._canViewParticipants[o]=!!n.data("canViewParticipants"),i._canViewResult[o]=!!n.data("canViewResult"),i._canVote[o]=!!n.data("canVote"),i._bindListeners(o),n.data("inVote")&&i._prepareVote(o),i._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,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canViewResult[i]&&this._polls[i].data("inVote")&&(this._cache[i].result?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].result),this._polls[i].data("inVote",!1),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getResult",pollID:i}),this._proxy.sendRequest()))},_showParticipants:function(t){var e=$(t.currentTarget).data("pollID");this._participants[e]||(this._participants[e]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[e].data("question"),{pollID:e})),this._participants[e].open()},_showVote:function(t,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canVote[i]&&(this._polls[i].data("inVote")||(this._cache[i].vote?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].vote),this._polls[i].data("inVote",!0),this._prepareVote(i),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getVote",pollID:i}),this._proxy.sendRequest())))},_success:function(t,e,i){if(t&&t.actionName){var n=t.pollID;switch(t.resultTemplate&&(this._cache[n].result=t.resultTemplate),t.voteTemplate&&(this._cache[n].vote=t.voteTemplate),t.actionName){case"getResult":this._showResult(null,n);break;case"getVote":this._showVote(null,n);break;case"vote":this._canViewResult[n]=!0,this._canVote[n]=!!t.canVote,this._showResult(null,n)}}},_prepareVote:function(t){this._polls[t].find(".jsButtonPollVote").disable();var e=this._polls[t].find(".pollInnerContainer > .jsPollVote"),i=this;this._inputElements[t]=e.find("input").change(function(){i._handleVoteButton(t)}),this._handleVoteButton(t);var n=e.data("maxVotes");this._inputElements[t].filter("[type=checkbox]").length&&(this._inputElements[t].change(function(){i._enforceMaxVotes(t,n)}),this._enforceMaxVotes(t,n))},_enforceMaxVotes:function(t,e){var i=this._inputElements[t];i.filter(":checked").length==e?i.filter(":not(:checked)").disable():i.enable()},_handleVoteButton:function(t){var e=this._inputElements[t],i=this._polls[t].find(".jsButtonPollVote");e.filter(":checked").length?i.enable():i.disable()},_toggleButtons:function(t){var e=this._polls[t].children(".formSubmit");e.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide();var i=!0;this._polls[t].data("inVote")?(i=!1,e.find(".jsButtonPollVote").show(),this._canViewResult[t]&&e.find(".jsButtonPollShowResult").show()):(this._canVote[t]&&(i=!1,e.find(".jsButtonPollShowVote").show()),this._canViewParticipants[t]&&(i=!1,e.find(".jsButtonPollShowParticipants").show())),i&&e.hide()},_vote:function(t){var e=$(t.currentTarget).data("pollID");if(this._canVote[e]){var i=[];this._inputElements[e].each(function(t,e){var n=$(e);n.is(":checked")&&i.push(n.data("optionID"))}),i.length&&(this._proxy.setOption("data",{actionName:"vote",optionIDs:i,pollID:e}),this._proxy.sendRequest())}}}); })(this); +(function (window, undefined) { "use strict";WCF.Poll={},WCF.Poll.Management=Class.extend({_container:null,_count:0,_editorId:"",_maxOptions:0,init:function(t,e,i,n){if(this._count=0,this._maxOptions=i||-1,this._container=$("#"+t).children("ol:eq(0)"),!this._container.length)return void console.debug("[WCF.Poll.Management] Invalid container id given, aborting.");e=e||[],this._createOptionList(e),n?(this._editorId=n,WCF.System.Event.addListener("com.woltlab.wcf.redactor2","reset_"+n,this._reset.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","submit_"+n,this._submit.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.redactor2","validate_"+n,this._validate.bind(this))):this._container.closest("form").submit($.proxy(this._submit,this)),require(["WoltLabSuite/Core/Ui/Sortable/List"],function(e){new e({containerId:t,options:{toleranceElement:"> div"}})})},_createOptionList:function(t){for(var e=0,i=t.length;e').data("optionID",e);null===i?n.appendTo(this._container):n.insertAfter(i);var o=$('
    ').appendTo(n);$('').appendTo(o),$('').click($.proxy(this._addOption,this)).appendTo(o),$('').click($.proxy(this._removeOption,this)).appendTo(o);var s=$('').keydown($.proxy(this._keyDown,this)).appendTo(o);s.click(function(){document.activeElement!==this&&this.focus()}),null!==i&&s.focus(),WCF.DOMNodeInsertedHandler.execute(),++this._count===this._maxOptions&&this._container.find("span.jsAddOption").removeClass("pointer").addClass("disabled")},_keyDown:function(t){13===t.which&&($(t.currentTarget).parent().children(".jsAddOption").trigger("click"),t.preventDefault())},_addOption:function(t){if(this._count===this._maxOptions)return!1;var e=$(t.currentTarget).closest("li",this._container[0]);this._createOption(void 0,void 0,e)},_removeOption:function(t){$(t.currentTarget).closest("li",this._container[0]).remove(),this._count--,this._container.find("span.jsAddOption").addClass("pointer").removeClass("disabled"),0==this._container.children("li").length&&this._createOption()},_submit:function(t){var e=[];if(this._container.children("li").each(function(t,i){var n=$(i),o=$.trim(n.find("input").val());""!=o&&e.push(n.data("optionID")+"_"+o)}),"object"==typeof t.originalEvent&&t.originalEvent instanceof Event){if(e.length)for(var i=this._container.parents("form").find(".formSubmit"),n=0,o=e.length;n').val(e[n]).appendTo(i)}else{t.poll={pollOptions:e};this._container.parents(".messageTabMenuContent:eq(0)").find("input").each(function(e,i){i.name&&("checkbox"!==i.type||i.checked)&&(t.poll[i.name]=i.value)})}},_reset:function(){for(var t=this._container[0];t.childElementCount>1;)t.removeChild(t.children[1]);elBySel("input",t.children[0]).value="",this._container.parents(".messageTabMenuContent:eq(0)").find("input").each(function(t,e){e.name&&("checkbox"===e.type?e.checked=!1:"text"===e.type?e.value="":"number"===e.type&&(e.value=e.min))}),require(["WoltLabSuite/Core/Date/Picker"],function(t){t.clear("pollEndTime_"+this._editorId)}.bind(this))},_validate:function(t){if(""!==elById("pollQuestion_"+this._editorId).value.trim()){var e=0;if(elBySelAll('li input[type="text"]',this._container[0],function(t){""!==t.value.trim()&&e++}),0===e)t.api.throwError(this._container[0],WCF.Language.get("wcf.global.form.error.empty")),t.valid=!1;else{var i=elById("pollMaxVotes_"+this._editorId),n=~~i.value;n&&n>e&&(t.api.throwError(i,WCF.Language.get("wcf.poll.maxVotes.error.invalid")),t.valid=!1)}}}}),WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(t){var e=$(t);if(!e.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});var i=this;e.each(function(t,e){var n=$(e),o=n.data("pollID");void 0===i._polls[o]&&(i._cache[o]={result:"",vote:""},i._polls[o]=n,i._canViewParticipants[o]=!!n.data("canViewParticipants"),i._canViewResult[o]=!!n.data("canViewResult"),i._canVote[o]=!!n.data("canVote"),i._bindListeners(o),n.data("inVote")&&i._prepareVote(o),i._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,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canViewResult[i]&&this._polls[i].data("inVote")&&(this._cache[i].result?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].result),this._polls[i].data("inVote",!1),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getResult",pollID:i}),this._proxy.sendRequest()))},_showParticipants:function(t){var e=$(t.currentTarget).data("pollID");this._participants[e]||(this._participants[e]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[e].data("question"),{pollID:e})),this._participants[e].open()},_showVote:function(t,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canVote[i]&&(this._polls[i].data("inVote")||(this._cache[i].vote?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].vote),this._polls[i].data("inVote",!0),this._prepareVote(i),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getVote",pollID:i}),this._proxy.sendRequest())))},_success:function(t,e,i){if(t&&t.actionName){var n=t.pollID;switch(t.resultTemplate&&(this._cache[n].result=t.resultTemplate),t.voteTemplate&&(this._cache[n].vote=t.voteTemplate),t.actionName){case"getResult":this._showResult(null,n);break;case"getVote":this._showVote(null,n);break;case"vote":this._canViewResult[n]=!0,this._canVote[n]=!!t.canVote,this._polls[n].data("isPublic")&&(this._canViewParticipants[n]=!0),this._showResult(null,n)}}},_prepareVote:function(t){this._polls[t].find(".jsButtonPollVote").disable();var e=this._polls[t].find(".pollInnerContainer > .jsPollVote"),i=this;this._inputElements[t]=e.find("input").change(function(){i._handleVoteButton(t)}),this._handleVoteButton(t);var n=e.data("maxVotes");this._inputElements[t].filter("[type=checkbox]").length&&(this._inputElements[t].change(function(){i._enforceMaxVotes(t,n)}),this._enforceMaxVotes(t,n))},_enforceMaxVotes:function(t,e){var i=this._inputElements[t];i.filter(":checked").length==e?i.filter(":not(:checked)").disable():i.enable()},_handleVoteButton:function(t){var e=this._inputElements[t],i=this._polls[t].find(".jsButtonPollVote");e.filter(":checked").length?i.enable():i.disable()},_toggleButtons:function(t){var e=this._polls[t].children(".formSubmit");e.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide();var i=!0;this._polls[t].data("inVote")?(i=!1,e.find(".jsButtonPollVote").show(),this._canViewResult[t]&&e.find(".jsButtonPollShowResult").show()):(this._canVote[t]&&(i=!1,e.find(".jsButtonPollShowVote").show()),this._canViewParticipants[t]&&(i=!1,e.find(".jsButtonPollShowParticipants").show())),i&&e.hide()},_vote:function(t){var e=$(t.currentTarget).data("pollID");if(this._canVote[e]){var i=[];this._inputElements[e].each(function(t,e){var n=$(e);n.is(":checked")&&i.push(n.data("optionID"))}),i.length&&(this._proxy.setOption("data",{actionName:"vote",optionIDs:i,pollID:e}),this._proxy.sendRequest())}}}); })(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,s){if(!$.isFunction(i))return void console.debug("[WCF.Search.Message.KeywordList] The given callback is invalid, aborting.");this._callback=i,this._excludedSearchValues=[],s&&(this._excludedSearchValues=s),this._searchInput=$(e).keyup($.proxy(this._keyUp,this)).keydown($.proxy(function(e){13===e.which&&this._itemCount&&-1!==this._itemIndex&&e.preventDefault()},this));var t=WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()),r=t.find("li.dropdownDivider").last();this._divider=$('
    ").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,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},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);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1},this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],function(t){t.getTabMenu("profileContent").select("likes")})}.bind(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,e,i){var s=t.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],function(e,i){i.insertHtml(t.returnValues.template,elById(s),"append"),e.trigger()})}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:null,_tab:null,_userID:0,init:function(t,e){this._actionName="",this._active=!1,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(){this._buttons={beginEdit:$(".jsButtonEditProfile:eq(0)").click(this._beginEdit.bind(this))}},_beginEdit:function(t){t&&t.preventDefault(),this._active||(this._active=!0,this._actionName="beginEdit",this._buttons.beginEdit.parent().addClass("active"),$("#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("code.get"))}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._active=!1,this._buttons.beginEdit.parent().removeClass("active"),this._destroyEditor(),this._tab.html(this._cachedTemplate).children().css({height:"auto"})},_success:function(t,e,i){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!0!==e&&(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){if(t.which===$.ui.keyCode.ENTER)return i._save(),t.preventDefault(),!1})},_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(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e=this._element.val();if(!e)return this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"));if(null!==this._confirmElement){var i=this._confirmElement.val();if(""!=i&&e!=i)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){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){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=$("").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.lengththis._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_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"),this._username.val(""))},_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"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".contentHeaderNavigation .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"));$('').appendTo(i).click($.proxy(this._markAsConfirmed,this))}i.find("a:not(.notificationItemMarkAsConfirmed)").length||i.find(".details > p:eq(0)").html(function(t,e){return''+e+""})}.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,e,i){var s=$(".userNotificationItemList > .notificationItem[data-object-id="+t.returnValues.markAsRead+"]");s.data("isRead",!0),s.find(".newContentBadge").remove(),s.find(".notificationItemMarkAsConfirmed").remove(),s.removeClass("notificationUnconfirmed")}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(t){var e=$("#previewContainer");e.length||(e=$('

    '+WCF.Language.get("wcf.global.preview")+'

    ').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){if(this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null!==this._userID&&!this._userID)return void console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.");this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('
  • ").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('
  • '+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"
  • ").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))},_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,e,i){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()):($(""+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"").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=$('
  • "+WCF.Language.get("wcf.like.likes.noMoreEntries")+"
  • ").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._container.find("> li.likeListMore button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.more")),this._container.find("> li.likeListMore small").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.noMoreEntries")),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,e,i){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,a,n){s._userProfiles[e]=t.returnValues.template,s._insertContent(i,t.returnValues.template,!0)}),this._proxy.setOption("failure",function(t,a,n,o){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,e,i){this._containerList.each($.proxy(function(e,i){var s=$(i).find(this._followButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.following?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unfollow")).children(".icon").removeClass("fa-plus").addClass("fa-minus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unfollow"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.follow")).children(".icon").removeClass("fa-minus").addClass("fa-plus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.follow"))),s.data("following",t.returnValues.following),!1},this)),(new WCF.System.Notification).show()}}),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:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy(function(e,i){var s=$(i).find(this._ignoreButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.isIgnoredUser?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unignore")).children(".icon").removeClass("fa-ban").addClass("fa-circle-o"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unignore"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.ignore")).children(".icon").removeClass("fa-circle-o").addClass("fa-ban"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.ignore"))),s.data("ignored",t.returnValues.isIgnoredUser),!1},this)),(new WCF.System.Notification).show();var s=this;WCF.System.ObjectStore.invoke("WCF.User.ProfilePreview",function(t){t.purge(s._userID)})}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(t){this._super($("#avatarUpload > dd > div"),void 0,"wcf\\data\\user\\avatar\\UserAvatarAction"),this._userID=t||0,$("#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(t){return $("#avatarUpload > dt > img")},_success:function(t,e){if(e.returnValues.url){this._updateImage(e.returnValues.url),$("#avatarUpload > dd > .innerError").remove();new WCF.System.Notification(WCF.Language.get("wcf.user.avatar.upload.success")).show()}else e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.user.avatar.upload.error."+e.returnValues.errorType))},_updateImage:function(t){$("#avatarUpload > dt > img").remove();var e=$('').css({height:"auto","max-height":"96px","max-width":"96px",width:"auto"});$("#avatarUpload > dt").prepend(e),WCF.DOMNodeInsertedHandler.execute()},_getInnerErrorElement:function(){var t=$("#avatarUpload > dd > .innerError");return t.length||(t=$('
    '),$("#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=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('
    ').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)):this._dialog.find(".jsPagination").hide(),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,e,i){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=!0===t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(this._buttonSelector).each($.proxy(function(t,e){var i=$(e);i.addClass("pointer");var s=i.data("objectType"),a=i.data("objectID");void 0===this._buttons[s]&&(this._buttons[s]={}),this._buttons[s][a]=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,e,i){if("manageSubscription"===t.actionName){null===this._dialog?(this._dialog=$("
    "+t.returnValues.template+"
    ").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).data("objectType",t.returnValues.objectType).click($.proxy(this._save,this));var s=this._dialog.find("input[name=enableNotification]").disable();this._dialog.find("input[name=subscribe]").change(function(t){1==$(t.currentTarget).val()?s.enable():s.disable()});var a=this._dialog.find("input[name=subscribe]:checked");a.length&&1==a.val()&&s.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("objectType")][$(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("fa-bookmark-o").addClass("fa-bookmark"),e.data("isSubscribed",!0);else if(e.data("removeOnUnsubscribe")?e.parent().remove():(i.removeClass("fa-bookmark").addClass("fa-bookmark-o"),e.data("isSubscribed",!1)),this._reloadOnUnsubscribe)return void window.location.reload();WCF.System.Event.fireEvent("com.woltlab.wcf.objectWatch","updatedSubscription",t)}}); })(this); +(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"),$("#loginForm").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)),!0===this._options.staticDropdown)this._loadData=!1;else{var s=this._triggerElement.find("span.badge");s.length&&(this._badge=s)}},toggle:function(t){if(t instanceof Event&&t.preventDefault(),null===this._dropdown&&(this._dropdown=this._initDropdown()),this._dropdown.toggle()){if(!this._loadData&&null!==this._badge){(parseInt(this._badge.text())||0)&&!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 $('
  • '+WCF.Language.get("wcf.global.loading")+"
  • ").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||$('
  • '+this._options.noItems+"
  • ").appendTo(e),this._options.enableMarkAsRead){var i=this._dropdown.getItemList().children(".interactiveDropdownItemOutstanding");if(null===this._markAllAsReadLink&&i.length&&this._options.markAllAsReadConfirmMessage){(this._markAllAsReadLink=$('
  • ').appendTo(this._dropdown.getLinkList())).click(function(t){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");$('
    ').appendTo(i).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){if("A"!==t.target.tagName)return window.location=s,!1}):(i.addClass("interactiveDropdownItemShadow"),$('').appendTo(i)),i.data("linkReplaceAll")&&i.find("> .box48 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 s=this._dropdown.getItemList().children("li[data-object-id="+t.returnValues.markAsRead+"]");s.length&&(s.removeClass("interactiveDropdownItemOutstanding").data("isRead",!0),s.children(".interactiveDropdownItemMarkAsRead").remove())}else t.returnValues.markAllAsRead&&(this.resetItems(),this.updateBadge(0))},_markAsRead:function(t,e){},_markAllAsRead:function(){},updateBadge:function(t){t=parseInt(t)||0,t?(null===this._badge&&(this._badge=$('').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)),WCF.System.Event.fireEvent("com.woltlab.wcf.userMenu","updateBadge",{count:t,identifier:this._identifier})},resetItems:function(){null!==this._dropdown&&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)),require(["EventHandler"],function(t){t.add("com.woltlab.wcf.UserMenuMobile","more",function(t){"com.woltlab.wcf.notifications"===t.identifier&&this.toggle()}.bind(this))}.bind(this))},_initDropdown:function(){var t=this._super();return $('
  • ').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(t){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,$("#userNotifications").attr("data-count",t),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(["EventHandler","Ui/Dialog"],function(t,e){var i=elById("loginForm"),s=elBySel(".loginFormLogin",i);s&&!s.nextElementSibling&&i.classList.add("loginFormLoginOnly");for(var a=elBySel(".loginFormRegister",i),n=function(t){if(t instanceof Event&&(t.preventDefault(),t.stopPropagation()),i.style.removeProperty("display"),e.openStatic("loginForm",null,{title:WCF.Language.get("wcf.user.login")}),null!==s&&null!==a){var n=s.offsetTop,o=0;if(i.clientWidth>2*s.clientWidth)for(;n"+this._cache[t]+"
    ").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,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},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);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1},this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],function(t){t.getTabMenu("profileContent").select("likes")})}.bind(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,e,i){var s=t.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],function(e,i){i.insertHtml(t.returnValues.template,elById(s),"append"),e.trigger()})}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:null,_tab:null,_userID:0,init:function(t,e){this._actionName="",this._active=!1,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(){this._buttons={beginEdit:$(".jsButtonEditProfile:eq(0)").click(this._beginEdit.bind(this))}},_beginEdit:function(t){t&&t.preventDefault(),this._active||(this._active=!0,this._actionName="beginEdit",this._buttons.beginEdit.parent().addClass("active"),$("#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("code.get"))}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._active=!1,this._buttons.beginEdit.parent().removeClass("active"),this._destroyEditor(),this._tab.html(this._cachedTemplate).children().css({height:"auto"})},_success:function(t,e,i){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!0!==e&&(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){if(t.which===$.ui.keyCode.ENTER)return i._save(),t.preventDefault(),!1})},_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(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e=this._element.val();if(!e)return this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"));if(null!==this._confirmElement){var i=this._confirmElement.val();if(""!=i&&e!=i)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){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){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=$("").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.lengththis._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_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"),this._username.val(""))},_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"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".contentHeaderNavigation .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"));$('').appendTo(i).click($.proxy(this._markAsConfirmed,this))}i.find("a:not(.notificationItemMarkAsConfirmed)").length||i.find(".details > p:eq(0)").html(function(t,e){return''+e+""})}.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,e,i){var s=$(".userNotificationItemList > .notificationItem[data-object-id="+t.returnValues.markAsRead+"]");s.data("isRead",!0),s.find(".newContentBadge").remove(),s.find(".notificationItemMarkAsConfirmed").remove(),s.removeClass("notificationUnconfirmed")}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(t){var e=$("#previewContainer");e.length||(e=$('

    '+WCF.Language.get("wcf.global.preview")+'

    ').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){if(this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null!==this._userID&&!this._userID)return void console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.");this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('
  • ").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('
  • '+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"
  • ").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))},_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,e,i){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()):($(""+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"").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=$('
  • "+WCF.Language.get("wcf.like.likes.noMoreEntries")+"
  • ").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._container.find("> li.likeListMore button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.more")),this._container.find("> li.likeListMore small").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.noMoreEntries")),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,e,i){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,a,n){s._userProfiles[e]=t.returnValues.template,s._insertContent(i,t.returnValues.template,!0)}),this._proxy.setOption("failure",function(t,a,n,o){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,e,i){this._containerList.each($.proxy(function(e,i){var s=$(i).find(this._followButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.following?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unfollow")).children(".icon").removeClass("fa-plus").addClass("fa-minus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unfollow"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.follow")).children(".icon").removeClass("fa-minus").addClass("fa-plus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.follow"))),s.data("following",t.returnValues.following),!1},this)),(new WCF.System.Notification).show()}}),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:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy(function(e,i){var s=$(i).find(this._ignoreButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.isIgnoredUser?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unignore")).children(".icon").removeClass("fa-ban").addClass("fa-circle-o"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unignore"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.ignore")).children(".icon").removeClass("fa-circle-o").addClass("fa-ban"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.ignore"))),s.data("ignored",t.returnValues.isIgnoredUser),!1},this)),(new WCF.System.Notification).show();var s=this;WCF.System.ObjectStore.invoke("WCF.User.ProfilePreview",function(t){t.purge(s._userID)})}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(t){this._super($("#avatarUpload > dd > div"),void 0,"wcf\\data\\user\\avatar\\UserAvatarAction"),this._userID=t||0,$("#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(t){return $("#avatarUpload > dt > img")},_success:function(t,e){if(e.returnValues.url){this._updateImage(e.returnValues.url),$("#avatarUpload > dd > .innerError").remove();new WCF.System.Notification(WCF.Language.get("wcf.user.avatar.upload.success")).show()}else e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.user.avatar.upload.error."+e.returnValues.errorType))},_updateImage:function(t){$("#avatarUpload > dt > img").remove();var e=$('').css({height:"auto","max-height":"96px","max-width":"96px",width:"auto"});$("#avatarUpload > dt").prepend(e),WCF.DOMNodeInsertedHandler.execute()},_getInnerErrorElement:function(){var t=$("#avatarUpload > dd > .innerError");return t.length||(t=$('
    '),$("#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=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('
    ').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)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","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,e,i){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=!0===t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(this._buttonSelector).each($.proxy(function(t,e){var i=$(e);i.addClass("pointer");var s=i.data("objectType"),a=i.data("objectID");void 0===this._buttons[s]&&(this._buttons[s]={}),this._buttons[s][a]=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,e,i){if("manageSubscription"===t.actionName){null===this._dialog?(this._dialog=$("
    "+t.returnValues.template+"
    ").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).data("objectType",t.returnValues.objectType).click($.proxy(this._save,this));var s=this._dialog.find("input[name=enableNotification]").disable();this._dialog.find("input[name=subscribe]").change(function(t){1==$(t.currentTarget).val()?s.enable():s.disable()});var a=this._dialog.find("input[name=subscribe]:checked");a.length&&1==a.val()&&s.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("objectType")][$(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("fa-bookmark-o").addClass("fa-bookmark"),e.data("isSubscribed",!0);else if(e.data("removeOnUnsubscribe")?e.parent().remove():(i.removeClass("fa-bookmark").addClass("fa-bookmark-o"),e.data("isSubscribed",!1)),this._reloadOnUnsubscribe)return void window.location.reload();WCF.System.Event.fireEvent("com.woltlab.wcf.objectWatch","updatedSubscription",t)}}); })(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,i){return this._buttonSelector?this._className?(this._dialog=null,this._queueID=e,this._redirectURL=t,this._languageItem=i,this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),$(this._buttonSelector).click($.proxy(this._click,this)),void $("#moderationAssignUser").click($.proxy(this._clickAssignedUser,this))):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(),i="";this._confirmationTemplate[t]&&(i=this._confirmationTemplate[t]),WCF.System.Confirmation.show(WCF.Language.get(this._languageItem.replace(/{actionName}/,t)),$.proxy(function(e,i,a){if("confirm"===e){var o={actionName:t,className:this._className,objectIDs:[this._queueID]};this._confirmationTemplate[t]&&(o.parameters={},$(a).find("input, textarea").each(function(e,t){var i=$(t),a=i.val();"input"===i.getTagName()&&"checkbox"===i.attr("type")&&(i.is(":checked")||(a=null)),null!==a&&(o.parameters[i.attr("name")]=a)})),this._proxy.setOption("data",o),this._proxy.sendRequest(),$(this._buttonSelector).disable()}},this),{},i)},_clickAssignedUser:function(){this._proxy.setOption("data",{actionName:"getAssignUserForm",className:"wcf\\data\\moderation\\queue\\ModerationQueueAction",objectIDs:[this._queueID]}),this._proxy.sendRequest()},_success:function(e,t,i){switch(e.actionName){case"getAssignUserForm":null===this._dialog?(this._dialog=$("
    ").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 a=$("#moderationAssignedUserContainer > dd > span").empty();e.returnValues.userID?$(''+WCF.String.escapeHTML(e.returnValues.username)+"").appendTo(a):a.append(e.returnValues.username),a.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 o=this;new WCF.System.Notification(WCF.Language.get("wcf.global.success")).show(function(){window.location=o._redirectURL})}},_failure:function(e,t,i,a){if(e.returnValues&&e.returnValues.fieldName&&"assignedUsername"==e.returnValues.fieldName){this._dialog.find("small.innerError").remove();var o="";switch(e.returnValues.errorType){case"empty":o=WCF.Language.get("wcf.global.form.error.empty");break;case"notAffected":o=WCF.Language.get("wcf.moderation.assignedUser.error.notAffected");break;default:o=WCF.Language.get("wcf.user.username.error."+e.returnValues.errorType,{username:this._dialog.find("#assignedUsername").val()})}return $(''+o+"").insertAfter(this._dialog.find("#assignedUsername")),!1}return!0},_assignUser:function(){var e=this._dialog.find("input[name=assignedUserID]:checked").val(),t="";if(-1==e&&(t=$.trim(this._dialog.find("#assignedUsername").val())),-1==e&&0==t.length)return this._dialog.find("small.innerError").remove(),void $(''+WCF.Language.get("wcf.global.form.error.empty")+"").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}}),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(".moderationQueueEntry:eq(0)").data("queueID")]}),this._proxy.sendRequest()},_success:function(e,t,i){$(".moderationList .new").each(function(t,i){var a=$(i);WCF.inArray(a.data("queueID"),e.objectIDs)&&(a.removeClass("new"),a.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(e,t,i){var a=WCF.Dropdown.Interactive.Handler.getDropdown("outstandingModeration");a&&(a.getLinkList().find(".interactiveDropdownItemMarkAllAsRead").remove(),a.getItemList().find(".interactiveDropdownItemMarkAsRead").remove()),$("#outstandingModeration .badgeUpdate").remove();var o=$(".moderationList");o.find(".new").removeClass("new"),o.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,i){var a=$(i),o=a.wcfIdentify();e._buttons[o]||(e._buttons[o]=a,a.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,t,i){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=$('
    ').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();if(""==$.trim(e))return this._dialog.find(".section > dl").addClass("formError"),void(this._dialog.find(".innerError").length||this._dialog.find(".jsReportMessage").after($(''+WCF.Language.get("wcf.global.form.error.empty")+"")));this._proxy.setOption("data",{actionName:"report",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{message:e,objectID:this._objectID,objectType:this._objectType}}),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=$('
    ').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"));var n=this._dialog.children("textarea")[0],i=function(){n.selectionStart=0,n.selectionEnd=n.value.length};n.addEventListener("mouseup",i),window.setTimeout(i,10)}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:{},_newIDInputs:{},_containerSelector:"",_buttonSelector:"",init:function(){},_initInputs:function(){},_initElements:function(){},_click:function(){},_sendRequest:function(){},_success:function(){}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit(function(){$(this).find(".formSubmit input[type=submit]").disable()});$(window).on("unload",function(){e.find(".formSubmit input[type=submit]").enable()})}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_handleResponse:function(){},_failure:function(){}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:{},_options:{},init:function(){},_handleResponse:function(){},_getParameters:function(){},_dialogSetup:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",_click:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:{},init:function(){},_click:function(){},_disable:function(){},_updateLabel:function(){},_submit:function(){}}),WCF.Message.SmileyCategories=Class.extend({_cache:{},_proxy:{},_wysiwygSelector:"",init:function(){},_click:function(){},_success:function(){}}),WCF.Message.Smilies=Class.extend({_editorId:"",init:function(){},_smileyClick:function(){}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:"",_messageEditorIDPrefix:"",init:function(){},_click:function(){},_initDropdownMenu:function(){},_callbackDropdownInit:function(){},_getClassName:function(){}}),WCF.Message.Submit={_buttons:{},registerButton:function(){},execute:function(){}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:{},_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:{},_quoteManager:{},init:function(){},_initContainers:function(){},_mouseDown:function(){},_getNodeText:function(){},_mouseUp:function(){},_normalize:function(){},_getBoundingRectangle:function(){},_initCopyQuote:function(){},_getSelectedText:function(){},_saveFullQuote:function(){},_saveQuote:function(){},_saveAndInsertQuote:function(){},_success:function(){},updateFullQuoteObjectIDs:function(){}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:{},_editorId:"",_editorIdAlternative:"",_form:{},_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:{},_removeOnSubmit:{},_supportPaste:!1,init:function(){},setAlternativeEditor:function(){},clearAlternativeEditor:function(){},register:function(){},updateCount:function(){},insertQuotes:function(){},_toggleShowQuotes:function(){},_click:function(){},renderDialog:function(){},_changeButtons:function(){},_change:function(){},_insertSelected:function(){},_insertQuote:function(){},_removeSelected:function(){},_submit:function(){},getQuotesMarkedForRemoval:function(){},markQuotesForRemoval:function(){},removeMarkedQuotes:function(){},countQuotes:function(){},_success:function(){},supportPaste:function(){}}),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),n=t.prop("href"),i=t.data("linkTitle")?t.data("linkTitle"):n,a=n.hashCode();if(void 0===this._cache[a]){var o=!1;null===this._dialog?(this._dialog=$("
    ").hide().appendTo(document.body),o=!0):this._dialog.empty();var s=$('

    ").appendTo(this._dialog);$('').attr("value",n).appendTo(s);var s=$('

    ").appendTo(this._dialog);$('').attr("value","[url='"+n+"']"+i+"[/url]").appendTo(s);var s=$('

    ").appendTo(this._dialog);$('').attr("value",''+WCF.String.escapeHTML(i)+"").appendTo(s),this._cache[a]=this._dialog.html(),o?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")}else this._dialog.html(this._cache[a]).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({init:function(){require(["WoltLabSuite/Core/Ui/Message/Share"],function(e){e.init()})}}),WCF.Message.UserMention=Class.extend({init:function(){throw new Error("Support for mentions in Redactor are now enabled by adding the attribute 'data-support-mention=\"true\"' to the textarea element.")}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e=this.element.find("> nav"),t=e.find("> ul > li:not(.jsFlexibleMenuDropdown)"),n=this.element.find("> div, > fieldset");if(t.length!=n.length)return void console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.");var i=this.element.data("preselect");n.each(function(e,n){if(null!==elBySel(".innerError",n))return i=$(t[e]).data("name"),!1}),this._tabs=[],this._tabsByName={};for(var a=0;a').appendTo(n.find(".codeBoxHeader")).click($.proxy(this._click,this))},this))},_click:function(e){var t="";$(e.currentTarget).parents("div").next("ol").children("li").each(function(e,n){t&&(t+="\n"),t+=$(n).text().replace(/\n+$/,"").replace(/\u200B/g,"").replace(/\xa0/," ")}),null===this._dialog?(this._dialog=$('
    ').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"));var n=this._dialog.children("textarea")[0];"rtl"===document.documentElement.dir&&(n.dir="ltr",n.style.setProperty("text-align","left",""));var i=function(){n.selectionStart=0,n.selectionEnd=n.value.length};n.addEventListener("mouseup",i),window.setTimeout(i,10)}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:{},_newIDInputs:{},_containerSelector:"",_buttonSelector:"",init:function(){},_initInputs:function(){},_initElements:function(){},_click:function(){},_sendRequest:function(){},_success:function(){}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit(function(){$(this).find(".formSubmit input[type=submit]").disable()});$(window).on("unload",function(){e.find(".formSubmit input[type=submit]").enable()})}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_handleResponse:function(){},_failure:function(){}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:{},_options:{},init:function(){},_handleResponse:function(){},_getParameters:function(){},_dialogSetup:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",_click:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:{},init:function(){},_click:function(){},_disable:function(){},_updateLabel:function(){},_submit:function(){}}),WCF.Message.SmileyCategories=Class.extend({_cache:{},_proxy:{},_wysiwygSelector:"",init:function(){},_click:function(){},_success:function(){}}),WCF.Message.Smilies=Class.extend({_editorId:"",init:function(){},_smileyClick:function(){}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:"",_messageEditorIDPrefix:"",init:function(){},_click:function(){},_initDropdownMenu:function(){},_callbackDropdownInit:function(){},_getClassName:function(){}}),WCF.Message.Submit={_buttons:{},registerButton:function(){},execute:function(){}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:{},_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:{},_quoteManager:{},init:function(){},_initContainers:function(){},_mouseDown:function(){},_getNodeText:function(){},_mouseUp:function(){},_normalize:function(){},_getBoundingRectangle:function(){},_initCopyQuote:function(){},_getSelectedText:function(){},_saveFullQuote:function(){},_saveQuote:function(){},_saveAndInsertQuote:function(){},_success:function(){},updateFullQuoteObjectIDs:function(){}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:{},_editorId:"",_editorIdAlternative:"",_form:{},_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:{},_removeOnSubmit:{},_supportPaste:!1,init:function(){},setAlternativeEditor:function(){},clearAlternativeEditor:function(){},register:function(){},updateCount:function(){},insertQuotes:function(){},_toggleShowQuotes:function(){},_click:function(){},renderDialog:function(){},_changeButtons:function(){},_change:function(){},_insertSelected:function(){},_insertQuote:function(){},_removeSelected:function(){},_submit:function(){},getQuotesMarkedForRemoval:function(){},markQuotesForRemoval:function(){},removeMarkedQuotes:function(){},countQuotes:function(){},_success:function(){},supportPaste:function(){}}),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),n=t.prop("href"),i=t.data("linkTitle")?t.data("linkTitle"):n,a=n.hashCode();if(void 0===this._cache[a]){var o=!1;null===this._dialog?(this._dialog=$("
    ").hide().appendTo(document.body),o=!0):this._dialog.empty();var s=$('

    ").appendTo(this._dialog);$('').attr("value",n).appendTo(s);var s=$('

    ").appendTo(this._dialog);$('').attr("value","[url='"+n+"']"+i+"[/url]").appendTo(s);var s=$('

    ").appendTo(this._dialog);$('').attr("value",''+WCF.String.escapeHTML(i)+"").appendTo(s),this._cache[a]=this._dialog.html(),o?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")}else this._dialog.html(this._cache[a]).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({init:function(){require(["WoltLabSuite/Core/Ui/Message/Share"],function(e){e.init()})}}),WCF.Message.UserMention=Class.extend({init:function(){throw new Error("Support for mentions in Redactor are now enabled by adding the attribute 'data-support-mention=\"true\"' to the textarea element.")}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e=this.element.find("> nav"),t=e.find("> ul > li:not(.jsFlexibleMenuDropdown)"),n=this.element.find("> div, > fieldset");if(t.length!=n.length)return void console.debug("[wcf.messageTabMenu] Amount of tabs does not equal amount of tab containers, aborting.");var i=this.element.data("preselect");n.each(function(e,n){if(null!==elBySel(".innerError",n))return i=$(t[e]).data("name"),!1}),this._tabs=[],this._tabsByName={};for(var a=0;a ul > li[data-name] > a",l);null!==c&&$(c).trigger("mousedown")}continue}if(!0===n)continue}s.tab.removeClass("active"),s.container.removeClass("active")}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==a&&this._trigger("show",{},{activeTab:a}),$(window).trigger("resize")},showTab:function(e,t){if($.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0===this._tabs[e])return void console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'");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); // WCF.Poll.js -(function (window, undefined) { "use strict";WCF.Poll={},WCF.Poll.Management=Class.extend({_container:{},_count:0,_editorId:"",_maxOptions:0,init:function(){},_createOptionList:function(){},_createOption:function(){},_keyDown:function(){},_addOption:function(){},_removeOption:function(){},_submit:function(){},_reset:function(){},_validate:function(){}}),WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(t){var e=$(t);if(!e.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});var o=this;e.each(function(t,e){var i=$(e),n=i.data("pollID");void 0===o._polls[n]&&(o._cache[n]={result:"",vote:""},o._polls[n]=i,o._canViewParticipants[n]=!!i.data("canViewParticipants"),o._canViewResult[n]=!!i.data("canViewResult"),o._canVote[n]=!!i.data("canVote"),o._bindListeners(n),i.data("inVote")&&o._prepareVote(n),o._toggleButtons(n))})},_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,e){var o=null===t?e:$(t.currentTarget).data("pollID");this._canViewResult[o]&&this._polls[o].data("inVote")&&(this._cache[o].result?(this._polls[o].find(".pollInnerContainer").html(this._cache[o].result),this._polls[o].data("inVote",!1),this._toggleButtons(o)):(this._proxy.setOption("data",{actionName:"getResult",pollID:o}),this._proxy.sendRequest()))},_showParticipants:function(t){var e=$(t.currentTarget).data("pollID");this._participants[e]||(this._participants[e]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[e].data("question"),{pollID:e})),this._participants[e].open()},_showVote:function(t,e){var o=null===t?e:$(t.currentTarget).data("pollID");this._canVote[o]&&(this._polls[o].data("inVote")||(this._cache[o].vote?(this._polls[o].find(".pollInnerContainer").html(this._cache[o].vote),this._polls[o].data("inVote",!0),this._prepareVote(o),this._toggleButtons(o)):(this._proxy.setOption("data",{actionName:"getVote",pollID:o}),this._proxy.sendRequest())))},_success:function(t,e,o){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,this._showResult(null,i)}}},_prepareVote:function(t){this._polls[t].find(".jsButtonPollVote").disable();var e=this._polls[t].find(".pollInnerContainer > .jsPollVote"),o=this;this._inputElements[t]=e.find("input").change(function(){o._handleVoteButton(t)}),this._handleVoteButton(t);var i=e.data("maxVotes");this._inputElements[t].filter("[type=checkbox]").length&&(this._inputElements[t].change(function(){o._enforceMaxVotes(t,i)}),this._enforceMaxVotes(t,i))},_enforceMaxVotes:function(t,e){var o=this._inputElements[t];o.filter(":checked").length==e?o.filter(":not(:checked)").disable():o.enable()},_handleVoteButton:function(t){var e=this._inputElements[t],o=this._polls[t].find(".jsButtonPollVote");e.filter(":checked").length?o.enable():o.disable()},_toggleButtons:function(t){var e=this._polls[t].children(".formSubmit");e.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide();var o=!0;this._polls[t].data("inVote")?(o=!1,e.find(".jsButtonPollVote").show(),this._canViewResult[t]&&e.find(".jsButtonPollShowResult").show()):(this._canVote[t]&&(o=!1,e.find(".jsButtonPollShowVote").show()),this._canViewParticipants[t]&&(o=!1,e.find(".jsButtonPollShowParticipants").show())),o&&e.hide()},_vote:function(t){var e=$(t.currentTarget).data("pollID");if(this._canVote[e]){var o=[];this._inputElements[e].each(function(t,e){var i=$(e);i.is(":checked")&&o.push(i.data("optionID"))}),o.length&&(this._proxy.setOption("data",{actionName:"vote",optionIDs:o,pollID:e}),this._proxy.sendRequest())}}}); })(this); +(function (window, undefined) { "use strict";WCF.Poll={},WCF.Poll.Management=Class.extend({_container:{},_count:0,_editorId:"",_maxOptions:0,init:function(){},_createOptionList:function(){},_createOption:function(){},_keyDown:function(){},_addOption:function(){},_removeOption:function(){},_submit:function(){},_reset:function(){},_validate:function(){}}),WCF.Poll.Manager=Class.extend({_cache:{},_canViewParticipants:{},_canViewResult:{},_canVote:{},_inputElements:{},_participants:{},_polls:{},_proxy:null,init:function(t){var e=$(t);if(!e.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});var i=this;e.each(function(t,e){var o=$(e),n=o.data("pollID");void 0===i._polls[n]&&(i._cache[n]={result:"",vote:""},i._polls[n]=o,i._canViewParticipants[n]=!!o.data("canViewParticipants"),i._canViewResult[n]=!!o.data("canViewResult"),i._canVote[n]=!!o.data("canVote"),i._bindListeners(n),o.data("inVote")&&i._prepareVote(n),i._toggleButtons(n))})},_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,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canViewResult[i]&&this._polls[i].data("inVote")&&(this._cache[i].result?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].result),this._polls[i].data("inVote",!1),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getResult",pollID:i}),this._proxy.sendRequest()))},_showParticipants:function(t){var e=$(t.currentTarget).data("pollID");this._participants[e]||(this._participants[e]=new WCF.User.List("wcf\\data\\poll\\PollAction",this._polls[e].data("question"),{pollID:e})),this._participants[e].open()},_showVote:function(t,e){var i=null===t?e:$(t.currentTarget).data("pollID");this._canVote[i]&&(this._polls[i].data("inVote")||(this._cache[i].vote?(this._polls[i].find(".pollInnerContainer").html(this._cache[i].vote),this._polls[i].data("inVote",!0),this._prepareVote(i),this._toggleButtons(i)):(this._proxy.setOption("data",{actionName:"getVote",pollID:i}),this._proxy.sendRequest())))},_success:function(t,e,i){if(t&&t.actionName){var o=t.pollID;switch(t.resultTemplate&&(this._cache[o].result=t.resultTemplate),t.voteTemplate&&(this._cache[o].vote=t.voteTemplate),t.actionName){case"getResult":this._showResult(null,o);break;case"getVote":this._showVote(null,o);break;case"vote":this._canViewResult[o]=!0,this._canVote[o]=!!t.canVote,this._polls[o].data("isPublic")&&(this._canViewParticipants[o]=!0),this._showResult(null,o)}}},_prepareVote:function(t){this._polls[t].find(".jsButtonPollVote").disable();var e=this._polls[t].find(".pollInnerContainer > .jsPollVote"),i=this;this._inputElements[t]=e.find("input").change(function(){i._handleVoteButton(t)}),this._handleVoteButton(t);var o=e.data("maxVotes");this._inputElements[t].filter("[type=checkbox]").length&&(this._inputElements[t].change(function(){i._enforceMaxVotes(t,o)}),this._enforceMaxVotes(t,o))},_enforceMaxVotes:function(t,e){var i=this._inputElements[t];i.filter(":checked").length==e?i.filter(":not(:checked)").disable():i.enable()},_handleVoteButton:function(t){var e=this._inputElements[t],i=this._polls[t].find(".jsButtonPollVote");e.filter(":checked").length?i.enable():i.disable()},_toggleButtons:function(t){var e=this._polls[t].children(".formSubmit");e.find(".jsButtonPollShowParticipants, .jsButtonPollShowResult, .jsButtonPollShowVote, .jsButtonPollVote").hide();var i=!0;this._polls[t].data("inVote")?(i=!1,e.find(".jsButtonPollVote").show(),this._canViewResult[t]&&e.find(".jsButtonPollShowResult").show()):(this._canVote[t]&&(i=!1,e.find(".jsButtonPollShowVote").show()),this._canViewParticipants[t]&&(i=!1,e.find(".jsButtonPollShowParticipants").show())),i&&e.hide()},_vote:function(t){var e=$(t.currentTarget).data("pollID");if(this._canVote[e]){var i=[];this._inputElements[e].each(function(t,e){var o=$(e);o.is(":checked")&&i.push(o.data("optionID"))}),i.length&&(this._proxy.setOption("data",{actionName:"vote",optionIDs:i,pollID:e}),this._proxy.sendRequest())}}}); })(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,s){if(!$.isFunction(i))return void console.debug("[WCF.Search.Message.KeywordList] The given callback is invalid, aborting.");this._callback=i,this._excludedSearchValues=[],s&&(this._excludedSearchValues=s),this._searchInput=$(e).keyup($.proxy(this._keyUp,this)).keydown($.proxy(function(e){13===e.which&&this._itemCount&&-1!==this._itemIndex&&e.preventDefault()},this));var t=WCF.Dropdown.getDropdownMenu(this._searchInput.parents(".dropdown").wcfIdentify()),r=t.find("li.dropdownDivider").last();this._divider=$('
    ").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[e]),this._dialog.wcfDialog("open"))},_success:function(e,t,i){this._cache[e.returnValues.userID]=e.returnValues.template,this._show(e.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(e){this._profileContent=$("#profileContent"),this._userID=e;var t=this._profileContent.data("active"),i=!1;this._profileContent.find("div.tabMenuContent").each($.proxy(function(e,s){var n=$(s).wcfIdentify();t===n?this._hasContent[n]=!0:(this._hasContent[n]=!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(e,t){var i=$(t);if(i.hasClass("ui-state-active"))return e&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1},this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(e){e.preventDefault(),require(["Ui/TabMenu"],function(e){e.getTabMenu("profileContent").select("likes")})}.bind(this))},_loadContent:function(e,t){var i=$(t.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(e,t,i){var s=e.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],function(t,i){i.insertHtml(e.returnValues.template,elById(s),"append"),t.trigger()})}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:{},_tab:{},_userID:0,init:function(){},_initButtons:function(){},_beginEdit:function(){},_save:function(){},_restore:function(){},_success:function(){},_prepareEdit:function(){},_destroyEditor:function(){}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(e,t,i){this._element=e,this._element.blur($.proxy(this._blur,this)),this._confirmElement=t||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(e){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(e){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 i=this._confirmElement.val();if(""!=i&&t!=i)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(e){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(e)},_success:function(e,t,i){e.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+e.returnValues.error))},_showError:function(e,t){e.parent().parent().addClass("formError").removeClass("formSuccess");var i=e.parent().find("small.innerError");i.length||(i=$("").addClass("innerError").insertAfter(e)),i.text(t)},_showSuccess:function(e){e.parent().parent().addClass("formSuccess").removeClass("formError"),e.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(e){this._options=$.extend(!0,{minlength:3,maxlength:25},e)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var e=this._element.val();return!(e.lengththis._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_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"),this._username.val(""))},_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"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:{},init:function(){},_convertList:function(){},_markAsConfirmed:function(){},_success:function(){}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(e,t){if(this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===t,this._userID=e,null!==this._userID&&!this._userID)return void console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.");this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('
  • ").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('
  • '+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"
  • ").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))},_click:function(){this._loadButton.enable();var e={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?e.userID=this._userID:this._filteredByFollowedUsers&&(e.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:e}),this._proxy.sendRequest()},_switchContext:function(e){e.preventDefault(),$(e.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(e,t,i){e.returnValues.template?($(e.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",e.returnValues.lastEventTime),this._container.data("lastEventID",e.returnValues.lastEventID),this._loadButton.enable()):($(""+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"").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(e){if(this._container=$("#likeList"),this._userID=e,!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 t=$('
  • "+WCF.Language.get("wcf.like.likes.noMoreEntries")+"
  • ").appendTo(this._container);this._loadButton=t.children("button").click($.proxy(this._click,this)),this._noMoreEntries=t.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(e){var t=$(e.currentTarget);this._likeType!=t.data("likeType")&&(this._likeType=t.data("likeType"),$("#likeType .button").removeClass("active"),t.addClass("active"),this._reload())},_clickLikeValue:function(e){var t=$(e.currentTarget);this._likeValue!=t.data("likeValue")&&(this._likeValue=t.data("likeValue"),$("#likeValue .button").removeClass("active"),t.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._container.find("> li.likeListMore button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.more")),this._container.find("> li.likeListMore small").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.noMoreEntries")),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 e={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:e}),this._proxy.sendRequest()},_success:function(e,t,i){e.returnValues.template?($(e.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastLikeTime",e.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 e=$("#"+this._activeElementID),t=e.data("userID");if(this._userProfiles[t])this._insertContent(this._activeElementID,this._userProfiles[t],!0);else{this._proxy.setOption("data",{actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[t]});var i=this._activeElementID,s=this;this._proxy.setOption("success",function(e,n,a){s._userProfiles[t]=e.returnValues.template,s._insertContent(i,e.returnValues.template,!0)}),this._proxy.setOption("failure",function(e,n,a,o){return s._userProfiles[t]=e.message,s._insertContent(i,e.message,!0),!1}),this._proxy.sendRequest()}},purge:function(e){delete this._userProfiles[e],this._data={}}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:{},_followButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Action.Ignore=Class.extend({_containerList:{},_ignoreButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(){},_initFile:function(){},_success:function(){},_updateImage:function(){},_getInnerErrorElement:function(){},_getParameters:function(){},_name:"",_buttonSelector:{},_fileListSelector:{},_fileUpload:{},_className:"",_iframe:{},_internalFileID:0,_options:{},_uploadMatrix:{},_supportsAJAXUpload:!0,_overlay:{},_createButton:function(){},_insertButton:function(){},_removeButton:function(){},_upload:function(){},_createUploadMatrix:function(){},_error:function(){},_progress:function(){},_showOverlay:function(){},_evaluateResponse:function(){},_getFilename:function(){}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(e,t,i){this._additionalParameters=i||{},this._cache={},this._className=e,this._dialog=null,this._dialogTitle=t,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(e,t){if(t&&t.activePage&&(this._pageNo=t.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=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('
    ').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)):this._dialog.find(".jsPagination").hide(),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(e,t,i){e.returnValues.pageCount&&(this._pageCount=e.returnValues.pageCount),this._cache[this._pageNo]=e.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:"",_buttons:{},_dialog:{},_notification:{},_reloadOnUnsubscribe:!1,init:function(){},_click:function(){},_success:function(){},_save:function(){},_updateSubscriptionStatus:function(){}}); })(this); +(function (window, undefined) { "use strict";WCF.User.Login=Class.extend({_loginSubmitButton:null,_password:null,_passwordContainer:null,_useCookies:null,_useCookiesContainer:null,init:function(e){this._loginSubmitButton=$("#loginSubmitButton"),this._password=$("#password"),this._passwordContainer=this._password.parents("dl"),this._useCookies=$("#useCookies"),this._useCookiesContainer=this._useCookies.parents("dl"),$("#loginForm").find("input[name=action]").change($.proxy(this._change,this)),e&&WCF.User.QuickLogin.init()},_change:function(e){"register"===$(e.currentTarget).val()?this._setState(!1,WCF.Language.get("wcf.user.button.register")):this._setState(!0,WCF.Language.get("wcf.user.button.login"))},_setState:function(e,t){e?(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(t)}}),WCF.User.Panel={},WCF.User.Panel.Abstract=Class.extend({_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},init:function(){},toggle:function(){},_dblClick:function(){},_initDropdown:function(){},_load:function(){},_success:function(){},_markAsRead:function(){},_markAllAsRead:function(){},updateBadge:function(){},resetItems:function(){}}),WCF.User.Panel.Notification=WCF.User.Panel.Abstract.extend({_favico:{},init:function(){},_initDropdown:function(){},_load:function(){},_markAsRead:function(){},_markAllAsRead:function(){},resetItems:function(){},updateBadge:function(){},updateUserNotificationCount:function(){},_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},toggle:function(){},_dblClick:function(){},_success:function(){}}),WCF.User.Panel.UserMenu=WCF.User.Panel.Abstract.extend({init:function(){},_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},toggle:function(){},_dblClick:function(){},_initDropdown:function(){},_load:function(){},_success:function(){},_markAsRead:function(){},_markAllAsRead:function(){},updateBadge:function(){},resetItems:function(){}}),WCF.User.QuickLogin={init:function(){require(["EventHandler","Ui/Dialog"],function(e,t){var i=elById("loginForm"),s=elBySel(".loginFormLogin",i);s&&!s.nextElementSibling&&i.classList.add("loginFormLoginOnly");for(var n=elBySel(".loginFormRegister",i),a=function(e){if(e instanceof Event&&(e.preventDefault(),e.stopPropagation()),i.style.removeProperty("display"),t.openStatic("loginForm",null,{title:WCF.Language.get("wcf.user.login")}),null!==s&&null!==n){var a=s.offsetTop,o=0;if(i.clientWidth>2*s.clientWidth)for(;a"+this._cache[e]+"
    ").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[e]),this._dialog.wcfDialog("open"))},_success:function(e,t,i){this._cache[e.returnValues.userID]=e.returnValues.template,this._show(e.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(e){this._profileContent=$("#profileContent"),this._userID=e;var t=this._profileContent.data("active"),i=!1;this._profileContent.find("div.tabMenuContent").each($.proxy(function(e,s){var n=$(s).wcfIdentify();t===n?this._hasContent[n]=!0:(this._hasContent[n]=!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(e,t){var i=$(t);if(i.hasClass("ui-state-active"))return e&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1},this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(e){e.preventDefault(),require(["Ui/TabMenu"],function(e){e.getTabMenu("profileContent").select("likes")})}.bind(this))},_loadContent:function(e,t){var i=$(t.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(e,t,i){var s=e.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],function(t,i){i.insertHtml(e.returnValues.template,elById(s),"append"),t.trigger()})}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:{},_tab:{},_userID:0,init:function(){},_initButtons:function(){},_beginEdit:function(){},_save:function(){},_restore:function(){},_success:function(){},_prepareEdit:function(){},_destroyEditor:function(){}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(e,t,i){this._element=e,this._element.blur($.proxy(this._blur,this)),this._confirmElement=t||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(e){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(e){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 i=this._confirmElement.val();if(""!=i&&t!=i)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(e){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(e)},_success:function(e,t,i){e.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+e.returnValues.error))},_showError:function(e,t){e.parent().parent().addClass("formError").removeClass("formSuccess");var i=e.parent().find("small.innerError");i.length||(i=$("").addClass("innerError").insertAfter(e)),i.text(t)},_showSuccess:function(e){e.parent().parent().addClass("formSuccess").removeClass("formError"),e.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(e){this._options=$.extend(!0,{minlength:3,maxlength:25},e)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var e=this._element.val();return!(e.lengththis._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_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"),this._username.val(""))},_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"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:{},init:function(){},_convertList:function(){},_markAsConfirmed:function(){},_success:function(){}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(e,t){if(this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===t,this._userID=e,null!==this._userID&&!this._userID)return void console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.");this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('
  • ").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('
  • '+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"
  • ").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))},_click:function(){this._loadButton.enable();var e={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?e.userID=this._userID:this._filteredByFollowedUsers&&(e.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:e}),this._proxy.sendRequest()},_switchContext:function(e){e.preventDefault(),$(e.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(e,t,i){e.returnValues.template?($(e.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",e.returnValues.lastEventTime),this._container.data("lastEventID",e.returnValues.lastEventID),this._loadButton.enable()):($(""+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"").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(e){if(this._container=$("#likeList"),this._userID=e,!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 t=$('
  • "+WCF.Language.get("wcf.like.likes.noMoreEntries")+"
  • ").appendTo(this._container);this._loadButton=t.children("button").click($.proxy(this._click,this)),this._noMoreEntries=t.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(e){var t=$(e.currentTarget);this._likeType!=t.data("likeType")&&(this._likeType=t.data("likeType"),$("#likeType .button").removeClass("active"),t.addClass("active"),this._reload())},_clickLikeValue:function(e){var t=$(e.currentTarget);this._likeValue!=t.data("likeValue")&&(this._likeValue=t.data("likeValue"),$("#likeValue .button").removeClass("active"),t.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._container.find("> li.likeListMore button").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.more")),this._container.find("> li.likeListMore small").text(WCF.Language.get("wcf.like."+(-1==this._likeValue?"dis":"")+"likes.noMoreEntries")),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 e={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:e}),this._proxy.sendRequest()},_success:function(e,t,i){e.returnValues.template?($(e.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastLikeTime",e.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 e=$("#"+this._activeElementID),t=e.data("userID");if(this._userProfiles[t])this._insertContent(this._activeElementID,this._userProfiles[t],!0);else{this._proxy.setOption("data",{actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[t]});var i=this._activeElementID,s=this;this._proxy.setOption("success",function(e,n,a){s._userProfiles[t]=e.returnValues.template,s._insertContent(i,e.returnValues.template,!0)}),this._proxy.setOption("failure",function(e,n,a,o){return s._userProfiles[t]=e.message,s._insertContent(i,e.message,!0),!1}),this._proxy.sendRequest()}},purge:function(e){delete this._userProfiles[e],this._data={}}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:{},_followButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Action.Ignore=Class.extend({_containerList:{},_ignoreButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(){},_initFile:function(){},_success:function(){},_updateImage:function(){},_getInnerErrorElement:function(){},_getParameters:function(){},_name:"",_buttonSelector:{},_fileListSelector:{},_fileUpload:{},_className:"",_iframe:{},_internalFileID:0,_options:{},_uploadMatrix:{},_supportsAJAXUpload:!0,_overlay:{},_createButton:function(){},_insertButton:function(){},_removeButton:function(){},_upload:function(){},_createUploadMatrix:function(){},_error:function(){},_progress:function(){},_showOverlay:function(){},_evaluateResponse:function(){},_getFilename:function(){}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(e,t,i){this._additionalParameters=i||{},this._cache={},this._className=e,this._dialog=null,this._dialogTitle=t,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(e,t){if(t&&t.activePage&&(this._pageNo=t.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=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('
    ').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)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","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(e,t,i){e.returnValues.pageCount&&(this._pageCount=e.returnValues.pageCount),this._cache[this._pageNo]=e.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:"",_buttons:{},_dialog:{},_notification:{},_reloadOnUnsubscribe:!1,init:function(){},_click:function(){},_success:function(){},_save:function(){},_updateSubscriptionStatus:function(){}}); })(this); // WCF.Moderation.js (function (window, undefined) { "use strict";WCF.Moderation={},WCF.Moderation.Management=Class.extend({_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",init:function(){},_click:function(){},_clickAssignedUser:function(){},_success:function(){},_failure:function(){},_assignUser:function(){}}),WCF.Moderation.Queue={},WCF.Moderation.Queue.MarkAsRead=Class.extend({_proxy:{},init:function(){},_dblclick:function(){},_success:function(){}}),WCF.Moderation.Queue.MarkAllAsRead=Class.extend({_proxy:{},init:function(){},_click:function(){},_success:function(){}}),WCF.Moderation.Activation={},WCF.Moderation.Activation.Management=WCF.Moderation.Management.extend({init:function(){},_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",_click:function(){},_clickAssignedUser:function(){},_success:function(){},_failure:function(){},_assignUser:function(){}}),WCF.Moderation.Report={},WCF.Moderation.Report.Content=Class.extend({_buttons:{},_buttonSelector:"",_dialog:null,_notification:null,_objectID:0,_objectType:"",_proxy:null,init:function(t,e){this._objectType=t,this._buttonSelector=e,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 t=this;$(this._buttonSelector).each(function(e,i){var n=$(i),o=n.wcfIdentify();t._buttons[o]||(t._buttons[o]=n,n.click($.proxy(t._click,t)))})},_click:function(t){t.preventDefault(),this._objectID=$(t.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(t,e,i){t.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()):t.returnValues.template&&(this._showDialog(t.returnValues.template),t.returnValues.alreadyReported||this._dialog.find(".jsSubmitReport").click($.proxy(this._submit,this)))},_showDialog:function(t){null===this._dialog&&(this._dialog=$("#moderationReport"),this._dialog.length||(this._dialog=$('
    ').hide().appendTo(document.body))),this._dialog.html(t).wcfDialog({title:WCF.Language.get("wcf.moderation.report.reportContent")}).wcfDialog("render")},_submit:function(){var t=this._dialog.find(".jsReportMessage").val();if(""==$.trim(t))return this._dialog.find(".section > dl").addClass("formError"),void(this._dialog.find(".innerError").length||this._dialog.find(".jsReportMessage").after($(''+WCF.Language.get("wcf.global.form.error.empty")+"")));this._proxy.setOption("data",{actionName:"report",className:"wcf\\data\\moderation\\queue\\ModerationQueueReportAction",parameters:{message:t,objectID:this._objectID,objectType:this._objectType}}),this._proxy.sendRequest()}}),WCF.Moderation.Report.Management=WCF.Moderation.Management.extend({init:function(){},_buttonSelector:"",_className:"",_confirmationTemplate:{},_dialog:{},_languageItem:"",_proxy:{},_queueID:0,_redirectURL:"",_click:function(){},_clickAssignedUser:function(){},_success:function(){},_failure:function(){},_assignUser:function(){}}),WCF.User.Panel.Moderation=WCF.User.Panel.Abstract.extend({init:function(){},_initDropdown:function(){},_load:function(){},_markAsRead:function(){},_markAllAsRead:function(){},resetItems:function(){},_badge:{},_dropdown:{},_identifier:"",_loadData:!0,_markAllAsReadLink:{},_options:{},_proxy:{},_triggerElement:{},toggle:function(){},_dblClick:function(){},_success:function(){},updateBadge:function(){}}); })(this); diff --git a/wcfsetup/install/files/js/WoltLabSuite.Core.min.js b/wcfsetup/install/files/js/WoltLabSuite.Core.min.js index 910702bbf9..2c36734dd4 100644 --- a/wcfsetup/install/files/js/WoltLabSuite.Core.min.js +++ b/wcfsetup/install/files/js/WoltLabSuite.Core.min.js @@ -1,11 +1,11 @@ -var requirejs,require,define;!function(global,setTimeout){function commentReplace(e,t){return t||""}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 i;for(i=0;i-1&&(!e[i]||!t(e[i],i,e));i-=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 i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,n){return t&&eachProp(t,function(t,a){!i&&hasProp(e,a)||(!n||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[a]=t:(e[a]||(e[a]={}),mixin(e[a],t,i,n)))}),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,i,n){var a=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return a.requireType=e,a.requireModules=n,i&&(a.originalError=i),a}function newContext(e){function t(e){var t,i;for(t=0;t0&&(e.splice(t-1,2),t-=2)}}function i(e,i,n){var a,r,o,s,l,c,d,u,h,p,f,m,g=i&&i.split("/"),v=E.map,_=v&&v["*"];if(e&&(e=e.split("/"),d=e.length-1,E.nodeIdCompat&&jsSuffixRegExp.test(e[d])&&(e[d]=e[d].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&g&&(m=g.slice(0,g.length-1),e=m.concat(e)),t(e),e=e.join("/")),n&&v&&(g||_)){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(r=getOwn(v,g.slice(0,l).join("/")),r&&(r=getOwn(r,c))){u=r,h=s;break e}!p&&_&&getOwn(_,c)&&(p=getOwn(_,c),f=s)}!u&&p&&(u=p,h=f),u&&(o.splice(0,h,u),e=o.join("/"))}return a=getOwn(E.pkgs,e),a?a:e}function n(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===w.contextName)return t.parentNode.removeChild(t),!0})}function a(e){var t=getOwn(E.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),w.require.undef(e),w.makeRequire(null,{skipMap:!0})([e]),!0}function r(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function o(e,t,n,a){var o,s,l,c,d=null,u=t?t.name:null,h=e,p=!0,f="";return e||(p=!1,e="_@r"+(N+=1)),c=r(e),d=c[0],e=c[1],d&&(d=i(d,u,a),s=getOwn(I,d)),e&&(d?f=n?e:s&&s.normalize?s.normalize(e,function(e){return i(e,u,a)}):e.indexOf("!")===-1?i(e,u,a):e:(f=i(e,u,a),c=r(f),d=c[0],f=c[1],n=!0,o=w.nameToUrl(f))),l=!d||s||n?"":"_unnormalized"+(M+=1),{prefix:d,name:f,parentMap:t,unnormalized:!!l,url:o,originalName:h,isDefine:p,id:(d?d+"!"+f:f)+l}}function s(e){var t=e.id,i=getOwn(L,t);return i||(i=L[t]=new w.Module(e)),i}function l(e,t,i){var n=e.id,a=getOwn(L,n);!hasProp(I,n)||a&&!a.defineEmitComplete?(a=s(e),a.error&&"error"===t?i(a.error):a.on(t,i)):"defined"===t&&i(I[n])}function c(e,t){var i=e.requireModules,n=!1;t?t(e):(each(i,function(t){var i=getOwn(L,t);i&&(i.error=e,i.events.error&&(n=!0,i.emit("error",e)))}),n||req.onError(e))}function d(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(w.defQueueMap[t]=!0),D.push(e)}),globalDefQueue=[])}function u(e){delete L[e],delete S[e]}function h(e,t,i){var n=e.map.id;e.error?e.emit("error",e.error):(t[n]=!0,each(e.depMaps,function(n,a){var r=n.id,o=getOwn(L,r);!o||e.depMatched[a]||i[r]||(getOwn(t,r)?(e.defineDep(a,I[r]),e.check()):h(o,t,i))}),i[n]=!0)}function p(){var e,t,i=1e3*E.waitSeconds,r=i&&w.startTime+i<(new Date).getTime(),o=[],s=[],l=!1,d=!0;if(!_){if(_=!0,eachProp(S,function(e){var i=e.map,c=i.id;if(e.enabled&&(i.isDefine||s.push(e),!e.error))if(!e.inited&&r)a(c)?(t=!0,l=!0):(o.push(c),n(c));else if(!e.inited&&e.fetched&&i.isDefine&&(l=!0,!i.prefix))return d=!1}),r&&o.length)return e=makeError("timeout","Load timeout for modules: "+o,null,o),e.contextName=w.contextName,c(e);d&&each(s,function(e){h(e,{},{})}),r&&!t||!l||!isBrowser&&!isWebWorker||C||(C=setTimeout(function(){C=0,p()},50)),_=!1}}function f(e){hasProp(I,e[0])||s(o(e[0],null,!0)).init(e[1],e[2])}function m(e,t,i,n){e.detachEvent&&!isOpera?n&&e.detachEvent(n,t):e.removeEventListener(i,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(d();D.length;){if(e=D.shift(),null===e[0])return c(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));f(e)}w.defQueueMap={}}var _,b,w,y,C,E={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},L={},S={},x={},D=[],I={},T={},k={},N=1,M=1;return y={require:function(e){return e.require?e.require:e.require=w.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?I[e.map.id]=e.exports:e.exports=I[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(E.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},b=function(e){this.events=getOwn(x,e.id)||{},this.map=e,this.shim=getOwn(E.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},b.prototype={init:function(e,t,i,n){n=n||{},this.inited||(this.factory=t,i?this.on("error",i):this.events.error&&(i=bind(this,function(e){this.emit("error",e)})),this.depMaps=e&&e.slice(0),this.errback=i,this.inited=!0,this.ignore=n.ignore,n.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;T[e]||(T[e]=!0,w.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,i=this.map.id,n=this.depExports,a=this.exports,r=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(r)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{a=w.execCb(i,r,n,a)}catch(t){e=t}else a=w.execCb(i,r,n,a);if(this.map.isDefine&&void 0===a&&(t=this.module,t?a=t.exports:this.usingExports&&(a=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 a=r;if(this.exports=a,this.map.isDefine&&!this.ignore&&(I[i]=a,req.onResourceLoad)){var o=[];each(this.depMaps,function(e){o.push(e.normalizedMap||e)}),req.onResourceLoad(w,this.map,o)}u(i),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(w.defQueueMap,i)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,n=o(e.prefix);this.depMaps.push(n),l(n,"defined",bind(this,function(n){var a,r,d,h=getOwn(k,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?(n.normalize&&(p=n.normalize(p,function(e){return i(e,f,!0)})||""),r=o(e.prefix+"!"+p,this.map.parentMap,!0),l(r,"defined",bind(this,function(e){this.map.normalizedMap=r,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),d=getOwn(L,r.id),void(d&&(this.depMaps.push(r),this.events.error&&d.on("error",bind(this,function(e){this.emit("error",e)})),d.enable()))):h?(this.map.url=w.nameToUrl(h),void this.load()):(a=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),a.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")&&u(e.map.id)}),c(e)}),a.fromText=bind(this,function(i,n){var r=e.name,l=o(r),d=useInteractive;n&&(i=n),d&&(useInteractive=!1),s(l),hasProp(E.config,t)&&(E.config[r]=E.config[t]);try{req.exec(i)}catch(e){return c(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}d&&(useInteractive=!0),this.depMaps.push(l),w.completeLoad(r),m([r],a)}),void n.load(e.name,m,a,E))})),w.enable(n,this),this.pluginMaps[n.id]=n},enable:function(){S[this.map.id]=this,this.enabled=!0,this.enabling=!0,each(this.depMaps,bind(this,function(e,t){var i,n,a;if("string"==typeof e){if(e=o(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,a=getOwn(y,e.id))return void(this.depExports[t]=a(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)}))}i=e.id,n=L[i],hasProp(y,i)||!n||n.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 i=this.events[e];i||(i=this.events[e]=[]),i.push(t)},emit:function(e,t){each(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},w={config:E,contextName:e,registry:L,defined:I,urlFetched:T,defQueue:D,defQueueMap:{},Module:b,makeModuleMap:o,nextTick:req.nextTick,onError:c,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,i){return(i.indexOf("?")===-1?"?":"&")+t}}var i=E.shim,n={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){n[t]?(E[t]||(E[t]={}),mixin(E[t],e,!0,!0)):E[t]=e}),e.bundles&&eachProp(e.bundles,function(e,t){each(e,function(e){e!==t&&(k[e]=t)})}),e.shim&&(eachProp(e.shim,function(e,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=w.makeShimExports(e)),i[t]=e}),E.shim=i),e.packages&&each(e.packages,function(e){var t,i;e="string"==typeof e?{name:e}:e,i=e.name,t=e.location,t&&(E.paths[i]=e.location),E.pkgs[i]=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,a){function r(i,n,l){var d,u,h;return a.enableBuildCallback&&n&&isFunction(n)&&(n.__requireJsBuild=!0),"string"==typeof i?isFunction(n)?c(makeError("requireargs","Invalid require call"),l):t&&hasProp(y,i)?y[i](L[t.id]):req.get?req.get(w,i,t,r):(u=o(i,t,!1,!0),d=u.id,hasProp(I,d)?I[d]:c(makeError("notloaded",'Module name "'+d+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(v(),w.nextTick(function(){v(),h=s(o(null,t)),h.skipMap=a.skipMap,h.init(i,n,l,{enabled:!0}),p()}),r)}return a=a||{},mixin(r,{isBrowser:isBrowser,toUrl:function(e){var n,a=e.lastIndexOf("."),r=e.split("/")[0],o="."===r||".."===r;return a!==-1&&(!o||a>1)&&(n=e.substring(a,e.length),e=e.substring(0,a)),w.nameToUrl(i(e,t&&t.id,!0),n,!0)},defined:function(e){return hasProp(I,o(e,t,!1,!0).id)},specified:function(e){return e=o(e,t,!1,!0).id,hasProp(I,e)||hasProp(L,e)}}),t||(r.undef=function(e){d();var i=o(e,t,!0),a=getOwn(L,e);a.undefed=!0,n(e),delete I[e],delete T[i.url],delete x[e],eachReverse(D,function(t,i){t[0]===e&&D.splice(i,1)}),delete w.defQueueMap[e],a&&(a.events.defined&&(x[e]=a.events),u(e))}),r},enable:function(e){var t=getOwn(L,e.id);t&&s(e).enable()},completeLoad:function(e){var t,i,n,r=getOwn(E.shim,e)||{},o=r.exports;for(d();D.length;){if(i=D.shift(),null===i[0]){if(i[0]=e,t)break;t=!0}else i[0]===e&&(t=!0);f(i)}if(w.defQueueMap={},n=getOwn(L,e),!t&&!hasProp(I,e)&&n&&!n.inited){if(!(!E.enforceDefine||o&&getGlobal(o)))return a(e)?void 0:c(makeError("nodefine","No define call for "+e,null,[e]));f([e,r.deps||[],r.exportsFn])}p()},nameToUrl:function(e,t,i){var n,a,r,o,s,l,c,d=getOwn(E.pkgs,e);if(d&&(e=d),c=getOwn(k,e))return w.nameToUrl(c,t,i);if(req.jsExtRegExp.test(e))s=e+(t||"");else{for(n=E.paths,a=e.split("/"),r=a.length;r>0;r-=1)if(o=a.slice(0,r).join("/"),l=getOwn(n,o)){isArray(l)&&(l=l[0]),a.splice(0,r,l);break}s=a.join("/"),s+=t||(/^data\:|^blob\:|\?/.test(s)||i?"":".js"),s=("/"===s.charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":E.baseUrl)+s}return E.urlArgs&&!/^blob\:/.test(s)?s+E.urlArgs(e,s):s},load:function(e,t){req.load(w,e,t)},execCb:function(e,t,i,n){return t.apply(n,i)},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);if(!a(t.id)){var i=[];return eachProp(L,function(e,n){0!==n.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id)return i.push(n),!0})}),c(makeError("scripterror",'Script error for "'+t.id+(i.length?'", needed by: '+i.join(", "):'"'),e,[t.id]))}}},w.require=w.makeRequire(),w}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.3",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,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,i,n){var a,r,o=defContextName;return isArray(e)||"string"==typeof e||(r=e,isArray(t)?(e=t,t=i,i=n):e=[]),r&&r.context&&(o=r.context),a=getOwn(contexts,o),a||(a=contexts[o]=req.s.newContext(o)),r&&a.configure(r),a.require(e,t,i)},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,i){var n=e.xhtml?document.createElementNS("http://www.w3.org/1999/xhtml","html:script"):document.createElement("script");return n.type=e.scriptType||"text/javascript",n.charset="utf-8",n.async=!0,n},req.load=function(e,t,i){var n,a=e&&e.config||{};if(isBrowser)return n=req.createNode(a,t,i),n.setAttribute("data-requirecontext",e.contextName),n.setAttribute("data-requiremodule",t),!n.attachEvent||n.attachEvent.toString&&n.attachEvent.toString().indexOf("[native code")<0||isOpera?(n.addEventListener("load",e.onScriptLoad,!1),n.addEventListener("error",e.onScriptError,!1)):(useInteractive=!0,n.attachEvent("onreadystatechange",e.onScriptLoad)),n.src=i,a.onNodeCreated&&a.onNodeCreated(n,a,t,i),currentlyAddingScript=n,baseElement?head.insertBefore(n,baseElement):head.appendChild(n),currentlyAddingScript=null,n;if(isWebWorker)try{setTimeout(function(){},0),importScripts(i),e.completeLoad(t)}catch(n){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+i,n,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||mainScript.indexOf("!")!==-1||(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}),define=function(e,t,i){var n,a;"string"!=typeof e&&(i=t,t=e,e=null),isArray(t)||(i=t,t=null),!t&&isFunction(i)&&(t=[],i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,i){t.push(i)}),t=(1===i.length?["require"]:["require","exports","module"]).concat(t))),useInteractive&&(n=currentlyAddingScript||getInteractiveScript(),n&&(e||(e=n.getAttribute("data-requiremodule")),a=contexts[n.getAttribute("data-requirecontext")])),a?(a.defQueue.push([e,t,i]),a.defQueueMap[e]=!0):globalDefQueue.push([e,t,i])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this,"undefined"==typeof setTimeout?void 0:setTimeout),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:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],function(){return window.jQuery}),define("require.config",function(){}),function(e,t){e.elAttr=function(e,t,i){return void 0===i?e.getAttribute(t)||"":void e.setAttribute(t,i)},e.elAttrBool=function(e,t){var i=elAttr(e,t);return"1"===i||"true"===i},e.elByClass=function(e,i){return(i||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,i){return(i||t).querySelector(e)},e.elBySelAll=function(e,i,n){var a=(i||t).querySelectorAll(e);return"function"==typeof n&&Array.prototype.forEach.call(a,n),a},e.elByTag=function(e,i){return(i||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elData=function(e,t,i){return t="data-"+t,void 0===i?e.getAttribute(t)||"":void e.setAttribute(t,i)},e.elDataBool=function(e,t){var i=elData(e,t);return"1"===i||"true"===i},e.elHide=function(e){e.style.setProperty("display","none","")},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var i=0,n=e.length;i0||navigator.msMaxTouchPoints>0?"touchstart":"click";Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),function(){function t(){e.history.state&&e.history.state.name&&"initial"!==e.history.state.name?(e.history.replaceState({name:"skip",depth:++i},"",""),e.history.back(),setTimeout(t,1)):e.history.replaceState({name:"initial"},"","")}var i=0;t(),e.addEventListener("popstate",function(t){t.state&&t.state.name&&"skip"===t.state.name&&e.history.go(t.state.depth)})}()}(window,document),define("wcf.globalHelper",function(){}),define("WoltLabSuite/Core/Core",[],function(){"use strict";var e=function(e){return"object"==typeof e&&(Array.isArray(e)||i.isPlainObject(e))?t(e):e},t=function(t){if(!t)return null;if(Array.isArray(t))return t.slice();var i={};for(var n in t)objOwns(t,n)&&"undefined"!=typeof t[n]&&(i[n]=e(t[n]));return i},i={clone:function(t){return e(t)},convertLegacyUrl:function(e){return e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){var i=t.split(/([A-Z][a-z0-9]+)/);t="";for(var n=0,a=i.length;nd&&x.push("'"+this.terminals_[E]+"'");T=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(s+1)+": Unexpected "+(_==u?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(T,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:g,expected:x})}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(y[0]){case 1:i.push(_),n.push(p.yytext),a.push(p.yylloc),i.push(y[1]),_=null,b?(_=b,b=null):(l=p.yyleng,o=p.yytext,s=p.yylineno,g=p.yylloc,c>0&&c--);break;case 2:if(L=this.productions_[y[1]][1],I.$=n[n.length-L],I._$={first_line:a[a.length-(L||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(L||1)].first_column,last_column:a[a.length-1].last_column},v&&(I._$.range=[a[a.length-(L||1)].range[0],a[a.length-1].range[1]]),C=this.performAction.apply(I,[o,l,s,f.yy,y[1],n,a].concat(h)),"undefined"!=typeof C)return C;L&&(i=i.slice(0,-1*L*2),n=n.slice(0,-1*L),a=a.slice(0,-1*L)),i.push(this.productions_[y[1]][0]),n.push(I.$),a.push(I._$),S=r[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0}},_=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,i=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 n=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),i.length-1&&(this.yylineno-=i.length-1);var a=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:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[a[0],a[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 i,n,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),n=e[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in a)this[r]=a[r];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,i,n;this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),r=0;rt[0].length)){if(t=i,n=r,this.options.backtrack_lexer){if(e=this.test_match(i,a[r]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,a[n]),e!==!1&&e):""===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,i,n){switch(i){case 0:break;case 1:return t.yytext=t.yytext.substring(9,t.yytext.length-10),9;case 2:return 52;case 3:return 52;case 4:return 40;case 5:return 41;case 6:return 46;case 7:return 44;case 8:return 45;case 9:return 47;case 10:return 49;case 11:return 50;case 12:return 32;case 13:return 33;case 14:return this.begin("command"),30;case 15:return this.begin("command"),31;case 16:return this.begin("command"),13;case 17:return this.begin("command"),37;case 18:return this.begin("command"),37;case 19:return 35;case 20:return 18;case 21:return 26;case 22:return 27;case 23:return this.begin("command"),19;case 24:return this.begin("command"),21;case 25:return 22;case 26:return this.begin("command"),23;case 27:return 39;case 28:return 25;case 29:return this.begin("command"),28;case 30:return this.popState(),15;case 31:return 12;case 32:return 5;case 33:return 11}},rules:[/^(?:\{\*[\s\S]*?\*\})/,/^(?:\{literal\}[\s\S]*?\{\/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))/,/^(?:\})/,/^(?:\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],inclusive:!0},INITIAL:{rules:[0,1,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33],inclusive:!0}}};return e}();return v.lexer=_,v}),define("WoltLabSuite/Core/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("WoltLabSuite/Core/StringUtil",["Language","./NumberUtil"],function(e,t){"use strict";return{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,"&").replace(/"/g,""").replace(//g,">")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(i,n){void 0===e&&(e=require("Language")),i=String(t.round(i,n||-2));var a=i.split(".");return i=this.addThousandsSeparator(a[0]),a.length>1&&(i+=e.get("wcf.global.decimalPoint")+a[1]),i=i.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(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},shortUnit:function(e){var i="";return e>=1e6?(e/=1e6,e=e>10?Math.floor(e):t.round(e,-1),i="M"):e>=1e3&&(e/=1e3,e=e>10?Math.floor(e):t.round(e,-1),i="k"),this.formatNumeric(e)+i}}}),define("WoltLabSuite/Core/Template",["./Template.grammar","./StringUtil","Language"],function(e,t,i){"use strict";function n(){this.yy={}}function a(n){void 0===i&&(i=require("Language")),void 0===t&&(t=require("StringUtil"));try{n=e.parse(n),n="var tmp = {};\nfor (var key in v) tmp[key] = v[key];\nv = tmp;\nv.__wcf = window.WCF; v.__window = window;\nreturn "+n,this.fetch=new Function("StringUtil","Language","v",n).bind(void 0,t,i)}catch(e){throw console.debug(e.message),e}}return n.prototype=e,e.Parser=n,e=new n,Object.defineProperty(a,"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")}}),a.prototype={fetch:function(e){throw new Error("This Template is not initialized.")}},a}),define("WoltLabSuite/Core/Language",["Dictionary","./Template"],function(e,t){"use strict";var i=new e,n={addObject:function(t){i.merge(e.fromObject(t))},add:function(e,t){i.set(e,t)},get:function(e,n){n||(n={});var a=i.get(e);if(void 0===a)return e;if("string"==typeof a){try{i.set(e,new t(a))}catch(n){i.set(e,new t("{literal}"+a.replace(/\{\/literal\}/g,"{/literal}{ldelim}/literal}{literal}")+"{/literal}"))}a=i.get(e)}return a instanceof t&&(a=a.fetch(n)),a}};return n}),define("WoltLabSuite/Core/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,i){e.forEach(t)});else{var i=this._dictionary.get(e);void 0!==i&&i.forEach(t)}}},t}),define("WoltLabSuite/Core/Dom/Change/Listener",["CallbackList"],function(e){"use strict";var t=new e,i=!1;return{add:t.add.bind(t),remove:t.remove.bind(t),trigger:function(){if(!i)try{i=!0,t.forEach(null,function(e){e()})}finally{i=!1}}}}),define("WoltLabSuite/Core/Environment",[],function(){"use strict";var e="other",t="none",i="desktop",n=!1;return{setup:function(){if("object"==typeof window.chrome)e="chrome";else for(var a=window.getComputedStyle(document.documentElement),r=0,o=a.length;r0||window.DocumentTouch&&document instanceof DocumentTouch},browser:function(){return e},editor:function(){return t},platform:function(){return i},touch:function(){return n}}}),define("WoltLabSuite/Core/Dom/Util",["Environment","StringUtil"],function(e,t){"use strict";function i(e,t,i){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");for(var n,a=i+"Sibling";null!==e&&e!==t;){if(null!==e[i+"ElementSibling"])return!1;if(e[a])for(n=e[a];n;){if(""!==n.textContent.trim())return!1;n=n[a]}e=e.parentNode}return!0}var n=0,a={createFragmentFromHtml:function(e){var t=elCreate("div");this.setInnerHtml(t,e);for(var i=document.createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);return i},getUniqueId:function(){var e;do e="wcf"+n++;while(null!==elById(e));return e},identify:function(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");var t=elAttr(e,"id");return t||(t=this.getUniqueId(),elAttr(e,"id",t)),t},outerHeight:function(e,t){t=t||window.getComputedStyle(e);var i=e.offsetHeight;return i+=~~t.marginTop+~~t.marginBottom},outerWidth:function(e,t){t=t||window.getComputedStyle(e);var i=e.offsetWidth;return i+=~~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:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend:function(e,t){0===t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[0])},insertAfter:function(e,t){null!==t.nextElementSibling?t.parentNode.insertBefore(e,t.nextElementSibling):t.parentNode.appendChild(e)},setStyles:function(e,t){var i=!1;for(var n in t)t.hasOwnProperty(n)&&(/ !important$/.test(t[n])?(i=!0,t[n]=t[n].replace(/ !important$/,"")):i=!1,"important"!==e.style.getPropertyPriority(n)||i||e.style.removeProperty(n),e.style.setProperty(n,t[n],i?"important":""))},styleAsInt:function(e,t){var i=e.getPropertyValue(t);return null===i?0:parseInt(i)},setInnerHtml:function(e,t){e.innerHTML=t;for(var i,n,a=elBySelAll("script",e),r=0,o=a.length;ra&&(s=!1)):"right"===e?n.left+i.widtha)&&(s=!1)),{align:e,left:r,right:o,result:s}},_tryAlignmentVertical:function(e,t,i,n,a,r){var o="auto",s="auto",l=!0;if("top"===e){var c=document.body.clientHeight;o=c-n.top+r,c-(o+t.height)<(window.scrollY||window.pageYOffset)&&(l=!1)}else s=n.top+i.height+r,s+t.height-(window.scrollY||window.pageYOffset)>a&&(l=!1);return{align:e,bottom:o,top:s,result:l}}}}),define("WoltLabSuite/Core/Ui/CloseOverlay",["CallbackList"],function(e){"use strict";var t=new e,i={setup:function(){document.body.addEventListener(WCF_CLICK_EVENT,this.execute.bind(this))},add:t.add.bind(t),remove:t.remove.bind(t),execute:function(){t.forEach(null,function(e){e()})}};return i.setup(),i}),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["CallbackList","Core","Dictionary","Ui/Alignment","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/CloseOverlay"],function(e,t,i,n,a,r,o,s){"use strict";var l=null,c=new e,d=!1,u=new i,h=new i,p=null;return{setup:function(){d||(d=!0,p=elCreate("div"),p.className="dropdownMenuContainer",document.body.appendChild(p),l=elByClass("dropdownToggle"),this.initAll(),s.add("WoltLabSuite/Core/Ui/Dropdown/Simple",this.closeAll.bind(this)),a.add("WoltLabSuite/Core/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;e0&&0===a.scrollTop?e.preventDefault():e.wheelDelta<0&&a.scrollTop+l===c&&e.preventDefault()})}elData(e,"target",s),i&&setTimeout(function(){t.triggerEvent(e,WCF_CLICK_EVENT)},10)},initFragment:function(e,t){this.setup();var i=o.identify(e);u.has(i)||(u.set(i,e),p.appendChild(t),h.set(i,t))},registerCallback:function(e,t){c.add(e,t)},getDropdown:function(e){return u.get(e)},getDropdownMenu:function(e){return h.get(e)},toggleDropdown:function(e,t){this._toggle(null,e,t)},setAlignment:function(e,t,i){var a,r=elBySel(".dropdownToggle",e);null!==r&&r.parentNode.classList.contains("inputAddonTextarea")&&(a=r),n.set(t,i||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:a||null,horizontal:"right"===elData(t,"dropdown-alignment-horizontal")?"right":"left",vertical:"top"===elData(t,"dropdown-alignment-vertical")?"top":"bottom"})},setAlignmentById:function(e){var t=u.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");var i=h.get(e);this.setAlignment(t,i)},isOpen:function(e){var t=h.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open:function(e){var t=h.get(e);void 0===t||t.classList.contains("dropdownOpen")||this.toggleDropdown(e)},close:function(e){var t=u.get(e); -void 0!==t&&(t.classList.remove("dropdownOpen"),h.get(e).classList.remove("dropdownOpen"))},closeAll:function(){u.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(!u.has(e))return!1;try{this.close(e),elRemove(h.get(e))}catch(e){}return h.delete(e),u.delete(e),!0},_onDialogScroll:function(e){for(var t=e.currentTarget,i=elBySelAll(".dropdown.dropdownOpen",t),n=0,a=i.length;n=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(){u.forEach(function(e,t){e.classList.contains("dropdownOpen")&&(elDataBool(e,"is-overlay-dropdown-button")?this.setAlignment(e,h.get(t)):this.close(t))}.bind(this))},_notifyCallbacks:function(e,t){c.forEach(e,function(i){i(e,t)})},_toggle:function(e,t,i){null!==e&&(e.preventDefault(),e.stopPropagation(),t=elData(e.currentTarget,"target"));var n=u.get(t),a=!1;if(void 0!==n){if(e){var o=e.currentTarget,s=o.parentNode;s!==n&&(s.classList.add("dropdown"),s.id=n.id,n.classList.remove("dropdown"),n.id="",n=s,u.set(t,s))}if(elDataBool(n,"dropdown-prevent-toggle")&&n.classList.contains("dropdownOpen")&&(a=!0),null===elData(n,"is-overlay-dropdown-button")){var l=r.parentByClass(n,"dialogContent");elData(n,"is-overlay-dropdown-button",null!==l),null!==l&&l.addEventListener("scroll",this._onDialogScroll.bind(this))}}return u.forEach(function(e,n){var r=h.get(n);if(e.classList.contains("dropdownOpen"))a===!1&&(e.classList.remove("dropdownOpen"),r.classList.remove("dropdownOpen"),this._notifyCallbacks(n,"close"));else if(n===t&&r.childElementCount>0){if(e.classList.add("dropdownOpen"),r.classList.add("dropdownOpen"),r.childElementCount&&elDataBool(r.children[0],"scroll-to-active")){var o=r.children[0];o.removeAttribute("data-scroll-to-active");for(var s=null,l=0,c=o.childElementCount;ld.clientHeight?"add":"remove"]("forceScrollbar"),this._notifyCallbacks(n,"open"),this.setAlignment(e,r,i)}}.bind(this)),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===e}}}),define("WoltLabSuite/Core/Ui/Dialog",["enquire","Ajax","Core","Dictionary","Environment","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/Screen","Ui/SimpleDropdown"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";var p=null,f=null,m=new n,g=new o,v=!1,_=null,b=elByClass("jsStaticDialog");return{setup:function(){void 0===t&&(t=require("Ajax")),f=elCreate("div"),f.classList.add("dialogOverlay"),elAttr(f,"aria-hidden","true"),f.addEventListener(WCF_CLICK_EVENT,this._closeOnBackdrop.bind(this)),f.addEventListener("wheel",function(e){e.target===f&&e.preventDefault()}),elById("content").appendChild(f),_=function(e){return 27!==e.keyCode||"INPUT"===e.target.nodeName||"TEXTAREA"===e.target.nodeName||(this.close(p),!1)}.bind(this),u.on("screen-xs",{match:function(){v=!0},unmatch:function(){v=!1},setup:function(){v=!0}}),this._initStaticDialogs(),s.add("Ui/Dialog",this._initStaticDialogs.bind(this)),u.setDialogContainer(f),"ios"===a.platform()&&window.addEventListener("resize",function(){m.forEach(function(e){elAttrBool(e.dialog,"aria-hidden")||this.rebuild(elData(e.dialog,"id"))}.bind(this))}.bind(this))},_initStaticDialogs:function(){for(var e,t,i;b.length;)e=b[0],e.classList.remove("jsStaticDialog"),i=elData(e,"dialog-id"),i&&(t=elById(i))&&function(e,t){t.classList.remove("jsStaticDialogContent"),elHide(t),e.addEventListener(WCF_CLICK_EVENT,this.openStatic.bind(this,t.id,null,{title:elData(t,"title")}))}.bind(this)(e,t)},open:function(e,n){var a=g.get(e);if(i.isPlainObject(a))return this.openStatic(a.id,n);if("function"!=typeof e._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");var r=e._dialogSetup();if(!i.isPlainObject(r))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");a={id:r.id};var o=!0;if(void 0===r.source){var s=elById(r.id);if(null===s)throw new Error("Element id '"+r.id+"' is invalid and no source attribute was given.");r.source=document.createDocumentFragment(),r.source.appendChild(s),s.removeAttribute("id"),elShow(s)}else if(null===r.source)r.source=n;else if("function"==typeof r.source)r.source();else if(i.isPlainObject(r.source)){if("string"!=typeof n||""===n.trim())return t.api(this,r.source.data,function(t){t.returnValues&&"string"==typeof t.returnValues.template&&(this.open(e,t.returnValues.template),"function"==typeof r.source.after&&r.source.after(m.get(r.id).content,t))}.bind(this)),{};r.source=n}else{if("string"==typeof r.source){var s=elCreate("div");elAttr(s,"id",r.id),c.setInnerHtml(s,r.source),r.source=document.createDocumentFragment(),r.source.appendChild(s)}if(!r.source.nodeType||r.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");o=!1}return g.set(e,a),this.openStatic(r.id,r.source,r.options,o)},openStatic:function(e,t,n,o){document.documentElement.classList.add("pageOverlayActive"),m.has(e)?this._updateDialog(e,t):(n=i.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:r.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},n),n.closable||(n.backdropCloseOnClick=!1),n.closeConfirmMessage&&(n.onBeforeClose=function(e){d.show({confirm:this.close.bind(this,e),message:n.closeConfirmMessage})}.bind(this)),this._createDialog(e,t,n));var s=m.get(e);return"ios"===a.platform()?(u.scrollDisable(),window.setTimeout(function(){var e=elBySel("input, textarea",s.content);null!==e&&e.focus()}.bind(this),200)):"desktop"!==a.platform()&&u.scrollDisable(),s},setTitle:function(e,t){if("object"==typeof e){var i=g.get(e);void 0!==i&&(e=i.id)}var n=m.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");var a=elByClass("dialogTitle",n.dialog);a.length&&(a[0].textContent=t)},_createDialog:function(e,t,i,n){var a=null;if(null===t&&(a=elById(e),null===a))throw new Error("Expected either a HTML string or an existing element id.");var r=elCreate("div");r.classList.add("dialogContainer"),elAttr(r,"aria-hidden","true"),elAttr(r,"role","dialog"),elData(r,"id",e);var o=elCreate("header");r.appendChild(o);var s=c.getUniqueId();elAttr(r,"aria-labelledby",s);var l=elCreate("span");if(l.classList.add("dialogTitle"),l.textContent=i.title,elAttr(l,"id",s),o.appendChild(l),i.closable){var d=elCreate("a");d.className="dialogCloseButton jsTooltip",elAttr(d,"title",i.closeButtonLabel),elAttr(d,"aria-label",i.closeButtonLabel),d.addEventListener(WCF_CLICK_EVENT,this._close.bind(this)),o.appendChild(d);var u=elCreate("span");u.className="icon icon24 fa-times",d.appendChild(u)}var h=elCreate("div");h.classList.add("dialogContent"),i.disableContentPadding&&h.classList.add("dialogContentNoPadding"),r.appendChild(h),h.addEventListener("wheel",function(e){for(var t,i,n,a=!1,r=e.target;;){if(t=r.clientHeight,i=r.scrollHeight,t0&&n>0){a=!0;break}if(e.wheelDelta<0&&n+t1?(p=elCreate("div"),p.id=e,p.appendChild(t)):p=t}}else p=a;h.appendChild(p),"none"===p.style.getPropertyValue("display")&&elShow(p),m.set(e,{backdropCloseOnClick:i.backdropCloseOnClick,content:p,dialog:r,header:o,onBeforeClose:i.onBeforeClose,onClose:i.onClose,onShow:i.onShow}),c.prepend(r,f),"function"==typeof i.onSetup&&i.onSetup(p),n!==!0&&this._updateDialog(e,null)},_updateDialog:function(e,t){var i=m.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t&&c.setInnerHtml(i.content,t),"true"===elAttr(i.dialog,"aria-hidden")){"true"===elAttr(f,"aria-hidden")&&window.addEventListener("keyup",_),elAttr(i.dialog,"aria-hidden","false"),elAttr(f,"aria-hidden","false"),elData(f,"close-on-click",i.backdropCloseOnClick?"true":"false"),p=e;var n=elBySel(".jsDialogAutoFocus",i.dialog);null!==n&&null!==n.offsetParent&&n.focus(),"function"==typeof i.onShow&&i.onShow(i.content),h.closeAll(),window.WCF.Dropdown.Interactive.Handler.closeAll()}this.rebuild(e),s.trigger()},rebuild:function(e){var t=m.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 i=t.content.parentNode,n=elBySel(".formSubmit",t.content),r=0;null!==n?(i.classList.add("dialogForm"),n.classList.add("dialogFormSubmit"),r+=c.outerHeight(n),r-=1,i.style.setProperty("margin-bottom",r+"px","")):(i.classList.remove("dialogForm"),i.style.removeProperty("margin-bottom")),r+=c.outerHeight(t.header);var o=window.innerHeight*(v?1:.8)-r;i.style.setProperty("max-height",~~o+"px",""),"chrome"===a.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=m.get(p);return"function"==typeof t.onBeforeClose?(t.onBeforeClose(p),!1):void this.close(p)},_closeOnBackdrop:function(e){return e.target!==f||void("true"===elData(f,"close-on-click")?this._close(e):e.preventDefault())},close:function(e){if("object"==typeof e){var t=g.get(e);void 0!==t&&(e=t.id)}var i=m.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");"function"==typeof i.onClose&&i.onClose(e),elAttr(i.dialog,"aria-hidden","true"),p=null;for(var n=0;n=200&&this.status<300||304===this.status?n.responseType&&0!==this.getResponseHeader("Content-Type").indexOf(n.responseType)?i._failure(this,n):i._success(this,n):i._failure(this,n))},this._xhr.onerror=function(){i._failure(this,n)},this._options.progress&&(this._xhr.onprogress=this._options.progress),this._options.uploadProgress&&(this._xhr.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){var a=this._options.data;"object"==typeof a&&"FormData"!==e.getType(a)&&(a=e.serialize(a)),this._xhr.send(a)}else this._xhr.send()},abortPrevious:function(){null!==this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=null,this._options.silent||r.hide())},setOption:function(e,t){this._options[e]=t},getOption:function(e){return objOwns(this._options,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||r.hide(),"function"==typeof t.success){var i=null;if("application/json"===e.getResponseHeader("Content-Type")){try{i=JSON.parse(e.responseText)}catch(i){return void this._failure(e,t)}i&&i.returnValues&&void 0!==i.returnValues.template&&(i.returnValues.template=i.returnValues.template.trim())}t.success(i,e.responseText,e,t.data)}this._finalize(t)},_failure:function(e,i){if(!l){i.silent||r.hide();var o=null;try{o=JSON.parse(e.responseText)}catch(e){}var s=!0;if("function"==typeof i.failure&&(s=i.failure(o||{},e.responseText||"",e,i.data)),i.ignoreError!==!0&&s!==!1){var c="",d="";if(null!==o?(o.stacktrace?c="

    Stacktrace:

    "+o.stacktrace+"

    ":o.exceptionID&&(c="

    Exception ID: "+o.exceptionID+"

    "),d=o.message,o.previous.forEach(function(e){c+="

    "+e.message+"

    ",c+="

    Stacktrace

    "+e.stacktrace+"

    "})):d=e.responseText,!d||"undefined"===d)return;var u='

    '+d+"

    "+c+"
    ";void 0===a&&(a=require("Ui/Dialog")),a.openStatic(n.getUniqueId(),u,{title:t.get("wcf.global.error.title")})}this._finalize(i)}},_finalize:function(e){"function"==typeof e.finalize&&e.finalize(this._xhr),this._previousXhr=null,i.trigger();for(var t=elBySelAll('a[href*="#"]'),n=0,a=t.length;n=0,v.ie=!1,v.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,v.supported=v.chrome||v.ff||v.opera;var y=[];m=function(){},h=g=!1;var C=function(){r=n(w,e),r.bgColor=i(r.bgColor),r.textColor=i(r.textColor),r.position=r.position.toLowerCase(),r.animation=N.types[""+r.animation]?r.animation:w.animation;var t=r.position.indexOf("up")>-1,a=r.position.indexOf("left")>-1;if(t||a)for(var h=0;h0?u.height:32,l=u.width>0?u.width:32,c.height=s,c.width=l,d=c.getContext("2d"),E.ready()}):(u.setAttribute("src",""),s=32,l=32,u.height=s,u.width=l,c.height=s,c.width=l,d=c.getContext("2d"),E.ready())},E={};E.ready=function(){h=!0,E.reset(),m()},E.reset=function(){h&&(y=[],p=!1,f=!1,d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),k.setIcon(c),window.clearTimeout(_),window.clearTimeout(b))},E.start=function(){if(h&&!f){var e=function(){p=y[0],f=!1,y.length>0&&(y.shift(),E.start())};if(y.length>0){f=!0;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in y[0].options&&(r[e]=y[0].options[e])}),N.run(y[0].options,function(){e()},!1)};p?N.run(p.options,function(){t()},!0):t()}}};var L={},S=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=S(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),d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),d.beginPath(),d.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.85:1))+"px "+r.fontFamily,d.textAlign="center",t?(d.moveTo(e.x+e.w/2,e.y),d.lineTo(e.x+e.w-e.h/2,e.y),d.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),d.lineTo(e.x+e.w,e.y+e.h-e.h/2),d.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),d.lineTo(e.x+e.h/2,e.y+e.h),d.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),d.lineTo(e.x,e.y+e.h/2),d.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):d.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),d.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",d.fill(),d.closePath(),d.beginPath(),d.stroke(),d.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?d.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)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()},L.rectangle=function(e){e=S(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),d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),d.beginPath(),d.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.9:1))+"px "+r.fontFamily,d.textAlign="center",d.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",d.fillRect(e.x,e.y,e.w,e.h),d.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?d.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)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()};var x=function(e,t){t=("string"==typeof t?{animation:t}:t)||{},m=function(){try{if("number"==typeof e?e>0:""!==e){var n={type:"badge",options:{n:e}};if("animation"in t&&N.types[""+t.animation]&&(n.options.animation=""+t.animation),"type"in t&&L[""+t.type]&&(n.options.type=""+t.type),["bgColor","textColor"].forEach(function(e){e in t&&(n.options[e]=i(t[e]))}),["fontStyle","fontFamily"].forEach(function(e){e in t&&(n.options[e]=t[e])}),y.push(n),y.length>100)throw"Too many badges requests in queue.";E.start()}else E.reset()}catch(e){throw"Error setting badge. Message: "+e.message}},h&&m()},D=function(e){m=function(){try{var t=e.width,i=e.height,n=document.createElement("img"),a=t/l=0;i--)if(/(^|\s)icon(\s|$)/i.test(e[i].getAttribute("rel")))return e[i];return!1};return r.element?e=r.element:r.elementId?(e=document.getElementById(r.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},k.setIcon=function(e){var t=e.toDataURL("image/png");if(r.dataUrl&&r.dataUrl(t),r.element)r.element.setAttribute("src",t);else if(r.elementId)document.getElementById(r.elementId).setAttribute("src",t);else if(v.ff||v.opera){var i=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),i.parentNode&&i.parentNode.removeChild(i)}else o.setAttribute("href",t)};var N={};return N.duration=40,N.types={},N.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}],N.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],N.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}],N.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}],N.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}],N.run=function(e,t,i,o){var s=N.types[a()?"none":r.animation];return o=i===!0?"undefined"!=typeof o?o:s.length-1:"undefined"!=typeof o?o:0,t=t?t:function(){},o=0?(L[r.type](n(e,s[o])),_=setTimeout(function(){i?o-=1:o+=1,N.run(e,t,i,o)},N.duration),k.setIcon(c),void 0):void t()},C(),{badge:x,video:I,image:D,webcam:T,reset:E.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,i,n){function a(o,s){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return a(i?i:e)},d,d.exports,e,t,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o=0&&i.splice(n,1),e.className=i.join(" ")}i.add=function(e,t){e.classList?e.classList.add(t):n(e,t)},i.remove=function(e,t){e.classList?e.classList.remove(t):a(e,t)},i.list=function(e){return e.classList?e.classList:e.className.split(" ")}},{}],3:[function(e,t,i){"use strict";function n(e,t){return window.getComputedStyle(e)[t]}function a(e,t,i){return"number"==typeof i&&(i=i.toString()+"px"),e.style[t]=i,e}function r(e,t){for(var i in t){var n=t[i];"number"==typeof n&&(n=n.toString()+"px"),e.style[i]=n}return e}i.e=function(e,t){var i=document.createElement(e);return i.className=t,i},i.appendTo=function(e,t){return t.appendChild(e),e},i.css=function(e,t,i){return"object"==typeof t?r(e,t):"undefined"==typeof i?n(e,t):a(e,t,i)},i.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},i.remove=function(e){"undefined"!=typeof e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}},{}],4:[function(e,t,i){"use strict";var n=function(e){this.element=e,this.events={}};n.prototype.bind=function(e,t){"undefined"==typeof this.events[e]&&(this.events[e]=[]),this.events[e].push(t),this.element.addEventListener(e,t,!1)},n.prototype.unbind=function(e,t){var i="undefined"!=typeof t;this.events[e]=this.events[e].filter(function(n){return!(!i||n===t)||(this.element.removeEventListener(e,n,!1),!1)},this)},n.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var a=function(){this.eventElements=[]};a.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return"undefined"==typeof t&&(t=new n(e),this.eventElements.push(t)),t},a.prototype.bind=function(e,t,i){this.eventElement(e).bind(t,i)},a.prototype.unbind=function(e,t,i){this.eventElement(e).unbind(t,i)},a.prototype.unbindAll=function(){for(var e=0;e1&&(c=1),e.scrollTop=(t.contentHeight-t.containerHeight)*c,o(e)}),t.event.bind(t.scrollbarX,"click",n), -t.event.bind(t.scrollbarXRail,"click",function(n){var r=a.toInt(t.scrollbarXWidth/2),s=n.pageX-i(t.scrollbarXRail).left-r;console.log(n.pageX,t.scrollbarXRail.offsetLeft);var l=t.containerWidth-t.scrollbarXWidth,c=s/l;c<0?c=0:c>1&&(c=1),e.scrollLeft=(t.contentWidth-t.containerWidth)*c,o(e)})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],11:[function(e,t,i){"use strict";function n(e,t){function i(i){var a=n+i,r=t.containerWidth-t.scrollbarXWidth;a<0?t.scrollbarXLeft=0:a>r?t.scrollbarXLeft=r:t.scrollbarXLeft=a;var s=o.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.scrollbarXWidth));e.scrollLeft=s}var n=null,a=null,s=function(t){i(t.pageX-a),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(i){a=i.pageX,n=o.toInt(r.css(t.scrollbarX,"left")),o.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),i.stopPropagation(),i.preventDefault()})}function a(e,t){function i(i){var a=n+i,r=t.containerHeight-t.scrollbarYHeight;a<0?t.scrollbarYTop=0:a>r?t.scrollbarYTop=r:t.scrollbarYTop=a;var s=o.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.scrollbarYHeight));e.scrollTop=s}var n=null,a=null,s=function(t){i(t.pageY-a),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(i){a=i.pageY,n=o.toInt(r.css(t.scrollbarY,"top")),o.startScrolling(e,"y"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),i.stopPropagation(),i.preventDefault()})}var r=e("../../lib/dom"),o=e("../../lib/helper"),s=e("../instances"),l=e("../update-geometry");t.exports=function(e){var t=s.get(e);n(e,t),a(e,t)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19}],12:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var a=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===a&&n>0||a>=t.contentHeight-t.containerHeight&&n<0)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&i<0||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}var n=!1;t.event.bind(e,"mouseenter",function(){n=!0}),t.event.bind(e,"mouseleave",function(){n=!1});var r=!1;t.event.bind(t.ownerDocument,"keydown",function(s){if((!s.isDefaultPrevented||!s.isDefaultPrevented())&&n){var l=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(l){for(;l.shadowRoot;)l=l.shadowRoot.activeElement;if(a.isEditable(l))return}var c=0,d=0;switch(s.which){case 37:c=-30;break;case 38:d=30;break;case 39:c=30;break;case 40:d=-30;break;case 33:d=90;break;case 32:case 34:d=-90;break;case 35:d=s.ctrlKey?-t.contentHeight:-t.containerHeight;break;case 36:d=s.ctrlKey?e.scrollTop:t.containerHeight;break;default:return}e.scrollTop=e.scrollTop-d,e.scrollLeft=e.scrollLeft+c,o(e),r=i(c,d),r&&s.preventDefault()}})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],13:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var a=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===a&&n>0||a>=t.contentHeight-t.containerHeight&&n<0)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&i<0||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}function n(e){var t=e.deltaX,i=-1*e.deltaY;return"undefined"!=typeof t&&"undefined"!=typeof i||(t=-1*e.wheelDeltaX/6,i=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,i*=10),t!==t&&i!==i&&(t=0,i=e.wheelDelta),[t,i]}function r(t,i){var n=e.querySelector("textarea:hover");if(n){var a=n.scrollHeight-n.clientHeight;if(a>0&&!(0===n.scrollTop&&i>0||n.scrollTop===a&&i<0))return!0;var r=n.scrollLeft-n.clientWidth;if(r>0&&!(0===n.scrollLeft&&t<0||n.scrollLeft===r&&t>0))return!0}return!1}function s(s){if(a.env.isWebKit||!e.querySelector("select:focus")){var c=n(s),d=c[0],u=c[1];r(d,u)||(l=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(u?e.scrollTop=e.scrollTop-u*t.settings.wheelSpeed:e.scrollTop=e.scrollTop+d*t.settings.wheelSpeed,l=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(d?e.scrollLeft=e.scrollLeft+d*t.settings.wheelSpeed:e.scrollLeft=e.scrollLeft-u*t.settings.wheelSpeed,l=!0):(e.scrollTop=e.scrollTop-u*t.settings.wheelSpeed,e.scrollLeft=e.scrollLeft+d*t.settings.wheelSpeed),o(e),l=l||i(d,u),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 a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],14:[function(e,t,i){"use strict";function n(e,t){t.event.bind(e,"scroll",function(){r(e)})}var a=e("../instances"),r=e("../update-geometry");t.exports=function(e){var t=a.get(e);n(e,t)}},{"../instances":18,"../update-geometry":19}],15:[function(e,t,i){"use strict";function n(e,t){function i(){var e=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===e.toString().length?null:e.getRangeAt(0).commonAncestorContainer}function n(){l||(l=setInterval(function(){return r.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),a.stopScrolling(e)}var l=null,c={top:0,left:0},d=!1;t.event.bind(t.ownerDocument,"selectionchange",function(){e.contains(i())?d=!0:(d=!1,s())}),t.event.bind(window,"mouseup",function(){d&&(d=!1,s())}),t.event.bind(window,"mousemove",function(t){if(d){var i={x:t.pageX,y:t.pageY},r={left:e.offsetLeft,right:e.offsetLeft+e.offsetWidth,top:e.offsetTop,bottom:e.offsetTop+e.offsetHeight};i.xr.right-3?(c.left=5,a.startScrolling(e,"x")):c.left=0,i.yr.bottom-3?(i.y-r.bottom+3<5?c.top=5:c.top=20,a.startScrolling(e,"y")):c.top=0,0===c.top&&0===c.left?s():n()}})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],16:[function(e,t,i){"use strict";function n(e,t,i,n){function o(i,n){var a=e.scrollTop,r=e.scrollLeft,o=Math.abs(i),s=Math.abs(n);if(s>o){if(n<0&&a===t.contentHeight-t.containerHeight||n>0&&0===a)return!t.settings.swipePropagation}else if(o>s&&(i<0&&r===t.contentWidth-t.containerWidth||i>0&&0===r))return!t.settings.swipePropagation;return!0}function s(t,i){e.scrollTop=e.scrollTop-i,e.scrollLeft=e.scrollLeft-t,r(e)}function l(){b=!0}function c(){b=!1}function d(e){return e.targetTouches?e.targetTouches[0]:e}function u(e){return!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE)}function h(e){if(u(e)){w=!0;var t=d(e);m.pageX=t.pageX,m.pageY=t.pageY,g=(new Date).getTime(),null!==_&&clearInterval(_),e.stopPropagation()}}function p(e){if(!b&&w&&u(e)){var t=d(e),i={pageX:t.pageX,pageY:t.pageY},n=i.pageX-m.pageX,a=i.pageY-m.pageY;s(n,a),m=i;var r=(new Date).getTime(),l=r-g;l>0&&(v.x=n/l,v.y=a/l,g=r),o(n,a)&&(e.stopPropagation(),e.preventDefault())}}function f(){!b&&w&&(w=!1,clearInterval(_),_=setInterval(function(){return a.get(e)?Math.abs(v.x)<.01&&Math.abs(v.y)<.01?void clearInterval(_):(s(30*v.x,30*v.y),v.x*=.8,void(v.y*=.8)):void clearInterval(_)},10))}var m={},g=0,v={},_=null,b=!1,w=!1;i&&(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)),n&&(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 a=e("../instances"),r=e("../update-geometry");t.exports=function(e,t,i){var r=a.get(e);n(e,r,t,i)}},{"../instances":18,"../update-geometry":19}],17:[function(e,t,i){"use strict";var n=e("../lib/class"),a=e("../lib/helper"),r=e("./instances"),o=e("./update-geometry"),s=e("./handler/click-rail"),l=e("./handler/drag-scrollbar"),c=e("./handler/keyboard"),d=e("./handler/mouse-wheel"),u=e("./handler/native-scroll"),h=e("./handler/selection"),p=e("./handler/touch");t.exports=function(e,t){t="object"==typeof t?t:{},n.add(e,"ps-container");var i=r.add(e);i.settings=a.extend(i.settings,t),s(e),l(e),d(e),u(e),h(e),(a.env.supportsTouch||a.env.supportsIePointer)&&p(e,a.env.supportsTouch,a.env.supportsIePointer),i.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,i){"use strict";function n(e){var t=this;t.settings=u.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=u.toInt(s.css(t.scrollbarXRail,"bottom")),t.isScrollbarXUsingBottom=t.scrollbarXBottom===t.scrollbarXBottom,t.scrollbarXTop=t.isScrollbarXUsingBottom?null:u.toInt(s.css(t.scrollbarXRail,"top")),t.railBorderXWidth=u.toInt(s.css(t.scrollbarXRail,"borderLeftWidth"))+u.toInt(s.css(t.scrollbarXRail,"borderRightWidth")),t.railXMarginWidth=u.toInt(s.css(t.scrollbarXRail,"marginLeft"))+u.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=u.toInt(s.css(t.scrollbarYRail,"right")),t.isScrollbarYUsingRight=t.scrollbarYRight===t.scrollbarYRight,t.scrollbarYLeft=t.isScrollbarYUsingRight?null:u.toInt(s.css(t.scrollbarYRail,"left")),t.scrollbarYOuterWidth=t.isRtl?u.outerWidth(t.scrollbarY):null,t.railBorderYWidth=u.toInt(s.css(t.scrollbarYRail,"borderTopWidth"))+u.toInt(s.css(t.scrollbarYRail,"borderBottomWidth")),t.railYMarginHeight=u.toInt(s.css(t.scrollbarYRail,"marginTop"))+u.toInt(s.css(t.scrollbarYRail,"marginBottom")),t.railYHeight=null}function a(e){return"undefined"==typeof e.dataset?e.getAttribute("data-ps-id"):e.dataset.psId}function r(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"),d=e("../lib/guid"),u=e("../lib/helper"),h={};i.add=function(e){var t=d();return r(e,t),h[t]=new n(e),h[t]},i.remove=function(e){delete h[a(e)],o(e)},i.get=function(e){return h[a(e)]}},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(e,t,i){"use strict";function n(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function a(e,t){var i={width:t.railXWidth};t.isRtl?i.left=e.scrollLeft+t.containerWidth-t.contentWidth:i.left=e.scrollLeft,t.isScrollbarXUsingBottom?i.bottom=t.scrollbarXBottom-e.scrollTop:i.top=t.scrollbarXTop+e.scrollTop,o.css(t.scrollbarXRail,i);var n={top:e.scrollTop,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?n.right=t.contentWidth-e.scrollLeft-t.scrollbarYRight-t.scrollbarYOuterWidth:n.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?n.left=e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:n.left=t.scrollbarYLeft+e.scrollLeft,o.css(t.scrollbarYRail,n),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 r=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.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),a(e,t),r[t.scrollbarXActive?"add":"remove"](e,"ps-active-x"),r[t.scrollbarYActive?"add":"remove"](e,"ps-active-y")}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18}],20:[function(e,t,i){"use strict";var n=e("../lib/dom"),a=e("./instances"),r=e("./update-geometry");t.exports=function(e){var t=a.get(e);n.css(t.scrollbarXRail,"display","none"),n.css(t.scrollbarYRail,"display","none"),r(e),n.css(t.scrollbarXRail,"display","block"),n.css(t.scrollbarYRail,"display","block")}},{"../lib/dom":3,"./instances":18,"./update-geometry":19}]},{},[1]),define("WoltLabSuite/Core/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,i){var n,a="";"c"===i&&(i="Y-m-dTH:i:sP");for(var r=0,o=i.length;r11?"pm":"am";break;case"g":n=t.getHours(),0===n?n=12:n>12&&(n-=12);break;case"h":n=t.getHours(),0===n?n=12:n>12&&(n-=12),n=("0"+n.toString()).slice(-2);break;case"A":n=t.getHours()>11?"PM":"AM";break;case"G":n=t.getHours();break;case"H":n=t.getHours(),n=("0"+n.toString()).slice(-2);break;case"d":n=t.getDate(),n=("0"+n.toString()).slice(-2);break;case"j":n=t.getDate();break;case"l":n=e.get("__days")[t.getDay()];break;case"D":n=e.get("__daysShort")[t.getDay()];break;case"S":n="";break;case"m":n=t.getMonth()+1,n=("0"+n.toString()).slice(-2);break;case"n":n=t.getMonth()+1;break;case"F":n=e.get("__months")[t.getMonth()];break;case"M":n=e.get("__monthsShort")[t.getMonth()];break;case"y":n=t.getYear().toString().replace(/^\d{2}/,"");break;case"Y":n=t.getFullYear();break;case"P":var s=t.getTimezoneOffset();n=s>0?"-":"+",s=Math.abs(s),n+=("0"+(~~(s/60)).toString()).slice(-2),n+=":",n+=("0"+(s%60).toString()).slice(-2);break;case"r":n=t.toString();break;case"U":n=Math.round(t.getTime()/1e3);break;case"\\":n="",r+1864e5)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("WoltLabSuite/Core/Date/Time/Relative",["Dom/ChangeListener","Language","WoltLabSuite/Core/Date/Util","WoltLabSuite/Core/Timer/Repeating"],function(e,t,i,n){"use strict";var a=elByTag("time"),r=null;return{setup:function(){this._refresh(),new n(this._refresh.bind(this),6e4),e.add("WoltLabSuite/Core/Date/Time/Relative",this._refresh.bind(this))},_refresh:function(){var e=new Date,n=(e.getTime()-e.getMilliseconds())/1e3;null===r&&(r=n-TIME_NOW);for(var o=0,s=a.length;o=n||n1)return void(d&&e.triggerEvent(document,"touchend"));if(!d&&(s||l)){if(document.documentElement.classList.contains("pageOverlayActive")){for(var u=!1,h=0;hn.x+100&&this.close(),"right"===d&&a>n.x-100&&this.close()),n=null,d=""}}.bind(this)),document.addEventListener("touchmove",function(e){if(d&&null!==n){var a=e.touches,s=!1,l=!1;"left"===d&&(s=a[0].clientX>n.x+r),"right"===d&&(s=a[0].clientXo;var c=this._menu.classList.contains("open");if(c||!s||l||(this.open(),c=!0),c){var u=a[0].clientX;"right"===t&&(u=document.body.clientWidth-u),u>this._menu.offsetWidth&&(u=this._menu.offsetWidth),u<0&&(u=0),this._menu.style.setProperty("transform","translateX("+("left"===t?1:-1)*(u-this._menu.offsetWidth)+"px)"),i.style.setProperty(t,Math.min(this._menu.offsetWidth,u)+"px")}}}.bind(this))},_initItems:function(){elBySelAll(".menuOverlayItemLink",this._menu,this._initItem.bind(this))},_initItem:function(e){var t=e.parentNode,n=elData(t,"more");if(n)return void e.addEventListener(WCF_CLICK_EVENT,function(a){a.preventDefault(),a.stopPropagation(),i.fire(this._eventIdentifier,"more",{handler:this,identifier:n,item:e,parent:t})}.bind(this));var a,o=e.nextElementSibling;if(null!==o)if("OL"!==o.nodeName&&o.classList.contains("menuOverlayItemLinkIcon"))for(a=elCreate("span"),a.className="menuOverlayItemWrapper",t.insertBefore(a,e),a.appendChild(e);a.nextElementSibling;)a.appendChild(a.nextElementSibling);else{var s="#"!==elAttr(e,"href"),l=t.parentNode,c=elData(o,"title");this._items.set(e,{itemList:o,parentItemList:l}),""===c&&(c=r.childByClass(e,"menuOverlayItemTitle").textContent,elData(o,"title",c));var d=this._showItemList.bind(this,e);if(s){a=elCreate("span"),a.className="menuOverlayItemWrapper",t.insertBefore(a,e),a.appendChild(e);var u=elCreate("a");elAttr(u,"href","#"),u.className="menuOverlayItemLinkIcon"+(e.classList.contains("active")?" active":""),u.innerHTML='',u.addEventListener(WCF_CLICK_EVENT,d),a.appendChild(u)}else e.classList.add("menuOverlayItemLinkMore"),e.addEventListener(WCF_CLICK_EVENT,d);var h=elCreate("li");h.className="menuOverlayHeader",a=elCreate("span"),a.className="menuOverlayItemWrapper";var p=elCreate("a");elAttr(p,"href","#"),p.className="menuOverlayItemLink menuOverlayBackLink",p.textContent=elData(l,"title"),p.addEventListener(WCF_CLICK_EVENT,this._hideItemList.bind(this,e));var f=elCreate("a");if(elAttr(f,"href","#"),f.className="menuOverlayItemLinkIcon",f.innerHTML='',f.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),a.appendChild(p),a.appendChild(f),h.appendChild(a),o.insertBefore(h,o.firstElementChild),!h.nextElementSibling.classList.contains("menuOverlayTitle")){var m=elCreate("li");m.className="menuOverlayTitle";var g=elCreate("span");g.textContent=c,m.appendChild(g),o.insertBefore(m,h.nextElementSibling)}}},_initHeader:function(){var e=elCreate("li");e.className="menuOverlayHeader";var t=elCreate("span");t.className="menuOverlayItemWrapper",e.appendChild(t);var i=elCreate("span");i.className="menuOverlayLogoWrapper",t.appendChild(i);var n=elCreate("span");n.className="menuOverlayLogo",n.style.setProperty("background-image",'url("'+elData(this._menu,"page-logo")+'")',""),i.appendChild(n);var a=elCreate("a");elAttr(a,"href","#"),a.className="menuOverlayItemLinkIcon",a.innerHTML='',a.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),t.appendChild(a);var o=r.childByClass(this._menu,"menuOverlayItemList");o.insertBefore(e,o.firstElementChild)},_hideItemList:function(e,t){t instanceof Event&&t.preventDefault(),this._menu.classList.remove("allowScroll"),this._removeActiveList=!0;var i=this._items.get(e);i.parentItemList.classList.remove("hidden"),this._updateDepth(!1)},_showItemList:function(e,t){t instanceof Event&&t.preventDefault();var n=this._items.get(e),a=elData(n.itemList,"load");if(a&&!elDataBool(e,"loaded")){var r=t.currentTarget.firstElementChild;return r.classList.contains("fa-angle-right")&&(r.classList.remove("fa-angle-right"),r.classList.add("fa-spinner")),void i.fire(this._eventIdentifier,"load_"+a)}this._menu.classList.remove("allowScroll"),n.itemList.classList.add("activeList"),n.parentItemList.classList.add("hidden"),this._activeList.push(n.itemList),this._updateDepth(!0)},_updateDepth:function(e){this._depth+=e?1:-1;var t=this._depth*-100;"rtl"===n.get("wcf.global.pageDirection")&&(t*=-1),this._menu.children[0].style.setProperty("transform","translateX("+t+"%)","")},_updateButtonState:function(){var e=!1;elBySelAll(".badgeUpdate",this._menu,function(t){~~t.textContent>0&&(e=!0)}),this._button.classList[e?"add":"remove"]("pageMenuMobileButtonHasContent")}},l}),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["Core","Dom/Traverse","./Abstract"],function(e,t,i){"use strict";function n(){this.init()}var a=null,r=null,o=null,s=null;return e.inherit(n,i,{init:function(){n._super.prototype.init.call(this,"com.woltlab.wcf.MainMenuMobile","pageMainMenuMobile","#pageHeader .mainMenu"),a=elById("pageMainMenuMobilePageOptionsContainer"),null!==a&&(o=t.childByClass(a,"menuOverlayItemList"),s=elBySel(".jsPageNavigationIcons"),elRemove(t.childByClass(o,"jsMenuOverlayItemPlaceholder")),o.addEventListener("click",function(e){e.target!==o&&null!==t.parentByClass(e.target,"menuOverlayItem",o)&&(this.close(),e.stopPropagation())}.bind(this)))},open:function(e){if(!n._super.prototype.open.call(this,e))return!1;if(null===a)return!0;if(r=s.childElementCount>0){for(var t,i;s.childElementCount;)t=s.children[0],t.classList.add("menuOverlayItem"),i=t.children[0],i.classList.add("menuOverlayItemLink"),i.classList.add("box24"),i.children[1].classList.remove("invisible"),i.children[1].classList.add("menuOverlayItemTitle"),o.appendChild(t);elShow(a)}else elHide(a);return!0},close:function(e){if(!n._super.prototype.close.call(this,e))return!1;if(r){elHide(a);for(var i,l,c=t.childByClass(o,"menuOverlayTitle");i=c.nextElementSibling;)i.classList.remove("menuOverlayItem"),l=i.children[0],l.classList.remove("menuOverlayItemLink"),l.classList.remove("box24"),l.children[1].classList.add("invisible"),l.children[1].classList.remove("menuOverlayItemTitle"),s.appendChild(i)}return!0}}),n}),define("WoltLabSuite/Core/Ui/Page/Menu/User",["Core","EventHandler","./Abstract"],function(e,t,i){"use strict";function n(){this.init()}return e.inherit(n,i,{init:function(){n._super.prototype.init.call(this,"com.woltlab.wcf.UserMenuMobile","pageUserMenuMobile","#pageHeader .userPanel"),t.add("com.woltlab.wcf.userMenu","updateBadge",function(e){elBySelAll(".menuOverlayItemBadge",this._menu,function(t){if(elData(t,"badge-identifier")===e.identifier){var i=elBySel(".badge",t);e.count?(null===i&&(i=elCreate("span"),i.className="badge badgeUpdate",t.appendChild(i)),i.textContent=e.count):null!==i&&elRemove(i),this._updateButtonState()}}.bind(this))}.bind(this))},close:function(e){var t=WCF.Dropdown.Interactive.Handler.getOpenDropdown();t?(e.preventDefault(),e.stopPropagation(),t.close()):n._super.prototype.close.call(this,e)}}),n}),define("WoltLabSuite/Core/Ui/Mobile",["Core","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Ui/CloseOverlay","Ui/Screen","./Page/Menu/Main","./Page/Menu/User"],function(e,t,i,n,a,r,o,s,l,c,d){"use strict";var u=elByClass("buttonGroupNavigation"),h=!1,p=new a,f=null,m=elByClass("message"),g={},v=null,_=null,b=null;return{setup:function(i){g=e.extend({enableMobileMenu:!0},i),f=elById("main"),t.touch()&&document.documentElement.classList.add("touch"),"desktop"!==t.platform()&&document.documentElement.classList.add("mobile");var n=elBySel(".messageGroupList");n&&(b=elByClass("messageGroup",n)),l.on("screen-md-down",{match:this.enable.bind(this),unmatch:this.disable.bind(this),setup:this._init.bind(this)}),l.on("screen-sm-down",{match:this.enableShadow.bind(this), -unmatch:this.disableShadow.bind(this),setup:this.enableShadow.bind(this)})},enable:function(){h=!0,g.enableMobileMenu&&(v.enable(),_.enable())},enableShadow:function(){b&&this.rebuildShadow(b,".messageGroupLink")},disable:function(){h=!1,g.enableMobileMenu&&(v.disable(),_.disable())},disableShadow:function(){b&&this.removeShadow(b)},_init:function(){h=!0,this._initSearchBar(),this._initButtonGroupNavigation(),this._initMessages(),this._initMobileMenu(),s.add("WoltLabSuite/Core/Ui/Mobile",this._closeAllMenus.bind(this)),r.add("WoltLabSuite/Core/Ui/Mobile",function(){this._initButtonGroupNavigation(),this._initMessages()}.bind(this))},_initSearchBar:function(){var e=elById("pageHeaderSearch"),n=elById("pageHeaderSearchInput"),a=null;i.add("com.woltlab.wcf.MainMenuMobile","more",function(i){"com.woltlab.wcf.search"===i.identifier&&(i.handler.close(!0),"ios"===t.platform()&&(a=document.body.scrollTop,l.scrollDisable()),e.style.setProperty("top",elById("pageHeader").offsetHeight+"px",""),e.classList.add("open"),n.focus(),"ios"===t.platform()&&(document.body.scrollTop=0))}),f.addEventListener(WCF_CLICK_EVENT,function(){e&&e.classList.remove("open"),"ios"===t.platform()&&null!==a&&(l.scrollEnable(),document.body.scrollTop=a,a=null)})},_initButtonGroupNavigation:function(){for(var e=0,t=u.length;e as children for li[data-name='"+r+"'] (tab menu id: '"+d+"').");this._tabs.set(r,c)}if(!this._tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+d+"').");return this._isLegacy&&(elData(this._container,"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(elData(t,"name"))===t||t.children[0].addEventListener(WCF_CLICK_EVENT,this._onClick.bind(this))}.bind(this));var t=null;if(!e){var i=a.getIdentifierFromHash(),n=null;if(""!==i&&(n=this._tabs.get(i),n&&this._container.parentNode.classList.contains("tabMenuContainer")&&(t=this._container)),!n){var r=elData(this._container,"preselect")||elData(this._container,"active");"true"!==r&&r||(r=!0),r===!0?this._tabs.forEach(function(e){n||e.previousElementSibling||(n=e)}):"false"!==r&&(n=this._tabs.get(r))}n&&(this._containers.forEach(function(e){e.classList.add("hidden")}),this.select(null,n,!0));var o=elData(this._container,"store");if(o){var s=elCreate("input");s.type="hidden",s.name=o,s.value=elData(this.getActiveTab(),"name"),this._container.appendChild(s),this._store=s}}return t},select:function(e,i,n){if(i=i||this._tabs.get(e),!i){if(~~e==e){e=~~e;var r=0;this._tabs.forEach(function(t){r===e&&(i=t),r++})}if(!i)throw new Error("Expected a valid tab name, '"+e+"' given (tab menu id: '"+this._container.id+"').")}e=e||elData(i,"name");var o=this.getActiveTab(),s=null;if(o){var l=elData(o,"name");if(l===e)return;n||t.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"beforeSelect",{tab:o,tabName:l}),o.classList.remove("active"),s=this._containers.get(elData(o,"name")),s.classList.remove("active"),s.classList.add("hidden"),this._isLegacy&&(o.classList.remove("ui-state-active"),s.classList.remove("ui-state-active"))}i.classList.add("active");var c=this._containers.get(e);if(c.classList.add("active"),c.classList.remove("hidden"),this._isLegacy&&(i.classList.add("ui-state-active"),c.classList.add("ui-state-active")),this._store&&(this._store.value=e),!n){t.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"select",{active:i,activeName:e,previous:o,previousName:o?elData(o,"name"):null});var d=this._isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;d&&d(this._container).trigger("wcftabsbeforeactivate",{newTab:d(i),oldTab:d(o),newPanel:d(c),oldPanel:d(s)});var u=window.location.href.replace(/#[^#]+$/,"");u+=a.getIdentifierFromHash()===e?window.location.hash:"#"+e,window.history.replaceState(void 0,void 0,u)}require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.scrollToTab(i)})},rebuild:function(){var t=new e;t.merge(this._tabs),this.validate(),this.init(t)},hasTab:function(e){return this._tabs.has(e)},_onClick:function(e){e.preventDefault(),this.select(null,e.currentTarget.parentNode)},_getTabName:function(e){var t=elData(e,"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,elData(e,"name",t))),t},getActiveTab:function(){return elBySel("#"+this._container.id+" > nav > ul > li.active")},getContainers:function(){return this._containers},getTabs:function(){return this._tabs}},a.getIdentifierFromHash=function(){return window.location.hash.match(/^#([^\/]+)+(?:\/.+)?/)?RegExp.$1:""},a}),define("WoltLabSuite/Core/Ui/TabMenu",["Dictionary","EventHandler","Dom/ChangeListener","Dom/Util","Ui/CloseOverlay","Ui/Screen","./TabMenu/Simple"],function(e,t,i,n,a,r,o){"use strict";var s=null,l=!1,c=new e;return{setup:function(){this._init(),this._selectErroneousTabs(),i.add("WoltLabSuite/Core/Ui/TabMenu",this._init.bind(this)),a.add("WoltLabSuite/Core/Ui/TabMenu",function(){s&&(s.classList.remove("active"),s=null)}),r.on("screen-sm-down",{enable:this._scrollEnable.bind(this,!1),disable:this._scrollDisable.bind(this),setup:this._scrollEnable.bind(this,!0)}),window.addEventListener("hashchange",function(){var e=o.getIdentifierFromHash(),t=e?elById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&c.forEach(function(t){t.hasTab(e)&&t.select(e)})});var e=o.getIdentifierFromHash();e&&window.setTimeout(function(){var t=elById(e);if(t&&t.classList.contains("tabMenuContent")){var i=window.scrollY||window.pageYOffset;if(i>0){var a=t.parentNode,r=a.offsetTop-50;if(r<0&&(r=0),i>r){var o=n.offset(a).top;o<=50?o=0:o-=50,window.scrollTo(0,o)}}}},100)},_init:function(){for(var e,t,i,a,r,l=elBySelAll(".tabMenuContainer:not(.staticTabMenuContainer)"),d=0,u=l.length;d nav > ul"),function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),t.target===e?(e.classList.add("active"),s=e):(e.classList.remove("active"),s=null)})}(i),elBySelAll(".tabMenu, .menu",e,function(e){var t=this._rebuildMenuOverflow.bind(this,e),i=null;elBySel("ul",e).addEventListener("scroll",function(){null!==i&&window.clearTimeout(i),i=window.setTimeout(t,10)})}.bind(this))))},_selectErroneousTabs:function(){c.forEach(function(e){var t=!1;e.getContainers().forEach(function(i){!t&&elByClass("formError",i).length&&(t=!0,e.select(i.id))})})},getTabMenu:function(e){return c.get(e)},_scrollEnable:function(e){l=!0,c.forEach(function(t){var i=t.getActiveTab();e?this._rebuildMenuOverflow(i.closest(".menu, .tabMenu")):this.scrollToTab(i)}.bind(this))},_scrollDisable:function(){l=!1},scrollToTab:function(e){if(l){var t=e.closest("ul"),i=t.clientWidth,n=t.scrollLeft,a=t.scrollWidth;if(i!==a){var r=e.offsetLeft,o=!1;r0&&(r-=15),r=r<0?0:Math.min(r,a-i),n===r)return;t.classList.add("enableAnimation"),n0,o=elBySel(".tabMenuOverlayLeft",e);r?(null===o&&(o=elCreate("span"),o.className="tabMenuOverlayLeft icon icon24 fa-angle-left",e.insertBefore(o,e.firstChild)),o.classList.add("active")):null!==o&&o.classList.remove("active");var s=t+n element as child of container '"+e+"'.";o.set(e,t),c.set(e,i),this.rebuild(e)}},registerTabMenus:function(){for(var e=elBySelAll(".tabMenuContainer:not(.jsFlexibleMenuEnabled), .messageTabMenu:not(.jsFlexibleMenuEnabled)"),t=0,i=e.length;tu)for(var g=p.length-1;g>=0;g--){var _=p[g];if(!(_.classList.contains("dropdown")||_.classList.contains("active")||_.classList.contains("ui-state-active"))&&(w.push(_),elHide(_),h.scrollWidth0?"-":"+";m=Math.abs(m);var v=Math.floor(m/60).toString(),_=(m%60).toString();g+=2===v.length?v:"0"+v,g+=":",g+=2===_.length?_:"0"+_,u?p+="T00:00:00"+g:p=p.replace(/[+-][0-9]{2}:[0-9]{2}$/,g)}h=new Date(p)}elData(r,"value",h.getTime());var b=s?"formatTime":"formatDate"+(o?"Time":"");p=e[b](h)}var w=0===p.length;if(u?(elData(r,"min-date","120"),elData(r,"max-date",(new Date).getFullYear()+"-12-31")):(r.min&&elData(r,"min-date",r.min),r.max&&elData(r,"max-date",r.max)),this._initDateRange(r,i,!0),this._initDateRange(r,i,!1),elData(r,"min-date")===elData(r,"max-date"))throw new Error("Minimum and maximum date cannot be the same (element id '"+r.id+"').");r.type="text",r.value=p,elData(r,"empty",w),elData(r,"placeholder")&&elAttr(r,"placeholder",elData(r,"placeholder"));var y=elCreate("input");y.id=r.id+"DatePicker",y.name=r.name,y.type="hidden",null!==h&&(s?y.value=e.format(h,"H:i"):d?y.value=e.format(h,"Y-m-dTH:i:s"):y.value=e.format(h,o?"c":"Y-m-d")),r.parentNode.insertBefore(y,r),r.removeAttribute("name"),r.addEventListener(WCF_CLICK_EVENT,C);var E=elCreate("div");E.className="inputAddon";var L=elCreate("a");L.className="inputSuffix button",L.addEventListener(WCF_CLICK_EVENT,C),E.appendChild(L);var S=elCreate("span");S.className="icon icon16 fa-calendar",L.appendChild(S),r.parentNode.insertBefore(E,r),E.insertBefore(r,L),c||(L=elCreate("a"),L.className="inputSuffix button",L.addEventListener(WCF_CLICK_EVENT,this.clear.bind(this,r)),w&&L.style.setProperty("visibility","hidden",""),E.appendChild(L),S=elCreate("span"),S.className="icon icon16 fa-times",L.appendChild(S));for(var x=!1,D=["tiny","short","medium","long"],I=0;I<4;I++)r.classList.contains(D[I])&&(x=!0);x||r.classList.add("short"),l.set(r,{clearButton:L,shadow:y,disableClear:c,isDateTime:o,isEmpty:w,isTimeOnly:s,ignoreTimezone:d,onClose:null})}},_initDateRange:function(e,t,i){var n="data-"+(i?"min":"max")+"-date",a=e.hasAttribute(n)?elAttr(e,n).trim():"";if(a.match(/^(\d{4})-(\d{2})-(\d{2})$/))a=new Date(a).getTime();else if("now"===a)a=t.getTime();else if(a.match(/^\d{1,3}$/)){var r=new Date(t.getTime());r.setFullYear(r.getFullYear()+~~a*(i?-1:1)),a=r.getTime()}else if(a.match(/^datePicker-(.+)$/)){if(a=RegExp.$1,null===elById(a))throw new Error("Reference date picker identified by '"+a+"' does not exists (element id: '"+e.id+"').")}else a=/^\d{4}\-\d{2}\-\d{2}T/.test(a)?new Date(a).getTime():new Date(i?1970:2038,0,1).getTime();elAttr(e,n,a)},_setup:function(){o||(o=!0,s=~~t.get("wcf.date.firstDayOfTheWeek"),C=this._open.bind(this),n.add("WoltLabSuite/Core/Date/Picker",this.init.bind(this)),r.add("WoltLabSuite/Core/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 i,n=l.get(c),r=elData(c,"value");r?(i=new Date(+r),"Invalid Date"===i.toString()&&(i=new Date)):i=new Date,u=elData(c,"min-date"),u.match(/^datePicker-(.+)$/)&&(u=elData(elById(RegExp.$1),"value")),u=new Date(+u),d=elData(c,"max-date"),d.match(/^datePicker-(.+)$/)&&(d=elData(elById(RegExp.$1),"value")),d=new Date(+d),n.isDateTime?(f.value=i.getHours(),m.value=i.getMinutes(),y.classList.add("datePickerTime")):y.classList.remove("datePickerTime"),y.classList[n.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),this._renderPicker(i.getDate(),i.getMonth(),i.getFullYear()),a.set(y,c)}},_close:function(){if(null!==y&&y.classList.contains("active")){y.classList.remove("active");var e=l.get(c);"function"==typeof e.onClose&&e.onClose(),c=null,u=0,d=0}},_renderPicker:function(e,t,i){this._renderGrid(e,t,i);for(var n="",a=u.getFullYear(),r=d.getFullYear();a<=r;a++)n+='";w.innerHTML=n,w.value=i,g.value=t,y.classList.add("active")},_renderGrid:function(e,t,i){var n,a,r=void 0!==e,o=void 0!==t;if(e=~~e||~~elData(p,"day"),t=~~t,i=~~i,o||i){var l=0!==i,c=document.createDocumentFragment();c.appendChild(p),o||(t=~~elData(p,"month")),i=i||~~elData(p,"year");var f=new Date(i+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(fd&&(i=d.getFullYear(),t=d.getMonth(),e=d.getDate(),g.value=t,w.value=i,l=!0),f=new Date(i+"-"+("0"+(t+1).toString()).slice(-2)+"-01");f.getDay()!==s;)f.setDate(f.getDate()-1);elShow(h[35].parentNode);var m,C=new Date(u.getFullYear(),u.getMonth(),u.getDate());for(a=0;a<42;a++){if(35===a&&f.getMonth()!==t){elHide(h[35].parentNode);break}n=h[a],n.textContent=f.getDate(),m=f.getMonth()===t,m&&(fd&&(m=!1)),n.classList[m?"remove":"add"]("otherMonth"),f.setDate(f.getDate()+1)}if(elData(p,"month",t),elData(p,"year",i),y.insertBefore(c,b),!r&&(f=new Date(i,t,e),f.getDate()!==e)){for(;f.getMonth()!==t;)f.setDate(f.getDate()-1);e=f.getDate()}if(l){for(a=0;a<12;a++){var E=g.children[a];E.disabled=i===u.getFullYear()&&E.valued.getMonth()}var L=new Date(i+"-"+("0"+(t+1).toString()).slice(-2)+"-01");L.setMonth(L.getMonth()+1),v.classList[Lu?"add":"remove"]("active")}}if(e){for(a=0;a<35;a++)n=h[a],n.classList[n.classList.contains("otherMonth")||~~n.textContent!==e?"remove":"add"]("active");elData(p,"day",e)}this._formatValue()},_formatValue:function(){var t,i,n,a=l.get(c);"true"!==elData(c,"empty")&&(a.isDateTime?(t=new Date(elData(p,"year"),elData(p,"month"),elData(p,"day"),f.value,m.value),a.isTimeOnly?(i=e.formatTime(t),n=e.format(t,"H:i")):a.ignoreTimezone?(i=e.formatDateTime(t),n=e.format(t,"Y-m-dTH:i:s")):(i=e.formatDateTime(t),n=e.format(t,"c"))):(t=new Date(elData(p,"year"),elData(p,"month"),elData(p,"day")),i=e.formatDate(t),n=e.format(t,"Y-m-d")),c.value=i,elData(c,"value",t.getTime()),a.disableClear||a.clearButton.style.removeProperty("visibility"),a.shadow.value=n)},_createPicker:function(){if(null===y){y=elCreate("div"),y.className="datePicker",y.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()});var i=elCreate("header");y.appendChild(i),_=elCreate("a"),_.className="previous",_.innerHTML='',_.addEventListener(WCF_CLICK_EVENT,this.previousMonth.bind(this)),i.appendChild(_);var n=elCreate("span");i.appendChild(n),g=elCreate("select"),g.className="month",g.addEventListener("change",this._changeMonth.bind(this)),n.appendChild(g);var a,r="",o=t.get("__monthsShort");for(a=0;a<12;a++)r+='";g.innerHTML=r,w=elCreate("select"),w.className="year",w.addEventListener("change",this._changeYear.bind(this)),n.appendChild(w),v=elCreate("a"),v.className="next",v.innerHTML='',v.addEventListener(WCF_CLICK_EVENT,this.nextMonth.bind(this)),i.appendChild(v),p=elCreate("ul"),y.appendChild(p);var l=elCreate("li");l.className="weekdays",p.appendChild(l);var c,d=t.get("__daysShort");for(a=0;a<7;a++){var u=a+s;u>6&&(u-=7),c=elCreate("span"),c.textContent=d[u],l.appendChild(c)}var C,E,L=this._click.bind(this);for(a=0;a<6;a++){E=elCreate("li"),p.appendChild(E);for(var S=0;S<7;S++)C=elCreate("a"),C.addEventListener(WCF_CLICK_EVENT,L),h.push(C),E.appendChild(C)}b=elCreate("footer"),y.appendChild(b),f=elCreate("select"),f.className="hour",f.addEventListener("change",this._formatValue.bind(this));var x="",D=new Date(2e3,0,1),I=t.get("wcf.date.timeFormat").replace(/:/,"").replace(/[isu]/g,"");for(a=0;a<24;a++)D.setHours(a),x+='";for(f.innerHTML=x,b.appendChild(f),b.appendChild(document.createTextNode(" : ")),m=elCreate("select"),m.className="minute",m.addEventListener("change",this._formatValue.bind(this)),x="",a=0;a<60;a++)x+='";m.innerHTML=x,b.appendChild(m),document.body.appendChild(y)}},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")||(elData(c,"empty",!1),this._renderGrid(e.currentTarget.textContent),this._close())},getDate:function(e){return e=this._getElement(e),e.hasAttribute("data-value")?new Date(+elData(e,"value")):null},setDate:function(t,i){t=this._getElement(t);var n=l.get(t);elData(t,"value",i.getTime()),t.value=e["formatDate"+(n.isDateTime?"Time":"")](i);var a="";a=n.ignoreTimezone?"Y-m-dTH:i:s":n.isDateTime?"c":"Y-m-d",n.shadow.value=e.format(i,a)},getValue:function(e){e=this._getElement(e);var t=l.get(e);return t?t.shadow.value:""},clear:function(e){e=this._getElement(e);var t=l.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||t.clearButton.style.setProperty("visibility","hidden",""),t.isEmpty=!0,t.shadow.value=""},destroy:function(e){e=this._getElement(e);var t=l.get(e),i=e.parentNode;i.parentNode.insertBefore(e,i),elRemove(i),elAttr(e,"type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener(WCF_CLICK_EVENT,C),elRemove(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=E,E}),define("WoltLabSuite/Core/Ui/Page/Action",["Dictionary","Dom/Util"],function(e,t){"use strict";var i=new e,n=null,a=!1;return{setup:function(){a=!0,n=elCreate("ul"),n.className="pageAction",document.body.appendChild(n)},add:function(e,r,o){a===!1&&this.setup();var s=elCreate("li");if(r.classList.add("button"),r.classList.add("buttonPrimary"),s.appendChild(r),elAttr(s,"aria-hidden","toTop"===e?"true":"false"),elData(s,"name",e),"toTop"===e)s.className="toTop initiallyHidden",n.appendChild(s);else{var l=null;o&&(l=i.get(o),void 0!==l&&(l=l.parentNode)),null===l&&n.childElementCount&&(l=n.children[0]),null===l?t.prepend(s,n):n.insertBefore(s,l)}i.set(e,r),this._renderContainer()},has:function(e){return i.has(e)},get:function(e){return i.get(e)},remove:function(e){var t=i.get(e);if(void 0!==t){var a=t.parentNode;a.addEventListener("animationend",function(){try{n.removeChild(a),i.delete(e)}catch(e){}}),this.hide(e)}},hide:function(e){var t=i.get(e);t&&(elAttr(t.parentNode,"aria-hidden","true"),this._renderContainer())},show:function(e){var t=i.get(e);t&&(t.parentNode.classList.contains("initiallyHidden")&&t.parentNode.classList.remove("initiallyHidden"),elAttr(t.parentNode,"aria-hidden","false"),this._renderContainer())},_renderContainer:function(){var e=!1;if(n.childElementCount)for(var t=0,i=n.childElementCount;t',n.addEventListener(WCF_CLICK_EVENT,this._jump.bind(this)),i.add("toTop",n),window.addEventListener("scroll",this._scroll.bind(this)),this._afterScroll()}},_jump:function(e){e.preventDefault(),elById("top").scrollIntoView({behavior:"smooth"})},_scroll:function(){null!==this._timeoutScroll&&window.clearTimeout(this._timeoutScroll),this._timeoutScroll=window.setTimeout(this._callbackScrollEnd,100)},_afterScroll:function(){this._timeoutScroll=null,i[window.pageYOffset>=300?"show":"hide"]("toTop")}},n}),define("WoltLabSuite/Core/Bootstrap",["favico","enquire","perfect-scrollbar","WoltLabSuite/Core/Date/Time/Relative","Ui/SimpleDropdown","WoltLabSuite/Core/Ui/Mobile","WoltLabSuite/Core/Ui/TabMenu","WoltLabSuite/Core/Ui/FlexibleMenu","Ui/Dialog","WoltLabSuite/Core/Ui/Tooltip","WoltLabSuite/Core/Language","WoltLabSuite/Core/Environment","WoltLabSuite/Core/Date/Picker","EventHandler","Core","WoltLabSuite/Core/Ui/Page/JumpToTop"],function(e,t,i,n,a,r,o,s,l,c,d,u,h,p,f,m){"use strict";return window.Favico=e,window.enquire=t,null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=d.get,window.WCF.Language.add=d.add,window.WCF.Language.addObject=d.addObject,window.__wcf_bc_eventHandler=p,{setup:function(e){e=f.extend({enableMobileMenu:!0},e),u.setup(),n.setup(),h.init(),a.setup(),r.setup({enableMobileMenu:e.enableMobileMenu}),o.setup(),l.setup(),c.setup(),new m;for(var t=elBySelAll("form[method=get]"),i=0,s=t.length;i li",e),i=0,n=t.length;i"+i+"

    ")),r.content=c,r.state=C,o){var d=l.get(o).element;elData(d,"cache-id")===n&&this._show()}},_mouseEnter:function(e){if(!u){null!==h&&(window.clearTimeout(h),h=null);var t=a.identify(e.currentTarget);o===t&&null!==p&&(window.clearTimeout(p),p=null),d=t,h=window.setTimeout(function(){h=null,d===t&&this._show()}.bind(this),L)}},_mouseLeave:function(){d=null,null===p&&(null===v&&(v=this._hide.bind(this)),null!==p&&window.clearTimeout(p),p=window.setTimeout(v,E))},_popoverMouseEnter:function(){null!==p&&(window.clearTimeout(p),p=null)},_show:function(){null!==p&&(window.clearTimeout(p),p=null);var e=!1;f.classList.contains("active")?o!==d&&(this._hide(),e=!0):m.childElementCount&&(e=!0),e&&(f.classList.add("forceHide"),f.offsetTop,this._clearContent(),f.classList.remove("forceHide")),o=d;var t=l.get(o),i=s.get(elData(t.element,"cache-id"));i.state===C?(m.appendChild(i.content),this._rebuild(o)):i.state===w&&(i.state=y,c.get(t.identifier).loadCallback(t.objectId,this))},_hide:function(){null!==p&&(window.clearTimeout(p),p=null),f.classList.remove("active")},_clearContent:function(){if(o&&m.childElementCount&&!f.classList.contains("active"))for(var e=s.get(elData(l.get(o).element,"cache-id"));m.childNodes.length;)e.content.appendChild(m.childNodes[0])},_rebuild:function(){f.classList.contains("active")||(f.classList.remove("forceHide"),f.classList.add("active"),r.set(f,l.get(o).element,{pointer:!0,vertical:"top"}))},_ajaxSetup:function(){return{silent:!0}},ajaxApi:function(t,i,n){if("function"!=typeof i)throw new TypeError("Expected a valid callback for parameter 'success'.");e.api(this,t,i,n)}}}),define("WoltLabSuite/Core/Ui/User/Ignore",["List","Dom/ChangeListener"],function(e,t){"use strict";var i=elByClass("ignoredUserMessage"),n=null,a=new e;return{init:function(){n=this._removeClass.bind(this),this._rebuild(),t.add("WoltLabSuite/Core/Ui/User/Ignore",this._rebuild.bind(this))},_rebuild:function(){for(var e,t=0,r=i.length;te||o<0)for(var n,c=0,d=a.childElementCount;ce&&l.push(n)}i.classList[s.length?"add":"remove"]("active"),t.classList[l.length?"add":"remove"]("active")}},_setup:function(){t=elCreate("a"),t.className="mainMenuShowNext",t.href="#",t.innerHTML='',t.addEventListener(WCF_CLICK_EVENT,this._showNext.bind(this)),a.parentNode.appendChild(t),i=elCreate("a"),i.className="mainMenuShowPrevious",i.href="#",i.innerHTML='',i.addEventListener(WCF_CLICK_EVENT,this._showPrevious.bind(this)),a.parentNode.insertBefore(i,a.parentNode.firstChild);var e=this._rebuildVisibility.bind(this);n.addEventListener("transitionend",e),window.addEventListener("resize",function(){n.style.setProperty("margin-left","0px",""),o=0,e()}),this._enable()}}}),define("WoltLabSuite/Core/BootstrapFrontend",["Ajax","WoltLabSuite/Core/Bootstrap","WoltLabSuite/Core/Controller/Style/Changer","WoltLabSuite/Core/Controller/Popover","WoltLabSuite/Core/Ui/User/Ignore","WoltLabSuite/Core/Ui/Page/Header/Menu"],function(e,t,i,n,a,r){"use strict";var o=0;return{setup:function(e){e.backgroundQueue.url=WSC_API_URL+e.backgroundQueue.url.substr(WCF_PATH.length),t.setup(),r.init(),e.styleChanger&&i.setup(),e.enableUserPopover&&this._initUserPopover(),this._invokeBackgroundQueue(e.backgroundQueue.url,e.backgroundQueue.force),a.init()},_initUserPopover:function(){n.init({attributeName:"data-user-id",className:"userLink",identifier:"com.woltlab.wcf.user",loadCallback:function(e,t){var i=function(i){t.setContent("com.woltlab.wcf.user",e,i.returnValues.template)};t.ajaxApi({actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]},i,i)}})},_invokeBackgroundQueue:function(t,i){var n=this._invokeBackgroundQueue.bind(this,t,!0);(Math.random()<.1||i)&&e.apiOnce({url:t,ignoreError:!0,silent:!0,success:function(e){o++,e>0&&o<5&&setTimeout(n,1e3)}.bind(this)})}}}),define("WoltLabSuite/Core/ColorUtil",[],function(){"use strict";var e={hsvToRgb:function(e,t,i){var n,a,r,o,s,l={r:0,g:0,b:0};if(n=Math.floor(e/60),a=e/60-n,t/=100,i/=100,r=i*(1-t),o=i*(1-t*a),s=i*(1-t*(1-a)),0==t)l.r=l.g=l.b=i;else switch(n){case 1:l.r=o,l.g=i,l.b=r;break;case 2:l.r=r,l.g=i,l.b=s;break;case 3:l.r=r,l.g=o,l.b=i;break;case 4:l.r=s,l.g=r,l.b=i;break;case 5:l.r=i,l.g=r,l.b=o;break;case 0:case 6:l.r=i,l.g=s,l.b=r}return{r:Math.round(255*l.r),g:Math.round(255*l.g),b:Math.round(255*l.b)}},rgbToHsv:function(e,t,i){var n,a,r,o,s,l;if(e/=255,t/=255,i/=255,o=Math.max(Math.max(e,t),i),s=Math.min(Math.min(e,t),i),l=o-s,n=0,o!==s){switch(o){case e:n=60*((t-i)/l);break;case t:n=60*(2+(i-e)/l);break;case i:n=60*(4+(e-t)/l)}n<0&&(n+=360)}return a=0===o?0:l/o,r=o,{h:Math.round(n),s:Math.round(100*a),v:Math.round(100*r)}},hexToRgb:function(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){var t=e.split("");return"#"===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)}}return Number.NaN},rgbToHex:function(e,t,i){var n="0123456789ABCDEF";return void 0===t&&e.toString().match(/^rgba?\((\d+), ?(\d+), ?(d\+)(?:, ?[0-9.]+)?\)$/)&&(e=RegExp.$1,t=RegExp.$2,i=RegExp.$3),n.charAt((e-e%16)/16)+""+n.charAt(e%16)+(n.charAt((t-t%16)/16)+""+n.charAt(t%16))+(n.charAt((i-i%16)/16)+""+n.charAt(i%16))}};return window.__wcf_bc_colorUtil=e,e}),define("WoltLabSuite/Core/Permission",["Dictionary"],function(e){"use strict";var t=new e;return{add:function(e,i){if("boolean"!=typeof i)throw new TypeError("Permission value has to be boolean.");t.set(e,i)},addObject:function(e){for(var t in e)objOwns(e,t)&&this.add(t,e[t])},get:function(e){return!!t.has(e)&&t.get(e)}}}),define("WoltLabSuite/Core/Upload",["AjaxRequest","Core","Dom/ChangeListener","Language","Dom/Util","Dom/Traverse"],function(e,t,i,n,a,r){"use strict";function o(e,i,n){if(n=n||{},void 0===n.className)throw new Error("Missing class name.");if(this._options=t.extend({action:"upload",multiple:!1,name:"__files[]",singleFileRequests:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n),this._options.url=t.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url),this._buttonContainer=elById(e),null===this._buttonContainer)throw new Error("Element id '"+e+"' is unknown.");if(this._target=elById(i),null===i)throw new Error("Element id '"+i+"' is unknown.");if(n.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 o.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.className="button uploadButton";var e=elCreate("span");e.textContent=n.get("wcf.global.button.upload"),this._button.appendChild(e),a.prepend(this._fileUpload,this._button),this._insertButton(),i.trigger()},_createFileElement:function(e){var t=elCreate("progress");if(elAttr(t,"max",100),"OL"===this._target.nodeName||"UL"===this._target.nodeName){var i=elCreate("li");return i.innerText=e.name,i.appendChild(t),this._target.appendChild(i),i}var n=elCreate("p");return n.appendChild(t),this._target.appendChild(n),n},_createFileElements:function(e){if(e.length){var t=this._fileElements.length;this._fileElements[t]=[];for(var n=0,a=e.length;n for id \''+e+"'.");t.init(e,i,n,a),t.registerCallback(e,"select",this._callbackSelect.bind(this)),t.registerCallback(e,"submit",this._callbackSubmit.bind(this))},_callbackSelect:function(e){void 0!==window.jQuery&&window.jQuery(e).redactor("code.set",e.value)},_callbackSubmit:function(e){void 0!==window.jQuery&&(e.value=window.jQuery(e).redactor("code.get"))}}}),define("WoltLabSuite/Core/Ui/Notification",["Language"],function(e){"use strict";var t=!1,i=null,n=null,a=null,r=null,o=null,s={show:function(s,l,c){t||(this._init(),i="function"==typeof l?l:null,n.className=c||"success",n.textContent=e.get(s||"wcf.global.success"),t=!0,a.classList.add("active"),r=setTimeout(o,2e3))},_init:function(){null===a&&(o=this._hide.bind(this),a=elCreate("div"),a.id="systemNotification",n=elCreate("p"),n.addEventListener(WCF_CLICK_EVENT,o),a.appendChild(n),document.body.appendChild(a))},_hide:function(){clearTimeout(r),a.classList.remove("active"),null!==i&&i(),t=!1}};return s}),define("WoltLabSuite/Core/Media/Editor",["Ajax","Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Language","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Language/Chooser","WoltLabSuite/Core/Language/Input","EventKey"],function(e,t,i,n,a,r,o,s,l,c,d){"use strict";function u(e){if(this._callbackObject=e||{},this._callbackObject._editorClose&&"function"!=typeof this._callbackObject._editorClose)throw new TypeError("Callback object has no function '_editorClose'.");if(this._callbackObject._editorSuccess&&"function"!=typeof this._callbackObject._editorSuccess)throw new TypeError("Callback object has no function '_editorSuccess'.");this._media=null,this._availableLanguageCount=1,this._categoryIds=[],this._oldCategoryId=0,this._dialogs=new i}return u.prototype={_ajaxSetup:function(){return{data:{actionName:"update",className:"wcf\\data\\media\\MediaAction"}}},_ajaxSuccess:function(e){s.show(),this._callbackObject._editorSuccess&&(this._callbackObject._editorSuccess(this._media,this._oldCategoryId),this._oldCategoryId=0),o.close("mediaEditor_"+this._media.mediaID),this._media=null},_close:function(){this._media=null,this._callbackObject._editorClose&&this._callbackObject._editorClose()},_keyPress:function(e){d.Enter(e)&&(e.preventDefault(),this._saveData())},_saveData:function(){var t=o.getDialog("mediaEditor_"+this._media.mediaID).content,i=elBySel("select[name=categoryID]",t),n=elBySel("input[name=altText]",t),s=elBySel("textarea[name=caption]",t),d=elBySel("input[name=title]",t),u=!1,h=!!n&&a.childByClass(n.parentNode.parentNode,"innerError"),p=!!s&&a.childByClass(s.parentNode.parentNode,"innerError"),f=a.childByClass(d.parentNode.parentNode,"innerError");if(this._oldCategoryId=this._media.categoryID,this._categoryIds.length&&(this._media.categoryID=~~i.value,this._categoryIds.indexOf(this._media.categoryID)===-1&&(this._media.categoryID=0)),this._availableLanguageCount>1?(this._media.isMultilingual=~~elBySel("input[name=isMultilingual]",t).checked,this._media.languageID=this._media.isMultilingual?null:l.getLanguageId("languageID")):this._media.languageID=LANGUAGE_ID,this._media.altText={},this._media.caption={},this._media.title={},this._availableLanguageCount>1&&this._media.isMultilingual){if(elById("altText_"+this._media.mediaID)&&!c.validate("altText_"+this._media.mediaID,!0)&&(u=!0,!h)){var m=elCreate("small");m.className="innerError",m.textContent=r.get("wcf.global.form.error.multilingual"),n.parentNode.parentNode.appendChild(m)}if(elById("caption_"+this._media.mediaID)&&!c.validate("caption_"+this._media.mediaID,!0)&&(u=!0,!p)){var m=elCreate("small");m.className="innerError",m.textContent=r.get("wcf.global.form.error.multilingual"),s.parentNode.parentNode.appendChild(m)}if(!c.validate("title_"+this._media.mediaID,!0)&&(u=!0,!f)){var m=elCreate("small");m.className="innerError",m.textContent=r.get("wcf.global.form.error.multilingual"),d.parentNode.parentNode.appendChild(m)}this._media.altText=elById("altText_"+this._media.mediaID)?c.getValues("altText_"+this._media.mediaID).toObject():"",this._media.caption=elById("caption_"+this._media.mediaID)?c.getValues("caption_"+this._media.mediaID).toObject():"",this._media.title=c.getValues("title_"+this._media.mediaID).toObject()}else this._media.altText[this._media.languageID]=n?n.value:"",this._media.caption[this._media.languageID]=s?s.value:"",this._media.title[this._media.languageID]=d.value;for(var g={allowAll:~~elById("mediaEditor_"+this._media.mediaID+"_aclAllowAll").checked,group:[],user:[]},v=elBySelAll('input[name="aclValues[group][]"]',t),_=0,b=v.length;_1&&l.setLanguageId("languageID",this._media.languageID||LANGUAGE_ID),this._categoryIds.length&&(elBySel("select[name=categoryID]",e).value=~~this._media.categoryID);var t=elBySel("input[name=title]",e),a=elBySel("input[name=altText]",e),r=elBySel("textarea[name=caption]",e);if(this._availableLanguageCount>1&&this._media.isMultilingual?(elById("altText_"+this._media.mediaID)&&c.setValues("altText_"+this._media.mediaID,i.fromObject(this._media.altText||{})),elById("caption_"+this._media.mediaID)&&c.setValues("caption_"+this._media.mediaID,i.fromObject(this._media.caption||{})),c.setValues("title_"+this._media.mediaID,i.fromObject(this._media.title||{}))):(t.value=this._media.title?this._media.title[LANGUAGE_ID]:"",a&&(a.value=this._media.altText?this._media.altText[LANGUAGE_ID]:""),r&&(r.value=this._media.caption?this._media.caption[LANGUAGE_ID]:"")),this._availableLanguageCount>1){var o=elBySel("input[name=isMultilingual]",e);o.addEventListener("change",this._updateLanguageFields.bind(this)),this._updateLanguageFields(null,o)}var s=this._keyPress.bind(this);a&&a.addEventListener("keypress",s),t.addEventListener("keypress",s),elBySel("button[data-type=submit]",e).addEventListener(WCF_CLICK_EVENT,this._saveData.bind(this)),document.activeElement.blur(),elById("mediaEditor_"+this._media.mediaID).parentNode.scrollTop=0,n.trigger()}.bind(this),0)}.bind(this),data:{actionName:"getEditorDialog",className:"wcf\\data\\media\\MediaAction",objectIDs:[e.mediaID]}}}}.bind(this)}),o.open(this._dialogs.get("mediaEditor_"+e.mediaID))}},u}),define("WoltLabSuite/Core/Media/Upload",["Core","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","Permission","Upload"],function(e,t,i,n,a,r,o,s){"use strict";function l(t,i,n){n=n||{},this._mediaManager=null,n.mediaManager&&(this._mediaManager=n.mediaManager,delete n.mediaManager),this._categoryId=null,s.call(this,t,i,e.extend({className:"wcf\\data\\media\\MediaAction",multiple:!!this._mediaManager,singleFileRequests:!0},n))}return e.inherit(l,s,{_createFileElement:function(e){var i;i="OL"===this._target.nodeName||"UL"===this._target.nodeName?elCreate("li"):elCreate("p");var a=elCreate("div");a.className="mediaThumbnail",i.appendChild(a);var r=elCreate("span");r.className="icon icon144 fa-spinner",a.appendChild(r);var o=elCreate("div");o.className="mediaInformation",i.appendChild(o);var s=elCreate("p");s.className="mediaTitle",s.textContent=e.name,o.appendChild(s);var l=elCreate("progress");return elAttr(l,"max",100),o.appendChild(l),n.prepend(i,this._target),t.trigger(),i},_getParameters:function(){if(this._mediaManager){var t={imagesOnly:this._mediaManager.getOption("imagesOnly")},i=this._mediaManager.getCategoryId();return i&&(t.categoryID=i),e.extend(l._super.prototype._getParameters.call(this),t)}return l._super.prototype._getParameters.call(this)},_success:function(e,n){for(var o=this._fileElements[e],s=0,l=o.length;s0){var i=t.parentNode.previousElementSibling;null!==i&&i.classList.remove("active")}},_addItem:function(e,t){var i=l.get(e),n=elCreate("li");n.className="item";var a=elCreate("span");a.className="content",elData(a,"object-id",t.objectId),a.textContent=t.value;var r=elCreate("a");r.className="icon icon16 fa-times",r.addEventListener(WCF_CLICK_EVENT,p),n.appendChild(a),n.appendChild(r),i.list.insertBefore(n,i.listItem),i.suggestion.addExcludedValue(t.value),i.element.value="",this._handleLimit(e);var o=this._syncShadow(i);"function"==typeof i.options.callbackChange&&(null===o&&(o=this.getValues(e)),i.options.callbackChange(e,o))},_removeItem:function(e,t,i){t=null===e?t:e.currentTarget.parentNode;var n=t.parentNode,a=elData(n,"element-id"),r=l.get(a);r.suggestion.removeExcludedValue(t.children[0].textContent),n.removeChild(t),i||r.element.focus(),this._handleLimit(a);var o=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===o&&(o=this.getValues(a)),r.options.callbackChange(a,o))},_syncShadow:function(e){if(!e.options.isCSV)return null;for(var t="",i=this.getValues(e.element.id),n=0,a=i.length;n~~elAttr(s,"max")?a.disabled=!0:a.disabled=!1},_submit:function(e){o.get(n).callback(~~s.value),i.close(this)},_dialogSetup:function(){var t='
    ";return{id:"paginationOverlay",options:{onSetup:function(e){s=elByTag("input",e)[0],s.addEventListener("keyup",this._keyUp.bind(this)),r=elByTag("small",e)[0],a=elByTag("button",e)[0],a.addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))}.bind(this),title:e.get("wcf.global.page.pagination")},source:t}}};return l}),define("WoltLabSuite/Core/Ui/Pagination",["Core","Language","ObjectMap","StringUtil","WoltLabSuite/Core/Ui/Page/JumpTo"],function(e,t,i,n,a){"use strict";function r(e,t){this.init(e,t)}return r.prototype={SHOW_LINKS:11,init:function(t,i){this._element=t,this._options=e.extend({activePage:1,maxPage:1,callbackShouldSwitch:null,callbackSwitch:null},i),"function"!=typeof this._options.callbackShouldSwitch&&(this._options.callbackShouldSwitch=null),"function"!=typeof this._options.callbackSwitch&&(this._options.callbackSwitch=null),this._element.classList.add("pagination"),this._rebuild(this._element)},_rebuild:function(){var e=!1;this._element.innerHTML="";var i,n=elCreate("ul"),r=elCreate("li");r.className="skip",n.appendChild(r);var o="icon icon24 fa-chevron-left";this._options.activePage>1?(i=elCreate("a"),i.className=o+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.previous"),r.appendChild(i),i.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage-1))):(r.innerHTML='',r.classList.add("disabled")),n.appendChild(this._createLink(1));var s=this.SHOW_LINKS-4,l=this._options.activePage-2;l<0&&(l=0);var c=this._options.maxPage-(this._options.activePage+1);c<0&&(c=0),this._options.activePage>1&&this._options.activePagethis._options.maxPage-1&&(h=this._options.maxPage-1),l>=d?u-=d:(u-=l,h+=d-l),c>=d?h+=d:(h+=c,u-=d-c),h=Math.ceil(h),u=Math.ceil(u),u<1&&(u=1),h>this._options.maxPage&&(h=this._options.maxPage);var p='';u>1&&(u-1<2?n.appendChild(this._createLink(2)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=p,n.appendChild(r),e=!0));for(var f=u+1;f',r.classList.add("disabled")),e&&(elData(n,"pages",this._options.maxPage),a.init(n,this.switchPage.bind(this))),this._element.appendChild(n)},_createLink:function(e){var i=elCreate("li");if(e!==this._options.activePage){var a=elCreate("a");a.textContent=n.addThousandsSeparator(e),a.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,e)),i.appendChild(a)}else i.classList.add("active"),i.innerHTML=""+n.addThousandsSeparator(e)+'";return i},getActivePage:function(){return this._options.activePage},getElement:function(){return this._element},getMaxPage:function(){return this._options.maxPage},switchPage:function(e,t){if("object"==typeof t&&t.preventDefault(),e=~~e,e>0&&this._options.activePage!==e&&e<=this._options.maxPage){if(null!==this._options.callbackShouldSwitch&&this._options.callbackShouldSwitch(e)!==!0)return;this._options.activePage=e,this._rebuild(),null!==this._options.callbackSwitch&&this._options.callbackSwitch(e)}}},r}),define("WoltLabSuite/Core/Ui/Scroll",["Dom/Util"],function(e){"use strict";var t=null,i=null,n=null;return{element:function(n,a){if(!(n instanceof Element))throw new TypeError("Expected a valid DOM element.");if(void 0!==a&&"function"!=typeof a)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(n))throw new Error("Element must be part of the visible DOM.");if(null!==t)throw new Error("Cannot scroll to element, a concurrent request is running.");a&&(t=a,null===i&&(i=this._onScroll.bind(this)),window.addEventListener("scroll",i));var r=e.offset(n).top;r<=50?r=0:r-=50;var o=window.pageYOffset;window.scrollTo({left:0,top:r,behavior:"smooth"}),window.setTimeout(function(){o===window.pageYOffset&&this._onScroll()}.bind(this),100)},_onScroll:function(){null!==n&&window.clearTimeout(n),n=window.setTimeout(function(){null!==t&&t(),window.removeEventListener("scroll",i),t=null,n=null},100)}}}),define("WoltLabSuite/Core/Media/List/Upload",["Core","Dom/ChangeListener","Dom/Traverse","Dom/Util","Language","Ui/Confirmation","Ui/Notification","../Upload"],function(e,t,i,n,a,r,o,s){"use strict";function l(e,t,i){i=i||{},i.multiple=!1,s.call(this,e,t,i)}return e.inherit(l,s,{_createButton:function(){this._fileUpload=elCreate("input"),elAttr(this._fileUpload,"type","file"),elAttr(this._fileUpload,"name",this._options.name),this._fileUpload.addEventListener("change",this._upload.bind(this)),this._button=elCreate("p"),this._button.className="button uploadButton",this._button.innerHTML=' '+a.get("wcf.global.button.upload")+"",n.prepend(this._fileUpload,this._button),this._insertButton(),t.trigger()},_success:function(e,t){var n=i.childByClass(this._button,"icon");n.classList.remove("fa-spinner"),n.classList.add("fa-upload");var s=this._fileElements[e][0],l=elData(s,"internal-file-id"),c=t.returnValues.media[l];if(c)o.show(a.get("wcf.media.upload.success"),function(){window.location.reload()});else{var d=t.returnValues.errors[l];d||(d={errorType:"uploadFailed",filename:elData(s,"filename")}),r.show({confirm:function(){},message:a.get("wcf.media.upload.error."+d.errorType,{filename:d.filename})})}},_upload:function(e,t,n){var a=l._super.prototype._upload.call(this,e,t,n),r=i.childByClass(this._button,"icon");return window.setTimeout(function(){r.classList.remove("fa-upload"),r.classList.add("fa-spinner")},500),a}}),l}),define("WoltLabSuite/Core/Controller/Media/List",["EventHandler","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/List/Upload"],function(e,t,i,n){"use strict";var a;return{init:function(r){r=r||{},new n("uploadButton","mediaFile"),t.setup({hasMarkedItems:r.hasMarkedItems||!1,pageClassName:"wcf\\acp\\page\\MediaListPage"}),e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.media",this._clipboardAction.bind(this));var o=new WCF.Action.Delete("wcf\\data\\media\\MediaAction",".jsMediaRow");o.setCallback(t.reload.bind(t)),a=new i({_editorSuccess:function(e,t){e.categoryID!=t&&window.setTimeout(function(){window.location.reload()},500)}});for(var s=elByClass("jsMediaEditButton"),l=0,c=s.length;l=this._mediaManager.getOption("minSearchLength")?(this._hideStringThresholdError(),this.search()):this._showStringThresholdError())},_showStringThresholdError:function(){var e=i.childByClass(this._input.parentNode.parentNode,"innerInfo");e?elShow(e):(e=elCreate("p"),e.className="innerInfo",e.textContent=r.get("wcf.media.search.info.searchStringThreshold"),n.insertAfter(e,this._input.parentNode))},hideSearch:function(){elHide(this._searchContainer)},resetSearch:function(){this._input.value=""},showSearch:function(){elShow(this._searchContainer)},search:function(t){"number"!=typeof t&&(t=1);var i=this._input.value;i&&this._input.value.length select",e),this._mediaCategorySelect&&this._mediaCategorySelect.addEventListener("change",this._categoryChange.bind(this));for(var t=n.childrenByTag(this._mediaManagerMediaList,"LI"),i=0,o=t.length;i1){var i=elCreate("div");i.className="paginationBottom jsPagination",a.replaceElement(elBySel(".jsPagination",c.getDialog(this).content),i),this._pagination=new g(i,{activePage:t,callbackSwitch:this._search.search.bind(this._search),maxPage:e})}else this._pagination&&elHide(this._pagination.getElement())},_removeClipboardCheckboxes:function(){for(var e=elByClass("mediaCheckbox",this._mediaManagerMediaList);e.length;)elRemove(e[0])},_setMedia:function(r){e.isPlainObject(r)?this._media=t.fromObject(r):this._media=r;var s=n.nextByClass(this._mediaManagerMediaList,"info");this._media.size?s&&elHide(s):(null===s&&(s=elCreate("p"),s.className="info",s.textContent=o.get("wcf.media.search.noResults")),elShow(s),a.insertAfter(s,this._mediaManagerMediaList));for(var c=n.childrenByTag(this._mediaManagerMediaList,"LI"),d=0,h=c.length;d ",c=elCreate("li"),c.className="jsDeleteButton",elData(c,"object-id",t.mediaID);var p=e.getUuid();elData(c,"confirm-message-html",m.unescapeHTML(o.get("wcf.media.delete.confirmMessage",{title:p})).replace(p,m.escapeHTML(t.filename))),s.appendChild(c),c.innerHTML=' "}}},v}),define("WoltLabSuite/Core/Media/Manager/Editor",["Core","Dictionary","Dom/Traverse","EventHandler","Language","Permission","Ui/Dialog","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Manager/Base"],function(e,t,i,n,a,r,o,s,l){"use strict";function c(i){i=e.extend({callbackInsert:null},i),l.call(this,i),this._forceClipboard=!0,this._activeButton=null;var a=this._options.editor?this._options.editor.core.toolbar()[0]:void 0;this._buttons=elByClass(this._options.buttonClass||"jsMediaEditorButton",a);for(var r=0,o=this._buttons.length;r'+a.get("wcf.media.insert.imageSize."+t[i])+"";e+='";var r='
    '+a.get("wcf.media.insert.imageSize")+'
    ";o.open({_dialogSetup:function(){return{id:this._getInsertDialogId(),options:{onClose:this._editorClose.bind(this),onSetup:function(e){elByClass("buttonPrimary",e)[0].addEventListener(WCF_CLICK_EVENT,this._insertMedia.bind(this));var t=elBySel(".thumbnailSizeSelection",e);elShow(t)}.bind(this),title:a.get("wcf.media.insert")},source:r}}.bind(this)})},_click:function(e){this._activeButton=e.currentTarget,c._super.prototype._click.call(this,e)},_clipboardAction:function(e){c._super.prototype._clipboardAction.call(this,e),"com.woltlab.wcf.media.insert"===e.data.actionName&&this.insertMedia(e.data.parameters.objectIDs,!0)},_dialogShow:function(){c._super.prototype._dialogShow.call(this),this._uploadData&&(this._uploadData.file?this._upload.uploadFile(this._uploadData.file):this._uploadId=this._upload.uploadBlob(this._uploadData.blob),this._uploadData=null)},_editorUpload:function(e){this._uploadData=e,o.open(this)},_getInsertDialogId:function(){var e="mediaInsert";return this._mediaToInsert.forEach(function(t,i){e+="-"+i}),e},_getThumbnailSizes:function(){for(var e,t,i=[],n=["small","medium","large"],a=0,r=n.length;a')}else this._options.editor.insert.text("[wsm='"+t.mediaID+"'][/wsm]")},_mediaUploaded:function(e){null!==this._uploadId&&this._upload===e.upload&&(this._uploadId===e.uploadId||Array.isArray(this._uploadId)&&this._uploadId.indexOf(e.uploadId)!==-1)&&(this._mediaToInsert=t.fromObject(e.media),this._insertMedia(null,"medium",!1),this._uploadId=null)},_openInsertDialog:function(e){this.insertMedia([~~elData(e.currentTarget,"object-id")])},insertMedia:function(e,i){this._mediaToInsert=new t,this._mediaToInsertByClipboard=i||!1;for(var n,a=!0,r=0,s=e.length;r ul",t),n=elCreate("li");i.appendChild(n),n.innerHTML=' "}}),c}),define("WoltLabSuite/Core/Media/Manager/Select",["Core","Dom/Traverse","Dom/Util","Language","ObjectMap","Ui/Dialog","WoltLabSuite/Core/Media/Manager/Base"],function(e,t,i,n,a,r,o){"use strict";function s(e){o.call(this,e),this._activeButton=null,this._buttons=elByClass(this._options.buttonClass||"jsMediaSelectButton"),this._storeElements=new a;for(var t=0,n=this._buttons.length;t':n.innerHTML='

    '+t.filename+"

    "+t.formattedFilesize+"

    ")}elShow(this._activeButton.nextElementSibling),r.close(this)},_click:function(e){if(e.preventDefault(),this._activeButton=e.currentTarget,s._super.prototype._click.call(this,e),this._mediaManagerMediaList)for(var i,n=this._storeElements.get(this._activeButton),a=t.childrenByTag(this._mediaManagerMediaList,"LI"),r=0,o=a.length;r ul",t),a=elCreate("li");a.className="jsMediaSelectButton",elData(a,"object-id",e.mediaID),i.appendChild(a),a.innerHTML=' "},_removeMedia:function(e){e.preventDefault();var t=e.currentTarget;elHide(t);var i=t.previousElementSibling;elById(elData(i,"store")).value=0;var n=elData(i,"display");if(n){var a=elById(n);a&&(a.innerHTML="")}}}),s}),define("WoltLabSuite/Core/Ui/Search/Input",["Ajax","Core","EventKey","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,a){"use strict";function r(e,t){this.init(e,t)}return r.prototype={init:function(e,i){if(this._element=e,!(this._element instanceof Element))throw new TypeError("Expected a valid DOM element.");if("INPUT"!==this._element.nodeName||"search"!==this._element.type&&"text"!==this._element.type)throw new Error('Expected an input[type="text"].');this._activeItem=null,this._dropdownContainerId="",this._lastValue="",this._list=null,this._request=null,this._timerDelay=null,this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction"},callbackDropdownInit:null,callbackSelect:null,delay:500,excludedSearchValues:[],minLength:3,noResultPlaceholder:"",preventSubmit:!1},i),elAttr(this._element,"autocomplete","off"),this._element.addEventListener("keydown",this._keydown.bind(this)),this._element.addEventListener("keyup",this._keyup.bind(this))},addExcludedSearchValues:function(e){this._options.excludedSearchValues.indexOf(e)===-1&&this._options.excludedSearchValues.push(e)},removeExcludedSearchValues:function(e){var t=this._options.excludedSearchValues.indexOf(e);t!==-1&&this._options.excludedSearchValues.splice(t,1)},_keydown:function(e){(null!==this._activeItem&&a.isOpen(this._dropdownContainerId)||this._options.preventSubmit)&&i.Enter(e)&&e.preventDefault(),(i.ArrowUp(e)||i.ArrowDown(e)||i.Escape(e))&&e.preventDefault()},_keyup:function(e){if(null!==this._activeItem){if(!a.isOpen(this._dropdownContainerId))return;if(i.ArrowUp(e))return e.preventDefault(),this._keyboardPreviousItem();if(i.ArrowDown(e))return e.preventDefault(),this._keyboardNextItem();if(i.Enter(e))return e.preventDefault(),this._keyboardSelectItem()}if(i.Escape(e))return void a.close(this._dropdownContainerId);var t=this._element.value.trim();if(this._lastValue!==t)return this._lastValue=t,t.length':e.icon,n.appendChild(t.children[0]),t.appendChild(n),t}}),i}),define("WoltLabSuite/Core/Ui/Acl/Simple",["Language","StringUtil","Dom/ChangeListener","WoltLabSuite/Core/Ui/User/Search/Input"],function(e,t,i,n){"use strict";function a(e){this.init(e)}return a.prototype={init:function(e){this._prefix=e||"",this._build()},_build:function(){var e=elById(this._prefix+"aclInputContainer");elById(this._prefix+"aclAllowAll").addEventListener("change",function(){elHide(e)}),elById(this._prefix+"aclAllowAll_no").addEventListener("change",function(){elShow(e)}),this._list=elById(this._prefix+"aclAccessList"),this._list.addEventListener(WCF_CLICK_EVENT,this._removeItem.bind(this));var t=[];elBySelAll(".aclLabel",this._list,function(e){t.push(e.textContent)}),this._searchInput=new n(elById(this._prefix+"aclSearchInput"),{callbackSelect:this._select.bind(this),includeUserGroups:!0,excludedSearchValues:t,preventSubmit:!0}),this._aclListContainer=elById(this._prefix+"aclListContainer"),i.trigger()},_select:function(n){var a=elData(n,"type"),r=elData(n,"label"),o='';o+=''+t.escapeHTML(r)+"",o+='',o+='';var s=elCreate("li");s.innerHTML=o;var l=elBySel(".fa-user",this._list);return null===l?this._list.appendChild(s):this._list.insertBefore(s,l.parentNode),elShow(this._aclListContainer),this._searchInput.addExcludedSearchValues(r),i.trigger(),!1},_removeItem:function(e){if(e.target.classList.contains("fa-times")){var t=elBySel(".aclLabel",e.target.parentNode);this._searchInput.removeExcludedSearchValues(t.textContent),elRemove(e.target.parentNode),0===this._list.childElementCount&&elHide(this._aclListContainer)}}},a}),define("WoltLabSuite/Core/Ui/Article/MarkAllAsRead",["Ajax"],function(e){"use strict";return{init:function(){elBySelAll(".markAllAsReadButton",void 0,function(e){e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))}.bind(this))},_click:function(t){t.preventDefault(),e.api(this)},_ajaxSuccess:function(){var e=elBySel(".mainMenu .active .badge");e&&elRemove(e),elBySelAll(".articleList .newMessageBadge",void 0,elRemove)},_ajaxSetup:function(){return{data:{actionName:"markAllAsRead",className:"wcf\\data\\article\\ArticleAction"}}}}}),define("WoltLabSuite/Core/Ui/Color/Picker",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}var i=function(e,t){return"object"==typeof window.WCF&&"function"==typeof window.WCF.ColorPicker?(i=function(e,t){var i=new window.WCF.ColorPicker(e);return"function"==typeof t.callbackSubmit&&i.setCallbackSubmit(t.callbackSubmit),i})(e,t):(0===n.length&&(window.__wcf_bc_colorPickerInit=function(){n.forEach(function(e){i(e[0],e[1])}),window.__wcf_bc_colorPickerInit=void 0,n=[]}),void n.push([e,t]))},n=[];return t.prototype={init:function(t,n){if(!(t instanceof Element))throw new TypeError("Expected a valid DOM element, use `UiColorPicker.fromSelector()` if you want to use a CSS selector.");this._options=e.extend({callbackSubmit:null},n),i(t,n)}},t.fromSelector=function(e){elBySelAll(e,void 0,function(e){new t(e)})},t}),define("WoltLabSuite/Core/Ui/Comment/Add",["Ajax","Core","EventHandler","Language","Dom/ChangeListener","Dom/Util","Dom/Traverse","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Ui/Scroll","EventKey","User","WoltLabSuite/Core/Controller/Captcha"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";function p(e){this.init(e)}return p.prototype={init:function(e){this._container=e,this._content=elBySel(".commentListAddComment",this._container),this._textarea=elBySel(".wysiwygTextarea",this._container),this._editor=null,this._loadingOverlay=null,this._content.addEventListener(WCF_CLICK_EVENT,function(e){this._content.classList.contains("collapsed")&&(e.preventDefault(),this._content.classList.remove("collapsed"),c.element(this._container,function(){window.jQuery(this._textarea).redactor("WoltLabCaret.endOfEditor")}.bind(this)))}.bind(this));var t=elBySel('button[data-type="save"]',this._container);t.addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))},_submitGuestDialog:function(e){if("keypress"!==e.type||d.Enter(e)){var i=elBySel("input[name=username]",e.currentTarget.closest(".dialogContent"));if(""===i.value){var a=o.nextByClass(i,"innerError");return void(a||(a=elCreate("small"),a.className="innerError",a.innerText=n.get("wcf.global.form.error.empty"),r.insertAfter(a,i),i.closest("dl").classList.add("formError")))}var s={parameters:{data:{username:i.value}}},l=elData(e.currentTarget,"captcha-id");h.has(l)&&(s=t.extend(s,h.getData(l))),this._submit(void 0,s)}},_submit:function(n,a){if(n&&n.preventDefault(),this._validate()){this._showLoadingOverlay();var r=this._container.closest(".commentList"),o={data:{message:this._getEditor().code.get(),objectID:elData(r,"object-id"),objectTypeID:elData(r,"object-type-id")}};i.fire("com.woltlab.wcf.redactor2","submit_text",o.data),u.userId||a||(o.requireGuestDialog=!0),e.api(this,t.extend({parameters:o},a))}},_validate:function(){for(var e=elByClass("innerError",this._container);e.length;)elRemove(e[0]);if(this._getEditor().utils.isEmpty())return this.throwError(this._textarea,n.get("wcf.global.form.error.empty")),!1;var t={api:this,editor:this._getEditor(),message:this._getEditor().code.get(),valid:!0};return i.fire("com.woltlab.wcf.redactor2","validate_text",t),t.valid!==!1},throwError:function(e,t){var i=elCreate("small");i.className="innerError",i.textContent="empty"===t?n.get("wcf.global.form.error.empty"):t,r.insertAfter(i,e)},_showLoadingOverlay:function(){null===this._loadingOverlay&&(this._loadingOverlay=elCreate("div"),this._loadingOverlay.className="commentLoadingOverlay",this._loadingOverlay.innerHTML=''),this._content.classList.add("loading"),this._content.appendChild(this._loadingOverlay)},_hideLoadingOverlay:function(){this._content.classList.remove("loading");var e=elBySel(".commentLoadingOverlay",this._content);null!==e&&e.parentNode.removeChild(e)},_reset:function(){this._getEditor().code.set("

    ​

    "),i.fire("com.woltlab.wcf.redactor2","reset_text"),document.activeElement&&document.activeElement.blur(),this._content.classList.add("collapsed")},_handleError:function(e){this.throwError(this._textarea,e.returnValues.errorType)},_getEditor:function(){if(null===this._editor){if("function"!=typeof window.jQuery)throw new Error("Unable to access editor, jQuery has not been loaded yet.");this._editor=window.jQuery(this._textarea).data("redactor")}return this._editor},_insertMessage:function(e){r.insertHtml(e.returnValues.template,this._container,"after"),l.show(n.get("wcf.global.success.add")),a.trigger()},_ajaxSuccess:function(e){if(!u.userId&&!e.returnValues.guestDialogID)throw new Error("Missing 'guestDialogID' return value for guest.");if(!u.userId&&e.returnValues.guestDialog){s.openStatic(e.returnValues.guestDialogID,e.returnValues.guestDialog,{closable:!1,title:n.get("wcf.global.confirmation.title")});var t=s.getDialog(e.returnValues.guestDialogID);elBySel("input[type=submit]",t.content).addEventListener(WCF_CLICK_EVENT,this._submitGuestDialog.bind(this)),elBySel("input[type=text]",t.content).addEventListener("keypress",this._submitGuestDialog.bind(this))}else this._insertMessage(e),u.userId||s.close(e.returnValues.guestDialogID),this._reset(),this._hideLoadingOverlay(),window.setTimeout(function(){c.element(this._container.nextElementSibling)}.bind(this),100)},_ajaxFailure:function(e){return this._hideLoadingOverlay(),null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._handleError(e),!1)},_ajaxSetup:function(){return{data:{actionName:"addComment",className:"wcf\\data\\comment\\CommentAction"},silent:!0}}},p}),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["Dictionary","Ui/SimpleDropdown"],function(e,t){"use strict";function i(e){if(!n.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return n.get(e)}var n=new e,a=0;return{init:function(e,i){if(!n.has(e)){var r=elCreate("div");r.id="reusableDropdownGhost"+a++,t.initFragment(r,i),n.set(e,r.id)}},getDropdownMenu:function(e){return t.getDropdownMenu(i(e))},registerCallback:function(e,n){t.registerCallback(i(e),n)},toggleDropdown:function(e,n){t.toggleDropdown(i(e),n)}}}),define("WoltLabSuite/Core/Ui/Comment/Edit",["Ajax","Core","Dictionary","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLabSuite/Core/Ui/Scroll"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";function p(e){this.init(e)}return p.prototype={init:function(e){this._activeElement=null,this._callbackClick=null,this._comments=new o,this._container=e,this._editorContainer=null,this.rebuild(),s.add("Ui/Comment/Edit_"+c.identify(this._container),this.rebuild.bind(this))},rebuild:function(){elBySelAll(".comment",this._container,function(e){if(!this._comments.has(e)){if(elDataBool(e,"can-edit")){var t=elBySel(".jsCommentEditButton",e);null!==t&&(null===this._callbackClick&&(this._callbackClick=this._click.bind(this)),t.addEventListener(WCF_CLICK_EVENT,this._callbackClick))}this._comments.add(e)}}.bind(this))},_click:function(t){t.preventDefault(),null===this._activeElement?(this._activeElement=t.currentTarget.closest(".comment"),this._prepare(),e.api(this,{actionName:"beginEdit",objectIDs:[this._getObjectId(this._activeElement)]})):d.show("wcf.message.error.editorAlreadyInUse",null,"warning")},_prepare:function(){this._editorContainer=elCreate("div"),this._editorContainer.className="commentEditorContainer",this._editorContainer.innerHTML='';var e=elBySel(".commentContentContainer",this._activeElement);e.insertBefore(this._editorContainer,e.firstChild)},_showEditor:function(e){var t=this._getEditorId(),i=elBySel(".icon",this._editorContainer);elRemove(i);var r=elCreate("div");r.className="editorContainer",c.setInnerHtml(r,e.returnValues.template),this._editorContainer.appendChild(r);var o=elBySel(".formSubmit",r),s=elBySel('button[data-type="save"]',o);s.addEventListener(WCF_CLICK_EVENT,this._save.bind(this));var l=elBySel('button[data-type="cancel"]',o);l.addEventListener(WCF_CLICK_EVENT,this._restoreMessage.bind(this)),a.add("com.woltlab.wcf.redactor","submitEditor_"+t,function(e){e.cancel=!0,this._save()}.bind(this));var d=elById(t);"redactor"===n.editor()?window.setTimeout(function(){h.element(this._activeElement)}.bind(this),250):d.focus()},_restoreMessage:function(){this._destroyEditor(),elRemove(this._editorContainer), -this._activeElement=null},_save:function(){var t={data:{message:""}},i=this._getEditorId();a.fire("com.woltlab.wcf.redactor2","getText_"+i,t.data),this._validate(t)&&(a.fire("com.woltlab.wcf.redactor2","submit_"+i,t),e.api(this,{actionName:"save",objectIDs:[this._getObjectId(this._activeElement)],parameters:t}),this._hideEditor())},_validate:function(e){for(var t=elByClass("innerError",this._activeElement);t.length;)elRemove(t[0]);var i={api:this,parameters:e,valid:!0};return a.fire("com.woltlab.wcf.redactor2","validate_"+this._getEditorId(),i),i.valid!==!1},throwError:function(e,t){var i=elCreate("small");i.className="innerError",i.textContent=t,c.insertAfter(i,e)},_showMessage:function(e){c.setInnerHtml(elBySel(".commentContent .userMessage",this._editorContainer.parentNode),e.returnValues.message),this._restoreMessage(),d.show()},_hideEditor:function(){elHide(elBySel(".editorContainer",this._editorContainer));var e=elCreate("span");e.className="icon icon48 fa-spinner",this._editorContainer.appendChild(e)},_restoreEditor:function(){var e=elBySel(".fa-spinner",this._editorContainer);elRemove(e);var t=elBySel(".editorContainer",this._editorContainer);null!==t&&elShow(t)},_destroyEditor:function(){a.fire("com.woltlab.wcf.redactor2","autosaveDestroy_"+this._getEditorId()),a.fire("com.woltlab.wcf.redactor2","destroy_"+this._getEditorId())},_getEditorId:function(){return"commentEditor"+this._getObjectId(this._activeElement)},_getObjectId:function(e){return~~elData(e,"object-id")},_ajaxFailure:function(e){var t=elBySel(".redactor-layer",this._editorContainer);if(null===t)return this._restoreMessage(),!0;if(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.errorType)return!0;var i=elBySel(".innerError",this._editorContainer);return null===i&&(i=elCreate("small"),i.className="innerError",c.insertAfter(i,t)),i.textContent=e.returnValues.errorType,!1},_ajaxSuccess:function(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}},_ajaxSetup:function(){var e=~~elData(this._container,"object-type-id");return{data:{className:"wcf\\data\\comment\\CommentAction",parameters:{data:{objectTypeID:e}}},silent:!0}}},p}),define("WoltLabSuite/Core/Ui/ItemList/Filter",["Core","EventKey","Language","List","StringUtil","Dom/Util"],function(e,t,i,n,a,r){"use strict";function o(e,t){this.init(e,t)}return o.prototype={init:function(n,a){this._value="",this._options=e.extend({callbackPrepareItem:void 0},a);var r=elById(n);if(null===r)throw new Error("Expected a valid element id, '"+n+"' does not match anything.");if(!r.classList.contains("scrollableCheckboxList")&&"function"!=typeof this._options.callbackPrepareItem)throw new Error("Filter only works with elements with the CSS class 'scrollableCheckboxList'.");var o=elCreate("div");o.className="itemListFilter",r.parentNode.insertBefore(o,r),o.appendChild(r);var s=elCreate("div");s.className="inputAddon";var l=elCreate("input");l.className="long",l.type="text",l.placeholder=i.get("wcf.global.filter.placeholder"),l.addEventListener("keydown",function(e){t.Enter(e)&&e.preventDefault()}),l.addEventListener("keyup",this._keyup.bind(this));var c=elCreate("a");c.href="#",c.className="button inputSuffix jsTooltip",c.title=i.get("wcf.global.filter.button.clear"),c.innerHTML='',c.addEventListener("click",function(e){e.preventDefault(),this._input.value="",this._keyup()}.bind(this)),s.appendChild(l),s.appendChild(c),o.appendChild(s),this._container=o,this._element=r,this._input=l,this._items=null,this._fragment=null},_buildItems:function(){this._items=new n;for(var e="function"==typeof this._options.callbackPrepareItem?this._options.callbackPrepareItem:this._prepareItem.bind(this),t=0,i=this._element.childElementCount;t$1"),elShow(i.item),n=!0):elHide(i.item)}),this._container.insertBefore(this._fragment.firstChild,this._container.firstChild),this._value=e;var o=this._container.nextElementSibling;o&&!o.classList.contains("innerError")&&(o=null),n?o&&elRemove(o):o||(o=elCreate("small"),o.className="innerError",o.textContent=i.get("wcf.global.filter.error.noMatches"),r.insertAfter(o,this._container))}}},o}),define("WoltLabSuite/Core/Ui/ItemList/User",["WoltLabSuite/Core/Ui/ItemList"],function(e){"use strict";return{init:function(t,i){e.init(t,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:~~i.includeUserGroups}}},callbackChange:"function"==typeof i.callbackChange?i.callbackChange:null,excludedSearchValues:Array.isArray(i.excludedSearchValues)?i.excludedSearchValues:[],isCSV:!0,maxItems:~~i.maxItems||-1,restricted:!0})},getValues:function(t){return e.getValues(t)}}}),define("WoltLabSuite/Core/Ui/User/List",["Ajax","Core","Dictionary","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/Pagination"],function(e,t,i,n,a,r){"use strict";function o(e){this.init(e)}return o.prototype={init:function(e){this._cache=new i,this._pageCount=0,this._pageNo=1,this._options=t.extend({className:"",dialogTitle:"",parameters:{}},e)},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t){if("number"==typeof t&&(this._pageNo=~~t),0!==this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))throw new RangeError("pageNo must be between 1 and "+this._pageCount+" ("+this._pageNo+" given).");if(this._cache.has(this._pageNo)){var i=a.open(this,this._cache.get(this._pageNo));if(this._pageCount>1){var n=elBySel(".jsPagination",i.content);null!==n&&new r(n,{activePage:this._pageNo,maxPage:this._pageCount,callbackSwitch:this._showPage.bind(this)})}}else this._options.parameters.pageNo=this._pageNo,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){void 0!==e.returnValues.pageCount&&(this._pageCount=~~e.returnValues.pageCount),this._cache.set(this._pageNo,e.returnValues.template),this._showPage()},_ajaxSetup:function(){return{data:{actionName:"getGroupedUserList",className:this._options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}},_dialogSetup:function(){return{id:n.getUniqueId(),options:{title:this._options.dialogTitle},source:null}}},o}),define("WoltLabSuite/Core/Ui/Like/Handler",["Ajax","Core","Dictionary","Language","ObjectMap","StringUtil","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/User/List","User"],function(e,t,i,n,a,r,o,s,l,c,d){"use strict";function u(e,t){this.init(e,t)}var h=!1;return u.prototype={init:function(e,i){if(""===i.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._containers=new a,this._details=new a,this._objectType=e,this._options=t.extend({badgeClassNames:"",isSingleItem:!1,markListItemAsActive:!1,renderAsButton:!0,summaryPrepend:!0,summaryUseIcon:!0,canDislike:!1,canLike:!1,canLikeOwnContent:!1,canViewSummary:!1,badgeContainerSelector:".messageHeader .messageStatus",buttonAppendToSelector:".messageFooter .messageFooterButtons",buttonBeforeSelector:"",containerSelector:"",summarySelector:".messageFooterGroup"},i),this.initContainers(i,e),o.add("WoltLabSuite/Core/Ui/Like/Handler-"+e,this.initContainers.bind(this))},initContainers:function(){for(var e,t,i=elBySelAll(this._options.containerSelector),n=!1,a=0,r=i.length;a ",s.addEventListener(WCF_CLICK_EVENT,this._like.bind(this,e)),elData(s,"type",t?"like":"dislike"),o.appendChild(s),i?i.parentNode.insertBefore(o,i):a.appendChild(o),s},_showSummary:function(e,t){t.preventDefault(),this._details.has(e)||this._details.set(e,new c({className:"wcf\\data\\like\\LikeAction",dialogTitle:n.get("wcf.like.details"),parameters:{data:{containerID:s.identify(e),objectID:this._containers.get(e).objectId,objectType:this._objectType}}})),this._details.get(e).open()},_updateBadge:function(e){var t=this._containers.get(e);if(0===t.likes&&0===t.dislikes)elHide(t.badge);else{elShow(t.badge),t.badge.classList.remove("likeCounterLiked","likeCounterDisliked");var i=t.likes-t.dislikes,a='';i>0?(a+="+"+r.addThousandsSeparator(i),t.badge.classList.add("likeCounterLiked")):i<0?(a+="−"+r.addThousandsSeparator(Math.abs(i)),t.badge.classList.add("likeCounterDisliked")):a+="±0",t.badge.innerHTML=a+"",t.badge.setAttribute("data-tooltip",n.get("wcf.like.tooltip",{dislikes:t.dislikes,likes:t.likes}))}},_updateSummary:function(e){var t=this._containers.get(e);if(t.likes){elShow(t.summary.parentNode);for(var i=[],a=Object.keys(t.users),r=0,o=a.length;r0&&l+1===this._dropdownMenu.childElementCount&&"divider"===elData(o.previousElementSibling,"item")&&elHide(o.previousElementSibling)):(elShow(o),s=!0)}},_dropdownGetItems:function(){},_dropdownOpen:function(){},_dropdownSelect:function(e){},_clickDropdownItem:function(e){e.preventDefault(),this._dropdownSelect(elData(e.currentTarget,"item"))},_prepare:function(){var e=this._elements.get(this._activeElement),t=elCreate("div");t.className="messageBody editor",e.messageBodyEditor=t;var i=elCreate("span");i.className="icon icon48 fa-spinner",t.appendChild(i),c.insertAfter(t,e.messageBody),elHide(e.messageBody)},_showEditor:function(e){var t=this._getEditorId(),i=this._elements.get(this._activeElement);this._activeElement.classList.add("jsInvalidQuoteTarget");var r=l.childByClass(i.messageBodyEditor,"icon");elRemove(r);var o=i.messageBodyEditor,s=elCreate("div");s.className="editorContainer",c.setInnerHtml(s,e.returnValues.template),o.appendChild(s);var d=elBySel(".formSubmit",s),u=elBySel('button[data-type="save"]',d);u.addEventListener(WCF_CLICK_EVENT,this._save.bind(this));var p=elBySel('button[data-type="cancel"]',d);p.addEventListener(WCF_CLICK_EVENT,this._restoreMessage.bind(this)),a.add("com.woltlab.wcf.redactor","submitEditor_"+t,function(e){e.cancel=!0,this._save()}.bind(this)),elHide(i.messageHeader),elHide(i.messageFooter);var f=elById(t);"redactor"===n.editor()?window.setTimeout(function(){this._options.quoteManager&&this._options.quoteManager.setAlternativeEditor(t),h.element(this._activeElement)}.bind(this),250):f.focus()},_restoreMessage:function(){var e=this._elements.get(this._activeElement);this._destroyEditor(),elRemove(e.messageBodyEditor),e.messageBodyEditor=null,elShow(e.messageBody),elShow(e.messageFooter),elShow(e.messageHeader),this._activeElement.classList.remove("jsInvalidQuoteTarget"),this._activeElement=null,this._options.quoteManager&&this._options.quoteManager.clearAlternativeEditor()},_save:function(){var t={containerID:this._options.containerId,data:{message:""},objectID:this._getObjectId(this._activeElement),removeQuoteIDs:this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[]},i=this._getEditorId(),n=elById("settings_"+i);n&&elBySelAll("input, select, textarea",n,function(e){if("INPUT"!==e.nodeName||"checkbox"!==e.type&&"radio"!==e.type||e.checked){var i=e.name;if(t.hasOwnProperty(i))throw new Error("Variable overshadowing, key '"+i+"' is already present.");t[i]=e.value.trim()}}),a.fire("com.woltlab.wcf.redactor2","getText_"+i,t.data),this._validate(t)&&(a.fire("com.woltlab.wcf.redactor2","submit_"+i,t),e.api(this,{actionName:"save",parameters:t}),this._hideEditor())},_validate:function(e){for(var t=elByClass("innerError",this._activeElement);t.length;)elRemove(t[0]);var i={api:this,parameters:e,valid:!0};return a.fire("com.woltlab.wcf.redactor2","validate_"+this._getEditorId(),i),i.valid!==!1},throwError:function(e,t){var i=elCreate("small");i.className="innerError",i.textContent=t,c.insertAfter(i,e)},_showMessage:function(e){var t=this._activeElement,i=this._getEditorId(),n=this._elements.get(t),r=elBySelAll(".attachmentThumbnailList, .attachmentFileList",n.messageFooter);if(c.setInnerHtml(l.childByClass(n.messageBody,"messageText"),e.returnValues.message),"string"==typeof e.returnValues.attachmentList){for(var o=0,s=r.length;o'),this._content.classList.add("loading"),this._content.appendChild(this._loadingOverlay)},_hideLoadingOverlay:function(){this._content.classList.remove("loading");var e=elBySel(".messageContentLoadingOverlay",this._content);null!==e&&e.parentNode.removeChild(e)},_reset:function(){this._getEditor().code.set("

    ​

    "),i.fire("com.woltlab.wcf.redactor2","reset_text")},_handleError:function(e){this.throwError(this._textarea,e.returnValues.errorType)},_getEditor:function(){if(null===this._editor){if("function"!=typeof window.jQuery)throw new Error("Unable to access editor, jQuery has not been loaded yet.");this._editor=window.jQuery(this._textarea).data("redactor")}return this._editor},_insertMessage:function(e){if(this._getEditor().WoltLabAutosave.reset(),e.returnValues.url)window.location=e.returnValues.url;else{if(e.returnValues.template){var t;if("DESC"===elData(this._container,"sort-order"))r.insertHtml(e.returnValues.template,this._container,"after"),t=r.identify(this._container.nextElementSibling);else{var i=this._container;i.previousElementSibling&&i.previousElementSibling.classList.contains("messageListPagination")&&(i=i.previousElementSibling),r.insertHtml(e.returnValues.template,i,"before"),t=r.identify(i.previousElementSibling)}elData(this._container,"last-post-time",e.returnValues.lastPostTime),window.history.replaceState(void 0,"","#"+t),c.element(elById(t))}l.show(n.get(this._options.successMessage)),this._options.quoteManager&&this._options.quoteManager.countQuotes(),a.trigger()}},_ajaxSuccess:function(e){if(!u.userId&&!e.returnValues.guestDialogID)throw new Error("Missing 'guestDialogID' return value for guest.");if(!u.userId&&e.returnValues.guestDialog){s.openStatic(e.returnValues.guestDialogID,e.returnValues.guestDialog,{closable:!1,title:n.get("wcf.global.confirmation.title")});var t=s.getDialog(e.returnValues.guestDialogID);elBySel("input[type=submit]",t.content).addEventListener(WCF_CLICK_EVENT,this._submitGuestDialog.bind(this)),elBySel("input[type=text]",t.content).addEventListener("keypress",this._submitGuestDialog.bind(this))}else this._insertMessage(e),u.userId||s.close(e.returnValues.guestDialogID),this._reset(),this._hideLoadingOverlay()},_ajaxFailure:function(e){return this._hideLoadingOverlay(),null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._handleError(e),!1)},_ajaxSetup:function(){return{data:{actionName:"quickReply",className:this._options.ajax.className,interfaceName:"wcf\\data\\IMessageQuickReplyAction"},silent:!0}}},p}),define("WoltLabSuite/Core/Ui/Message/Share",["EventHandler"],function(e){"use strict";return{_pageDescription:"",_pageUrl:"",init:function(){var t=elBySel('meta[property="og:title"]');null!==t&&(this._pageDescription=encodeURIComponent(t.content));var i=elBySel('meta[property="og:url"]');null!==i&&(this._pageUrl=encodeURIComponent(i.content)),elBySelAll(".jsMessageShareButtons",null,function(t){t.classList.remove("jsMessageShareButtons");var i={facebook:{link:elBySel(".jsShareFacebook",t),share:function(){this._share("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0); -}.bind(this)},google:{link:elBySel(".jsShareGoogle",t),share:function(){this._share("google","https://plus.google.com/share?url={pageURL}",!1)}.bind(this)},reddit:{link:elBySel(".jsShareReddit",t),share:function(){this._share("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1)}.bind(this)},twitter:{link:elBySel(".jsShareTwitter",t),share:function(){this._share("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1)}.bind(this)},linkedIn:{link:elBySel(".jsShareLinkedIn",t),share:function(){this._share("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1)}.bind(this)},pinterest:{link:elBySel(".jsSharePinterest",t),share:function(){this._share("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1)}.bind(this)},xing:{link:elBySel(".jsShareXing",t),share:function(){this._share("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1)}.bind(this)},whatsApp:{link:elBySel(".jsShareWhatsApp",t),share:function(){window.location.href="whatsapp://send?text="+this._pageDescription+"%20"+this._pageUrl}.bind(this)}};e.fire("com.woltlab.wcf.message.share","shareProvider",{container:t,providers:i,pageDescription:this._pageDescription,pageUrl:this._pageUrl});for(var n in i)i.hasOwnProperty(n)&&null!==i[n].link&&i[n].link.addEventListener(WCF_CLICK_EVENT,i[n].share)}.bind(this))},_share:function(e,t,i){window.open(t.replace(/\{pageURL}/,this._pageUrl).replace(/\{text}/,this._pageDescription+(i?"%20"+this._pageUrl:"")),e,"height=600,width=600")}}}),define("WoltLabSuite/Core/Ui/Page/Search",["Ajax","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog"],function(e,t,i,n,a,r){"use strict";var o,s,l,c=null;return{open:function(e){o=e,r.open(this)},_search:function(t){t.preventDefault();var n=c.parentNode,r=n.nextSibling;r&&"SMALL"===r.nodeName&&elRemove(r);var o=c.value.trim();return o.length<3?(r=elCreate("small"),r.className="innerError",r.textContent=i.get("wcf.page.search.error.tooShort"),void a.insertAfter(r,n)):void e.api(this,{parameters:{searchString:o}})},_click:function(e){e.preventDefault(),o(elData(e.currentTarget,"page-id")),r.close(this)},_ajaxSuccess:function(e){for(var t,r="",o=0,d=e.returnValues.length;o

    '+n.escapeHTML(t.name)+"

    "+n.escapeHTML(t.displayLink)+"
    ";if(l.innerHTML=r,window[r?"elShow":"elHide"](s),r)elBySelAll(".containerHeadline",l,function(e){e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))}.bind(this));else{var u=elCreate("small");u.className="innerError",u.textContent=i.get("wcf.page.search.error.noResults"),a.insertAfter(u,c.parentNode)}},_ajaxSetup:function(){return{data:{actionName:"search",className:"wcf\\data\\page\\PageAction"}}},_dialogSetup:function(){return{id:"wcfUiPageSearch",options:{onSetup:function(){var e=this._search.bind(this);c=elById("wcfUiPageSearchInput"),c.addEventListener("keydown",function(i){t.Enter(i)&&e(i)}),c.nextElementSibling.addEventListener(WCF_CLICK_EVENT,e),s=elById("wcfUiPageSearchResultContainer"),l=elById("wcfUiPageSearchResultList")}.bind(this),onShow:function(){c.focus()},title:i.get("wcf.page.search")},source:'
    '}}}}),define("WoltLabSuite/Core/Ui/Redactor/Autosave",["Language","Dom/Traverse"],function(e,t){"use strict";function i(e){this.init(e)}var n=15,a="wsc"+window.WCF_PATH.hashCode()+"-";return i.prototype={init:function(e){this._container=null,this._editor=null,this._element=e,this._key=a+elData(this._element,"autosave"),this._lastMessage="",this._originalMessage="",this._overlay=null,this._restored=!1,this._timer=null,this._cleanup(),this._element.removeAttribute("data-autosave");var i=t.parentByTag(this._element,"FORM");null!==i&&i.addEventListener("submit",this.destroy.bind(this))},getInitialValue:function(){var e="";try{e=window.localStorage.getItem(this._key)}catch(e){window.console.warn("Unable to access local storage: "+e.message)}try{e=JSON.parse(e)}catch(t){e=""}if(null!==e&&"object"==typeof e&&e.content){var t=~~elData(this._element,"autosave-last-edit-time");if(1e3*t<=e.timestamp)return this._originalMessage=this._element.value,this._restored=!0,e.content}return this._element.value},watch:function(e){if(this._editor=e,null!==this._timer)throw new Error("Autosave timer is already active.");this._timer=window.setInterval(this._saveToStorage.bind(this),1e3*n),this._saveToStorage()},destroy:function(){this.clear(),this._editor=null,window.clearInterval(this._timer),this._timer=null},clear:function(){this._lastMessage="";try{window.localStorage.removeItem(this._key)}catch(e){window.console.warn("Unable to remove from local storage: "+e.message)}},createOverlay:function(){if(this._restored){var t=elCreate("div");t.className="redactorAutosaveRestored active";var i=elCreate("span");i.textContent=e.get("wcf.editor.autosave.restored"),t.appendChild(i);var n=elCreate("a");n.className="jsTooltip",n.href="#",n.title=e.get("wcf.editor.autosave.keep"),n.innerHTML='',n.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),this.hideOverlay()}.bind(this)),t.appendChild(n),n=elCreate("a"),n.className="jsTooltip",n.href="#",n.title=e.get("wcf.editor.autosave.discard"),n.innerHTML='',n.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),this.clear(),this._editor.code.start(this._originalMessage),this._editor.core.textarea().val(this._editor.clean.onSync(this._editor.$editor.html())),this.hideOverlay()}.bind(this)),t.appendChild(n),this._editor.core.box()[0].appendChild(t);var a=function(){this._editor.core.editor()[0].removeEventListener(WCF_CLICK_EVENT,a),this.hideOverlay()}.bind(this);this._editor.core.editor()[0].addEventListener(WCF_CLICK_EVENT,a),this._container=t}},hideOverlay:function(){null!==this._container&&(this._container.classList.remove("active"),window.setTimeout(function(){null!==this._container&&elRemove(this._container),this._container=null,this._originalMessage=""}.bind(this),1e3))},_saveToStorage:function(){var e=this._editor.code.get();if(this._editor.utils.isEmpty(e)&&(e=""),this._lastMessage!==e){if(""===e)return this.clear();try{window.localStorage.setItem(this._key,JSON.stringify({content:e,timestamp:Date.now()})),this._lastMessage=e}catch(e){window.console.warn("Unable to write to local storage: "+e.message)}}},_cleanup:function(){var e,t,i,n,r=Date.now()-6048e5,o=[];for(e=0,i=window.localStorage.length;ei.top&&e.pageY",r=[];for(var s in this._editor.opts.woltlab.highlighters)this._editor.opts.woltlab.highlighters.hasOwnProperty(s)&&r.push([s,this._editor.opts.woltlab.highlighters[s]]);r.sort(function(e,t){return e[1]t[1]?1:0}),r.forEach(function(t){e+='"}.bind(this)),elById(o).innerHTML=e}.bind(this),onShow:function(){elById(o).value=elData(this._pre,"highlighter");var e=elData(this._pre,"line");elById(s).value=""===e?1:~~e,elById(r).value=elData(this._pre,"file")}.bind(this),title:i.get("wcf.editor.code.edit")},source:'
    '+i.get("wcf.editor.code.highlighter.description")+'
    '+i.get("wcf.editor.code.line.description")+'
    '+i.get("wcf.editor.code.file.description")+'
    "}}},s}),define("WoltLabSuite/Core/Ui/Redactor/DragAndDrop",["Dictionary","EventHandler","Language"],function(e,t,i){"use strict";var n=!1,a=new e,r=!1,o=!1,s=null;return{init:function(e){n||this._setup(),a.set(e.uuid,{editor:e,element:null})},_dragOver:function(e){if(e.preventDefault(),e.dataTransfer&&e.dataTransfer.types){var t=!1;for(var n in e.dataTransfer)if(e.dataTransfer.hasOwnProperty(n)&&n.match(/^moz/)){t=!0;break}if(o=!1,t)"application/x-moz-file"===e.dataTransfer.types[0]&&(o=!0);else for(var s=0;s
    '}}}}),define("WoltLabSuite/Core/Ui/Redactor/Mention",["Ajax","Environment","StringUtil","Ui/CloseOverlay"],function(e,t,i,n){"use strict";function a(e){this.init(e)}var r=null;return a.prototype={init:function(e){this._active=!1,this._dropdownActive=!1,this._dropdownMenu=null,this._itemIndex=0,this._lineHeight=null,this._mentionStart="",this._redactor=e,this._timer=null,e.WoltLabEvent.register("keydown",this._keyDown.bind(this)),e.WoltLabEvent.register("keyup",this._keyUp.bind(this)),n.add("UiRedactorMention-"+e.core.element()[0].id,this._hideDropdown.bind(this))},_keyDown:function(e){if(this._dropdownActive){var t=e.event;switch(t.which){case 13:this._setUsername(null,this._dropdownMenu.children[this._itemIndex].children[0]);break;case 38:this._selectItem(-1);break;case 40:this._selectItem(1);break;default:return void this._hideDropdown()}t.preventDefault(),e.cancel=!0}},_keyUp:function(t){var i=t.event;if(13===i.which)return void(this._active=!1);if(!this._dropdownActive||(t.cancel=!0,38!==i.which&&40!==i.which)){var n=this._getTextLineInFrontOfCaret();if(n.length>0&&n.length<25){var a=n.match(/@([^,]{3,})$/);a?a.index&&!n[a.index-1].match(/\s/)||(this._mentionStart=a[1],null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null),this._timer=window.setTimeout(function(){e.api(this,{parameters:{data:{searchString:this._mentionStart}}}),this._timer=null}.bind(this),500)):this._hideDropdown()}else this._hideDropdown()}},_getTextLineInFrontOfCaret:function(){var e=this._selectMention(!1);return null!==e?e.range.cloneContents().textContent.replace(/\u200B/g,"").replace(/\u00A0/g," ").trim():""},_getDropdownMenuPosition:function(){var e=this._selectMention();if(null===e)return null;this._redactor.selection.save(),e.selection.removeAllRanges(),e.selection.addRange(e.range);var t=e.selection.getRangeAt(0).getBoundingClientRect(),i={top:Math.round(t.bottom)+(window.scrollY||window.pageYOffset),left:Math.round(t.left)+document.body.scrollLeft};return null===this._lineHeight&&(this._lineHeight=Math.round(t.bottom-t.top)),this._redactor.selection.restore(),i},_setUsername:function(e,t){e&&(e.preventDefault(),t=e.currentTarget);var i=this._selectMention();if(null===i)return void this._hideDropdown();this._redactor.buffer.set(),i.selection.removeAllRanges(),i.selection.addRange(i.range);var n=getSelection().getRangeAt(0);n.deleteContents(),n.collapse(!0);var a=document.createTextNode("@"+elData(t,"username")+" ");n.insertNode(a),n=document.createRange(),n.selectNode(a),n.collapse(!1),i.selection.removeAllRanges(),i.selection.addRange(n),this._hideDropdown()},_selectMention:function(e){var t=window.getSelection();if(!t.rangeCount||!t.isCollapsed)return null;var i=t.anchorNode;if(i.nodeType===Node.TEXT_NODE&&(i=i.parentNode),i.textContent.indexOf("@")===-1)return null;for(var n=this._redactor.core.editor()[0];i&&i!==n;){if(["PRE","WOLTLAB-QUOTE"].indexOf(i.nodeName)!==-1)return null;i=i.parentNode}for(var a=t.getRangeAt(0),r=a.startContainer,o=a.startOffset;r.nodeType===Node.ELEMENT_NODE;){if(0===o&&0===r.childNodes.length)return null;r=r.childNodes[o?o-1:0],o>0&&(o=r.nodeType===Node.TEXT_NODE?r.textContent.length:r.childNodes.length)}for(var s=r,l=-1;null!==s;){if(s.nodeType!==Node.TEXT_NODE)return null;if(s.textContent.indexOf("@")!==-1){l=s.textContent.lastIndexOf("@");break}s=s.previousSibling}if(l===-1)return null;try{a=document.createRange(),a.setStart(s,l),a.setEnd(r,o)}catch(e){return window.console.debug(e),null}if(e===!1){var c="";for(l&&(c=s.textContent.substr(0,l));(s=s.previousSibling)&&s.nodeType===Node.TEXT_NODE;)c=s.textContent+c;if(c.replace(/\u200B/g,"").match(/\S$/))return null}else if(a.cloneContents().textContent.replace(/\u200B/g,"").replace(/\u00A0/g,"").trim().replace(/^@/,"")!==this._mentionStart)return null;return{range:a,selection:t}},_updateDropdownPosition:function(){var e=this._getDropdownMenuPosition();return null===e?void this._hideDropdown():(e.top+=7,this._dropdownMenu.style.setProperty("left",e.left+"px",""),this._dropdownMenu.style.setProperty("top",e.top+"px",""),this._selectItem(0),void(e.top+this._dropdownMenu.offsetHeight+10>window.innerHeight+(window.scrollY||window.pageYOffset)&&this._dropdownMenu.style.setProperty("top",e.top-this._dropdownMenu.offsetHeight-2*this._lineHeight+7+"px","")))},_selectItem:function(e){var t=elBySel(".active",this._dropdownMenu);null!==t&&t.classList.remove("active"),this._itemIndex+=e,this._itemIndex<0?this._itemIndex=this._dropdownMenu.childElementCount-1:this._itemIndex>=this._dropdownMenu.childElementCount&&(this._itemIndex=0),this._dropdownMenu.children[this._itemIndex].classList.add("active")},_hideDropdown:function(){null!==this._dropdownMenu&&this._dropdownMenu.classList.remove("dropdownOpen"),this._dropdownActive=!1,this._itemIndex=0},_ajaxSetup:function(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\user\\UserAction",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{includeUserGroups:!1}}},silent:!0}},_ajaxSuccess:function(e){if(!Array.isArray(e.returnValues)||!e.returnValues.length)return void this._hideDropdown();null===this._dropdownMenu&&(this._dropdownMenu=elCreate("ol"),this._dropdownMenu.className="dropdownMenu",null===r&&(r=elCreate("div"),r.className="dropdownMenuContainer",document.body.appendChild(r)),r.appendChild(this._dropdownMenu)),this._dropdownMenu.innerHTML="";for(var t,n,a,o=this._setUsername.bind(this),s=0,l=e.returnValues.length;s"+a.icon+" "+i.escapeHTML(a.label)+"",elData(t,"user-id",a.objectID),elData(t,"username",a.label),n.appendChild(t),this._dropdownMenu.appendChild(n);this._dropdownMenu.classList.add("dropdownOpen"),this._dropdownActive=!0,this._updateDropdownPosition()}},a}),define("WoltLabSuite/Core/Ui/Redactor/Metacode",["EventHandler","Dom/Util"],function(e,t){"use strict";return{convert:function(e){e.textContent=this.convertFromHtml(e.textContent)},convertFromHtml:function(i,n){var a=elCreate("div");a.innerHTML=n;for(var r,o,s,l,c,d,u=elByTag("woltlab-metacode",a);u.length;)s=u[0],l=elData(s,"name"),r=this._parseAttributes(elData(s,"attributes")),o={attributes:r,cancel:!1,metacode:s},e.fire("com.woltlab.wcf.redactor2","metacode_"+l+"_"+i,o),o.cancel!==!0&&(d=this._getOpeningTag(l,r),c=this._getClosingTag(l),s.parentNode===a?(t.prepend(d,this._getFirstParagraph(s)),this._getLastParagraph(s).appendChild(c)):(t.prepend(d,s),s.appendChild(c)),t.unwrapChildNodes(s));return a.innerHTML},_getOpeningTag:function(e,t){var i="["+e;if(t.length){i+="=";for(var n=0,a=t.length;n0&&(i+=","),i+="'"+t[n]+"'"}return document.createTextNode(i+"]")},_getClosingTag:function(e){return document.createTextNode("[/"+e+"]")},_getFirstParagraph:function(e){var t,i;return 0===e.childElementCount?(i=elCreate("p"),e.appendChild(i)):(t=e.children[0],"P"===t.nodeName?i=t:(i=elCreate("p"),e.insertBefore(i,t))),i},_getLastParagraph:function(e){var t,i,n=e.childElementCount;return 0===n?(i=elCreate("p"),e.appendChild(i)):(t=e.children[n-1],"P"===t.nodeName?i=t:(i=elCreate("p"),e.appendChild(i))),i},_parseAttributes:function(e){try{e=JSON.parse(atob(e))}catch(e){}if(!Array.isArray(e))return[];for(var t,i=[],n=0,a=e.length;n"+o+"

    ",o=o.replace(/\n\n/g,"

    "),o=o.replace(/\n/g,"
    ")):o=s.convertFromHtml(this._editor.$element[0].id,o),r.innerHTML=o,n.parentNode.insertBefore(r,n.nextSibling),"P"!==n.nodeName||"
    "!==n.innerHTML&&""!==n.innerHTML.replace(/\u200B/g,"")||n.parentNode.removeChild(n),this._editor.WoltLabCaret.paragraphAfterBlock(r),this._editor.buffer.set()}},_click:function(){this._editor.button.toggle({},"woltlab-quote","func","block.format");var e=this._editor.selection.block();e&&"WOLTLAB-QUOTE"===e.nodeName&&(this._setTitle(e),e.addEventListener(WCF_CLICK_EVENT,this._callbackEdit),this._editor.caret.end(e))},_observeLoad:function(){for(var e,t=0,i=this._quotes.length;ti.top&&e.pageY

    '+n.get("wcf.editor.quote.url.description")+'
    "}}},c}),define("WoltLabSuite/Core/Ui/Redactor/Spoiler",["EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog","./PseudoHeader"],function(e,t,i,n,a,r,o){"use strict";function s(e){this.init(e)}var l=0;return s.prototype={init:function(t){this._editor=t,this._elementId=this._editor.$element[0].id,this._spoiler=null,e.add("com.woltlab.wcf.redactor2","bbcode_spoiler_"+this._elementId,this._bbcodeSpoiler.bind(this)),e.add("com.woltlab.wcf.redactor2","observe_load_"+this._elementId,this._observeLoad.bind(this)),this._callbackEdit=this._edit.bind(this),this._observeLoad()},_bbcodeSpoiler:function(e){e.cancel=!0,this._editor.button.toggle({},"woltlab-spoiler","func","block.format");var t=this._editor.selection.block();t&&"WOLTLAB-SPOILER"===t.nodeName&&(this._setTitle(t),t.addEventListener(WCF_CLICK_EVENT,this._callbackEdit),this._editor.caret.end(t))},_observeLoad:function(){elBySelAll("woltlab-spoiler",this._editor.$editor[0],function(e){e.addEventListener("mousedown",this._callbackEdit),this._setTitle(e)}.bind(this))},_edit:function(e){var t=e.currentTarget;0===l&&(l=o.getHeight(t));var i=a.offset(t);e.pageY>i.top&&e.pageY
    '+i.get("wcf.editor.spoiler.label.description")+'
    "}}},s}),define("WoltLabSuite/Core/Ui/Search/Page",["Core","Dom/Traverse","Dom/Util","Ui/Screen","Ui/SimpleDropdown","./Input"],function(e,t,i,n,a,r){"use strict";return{init:function(o){var s=elById("pageHeaderSearchInput");new r(s,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},callbackDropdownInit:function(e){if(e.classList.add("dropdownMenuPageSearch"),n.is("screen-lg")){elData(e,"dropdown-alignment-horizontal","right");var t=s.clientWidth;e.style.setProperty("min-width",t+"px","");var a=s.parentNode,r=i.offset(a).left+a.clientWidth-(i.offset(s).left+t),o=i.styleAsInt(window.getComputedStyle(a),"padding-bottom");e.style.setProperty("transform","translateX(-"+Math.ceil(r)+"px) translateY(-"+o+"px)","")}},callbackSelect:function(){return setTimeout(function(){t.parentByTag(s,"FORM").submit()},1),!0}});var l=a.getDropdownMenu(i.identify(elBySel(".pageHeaderSearchType"))),c=this._click.bind(this);elBySelAll("a[data-object-type]",l,function(e){e.addEventListener(WCF_CLICK_EVENT,c)});var d=elBySel('a[data-object-type="'+o+'"]',l);e.triggerEvent(d,WCF_CLICK_EVENT)},_click:function(e){e.preventDefault();var t=elById("pageHeader");t.classList.add("searchBarForceOpen"),window.setTimeout(function(){t.classList.remove("searchBarForceOpen")},10);var i=elData(e.currentTarget,"object-type"),n=elById("pageHeaderSearchParameters");n.innerHTML="";var a=elData(e.currentTarget,"extended-link");a&&(elBySel(".pageHeaderSearchExtendedLink").href=a);var r=elData(e.currentTarget,"parameters");r=r?JSON.parse(r):{},i&&(r["types[]"]=i);for(var o in r)if(r.hasOwnProperty(o)){var s=elCreate("input");s.type="hidden",s.name=o,s.value=r[o],n.appendChild(s)}var l=elBySel(".pageHeaderSearchType > .button",elById("pageHeaderSearchInputContainer"));l.textContent=e.currentTarget.textContent}}}),define("WoltLabSuite/Core/Ui/Sortable/List",["Core","Ui/Screen"],function(e,t){"use strict";function i(e){this.init(e)}return i.prototype={init:function(i){this._options=e.extend({containerId:"",className:"",offset:0,options:{},isSimpleSorting:!1,additionalParameters:{}},i),t.on("screen-sm-md",{match:this._enable.bind(this,!0),unmatch:this._disable.bind(this),setup:this._enable.bind(this,!0)}),t.on("screen-lg",{match:this._enable.bind(this,!1),unmatch:this._disable.bind(this),setup:this._enable.bind(this,!1)})},_enable:function(e){var t=this._options.options;e&&(t.handle=".sortableNodeHandle"),new window.WCF.Sortable.List(this._options.containerId,this._options.className,this._options.offset,t,this._options.isSimpleSorting,this._options.additionalParameters)},_disable:function(){window.jQuery("#"+this._options.containerId+" .sortableList")[this._options.isSimpleSorting?"sortable":"nestedSortable"]("destroy")}},i}),define("WoltLabSuite/Core/Ui/Style/FontAwesome",["Language","Ui/Dialog","WoltLabSuite/Core/Ui/ItemList/Filter"],function(e,t,i){"use strict";var n,a,r=[];return{setup:function(e){r=e},open:function(e){if(0===r.length)throw new Error("Missing icon data, please include the template before calling this method using `{include file='fontAwesomeJavaScript'}`.");n=e,t.open(this)},_click:function(e){e.preventDefault();var i=e.target.closest("li"),a=elBySel("small",i).textContent.trim();t.close(this),n(a)},_dialogSetup:function(){return{id:"fontAwesomeSelection",options:{onSetup:function(){a=elById("fontAwesomeIcons");for(var e,t="",n=0,o=r.length;n'+e+"";a.innerHTML=t,a.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),new i("fontAwesomeIcons",{callbackPrepareItem:function(e){var t=elBySel("small",e),i=t.textContent.trim();return{item:e,span:t,text:i}}})}.bind(this),title:e.get("wcf.global.fontAwesome.selectIcon")},source:'
      '}}}}),define("WoltLabSuite/Core/Ui/Toggle/Input",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}return t.prototype={init:function(t,i){if(this._element=elBySel(t),null===this._element)throw new Error("Unable to find element by selector '"+t+"'.");var n="INPUT"===this._element.nodeName?elAttr(this._element,"type"):"";if("checkbox"!==n&&"radio"!==n)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this._options=e.extend({hide:[],show:[]},i),["hide","show"].forEach(function(e){var t,i,n;for(i=0,n=this._options[e].length;i
      "}}}}),define("WoltLabSuite/Core/Controller/Condition/Page/Dependence",["Dom/ChangeListener","Dom/Traverse","EventHandler","ObjectMap"],function(e,t,i,n){"use strict";var a=elBySelAll('input[name="pageIDs[]"]'),r=[],o=new n,s=new n,l=!1;return{register:function(e,i){if(r.push(e),o.set(e,i),s.set(e,[]),!l){for(var n=0,c=a.length;n'),l=elCreate("li"),elData(l,"object-id",s.objectID),l.innerHTML='
      '+r+'

      '+t.escapeHTML(s.title)+"

      "+(s.description?"

      "+s.description+"

      ":"")+"
      ",l.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),c.appendChild(l);elShow(d)},_resetList:function(){var e=o.nextElementSibling;e&&e.classList.contains("innerError")&&elRemove(e),c.innerHTML="",elHide(d)},_getSearchInputHandler:function(){if(null===l){var e=this._buildList.bind(this);l=new a(elById("wcfUiPageSearchInput"),{callbackSuccess:e})}return l},_click:function(e){"A"!==e.target.nodeName&&(e.stopPropagation(),r(elData(e.currentTarget,"object-id")),n.close(this))},_dialogSetup:function(){return{id:"wcfUiPageSearchHandler",options:{onShow:function(){null===o&&(o=elById("wcfUiPageSearchInput"),s=o.parentNode.previousSibling.childNodes[0],c=elById("wcfUiPageSearchResultList"),d=elById("wcfUiPageSearchResultListContainer")),o.value="",elHide(d),c.innerHTML="",o.focus()},title:""},source:'

      '+e.get("wcf.page.pageObjectID.search.results")+'

        '}}}}),define("WoltLabSuite/Core/Ui/User/Activity/Recent",["Ajax","Language","Dom/Util"],function(e,t,i){"use strict";function n(e){this.init(e)}return n.prototype={init:function(e){this._containerId=e;var i=elById(this._containerId);this._list=elBySel(".recentActivityList",i);var n=elCreate("li");n.className="showMore",this._list.childElementCount?(n.innerHTML='",n.children[0].addEventListener(WCF_CLICK_EVENT,this._showMore.bind(this))):n.innerHTML=""+t.get("wcf.user.recentActivity.noMoreEntries")+"",this._list.appendChild(n),this._showMoreItem=n,elBySelAll(".jsRecentActivitySwitchContext .button",i,function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),e.classList.contains("active")||this._switchContext()}.bind(this))}.bind(this))},_showMore:function(t){t.preventDefault(),this._showMoreItem.children[0].disabled=!0,e.api(this,{actionName:"load",parameters:{boxID:~~elData(this._list,"box-id"),filteredByFollowedUsers:elDataBool(this._list,"filtered-by-followed-users"),lastEventId:elData(this._list,"last-event-id"),lastEventTime:elData(this._list,"last-event-time"),userID:~~elData(this._list,"user-id")}})},_switchContext:function(){e.api(this,{actionName:"switchContext"},function(){window.location.hash="#"+this._containerId,window.location.reload()}.bind(this))},_ajaxSuccess:function(e){e.returnValues.template?(i.insertHtml(e.returnValues.template,this._showMoreItem,"before"),elData(this._list,"last-event-time",e.returnValues.lastEventTime),elData(this._list,"last-event-id",e.returnValues.lastEventID),this._showMoreItem.children[0].disabled=!1):this._showMoreItem.innerHTML=""+t.get("wcf.user.recentActivity.noMoreEntries")+""},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"}}}},n}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract",["Ajax","Dom/Util"],function(e,t){"use strict";function i(e,t){}return i.prototype={init:function(e,t){this._userId=e,this._isActive=t!==!1,this._initButton(),this._updateButton()},_initButton:function(){var e=elCreate("a");e.href="#",e.addEventListener(WCF_CLICK_EVENT,this._toggle.bind(this));var i=elCreate("li");i.appendChild(e);var n=elBySel('.userProfileButtonMenu[data-menu="interaction"]');t.prepend(i,n),this._button=e,this._listItem=i},_toggle:function(t){t.preventDefault(),e.api(this,{actionName:this._getAjaxActionName(),parameters:{data:{userID:this._userId}}})},_updateButton:function(){this._button.textContent=this._getLabel(),this._listItem.classList[this._isActive?"add":"remove"]("active")},_getLabel:function(){throw new Error("Implement me!")},_getAjaxActionName:function(){throw new Error("Implement me!")},_ajaxSuccess:function(){throw new Error("Implement me!")},_ajaxSetup:function(){throw new Error("Implement me!")}},i}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow",["Core","Language","Ui/Notification","./Abstract"],function(e,t,i,n){"use strict";function a(e,t){this.init(e,t)}return e.inherit(a,n,{_getLabel:function(){return t.get("wcf.user.button."+(this._isActive?"un":"")+"follow")},_getAjaxActionName:function(){return this._isActive?"unfollow":"follow"},_ajaxSuccess:function(e){this._isActive=!!e.returnValues.following,this._updateButton(),i.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\follow\\UserFollowAction"}}}}),a}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore",["Core","Language","Ui/Notification","./Abstract"],function(e,t,i,n){"use strict";function a(e,t){this.init(e,t)}return e.inherit(a,n,{_getLabel:function(){return t.get("wcf.user.button."+(this._isActive?"un":"")+"ignore")},_getAjaxActionName:function(){return this._isActive?"unignore":"ignore"},_ajaxSuccess:function(e){this._isActive=!!e.returnValues.isIgnoredUser,this._updateButton(),i.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\ignore\\UserIgnoreAction"}}}}),a}),function(e){e.matches=e.matches||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector,e.closest=e.closest||function(e){for(var t=this;t&&!t.matches(e);)t=t.parentElement;return t}}(Element.prototype),define("closest",function(){}),function(e){function t(){for(;n.length&&"function"==typeof n[0];)n.shift()()}var i=e.require,n=[],a=0;e.require=function(r,o,s){if(!Array.isArray(r))return i.apply(e,arguments);var l=a++;n.push(l),s?i(r,function(){var i=arguments;n[n.indexOf(l)]=function(){o.apply(e,i)},t()},function(){var i=arguments;n[n.indexOf(l)]=function(){s.apply(e,i)},t()}):i(r,function(){var i=arguments;n[n.indexOf(l)]=function(){o.apply(e,i)},t()})},e.require.config=i.config}(window),define("require.linearExecution",function(){}); \ No newline at end of file +var requirejs,require,define;!function(global,Promise,undef){function commentReplace(e,t){return t||""}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return e&&hasProp(e,t)&&e[t]}function eachProp(e,t){var i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,n){return t&&eachProp(t,function(t,a){!i&&hasProp(e,a)||(!n||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[a]=t:(e[a]||(e[a]={}),mixin(e[a],t,i,n)))}),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach(function(e){t=t[e]}),t}function newContext(e){function t(e){var t,i,n=e.length;for(t=0;t0&&(e.splice(t-1,2),t-=2)}}function i(e,i,n){var a,r,o,s,l,c,d,u,h,p,f,m=i&&i.split("/"),g=m,v=N.map,_=v&&v["*"];if(e&&(e=e.split("/"),d=e.length-1,N.nodeIdCompat&&jsSuffixRegExp.test(e[d])&&(e[d]=e[d].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&m&&(g=m.slice(0,m.length-1),e=g.concat(e)),t(e),e=e.join("/")),n&&v&&(m||_)){o=e.split("/");e:for(s=o.length;s>0;s-=1){if(c=o.slice(0,s).join("/"),m)for(l=m.length;l>0;l-=1)if(r=getOwn(v,m.slice(0,l).join("/")),r&&(r=getOwn(r,c))){u=r,h=s;break e}!p&&_&&getOwn(_,c)&&(p=getOwn(_,c),f=s)}!u&&p&&(u=p,h=f),u&&(o.splice(0,h,u),e=o.join("/"))}return a=getOwn(N.pkgs,e),a?a:e}function n(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t}function a(e){var t,i,n,a;for(t=0;t0;o-=1)if(s=r.slice(0,o).join("/"),c=getOwn(a,s)){Array.isArray(c)&&(c=c[0]),r.splice(0,o,c);break}l=r.join("/"),l+=t||(/^data\:|^blob\:|\?/.test(l)||i?"":".js"),l=("/"===l.charAt(0)||l.match(/^[\w\+\.\-]+:/)?"":N.baseUrl)+l}return N.urlArgs&&!/^blob\:/.test(l)?l+N.urlArgs(e,l):l},n.toUrl=function(t){var a,r=t.lastIndexOf("."),o=t.split("/")[0],s="."===o||".."===o;return r!==-1&&(!s||r>1)&&(a=t.substring(r,t.length),t=t.substring(0,r)),n.nameToUrl(i(t,e),a,!0)},n.defined=function(t){return hasProp(T,E(t,e,!0).id)},n.specified=function(t){return t=E(t,e,!0).id,hasProp(T,t)||hasProp(A,t)},n}function o(e,t,i){e&&(T[e]=i,requirejs.onResourceLoad&&requirejs.onResourceLoad(I,t.map,t.deps)),t.finished=!0,t.resolve(i)}function s(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function l(e){return function(t){return i(t,e,!0)}}function c(e){e.factoryCalled=!0;var t,i=e.map.id;try{t=e.factory.apply(T[i],e.values)}catch(t){return s(e,t)}i?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=T[i])):B.splice(B.indexOf(e),1),o(i,e,t)}function d(e,t){this.rejected||this.depDefined[t]||(this.depDefined[t]=!0,this.depCount+=1,this.values[t]=e,this.depending||this.depCount!==this.depMax||c(this))}function u(e,t){var i={};return i.promise=new Promise(function(t,n){i.resolve=t,i.reject=function(t){e||B.splice(B.indexOf(i),1),n(t)}}),i.map=e?t||E(e):{},i.depCount=0,i.depMax=0,i.values=[],i.depDefined=[],i.depFinished=d,i.map.pr&&(i.deps=[E(i.map.pr)]),i}function h(e,t){var i;return e?(i=hasProp(A,e)&&A[e],i||(i=A[e]=u(e,t))):(i=u(),B.push(i)),i}function p(e,t){return function(i){e.rejected||(i.dynaId||(i.dynaId="id"+(W+=1),i.requireModules=[t]),s(e,i))}}function f(e,t,i,n){i.depMax+=1,L(e,t).then(function(e){i.depFinished(e,n)},p(i,e.id)).catch(p(i,i.map.id))}function m(e){function t(t){i||o(e,h(e),t)}var i;return t.error=function(t){h(e).reject(t)},t.fromText=function(t,n){var r=h(e),o=E(E(e).n),l=o.id;i=!0,r.factory=function(e,t){return t},n&&(t=n),hasProp(N.config,e)&&(N.config[l]=N.config[e]);try{y.exec(t)}catch(e){s(r,new Error("fromText eval for "+l+" failed: "+e))}a(l),r.deps=[o],f(o,null,r,r.deps.length)},t}function g(e,t,i){e.load(t.n,r(i),m(t.id),N)}function v(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function _(e,t,i){var n=e.map.id;t[n]=!0,!e.finished&&e.deps&&e.deps.forEach(function(n){var a=n.id,r=!hasProp(S,a)&&h(a,n);!r||r.finished||i[a]||(hasProp(t,a)?e.deps.forEach(function(t,i){t.id===a&&e.depFinished(T[a],i)}):_(r,t,i))}),i[n]=!0}function b(e){var t,i=[],n=1e3*N.waitSeconds,a=n&&P+n<(new Date).getTime();0===O&&(e?e.finished||_(e,{},{}):B.length&&B.forEach(function(e){_(e,{},{})})),a?(eachProp(A,function(e){e.finished||i.push(e.map.id)}),t=new Error("Timeout for modules: "+i),t.requireModules=i,y.onError(t)):(O||B.length)&&(x||(x=!0,setTimeout(function(){x=!1,b()},70)))}function w(e){return setTimeout(function(){e.dynaId&&H[e.dynaId]||(H[e.dynaId]=!0,y.onError(e))}),e}var y,C,E,L,S,x,D,I,T={},k={},N={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},M={},B=[],A={},j={},U={},O=0,P=(new Date).getTime(),W=0,H={},R={},F={},V=Promise.resolve();return D="function"==typeof importScripts?function(e){var t=e.url;R[t]||(R[t]=!0,h(e.id),importScripts(t),a(e.id))}:function(e){var t,i=e.id,n=e.url;R[n]||(R[n]=!0,t=document.createElement("script"),t.setAttribute("data-requiremodule",i),t.type=N.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,O+=1,t.addEventListener("load",function(){O-=1,a(i)},!1),t.addEventListener("error",function(){O-=1;var e,n=getOwn(N.paths,i),a=getOwn(A,i);n&&Array.isArray(n)&&n.length>1?(t.parentNode.removeChild(t),n.shift(),a.map=E(i),D(a.map)):(e=new Error("Load failed: "+i+": "+t.src),e.requireModules=[i],h(i).reject(e))},!1),t.src=n,document.head.appendChild(t))},L=function(e,t){var i,n,a=e.id,r=N.shim[a];if(hasProp(k,a))i=k[a],delete k[a],C.apply(undef,i);else if(!hasProp(A,a))if(e.pr){if(!(n=getOwn(F,a)))return L(E(e.pr)).then(function(i){var n=e.prn?e:E(a,t,!0),r=n.id,o=getOwn(N.shim,r);return hasProp(U,r)||(U[r]=!0,o&&o.deps?y(o.deps,function(){g(i,n,t)}):g(i,n,t)),h(r).promise});e.url=y.nameToUrl(n),D(e)}else r&&r.deps?y(r.deps,function(){D(e)}):D(e);return h(a).promise},E=function(e,t,n){if("string"!=typeof e)return e;var a,r,o,s,c,d,u=e+" & "+(t||"")+" & "+!!n;return o=v(e),s=o[0],e=o[1],!s&&hasProp(M,u)?M[u]:(s&&(s=i(s,t,n),a=hasProp(T,s)&&T[s]),s?a&&a.normalize?(e=a.normalize(e,l(t)),d=!0):e=e.indexOf("!")===-1?i(e,t,n):e:(e=i(e,t,n),o=v(e),s=o[0],e=o[1],r=y.nameToUrl(e)),c={id:s?s+"!"+e:e,n:e,pr:s,url:r,prn:s&&d},s||(M[u]=c),c)},S={require:function(e){return r(e)},exports:function(e){var t=T[e];return"undefined"!=typeof t?t:T[e]={}},module:function(e){return{id:e,uri:"",exports:S.exports(e),config:function(){return getOwn(N.config,e)||{}}}}},C=function(e,t,i,n,a){if(!e||!hasProp(j,e)){j[e]=!0;var r=h(e);return t&&!Array.isArray(t)&&(i=t,t=[]),n||(hasProp(N,"defaultErrback")?N.defaultErrback&&(n=N.defaultErrback):n=w),n&&r.promise.catch(n),a=a||e,"function"==typeof i?(!t.length&&i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,i){t.push(i)}),t=(1===i.length?["require"]:["require","exports","module"]).concat(t)),r.factory=i,r.deps=t,r.depending=!0,t.forEach(function(i,n){var o;t[n]=o=E(i,a,!0),i=o.id,"require"===i?r.values[n]=S.require(e):"exports"===i?(r.values[n]=S.exports(e),r.usingExports=!0):"module"===i?r.values[n]=r.cjsModule=S.module(e):void 0===i?r.values[n]=void 0:f(o,a,r,n)}),r.depending=!1,r.depCount===r.depMax&&c(r)):e&&o(e,r,i),P=(new Date).getTime(),e||b(r),r.promise}},y=r(null,!0),y.config=function(t){if(t.context&&t.context!==e){var i=getOwn(contexts,t.context);return i?i.req.config(t):newContext(t.context).config(t)}if(M={},t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs){var a=t.urlArgs;t.urlArgs=function(e,t){return(t.indexOf("?")===-1?"?":"&")+a}}var r=N.shim,o={paths:!0,bundles:!0,config:!0,map:!0};return eachProp(t,function(e,t){o[t]?(N[t]||(N[t]={}),mixin(N[t],e,!0,!0)):N[t]=e}),t.bundles&&eachProp(t.bundles,function(e,t){e.forEach(function(e){e!==t&&(F[e]=t)})}),t.shim&&(eachProp(t.shim,function(e,t){Array.isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=n(e)),r[t]=e}),N.shim=r),t.packages&&t.packages.forEach(function(e){var t,i;e="string"==typeof e?{name:e}:e,i=e.name,t=e.location,t&&(N.paths[i]=e.location),N.pkgs[i]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),(t.deps||t.callback)&&y(t.deps,t.callback),y},y.onError=function(e){throw e},I={id:e,defined:T,waiting:k,config:N,deferreds:A,req:y},contexts[e]=I,y}if(!Promise)throw new Error("No Promise implementation available");var topReq,dataMain,src,subPath,bootstrapConfig=requirejs||require,hasOwn=Object.prototype.hasOwnProperty,contexts={},queue=[],currDirRegExp=/^\.\//,urlRegExp=/^\/|\:|\?|\.js$/,commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,slice=Array.prototype.slice;"function"!=typeof requirejs&&(requirejs=topReq=newContext("_"),"function"!=typeof require&&(require=topReq),topReq.exec=function(text){return eval(text)},topReq.contexts=contexts,define=function(){queue.push(slice.call(arguments,0))},define.amd={jQuery:!0},bootstrapConfig&&topReq.config(bootstrapConfig),topReq.isBrowser&&!contexts._.config.skipDataMain&&(dataMain=document.querySelectorAll("script[data-main]")[0],dataMain=dataMain&&dataMain.getAttribute("data-main"),dataMain&&(dataMain=dataMain.replace(jsSuffixRegExp,""),bootstrapConfig&&bootstrapConfig.baseUrl||dataMain.indexOf("!")!==-1||(src=dataMain.split("/"),dataMain=src.pop(),subPath=src.length?src.join("/")+"/":"./",topReq.config({baseUrl:subPath})),topReq([dataMain]))))}(this,"undefined"!=typeof Promise?Promise:void 0),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:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],function(){return window.jQuery}),define("require.config",function(){}),function(e,t){e.elAttr=function(e,t,i){return void 0===i?e.getAttribute(t)||"":void e.setAttribute(t,i)},e.elAttrBool=function(e,t){var i=elAttr(e,t);return"1"===i||"true"===i},e.elByClass=function(e,i){return(i||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,i){return(i||t).querySelector(e)},e.elBySelAll=function(e,i,n){var a=(i||t).querySelectorAll(e);return"function"==typeof n&&Array.prototype.forEach.call(a,n),a},e.elByTag=function(e,i){return(i||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elData=function(e,t,i){return t="data-"+t,void 0===i?e.getAttribute(t)||"":void e.setAttribute(t,i)},e.elDataBool=function(e,t){var i=elData(e,t);return"1"===i||"true"===i},e.elHide=function(e){e.style.setProperty("display","none","")},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var i=0,n=e.length;i0||navigator.msMaxTouchPoints>0?"touchstart":"click";Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),function(){function t(){e.history.state&&e.history.state.name&&"initial"!==e.history.state.name?(e.history.replaceState({name:"skip",depth:++i},""),e.history.back(),setTimeout(t,1)):e.history.replaceState({name:"initial"},"")}var i=0;t(),e.addEventListener("popstate",function(t){t.state&&t.state.name&&"skip"===t.state.name&&e.history.go(t.state.depth)})}()}(window,document),define("wcf.globalHelper",function(){}),define("WoltLabSuite/Core/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 i={};for(var n in t)t.hasOwnProperty(n)&&"undefined"!=typeof t[n]&&(i[n]=e(t[n]));return i},i="wsc"+window.WCF_PATH.hashCode()+"-",n={clone:function(t){return e(t)},convertLegacyUrl:function(e){return e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){var i=t.split(/([A-Z][a-z0-9]+)/);t="";for(var n=0,a=i.length;nd&&x.push("'"+this.terminals_[E]+"'");T=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[_]||_)+"'":"Parse error on line "+(s+1)+": Unexpected "+(_==u?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(T,{text:p.match,token:this.terminals_[_]||_,line:p.yylineno,loc:g,expected:x})}if(y[0]instanceof Array&&y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+w+", token: "+_);switch(y[0]){case 1:i.push(_),n.push(p.yytext),a.push(p.yylloc),i.push(y[1]),_=null,b?(_=b,b=null):(l=p.yyleng,o=p.yytext,s=p.yylineno,g=p.yylloc,c>0&&c--);break;case 2:if(L=this.productions_[y[1]][1],I.$=n[n.length-L],I._$={first_line:a[a.length-(L||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(L||1)].first_column,last_column:a[a.length-1].last_column},v&&(I._$.range=[a[a.length-(L||1)].range[0],a[a.length-1].range[1]]),C=this.performAction.apply(I,[o,l,s,f.yy,y[1],n,a].concat(h)),"undefined"!=typeof C)return C;L&&(i=i.slice(0,-1*L*2),n=n.slice(0,-1*L),a=a.slice(0,-1*L)),i.push(this.productions_[y[1]][0]),n.push(I.$),a.push(I._$),S=r[i[i.length-2]][i[i.length-1]],i.push(S);break;case 3:return!0}}return!0}},_=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,i=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 n=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),i.length-1&&(this.yylineno-=i.length-1);var a=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:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[a[0],a[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 i,n,a;if(this.options.backtrack_lexer&&(a={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&&(a.yylloc.range=this.yylloc.range.slice(0))),n=e[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.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],i=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in a)this[r]=a[r];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,i,n;this._more||(this.yytext="",this.match="");for(var a=this._currentRules(),r=0;rt[0].length)){if(t=i,n=r,this.options.backtrack_lexer){if(e=this.test_match(i,a[r]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,a[n]),e!==!1&&e):""===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,i,n){switch(i){case 0:break;case 1:return t.yytext=t.yytext.substring(9,t.yytext.length-10),9;case 2:return 52;case 3:return 52;case 4:return 40;case 5:return 41;case 6:return 46;case 7:return 44;case 8:return 45;case 9:return 47;case 10:return 49;case 11:return 50;case 12:return 32;case 13:return 33;case 14:return this.begin("command"),30;case 15:return this.begin("command"),31;case 16:return this.begin("command"),13;case 17:return this.begin("command"),37;case 18:return this.begin("command"),37;case 19:return 35;case 20:return 18;case 21:return 26;case 22:return 27; +case 23:return this.begin("command"),19;case 24:return this.begin("command"),21;case 25:return 22;case 26:return this.begin("command"),23;case 27:return 39;case 28:return 25;case 29:return this.begin("command"),28;case 30:return this.popState(),15;case 31:return 12;case 32:return 5;case 33:return 11}},rules:[/^(?:\{\*[\s\S]*?\*\})/,/^(?:\{literal\}[\s\S]*?\{\/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))/,/^(?:\})/,/^(?:\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],inclusive:!0},INITIAL:{rules:[0,1,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33],inclusive:!0}}};return e}();return v.lexer=_,v}),define("WoltLabSuite/Core/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("WoltLabSuite/Core/StringUtil",["Language","./NumberUtil"],function(e,t){"use strict";return{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,"&").replace(/"/g,""").replace(//g,">")},escapeRegExp:function(e){return String(e).replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")},formatNumeric:function(i,n){void 0===e&&(e=require("Language")),i=String(t.round(i,n||-2));var a=i.split(".");return i=this.addThousandsSeparator(a[0]),a.length>1&&(i+=e.get("wcf.global.decimalPoint")+a[1]),i=i.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(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},shortUnit:function(e){var i="";return e>=1e6?(e/=1e6,e=e>10?Math.floor(e):t.round(e,-1),i="M"):e>=1e3&&(e/=1e3,e=e>10?Math.floor(e):t.round(e,-1),i="k"),this.formatNumeric(e)+i}}}),define("WoltLabSuite/Core/Template",["./Template.grammar","./StringUtil","Language"],function(e,t,i){"use strict";function n(){this.yy={}}function a(n){void 0===i&&(i=require("Language")),void 0===t&&(t=require("StringUtil"));try{n=e.parse(n),n="var tmp = {};\nfor (var key in v) tmp[key] = v[key];\nv = tmp;\nv.__wcf = window.WCF; v.__window = window;\nreturn "+n,this.fetch=new Function("StringUtil","Language","v",n).bind(void 0,t,i)}catch(e){throw console.debug(e.message),e}}return n.prototype=e,e.Parser=n,e=new n,Object.defineProperty(a,"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")}}),a.prototype={fetch:function(e){throw new Error("This Template is not initialized.")}},a}),define("WoltLabSuite/Core/Language",["Dictionary","./Template"],function(e,t){"use strict";var i=new e,n={addObject:function(t){i.merge(e.fromObject(t))},add:function(e,t){i.set(e,t)},get:function(e,n){n||(n={});var a=i.get(e);if(void 0===a)return e;if("string"==typeof a){try{i.set(e,new t(a))}catch(n){i.set(e,new t("{literal}"+a.replace(/\{\/literal\}/g,"{/literal}{ldelim}/literal}{literal}")+"{/literal}"))}a=i.get(e)}return a instanceof t&&(a=a.fetch(n)),a}};return n}),define("WoltLabSuite/Core/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,i){e.forEach(t)});else{var i=this._dictionary.get(e);void 0!==i&&i.forEach(t)}}},t}),define("WoltLabSuite/Core/Dom/Change/Listener",["CallbackList"],function(e){"use strict";var t=new e,i=!1;return{add:t.add.bind(t),remove:t.remove.bind(t),trigger:function(){if(!i)try{i=!0,t.forEach(null,function(e){e()})}finally{i=!1}}}}),define("WoltLabSuite/Core/Environment",[],function(){"use strict";var e="other",t="none",i="desktop",n=!1;return{setup:function(){if("object"==typeof window.chrome)e="chrome";else for(var a=window.getComputedStyle(document.documentElement),r=0,o=a.length;r0||window.DocumentTouch&&document instanceof DocumentTouch},browser:function(){return e},editor:function(){return t},platform:function(){return i},touch:function(){return n}}}),define("WoltLabSuite/Core/Dom/Util",["Environment","StringUtil"],function(e,t){"use strict";function i(e,t,i){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");for(var n,a=i+"Sibling";null!==e&&e!==t;){if(null!==e[i+"ElementSibling"])return!1;if(e[a])for(n=e[a];n;){if(""!==n.textContent.trim())return!1;n=n[a]}e=e.parentNode}return!0}var n=0,a={createFragmentFromHtml:function(e){var t=elCreate("div");this.setInnerHtml(t,e);for(var i=document.createDocumentFragment();t.childNodes.length;)i.appendChild(t.childNodes[0]);return i},getUniqueId:function(){var e;do e="wcf"+n++;while(null!==elById(e));return e},identify:function(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");var t=elAttr(e,"id");return t||(t=this.getUniqueId(),elAttr(e,"id",t)),t},outerHeight:function(e,t){t=t||window.getComputedStyle(e);var i=e.offsetHeight;return i+=~~t.marginTop+~~t.marginBottom},outerWidth:function(e,t){t=t||window.getComputedStyle(e);var i=e.offsetWidth;return i+=~~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:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend:function(e,t){0===t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[0])},insertAfter:function(e,t){null!==t.nextElementSibling?t.parentNode.insertBefore(e,t.nextElementSibling):t.parentNode.appendChild(e)},setStyles:function(e,t){var i=!1;for(var n in t)t.hasOwnProperty(n)&&(/ !important$/.test(t[n])?(i=!0,t[n]=t[n].replace(/ !important$/,"")):i=!1,"important"!==e.style.getPropertyPriority(n)||i||e.style.removeProperty(n),e.style.setProperty(n,t[n],i?"important":""))},styleAsInt:function(e,t){var i=e.getPropertyValue(t);return null===i?0:parseInt(i)},setInnerHtml:function(e,t){e.innerHTML=t;for(var i,n,a=elBySelAll("script",e),r=0,o=a.length;ra&&(s=!1)):"right"===e?n.left+i.widtha)&&(s=!1)),{align:e,left:r,right:o,result:s}},_tryAlignmentVertical:function(e,t,i,n,a,r){var o="auto",s="auto",l=!0;if("top"===e){var c=document.body.clientHeight;o=c-n.top+r,c-(o+t.height)<(window.scrollY||window.pageYOffset)&&(l=!1)}else s=n.top+i.height+r,s+t.height-(window.scrollY||window.pageYOffset)>a&&(l=!1);return{align:e,bottom:o,top:s,result:l}}}}),define("WoltLabSuite/Core/Ui/CloseOverlay",["CallbackList"],function(e){"use strict";var t=new e,i={setup:function(){document.body.addEventListener(WCF_CLICK_EVENT,this.execute.bind(this))},add:t.add.bind(t),remove:t.remove.bind(t),execute:function(){t.forEach(null,function(e){e()})}};return i.setup(),i}),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["CallbackList","Core","Dictionary","Ui/Alignment","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/CloseOverlay"],function(e,t,i,n,a,r,o,s){"use strict";var l=null,c=new e,d=!1,u=new i,h=new i,p=null;return{setup:function(){d||(d=!0,p=elCreate("div"),p.className="dropdownMenuContainer",document.body.appendChild(p),l=elByClass("dropdownToggle"),this.initAll(),s.add("WoltLabSuite/Core/Ui/Dropdown/Simple",this.closeAll.bind(this)),a.add("WoltLabSuite/Core/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;e0&&0===a.scrollTop?e.preventDefault():e.wheelDelta<0&&a.scrollTop+l===c&&e.preventDefault()})}elData(e,"target",s),i&&setTimeout(function(){t.triggerEvent(e,WCF_CLICK_EVENT)},10)},initFragment:function(e,t){this.setup();var i=o.identify(e);u.has(i)||(u.set(i,e),p.appendChild(t),h.set(i,t))},registerCallback:function(e,t){c.add(e,t)},getDropdown:function(e){return u.get(e)},getDropdownMenu:function(e){return h.get(e)},toggleDropdown:function(e,t){this._toggle(null,e,t)},setAlignment:function(e,t,i){var a,r=elBySel(".dropdownToggle",e);null!==r&&r.parentNode.classList.contains("inputAddonTextarea")&&(a=r),n.set(t,i||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:a||null,horizontal:"right"===elData(t,"dropdown-alignment-horizontal")?"right":"left",vertical:"top"===elData(t,"dropdown-alignment-vertical")?"top":"bottom"})},setAlignmentById:function(e){var t=u.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");var i=h.get(e);this.setAlignment(t,i)},isOpen:function(e){var t=h.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open:function(e){var t=h.get(e);void 0===t||t.classList.contains("dropdownOpen")||this.toggleDropdown(e)},close:function(e){var t=u.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),h.get(e).classList.remove("dropdownOpen"))},closeAll:function(){u.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(!u.has(e))return!1;try{this.close(e),elRemove(h.get(e))}catch(e){}return h.delete(e),u.delete(e),!0},_onDialogScroll:function(e){for(var t=e.currentTarget,i=elBySelAll(".dropdown.dropdownOpen",t),n=0,a=i.length;n=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(){u.forEach(function(e,t){e.classList.contains("dropdownOpen")&&(elDataBool(e,"is-overlay-dropdown-button")?this.setAlignment(e,h.get(t)):this.close(t))}.bind(this))},_notifyCallbacks:function(e,t){c.forEach(e,function(i){i(e,t)})},_toggle:function(e,t,i){null!==e&&(e.preventDefault(),e.stopPropagation(),t=elData(e.currentTarget,"target"));var n=u.get(t),a=!1;if(void 0!==n){if(e){var o=e.currentTarget,s=o.parentNode;s!==n&&(s.classList.add("dropdown"),s.id=n.id,n.classList.remove("dropdown"),n.id="",n=s,u.set(t,s))}if(elDataBool(n,"dropdown-prevent-toggle")&&n.classList.contains("dropdownOpen")&&(a=!0),null===elData(n,"is-overlay-dropdown-button")){var l=r.parentByClass(n,"dialogContent");elData(n,"is-overlay-dropdown-button",null!==l),null!==l&&l.addEventListener("scroll",this._onDialogScroll.bind(this))}}return u.forEach(function(e,n){var r=h.get(n);if(e.classList.contains("dropdownOpen"))a===!1&&(e.classList.remove("dropdownOpen"),r.classList.remove("dropdownOpen"),this._notifyCallbacks(n,"close"));else if(n===t&&r.childElementCount>0){if(e.classList.add("dropdownOpen"),r.classList.add("dropdownOpen"),r.childElementCount&&elDataBool(r.children[0],"scroll-to-active")){var o=r.children[0];o.removeAttribute("data-scroll-to-active");for(var s=null,l=0,c=o.childElementCount;ld.clientHeight?"add":"remove"]("forceScrollbar"),this._notifyCallbacks(n,"open"),this.setAlignment(e,r,i)}}.bind(this)),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===e}}}),define("WoltLabSuite/Core/Ui/Dialog",["enquire","Ajax","Core","Dictionary","Environment","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/Screen","Ui/SimpleDropdown"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";var p=null,f=null,m=new n,g=new o,v=!1,_=null,b=elByClass("jsStaticDialog");return{setup:function(){void 0===t&&(t=require("Ajax")),f=elCreate("div"),f.classList.add("dialogOverlay"),elAttr(f,"aria-hidden","true"),f.addEventListener(WCF_CLICK_EVENT,this._closeOnBackdrop.bind(this)),f.addEventListener("wheel",function(e){e.target===f&&e.preventDefault()}),elById("content").appendChild(f),_=function(e){return 27!==e.keyCode||"INPUT"===e.target.nodeName||"TEXTAREA"===e.target.nodeName||(this.close(p),!1)}.bind(this),u.on("screen-xs",{match:function(){v=!0},unmatch:function(){v=!1},setup:function(){v=!0}}),this._initStaticDialogs(),s.add("Ui/Dialog",this._initStaticDialogs.bind(this)),u.setDialogContainer(f),"ios"===a.platform()&&window.addEventListener("resize",function(){m.forEach(function(e){elAttrBool(e.dialog,"aria-hidden")||this.rebuild(elData(e.dialog,"id"))}.bind(this))}.bind(this))},_initStaticDialogs:function(){for(var e,t,i;b.length;)e=b[0],e.classList.remove("jsStaticDialog"),i=elData(e,"dialog-id"),i&&(t=elById(i))&&function(e,t){t.classList.remove("jsStaticDialogContent"),elHide(t),e.addEventListener(WCF_CLICK_EVENT,this.openStatic.bind(this,t.id,null,{title:elData(t,"title")}))}.bind(this)(e,t)},open:function(e,n){var a=g.get(e);if(i.isPlainObject(a))return this.openStatic(a.id,n);if("function"!=typeof e._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");var r=e._dialogSetup();if(!i.isPlainObject(r))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");a={id:r.id};var o=!0;if(void 0===r.source){var s=elById(r.id);if(null===s)throw new Error("Element id '"+r.id+"' is invalid and no source attribute was given.");r.source=document.createDocumentFragment(),r.source.appendChild(s),s.removeAttribute("id"),elShow(s)}else if(null===r.source)r.source=n;else if("function"==typeof r.source)r.source();else if(i.isPlainObject(r.source)){if("string"!=typeof n||""===n.trim())return t.api(this,r.source.data,function(t){t.returnValues&&"string"==typeof t.returnValues.template&&(this.open(e,t.returnValues.template),"function"==typeof r.source.after&&r.source.after(m.get(r.id).content,t))}.bind(this)),{};r.source=n}else{if("string"==typeof r.source){var s=elCreate("div");elAttr(s,"id",r.id),c.setInnerHtml(s,r.source),r.source=document.createDocumentFragment(),r.source.appendChild(s)}if(!r.source.nodeType||r.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");o=!1}return g.set(e,a),this.openStatic(r.id,r.source,r.options,o)},openStatic:function(e,t,n,o){document.documentElement.classList.add("pageOverlayActive"),m.has(e)?this._updateDialog(e,t):(n=i.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:r.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},n),n.closable||(n.backdropCloseOnClick=!1),n.closeConfirmMessage&&(n.onBeforeClose=function(e){d.show({confirm:this.close.bind(this,e),message:n.closeConfirmMessage})}.bind(this)),this._createDialog(e,t,n));var s=m.get(e);return"ios"===a.platform()?(u.scrollDisable(),window.setTimeout(function(){var e=elBySel("input, textarea",s.content);null!==e&&e.focus()}.bind(this),200)):"desktop"!==a.platform()&&u.scrollDisable(),s},setTitle:function(e,t){if("object"==typeof e){var i=g.get(e);void 0!==i&&(e=i.id)}var n=m.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");var a=elByClass("dialogTitle",n.dialog);a.length&&(a[0].textContent=t)},_createDialog:function(e,t,i,n){var a=null;if(null===t&&(a=elById(e),null===a))throw new Error("Expected either a HTML string or an existing element id.");var r=elCreate("div");r.classList.add("dialogContainer"),elAttr(r,"aria-hidden","true"),elAttr(r,"role","dialog"),elData(r,"id",e);var o=elCreate("header");r.appendChild(o);var s=c.getUniqueId();elAttr(r,"aria-labelledby",s);var l=elCreate("span");if(l.classList.add("dialogTitle"),l.textContent=i.title,elAttr(l,"id",s),o.appendChild(l),i.closable){var d=elCreate("a");d.className="dialogCloseButton jsTooltip",elAttr(d,"title",i.closeButtonLabel),elAttr(d,"aria-label",i.closeButtonLabel), +d.addEventListener(WCF_CLICK_EVENT,this._close.bind(this)),o.appendChild(d);var u=elCreate("span");u.className="icon icon24 fa-times",d.appendChild(u)}var h=elCreate("div");h.classList.add("dialogContent"),i.disableContentPadding&&h.classList.add("dialogContentNoPadding"),r.appendChild(h),h.addEventListener("wheel",function(e){for(var t,i,n,a=!1,r=e.target;;){if(t=r.clientHeight,i=r.scrollHeight,t0&&n>0){a=!0;break}if(e.wheelDelta<0&&n+t1?(p=elCreate("div"),p.id=e,p.appendChild(t)):p=t}}else p=a;h.appendChild(p),"none"===p.style.getPropertyValue("display")&&elShow(p),m.set(e,{backdropCloseOnClick:i.backdropCloseOnClick,content:p,dialog:r,header:o,onBeforeClose:i.onBeforeClose,onClose:i.onClose,onShow:i.onShow}),c.prepend(r,f),"function"==typeof i.onSetup&&i.onSetup(p),n!==!0&&this._updateDialog(e,null)},_updateDialog:function(e,t){var i=m.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t&&c.setInnerHtml(i.content,t),"true"===elAttr(i.dialog,"aria-hidden")){"true"===elAttr(f,"aria-hidden")&&window.addEventListener("keyup",_),elAttr(i.dialog,"aria-hidden","false"),elAttr(f,"aria-hidden","false"),elData(f,"close-on-click",i.backdropCloseOnClick?"true":"false"),p=e;var n=elBySel(".jsDialogAutoFocus",i.dialog);null!==n&&null!==n.offsetParent&&n.focus(),"function"==typeof i.onShow&&i.onShow(i.content),h.closeAll(),window.WCF.Dropdown.Interactive.Handler.closeAll()}this.rebuild(e),s.trigger()},rebuild:function(e){var t=m.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 i=t.content.parentNode,n=elBySel(".formSubmit",t.content),r=0;null!==n?(i.classList.add("dialogForm"),n.classList.add("dialogFormSubmit"),r+=c.outerHeight(n),r-=1,i.style.setProperty("margin-bottom",r+"px","")):(i.classList.remove("dialogForm"),i.style.removeProperty("margin-bottom")),r+=c.outerHeight(t.header);var o=window.innerHeight*(v?1:.8)-r;if(i.style.setProperty("max-height",~~o+"px",""),"chrome"===a.browser()&&(t.content.scrollHeight>o?t.content.style.setProperty("margin-right","-1px",""):t.content.style.removeProperty("margin-right")),"chrome"===a.browser()||"safari"===a.browser()){var s=parseFloat(window.getComputedStyle(t.content).width),l=Math.round(s)%2!==0;t.content.classList[l?"add":"remove"]("jsWebKitFractionalPixel")}}},_close:function(e){e.preventDefault();var t=m.get(p);return"function"==typeof t.onBeforeClose?(t.onBeforeClose(p),!1):void this.close(p)},_closeOnBackdrop:function(e){return e.target!==f||void("true"===elData(f,"close-on-click")?this._close(e):e.preventDefault())},close:function(e){if("object"==typeof e){var t=g.get(e);void 0!==t&&(e=t.id)}var i=m.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");elAttr(i.dialog,"aria-hidden","true"),"function"==typeof i.onClose&&i.onClose(e),p=null;for(var n=0;n=200&&this.status<300||304===this.status?n.responseType&&0!==this.getResponseHeader("Content-Type").indexOf(n.responseType)?i._failure(this,n):i._success(this,n):i._failure(this,n))},this._xhr.onerror=function(){i._failure(this,n)},this._options.progress&&(this._xhr.onprogress=this._options.progress),this._options.uploadProgress&&(this._xhr.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){var a=this._options.data;"object"==typeof a&&"FormData"!==e.getType(a)&&(a=e.serialize(a)),this._xhr.send(a)}else this._xhr.send()},abortPrevious:function(){null!==this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=null,this._options.silent||r.hide())},setOption:function(e,t){this._options[e]=t},getOption:function(e){return objOwns(this._options,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||r.hide(),"function"==typeof t.success){var i=null;if("application/json"===e.getResponseHeader("Content-Type")){try{i=JSON.parse(e.responseText)}catch(i){return void this._failure(e,t)}i&&i.returnValues&&void 0!==i.returnValues.template&&(i.returnValues.template=i.returnValues.template.trim())}t.success(i,e.responseText,e,t.data)}this._finalize(t)},_failure:function(e,i){if(!l){i.silent||r.hide();var o=null;try{o=JSON.parse(e.responseText)}catch(e){}var s=!0;if("function"==typeof i.failure&&(s=i.failure(o||{},e.responseText||"",e,i.data)),i.ignoreError!==!0&&s!==!1){var c="",d="";if(null!==o?(o.stacktrace?c="

        Stacktrace:

        "+o.stacktrace+"

        ":o.exceptionID&&(c="

        Exception ID: "+o.exceptionID+"

        "),d=o.message,o.previous.forEach(function(e){c+="

        "+e.message+"

        ",c+="

        Stacktrace

        "+e.stacktrace+"

        "})):d=e.responseText,!d||"undefined"===d)return;var u='

        '+d+"

        "+c+"
        ";void 0===a&&(a=require("Ui/Dialog")),a.openStatic(n.getUniqueId(),u,{title:t.get("wcf.global.error.title")})}this._finalize(i)}},_finalize:function(e){"function"==typeof e.finalize&&e.finalize(this._xhr),this._previousXhr=null,i.trigger();for(var t=elBySelAll('a[href*="#"]'),n=0,a=t.length;n=0,v.ie=!1,v.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,v.supported=v.chrome||v.ff||v.opera;var y=[];m=function(){},h=g=!1;var C=function(){r=n(w,e),r.bgColor=i(r.bgColor),r.textColor=i(r.textColor),r.position=r.position.toLowerCase(),r.animation=N.types[""+r.animation]?r.animation:w.animation;var t=r.position.indexOf("up")>-1,a=r.position.indexOf("left")>-1;if(t||a)for(var h=0;h0?u.height:32,l=u.width>0?u.width:32,c.height=s,c.width=l,d=c.getContext("2d"),E.ready()}):(u.setAttribute("src",""),s=32,l=32,u.height=s,u.width=l,c.height=s,c.width=l,d=c.getContext("2d"),E.ready())},E={};E.ready=function(){h=!0,E.reset(),m()},E.reset=function(){h&&(y=[],p=!1,f=!1,d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),k.setIcon(c),window.clearTimeout(_),window.clearTimeout(b))},E.start=function(){if(h&&!f){var e=function(){p=y[0],f=!1,y.length>0&&(y.shift(),E.start())};if(y.length>0){f=!0;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in y[0].options&&(r[e]=y[0].options[e])}),N.run(y[0].options,function(){e()},!1)};p?N.run(p.options,function(){t()},!0):t()}}};var L={},S=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=S(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),d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),d.beginPath(),d.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.85:1))+"px "+r.fontFamily,d.textAlign="center",t?(d.moveTo(e.x+e.w/2,e.y),d.lineTo(e.x+e.w-e.h/2,e.y),d.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),d.lineTo(e.x+e.w,e.y+e.h-e.h/2),d.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),d.lineTo(e.x+e.h/2,e.y+e.h),d.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),d.lineTo(e.x,e.y+e.h/2),d.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):d.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),d.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",d.fill(),d.closePath(),d.beginPath(),d.stroke(),d.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?d.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)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()},L.rectangle=function(e){e=S(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),d.clearRect(0,0,l,s),d.drawImage(u,0,0,l,s),d.beginPath(),d.font=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.9:1))+"px "+r.fontFamily,d.textAlign="center",d.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",d.fillRect(e.x,e.y,e.w,e.h),d.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?d.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)):d.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),d.closePath()};var x=function(e,t){t=("string"==typeof t?{animation:t}:t)||{},m=function(){try{if("number"==typeof e?e>0:""!==e){var n={type:"badge",options:{n:e}};if("animation"in t&&N.types[""+t.animation]&&(n.options.animation=""+t.animation),"type"in t&&L[""+t.type]&&(n.options.type=""+t.type),["bgColor","textColor"].forEach(function(e){e in t&&(n.options[e]=i(t[e]))}),["fontStyle","fontFamily"].forEach(function(e){e in t&&(n.options[e]=t[e])}),y.push(n),y.length>100)throw"Too many badges requests in queue.";E.start()}else E.reset()}catch(e){throw"Error setting badge. Message: "+e.message}},h&&m()},D=function(e){m=function(){try{var t=e.width,i=e.height,n=document.createElement("img"),a=t/l=0;i--)if(/(^|\s)icon(\s|$)/i.test(e[i].getAttribute("rel")))return e[i];return!1};return r.element?e=r.element:r.elementId?(e=document.getElementById(r.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},k.setIcon=function(e){var t=e.toDataURL("image/png");if(r.dataUrl&&r.dataUrl(t),r.element)r.element.setAttribute("src",t);else if(r.elementId)document.getElementById(r.elementId).setAttribute("src",t);else if(v.ff||v.opera){var i=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),i.parentNode&&i.parentNode.removeChild(i)}else o.setAttribute("href",t)};var N={};return N.duration=40,N.types={},N.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}],N.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],N.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}],N.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}],N.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}],N.run=function(e,t,i,o){var s=N.types[a()?"none":r.animation];return o=i===!0?"undefined"!=typeof o?o:s.length-1:"undefined"!=typeof o?o:0,t=t?t:function(){},o=0?(L[r.type](n(e,s[o])),_=setTimeout(function(){i?o-=1:o+=1,N.run(e,t,i,o)},N.duration),k.setIcon(c),void 0):void t()},C(),{badge:x,video:I,image:D,webcam:T,reset:E.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,i,n){function a(o,s){if(!i[o]){if(!t[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(r)return r(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var d=i[o]={exports:{}};t[o][0].call(d.exports,function(e){var i=t[o][1][e];return a(i?i:e)},d,d.exports,e,t,i,n)}return i[o].exports}for(var r="function"==typeof require&&require,o=0;o=0&&i.splice(n,1),e.className=i.join(" ")}i.add=function(e,t){e.classList?e.classList.add(t):n(e,t)},i.remove=function(e,t){e.classList?e.classList.remove(t):a(e,t)},i.list=function(e){return e.classList?e.classList:e.className.split(" ")}},{}],3:[function(e,t,i){"use strict";function n(e,t){return window.getComputedStyle(e)[t]}function a(e,t,i){return"number"==typeof i&&(i=i.toString()+"px"),e.style[t]=i,e}function r(e,t){for(var i in t){var n=t[i];"number"==typeof n&&(n=n.toString()+"px"),e.style[i]=n}return e}i.e=function(e,t){var i=document.createElement(e);return i.className=t,i},i.appendTo=function(e,t){return t.appendChild(e),e},i.css=function(e,t,i){return"object"==typeof t?r(e,t):"undefined"==typeof i?n(e,t):a(e,t,i)},i.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},i.remove=function(e){"undefined"!=typeof e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}},{}],4:[function(e,t,i){"use strict";var n=function(e){this.element=e,this.events={}};n.prototype.bind=function(e,t){"undefined"==typeof this.events[e]&&(this.events[e]=[]),this.events[e].push(t),this.element.addEventListener(e,t,!1)},n.prototype.unbind=function(e,t){var i="undefined"!=typeof t;this.events[e]=this.events[e].filter(function(n){return!(!i||n===t)||(this.element.removeEventListener(e,n,!1),!1)},this)},n.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var a=function(){this.eventElements=[]};a.prototype.eventElement=function(e){var t=this.eventElements.filter(function(t){return t.element===e})[0];return"undefined"==typeof t&&(t=new n(e),this.eventElements.push(t)),t},a.prototype.bind=function(e,t,i){this.eventElement(e).bind(t,i)},a.prototype.unbind=function(e,t,i){this.eventElement(e).unbind(t,i)},a.prototype.unbindAll=function(){for(var e=0;e1&&(c=1),e.scrollTop=(t.contentHeight-t.containerHeight)*c,o(e)}),t.event.bind(t.scrollbarX,"click",n),t.event.bind(t.scrollbarXRail,"click",function(n){var r=a.toInt(t.scrollbarXWidth/2),s=n.pageX-i(t.scrollbarXRail).left-r;console.log(n.pageX,t.scrollbarXRail.offsetLeft);var l=t.containerWidth-t.scrollbarXWidth,c=s/l;c<0?c=0:c>1&&(c=1),e.scrollLeft=(t.contentWidth-t.containerWidth)*c,o(e)})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],11:[function(e,t,i){"use strict";function n(e,t){function i(i){var a=n+i,r=t.containerWidth-t.scrollbarXWidth;a<0?t.scrollbarXLeft=0:a>r?t.scrollbarXLeft=r:t.scrollbarXLeft=a;var s=o.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.scrollbarXWidth));e.scrollLeft=s}var n=null,a=null,s=function(t){i(t.pageX-a),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(i){a=i.pageX,n=o.toInt(r.css(t.scrollbarX,"left")),o.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),i.stopPropagation(),i.preventDefault()})}function a(e,t){function i(i){var a=n+i,r=t.containerHeight-t.scrollbarYHeight;a<0?t.scrollbarYTop=0:a>r?t.scrollbarYTop=r:t.scrollbarYTop=a;var s=o.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.scrollbarYHeight));e.scrollTop=s}var n=null,a=null,s=function(t){i(t.pageY-a),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(i){a=i.pageY,n=o.toInt(r.css(t.scrollbarY,"top")),o.startScrolling(e,"y"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),i.stopPropagation(),i.preventDefault()})}var r=e("../../lib/dom"),o=e("../../lib/helper"),s=e("../instances"),l=e("../update-geometry");t.exports=function(e){var t=s.get(e);n(e,t),a(e,t)}},{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19}],12:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var a=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===a&&n>0||a>=t.contentHeight-t.containerHeight&&n<0)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&i<0||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}var n=!1;t.event.bind(e,"mouseenter",function(){n=!0}),t.event.bind(e,"mouseleave",function(){n=!1});var r=!1;t.event.bind(t.ownerDocument,"keydown",function(s){if((!s.isDefaultPrevented||!s.isDefaultPrevented())&&n){var l=document.activeElement?document.activeElement:t.ownerDocument.activeElement;if(l){for(;l.shadowRoot;)l=l.shadowRoot.activeElement;if(a.isEditable(l))return}var c=0,d=0;switch(s.which){case 37:c=-30;break;case 38:d=30;break;case 39:c=30;break;case 40:d=-30;break;case 33:d=90;break;case 32:case 34:d=-90;break;case 35:d=s.ctrlKey?-t.contentHeight:-t.containerHeight;break;case 36:d=s.ctrlKey?e.scrollTop:t.containerHeight;break;default:return}e.scrollTop=e.scrollTop-d,e.scrollLeft=e.scrollLeft+c,o(e),r=i(c,d),r&&s.preventDefault()}})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],13:[function(e,t,i){"use strict";function n(e,t){function i(i,n){var a=e.scrollTop;if(0===i){if(!t.scrollbarYActive)return!1;if(0===a&&n>0||a>=t.contentHeight-t.containerHeight&&n<0)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===n){if(!t.scrollbarXActive)return!1;if(0===r&&i<0||r>=t.contentWidth-t.containerWidth&&i>0)return!t.settings.wheelPropagation}return!0}function n(e){var t=e.deltaX,i=-1*e.deltaY;return"undefined"!=typeof t&&"undefined"!=typeof i||(t=-1*e.wheelDeltaX/6,i=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,i*=10),t!==t&&i!==i&&(t=0,i=e.wheelDelta),[t,i]}function r(t,i){var n=e.querySelector("textarea:hover");if(n){var a=n.scrollHeight-n.clientHeight;if(a>0&&!(0===n.scrollTop&&i>0||n.scrollTop===a&&i<0))return!0;var r=n.scrollLeft-n.clientWidth;if(r>0&&!(0===n.scrollLeft&&t<0||n.scrollLeft===r&&t>0))return!0}return!1}function s(s){if(a.env.isWebKit||!e.querySelector("select:focus")){var c=n(s),d=c[0],u=c[1];r(d,u)||(l=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(u?e.scrollTop=e.scrollTop-u*t.settings.wheelSpeed:e.scrollTop=e.scrollTop+d*t.settings.wheelSpeed,l=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(d?e.scrollLeft=e.scrollLeft+d*t.settings.wheelSpeed:e.scrollLeft=e.scrollLeft-u*t.settings.wheelSpeed,l=!0):(e.scrollTop=e.scrollTop-u*t.settings.wheelSpeed,e.scrollLeft=e.scrollLeft+d*t.settings.wheelSpeed),o(e),l=l||i(d,u),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 a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry");t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],14:[function(e,t,i){"use strict";function n(e,t){t.event.bind(e,"scroll",function(){r(e)})}var a=e("../instances"),r=e("../update-geometry");t.exports=function(e){var t=a.get(e);n(e,t)}},{"../instances":18,"../update-geometry":19}],15:[function(e,t,i){"use strict";function n(e,t){function i(){var e=window.getSelection?window.getSelection():document.getSelection?document.getSelection():"";return 0===e.toString().length?null:e.getRangeAt(0).commonAncestorContainer}function n(){l||(l=setInterval(function(){return r.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),a.stopScrolling(e)}var l=null,c={top:0,left:0},d=!1;t.event.bind(t.ownerDocument,"selectionchange",function(){e.contains(i())?d=!0:(d=!1,s())}),t.event.bind(window,"mouseup",function(){d&&(d=!1,s())}),t.event.bind(window,"mousemove",function(t){if(d){var i={x:t.pageX,y:t.pageY},r={left:e.offsetLeft,right:e.offsetLeft+e.offsetWidth,top:e.offsetTop,bottom:e.offsetTop+e.offsetHeight};i.xr.right-3?(c.left=5,a.startScrolling(e,"x")):c.left=0,i.yr.bottom-3?(i.y-r.bottom+3<5?c.top=5:c.top=20,a.startScrolling(e,"y")):c.top=0,0===c.top&&0===c.left?s():n()}})}var a=e("../../lib/helper"),r=e("../instances"),o=e("../update-geometry"); +t.exports=function(e){var t=r.get(e);n(e,t)}},{"../../lib/helper":6,"../instances":18,"../update-geometry":19}],16:[function(e,t,i){"use strict";function n(e,t,i,n){function o(i,n){var a=e.scrollTop,r=e.scrollLeft,o=Math.abs(i),s=Math.abs(n);if(s>o){if(n<0&&a===t.contentHeight-t.containerHeight||n>0&&0===a)return!t.settings.swipePropagation}else if(o>s&&(i<0&&r===t.contentWidth-t.containerWidth||i>0&&0===r))return!t.settings.swipePropagation;return!0}function s(t,i){e.scrollTop=e.scrollTop-i,e.scrollLeft=e.scrollLeft-t,r(e)}function l(){b=!0}function c(){b=!1}function d(e){return e.targetTouches?e.targetTouches[0]:e}function u(e){return!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE)}function h(e){if(u(e)){w=!0;var t=d(e);m.pageX=t.pageX,m.pageY=t.pageY,g=(new Date).getTime(),null!==_&&clearInterval(_),e.stopPropagation()}}function p(e){if(!b&&w&&u(e)){var t=d(e),i={pageX:t.pageX,pageY:t.pageY},n=i.pageX-m.pageX,a=i.pageY-m.pageY;s(n,a),m=i;var r=(new Date).getTime(),l=r-g;l>0&&(v.x=n/l,v.y=a/l,g=r),o(n,a)&&(e.stopPropagation(),e.preventDefault())}}function f(){!b&&w&&(w=!1,clearInterval(_),_=setInterval(function(){return a.get(e)?Math.abs(v.x)<.01&&Math.abs(v.y)<.01?void clearInterval(_):(s(30*v.x,30*v.y),v.x*=.8,void(v.y*=.8)):void clearInterval(_)},10))}var m={},g=0,v={},_=null,b=!1,w=!1;i&&(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)),n&&(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 a=e("../instances"),r=e("../update-geometry");t.exports=function(e,t,i){var r=a.get(e);n(e,r,t,i)}},{"../instances":18,"../update-geometry":19}],17:[function(e,t,i){"use strict";var n=e("../lib/class"),a=e("../lib/helper"),r=e("./instances"),o=e("./update-geometry"),s=e("./handler/click-rail"),l=e("./handler/drag-scrollbar"),c=e("./handler/keyboard"),d=e("./handler/mouse-wheel"),u=e("./handler/native-scroll"),h=e("./handler/selection"),p=e("./handler/touch");t.exports=function(e,t){t="object"==typeof t?t:{},n.add(e,"ps-container");var i=r.add(e);i.settings=a.extend(i.settings,t),s(e),l(e),d(e),u(e),h(e),(a.env.supportsTouch||a.env.supportsIePointer)&&p(e,a.env.supportsTouch,a.env.supportsIePointer),i.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,i){"use strict";function n(e){var t=this;t.settings=u.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=u.toInt(s.css(t.scrollbarXRail,"bottom")),t.isScrollbarXUsingBottom=t.scrollbarXBottom===t.scrollbarXBottom,t.scrollbarXTop=t.isScrollbarXUsingBottom?null:u.toInt(s.css(t.scrollbarXRail,"top")),t.railBorderXWidth=u.toInt(s.css(t.scrollbarXRail,"borderLeftWidth"))+u.toInt(s.css(t.scrollbarXRail,"borderRightWidth")),t.railXMarginWidth=u.toInt(s.css(t.scrollbarXRail,"marginLeft"))+u.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=u.toInt(s.css(t.scrollbarYRail,"right")),t.isScrollbarYUsingRight=t.scrollbarYRight===t.scrollbarYRight,t.scrollbarYLeft=t.isScrollbarYUsingRight?null:u.toInt(s.css(t.scrollbarYRail,"left")),t.scrollbarYOuterWidth=t.isRtl?u.outerWidth(t.scrollbarY):null,t.railBorderYWidth=u.toInt(s.css(t.scrollbarYRail,"borderTopWidth"))+u.toInt(s.css(t.scrollbarYRail,"borderBottomWidth")),t.railYMarginHeight=u.toInt(s.css(t.scrollbarYRail,"marginTop"))+u.toInt(s.css(t.scrollbarYRail,"marginBottom")),t.railYHeight=null}function a(e){return"undefined"==typeof e.dataset?e.getAttribute("data-ps-id"):e.dataset.psId}function r(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"),d=e("../lib/guid"),u=e("../lib/helper"),h={};i.add=function(e){var t=d();return r(e,t),h[t]=new n(e),h[t]},i.remove=function(e){delete h[a(e)],o(e)},i.get=function(e){return h[a(e)]}},{"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(e,t,i){"use strict";function n(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function a(e,t){var i={width:t.railXWidth};t.isRtl?i.left=e.scrollLeft+t.containerWidth-t.contentWidth:i.left=e.scrollLeft,t.isScrollbarXUsingBottom?i.bottom=t.scrollbarXBottom-e.scrollTop:i.top=t.scrollbarXTop+e.scrollTop,o.css(t.scrollbarXRail,i);var n={top:e.scrollTop,height:t.railYHeight};t.isScrollbarYUsingRight?t.isRtl?n.right=t.contentWidth-e.scrollLeft-t.scrollbarYRight-t.scrollbarYOuterWidth:n.right=t.scrollbarYRight-e.scrollLeft:t.isRtl?n.left=e.scrollLeft+2*t.containerWidth-t.contentWidth-t.scrollbarYLeft-t.scrollbarYOuterWidth:n.left=t.scrollbarYLeft+e.scrollLeft,o.css(t.scrollbarYRail,n),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 r=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.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),a(e,t),r[t.scrollbarXActive?"add":"remove"](e,"ps-active-x"),r[t.scrollbarYActive?"add":"remove"](e,"ps-active-y")}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18}],20:[function(e,t,i){"use strict";var n=e("../lib/dom"),a=e("./instances"),r=e("./update-geometry");t.exports=function(e){var t=a.get(e);n.css(t.scrollbarXRail,"display","none"),n.css(t.scrollbarYRail,"display","none"),r(e),n.css(t.scrollbarXRail,"display","block"),n.css(t.scrollbarYRail,"display","block")}},{"../lib/dom":3,"./instances":18,"./update-geometry":19}]},{},[1]),define("WoltLabSuite/Core/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,i){var n,a="";"c"===i&&(i="Y-m-dTH:i:sP");for(var r=0,o=i.length;r11?"pm":"am";break;case"g":n=t.getHours(),0===n?n=12:n>12&&(n-=12);break;case"h":n=t.getHours(),0===n?n=12:n>12&&(n-=12),n=("0"+n.toString()).slice(-2);break;case"A":n=t.getHours()>11?"PM":"AM";break;case"G":n=t.getHours();break;case"H":n=t.getHours(),n=("0"+n.toString()).slice(-2);break;case"d":n=t.getDate(),n=("0"+n.toString()).slice(-2);break;case"j":n=t.getDate();break;case"l":n=e.get("__days")[t.getDay()];break;case"D":n=e.get("__daysShort")[t.getDay()];break;case"S":n="";break;case"m":n=t.getMonth()+1,n=("0"+n.toString()).slice(-2);break;case"n":n=t.getMonth()+1;break;case"F":n=e.get("__months")[t.getMonth()];break;case"M":n=e.get("__monthsShort")[t.getMonth()];break;case"y":n=t.getYear().toString().replace(/^\d{2}/,"");break;case"Y":n=t.getFullYear();break;case"P":var s=t.getTimezoneOffset();n=s>0?"-":"+",s=Math.abs(s),n+=("0"+(~~(s/60)).toString()).slice(-2),n+=":",n+=("0"+(s%60).toString()).slice(-2);break;case"r":n=t.toString();break;case"U":n=Math.round(t.getTime()/1e3);break;case"\\":n="",r+1(new Date).getTime()&&elData(t,"is-future-date","true"),t},getTimezoneDate:function(e,t){var i=new Date(e),n=6e4*i.getTimezoneOffset();return new Date(e+n+t)}};return t}),define("WoltLabSuite/Core/Timer/Repeating",[],function(){"use strict";function e(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||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("WoltLabSuite/Core/Date/Time/Relative",["Dom/ChangeListener","Language","WoltLabSuite/Core/Date/Util","WoltLabSuite/Core/Timer/Repeating"],function(e,t,i,n){"use strict";var a=elByTag("time"),r=null;return{setup:function(){this._refresh(),new n(this._refresh.bind(this),6e4),e.add("WoltLabSuite/Core/Date/Time/Relative",this._refresh.bind(this))},_refresh:function(){var e=new Date,n=(e.getTime()-e.getMilliseconds())/1e3;null===r&&(r=n-TIME_NOW);for(var o=0,s=a.length;o=n||n1)return void(d&&e.triggerEvent(document,"touchend"));if(!d&&(s||l)){if(document.documentElement.classList.contains("pageOverlayActive")){for(var u=!1,h=0;hn.x+100&&this.close(),"right"===d&&a>n.x-100&&this.close()),n=null,d=""}}.bind(this)),document.addEventListener("touchmove",function(e){if(d&&null!==n){var a=e.touches,s=!1,l=!1;"left"===d&&(s=a[0].clientX>n.x+r),"right"===d&&(s=a[0].clientXo;var c=this._menu.classList.contains("open");if(c||!s||l||(this.open(),c=!0),c){var u=a[0].clientX;"right"===t&&(u=document.body.clientWidth-u),u>this._menu.offsetWidth&&(u=this._menu.offsetWidth),u<0&&(u=0),this._menu.style.setProperty("transform","translateX("+("left"===t?1:-1)*(u-this._menu.offsetWidth)+"px)"),i.style.setProperty(t,Math.min(this._menu.offsetWidth,u)+"px")}}}.bind(this))},_initItems:function(){elBySelAll(".menuOverlayItemLink",this._menu,this._initItem.bind(this))},_initItem:function(e){var t=e.parentNode,n=elData(t,"more");if(n)return void e.addEventListener(WCF_CLICK_EVENT,function(a){a.preventDefault(),a.stopPropagation(),i.fire(this._eventIdentifier,"more",{handler:this,identifier:n,item:e,parent:t})}.bind(this));var a,o=e.nextElementSibling;if(null!==o)if("OL"!==o.nodeName&&o.classList.contains("menuOverlayItemLinkIcon"))for(a=elCreate("span"),a.className="menuOverlayItemWrapper",t.insertBefore(a,e),a.appendChild(e);a.nextElementSibling;)a.appendChild(a.nextElementSibling);else{var s="#"!==elAttr(e,"href"),l=t.parentNode,c=elData(o,"title");this._items.set(e,{itemList:o,parentItemList:l}),""===c&&(c=r.childByClass(e,"menuOverlayItemTitle").textContent,elData(o,"title",c));var d=this._showItemList.bind(this,e);if(s){a=elCreate("span"),a.className="menuOverlayItemWrapper",t.insertBefore(a,e),a.appendChild(e);var u=elCreate("a");elAttr(u,"href","#"),u.className="menuOverlayItemLinkIcon"+(e.classList.contains("active")?" active":""),u.innerHTML='',u.addEventListener(WCF_CLICK_EVENT,d),a.appendChild(u)}else e.classList.add("menuOverlayItemLinkMore"),e.addEventListener(WCF_CLICK_EVENT,d);var h=elCreate("li");h.className="menuOverlayHeader",a=elCreate("span"),a.className="menuOverlayItemWrapper";var p=elCreate("a");elAttr(p,"href","#"),p.className="menuOverlayItemLink menuOverlayBackLink",p.textContent=elData(l,"title"),p.addEventListener(WCF_CLICK_EVENT,this._hideItemList.bind(this,e));var f=elCreate("a");if(elAttr(f,"href","#"),f.className="menuOverlayItemLinkIcon",f.innerHTML='',f.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),a.appendChild(p),a.appendChild(f),h.appendChild(a),o.insertBefore(h,o.firstElementChild),!h.nextElementSibling.classList.contains("menuOverlayTitle")){var m=elCreate("li");m.className="menuOverlayTitle";var g=elCreate("span");g.textContent=c,m.appendChild(g),o.insertBefore(m,h.nextElementSibling)}}},_initHeader:function(){var e=elCreate("li");e.className="menuOverlayHeader";var t=elCreate("span");t.className="menuOverlayItemWrapper",e.appendChild(t);var i=elCreate("span");i.className="menuOverlayLogoWrapper",t.appendChild(i);var n=elCreate("span");n.className="menuOverlayLogo",n.style.setProperty("background-image",'url("'+elData(this._menu,"page-logo")+'")',""),i.appendChild(n);var a=elCreate("a");elAttr(a,"href","#"),a.className="menuOverlayItemLinkIcon",a.innerHTML='',a.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),t.appendChild(a);var o=r.childByClass(this._menu,"menuOverlayItemList");o.insertBefore(e,o.firstElementChild)},_hideItemList:function(e,t){t instanceof Event&&t.preventDefault(),this._menu.classList.remove("allowScroll"),this._removeActiveList=!0;var i=this._items.get(e);i.parentItemList.classList.remove("hidden"),this._updateDepth(!1)},_showItemList:function(e,t){t instanceof Event&&t.preventDefault();var n=this._items.get(e),a=elData(n.itemList,"load");if(a&&!elDataBool(e,"loaded")){var r=t.currentTarget.firstElementChild;return r.classList.contains("fa-angle-right")&&(r.classList.remove("fa-angle-right"),r.classList.add("fa-spinner")),void i.fire(this._eventIdentifier,"load_"+a)}this._menu.classList.remove("allowScroll"),n.itemList.classList.add("activeList"),n.parentItemList.classList.add("hidden"),this._activeList.push(n.itemList),this._updateDepth(!0)},_updateDepth:function(e){this._depth+=e?1:-1;var t=this._depth*-100;"rtl"===n.get("wcf.global.pageDirection")&&(t*=-1),this._menu.children[0].style.setProperty("transform","translateX("+t+"%)","")},_updateButtonState:function(){var e=!1;elBySelAll(".badgeUpdate",this._menu,function(t){~~t.textContent>0&&(e=!0)}),this._button.classList[e?"add":"remove"]("pageMenuMobileButtonHasContent")}},l}),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["Core","Dom/Traverse","./Abstract"],function(e,t,i){"use strict";function n(){this.init()}var a=null,r=null,o=null,s=null;return e.inherit(n,i,{init:function(){n._super.prototype.init.call(this,"com.woltlab.wcf.MainMenuMobile","pageMainMenuMobile","#pageHeader .mainMenu"),a=elById("pageMainMenuMobilePageOptionsContainer"),null!==a&&(o=t.childByClass(a,"menuOverlayItemList"),s=elBySel(".jsPageNavigationIcons"),elRemove(t.childByClass(o,"jsMenuOverlayItemPlaceholder")),o.addEventListener("click",function(e){e.target!==o&&null!==t.parentByClass(e.target,"menuOverlayItem",o)&&(this.close(),e.stopPropagation())}.bind(this)))},open:function(e){if(!n._super.prototype.open.call(this,e))return!1;if(null===a)return!0;if(r=s.childElementCount>0){for(var t,i;s.childElementCount;)t=s.children[0],t.classList.add("menuOverlayItem"),i=t.children[0],i.classList.add("menuOverlayItemLink"),i.classList.add("box24"),i.children[1].classList.remove("invisible"),i.children[1].classList.add("menuOverlayItemTitle"),o.appendChild(t);elShow(a)}else elHide(a);return!0},close:function(e){if(!n._super.prototype.close.call(this,e))return!1;if(r){elHide(a);for(var i,l,c=t.childByClass(o,"menuOverlayTitle");i=c.nextElementSibling;)i.classList.remove("menuOverlayItem"),l=i.children[0],l.classList.remove("menuOverlayItemLink"),l.classList.remove("box24"),l.children[1].classList.add("invisible"),l.children[1].classList.remove("menuOverlayItemTitle"),s.appendChild(i)}return!0}}),n}),define("WoltLabSuite/Core/Ui/Page/Menu/User",["Core","EventHandler","./Abstract"],function(e,t,i){"use strict";function n(){this.init()}return e.inherit(n,i,{init:function(){var e=elBySel("#pageUserMenuMobile > .menuOverlayItemList");return 1===e.childElementCount&&e.children[0].classList.contains("menuOverlayTitle")?void elBySel("#pageHeader .userPanel").classList.add("hideUserPanel"):(n._super.prototype.init.call(this,"com.woltlab.wcf.UserMenuMobile","pageUserMenuMobile","#pageHeader .userPanel"),void t.add("com.woltlab.wcf.userMenu","updateBadge",function(e){elBySelAll(".menuOverlayItemBadge",this._menu,function(t){if(elData(t,"badge-identifier")===e.identifier){var i=elBySel(".badge",t);e.count?(null===i&&(i=elCreate("span"),i.className="badge badgeUpdate",t.appendChild(i)),i.textContent=e.count):null!==i&&elRemove(i),this._updateButtonState()}}.bind(this))}.bind(this)))},close:function(e){var t=WCF.Dropdown.Interactive.Handler.getOpenDropdown();t?(e.preventDefault(),e.stopPropagation(),t.close()):n._super.prototype.close.call(this,e)}}),n}),define("WoltLabSuite/Core/Ui/Mobile",["Core","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Ui/CloseOverlay","Ui/Screen","./Page/Menu/Main","./Page/Menu/User"],function(e,t,i,n,a,r,o,s,l,c,d){"use strict";var u=elByClass("buttonGroupNavigation"),h=!1,p=new a,f=null,m=elByClass("message"),g={},v=null,_=null,b=null;return{setup:function(i){g=e.extend({enableMobileMenu:!0},i),f=elById("main"),t.touch()&&document.documentElement.classList.add("touch"),"desktop"!==t.platform()&&document.documentElement.classList.add("mobile");var n=elBySel(".messageGroupList");n&&(b=elByClass("messageGroup",n)),l.on("screen-md-down",{match:this.enable.bind(this),unmatch:this.disable.bind(this),setup:this._init.bind(this)}),l.on("screen-sm-down",{match:this.enableShadow.bind(this),unmatch:this.disableShadow.bind(this),setup:this.enableShadow.bind(this)})},enable:function(){h=!0,g.enableMobileMenu&&(v.enable(),_.enable())},enableShadow:function(){b&&this.rebuildShadow(b,".messageGroupLink")},disable:function(){h=!1,g.enableMobileMenu&&(v.disable(),_.disable())},disableShadow:function(){b&&this.removeShadow(b)},_init:function(){h=!0,this._initSearchBar(),this._initButtonGroupNavigation(),this._initMessages(),this._initMobileMenu(),s.add("WoltLabSuite/Core/Ui/Mobile",this._closeAllMenus.bind(this)),r.add("WoltLabSuite/Core/Ui/Mobile",function(){this._initButtonGroupNavigation(),this._initMessages()}.bind(this))},_initSearchBar:function(){var e=elById("pageHeaderSearch"),n=elById("pageHeaderSearchInput"),a=null;i.add("com.woltlab.wcf.MainMenuMobile","more",function(i){"com.woltlab.wcf.search"===i.identifier&&(i.handler.close(!0),"ios"===t.platform()&&(a=document.body.scrollTop,l.scrollDisable()),e.style.setProperty("top",elById("pageHeader").offsetHeight+"px",""),e.classList.add("open"),n.focus(),"ios"===t.platform()&&(document.body.scrollTop=0))}),f.addEventListener(WCF_CLICK_EVENT,function(){e&&e.classList.remove("open"),"ios"===t.platform()&&null!==a&&(l.scrollEnable(),document.body.scrollTop=a,a=null)})},_initButtonGroupNavigation:function(){for(var e=0,t=u.length;e as children for li[data-name='"+r+"'] (tab menu id: '"+d+"').");this._tabs.set(r,c)}if(!this._tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+d+"').");return this._isLegacy&&(elData(this._container,"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(elData(t,"name"))===t||t.children[0].addEventListener(WCF_CLICK_EVENT,this._onClick.bind(this))}.bind(this));var t=null;if(!e){var i=a.getIdentifierFromHash(),n=null;if(""!==i&&(n=this._tabs.get(i),n&&this._container.parentNode.classList.contains("tabMenuContainer")&&(t=this._container)),!n){var r=elData(this._container,"preselect")||elData(this._container,"active");"true"!==r&&r||(r=!0),r===!0?this._tabs.forEach(function(e){n||e.previousElementSibling||(n=e)}):"false"!==r&&(n=this._tabs.get(r))}n&&(this._containers.forEach(function(e){e.classList.add("hidden")}),this.select(null,n,!0));var o=elData(this._container,"store");if(o){var s=elCreate("input");s.type="hidden",s.name=o,s.value=elData(this.getActiveTab(),"name"),this._container.appendChild(s),this._store=s}}return t},select:function(e,i,n){if(i=i||this._tabs.get(e),!i){if(~~e==e){e=~~e;var r=0;this._tabs.forEach(function(t){r===e&&(i=t),r++})}if(!i)throw new Error("Expected a valid tab name, '"+e+"' given (tab menu id: '"+this._container.id+"')."); +}e=e||elData(i,"name");var o=this.getActiveTab(),s=null;if(o){var l=elData(o,"name");if(l===e)return;n||t.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"beforeSelect",{tab:o,tabName:l}),o.classList.remove("active"),s=this._containers.get(elData(o,"name")),s.classList.remove("active"),s.classList.add("hidden"),this._isLegacy&&(o.classList.remove("ui-state-active"),s.classList.remove("ui-state-active"))}i.classList.add("active");var c=this._containers.get(e);if(c.classList.add("active"),c.classList.remove("hidden"),this._isLegacy&&(i.classList.add("ui-state-active"),c.classList.add("ui-state-active")),this._store&&(this._store.value=e),!n){t.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"select",{active:i,activeName:e,previous:o,previousName:o?elData(o,"name"):null});var d=this._isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;d&&d(this._container).trigger("wcftabsbeforeactivate",{newTab:d(i),oldTab:d(o),newPanel:d(c),oldPanel:d(s)});var u=window.location.href.replace(/#[^#]+$/,"");u+=a.getIdentifierFromHash()===e?window.location.hash:"#"+e,window.history.replaceState(void 0,void 0,u)}require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.scrollToTab(i)})},rebuild:function(){var t=new e;t.merge(this._tabs),this.validate(),this.init(t)},hasTab:function(e){return this._tabs.has(e)},_onClick:function(e){e.preventDefault(),this.select(null,e.currentTarget.parentNode)},_getTabName:function(e){var t=elData(e,"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,elData(e,"name",t))),t},getActiveTab:function(){return elBySel("#"+this._container.id+" > nav > ul > li.active")},getContainers:function(){return this._containers},getTabs:function(){return this._tabs}},a.getIdentifierFromHash=function(){return window.location.hash.match(/^#([^\/]+)+(?:\/.+)?/)?RegExp.$1:""},a}),define("WoltLabSuite/Core/Ui/TabMenu",["Dictionary","EventHandler","Dom/ChangeListener","Dom/Util","Ui/CloseOverlay","Ui/Screen","./TabMenu/Simple"],function(e,t,i,n,a,r,o){"use strict";var s=null,l=!1,c=new e;return{setup:function(){this._init(),this._selectErroneousTabs(),i.add("WoltLabSuite/Core/Ui/TabMenu",this._init.bind(this)),a.add("WoltLabSuite/Core/Ui/TabMenu",function(){s&&(s.classList.remove("active"),s=null)}),r.on("screen-sm-down",{enable:this._scrollEnable.bind(this,!1),disable:this._scrollDisable.bind(this),setup:this._scrollEnable.bind(this,!0)}),window.addEventListener("hashchange",function(){var e=o.getIdentifierFromHash(),t=e?elById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&c.forEach(function(t){t.hasTab(e)&&t.select(e)})});var e=o.getIdentifierFromHash();e&&window.setTimeout(function(){var t=elById(e);if(t&&t.classList.contains("tabMenuContent")){var i=window.scrollY||window.pageYOffset;if(i>0){var a=t.parentNode,r=a.offsetTop-50;if(r<0&&(r=0),i>r){var o=n.offset(a).top;o<=50?o=0:o-=50,window.scrollTo(0,o)}}}},100)},_init:function(){for(var e,t,i,a,r,l=elBySelAll(".tabMenuContainer:not(.staticTabMenuContainer)"),d=0,u=l.length;d nav > ul"),function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),t.target===e?(e.classList.add("active"),s=e):(e.classList.remove("active"),s=null)})}(i),elBySelAll(".tabMenu, .menu",e,function(e){var t=this._rebuildMenuOverflow.bind(this,e),i=null;elBySel("ul",e).addEventListener("scroll",function(){null!==i&&window.clearTimeout(i),i=window.setTimeout(t,10)})}.bind(this))))},_selectErroneousTabs:function(){c.forEach(function(e){var t=!1;e.getContainers().forEach(function(i){!t&&elByClass("formError",i).length&&(t=!0,e.select(i.id))})})},getTabMenu:function(e){return c.get(e)},_scrollEnable:function(e){l=!0,c.forEach(function(t){var i=t.getActiveTab();e?this._rebuildMenuOverflow(i.closest(".menu, .tabMenu")):this.scrollToTab(i)}.bind(this))},_scrollDisable:function(){l=!1},scrollToTab:function(e){if(l){var t=e.closest("ul"),i=t.clientWidth,n=t.scrollLeft,a=t.scrollWidth;if(i!==a){var r=e.offsetLeft,o=!1;r0&&(r-=15),r=r<0?0:Math.min(r,a-i),n===r)return;t.classList.add("enableAnimation"),n0,o=elBySel(".tabMenuOverlayLeft",e);r?(null===o&&(o=elCreate("span"),o.className="tabMenuOverlayLeft icon icon24 fa-angle-left",e.insertBefore(o,e.firstChild)),o.classList.add("active")):null!==o&&o.classList.remove("active");var s=t+n element as child of container '"+e+"'.";o.set(e,t),c.set(e,i),this.rebuild(e)}},registerTabMenus:function(){for(var e=elBySelAll(".tabMenuContainer:not(.jsFlexibleMenuEnabled), .messageTabMenu:not(.jsFlexibleMenuEnabled)"),t=0,i=e.length;tu)for(var g=p.length-1;g>=0;g--){var _=p[g];if(!(_.classList.contains("dropdown")||_.classList.contains("active")||_.classList.contains("ui-state-active"))&&(w.push(_),elHide(_),h.scrollWidth0?"-":"+";m=Math.abs(m);var v=Math.floor(m/60).toString(),_=(m%60).toString();g+=2===v.length?v:"0"+v,g+=":",g+=2===_.length?_:"0"+_,u?p+="T00:00:00"+g:p=p.replace(/[+-][0-9]{2}:[0-9]{2}$/,g)}h=new Date(p)}elData(r,"value",h.getTime());var b=s?"formatTime":"formatDate"+(o?"Time":"");p=e[b](h)}var w=0===p.length;if(u?(elData(r,"min-date","120"),elData(r,"max-date",(new Date).getFullYear()+"-12-31")):(r.min&&elData(r,"min-date",r.min),r.max&&elData(r,"max-date",r.max)),this._initDateRange(r,i,!0),this._initDateRange(r,i,!1),elData(r,"min-date")===elData(r,"max-date"))throw new Error("Minimum and maximum date cannot be the same (element id '"+r.id+"').");r.type="text",r.value=p,elData(r,"empty",w),elData(r,"placeholder")&&elAttr(r,"placeholder",elData(r,"placeholder"));var y=elCreate("input");y.id=r.id+"DatePicker",y.name=r.name,y.type="hidden",null!==h&&(s?y.value=e.format(h,"H:i"):d?y.value=e.format(h,"Y-m-dTH:i:s"):y.value=e.format(h,o?"c":"Y-m-d")),r.parentNode.insertBefore(y,r),r.removeAttribute("name"),r.addEventListener(WCF_CLICK_EVENT,C);var E=elCreate("div");E.className="inputAddon";var L=elCreate("a");L.className="inputSuffix button",L.addEventListener(WCF_CLICK_EVENT,C),E.appendChild(L);var S=elCreate("span");S.className="icon icon16 fa-calendar",L.appendChild(S),r.parentNode.insertBefore(E,r),E.insertBefore(r,L),c||(L=elCreate("a"),L.className="inputSuffix button",L.addEventListener(WCF_CLICK_EVENT,this.clear.bind(this,r)),w&&L.style.setProperty("visibility","hidden",""),E.appendChild(L),S=elCreate("span"),S.className="icon icon16 fa-times",L.appendChild(S));for(var x=!1,D=["tiny","short","medium","long"],I=0;I<4;I++)r.classList.contains(D[I])&&(x=!0);x||r.classList.add("short"),l.set(r,{clearButton:L,shadow:y,disableClear:c,isDateTime:o,isEmpty:w,isTimeOnly:s,ignoreTimezone:d,onClose:null})}},_initDateRange:function(e,t,i){var n="data-"+(i?"min":"max")+"-date",a=e.hasAttribute(n)?elAttr(e,n).trim():"";if(a.match(/^(\d{4})-(\d{2})-(\d{2})$/))a=new Date(a).getTime();else if("now"===a)a=t.getTime();else if(a.match(/^\d{1,3}$/)){var r=new Date(t.getTime());r.setFullYear(r.getFullYear()+~~a*(i?-1:1)),a=r.getTime()}else if(a.match(/^datePicker-(.+)$/)){if(a=RegExp.$1,null===elById(a))throw new Error("Reference date picker identified by '"+a+"' does not exists (element id: '"+e.id+"').")}else a=/^\d{4}\-\d{2}\-\d{2}T/.test(a)?new Date(a).getTime():new Date(i?1970:2038,0,1).getTime();elAttr(e,n,a)},_setup:function(){o||(o=!0,s=~~t.get("wcf.date.firstDayOfTheWeek"),C=this._open.bind(this),n.add("WoltLabSuite/Core/Date/Picker",this.init.bind(this)),r.add("WoltLabSuite/Core/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 i,n=l.get(c),r=elData(c,"value");r?(i=new Date(+r),"Invalid Date"===i.toString()&&(i=new Date)):i=new Date,u=elData(c,"min-date"),u.match(/^datePicker-(.+)$/)&&(u=elData(elById(RegExp.$1),"value")),u=new Date(+u),d=elData(c,"max-date"),d.match(/^datePicker-(.+)$/)&&(d=elData(elById(RegExp.$1),"value")),d=new Date(+d),n.isDateTime?(f.value=i.getHours(),m.value=i.getMinutes(),y.classList.add("datePickerTime")):y.classList.remove("datePickerTime"),y.classList[n.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),this._renderPicker(i.getDate(),i.getMonth(),i.getFullYear()),a.set(y,c)}},_close:function(){if(null!==y&&y.classList.contains("active")){y.classList.remove("active");var e=l.get(c);"function"==typeof e.onClose&&e.onClose(),c=null,u=0,d=0}},_renderPicker:function(e,t,i){this._renderGrid(e,t,i);for(var n="",a=u.getFullYear(),r=d.getFullYear();a<=r;a++)n+='";w.innerHTML=n,w.value=i,g.value=t,y.classList.add("active")},_renderGrid:function(e,t,i){var n,a,r=void 0!==e,o=void 0!==t;if(e=~~e||~~elData(p,"day"),t=~~t,i=~~i,o||i){var l=0!==i,c=document.createDocumentFragment();c.appendChild(p),o||(t=~~elData(p,"month")),i=i||~~elData(p,"year");var f=new Date(i+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(fd&&(i=d.getFullYear(),t=d.getMonth(),e=d.getDate(),g.value=t,w.value=i,l=!0),f=new Date(i+"-"+("0"+(t+1).toString()).slice(-2)+"-01");f.getDay()!==s;)f.setDate(f.getDate()-1);elShow(h[35].parentNode);var m,C=new Date(u.getFullYear(),u.getMonth(),u.getDate());for(a=0;a<42;a++){if(35===a&&f.getMonth()!==t){elHide(h[35].parentNode);break}n=h[a],n.textContent=f.getDate(),m=f.getMonth()===t,m&&(fd&&(m=!1)),n.classList[m?"remove":"add"]("otherMonth"),f.setDate(f.getDate()+1)}if(elData(p,"month",t),elData(p,"year",i),y.insertBefore(c,b),!r&&(f=new Date(i,t,e),f.getDate()!==e)){for(;f.getMonth()!==t;)f.setDate(f.getDate()-1);e=f.getDate()}if(l){for(a=0;a<12;a++){var E=g.children[a];E.disabled=i===u.getFullYear()&&E.valued.getMonth()}var L=new Date(i+"-"+("0"+(t+1).toString()).slice(-2)+"-01");L.setMonth(L.getMonth()+1),v.classList[Lu?"add":"remove"]("active")}}if(e){for(a=0;a<35;a++)n=h[a],n.classList[n.classList.contains("otherMonth")||~~n.textContent!==e?"remove":"add"]("active");elData(p,"day",e)}this._formatValue()},_formatValue:function(){var t,i,n,a=l.get(c);"true"!==elData(c,"empty")&&(a.isDateTime?(t=new Date(elData(p,"year"),elData(p,"month"),elData(p,"day"),f.value,m.value),a.isTimeOnly?(i=e.formatTime(t),n=e.format(t,"H:i")):a.ignoreTimezone?(i=e.formatDateTime(t),n=e.format(t,"Y-m-dTH:i:s")):(i=e.formatDateTime(t),n=e.format(t,"c"))):(t=new Date(elData(p,"year"),elData(p,"month"),elData(p,"day")),i=e.formatDate(t),n=e.format(t,"Y-m-d")),c.value=i,elData(c,"value",t.getTime()),a.disableClear||a.clearButton.style.removeProperty("visibility"),a.shadow.value=n)},_createPicker:function(){if(null===y){y=elCreate("div"),y.className="datePicker",y.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()});var i=elCreate("header");y.appendChild(i),_=elCreate("a"),_.className="previous",_.innerHTML='',_.addEventListener(WCF_CLICK_EVENT,this.previousMonth.bind(this)),i.appendChild(_);var n=elCreate("span");i.appendChild(n),g=elCreate("select"),g.className="month",g.addEventListener("change",this._changeMonth.bind(this)),n.appendChild(g);var a,r="",o=t.get("__monthsShort");for(a=0;a<12;a++)r+='";g.innerHTML=r,w=elCreate("select"),w.className="year",w.addEventListener("change",this._changeYear.bind(this)),n.appendChild(w),v=elCreate("a"),v.className="next",v.innerHTML='',v.addEventListener(WCF_CLICK_EVENT,this.nextMonth.bind(this)),i.appendChild(v),p=elCreate("ul"),y.appendChild(p);var l=elCreate("li");l.className="weekdays",p.appendChild(l);var c,d=t.get("__daysShort");for(a=0;a<7;a++){var u=a+s;u>6&&(u-=7),c=elCreate("span"),c.textContent=d[u],l.appendChild(c)}var C,E,L=this._click.bind(this);for(a=0;a<6;a++){E=elCreate("li"),p.appendChild(E);for(var S=0;S<7;S++)C=elCreate("a"),C.addEventListener(WCF_CLICK_EVENT,L),h.push(C),E.appendChild(C)}b=elCreate("footer"),y.appendChild(b),f=elCreate("select"),f.className="hour",f.addEventListener("change",this._formatValue.bind(this));var x="",D=new Date(2e3,0,1),I=t.get("wcf.date.timeFormat").replace(/:/,"").replace(/[isu]/g,"");for(a=0;a<24;a++)D.setHours(a),x+='";for(f.innerHTML=x,b.appendChild(f),b.appendChild(document.createTextNode(" : ")),m=elCreate("select"),m.className="minute",m.addEventListener("change",this._formatValue.bind(this)),x="",a=0;a<60;a++)x+='";m.innerHTML=x,b.appendChild(m),document.body.appendChild(y)}},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")||(elData(c,"empty",!1),this._renderGrid(e.currentTarget.textContent),this._close())},getDate:function(e){return e=this._getElement(e),e.hasAttribute("data-value")?new Date(+elData(e,"value")):null},setDate:function(t,i){t=this._getElement(t);var n=l.get(t);elData(t,"value",i.getTime()),t.value=e["formatDate"+(n.isDateTime?"Time":"")](i);var a="";a=n.ignoreTimezone?"Y-m-dTH:i:s":n.isDateTime?"c":"Y-m-d",n.shadow.value=e.format(i,a)},getValue:function(e){e=this._getElement(e);var t=l.get(e);return t?t.shadow.value:""},clear:function(e){e=this._getElement(e);var t=l.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||t.clearButton.style.setProperty("visibility","hidden",""),t.isEmpty=!0,t.shadow.value=""},destroy:function(e){e=this._getElement(e);var t=l.get(e),i=e.parentNode;i.parentNode.insertBefore(e,i),elRemove(i),elAttr(e,"type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener(WCF_CLICK_EVENT,C),elRemove(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=E,E}),define("WoltLabSuite/Core/Ui/Page/Action",["Dictionary","Dom/Util"],function(e,t){"use strict";var i=new e,n=null,a=!1;return{setup:function(){a=!0,n=elCreate("ul"),n.className="pageAction",document.body.appendChild(n)},add:function(e,r,o){a===!1&&this.setup();var s=elCreate("li");if(r.classList.add("button"),r.classList.add("buttonPrimary"),s.appendChild(r),elAttr(s,"aria-hidden","toTop"===e?"true":"false"),elData(s,"name",e),"toTop"===e)s.className="toTop initiallyHidden",n.appendChild(s);else{var l=null;o&&(l=i.get(o),void 0!==l&&(l=l.parentNode)),null===l&&n.childElementCount&&(l=n.children[0]),null===l?t.prepend(s,n):n.insertBefore(s,l)}i.set(e,r),this._renderContainer()},has:function(e){return i.has(e)},get:function(e){return i.get(e)},remove:function(e){var t=i.get(e);if(void 0!==t){var a=t.parentNode;a.addEventListener("animationend",function(){try{n.removeChild(a),i.delete(e)}catch(e){}}),this.hide(e)}},hide:function(e){var t=i.get(e);t&&(elAttr(t.parentNode,"aria-hidden","true"),this._renderContainer())},show:function(e){var t=i.get(e);t&&(t.parentNode.classList.contains("initiallyHidden")&&t.parentNode.classList.remove("initiallyHidden"),elAttr(t.parentNode,"aria-hidden","false"),this._renderContainer())},_renderContainer:function(){var e=!1;if(n.childElementCount)for(var t=0,i=n.childElementCount;t',n.addEventListener(WCF_CLICK_EVENT,this._jump.bind(this)),i.add("toTop",n),window.addEventListener("scroll",this._scroll.bind(this)),this._afterScroll()}},_jump:function(e){e.preventDefault(),elById("top").scrollIntoView({behavior:"smooth"})},_scroll:function(){null!==this._timeoutScroll&&window.clearTimeout(this._timeoutScroll),this._timeoutScroll=window.setTimeout(this._callbackScrollEnd,100)},_afterScroll:function(){this._timeoutScroll=null,i[window.pageYOffset>=300?"show":"hide"]("toTop")}},n}),define("WoltLabSuite/Core/Bootstrap",["favico","enquire","perfect-scrollbar","WoltLabSuite/Core/Date/Time/Relative","Ui/SimpleDropdown","WoltLabSuite/Core/Ui/Mobile","WoltLabSuite/Core/Ui/TabMenu","WoltLabSuite/Core/Ui/FlexibleMenu","Ui/Dialog","WoltLabSuite/Core/Ui/Tooltip","WoltLabSuite/Core/Language","WoltLabSuite/Core/Environment","WoltLabSuite/Core/Date/Picker","EventHandler","Core","WoltLabSuite/Core/Ui/Page/JumpToTop"],function(e,t,i,n,a,r,o,s,l,c,d,u,h,p,f,m){"use strict";return window.Favico=e,window.enquire=t,null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=d.get,window.WCF.Language.add=d.add,window.WCF.Language.addObject=d.addObject,window.__wcf_bc_eventHandler=p,{setup:function(e){e=f.extend({enableMobileMenu:!0},e),u.setup(),n.setup(),h.init(),a.setup(),r.setup({enableMobileMenu:e.enableMobileMenu}),o.setup(),l.setup(),c.setup(),new m;for(var t=elBySelAll("form[method=get]"),i=0,s=t.length;i li",e),i=0,n=t.length;i"+i+"

        ")),r.content=c,r.state=C,o){var d=l.get(o).element;elData(d,"cache-id")===n&&this._show()}},_mouseEnter:function(e){if(!u){null!==h&&(window.clearTimeout(h),h=null);var t=a.identify(e.currentTarget);o===t&&null!==p&&(window.clearTimeout(p),p=null),d=t,h=window.setTimeout(function(){h=null,d===t&&this._show()}.bind(this),L)}},_mouseLeave:function(){d=null,null===p&&(null===v&&(v=this._hide.bind(this)),null!==p&&window.clearTimeout(p),p=window.setTimeout(v,E))},_popoverMouseEnter:function(){null!==p&&(window.clearTimeout(p),p=null)},_show:function(){null!==p&&(window.clearTimeout(p),p=null);var e=!1;f.classList.contains("active")?o!==d&&(this._hide(),e=!0):m.childElementCount&&(e=!0),e&&(f.classList.add("forceHide"),f.offsetTop,this._clearContent(),f.classList.remove("forceHide")),o=d;var t=l.get(o);if(void 0!==t){var i=s.get(elData(t.element,"cache-id"));i.state===C?(m.appendChild(i.content),this._rebuild(o)):i.state===w&&(i.state=y,c.get(t.identifier).loadCallback(t.objectId,this))}},_hide:function(){null!==p&&(window.clearTimeout(p),p=null),f.classList.remove("active")},_clearContent:function(){if(o&&m.childElementCount&&!f.classList.contains("active"))for(var e=s.get(elData(l.get(o).element,"cache-id"));m.childNodes.length;)e.content.appendChild(m.childNodes[0])},_rebuild:function(){f.classList.contains("active")||(f.classList.remove("forceHide"),f.classList.add("active"),r.set(f,l.get(o).element,{pointer:!0,vertical:"top"}))},_ajaxSetup:function(){return{silent:!0}},ajaxApi:function(t,i,n){if("function"!=typeof i)throw new TypeError("Expected a valid callback for parameter 'success'.");e.api(this,t,i,n)}}}),define("WoltLabSuite/Core/Ui/User/Ignore",["List","Dom/ChangeListener"],function(e,t){"use strict";var i=elByClass("ignoredUserMessage"),n=null,a=new e;return{init:function(){n=this._removeClass.bind(this),this._rebuild(),t.add("WoltLabSuite/Core/Ui/User/Ignore",this._rebuild.bind(this))},_rebuild:function(){for(var e,t=0,r=i.length;te||o<0)for(var n,c=0,d=a.childElementCount;ce&&l.push(n)}i.classList[s.length?"add":"remove"]("active"),t.classList[l.length?"add":"remove"]("active")}},_setup:function(){t=elCreate("a"),t.className="mainMenuShowNext",t.href="#",t.innerHTML='',t.addEventListener(WCF_CLICK_EVENT,this._showNext.bind(this)),a.parentNode.appendChild(t),i=elCreate("a"),i.className="mainMenuShowPrevious",i.href="#",i.innerHTML='',i.addEventListener(WCF_CLICK_EVENT,this._showPrevious.bind(this)),a.parentNode.insertBefore(i,a.parentNode.firstChild);var e=this._rebuildVisibility.bind(this);n.addEventListener("transitionend",e),window.addEventListener("resize",function(){n.style.setProperty("margin-left","0px",""),o=0,e()}),this._enable()}}}),define("WoltLabSuite/Core/BootstrapFrontend",["Ajax","WoltLabSuite/Core/Bootstrap","WoltLabSuite/Core/Controller/Style/Changer","WoltLabSuite/Core/Controller/Popover","WoltLabSuite/Core/Ui/User/Ignore","WoltLabSuite/Core/Ui/Page/Header/Menu"],function(e,t,i,n,a,r){"use strict";var o=0;return{setup:function(e){e.backgroundQueue.url=WSC_API_URL+e.backgroundQueue.url.substr(WCF_PATH.length),t.setup(),r.init(),e.styleChanger&&i.setup(),e.enableUserPopover&&this._initUserPopover(),this._invokeBackgroundQueue(e.backgroundQueue.url,e.backgroundQueue.force),a.init()},_initUserPopover:function(){n.init({attributeName:"data-user-id",className:"userLink", +identifier:"com.woltlab.wcf.user",loadCallback:function(e,t){var i=function(i){t.setContent("com.woltlab.wcf.user",e,i.returnValues.template)};t.ajaxApi({actionName:"getUserProfile",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]},i,i)}})},_invokeBackgroundQueue:function(t,i){var n=this._invokeBackgroundQueue.bind(this,t,!0);(Math.random()<.1||i)&&e.apiOnce({url:t,ignoreError:!0,silent:!0,success:function(e){o++,e>0&&o<5&&setTimeout(n,1e3)}.bind(this)})}}}),define("WoltLabSuite/Core/ColorUtil",[],function(){"use strict";var e={hsvToRgb:function(e,t,i){var n,a,r,o,s,l={r:0,g:0,b:0};if(n=Math.floor(e/60),a=e/60-n,t/=100,i/=100,r=i*(1-t),o=i*(1-t*a),s=i*(1-t*(1-a)),0==t)l.r=l.g=l.b=i;else switch(n){case 1:l.r=o,l.g=i,l.b=r;break;case 2:l.r=r,l.g=i,l.b=s;break;case 3:l.r=r,l.g=o,l.b=i;break;case 4:l.r=s,l.g=r,l.b=i;break;case 5:l.r=i,l.g=r,l.b=o;break;case 0:case 6:l.r=i,l.g=s,l.b=r}return{r:Math.round(255*l.r),g:Math.round(255*l.g),b:Math.round(255*l.b)}},rgbToHsv:function(e,t,i){var n,a,r,o,s,l;if(e/=255,t/=255,i/=255,o=Math.max(Math.max(e,t),i),s=Math.min(Math.min(e,t),i),l=o-s,n=0,o!==s){switch(o){case e:n=60*((t-i)/l);break;case t:n=60*(2+(i-e)/l);break;case i:n=60*(4+(e-t)/l)}n<0&&(n+=360)}return a=0===o?0:l/o,r=o,{h:Math.round(n),s:Math.round(100*a),v:Math.round(100*r)}},hexToRgb:function(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){var t=e.split("");return"#"===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)}}return Number.NaN},rgbToHex:function(e,t,i){var n="0123456789ABCDEF";return void 0===t&&e.toString().match(/^rgba?\((\d+), ?(\d+), ?(d\+)(?:, ?[0-9.]+)?\)$/)&&(e=RegExp.$1,t=RegExp.$2,i=RegExp.$3),n.charAt((e-e%16)/16)+""+n.charAt(e%16)+(n.charAt((t-t%16)/16)+""+n.charAt(t%16))+(n.charAt((i-i%16)/16)+""+n.charAt(i%16))}};return window.__wcf_bc_colorUtil=e,e}),define("WoltLabSuite/Core/FileUtil",["Dictionary","StringUtil"],function(e,t){"use strict";var i=e.fromObject({zip:"archive",rar:"archive",tar:"archive",gz:"archive",mp3:"audio",ogg:"audio",wav:"audio",php:"code",html:"code",htm:"code",tpl:"code",js:"code",xls:"excel",ods:"excel",xlsx:"excel",gif:"image",jpg:"image",jpeg:"image",png:"image",bmp:"image",avi:"video",wmv:"video",mov:"video",mp4:"video",mpg:"video",mpeg:"video",flv:"video",pdf:"pdf",ppt:"powerpoint",pptx:"powerpoint",txt:"text",doc:"word",docx:"word",odt:"word"});return{formatFilesize:function(e,i){void 0===i&&(i=2);var n="Byte";return e>=1e3&&(e/=1e3,n="kB"),e>=1e3&&(e/=1e3,n="MB"),e>=1e3&&(e/=1e3,n="GB"),e>=1e3&&(e/=1e3,n="TB"),t.formatNumeric(e,-i)+" "+n},getIconNameByFilename:function(e){var t=e.lastIndexOf(".");if(t!==!1){var n=e.substr(t+1);if(i.has(n))return i.get(n)}return""}}}),define("WoltLabSuite/Core/Permission",["Dictionary"],function(e){"use strict";var t=new e;return{add:function(e,i){if("boolean"!=typeof i)throw new TypeError("Permission value has to be boolean.");t.set(e,i)},addObject:function(e){for(var t in e)objOwns(e,t)&&this.add(t,e[t])},get:function(e){return!!t.has(e)&&t.get(e)}}}),define("WoltLabSuite/Core/Upload",["AjaxRequest","Core","Dom/ChangeListener","Language","Dom/Util","Dom/Traverse"],function(e,t,i,n,a,r){"use strict";function o(e,i,n){if(n=n||{},void 0===n.className)throw new Error("Missing class name.");if(this._options=t.extend({action:"upload",multiple:!1,name:"__files[]",singleFileRequests:!1,url:"index.php?ajax-upload/&t="+SECURITY_TOKEN},n),this._options.url=t.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=WSC_API_URL+this._options.url),this._buttonContainer=elById(e),null===this._buttonContainer)throw new Error("Element id '"+e+"' is unknown.");if(this._target=elById(i),null===i)throw new Error("Element id '"+i+"' is unknown.");if(n.multiple&&"UL"!==this._target.nodeName&&"OL"!==this._target.nodeName&&"TBODY"!==this._target.nodeName)throw new Error("Target element has to be list or table body if uploading multiple files is supported.");this._fileElements=[],this._internalFileId=0,this._createButton()}return o.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.className="button uploadButton";var e=elCreate("span");e.textContent=n.get("wcf.global.button.upload"),this._button.appendChild(e),a.prepend(this._fileUpload,this._button),this._insertButton(),i.trigger()},_createFileElement:function(e){var t=elCreate("progress");if(elAttr(t,"max",100),"OL"===this._target.nodeName||"UL"===this._target.nodeName){var i=elCreate("li");return i.innerText=e.name,i.appendChild(t),this._target.appendChild(i),i}if("TBODY"===this._target.nodeName)return this._createFileTableRow(e);var n=elCreate("p");return n.appendChild(t),this._target.appendChild(n),n},_createFileElements:function(e){if(e.length){var t=this._fileElements.length;this._fileElements[t]=[];for(var n=0,a=e.length;n for id \''+e+"'.");t.init(e,i,n,a),t.registerCallback(e,"select",this._callbackSelect.bind(this)),t.registerCallback(e,"submit",this._callbackSubmit.bind(this))},_callbackSelect:function(e){void 0!==window.jQuery&&window.jQuery(e).redactor("code.set",e.value)},_callbackSubmit:function(e){void 0!==window.jQuery&&(e.value=window.jQuery(e).redactor("code.get"))}}}),define("WoltLabSuite/Core/Ui/Notification",["Language"],function(e){"use strict";var t=!1,i=null,n=null,a=null,r=null,o=null,s={show:function(s,l,c){t||(this._init(),i="function"==typeof l?l:null,n.className=c||"success",n.textContent=e.get(s||"wcf.global.success"),t=!0,a.classList.add("active"),r=setTimeout(o,2e3))},_init:function(){null===a&&(o=this._hide.bind(this),a=elCreate("div"),a.id="systemNotification",n=elCreate("p"),n.addEventListener(WCF_CLICK_EVENT,o),a.appendChild(n),document.body.appendChild(a))},_hide:function(){clearTimeout(r),a.classList.remove("active"),null!==i&&i(),t=!1}};return s}),define("WoltLabSuite/Core/Media/Editor",["Ajax","Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Language","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Language/Chooser","WoltLabSuite/Core/Language/Input","EventKey"],function(e,t,i,n,a,r,o,s,l,c,d){"use strict";function u(e){if(this._callbackObject=e||{},this._callbackObject._editorClose&&"function"!=typeof this._callbackObject._editorClose)throw new TypeError("Callback object has no function '_editorClose'.");if(this._callbackObject._editorSuccess&&"function"!=typeof this._callbackObject._editorSuccess)throw new TypeError("Callback object has no function '_editorSuccess'.");this._media=null,this._availableLanguageCount=1,this._categoryIds=[],this._oldCategoryId=0,this._dialogs=new i}return u.prototype={_ajaxSetup:function(){return{data:{actionName:"update",className:"wcf\\data\\media\\MediaAction"}}},_ajaxSuccess:function(e){s.show(),this._callbackObject._editorSuccess&&(this._callbackObject._editorSuccess(this._media,this._oldCategoryId),this._oldCategoryId=0),o.close("mediaEditor_"+this._media.mediaID),this._media=null},_close:function(){this._media=null,this._callbackObject._editorClose&&this._callbackObject._editorClose()},_keyPress:function(e){d.Enter(e)&&(e.preventDefault(),this._saveData())},_saveData:function(){var t=o.getDialog("mediaEditor_"+this._media.mediaID).content,i=elBySel("select[name=categoryID]",t),n=elBySel("input[name=altText]",t),s=elBySel("textarea[name=caption]",t),d=elBySel("input[name=title]",t),u=!1,h=!!n&&a.childByClass(n.parentNode.parentNode,"innerError"),p=!!s&&a.childByClass(s.parentNode.parentNode,"innerError"),f=a.childByClass(d.parentNode.parentNode,"innerError");if(this._oldCategoryId=this._media.categoryID,this._categoryIds.length&&(this._media.categoryID=~~i.value,this._categoryIds.indexOf(this._media.categoryID)===-1&&(this._media.categoryID=0)),this._availableLanguageCount>1?(this._media.isMultilingual=~~elBySel("input[name=isMultilingual]",t).checked,this._media.languageID=this._media.isMultilingual?null:l.getLanguageId("languageID")):this._media.languageID=LANGUAGE_ID,this._media.altText={},this._media.caption={},this._media.title={},this._availableLanguageCount>1&&this._media.isMultilingual){if(elById("altText_"+this._media.mediaID)&&!c.validate("altText_"+this._media.mediaID,!0)&&(u=!0,!h)){var m=elCreate("small");m.className="innerError",m.textContent=r.get("wcf.global.form.error.multilingual"),n.parentNode.parentNode.appendChild(m)}if(elById("caption_"+this._media.mediaID)&&!c.validate("caption_"+this._media.mediaID,!0)&&(u=!0,!p)){var m=elCreate("small");m.className="innerError",m.textContent=r.get("wcf.global.form.error.multilingual"),s.parentNode.parentNode.appendChild(m)}if(!c.validate("title_"+this._media.mediaID,!0)&&(u=!0,!f)){var m=elCreate("small");m.className="innerError",m.textContent=r.get("wcf.global.form.error.multilingual"),d.parentNode.parentNode.appendChild(m)}this._media.altText=elById("altText_"+this._media.mediaID)?c.getValues("altText_"+this._media.mediaID).toObject():"",this._media.caption=elById("caption_"+this._media.mediaID)?c.getValues("caption_"+this._media.mediaID).toObject():"",this._media.title=c.getValues("title_"+this._media.mediaID).toObject()}else this._media.altText[this._media.languageID]=n?n.value:"",this._media.caption[this._media.languageID]=s?s.value:"",this._media.title[this._media.languageID]=d.value;for(var g={allowAll:~~elById("mediaEditor_"+this._media.mediaID+"_aclAllowAll").checked,group:[],user:[]},v=elBySelAll('input[name="aclValues[group][]"]',t),_=0,b=v.length;_1&&l.setLanguageId("languageID",this._media.languageID||LANGUAGE_ID),this._categoryIds.length&&(elBySel("select[name=categoryID]",e).value=~~this._media.categoryID);var t=elBySel("input[name=title]",e),a=elBySel("input[name=altText]",e),r=elBySel("textarea[name=caption]",e);if(this._availableLanguageCount>1&&this._media.isMultilingual?(elById("altText_"+this._media.mediaID)&&c.setValues("altText_"+this._media.mediaID,i.fromObject(this._media.altText||{})),elById("caption_"+this._media.mediaID)&&c.setValues("caption_"+this._media.mediaID,i.fromObject(this._media.caption||{})),c.setValues("title_"+this._media.mediaID,i.fromObject(this._media.title||{}))):(t.value=this._media.title?this._media.title[LANGUAGE_ID]:"",a&&(a.value=this._media.altText?this._media.altText[LANGUAGE_ID]:""),r&&(r.value=this._media.caption?this._media.caption[LANGUAGE_ID]:"")),this._availableLanguageCount>1){var o=elBySel("input[name=isMultilingual]",e);o.addEventListener("change",this._updateLanguageFields.bind(this)),this._updateLanguageFields(null,o)}var s=this._keyPress.bind(this);a&&a.addEventListener("keypress",s),t.addEventListener("keypress",s),elBySel("button[data-type=submit]",e).addEventListener(WCF_CLICK_EVENT,this._saveData.bind(this)),document.activeElement.blur(),elById("mediaEditor_"+this._media.mediaID).parentNode.scrollTop=0,n.trigger()}.bind(this),0)}.bind(this),data:{actionName:"getEditorDialog",className:"wcf\\data\\media\\MediaAction",objectIDs:[e.mediaID]}}}}.bind(this)}),o.open(this._dialogs.get("mediaEditor_"+e.mediaID))}},u}),define("WoltLabSuite/Core/Media/Upload",["Core","DateUtil","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","Permission","Upload","User","WoltLabSuite/Core/FileUtil"],function(e,t,i,n,a,r,o,s,l,c,d){"use strict";function u(t,i,n){n=n||{},this._mediaManager=null,n.mediaManager&&(this._mediaManager=n.mediaManager,delete n.mediaManager),this._categoryId=null,l.call(this,t,i,e.extend({className:"wcf\\data\\media\\MediaAction",multiple:!!this._mediaManager,singleFileRequests:!0},n))}return e.inherit(u,l,{_createFileElement:function(e){var n;if("OL"===this._target.nodeName||"UL"===this._target.nodeName)n=elCreate("li");else{if("TBODY"===this._target.nodeName){var r=elByTag("TR",this._target)[0],s=this._target.parentNode.parentNode;"none"===s.style.getPropertyValue("display")?(n=r,s.style.removeProperty("display"),elRemove(elById(elData(this._target,"no-items-info")))):(n=r.cloneNode(!0),n.removeAttribute("id"),a.identify(n));for(var l,u=elByTag("TD",n),h=0,p=u.length;h div > p",l);g[0].textContent=e.name;var v=elByTag("A",g[1])[0];v||(v=elCreate("a"),elByTag("SMALL",g[1])[0].appendChild(v)),v.setAttribute("href",c.getLink()),v.textContent=c.username}else l.classList.contains("columnUploadTime")?(l.innerHTML="",l.append(t.getTimeElement(new Date,new Date))):l.classList.contains("columnDigits")?l.textContent=d.formatFilesize(e.size):l.innerHTML="";return a.prepend(n,this._target),n}n=elCreate("p")}var _=elCreate("div");_.className="mediaThumbnail",n.appendChild(_);var b=elCreate("span");b.className="icon icon144 fa-spinner",_.appendChild(b);var w=elCreate("div");w.className="mediaInformation",n.appendChild(w);var y=elCreate("p");y.className="mediaTitle",y.textContent=e.name,w.appendChild(y);var C=elCreate("progress");elAttr(C,"max",100),w.appendChild(C),a.prepend(n,this._target),i.trigger()},_getParameters:function(){if(this._mediaManager){var t={imagesOnly:this._mediaManager.getOption("imagesOnly")},i=this._mediaManager.getCategoryId();return i&&(t.categoryID=i),e.extend(u._super.prototype._getParameters.call(this),t)}return u._super.prototype._getParameters.call(this)},_replaceFileIcon:function(e,t,i){if(t.tinyThumbnailType){var n=elCreate("img");elAttr(n,"src",t.tinyThumbnailLink),elAttr(n,"alt",""),n.style.setProperty("width",i+"px"),n.style.setProperty("height",i+"px"),a.replaceElement(e,n)}else{e.classList.remove("fa-spinner");var r=d.getIconNameByFilename(t.filename);r&&(r="-"+r),e.classList.add("fa-file"+r+"-o")}},_success:function(e,t){for(var s=this._fileElements[e],l=0,c=s.length;l div > p",d)[1];a.insertAfter(g,v),elRemove(v)}else if(elRemove(n.childByTag(n.childByClass(d,"mediaInformation"),"PROGRESS")),h){var f=n.childByTag(n.childByClass(d,"mediaThumbnail"),"SPAN");this._replaceFileIcon(f,h,144),d.className="jsClipboardObject mediaFile",elData(d,"object-id",h.mediaID),this._mediaManager&&(this._mediaManager.setupMediaElement(h,d),this._mediaManager.addMedia(h,d))}else{var m=t.returnValues.errors[u];m||(m={errorType:"uploadFailed",filename:elData(d,"filename")});var f=n.childByTag(n.childByClass(d,"mediaThumbnail"),"SPAN");f.classList.remove("fa-spinner"),f.classList.add("fa-remove"),f.classList.add("pointer"),d.classList.add("uploadFailed"),d.addEventListener(WCF_CLICK_EVENT,function(){elRemove(this)});var _=n.childByClass(n.childByClass(d,"mediaInformation"),"mediaTitle");_.innerText=o.get("wcf.media.upload.error."+m.errorType,{filename:m.filename})}i.trigger()}r.fire("com.woltlab.wcf.media.upload","success",{files:s,media:t.returnValues.media,upload:this,uploadId:e})},_uploadFiles:function(e,t){return u._super.prototype._uploadFiles.call(this,e,t)}}),u}),define("WoltLabSuite/Core/Notification/Handler",["Ajax","Core","EventHandler"],function(e,t,i){"use strict";if(!("Promise"in window&&"Notification"in window))return{setup:function(){}};var n=!1,a="",r=0,o=window.TIME_NOW,s=null,l=0;return{setup:function(e){if(e=t.extend({enableNotifications:!1,icon:"",sessionKeepAlive:0},e),a=e.icon,l=60*e.sessionKeepAlive,this._prepareNextRequest(),document.addEventListener("visibilitychange",this._onVisibilityChange.bind(this)),window.addEventListener("storage",this._onStorage.bind(this)),this._onVisibilityChange(),e.enableNotifications)switch(window.Notification.permission){case"granted":n=!0;break;case"default":window.Notification.requestPermission(function(e){"granted"===e&&(n=!0)})}},_onVisibilityChange:function(){if(r=document.hidden?Date.now():0,!document.hidden){var e=(Date.now()-r)/6e4;e>4&&(this._resetTimer(),this._dispatchRequest())}},_getNextDelay:function(){if(0===r)return 5;var e=~~((Date.now()-r)/6e4);return e<15?5:e<30?10:15},_resetTimer:function(){null!==s&&(window.clearTimeout(s),s=null)},_prepareNextRequest:function(){this._resetTimer();var e=Math.min(this._getNextDelay(),l);s=window.setTimeout(this._dispatchRequest.bind(this),6e4*e)},_dispatchRequest:function(){var t={};i.fire("com.woltlab.wcf.notification","beforePoll",t),t.lastRequestTimestamp=o,e.api(this,{parameters:t})},_onStorage:function(){this._prepareNextRequest();var e,n,a=!1;try{e=window.localStorage.getItem(t.getStoragePrefix()+"notification"),n=window.localStorage.getItem(t.getStoragePrefix()+"keepAliveData"),e=JSON.parse(e),n=JSON.parse(n)}catch(e){a=!0}a||i.fire("com.woltlab.wcf.notification","onStorage",{pollData:e,keepAliveData:n})},_ajaxSuccess:function(e){var n=!1,a=e.returnValues.keepAliveData,r=e.returnValues.pollData;window.WCF.System.PushNotification.executeCallbacks(a);try{window.localStorage.setItem(t.getStoragePrefix()+"notification",JSON.stringify(r)),window.localStorage.setItem(t.getStoragePrefix()+"keepAliveData",JSON.stringify(a))}catch(e){n=!0,window.console.log(e)}n||this._prepareNextRequest(),o=e.returnValues.lastRequestTimestamp,i.fire("com.woltlab.wcf.notification","afterPoll",r),this._showNotification(r)},_showNotification:function(e){n&&"object"==typeof e.notification&&"string"==typeof e.notification.message&&new window.Notification(e.notification.title,{body:e.notification.message,icon:a})},_ajaxSetup:function(){return{data:{actionName:"poll",className:"wcf\\data\\session\\SessionAction"},ignoreError:!window.ENABLE_DEBUG_MODE,silent:!window.ENABLE_DEBUG_MODE}}}}),define("WoltLabSuite/Core/Ui/Suggestion",["Ajax","Core","Ui/SimpleDropdown"],function(e,t,i){"use strict";function n(e,t){this.init(e,t)}return n.prototype={init:function(e,i){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:[],threshold:3},i),"function"!=typeof this._options.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this._element.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()}),this._element.addEventListener("keydown",this._keyDown.bind(this)),this._element.addEventListener("keyup",this._keyUp.bind(this))},addExcludedValue:function(e){this._options.excludedSearchValues.indexOf(e)===-1&&this._options.excludedSearchValues.push(e)},removeExcludedValue:function(e){var t=this._options.excludedSearchValues.indexOf(e);t!==-1&&this._options.excludedSearchValues.splice(t,1)},isActive:function(){return null!==this._dropdownMenu&&i.isOpen(this._element.id)},_keyDown:function(e){if(!this.isActive())return!0;if(13!==e.keyCode&&27!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode)return!0;for(var t,n=0,a=this._dropdownMenu.childElementCount;n0){var i=t.parentNode.previousElementSibling;null!==i&&i.classList.remove("active")}},_addItem:function(e,t){var i=l.get(e),n=elCreate("li");n.className="item";var a=elCreate("span");a.className="content",elData(a,"object-id",t.objectId),a.textContent=t.value;var r=elCreate("a");r.className="icon icon16 fa-times",r.addEventListener(WCF_CLICK_EVENT,p),n.appendChild(a),n.appendChild(r),i.list.insertBefore(n,i.listItem),i.suggestion.addExcludedValue(t.value),i.element.value="",this._handleLimit(e);var o=this._syncShadow(i);"function"==typeof i.options.callbackChange&&(null===o&&(o=this.getValues(e)),i.options.callbackChange(e,o))},_removeItem:function(e,t,i){t=null===e?t:e.currentTarget.parentNode;var n=t.parentNode,a=elData(n,"element-id"),r=l.get(a);r.suggestion.removeExcludedValue(t.children[0].textContent),n.removeChild(t),i||r.element.focus(),this._handleLimit(a);var o=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===o&&(o=this.getValues(a)),r.options.callbackChange(a,o))},_syncShadow:function(e){if(!e.options.isCSV)return null;for(var t="",i=this.getValues(e.element.id),n=0,a=i.length;n~~elAttr(s,"max")?a.disabled=!0:a.disabled=!1},_submit:function(e){o.get(n).callback(~~s.value),i.close(this)},_dialogSetup:function(){var t='
        ";return{id:"paginationOverlay",options:{onSetup:function(e){s=elByTag("input",e)[0],s.addEventListener("keyup",this._keyUp.bind(this)),r=elByTag("small",e)[0],a=elByTag("button",e)[0],a.addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))}.bind(this),title:e.get("wcf.global.page.pagination")},source:t}}};return l}),define("WoltLabSuite/Core/Ui/Pagination",["Core","Language","ObjectMap","StringUtil","WoltLabSuite/Core/Ui/Page/JumpTo"],function(e,t,i,n,a){"use strict";function r(e,t){this.init(e,t)}return r.prototype={SHOW_LINKS:11,init:function(t,i){this._element=t,this._options=e.extend({activePage:1,maxPage:1,callbackShouldSwitch:null,callbackSwitch:null},i),"function"!=typeof this._options.callbackShouldSwitch&&(this._options.callbackShouldSwitch=null),"function"!=typeof this._options.callbackSwitch&&(this._options.callbackSwitch=null),this._element.classList.add("pagination"),this._rebuild(this._element)},_rebuild:function(){var e=!1;this._element.innerHTML="";var i,n=elCreate("ul"),r=elCreate("li");r.className="skip",n.appendChild(r);var o="icon icon24 fa-chevron-left";this._options.activePage>1?(i=elCreate("a"),i.className=o+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.previous"),r.appendChild(i),i.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage-1))):(r.innerHTML='',r.classList.add("disabled")),n.appendChild(this._createLink(1));var s=this.SHOW_LINKS-4,l=this._options.activePage-2;l<0&&(l=0);var c=this._options.maxPage-(this._options.activePage+1);c<0&&(c=0),this._options.activePage>1&&this._options.activePagethis._options.maxPage-1&&(h=this._options.maxPage-1),l>=d?u-=d:(u-=l,h+=d-l),c>=d?h+=d:(h+=c,u-=d-c),h=Math.ceil(h),u=Math.ceil(u),u<1&&(u=1),h>this._options.maxPage&&(h=this._options.maxPage);var p='';u>1&&(u-1<2?n.appendChild(this._createLink(2)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=p,n.appendChild(r),e=!0));for(var f=u+1;f',r.classList.add("disabled")),e&&(elData(n,"pages",this._options.maxPage),a.init(n,this.switchPage.bind(this))),this._element.appendChild(n)},_createLink:function(e){var i=elCreate("li");if(e!==this._options.activePage){var a=elCreate("a");a.textContent=n.addThousandsSeparator(e),a.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,e)),i.appendChild(a)}else i.classList.add("active"),i.innerHTML=""+n.addThousandsSeparator(e)+'";return i},getActivePage:function(){return this._options.activePage},getElement:function(){return this._element},getMaxPage:function(){return this._options.maxPage},switchPage:function(e,t){if("object"==typeof t&&t.preventDefault(),e=~~e,e>0&&this._options.activePage!==e&&e<=this._options.maxPage){if(null!==this._options.callbackShouldSwitch&&this._options.callbackShouldSwitch(e)!==!0)return;this._options.activePage=e,this._rebuild(),null!==this._options.callbackSwitch&&this._options.callbackSwitch(e)}}},r}),define("WoltLabSuite/Core/Ui/Scroll",["Dom/Util"],function(e){"use strict";var t=null,i=null,n=null;return{element:function(n,a){if(!(n instanceof Element))throw new TypeError("Expected a valid DOM element.");if(void 0!==a&&"function"!=typeof a)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(n))throw new Error("Element must be part of the visible DOM.");if(null!==t)throw new Error("Cannot scroll to element, a concurrent request is running.");a&&(t=a,null===i&&(i=this._onScroll.bind(this)),window.addEventListener("scroll",i));var r=e.offset(n).top;r<=50?r=0:r-=50;var o=window.pageYOffset;window.scrollTo({left:0,top:r,behavior:"smooth"}),window.setTimeout(function(){o===window.pageYOffset&&this._onScroll()}.bind(this),100)},_onScroll:function(){null!==n&&window.clearTimeout(n),n=window.setTimeout(function(){null!==t&&t(),window.removeEventListener("scroll",i),t=null,n=null},100)}}}),define("WoltLabSuite/Core/Media/List/Upload",["Core","Dom/Util","../Upload"],function(e,t,i){"use strict";function n(e,t,n){i.call(this,e,t,n)}return e.inherit(n,i,{_createButton:function(){n._super.prototype._createButton.call(this);var e=elCreate("span");e.classList="icon icon16 fa-upload",t.prepend(e,elBySel("span",this._button))}}),n}),define("WoltLabSuite/Core/Controller/Media/List",["Dom/ChangeListener","EventHandler","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/List/Upload"],function(e,t,i,n,a){"use strict";var r,o=elById("mediaListTableBody");return{init:function(o){o=o||{},new a("uploadButton","mediaListTableBody",{multiple:!0}),i.setup({hasMarkedItems:o.hasMarkedItems||!1,pageClassName:"wcf\\acp\\page\\MediaListPage"}),t.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.media",this._clipboardAction.bind(this));var s=new WCF.Action.Delete("wcf\\data\\media\\MediaAction",".jsMediaRow");s.setCallback(this._deleteCallback),r=new n({_editorSuccess:function(e,t){e.categoryID!=t&&window.setTimeout(function(){window.location.reload()},500)}}),this._addButtonEventListeners(),e.add("WoltLabSuite/Core/Controller/Media/List",this._addButtonEventListeners.bind(this))},_addButtonEventListeners:function(){for(var e,t=elByClass("jsMediaEditButton",o);t.length;)e=t[0],e.classList.remove("jsMediaEditButton"),e.addEventListener(WCF_CLICK_EVENT,this._edit.bind(this))},_deleteCallback:function(e){e.length===elByTag("tr",o).length?window.location.reload():i.reload.bind(i)},_clipboardAction:function(e){if(null!==e.responseData&&"com.woltlab.wcf.media.delete"===e.data.actionName){for(var t=e.responseData.objectIDs,i=elByClass("jsMediaRow"),n=0;n=this._mediaManager.getOption("minSearchLength")?(this._hideStringThresholdError(),this.search()):this._showStringThresholdError())},_showStringThresholdError:function(){var e=i.childByClass(this._input.parentNode.parentNode,"innerInfo");e?elShow(e):(e=elCreate("p"),e.className="innerInfo",e.textContent=r.get("wcf.media.search.info.searchStringThreshold"),n.insertAfter(e,this._input.parentNode))},hideSearch:function(){elHide(this._searchContainer)},resetSearch:function(){this._input.value=""},showSearch:function(){elShow(this._searchContainer)},search:function(t){"number"!=typeof t&&(t=1);var i=this._input.value;i&&this._input.value.length select",e),this._mediaCategorySelect&&this._mediaCategorySelect.addEventListener("change",this._categoryChange.bind(this));for(var t=n.childrenByTag(this._mediaManagerMediaList,"LI"),i=0,o=t.length;i1){var i=elCreate("div");i.className="paginationBottom jsPagination",a.replaceElement(elBySel(".jsPagination",c.getDialog(this).content),i),this._pagination=new g(i,{activePage:t,callbackSwitch:this._search.search.bind(this._search),maxPage:e})}else this._pagination&&elHide(this._pagination.getElement())},_removeClipboardCheckboxes:function(){for(var e=elByClass("mediaCheckbox",this._mediaManagerMediaList);e.length;)elRemove(e[0])},_setMedia:function(r){e.isPlainObject(r)?this._media=t.fromObject(r):this._media=r;var s=n.nextByClass(this._mediaManagerMediaList,"info");this._media.size?s&&elHide(s):(null===s&&(s=elCreate("p"),s.className="info",s.textContent=o.get("wcf.media.search.noResults")),elShow(s),a.insertAfter(s,this._mediaManagerMediaList));for(var c=n.childrenByTag(this._mediaManagerMediaList,"LI"),d=0,h=c.length;d ",c=elCreate("li"),c.className="jsDeleteButton",elData(c,"object-id",t.mediaID);var p=e.getUuid();elData(c,"confirm-message-html",m.unescapeHTML(o.get("wcf.media.delete.confirmMessage",{title:p})).replace(p,m.escapeHTML(t.filename))),s.appendChild(c),c.innerHTML=' "}}},v}),define("WoltLabSuite/Core/Media/Manager/Editor",["Core","Dictionary","Dom/Traverse","EventHandler","Language","Permission","Ui/Dialog","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Manager/Base"],function(e,t,i,n,a,r,o,s,l){"use strict";function c(i){i=e.extend({callbackInsert:null},i),l.call(this,i),this._forceClipboard=!0,this._activeButton=null;var a=this._options.editor?this._options.editor.core.toolbar()[0]:void 0;this._buttons=elByClass(this._options.buttonClass||"jsMediaEditorButton",a);for(var r=0,o=this._buttons.length;r'+a.get("wcf.media.insert.imageSize."+t[i])+"";e+='";var r='
        '+a.get("wcf.media.insert.imageSize")+'
        ";o.open({_dialogSetup:function(){return{id:this._getInsertDialogId(),options:{onClose:this._editorClose.bind(this),onSetup:function(e){elByClass("buttonPrimary",e)[0].addEventListener(WCF_CLICK_EVENT,this._insertMedia.bind(this));var t=elBySel(".thumbnailSizeSelection",e);elShow(t)}.bind(this),title:a.get("wcf.media.insert")},source:r}}.bind(this)})},_click:function(e){this._activeButton=e.currentTarget,c._super.prototype._click.call(this,e)},_clipboardAction:function(e){c._super.prototype._clipboardAction.call(this,e),"com.woltlab.wcf.media.insert"===e.data.actionName&&this.insertMedia(e.data.parameters.objectIDs,!0)},_dialogShow:function(){c._super.prototype._dialogShow.call(this),this._uploadData&&(this._uploadData.file?this._upload.uploadFile(this._uploadData.file):this._uploadId=this._upload.uploadBlob(this._uploadData.blob),this._uploadData=null)},_editorUpload:function(e){this._uploadData=e,o.open(this)},_getInsertDialogId:function(){var e="mediaInsert";return this._mediaToInsert.forEach(function(t,i){e+="-"+i}),e},_getThumbnailSizes:function(){for(var e,t,i=[],n=["small","medium","large"],a=0,r=n.length;a')}else this._options.editor.insert.text("[wsm='"+t.mediaID+"'][/wsm]")},_mediaUploaded:function(e){null!==this._uploadId&&this._upload===e.upload&&(this._uploadId===e.uploadId||Array.isArray(this._uploadId)&&this._uploadId.indexOf(e.uploadId)!==-1)&&(this._mediaToInsert=t.fromObject(e.media),this._insertMedia(null,"medium",!1),this._uploadId=null)},_openInsertDialog:function(e){this.insertMedia([~~elData(e.currentTarget,"object-id")])},insertMedia:function(e,i){this._mediaToInsert=new t,this._mediaToInsertByClipboard=i||!1;for(var n,a=!0,r=0,s=e.length;r ul",t),n=elCreate("li");i.appendChild(n),n.innerHTML=' "}}),c}),define("WoltLabSuite/Core/Media/Manager/Select",["Core","Dom/Traverse","Dom/Util","Language","ObjectMap","Ui/Dialog","WoltLabSuite/Core/FileUtil","WoltLabSuite/Core/Media/Manager/Base"],function(e,t,i,n,a,r,o,s){"use strict";function l(e){s.call(this,e),this._activeButton=null,this._buttons=elByClass(this._options.buttonClass||"jsMediaSelectButton"),this._storeElements=new a;for(var t=0,n=this._buttons.length;t';else{var a=o.getIconNameByFilename(t.filename);a&&(a="-"+a),n.innerHTML='

        '+t.filename+"

        "+t.formattedFilesize+"

        "}}elShow(this._activeButton.nextElementSibling),r.close(this)},_click:function(e){if(e.preventDefault(),this._activeButton=e.currentTarget,l._super.prototype._click.call(this,e),this._mediaManagerMediaList)for(var i,n=this._storeElements.get(this._activeButton),a=t.childrenByTag(this._mediaManagerMediaList,"LI"),r=0,o=a.length;r ul",t),a=elCreate("li");a.className="jsMediaSelectButton",elData(a,"object-id",e.mediaID),i.appendChild(a),a.innerHTML=' "},_removeMedia:function(e){e.preventDefault();var t=e.currentTarget;elHide(t);var i=t.previousElementSibling;elById(elData(i,"store")).value=0;var n=elData(i,"display");if(n){var a=elById(n);a&&(a.innerHTML="")}}}),l}),define("WoltLabSuite/Core/Ui/Search/Input",["Ajax","Core","EventKey","Dom/Util","Ui/SimpleDropdown"],function(e,t,i,n,a){"use strict";function r(e,t){this.init(e,t)}return r.prototype={init:function(e,i){if(this._element=e,!(this._element instanceof Element))throw new TypeError("Expected a valid DOM element.");if("INPUT"!==this._element.nodeName||"search"!==this._element.type&&"text"!==this._element.type)throw new Error('Expected an input[type="text"].');this._activeItem=null,this._dropdownContainerId="",this._lastValue="",this._list=null,this._request=null,this._timerDelay=null,this._options=t.extend({ajax:{actionName:"getSearchResultList",className:"",interfaceName:"wcf\\data\\ISearchAction"},callbackDropdownInit:null,callbackSelect:null,delay:500,excludedSearchValues:[],minLength:3,noResultPlaceholder:"",preventSubmit:!1},i),elAttr(this._element,"autocomplete","off"),this._element.addEventListener("keydown",this._keydown.bind(this)),this._element.addEventListener("keyup",this._keyup.bind(this))},addExcludedSearchValues:function(e){this._options.excludedSearchValues.indexOf(e)===-1&&this._options.excludedSearchValues.push(e)},removeExcludedSearchValues:function(e){var t=this._options.excludedSearchValues.indexOf(e);t!==-1&&this._options.excludedSearchValues.splice(t,1)},_keydown:function(e){(null!==this._activeItem&&a.isOpen(this._dropdownContainerId)||this._options.preventSubmit)&&i.Enter(e)&&e.preventDefault(),(i.ArrowUp(e)||i.ArrowDown(e)||i.Escape(e))&&e.preventDefault()},_keyup:function(e){if(null!==this._activeItem){if(!a.isOpen(this._dropdownContainerId))return;if(i.ArrowUp(e))return e.preventDefault(),this._keyboardPreviousItem();if(i.ArrowDown(e))return e.preventDefault(),this._keyboardNextItem();if(i.Enter(e))return e.preventDefault(),this._keyboardSelectItem()}if(i.Escape(e))return void a.close(this._dropdownContainerId);var t=this._element.value.trim();if(this._lastValue!==t)return this._lastValue=t,t.length':e.icon,n.appendChild(t.children[0]),t.appendChild(n),t}}),i}),define("WoltLabSuite/Core/Ui/Acl/Simple",["Language","StringUtil","Dom/ChangeListener","WoltLabSuite/Core/Ui/User/Search/Input"],function(e,t,i,n){"use strict";function a(e){this.init(e)}return a.prototype={init:function(e){this._prefix=e||"",this._build()},_build:function(){var e=elById(this._prefix+"aclInputContainer");elById(this._prefix+"aclAllowAll").addEventListener("change",function(){elHide(e)}),elById(this._prefix+"aclAllowAll_no").addEventListener("change",function(){elShow(e)}),this._list=elById(this._prefix+"aclAccessList"),this._list.addEventListener(WCF_CLICK_EVENT,this._removeItem.bind(this));var t=[];elBySelAll(".aclLabel",this._list,function(e){t.push(e.textContent)}),this._searchInput=new n(elById(this._prefix+"aclSearchInput"),{callbackSelect:this._select.bind(this),includeUserGroups:!0,excludedSearchValues:t,preventSubmit:!0}),this._aclListContainer=elById(this._prefix+"aclListContainer"),i.trigger()},_select:function(n){var a=elData(n,"type"),r=elData(n,"label"),o='';o+=''+t.escapeHTML(r)+"",o+='',o+='';var s=elCreate("li");s.innerHTML=o;var l=elBySel(".fa-user",this._list);return null===l?this._list.appendChild(s):this._list.insertBefore(s,l.parentNode),elShow(this._aclListContainer),this._searchInput.addExcludedSearchValues(r),i.trigger(),!1},_removeItem:function(e){if(e.target.classList.contains("fa-times")){var t=elBySel(".aclLabel",e.target.parentNode);this._searchInput.removeExcludedSearchValues(t.textContent),elRemove(e.target.parentNode),0===this._list.childElementCount&&elHide(this._aclListContainer)}}},a}),define("WoltLabSuite/Core/Ui/Article/MarkAllAsRead",["Ajax"],function(e){"use strict";return{init:function(){elBySelAll(".markAllAsReadButton",void 0,function(e){e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))}.bind(this))},_click:function(t){t.preventDefault(),e.api(this)},_ajaxSuccess:function(){var e=elBySel(".mainMenu .active .badge");e&&elRemove(e),elBySelAll(".articleList .newMessageBadge",void 0,elRemove)},_ajaxSetup:function(){return{data:{actionName:"markAllAsRead",className:"wcf\\data\\article\\ArticleAction"}}}}}),define("WoltLabSuite/Core/Ui/Color/Picker",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}var i=function(e,t){return"object"==typeof window.WCF&&"function"==typeof window.WCF.ColorPicker?(i=function(e,t){var i=new window.WCF.ColorPicker(e);return"function"==typeof t.callbackSubmit&&i.setCallbackSubmit(t.callbackSubmit),i})(e,t):(0===n.length&&(window.__wcf_bc_colorPickerInit=function(){n.forEach(function(e){i(e[0],e[1])}),window.__wcf_bc_colorPickerInit=void 0,n=[]}),void n.push([e,t]))},n=[];return t.prototype={init:function(t,n){if(!(t instanceof Element))throw new TypeError("Expected a valid DOM element, use `UiColorPicker.fromSelector()` if you want to use a CSS selector.");this._options=e.extend({callbackSubmit:null},n),i(t,n)}},t.fromSelector=function(e){elBySelAll(e,void 0,function(e){new t(e)})},t}),define("WoltLabSuite/Core/Ui/Comment/Add",["Ajax","Core","EventHandler","Language","Dom/ChangeListener","Dom/Util","Dom/Traverse","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Ui/Scroll","EventKey","User","WoltLabSuite/Core/Controller/Captcha"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";function p(e){this.init(e)}return p.prototype={init:function(e){this._container=e,this._content=elBySel(".commentListAddComment",this._container),this._textarea=elBySel(".wysiwygTextarea",this._container),this._editor=null,this._loadingOverlay=null,this._content.addEventListener(WCF_CLICK_EVENT,function(e){this._content.classList.contains("collapsed")&&(e.preventDefault(),this._content.classList.remove("collapsed"),c.element(this._container,function(){window.jQuery(this._textarea).redactor("WoltLabCaret.endOfEditor")}.bind(this)))}.bind(this));var t=elBySel('button[data-type="save"]',this._container);t.addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))},_submitGuestDialog:function(e){if("keypress"!==e.type||d.Enter(e)){var i=elBySel("input[name=username]",e.currentTarget.closest(".dialogContent"));if(""===i.value){var a=o.nextByClass(i,"innerError");return void(a||(a=elCreate("small"),a.className="innerError",a.innerText=n.get("wcf.global.form.error.empty"),r.insertAfter(a,i),i.closest("dl").classList.add("formError")))}var s={parameters:{data:{username:i.value}}},l=elData(e.currentTarget,"captcha-id");h.has(l)&&(s=t.extend(s,h.getData(l))),this._submit(void 0,s)}},_submit:function(n,a){if(n&&n.preventDefault(),this._validate()){this._showLoadingOverlay();var r=this._container.closest(".commentList"),o={data:{message:this._getEditor().code.get(),objectID:elData(r,"object-id"),objectTypeID:elData(r,"object-type-id")}};i.fire("com.woltlab.wcf.redactor2","submit_text",o.data),u.userId||a||(o.requireGuestDialog=!0),e.api(this,t.extend({parameters:o},a))}},_validate:function(){for(var e=elByClass("innerError",this._container);e.length;)elRemove(e[0]);if(this._getEditor().utils.isEmpty())return this.throwError(this._textarea,n.get("wcf.global.form.error.empty")),!1;var t={api:this,editor:this._getEditor(),message:this._getEditor().code.get(),valid:!0};return i.fire("com.woltlab.wcf.redactor2","validate_text",t),t.valid!==!1},throwError:function(e,t){var i=elCreate("small");i.className="innerError",i.textContent="empty"===t?n.get("wcf.global.form.error.empty"):t,r.insertAfter(i,e)},_showLoadingOverlay:function(){null===this._loadingOverlay&&(this._loadingOverlay=elCreate("div"),this._loadingOverlay.className="commentLoadingOverlay",this._loadingOverlay.innerHTML=''),this._content.classList.add("loading"),this._content.appendChild(this._loadingOverlay)},_hideLoadingOverlay:function(){this._content.classList.remove("loading");var e=elBySel(".commentLoadingOverlay",this._content);null!==e&&e.parentNode.removeChild(e)},_reset:function(){this._getEditor().code.set("

        ​

        "),i.fire("com.woltlab.wcf.redactor2","reset_text"),document.activeElement&&document.activeElement.blur(),this._content.classList.add("collapsed")},_handleError:function(e){this.throwError(this._textarea,e.returnValues.errorType)},_getEditor:function(){if(null===this._editor){if("function"!=typeof window.jQuery)throw new Error("Unable to access editor, jQuery has not been loaded yet.");this._editor=window.jQuery(this._textarea).data("redactor")}return this._editor},_insertMessage:function(e){r.insertHtml(e.returnValues.template,this._container,"after"),l.show(n.get("wcf.global.success.add")),a.trigger()},_ajaxSuccess:function(e){if(!u.userId&&!e.returnValues.guestDialogID)throw new Error("Missing 'guestDialogID' return value for guest.");if(!u.userId&&e.returnValues.guestDialog){s.openStatic(e.returnValues.guestDialogID,e.returnValues.guestDialog,{closable:!1,title:n.get("wcf.global.confirmation.title")});var t=s.getDialog(e.returnValues.guestDialogID);elBySel("input[type=submit]",t.content).addEventListener(WCF_CLICK_EVENT,this._submitGuestDialog.bind(this)),elBySel("input[type=text]",t.content).addEventListener("keypress",this._submitGuestDialog.bind(this))}else this._insertMessage(e),u.userId||s.close(e.returnValues.guestDialogID),this._reset(),this._hideLoadingOverlay(),window.setTimeout(function(){c.element(this._container.nextElementSibling)}.bind(this),100)},_ajaxFailure:function(e){return this._hideLoadingOverlay(),null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._handleError(e),!1)},_ajaxSetup:function(){return{data:{actionName:"addComment",className:"wcf\\data\\comment\\CommentAction"},silent:!0}}},p}),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["Dictionary","Ui/SimpleDropdown"],function(e,t){"use strict";function i(e){if(!n.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return n.get(e)}var n=new e,a=0;return{init:function(e,i){if(!n.has(e)){var r=elCreate("div");r.id="reusableDropdownGhost"+a++,t.initFragment(r,i),n.set(e,r.id)}},getDropdownMenu:function(e){return t.getDropdownMenu(i(e))},registerCallback:function(e,n){t.registerCallback(i(e),n)},toggleDropdown:function(e,n){t.toggleDropdown(i(e),n)}}}),define("WoltLabSuite/Core/Ui/Comment/Edit",["Ajax","Core","Dictionary","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLabSuite/Core/Ui/Scroll"],function(e,t,i,n,a,r,o,s,l,c,d,u,h){"use strict";function p(e){this.init(e)}return p.prototype={init:function(e){this._activeElement=null,this._callbackClick=null,this._comments=new o,this._container=e,this._editorContainer=null,this.rebuild(),s.add("Ui/Comment/Edit_"+c.identify(this._container),this.rebuild.bind(this))},rebuild:function(){elBySelAll(".comment",this._container,function(e){if(!this._comments.has(e)){if(elDataBool(e,"can-edit")){var t=elBySel(".jsCommentEditButton",e);null!==t&&(null===this._callbackClick&&(this._callbackClick=this._click.bind(this)),t.addEventListener(WCF_CLICK_EVENT,this._callbackClick))}this._comments.add(e)}}.bind(this))},_click:function(t){t.preventDefault(),null===this._activeElement?(this._activeElement=t.currentTarget.closest(".comment"),this._prepare(),e.api(this,{actionName:"beginEdit",objectIDs:[this._getObjectId(this._activeElement)]})):d.show("wcf.message.error.editorAlreadyInUse",null,"warning")},_prepare:function(){this._editorContainer=elCreate("div"),this._editorContainer.className="commentEditorContainer",this._editorContainer.innerHTML='';var e=elBySel(".commentContentContainer",this._activeElement);e.insertBefore(this._editorContainer,e.firstChild)},_showEditor:function(e){var t=this._getEditorId(),i=elBySel(".icon",this._editorContainer);elRemove(i);var r=elCreate("div");r.className="editorContainer",c.setInnerHtml(r,e.returnValues.template),this._editorContainer.appendChild(r);var o=elBySel(".formSubmit",r),s=elBySel('button[data-type="save"]',o);s.addEventListener(WCF_CLICK_EVENT,this._save.bind(this));var l=elBySel('button[data-type="cancel"]',o);l.addEventListener(WCF_CLICK_EVENT,this._restoreMessage.bind(this)),a.add("com.woltlab.wcf.redactor","submitEditor_"+t,function(e){e.cancel=!0,this._save()}.bind(this));var d=elById(t);"redactor"===n.editor()?window.setTimeout(function(){h.element(this._activeElement)}.bind(this),250):d.focus()},_restoreMessage:function(){this._destroyEditor(),elRemove(this._editorContainer),this._activeElement=null},_save:function(){var t={data:{message:""}},i=this._getEditorId();a.fire("com.woltlab.wcf.redactor2","getText_"+i,t.data),this._validate(t)&&(a.fire("com.woltlab.wcf.redactor2","submit_"+i,t),e.api(this,{actionName:"save",objectIDs:[this._getObjectId(this._activeElement)],parameters:t}),this._hideEditor())},_validate:function(e){for(var t=elByClass("innerError",this._activeElement);t.length;)elRemove(t[0]);var i={api:this,parameters:e,valid:!0};return a.fire("com.woltlab.wcf.redactor2","validate_"+this._getEditorId(),i),i.valid!==!1},throwError:function(e,t){ +var i=elCreate("small");i.className="innerError",i.textContent=t,c.insertAfter(i,e)},_showMessage:function(e){c.setInnerHtml(elBySel(".commentContent .userMessage",this._editorContainer.parentNode),e.returnValues.message),this._restoreMessage(),d.show()},_hideEditor:function(){elHide(elBySel(".editorContainer",this._editorContainer));var e=elCreate("span");e.className="icon icon48 fa-spinner",this._editorContainer.appendChild(e)},_restoreEditor:function(){var e=elBySel(".fa-spinner",this._editorContainer);elRemove(e);var t=elBySel(".editorContainer",this._editorContainer);null!==t&&elShow(t)},_destroyEditor:function(){a.fire("com.woltlab.wcf.redactor2","autosaveDestroy_"+this._getEditorId()),a.fire("com.woltlab.wcf.redactor2","destroy_"+this._getEditorId())},_getEditorId:function(){return"commentEditor"+this._getObjectId(this._activeElement)},_getObjectId:function(e){return~~elData(e,"object-id")},_ajaxFailure:function(e){var t=elBySel(".redactor-layer",this._editorContainer);if(null===t)return this._restoreMessage(),!0;if(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.errorType)return!0;var i=elBySel(".innerError",this._editorContainer);return null===i&&(i=elCreate("small"),i.className="innerError",c.insertAfter(i,t)),i.textContent=e.returnValues.errorType,!1},_ajaxSuccess:function(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e)}},_ajaxSetup:function(){var e=~~elData(this._container,"object-type-id");return{data:{className:"wcf\\data\\comment\\CommentAction",parameters:{data:{objectTypeID:e}}},silent:!0}}},p}),define("WoltLabSuite/Core/Ui/ItemList/Filter",["Core","EventKey","Language","List","StringUtil","Dom/Util"],function(e,t,i,n,a,r){"use strict";function o(e,t){this.init(e,t)}return o.prototype={init:function(n,a){this._value="",this._options=e.extend({callbackPrepareItem:void 0},a);var r=elById(n);if(null===r)throw new Error("Expected a valid element id, '"+n+"' does not match anything.");if(!r.classList.contains("scrollableCheckboxList")&&"function"!=typeof this._options.callbackPrepareItem)throw new Error("Filter only works with elements with the CSS class 'scrollableCheckboxList'.");var o=elCreate("div");o.className="itemListFilter",r.parentNode.insertBefore(o,r),o.appendChild(r);var s=elCreate("div");s.className="inputAddon";var l=elCreate("input");l.className="long",l.type="text",l.placeholder=i.get("wcf.global.filter.placeholder"),l.addEventListener("keydown",function(e){t.Enter(e)&&e.preventDefault()}),l.addEventListener("keyup",this._keyup.bind(this));var c=elCreate("a");c.href="#",c.className="button inputSuffix jsTooltip",c.title=i.get("wcf.global.filter.button.clear"),c.innerHTML='',c.addEventListener("click",function(e){e.preventDefault(),this._input.value="",this._keyup()}.bind(this)),s.appendChild(l),s.appendChild(c),o.appendChild(s),this._container=o,this._element=r,this._input=l,this._items=null,this._fragment=null},_buildItems:function(){this._items=new n;for(var e="function"==typeof this._options.callbackPrepareItem?this._options.callbackPrepareItem:this._prepareItem.bind(this),t=0,i=this._element.childElementCount;t$1"),elShow(i.item),n=!0):elHide(i.item)}),this._container.insertBefore(this._fragment.firstChild,this._container.firstChild),this._value=e;var o=this._container.nextElementSibling;o&&!o.classList.contains("innerError")&&(o=null),n?o&&elRemove(o):o||(o=elCreate("small"),o.className="innerError",o.textContent=i.get("wcf.global.filter.error.noMatches"),r.insertAfter(o,this._container))}}},o}),define("WoltLabSuite/Core/Ui/ItemList/User",["WoltLabSuite/Core/Ui/ItemList"],function(e){"use strict";return{init:function(t,i){e.init(t,[],{ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:~~i.includeUserGroups}}},callbackChange:"function"==typeof i.callbackChange?i.callbackChange:null,excludedSearchValues:Array.isArray(i.excludedSearchValues)?i.excludedSearchValues:[],isCSV:!0,maxItems:~~i.maxItems||-1,restricted:!0})},getValues:function(t){return e.getValues(t)}}}),define("WoltLabSuite/Core/Ui/User/List",["Ajax","Core","Dictionary","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/Pagination"],function(e,t,i,n,a,r){"use strict";function o(e){this.init(e)}return o.prototype={init:function(e){this._cache=new i,this._pageCount=0,this._pageNo=1,this._options=t.extend({className:"",dialogTitle:"",parameters:{}},e)},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t){if("number"==typeof t&&(this._pageNo=~~t),0!==this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))throw new RangeError("pageNo must be between 1 and "+this._pageCount+" ("+this._pageNo+" given).");if(this._cache.has(this._pageNo)){var i=a.open(this,this._cache.get(this._pageNo));if(this._pageCount>1){var n=elBySel(".jsPagination",i.content);null!==n&&new r(n,{activePage:this._pageNo,maxPage:this._pageCount,callbackSwitch:this._showPage.bind(this)})}}else this._options.parameters.pageNo=this._pageNo,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){void 0!==e.returnValues.pageCount&&(this._pageCount=~~e.returnValues.pageCount),this._cache.set(this._pageNo,e.returnValues.template),this._showPage()},_ajaxSetup:function(){return{data:{actionName:"getGroupedUserList",className:this._options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}},_dialogSetup:function(){return{id:n.getUniqueId(),options:{title:this._options.dialogTitle},source:null}}},o}),define("WoltLabSuite/Core/Ui/Like/Handler",["Ajax","Core","Dictionary","Language","ObjectMap","StringUtil","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/User/List","User"],function(e,t,i,n,a,r,o,s,l,c,d){"use strict";function u(e,t){this.init(e,t)}var h=!1;return u.prototype={init:function(e,i){if(""===i.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._containers=new a,this._details=new a,this._objectType=e,this._options=t.extend({badgeClassNames:"",isSingleItem:!1,markListItemAsActive:!1,renderAsButton:!0,summaryPrepend:!0,summaryUseIcon:!0,canDislike:!1,canLike:!1,canLikeOwnContent:!1,canViewSummary:!1,badgeContainerSelector:".messageHeader .messageStatus",buttonAppendToSelector:".messageFooter .messageFooterButtons",buttonBeforeSelector:"",containerSelector:"",summarySelector:".messageFooterGroup"},i),this.initContainers(i,e),o.add("WoltLabSuite/Core/Ui/Like/Handler-"+e,this.initContainers.bind(this))},initContainers:function(){for(var e,t,i=elBySelAll(this._options.containerSelector),n=!1,a=0,r=i.length;a ",s.addEventListener(WCF_CLICK_EVENT,this._like.bind(this,e)),elData(s,"type",t?"like":"dislike"),o.appendChild(s),i?i.parentNode.insertBefore(o,i):a.appendChild(o),s},_showSummary:function(e,t){t.preventDefault(),this._details.has(e)||this._details.set(e,new c({className:"wcf\\data\\like\\LikeAction",dialogTitle:n.get("wcf.like.details"),parameters:{data:{containerID:s.identify(e),objectID:this._containers.get(e).objectId,objectType:this._objectType}}})),this._details.get(e).open()},_updateBadge:function(e){var t=this._containers.get(e);if(0===t.likes&&0===t.dislikes)elHide(t.badge);else{elShow(t.badge),t.badge.classList.remove("likeCounterLiked","likeCounterDisliked");var i=t.likes-t.dislikes,a='';i>0?(a+="+"+r.addThousandsSeparator(i),t.badge.classList.add("likeCounterLiked")):i<0?(a+="−"+r.addThousandsSeparator(Math.abs(i)),t.badge.classList.add("likeCounterDisliked")):a+="±0",t.badge.innerHTML=a+"",t.badge.setAttribute("data-tooltip",n.get("wcf.like.tooltip",{dislikes:t.dislikes,likes:t.likes}))}},_updateSummary:function(e){var t=this._containers.get(e);if(t.likes){elShow(t.summary.parentNode);for(var i=[],a=Object.keys(t.users),r=0,o=a.length;r0&&l+1===this._dropdownMenu.childElementCount&&"divider"===elData(o.previousElementSibling,"item")&&elHide(o.previousElementSibling)):(elShow(o),s=!0)}},_dropdownGetItems:function(){},_dropdownOpen:function(){},_dropdownSelect:function(e){},_clickDropdownItem:function(e){e.preventDefault(),this._dropdownSelect(elData(e.currentTarget,"item"))},_prepare:function(){var e=this._elements.get(this._activeElement),t=elCreate("div");t.className="messageBody editor",e.messageBodyEditor=t;var i=elCreate("span");i.className="icon icon48 fa-spinner",t.appendChild(i),c.insertAfter(t,e.messageBody),elHide(e.messageBody)},_showEditor:function(e){var t=this._getEditorId(),i=this._elements.get(this._activeElement);this._activeElement.classList.add("jsInvalidQuoteTarget");var r=l.childByClass(i.messageBodyEditor,"icon");elRemove(r);var o=i.messageBodyEditor,s=elCreate("div");s.className="editorContainer",c.setInnerHtml(s,e.returnValues.template),o.appendChild(s);var d=elBySel(".formSubmit",s),u=elBySel('button[data-type="save"]',d);u.addEventListener(WCF_CLICK_EVENT,this._save.bind(this));var p=elBySel('button[data-type="cancel"]',d);p.addEventListener(WCF_CLICK_EVENT,this._restoreMessage.bind(this)),a.add("com.woltlab.wcf.redactor","submitEditor_"+t,function(e){e.cancel=!0,this._save()}.bind(this)),elHide(i.messageHeader),elHide(i.messageFooter);var f=elById(t);"redactor"===n.editor()?window.setTimeout(function(){this._options.quoteManager&&this._options.quoteManager.setAlternativeEditor(t),h.element(this._activeElement)}.bind(this),250):f.focus()},_restoreMessage:function(){var e=this._elements.get(this._activeElement);this._destroyEditor(),elRemove(e.messageBodyEditor),e.messageBodyEditor=null,elShow(e.messageBody),elShow(e.messageFooter),elShow(e.messageHeader),this._activeElement.classList.remove("jsInvalidQuoteTarget"),this._activeElement=null,this._options.quoteManager&&this._options.quoteManager.clearAlternativeEditor()},_save:function(){var t={containerID:this._options.containerId,data:{message:""},objectID:this._getObjectId(this._activeElement),removeQuoteIDs:this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[]},i=this._getEditorId(),n=elById("settings_"+i);n&&elBySelAll("input, select, textarea",n,function(e){if("INPUT"!==e.nodeName||"checkbox"!==e.type&&"radio"!==e.type||e.checked){var i=e.name;if(t.hasOwnProperty(i))throw new Error("Variable overshadowing, key '"+i+"' is already present.");t[i]=e.value.trim()}}),a.fire("com.woltlab.wcf.redactor2","getText_"+i,t.data),this._validate(t)&&(a.fire("com.woltlab.wcf.redactor2","submit_"+i,t),e.api(this,{actionName:"save",parameters:t}),this._hideEditor())},_validate:function(e){for(var t=elByClass("innerError",this._activeElement);t.length;)elRemove(t[0]);var i={api:this,parameters:e,valid:!0};return a.fire("com.woltlab.wcf.redactor2","validate_"+this._getEditorId(),i),i.valid!==!1},throwError:function(e,t){var i=elCreate("small");i.className="innerError",i.textContent=t,c.insertAfter(i,e)},_showMessage:function(e){var t=this._activeElement,i=this._getEditorId(),n=this._elements.get(t),r=elBySelAll(".attachmentThumbnailList, .attachmentFileList",n.messageFooter);if(c.setInnerHtml(l.childByClass(n.messageBody,"messageText"),e.returnValues.message),"string"==typeof e.returnValues.attachmentList){for(var o=0,s=r.length;o'),this._content.classList.add("loading"),this._content.appendChild(this._loadingOverlay)},_hideLoadingOverlay:function(){this._content.classList.remove("loading");var e=elBySel(".messageContentLoadingOverlay",this._content);null!==e&&e.parentNode.removeChild(e)},_reset:function(){this._getEditor().code.set("

        ​

        "),i.fire("com.woltlab.wcf.redactor2","reset_text")},_handleError:function(e){this.throwError(this._textarea,e.returnValues.errorType)},_getEditor:function(){if(null===this._editor){if("function"!=typeof window.jQuery)throw new Error("Unable to access editor, jQuery has not been loaded yet.");this._editor=window.jQuery(this._textarea).data("redactor")}return this._editor},_insertMessage:function(e){if(this._getEditor().WoltLabAutosave.reset(),e.returnValues.url)window.location=e.returnValues.url;else{if(e.returnValues.template){var t;if("DESC"===elData(this._container,"sort-order"))r.insertHtml(e.returnValues.template,this._container,"after"),t=r.identify(this._container.nextElementSibling);else{var i=this._container;i.previousElementSibling&&i.previousElementSibling.classList.contains("messageListPagination")&&(i=i.previousElementSibling),r.insertHtml(e.returnValues.template,i,"before"),t=r.identify(i.previousElementSibling)}elData(this._container,"last-post-time",e.returnValues.lastPostTime),window.history.replaceState(void 0,"","#"+t),c.element(elById(t))}l.show(n.get(this._options.successMessage)),this._options.quoteManager&&this._options.quoteManager.countQuotes(),a.trigger()}},_ajaxSuccess:function(e){if(!u.userId&&!e.returnValues.guestDialogID)throw new Error("Missing 'guestDialogID' return value for guest.");if(!u.userId&&e.returnValues.guestDialog){s.openStatic(e.returnValues.guestDialogID,e.returnValues.guestDialog,{closable:!1,title:n.get("wcf.global.confirmation.title")});var t=s.getDialog(e.returnValues.guestDialogID);elBySel("input[type=submit]",t.content).addEventListener(WCF_CLICK_EVENT,this._submitGuestDialog.bind(this)),elBySel("input[type=text]",t.content).addEventListener("keypress",this._submitGuestDialog.bind(this))}else this._insertMessage(e),u.userId||s.close(e.returnValues.guestDialogID),this._reset(),this._hideLoadingOverlay()},_ajaxFailure:function(e){return this._hideLoadingOverlay(),null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._handleError(e),!1)},_ajaxSetup:function(){return{data:{actionName:"quickReply",className:this._options.ajax.className,interfaceName:"wcf\\data\\IMessageQuickReplyAction"},silent:!0}}},p}),define("WoltLabSuite/Core/Ui/Message/Share",["EventHandler"],function(e){"use strict";return{_pageDescription:"",_pageUrl:"",init:function(){var t=elBySel('meta[property="og:title"]');null!==t&&(this._pageDescription=encodeURIComponent(t.content));var i=elBySel('meta[property="og:url"]');null!==i&&(this._pageUrl=encodeURIComponent(i.content)),elBySelAll(".jsMessageShareButtons",null,function(t){t.classList.remove("jsMessageShareButtons");var i={facebook:{link:elBySel(".jsShareFacebook",t),share:function(){this._share("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0)}.bind(this)},google:{link:elBySel(".jsShareGoogle",t),share:function(){this._share("google","https://plus.google.com/share?url={pageURL}",!1)}.bind(this)},reddit:{link:elBySel(".jsShareReddit",t),share:function(){this._share("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1)}.bind(this)},twitter:{link:elBySel(".jsShareTwitter",t),share:function(){this._share("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1)}.bind(this)},linkedIn:{link:elBySel(".jsShareLinkedIn",t),share:function(){this._share("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1); +}.bind(this)},pinterest:{link:elBySel(".jsSharePinterest",t),share:function(){this._share("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1)}.bind(this)},xing:{link:elBySel(".jsShareXing",t),share:function(){this._share("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1)}.bind(this)},whatsApp:{link:elBySel(".jsShareWhatsApp",t),share:function(){window.location.href="whatsapp://send?text="+this._pageDescription+"%20"+this._pageUrl}.bind(this)}};e.fire("com.woltlab.wcf.message.share","shareProvider",{container:t,providers:i,pageDescription:this._pageDescription,pageUrl:this._pageUrl});for(var n in i)i.hasOwnProperty(n)&&null!==i[n].link&&i[n].link.addEventListener(WCF_CLICK_EVENT,i[n].share)}.bind(this))},_share:function(e,t,i){window.open(t.replace(/\{pageURL}/,this._pageUrl).replace(/\{text}/,this._pageDescription+(i?"%20"+this._pageUrl:"")),e,"height=600,width=600")}}}),define("WoltLabSuite/Core/Ui/Page/Search",["Ajax","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog"],function(e,t,i,n,a,r){"use strict";var o,s,l,c=null;return{open:function(e){o=e,r.open(this)},_search:function(t){t.preventDefault();var n=c.parentNode,r=n.nextSibling;r&&"SMALL"===r.nodeName&&elRemove(r);var o=c.value.trim();return o.length<3?(r=elCreate("small"),r.className="innerError",r.textContent=i.get("wcf.page.search.error.tooShort"),void a.insertAfter(r,n)):void e.api(this,{parameters:{searchString:o}})},_click:function(e){e.preventDefault(),o(elData(e.currentTarget,"page-id")),r.close(this)},_ajaxSuccess:function(e){for(var t,r="",o=0,d=e.returnValues.length;o

        '+n.escapeHTML(t.name)+"

        "+n.escapeHTML(t.displayLink)+"
        ";if(l.innerHTML=r,window[r?"elShow":"elHide"](s),r)elBySelAll(".containerHeadline",l,function(e){e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))}.bind(this));else{var u=elCreate("small");u.className="innerError",u.textContent=i.get("wcf.page.search.error.noResults"),a.insertAfter(u,c.parentNode)}},_ajaxSetup:function(){return{data:{actionName:"search",className:"wcf\\data\\page\\PageAction"}}},_dialogSetup:function(){return{id:"wcfUiPageSearch",options:{onSetup:function(){var e=this._search.bind(this);c=elById("wcfUiPageSearchInput"),c.addEventListener("keydown",function(i){t.Enter(i)&&e(i)}),c.nextElementSibling.addEventListener(WCF_CLICK_EVENT,e),s=elById("wcfUiPageSearchResultContainer"),l=elById("wcfUiPageSearchResultList")}.bind(this),onShow:function(){c.focus()},title:i.get("wcf.page.search")},source:'
        '}}}}),define("WoltLabSuite/Core/Ui/Redactor/Metacode",["EventHandler","Dom/Util"],function(e,t){"use strict";return{convert:function(e){e.textContent=this.convertFromHtml(e.textContent)},convertFromHtml:function(i,n){var a=elCreate("div");a.innerHTML=n;for(var r,o,s,l,c,d,u=elByTag("woltlab-metacode",a);u.length;)s=u[0],l=elData(s,"name"),r=this._parseAttributes(elData(s,"attributes")),o={attributes:r,cancel:!1,metacode:s},e.fire("com.woltlab.wcf.redactor2","metacode_"+l+"_"+i,o),o.cancel!==!0&&(d=this._getOpeningTag(l,r),c=this._getClosingTag(l),s.parentNode===a?(t.prepend(d,this._getFirstParagraph(s)),this._getLastParagraph(s).appendChild(c)):(t.prepend(d,s),s.appendChild(c)),t.unwrapChildNodes(s));return a.innerHTML},_getOpeningTag:function(e,t){var i="["+e;if(t.length){i+="=";for(var n=0,a=t.length;n0&&(i+=","),i+="'"+t[n]+"'"}return document.createTextNode(i+"]")},_getClosingTag:function(e){return document.createTextNode("[/"+e+"]")},_getFirstParagraph:function(e){var t,i;return 0===e.childElementCount?(i=elCreate("p"),e.appendChild(i)):(t=e.children[0],"P"===t.nodeName?i=t:(i=elCreate("p"),e.insertBefore(i,t))),i},_getLastParagraph:function(e){var t,i,n=e.childElementCount;return 0===n?(i=elCreate("p"),e.appendChild(i)):(t=e.children[n-1],"P"===t.nodeName?i=t:(i=elCreate("p"),e.appendChild(i))),i},_parseAttributes:function(e){try{e=JSON.parse(atob(e))}catch(e){}if(!Array.isArray(e))return[];for(var t,i=[],n=0,a=e.length;n',n.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),this.hideOverlay()}.bind(this)),e.appendChild(n),n=elCreate("a"),n.className="jsTooltip",n.href="#",n.title=i.get("wcf.editor.autosave.discard"),n.innerHTML='',n.addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),this.clear();var t=a.convertFromHtml(this._editor.core.element()[0].id,this._originalMessage);this._editor.code.start(t),this._editor.core.textarea().val(this._editor.clean.onSync(this._editor.$editor.html())),this.hideOverlay()}.bind(this)),e.appendChild(n),this._editor.core.box()[0].appendChild(e);var r=function(){this._editor.core.editor()[0].removeEventListener(WCF_CLICK_EVENT,r),this.hideOverlay()}.bind(this);this._editor.core.editor()[0].addEventListener(WCF_CLICK_EVENT,r),this._container=e}},hideOverlay:function(){null!==this._container&&(this._container.classList.remove("active"),window.setTimeout(function(){null!==this._container&&elRemove(this._container),this._container=null,this._originalMessage=""}.bind(this),1e3))},_saveToStorage:function(){var e=this._editor.code.get();if(this._editor.utils.isEmpty(e)&&(e=""),this._lastMessage!==e){if(""===e)return this.clear();try{window.localStorage.setItem(this._key,JSON.stringify({content:e,timestamp:Date.now()})),this._lastMessage=e}catch(e){window.console.warn("Unable to write to local storage: "+e.message)}}},_cleanup:function(){var t,i,n,a,r=Date.now()-6048e5,o=[];for(t=0,n=window.localStorage.length;ti.top&&e.pageY",r=[];for(var o in this._editor.opts.woltlab.highlighters)this._editor.opts.woltlab.highlighters.hasOwnProperty(o)&&r.push([o,this._editor.opts.woltlab.highlighters[o]]);r.sort(function(e,t){return e[1]t[1]?1:0}),r.forEach(function(t){e+='"}.bind(this)),elById(s).innerHTML=e}.bind(this),onShow:function(){elById(s).value=elData(this._pre,"highlighter");var e=elData(this._pre,"line");elById(l).value=""===e?1:~~e,elById(o).value=elData(this._pre,"file")}.bind(this),title:i.get("wcf.editor.code.edit")},source:'
        '+i.get("wcf.editor.code.highlighter.description")+'
        '+i.get("wcf.editor.code.line.description")+'
        '+i.get("wcf.editor.code.file.description")+'
        "}}},s}),define("WoltLabSuite/Core/Ui/Redactor/DragAndDrop",["Dictionary","EventHandler","Language"],function(e,t,i){"use strict";var n=!1,a=new e,r=!1,o=!1,s=null;return{init:function(e){n||this._setup(),a.set(e.uuid,{editor:e,element:null})},_dragOver:function(e){if(e.preventDefault(),e.dataTransfer&&e.dataTransfer.types){var t=!1;for(var n in e.dataTransfer)if(e.dataTransfer.hasOwnProperty(n)&&n.match(/^moz/)){t=!0;break}if(o=!1,t)"application/x-moz-file"===e.dataTransfer.types[0]&&(o=!0);else for(var s=0;s
        '}}}}),define("WoltLabSuite/Core/Ui/Redactor/Mention",["Ajax","Environment","StringUtil","Ui/CloseOverlay"],function(e,t,i,n){"use strict";function a(e){this.init(e)}var r=null;return a.prototype={init:function(e){this._active=!1,this._dropdownActive=!1,this._dropdownMenu=null,this._itemIndex=0,this._lineHeight=null,this._mentionStart="",this._redactor=e,this._timer=null,e.WoltLabEvent.register("keydown",this._keyDown.bind(this)),e.WoltLabEvent.register("keyup",this._keyUp.bind(this)),n.add("UiRedactorMention-"+e.core.element()[0].id,this._hideDropdown.bind(this))},_keyDown:function(e){if(this._dropdownActive){var t=e.event;switch(t.which){case 13:this._setUsername(null,this._dropdownMenu.children[this._itemIndex].children[0]);break;case 38:this._selectItem(-1);break;case 40:this._selectItem(1);break;default:return void this._hideDropdown()}t.preventDefault(),e.cancel=!0}},_keyUp:function(t){var i=t.event;if(13===i.which)return void(this._active=!1);if(!this._dropdownActive||(t.cancel=!0,38!==i.which&&40!==i.which)){var n=this._getTextLineInFrontOfCaret();if(n.length>0&&n.length<25){var a=n.match(/@([^,]{3,})$/);a?a.index&&!n[a.index-1].match(/\s/)||(this._mentionStart=a[1],null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null),this._timer=window.setTimeout(function(){e.api(this,{parameters:{data:{searchString:this._mentionStart}}}),this._timer=null}.bind(this),500)):this._hideDropdown()}else this._hideDropdown()}},_getTextLineInFrontOfCaret:function(){var e=this._selectMention(!1);return null!==e?e.range.cloneContents().textContent.replace(/\u200B/g,"").replace(/\u00A0/g," ").trim():""},_getDropdownMenuPosition:function(){var e=this._selectMention();if(null===e)return null;this._redactor.selection.save(),e.selection.removeAllRanges(),e.selection.addRange(e.range);var t=e.selection.getRangeAt(0).getBoundingClientRect(),i={top:Math.round(t.bottom)+(window.scrollY||window.pageYOffset),left:Math.round(t.left)+document.body.scrollLeft};return null===this._lineHeight&&(this._lineHeight=Math.round(t.bottom-t.top)),this._redactor.selection.restore(),i},_setUsername:function(e,t){e&&(e.preventDefault(),t=e.currentTarget);var i=this._selectMention();if(null===i)return void this._hideDropdown();this._redactor.buffer.set(),i.selection.removeAllRanges(),i.selection.addRange(i.range);var n=getSelection().getRangeAt(0);n.deleteContents(),n.collapse(!0);var a=document.createTextNode("@"+elData(t,"username")+" ");n.insertNode(a),n=document.createRange(),n.selectNode(a),n.collapse(!1),i.selection.removeAllRanges(),i.selection.addRange(n),this._hideDropdown()},_selectMention:function(e){var t=window.getSelection();if(!t.rangeCount||!t.isCollapsed)return null;var i=t.anchorNode;if(i.nodeType===Node.TEXT_NODE&&(i=i.parentNode),i.textContent.indexOf("@")===-1)return null;for(var n=this._redactor.core.editor()[0];i&&i!==n;){if(["PRE","WOLTLAB-QUOTE"].indexOf(i.nodeName)!==-1)return null;i=i.parentNode}for(var a=t.getRangeAt(0),r=a.startContainer,o=a.startOffset;r.nodeType===Node.ELEMENT_NODE;){if(0===o&&0===r.childNodes.length)return null;r=r.childNodes[o?o-1:0],o>0&&(o=r.nodeType===Node.TEXT_NODE?r.textContent.length:r.childNodes.length)}for(var s=r,l=-1;null!==s;){if(s.nodeType!==Node.TEXT_NODE)return null;if(s.textContent.indexOf("@")!==-1){l=s.textContent.lastIndexOf("@");break}s=s.previousSibling}if(l===-1)return null;try{a=document.createRange(),a.setStart(s,l),a.setEnd(r,o)}catch(e){return window.console.debug(e),null}if(e===!1){var c="";for(l&&(c=s.textContent.substr(0,l));(s=s.previousSibling)&&s.nodeType===Node.TEXT_NODE;)c=s.textContent+c;if(c.replace(/\u200B/g,"").match(/\S$/))return null}else if(a.cloneContents().textContent.replace(/\u200B/g,"").replace(/\u00A0/g,"").trim().replace(/^@/,"")!==this._mentionStart)return null;return{range:a,selection:t}},_updateDropdownPosition:function(){var e=this._getDropdownMenuPosition();return null===e?void this._hideDropdown():(e.top+=7,this._dropdownMenu.style.setProperty("left",e.left+"px",""),this._dropdownMenu.style.setProperty("top",e.top+"px",""),this._selectItem(0),void(e.top+this._dropdownMenu.offsetHeight+10>window.innerHeight+(window.scrollY||window.pageYOffset)&&this._dropdownMenu.style.setProperty("top",e.top-this._dropdownMenu.offsetHeight-2*this._lineHeight+7+"px","")))},_selectItem:function(e){var t=elBySel(".active",this._dropdownMenu);null!==t&&t.classList.remove("active"),this._itemIndex+=e,this._itemIndex<0?this._itemIndex=this._dropdownMenu.childElementCount-1:this._itemIndex>=this._dropdownMenu.childElementCount&&(this._itemIndex=0),this._dropdownMenu.children[this._itemIndex].classList.add("active")},_hideDropdown:function(){null!==this._dropdownMenu&&this._dropdownMenu.classList.remove("dropdownOpen"),this._dropdownActive=!1,this._itemIndex=0},_ajaxSetup:function(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\user\\UserAction",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{includeUserGroups:!1}}},silent:!0}},_ajaxSuccess:function(e){if(!Array.isArray(e.returnValues)||!e.returnValues.length)return void this._hideDropdown();null===this._dropdownMenu&&(this._dropdownMenu=elCreate("ol"),this._dropdownMenu.className="dropdownMenu",null===r&&(r=elCreate("div"),r.className="dropdownMenuContainer",document.body.appendChild(r)),r.appendChild(this._dropdownMenu)),this._dropdownMenu.innerHTML="";for(var t,n,a,o=this._setUsername.bind(this),s=0,l=e.returnValues.length;s"+a.icon+" "+i.escapeHTML(a.label)+"",elData(t,"user-id",a.objectID),elData(t,"username",a.label),n.appendChild(t),this._dropdownMenu.appendChild(n);this._dropdownMenu.classList.add("dropdownOpen"),this._dropdownActive=!0,this._updateDropdownPosition()}},a}),define("WoltLabSuite/Core/Ui/Redactor/Page",["WoltLabSuite/Core/Ui/Page/Search"],function(e){"use strict";function t(e,t){this.init(e,t)}return t.prototype={init:function(e,t){this._editor=e,t.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))},_click:function(t){t.preventDefault(),e.open(this._insert.bind(this))},_insert:function(e){this._editor.buffer.set(),this._editor.insert.text("[wsp='"+e+"'][/wsp]")}},t}),define("WoltLabSuite/Core/Ui/Redactor/Quote",["Core","EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog","./Metacode","./PseudoHeader"],function(e,t,i,n,a,r,o,s,l){"use strict";function c(e,t){this.init(e,t)}var d=0;return c.prototype={init:function(e,i){this._quote=null,this._quotes=elByTag("woltlab-quote",e.$editor[0]),this._editor=e,this._elementId=this._editor.$element[0].id,t.add("com.woltlab.wcf.redactor2","observe_load_"+this._elementId,this._observeLoad.bind(this)),this._editor.button.addCallback(i,this._click.bind(this)),this._callbackEdit=this._edit.bind(this),this._observeLoad(),t.add("com.woltlab.wcf.redactor2","insertQuote_"+this._elementId,this._insertQuote.bind(this))},_insertQuote:function(e){if(!this._editor.WoltLabSource.isActive()){t.fire("com.woltlab.wcf.redactor2","showEditor");var i=this._editor.core.editor()[0];this._editor.selection.restore(),this._editor.buffer.set();var n=this._editor.selection.block();for(n===!1&&(this._editor.focus.end(),n=this._editor.selection.block());n&&n.parentNode!==i;)n=n.parentNode;var r=elCreate("woltlab-quote");elData(r,"author",e.author),elData(r,"link",e.link);var o=e.content;e.isText?(o=a.escapeHTML(o),o="

        "+o+"

        ",o=o.replace(/\n\n/g,"

        "),o=o.replace(/\n/g,"
        ")):o=s.convertFromHtml(this._editor.$element[0].id,o),r.innerHTML=o,n.parentNode.insertBefore(r,n.nextSibling),"P"!==n.nodeName||"
        "!==n.innerHTML&&""!==n.innerHTML.replace(/\u200B/g,"")||n.parentNode.removeChild(n),this._editor.WoltLabCaret.paragraphAfterBlock(r),this._editor.buffer.set()}},_click:function(){this._editor.button.toggle({},"woltlab-quote","func","block.format");var e=this._editor.selection.block();e&&"WOLTLAB-QUOTE"===e.nodeName&&(this._setTitle(e),e.addEventListener(WCF_CLICK_EVENT,this._callbackEdit),this._editor.caret.end(e))},_observeLoad:function(){for(var e,t=0,i=this._quotes.length;ti.top&&e.pageY

        '+n.get("wcf.editor.quote.url.description")+'
        "}}},c}),define("WoltLabSuite/Core/Ui/Redactor/Spoiler",["EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog","./PseudoHeader"],function(e,t,i,n,a,r,o){"use strict";function s(e){this.init(e)}var l=0;return s.prototype={init:function(t){this._editor=t,this._elementId=this._editor.$element[0].id,this._spoiler=null,e.add("com.woltlab.wcf.redactor2","bbcode_spoiler_"+this._elementId,this._bbcodeSpoiler.bind(this)),e.add("com.woltlab.wcf.redactor2","observe_load_"+this._elementId,this._observeLoad.bind(this)),this._callbackEdit=this._edit.bind(this),this._observeLoad()},_bbcodeSpoiler:function(e){e.cancel=!0,this._editor.button.toggle({},"woltlab-spoiler","func","block.format");var t=this._editor.selection.block();t&&"WOLTLAB-SPOILER"===t.nodeName&&(this._setTitle(t),t.addEventListener(WCF_CLICK_EVENT,this._callbackEdit),this._editor.caret.end(t))},_observeLoad:function(){elBySelAll("woltlab-spoiler",this._editor.$editor[0],function(e){e.addEventListener("mousedown",this._callbackEdit),this._setTitle(e)}.bind(this))},_edit:function(e){var t=e.currentTarget;0===l&&(l=o.getHeight(t));var i=a.offset(t);e.pageY>i.top&&e.pageY
        '+i.get("wcf.editor.spoiler.label.description")+'
        "}}},s}),define("WoltLabSuite/Core/Ui/Search/Page",["Core","Dom/Traverse","Dom/Util","Ui/Screen","Ui/SimpleDropdown","./Input"],function(e,t,i,n,a,r){"use strict";return{init:function(o){var s=elById("pageHeaderSearchInput");new r(s,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},callbackDropdownInit:function(e){if(e.classList.add("dropdownMenuPageSearch"),n.is("screen-lg")){elData(e,"dropdown-alignment-horizontal","right");var t=s.clientWidth;e.style.setProperty("min-width",t+"px","");var a=s.parentNode,r=i.offset(a).left+a.clientWidth-(i.offset(s).left+t),o=i.styleAsInt(window.getComputedStyle(a),"padding-bottom");e.style.setProperty("transform","translateX(-"+Math.ceil(r)+"px) translateY(-"+o+"px)","")}},callbackSelect:function(){return setTimeout(function(){t.parentByTag(s,"FORM").submit()},1),!0}});var l=a.getDropdownMenu(i.identify(elBySel(".pageHeaderSearchType"))),c=this._click.bind(this);elBySelAll("a[data-object-type]",l,function(e){e.addEventListener(WCF_CLICK_EVENT,c)});var d=elBySel('a[data-object-type="'+o+'"]',l);e.triggerEvent(d,WCF_CLICK_EVENT)},_click:function(e){e.preventDefault();var t=elById("pageHeader");t.classList.add("searchBarForceOpen"),window.setTimeout(function(){t.classList.remove("searchBarForceOpen")},10);var i=elData(e.currentTarget,"object-type"),n=elById("pageHeaderSearchParameters");n.innerHTML="";var a=elData(e.currentTarget,"extended-link");a&&(elBySel(".pageHeaderSearchExtendedLink").href=a);var r=elData(e.currentTarget,"parameters");r=r?JSON.parse(r):{},i&&(r["types[]"]=i);for(var o in r)if(r.hasOwnProperty(o)){var s=elCreate("input");s.type="hidden",s.name=o,s.value=r[o],n.appendChild(s)}var l=elBySel(".pageHeaderSearchType > .button",elById("pageHeaderSearchInputContainer"));l.textContent=e.currentTarget.textContent}}}),define("WoltLabSuite/Core/Ui/Sortable/List",["Core","Ui/Screen"],function(e,t){"use strict";function i(e){this.init(e)}return i.prototype={init:function(i){this._options=e.extend({containerId:"",className:"",offset:0,options:{},isSimpleSorting:!1,additionalParameters:{}},i),t.on("screen-sm-md",{match:this._enable.bind(this,!0),unmatch:this._disable.bind(this),setup:this._enable.bind(this,!0)}),t.on("screen-lg",{match:this._enable.bind(this,!1),unmatch:this._disable.bind(this),setup:this._enable.bind(this,!1)})},_enable:function(e){var t=this._options.options;e&&(t.handle=".sortableNodeHandle"),new window.WCF.Sortable.List(this._options.containerId,this._options.className,this._options.offset,t,this._options.isSimpleSorting,this._options.additionalParameters)},_disable:function(){window.jQuery("#"+this._options.containerId+" .sortableList")[this._options.isSimpleSorting?"sortable":"nestedSortable"]("destroy")}},i}),define("WoltLabSuite/Core/Ui/Style/FontAwesome",["Language","Ui/Dialog","WoltLabSuite/Core/Ui/ItemList/Filter"],function(e,t,i){"use strict";var n,a,r=[];return{setup:function(e){r=e},open:function(e){if(0===r.length)throw new Error("Missing icon data, please include the template before calling this method using `{include file='fontAwesomeJavaScript'}`.");n=e,t.open(this)},_click:function(e){e.preventDefault();var i=e.target.closest("li"),a=elBySel("small",i).textContent.trim();t.close(this),n(a)},_dialogSetup:function(){return{id:"fontAwesomeSelection",options:{onSetup:function(){a=elById("fontAwesomeIcons");for(var e,t="",n=0,o=r.length;n'+e+"";a.innerHTML=t,a.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),new i("fontAwesomeIcons",{callbackPrepareItem:function(e){var t=elBySel("small",e),i=t.textContent.trim();return{item:e,span:t,text:i}}})}.bind(this),title:e.get("wcf.global.fontAwesome.selectIcon")},source:'
          '}}}}),define("WoltLabSuite/Core/Ui/Toggle/Input",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}return t.prototype={init:function(t,i){if(this._element=elBySel(t),null===this._element)throw new Error("Unable to find element by selector '"+t+"'.");var n="INPUT"===this._element.nodeName?elAttr(this._element,"type"):"";if("checkbox"!==n&&"radio"!==n)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this._options=e.extend({hide:[],show:[]},i),["hide","show"].forEach(function(e){var t,i,n;for(i=0,n=this._options[e].length;i
          "}}}}),define("WoltLabSuite/Core/Controller/Condition/Page/Dependence",["Dom/ChangeListener","Dom/Traverse","EventHandler","ObjectMap"],function(e,t,i,n){"use strict";var a=elBySelAll('input[name="pageIDs[]"]'),r=[],o=new n,s=new n,l=!1;return{register:function(e,i){if(r.push(e),o.set(e,i),s.set(e,[]),!l){for(var n=0,c=a.length;n
          '),l=elCreate("li"),elData(l,"object-id",s.objectID),l.innerHTML='
          '+r+'

          '+t.escapeHTML(s.title)+"

          "+(s.description?"

          "+s.description+"

          ":"")+"
          ",l.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),c.appendChild(l);elShow(d)},_resetList:function(){var e=o.nextElementSibling;e&&e.classList.contains("innerError")&&elRemove(e),c.innerHTML="",elHide(d)},_getSearchInputHandler:function(){if(null===l){var e=this._buildList.bind(this);l=new a(elById("wcfUiPageSearchInput"),{callbackSuccess:e})}return l},_click:function(e){"A"!==e.target.nodeName&&(e.stopPropagation(),r(elData(e.currentTarget,"object-id")),n.close(this))},_dialogSetup:function(){return{id:"wcfUiPageSearchHandler",options:{onShow:function(){null===o&&(o=elById("wcfUiPageSearchInput"),s=o.parentNode.previousSibling.childNodes[0],c=elById("wcfUiPageSearchResultList"),d=elById("wcfUiPageSearchResultListContainer")),o.value="",elHide(d),c.innerHTML="",o.focus()},title:""},source:'

          '+e.get("wcf.page.pageObjectID.search.results")+'

            '}}}}),define("WoltLabSuite/Core/Ui/User/Activity/Recent",["Ajax","Language","Dom/Util"],function(e,t,i){"use strict";function n(e){this.init(e)}return n.prototype={init:function(e){this._containerId=e;var i=elById(this._containerId);this._list=elBySel(".recentActivityList",i);var n=elCreate("li");n.className="showMore",this._list.childElementCount?(n.innerHTML='",n.children[0].addEventListener(WCF_CLICK_EVENT,this._showMore.bind(this))):n.innerHTML=""+t.get("wcf.user.recentActivity.noMoreEntries")+"",this._list.appendChild(n),this._showMoreItem=n,elBySelAll(".jsRecentActivitySwitchContext .button",i,function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),e.classList.contains("active")||this._switchContext()}.bind(this))}.bind(this))},_showMore:function(t){t.preventDefault(),this._showMoreItem.children[0].disabled=!0,e.api(this,{actionName:"load",parameters:{boxID:~~elData(this._list,"box-id"),filteredByFollowedUsers:elDataBool(this._list,"filtered-by-followed-users"),lastEventId:elData(this._list,"last-event-id"),lastEventTime:elData(this._list,"last-event-time"),userID:~~elData(this._list,"user-id")}})},_switchContext:function(){e.api(this,{actionName:"switchContext"},function(){window.location.hash="#"+this._containerId,window.location.reload()}.bind(this))},_ajaxSuccess:function(e){e.returnValues.template?(i.insertHtml(e.returnValues.template,this._showMoreItem,"before"),elData(this._list,"last-event-time",e.returnValues.lastEventTime),elData(this._list,"last-event-id",e.returnValues.lastEventID),this._showMoreItem.children[0].disabled=!1):this._showMoreItem.innerHTML=""+t.get("wcf.user.recentActivity.noMoreEntries")+""},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"}}}},n}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract",["Ajax","Dom/Util"],function(e,t){"use strict";function i(e,t){}return i.prototype={init:function(e,t){this._userId=e,this._isActive=t!==!1,this._initButton(),this._updateButton()},_initButton:function(){var e=elCreate("a");e.href="#",e.addEventListener(WCF_CLICK_EVENT,this._toggle.bind(this));var i=elCreate("li");i.appendChild(e);var n=elBySel('.userProfileButtonMenu[data-menu="interaction"]');t.prepend(i,n),this._button=e,this._listItem=i},_toggle:function(t){t.preventDefault(),e.api(this,{actionName:this._getAjaxActionName(),parameters:{data:{userID:this._userId}}})},_updateButton:function(){this._button.textContent=this._getLabel(),this._listItem.classList[this._isActive?"add":"remove"]("active")},_getLabel:function(){throw new Error("Implement me!")},_getAjaxActionName:function(){throw new Error("Implement me!")},_ajaxSuccess:function(){throw new Error("Implement me!")},_ajaxSetup:function(){throw new Error("Implement me!")}},i}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow",["Core","Language","Ui/Notification","./Abstract"],function(e,t,i,n){"use strict";function a(e,t){this.init(e,t)}return e.inherit(a,n,{_getLabel:function(){return t.get("wcf.user.button."+(this._isActive?"un":"")+"follow")},_getAjaxActionName:function(){return this._isActive?"unfollow":"follow"},_ajaxSuccess:function(e){this._isActive=!!e.returnValues.following,this._updateButton(),i.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\follow\\UserFollowAction"}}}}),a}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore",["Core","Language","Ui/Notification","./Abstract"],function(e,t,i,n){"use strict";function a(e,t){this.init(e,t)}return e.inherit(a,n,{_getLabel:function(){return t.get("wcf.user.button."+(this._isActive?"un":"")+"ignore")},_getAjaxActionName:function(){return this._isActive?"unignore":"ignore"},_ajaxSuccess:function(e){this._isActive=!!e.returnValues.isIgnoredUser,this._updateButton(),i.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\ignore\\UserIgnoreAction"}}}}),a}),function(e){e.matches=e.matches||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector,e.closest=e.closest||function(e){for(var t=this;t&&!t.matches(e);)t=t.parentElement;return t}}(Element.prototype),define("closest",function(){}),function(e){function t(){for(;n.length&&"function"==typeof n[0];)n.shift()()}var i=e.require,n=[],a=0;e.require=function(r,o,s){if(!Array.isArray(r))return i.apply(e,arguments);var l=new Promise(function(e,o){var s=a++;n.push(s),i(r,function(){var i=arguments;n[n.indexOf(s)]=function(){e(i)},t()},function(e){n[n.indexOf(s)]=function(){o(e)},t()})});return o&&l.then(function(t){o.apply(e,t)}),s&&l.catch(s),l},e.require.config=i.config}(window),define("require.linearExecution",function(){}); \ No newline at end of file diff --git a/wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js b/wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js index 16f924d1bc..6ebbc64f10 100644 --- a/wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js +++ b/wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js @@ -1,8 +1,8 @@ -var requirejs,require,define;!function(global,setTimeout){function commentReplace(e,t){return t||""}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-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,o){!n&&hasProp(e,o)||(!i||"object"!=typeof t||!t||isArray(t)||isFunction(t)||t instanceof RegExp?e[o]=t:(e[o]||(e[o]={}),mixin(e[o],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 o=new Error(t+"\nhttp://requirejs.org/docs/errors.html#"+e);return o.requireType=e,o.requireModules=i,n&&(o.originalError=n),o}function newContext(e){function t(e){var t,n;for(t=0;t0&&(e.splice(t-1,2),t-=2)}}function n(e,n,i){var o,r,a,s,l,c,u,d,h,f,p,m,g=n&&n.split("/"),v=L.map,b=v&&v["*"];if(e&&(e=e.split("/"),u=e.length-1,L.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)){a=e.split("/");e:for(s=a.length;s>0;s-=1){if(c=a.slice(0,s).join("/"),g)for(l=g.length;l>0;l-=1)if(r=getOwn(v,g.slice(0,l).join("/")),r&&(r=getOwn(r,c))){d=r,h=s;break e}!f&&b&&getOwn(b,c)&&(f=getOwn(b,c),p=s)}!d&&f&&(d=f,h=p),d&&(a.splice(0,h,d),e=a.join("/"))}return o=getOwn(L.pkgs,e),o?o:e}function i(e){isBrowser&&each(scripts(),function(t){if(t.getAttribute("data-requiremodule")===e&&t.getAttribute("data-requirecontext")===y.contextName)return t.parentNode.removeChild(t),!0})}function o(e){var t=getOwn(L.paths,e);if(t&&isArray(t)&&t.length>1)return t.shift(),y.require.undef(e),y.makeRequire(null,{skipMap:!0})([e]),!0}function r(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 a(e,t,i,o){var a,s,l,c,u=null,d=t?t.name:null,h=e,f=!0,p="";return e||(f=!1,e="_@r"+(I+=1)),c=r(e),u=c[0],e=c[1],u&&(u=n(u,d,o),s=getOwn(T,u)),e&&(u?p=i?e:s&&s.normalize?s.normalize(e,function(e){return n(e,d,o)}):e.indexOf("!")===-1?n(e,d,o):e:(p=n(e,d,o),c=r(p),u=c[0],p=c[1],i=!0,a=y.nameToUrl(p))),l=!u||s||i?"":"_unnormalized"+(A+=1),{prefix:u,name:p,parentMap:t,unnormalized:!!l,url:a,originalName:h,isDefine:f,id:(u?u+"!"+p:p)+l}}function s(e){var t=e.id,n=getOwn(S,t);return n||(n=S[t]=new y.Module(e)),n}function l(e,t,n){var i=e.id,o=getOwn(S,i);!hasProp(T,i)||o&&!o.defineEmitComplete?(o=s(e),o.error&&"error"===t?n(o.error):o.on(t,n)):"defined"===t&&n(T[i])}function c(e,t){var n=e.requireModules,i=!1;t?t(e):(each(n,function(t){var n=getOwn(S,t);n&&(n.error=e,n.events.error&&(i=!0,n.emit("error",e)))}),i||req.onError(e))}function u(){globalDefQueue.length&&(each(globalDefQueue,function(e){var t=e[0];"string"==typeof t&&(y.defQueueMap[t]=!0),D.push(e)}),globalDefQueue=[])}function d(e){delete S[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,o){var r=i.id,a=getOwn(S,r);!a||e.depMatched[o]||n[r]||(getOwn(t,r)?(e.defineDep(o,T[r]),e.check()):h(a,t,n))}),n[i]=!0)}function f(){var e,t,n=1e3*L.waitSeconds,r=n&&y.startTime+n<(new Date).getTime(),a=[],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&&r)o(c)?(t=!0,l=!0):(a.push(c),i(c));else if(!e.inited&&e.fetched&&n.isDefine&&(l=!0,!n.prefix))return u=!1}),r&&a.length)return e=makeError("timeout","Load timeout for modules: "+a,null,a),e.contextName=y.contextName,c(e);u&&each(s,function(e){h(e,{},{})}),r&&!t||!l||!isBrowser&&!isWebWorker||C||(C=setTimeout(function(){C=0,f()},50)),b=!1}}function p(e){hasProp(T,e[0])||s(a(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,y.onScriptLoad,"load","onreadystatechange"),m(t,y.onScriptError,"error"),{node:t,id:t&&t.getAttribute("data-requiremodule")}}function v(){var e;for(u();D.length;){if(e=D.shift(),null===e[0])return c(makeError("mismatch","Mismatched anonymous define() module: "+e[e.length-1]));p(e)}y.defQueueMap={}}var b,_,y,w,C,L={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},S={},E={},x={},D=[],T={},k={},M={},I=1,A=1;return w={require:function(e){return e.require?e.require:e.require=y.makeRequire(e.map)},exports:function(e){if(e.usingExports=!0,e.map.isDefine)return e.exports?T[e.map.id]=e.exports:e.exports=T[e.map.id]={}},module:function(e){return e.module?e.module:e.module={id:e.map.id,uri:e.map.url,config:function(){return getOwn(L.config,e.map.id)||{}},exports:e.exports||(e.exports={})}}},_=function(e){this.events=getOwn(x,e.id)||{},this.map=e,this.shim=getOwn(L.shim,e.id),this.depExports=[],this.depMaps=[],this.depMatched=[],this.pluginMaps={},this.depCount=0},_.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,y.startTime=(new Date).getTime();var e=this.map;return this.shim?void y.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;k[e]||(k[e]=!0,y.load(this.map.id,e))},check:function(){if(this.enabled&&!this.enabling){var e,t,n=this.map.id,i=this.depExports,o=this.exports,r=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(r)){if(this.events.error&&this.map.isDefine||req.onError!==defaultOnError)try{o=y.execCb(n,r,i,o)}catch(t){e=t}else o=y.execCb(n,r,i,o);if(this.map.isDefine&&void 0===o&&(t=this.module,t?o=t.exports:this.usingExports&&(o=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 o=r;if(this.exports=o,this.map.isDefine&&!this.ignore&&(T[n]=o,req.onResourceLoad)){var a=[];each(this.depMaps,function(e){a.push(e.normalizedMap||e)}),req.onResourceLoad(y,this.map,a)}d(n),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else hasProp(y.defQueueMap,n)||this.fetch()}},callPlugin:function(){var e=this.map,t=e.id,i=a(e.prefix);this.depMaps.push(i),l(i,"defined",bind(this,function(i){var o,r,u,h=getOwn(M,this.map.id),f=this.map.name,p=this.map.parentMap?this.map.parentMap.name:null,m=y.makeRequire(e.parentMap,{enableBuildCallback:!0});return this.map.unnormalized?(i.normalize&&(f=i.normalize(f,function(e){return n(e,p,!0)})||""),r=a(e.prefix+"!"+f,this.map.parentMap,!0),l(r,"defined",bind(this,function(e){this.map.normalizedMap=r,this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),u=getOwn(S,r.id),void(u&&(this.depMaps.push(r),this.events.error&&u.on("error",bind(this,function(e){this.emit("error",e)})),u.enable()))):h?(this.map.url=y.nameToUrl(h),void this.load()):(o=bind(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),o.error=bind(this,function(e){this.inited=!0,this.error=e,e.requireModules=[t],eachProp(S,function(e){0===e.map.id.indexOf(t+"_unnormalized")&&d(e.map.id)}),c(e)}),o.fromText=bind(this,function(n,i){var r=e.name,l=a(r),u=useInteractive;i&&(n=i),u&&(useInteractive=!1),s(l),hasProp(L.config,t)&&(L.config[r]=L.config[t]);try{req.exec(n)}catch(e){return c(makeError("fromtexteval","fromText eval for "+t+" failed: "+e,e,[t]))}u&&(useInteractive=!0),this.depMaps.push(l),y.completeLoad(r),m([r],o)}),void i.load(e.name,m,o,L))})),y.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,o;if("string"==typeof e){if(e=a(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[t]=e,o=getOwn(w,e.id))return void(this.depExports[t]=o(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=S[n],hasProp(w,n)||!i||i.enabled||y.enable(e,this)})),eachProp(this.pluginMaps,bind(this,function(e){var t=getOwn(S,e.id);t&&!t.enabled&&y.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]}},y={config:L,contextName:e,registry:S,defined:T,urlFetched:k,defQueue:D,defQueueMap:{},Module:_,makeModuleMap:a,nextTick:req.nextTick,onError:c,configure:function(e){if(e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/"),"string"==typeof e.urlArgs){var t=e.urlArgs;e.urlArgs=function(e,n){return(n.indexOf("?")===-1?"?":"&")+t}}var n=L.shim,i={paths:!0,bundles:!0,config:!0,map:!0};eachProp(e,function(e,t){i[t]?(L[t]||(L[t]={}),mixin(L[t],e,!0,!0)):L[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,t){isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=y.makeShimExports(e)),n[t]=e}),L.shim=n),e.packages&&each(e.packages,function(e){var t,n;e="string"==typeof e?{name:e}:e,n=e.name,t=e.location,t&&(L.paths[n]=e.location),L.pkgs[n]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),eachProp(S,function(e,t){e.inited||e.map.unnormalized||(e.map=a(t,null,!0))}),(e.deps||e.callback)&&y.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,o){function r(n,i,l){var u,d,h;return o.enableBuildCallback&&i&&isFunction(i)&&(i.__requireJsBuild=!0),"string"==typeof n?isFunction(i)?c(makeError("requireargs","Invalid require call"),l):t&&hasProp(w,n)?w[n](S[t.id]):req.get?req.get(y,n,t,r):(d=a(n,t,!1,!0),u=d.id,hasProp(T,u)?T[u]:c(makeError("notloaded",'Module name "'+u+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(v(),y.nextTick(function(){v(),h=s(a(null,t)),h.skipMap=o.skipMap,h.init(n,i,l,{enabled:!0}),f()}),r)}return o=o||{},mixin(r,{isBrowser:isBrowser,toUrl:function(e){var i,o=e.lastIndexOf("."),r=e.split("/")[0],a="."===r||".."===r;return o!==-1&&(!a||o>1)&&(i=e.substring(o,e.length),e=e.substring(0,o)),y.nameToUrl(n(e,t&&t.id,!0),i,!0)},defined:function(e){return hasProp(T,a(e,t,!1,!0).id)},specified:function(e){return e=a(e,t,!1,!0).id,hasProp(T,e)||hasProp(S,e)}}),t||(r.undef=function(e){u();var n=a(e,t,!0),o=getOwn(S,e);o.undefed=!0,i(e),delete T[e],delete k[n.url],delete x[e],eachReverse(D,function(t,n){t[0]===e&&D.splice(n,1)}),delete y.defQueueMap[e],o&&(o.events.defined&&(x[e]=o.events),d(e))}),r},enable:function(e){var t=getOwn(S,e.id);t&&s(e).enable()},completeLoad:function(e){var t,n,i,r=getOwn(L.shim,e)||{},a=r.exports;for(u();D.length;){if(n=D.shift(),null===n[0]){if(n[0]=e,t)break;t=!0}else n[0]===e&&(t=!0);p(n)}if(y.defQueueMap={},i=getOwn(S,e),!t&&!hasProp(T,e)&&i&&!i.inited){if(!(!L.enforceDefine||a&&getGlobal(a)))return o(e)?void 0:c(makeError("nodefine","No define call for "+e,null,[e]));p([e,r.deps||[],r.exportsFn])}f()},nameToUrl:function(e,t,n){var i,o,r,a,s,l,c,u=getOwn(L.pkgs,e);if(u&&(e=u),c=getOwn(M,e))return y.nameToUrl(c,t,n);if(req.jsExtRegExp.test(e))s=e+(t||"");else{for(i=L.paths,o=e.split("/"),r=o.length;r>0;r-=1)if(a=o.slice(0,r).join("/"),l=getOwn(i,a)){isArray(l)&&(l=l[0]),o.splice(0,r,l);break}s=o.join("/"),s+=t||(/^data\:|^blob\:|\?/.test(s)||n?"":".js"),s=("/"===s.charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":L.baseUrl)+s}return L.urlArgs&&!/^blob\:/.test(s)?s+L.urlArgs(e,s):s},load:function(e,t){req.load(y,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);y.completeLoad(t.id)}},onScriptError:function(e){var t=g(e);if(!o(t.id)){var n=[];return eachProp(S,function(e,i){0!==i.indexOf("_@r")&&each(e.depMaps,function(e){if(e.id===t.id)return n.push(i),!0})}),c(makeError("scripterror",'Script error for "'+t.id+(n.length?'", needed by: '+n.join(", "):'"'),e,[t.id]))}}},y.require=y.makeRequire(),y}function getInteractiveScript(){return interactiveScript&&"interactive"===interactiveScript.readyState?interactiveScript:(eachReverse(scripts(),function(e){if("interactive"===e.readyState)return interactiveScript=e}),interactiveScript)}var req,s,head,baseElement,dataMain,src,interactiveScript,currentlyAddingScript,mainScript,subPath,version="2.3.3",commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,currDirRegExp=/^\.\//,op=Object.prototype,ostring=op.toString,hasOwn=op.hasOwnProperty,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 o,r,a=defContextName;return isArray(e)||"string"==typeof e||(r=e,isArray(t)?(e=t,t=n,n=i):e=[]),r&&r.context&&(a=r.context),o=getOwn(contexts,a),o||(o=contexts[a]=req.s.newContext(a)),r&&o.configure(r),o.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,o=e&&e.config||{};if(isBrowser)return i=req.createNode(o,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,o.onNodeCreated&&o.onNodeCreated(i,o,t,n),currentlyAddingScript=i,baseElement?head.insertBefore(i,baseElement):head.appendChild(i),currentlyAddingScript=null,i;if(isWebWorker)try{setTimeout(function(){},0),importScripts(n),e.completeLoad(t)}catch(i){e.onError(makeError("importscripts","importScripts failed for "+t+" at "+n,i,[t]))}},isBrowser&&!cfg.skipDataMain&&eachReverse(scripts(),function(e){if(head||(head=e.parentNode),dataMain=e.getAttribute("data-main"))return mainScript=dataMain,cfg.baseUrl||mainScript.indexOf("!")!==-1||(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}),define=function(e,t,n){var i,o;"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,commentReplace).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")),o=contexts[i.getAttribute("data-requirecontext")])),o?(o.defQueue.push([e,t,n]),o.defQueueMap[e]=!0):globalDefQueue.push([e,t,n])},define.amd={jQuery:!0},req.exec=function(text){return eval(text)},req(cfg)}}(this,"undefined"==typeof setTimeout?void 0:setTimeout),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:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],function(){return window.jQuery}),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.elAttrBool=function(e,t){var n=elAttr(e,t);return"1"===n||"true"===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,i){var o=(n||t).querySelectorAll(e);return"function"==typeof i&&Array.prototype.forEach.call(o,i),o},e.elByTag=function(e,n){return(n||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elData=function(e,t,n){return t="data-"+t,void 0===n?e.getAttribute(t)||"":void e.setAttribute(t,n)},e.elDataBool=function(e,t){var n=elData(e,t);return"1"===n||"true"===n},e.elHide=function(e){e.style.setProperty("display","none","")},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var n=0,i=e.length;n0||navigator.msMaxTouchPoints>0?"touchstart":"click";Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),function(){function t(){e.history.state&&e.history.state.name&&"initial"!==e.history.state.name?(e.history.replaceState({name:"skip",depth:++n},"",""),e.history.back(),setTimeout(t,1)):e.history.replaceState({name:"initial"},"","")}var n=0;t(),e.addEventListener("popstate",function(t){t.state&&t.state.name&&"skip"===t.state.name&&e.history.go(t.state.depth)})}()}(window,document),define("wcf.globalHelper",function(){}),define("WoltLabSuite/Core/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)objOwns(t,i)&&"undefined"!=typeof t[i]&&(n[i]=e(t[i]));return n},n={clone:function(t){return e(t)},convertLegacyUrl:function(e){return e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){var n=t.split(/([A-Z][a-z0-9]+)/);t="";for(var i=0,o=n.length;iu&&x.push("'"+this.terminals_[L]+"'");k=f.showPosition?"Parse error on line "+(s+1)+":\n"+f.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(k,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:g,expected:x})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),o.push(f.yylloc),n.push(w[1]),b=null,_?(b=_,_=null):(l=f.yyleng,a=f.yytext,s=f.yylineno,g=f.yylloc,c>0&&c--);break;case 2:if(S=this.productions_[w[1]][1],T.$=i[i.length-S],T._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},v&&(T._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),C=this.performAction.apply(T,[a,l,s,p.yy,w[1],i,o].concat(h)),"undefined"!=typeof C)return C;S&&(n=n.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[w[1]][0]),i.push(T.$),o.push(T._$),E=r[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},b=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 o=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=[o[0],o[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,o;if(this.options.backtrack_lexer&&(o={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&&(o.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 r in o)this[r]=o[r];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 o=this._currentRules(),r=0;rt[0].length)){if(t=n,i=r,this.options.backtrack_lexer){if(e=this.test_match(n,o[r]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,o[i]),e!==!1&&e):""===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 52;case 3:return 52;case 4:return 40;case 5:return 41;case 6:return 46;case 7:return 44;case 8:return 45;case 9:return 47;case 10:return 49;case 11:return 50;case 12:return 32;case 13:return 33;case 14:return this.begin("command"),30;case 15:return this.begin("command"),31;case 16:return this.begin("command"),13;case 17:return this.begin("command"),37;case 18:return this.begin("command"),37;case 19:return 35;case 20:return 18;case 21:return 26;case 22:return 27;case 23:return this.begin("command"),19;case 24:return this.begin("command"),21;case 25:return 22;case 26:return this.begin("command"),23;case 27:return 39;case 28:return 25;case 29:return this.begin("command"),28;case 30:return this.popState(),15;case 31:return 12;case 32:return 5;case 33:return 11}},rules:[/^(?:\{\*[\s\S]*?\*\})/,/^(?:\{literal\}[\s\S]*?\{\/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))/,/^(?:\})/,/^(?:\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],inclusive:!0},INITIAL:{rules:[0,1,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33],inclusive:!0}}};return e}();return v.lexer=b,v}),define("WoltLabSuite/Core/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("WoltLabSuite/Core/StringUtil",["Language","./NumberUtil"],function(e,t){"use strict";return{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,"&").replace(/"/g,""").replace(//g,">")},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 o=n.split(".");return n=this.addThousandsSeparator(o[0]),o.length>1&&(n+=e.get("wcf.global.decimalPoint")+o[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(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},shortUnit:function(e){var n="";return e>=1e6?(e/=1e6,e=e>10?Math.floor(e):t.round(e,-1),n="M"):e>=1e3&&(e/=1e3,e=e>10?Math.floor(e):t.round(e,-1),n="k"),this.formatNumeric(e)+n}}}),define("WoltLabSuite/Core/Template",["./Template.grammar","./StringUtil","Language"],function(e,t,n){"use strict";function i(){this.yy={}}function o(i){void 0===n&&(n=require("Language")),void 0===t&&(t=require("StringUtil"));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(e){throw console.debug(e.message),e}}return i.prototype=e,e.Parser=i,e=new i,Object.defineProperty(o,"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")}}),o.prototype={fetch:function(e){throw new Error("This Template is not initialized.")}},o}),define("WoltLabSuite/Core/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 o=n.get(e);if(void 0===o)return e;if("string"==typeof o){try{n.set(e,new t(o))}catch(i){n.set(e,new t("{literal}"+o.replace(/\{\/literal\}/g,"{/literal}{ldelim}/literal}{literal}")+"{/literal}"))}o=n.get(e)}return o instanceof t&&(o=o.fetch(i)),o}};return i}),define("WoltLabSuite/Core/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("WoltLabSuite/Core/Dom/Change/Listener",["CallbackList"],function(e){"use strict";var t=new e,n=!1;return{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}}}}),define("WoltLabSuite/Core/Environment",[],function(){"use strict";var e="other",t="none",n="desktop",i=!1;return{setup:function(){if("object"==typeof window.chrome)e="chrome";else for(var o=window.getComputedStyle(document.documentElement),r=0,a=o.length;r0||window.DocumentTouch&&document instanceof DocumentTouch},browser:function(){return e},editor:function(){return t},platform:function(){return n},touch:function(){return i}}}),define("WoltLabSuite/Core/Dom/Util",["Environment","StringUtil"],function(e,t){"use strict";function n(e,t,n){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");for(var i,o=n+"Sibling";null!==e&&e!==t;){if(null!==e[n+"ElementSibling"])return!1;if(e[o])for(i=e[o];i;){if(""!==i.textContent.trim())return!1;i=i[o]}e=e.parentNode}return!0}var i=0,o={createFragmentFromHtml:function(e){var t=elCreate("div");this.setInnerHtml(t,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 instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");var t=elAttr(e,"id");return t||(t=this.getUniqueId(),elAttr(e,"id",t)),t},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:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend:function(e,t){0===t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[0])},insertAfter:function(e,t){null!==t.nextElementSibling?t.parentNode.insertBefore(e,t.nextElementSibling):t.parentNode.appendChild(e)},setStyles:function(e,t){var n=!1;for(var i in t)t.hasOwnProperty(i)&&(/ !important$/.test(t[i])?(n=!0,t[i]=t[i].replace(/ !important$/,"")):n=!1,"important"!==e.style.getPropertyPriority(i)||n||e.style.removeProperty(i),e.style.setProperty(i,t[i],n?"important":""))},styleAsInt:function(e,t){var n=e.getPropertyValue(t);return null===n?0:parseInt(n)},setInnerHtml:function(e,t){e.innerHTML=t;for(var n,i,o=elBySelAll("script",e),r=0,a=o.length;ro&&(s=!1)):"right"===e?i.left+n.widtho)&&(s=!1)),{align:e,left:r,right:a,result:s}},_tryAlignmentVertical:function(e,t,n,i,o,r){var a="auto",s="auto",l=!0;if("top"===e){var c=document.body.clientHeight;a=c-i.top+r,c-(a+t.height)<(window.scrollY||window.pageYOffset)&&(l=!1)}else s=i.top+n.height+r,s+t.height-(window.scrollY||window.pageYOffset)>o&&(l=!1);return{align:e,bottom:a,top:s,result:l}}}}),define("WoltLabSuite/Core/Ui/CloseOverlay",["CallbackList"],function(e){"use strict";var t=new e,n={setup:function(){document.body.addEventListener(WCF_CLICK_EVENT,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("WoltLabSuite/Core/Ui/Dropdown/Simple",["CallbackList","Core","Dictionary","Ui/Alignment","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/CloseOverlay"],function(e,t,n,i,o,r,a,s){"use strict";var l=null,c=new e,u=!1,d=new n,h=new n,f=null;return{setup:function(){u||(u=!0,f=elCreate("div"),f.className="dropdownMenuContainer",document.body.appendChild(f),l=elByClass("dropdownToggle"),this.initAll(),s.add("WoltLabSuite/Core/Ui/Dropdown/Simple",this.closeAll.bind(this)),o.add("WoltLabSuite/Core/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;e0&&0===o.scrollTop?e.preventDefault():e.wheelDelta<0&&o.scrollTop+l===c&&e.preventDefault()})}elData(e,"target",s),n&&setTimeout(function(){t.triggerEvent(e,WCF_CLICK_EVENT)},10)},initFragment:function(e,t){this.setup();var n=a.identify(e);d.has(n)||(d.set(n,e),f.appendChild(t),h.set(n,t))},registerCallback:function(e,t){c.add(e,t)},getDropdown:function(e){return d.get(e)},getDropdownMenu:function(e){return h.get(e)},toggleDropdown:function(e,t){this._toggle(null,e,t)},setAlignment:function(e,t,n){var o,r=elBySel(".dropdownToggle",e);null!==r&&r.parentNode.classList.contains("inputAddonTextarea")&&(o=r),i.set(t,n||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:o||null,horizontal:"right"===elData(t,"dropdown-alignment-horizontal")?"right":"left",vertical:"top"===elData(t,"dropdown-alignment-vertical")?"top":"bottom"})},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")},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;try{this.close(e),elRemove(h.get(e))}catch(e){}return h.delete(e),d.delete(e),!0},_onDialogScroll:function(e){for(var t=e.currentTarget,n=elBySelAll(".dropdown.dropdownOpen",t),i=0,o=n.length;i=c.top+t.offsetHeight?this.toggleDropdown(s):l.left<=c.left?this.toggleDropdown(s):l.left>=c.left+t.offsetWidth?this.toggleDropdown(s):this.setAlignment(s,h.get(s))}},_onScroll:function(){d.forEach(function(e,t){e.classList.contains("dropdownOpen")&&(elDataBool(e,"is-overlay-dropdown-button")?this.setAlignment(e,h.get(t)):this.close(t))}.bind(this))},_notifyCallbacks:function(e,t){c.forEach(e,function(n){n(e,t)})},_toggle:function(e,t,n){null!==e&&(e.preventDefault(),e.stopPropagation(),t=elData(e.currentTarget,"target"));var i=d.get(t),o=!1;if(void 0!==i){if(e){var a=e.currentTarget,s=a.parentNode;s!==i&&(s.classList.add("dropdown"),s.id=i.id,i.classList.remove("dropdown"),i.id="",i=s,d.set(t,s))}if(elDataBool(i,"dropdown-prevent-toggle")&&i.classList.contains("dropdownOpen")&&(o=!0),null===elData(i,"is-overlay-dropdown-button")){var l=r.parentByClass(i,"dialogContent");elData(i,"is-overlay-dropdown-button",null!==l),null!==l&&l.addEventListener("scroll",this._onDialogScroll.bind(this))}}return d.forEach(function(e,i){var r=h.get(i);if(e.classList.contains("dropdownOpen"))o===!1&&(e.classList.remove("dropdownOpen"),r.classList.remove("dropdownOpen"),this._notifyCallbacks(i,"close"));else if(i===t&&r.childElementCount>0){if(e.classList.add("dropdownOpen"),r.classList.add("dropdownOpen"),r.childElementCount&&elDataBool(r.children[0],"scroll-to-active")){var a=r.children[0];a.removeAttribute("data-scroll-to-active");for(var s=null,l=0,c=a.childElementCount;lu.clientHeight?"add":"remove"]("forceScrollbar"),this._notifyCallbacks(i,"open"),this.setAlignment(e,r,n)}}.bind(this)),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===e}}}),define("WoltLabSuite/Core/Ui/Dialog",["enquire","Ajax","Core","Dictionary","Environment","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/Screen","Ui/SimpleDropdown"],function(e,t,n,i,o,r,a,s,l,c,u,d,h){"use strict";var f=null,p=null,m=new i,g=new a,v=!1,b=null,_=elByClass("jsStaticDialog");return{setup:function(){void 0===t&&(t=require("Ajax")),p=elCreate("div"),p.classList.add("dialogOverlay"),elAttr(p,"aria-hidden","true"),p.addEventListener(WCF_CLICK_EVENT,this._closeOnBackdrop.bind(this)),p.addEventListener("wheel",function(e){e.target===p&&e.preventDefault()}),elById("content").appendChild(p),b=function(e){return 27!==e.keyCode||"INPUT"===e.target.nodeName||"TEXTAREA"===e.target.nodeName||(this.close(f),!1)}.bind(this),d.on("screen-xs",{match:function(){v=!0},unmatch:function(){v=!1},setup:function(){v=!0}}),this._initStaticDialogs(),s.add("Ui/Dialog",this._initStaticDialogs.bind(this)),d.setDialogContainer(p),"ios"===o.platform()&&window.addEventListener("resize",function(){m.forEach(function(e){elAttrBool(e.dialog,"aria-hidden")||this.rebuild(elData(e.dialog,"id"))}.bind(this))}.bind(this))},_initStaticDialogs:function(){for(var e,t,n;_.length;)e=_[0],e.classList.remove("jsStaticDialog"),n=elData(e,"dialog-id"),n&&(t=elById(n))&&function(e,t){t.classList.remove("jsStaticDialogContent"),elHide(t),e.addEventListener(WCF_CLICK_EVENT,this.openStatic.bind(this,t.id,null,{title:elData(t,"title")}))}.bind(this)(e,t)},open:function(e,i){var o=g.get(e);if(n.isPlainObject(o))return this.openStatic(o.id,i);if("function"!=typeof e._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");var r=e._dialogSetup();if(!n.isPlainObject(r))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");o={id:r.id};var a=!0;if(void 0===r.source){var s=elById(r.id);if(null===s)throw new Error("Element id '"+r.id+"' is invalid and no source attribute was given.");r.source=document.createDocumentFragment(),r.source.appendChild(s),s.removeAttribute("id"),elShow(s)}else if(null===r.source)r.source=i;else if("function"==typeof r.source)r.source();else if(n.isPlainObject(r.source)){if("string"!=typeof i||""===i.trim())return t.api(this,r.source.data,function(t){t.returnValues&&"string"==typeof t.returnValues.template&&(this.open(e,t.returnValues.template),"function"==typeof r.source.after&&r.source.after(m.get(r.id).content,t))}.bind(this)),{};r.source=i}else{if("string"==typeof r.source){var s=elCreate("div");elAttr(s,"id",r.id),c.setInnerHtml(s,r.source),r.source=document.createDocumentFragment(),r.source.appendChild(s)}if(!r.source.nodeType||r.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");a=!1}return g.set(e,o),this.openStatic(r.id,r.source,r.options,a)},openStatic:function(e,t,i,a){document.documentElement.classList.add("pageOverlayActive"),m.has(e)?this._updateDialog(e,t):(i=n.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:r.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},i),i.closable||(i.backdropCloseOnClick=!1),i.closeConfirmMessage&&(i.onBeforeClose=function(e){u.show({confirm:this.close.bind(this,e),message:i.closeConfirmMessage})}.bind(this)),this._createDialog(e,t,i));var s=m.get(e);return"ios"===o.platform()?(d.scrollDisable(),window.setTimeout(function(){var e=elBySel("input, textarea",s.content);null!==e&&e.focus()}.bind(this),200)):"desktop"!==o.platform()&&d.scrollDisable(),s},setTitle:function(e,t){if("object"==typeof e){var n=g.get(e);void 0!==n&&(e=n.id)}var i=m.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");var o=elByClass("dialogTitle",i.dialog);o.length&&(o[0].textContent=t)},_createDialog:function(e,t,n,i){var o=null;if(null===t&&(o=elById(e),null===o))throw new Error("Expected either a HTML string or an existing element id.");var r=elCreate("div");r.classList.add("dialogContainer"),elAttr(r,"aria-hidden","true"),elAttr(r,"role","dialog"),elData(r,"id",e);var a=elCreate("header");r.appendChild(a);var s=c.getUniqueId();elAttr(r,"aria-labelledby",s);var l=elCreate("span");if(l.classList.add("dialogTitle"),l.textContent=n.title,elAttr(l,"id",s),a.appendChild(l),n.closable){var u=elCreate("a");u.className="dialogCloseButton jsTooltip",elAttr(u,"title",n.closeButtonLabel),elAttr(u,"aria-label",n.closeButtonLabel),u.addEventListener(WCF_CLICK_EVENT,this._close.bind(this)),a.appendChild(u);var d=elCreate("span");d.className="icon icon24 fa-times",u.appendChild(d)}var h=elCreate("div");h.classList.add("dialogContent"),n.disableContentPadding&&h.classList.add("dialogContentNoPadding"),r.appendChild(h),h.addEventListener("wheel",function(e){for(var t,n,i,o=!1,r=e.target;;){if(t=r.clientHeight,n=r.scrollHeight,t0&&i>0){o=!0;break}if(e.wheelDelta<0&&i+t1?(f=elCreate("div"),f.id=e,f.appendChild(t)):f=t}}else f=o;h.appendChild(f),"none"===f.style.getPropertyValue("display")&&elShow(f),m.set(e,{backdropCloseOnClick:n.backdropCloseOnClick,content:f,dialog:r,header:a,onBeforeClose:n.onBeforeClose,onClose:n.onClose,onShow:n.onShow}),c.prepend(r,p),"function"==typeof n.onSetup&&n.onSetup(f),i!==!0&&this._updateDialog(e,null)},_updateDialog:function(e,t){var n=m.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&&c.setInnerHtml(n.content,t),"true"===elAttr(n.dialog,"aria-hidden")){"true"===elAttr(p,"aria-hidden")&&window.addEventListener("keyup",b),elAttr(n.dialog,"aria-hidden","false"),elAttr(p,"aria-hidden","false"),elData(p,"close-on-click",n.backdropCloseOnClick?"true":"false"),f=e;var i=elBySel(".jsDialogAutoFocus",n.dialog);null!==i&&null!==i.offsetParent&&i.focus(),"function"==typeof n.onShow&&n.onShow(n.content),h.closeAll(),window.WCF.Dropdown.Interactive.Handler.closeAll()}this.rebuild(e),s.trigger()},rebuild:function(e){var t=m.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),r=0;null!==i?(n.classList.add("dialogForm"),i.classList.add("dialogFormSubmit"),r+=c.outerHeight(i),r-=1,n.style.setProperty("margin-bottom",r+"px","")):(n.classList.remove("dialogForm"),n.style.removeProperty("margin-bottom")),r+=c.outerHeight(t.header);var a=window.innerHeight*(v?1:.8)-r;n.style.setProperty("max-height",~~a+"px",""),"chrome"===o.browser()&&(t.content.scrollHeight>a?t.content.style.setProperty("margin-right","-1px",""):t.content.style.removeProperty("margin-right"))}},_close:function(e){e.preventDefault();var t=m.get(f);return"function"==typeof t.onBeforeClose?(t.onBeforeClose(f),!1):void this.close(f)},_closeOnBackdrop:function(e){return e.target!==p||void("true"===elData(p,"close-on-click")?this._close(e):e.preventDefault())},close:function(e){if("object"==typeof e){var t=g.get(e);void 0!==t&&(e=t.id)}var n=m.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,"aria-hidden","true"),f=null;for(var i=0;i=200&&this.status<300||304===this.status?i.responseType&&0!==this.getResponseHeader("Content-Type").indexOf(i.responseType)?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 o=this._options.data;"object"==typeof o&&"FormData"!==e.getType(o)&&(o=e.serialize(o)),this._xhr.send(o)}else this._xhr.send()},abortPrevious:function(){null!==this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=null,this._options.silent||r.hide())},setOption:function(e,t){this._options[e]=t},getOption:function(e){return objOwns(this._options,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||r.hide(),"function"==typeof t.success){var n=null;if("application/json"===e.getResponseHeader("Content-Type")){try{n=JSON.parse(e.responseText)}catch(n){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||r.hide();var a=null;try{a=JSON.parse(e.responseText)}catch(e){}var s=!0;if("function"==typeof n.failure&&(s=n.failure(a||{},e.responseText||"",e,n.data)),n.ignoreError!==!0&&s!==!1){var c="",u="";if(null!==a?(a.stacktrace?c="

            Stacktrace:

            "+a.stacktrace+"

            ":a.exceptionID&&(c="

            Exception ID: "+a.exceptionID+"

            "),u=a.message,a.previous.forEach(function(e){c+="

            "+e.message+"

            ",c+="

            Stacktrace

            "+e.stacktrace+"

            "})):u=e.responseText,!u||"undefined"===u)return;var d='

            '+u+"

            "+c+"
            ";void 0===o&&(o=require("Ui/Dialog")),o.openStatic(i.getUniqueId(),d,{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,o=t.length;i=0,v.ie=!1,v.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,v.supported=v.chrome||v.ff||v.opera;var w=[];m=function(){},h=g=!1;var C=function(){r=i(y,e),r.bgColor=n(r.bgColor),r.textColor=n(r.textColor),r.position=r.position.toLowerCase(),r.animation=I.types[""+r.animation]?r.animation:y.animation;var t=r.position.indexOf("up")>-1,o=r.position.indexOf("left")>-1;if(t||o)for(var h=0;h0?d.height:32,l=d.width>0?d.width:32,c.height=s,c.width=l,u=c.getContext("2d"),L.ready()}):(d.setAttribute("src",""),s=32,l=32,d.height=s,d.width=l,c.height=s,c.width=l,u=c.getContext("2d"),L.ready())},L={};L.ready=function(){h=!0,L.reset(),m()},L.reset=function(){h&&(w=[],f=!1,p=!1,u.clearRect(0,0,l,s),u.drawImage(d,0,0,l,s),M.setIcon(c),window.clearTimeout(b),window.clearTimeout(_))},L.start=function(){if(h&&!p){var e=function(){f=w[0],p=!1,w.length>0&&(w.shift(),L.start())};if(w.length>0){p=!0;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in w[0].options&&(r[e]=w[0].options[e])}),I.run(w[0].options,function(){e()},!1)};f?I.run(f.options,function(){t()},!0):t()}}};var S={},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};S.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=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.85:1))+"px "+r.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("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",u.fill(),u.closePath(),u.beginPath(),u.stroke(),u.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.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()},S.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=r.fontStyle+" "+Math.floor(e.h*(e.n>99?.9:1))+"px "+r.fontFamily,u.textAlign="center",u.fillStyle="rgba("+r.bgColor.r+","+r.bgColor.g+","+r.bgColor.b+","+e.o+")",u.fillRect(e.x,e.y,e.w,e.h),u.fillStyle="rgba("+r.textColor.r+","+r.textColor.g+","+r.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 x=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&&I.types[""+t.animation]&&(i.options.animation=""+t.animation),"type"in t&&S[""+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])}),w.push(i),w.length>100)throw"Too many badges requests in queue.";L.start()}else L.reset()}catch(e){throw"Error setting badge. Message: "+e.message}},h&&m()},D=function(e){m=function(){try{var t=e.width,n=e.height,i=document.createElement("img"),o=t/l=0;n--)if(/(^|\s)icon(\s|$)/i.test(e[n].getAttribute("rel")))return e[n];return!1};return r.element?e=r.element:r.elementId?(e=document.getElementById(r.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(r.dataUrl&&r.dataUrl(t),r.element)r.element.setAttribute("src",t);else if(r.elementId)document.getElementById(r.elementId).setAttribute("src",t);else if(v.ff||v.opera){var n=a;a=document.createElement("link"),v.opera&&a.setAttribute("rel","icon"),a.setAttribute("rel","icon"),a.setAttribute("type","image/png"),document.getElementsByTagName("head")[0].appendChild(a),a.setAttribute("href",t),n.parentNode&&n.parentNode.removeChild(n)}else a.setAttribute("href",t)};var I={};return I.duration=40,I.types={},I.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}],I.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],I.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}],I.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}],I.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}],I.run=function(e,t,n,a){var s=I.types[o()?"none":r.animation];return a=n===!0?"undefined"!=typeof a?a:s.length-1:"undefined"!=typeof a?a:0,t=t?t:function(){},a=0?(S[r.type](i(e,s[a])),b=setTimeout(function(){n?a-=1:a+=1,I.run(e,t,n,a)},I.duration),M.setIcon(c),void 0):void t()},C(),{badge:x,video:T,image:D,webcam:k,reset:L.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 o(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(r)return r(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};t[a][0].call(u.exports,function(e){var n=t[a][1][e];return o(n?n:e)},u,u.exports,e,t,n,i)}return n[a].exports}for(var r="function"==typeof require&&require,a=0;a=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):o(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 o(e,t,n){return"number"==typeof n&&(n=n.toString()+"px"),e.style[t]=n,e}function r(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?r(e,t):"undefined"==typeof n?i(e,t):o(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)||(this.element.removeEventListener(e,i,!1),!1)},this)},i.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var o=function(){this.eventElements=[]};o.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},o.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},o.prototype.unbind=function(e,t,n){this.eventElement(e).unbind(t,n)},o.prototype.unbindAll=function(){for(var e=0;e1&&(c=1),e.scrollTop=(t.contentHeight-t.containerHeight)*c,a(e)}),t.event.bind(t.scrollbarX,"click",i), -t.event.bind(t.scrollbarXRail,"click",function(i){var r=o.toInt(t.scrollbarXWidth/2),s=i.pageX-n(t.scrollbarXRail).left-r;console.log(i.pageX,t.scrollbarXRail.offsetLeft);var l=t.containerWidth-t.scrollbarXWidth,c=s/l;c<0?c=0:c>1&&(c=1),e.scrollLeft=(t.contentWidth-t.containerWidth)*c,a(e)})}var o=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.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 o=i+n,r=t.containerWidth-t.scrollbarXWidth;o<0?t.scrollbarXLeft=0:o>r?t.scrollbarXLeft=r:t.scrollbarXLeft=o;var s=a.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.scrollbarXWidth));e.scrollLeft=s}var i=null,o=null,s=function(t){n(t.pageX-o),l(e),t.stopPropagation(),t.preventDefault()},c=function(){a.stopScrolling(e,"x"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarX,"mousedown",function(n){o=n.pageX,i=a.toInt(r.css(t.scrollbarX,"left")),a.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),n.stopPropagation(),n.preventDefault()})}function o(e,t){function n(n){var o=i+n,r=t.containerHeight-t.scrollbarYHeight;o<0?t.scrollbarYTop=0:o>r?t.scrollbarYTop=r:t.scrollbarYTop=o;var s=a.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.scrollbarYHeight));e.scrollTop=s}var i=null,o=null,s=function(t){n(t.pageY-o),l(e),t.stopPropagation(),t.preventDefault()},c=function(){a.stopScrolling(e,"y"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarY,"mousedown",function(n){o=n.pageY,i=a.toInt(r.css(t.scrollbarY,"top")),a.startScrolling(e,"y"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),n.stopPropagation(),n.preventDefault()})}var r=e("../../lib/dom"),a=e("../../lib/helper"),s=e("../instances"),l=e("../update-geometry");t.exports=function(e){var t=s.get(e);i(e,t),o(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 o=e.scrollTop;if(0===n){if(!t.scrollbarYActive)return!1;if(0===o&&i>0||o>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===r&&n<0||r>=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 r=!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(o.isEditable(l))return}var c=0,u=0;switch(s.which){case 37:c=-30;break;case 38:u=30;break;case 39:c=30;break;case 40:u=-30;break;case 33:u=90;break;case 32:case 34:u=-90;break;case 35:u=s.ctrlKey?-t.contentHeight:-t.containerHeight;break;case 36:u=s.ctrlKey?e.scrollTop:t.containerHeight;break;default:return}e.scrollTop=e.scrollTop-u,e.scrollLeft=e.scrollLeft+c,a(e),r=n(c,u),r&&s.preventDefault()}})}var o=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.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 o=e.scrollTop;if(0===n){if(!t.scrollbarYActive)return!1;if(0===o&&i>0||o>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var r=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===r&&n<0||r>=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 r(t,n){var i=e.querySelector("textarea:hover");if(i){var o=i.scrollHeight-i.clientHeight;if(o>0&&!(0===i.scrollTop&&n>0||i.scrollTop===o&&n<0))return!0;var r=i.scrollLeft-i.clientWidth;if(r>0&&!(0===i.scrollLeft&&t<0||i.scrollLeft===r&&t>0))return!0}return!1}function s(s){if(o.env.isWebKit||!e.querySelector("select:focus")){var c=i(s),u=c[0],d=c[1];r(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),a(e),l=l||n(u,d),l&&(s.stopPropagation(),s.preventDefault()))}}var l=!1;"undefined"!=typeof window.onwheel?t.event.bind(e,"wheel",s):"undefined"!=typeof window.onmousewheel&&t.event.bind(e,"mousewheel",s)}var o=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.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(){r(e)})}var o=e("../instances"),r=e("../update-geometry");t.exports=function(e){var t=o.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 r.get(e)?(e.scrollTop=e.scrollTop+c.top,e.scrollLeft=e.scrollLeft+c.left,void a(e)):void clearInterval(l)},50))}function s(){l&&(clearInterval(l),l=null),o.stopScrolling(e)}var l=null,c={top:0,left:0},u=!1;t.event.bind(t.ownerDocument,"selectionchange",function(){e.contains(n())?u=!0:(u=!1,s())}),t.event.bind(window,"mouseup",function(){u&&(u=!1,s())}),t.event.bind(window,"mousemove",function(t){if(u){var n={x:t.pageX,y:t.pageY},r={left:e.offsetLeft,right:e.offsetLeft+e.offsetWidth,top:e.offsetTop,bottom:e.offsetTop+e.offsetHeight};n.xr.right-3?(c.left=5,o.startScrolling(e,"x")):c.left=0,n.yr.bottom-3?(n.y-r.bottom+3<5?c.top=5:c.top=20,o.startScrolling(e,"y")):c.top=0,0===c.top&&0===c.left?s():i()}})}var o=e("../../lib/helper"),r=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=r.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 a(n,i){var o=e.scrollTop,r=e.scrollLeft,a=Math.abs(n),s=Math.abs(i);if(s>a){if(i<0&&o===t.contentHeight-t.containerHeight||i>0&&0===o)return!t.settings.swipePropagation}else if(a>s&&(n<0&&r===t.contentWidth-t.containerWidth||n>0&&0===r))return!t.settings.swipePropagation;return!0}function s(t,n){e.scrollTop=e.scrollTop-n,e.scrollLeft=e.scrollLeft-t,r(e)}function l(){_=!0}function c(){_=!1}function u(e){return e.targetTouches?e.targetTouches[0]:e}function d(e){return!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE)}function h(e){if(d(e)){y=!0;var t=u(e);m.pageX=t.pageX,m.pageY=t.pageY,g=(new Date).getTime(),null!==b&&clearInterval(b),e.stopPropagation()}}function f(e){if(!_&&y&&d(e)){var t=u(e),n={pageX:t.pageX,pageY:t.pageY},i=n.pageX-m.pageX,o=n.pageY-m.pageY;s(i,o),m=n;var r=(new Date).getTime(),l=r-g;l>0&&(v.x=i/l,v.y=o/l,g=r),a(i,o)&&(e.stopPropagation(),e.preventDefault())}}function p(){!_&&y&&(y=!1,clearInterval(b),b=setInterval(function(){return o.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,_=!1,y=!1;n&&(t.event.bind(window,"touchstart",l),t.event.bind(window,"touchend",c),t.event.bind(e,"touchstart",h),t.event.bind(e,"touchmove",f),t.event.bind(e,"touchend",p)),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",f),t.event.bind(e,"pointerup",p)):window.MSPointerEvent&&(t.event.bind(window,"MSPointerDown",l),t.event.bind(window,"MSPointerUp",c),t.event.bind(e,"MSPointerDown",h),t.event.bind(e,"MSPointerMove",f),t.event.bind(e,"MSPointerUp",p)))}var o=e("../instances"),r=e("../update-geometry");t.exports=function(e,t,n){var r=o.get(e);i(e,r,t,n)}},{"../instances":18,"../update-geometry":19}],17:[function(e,t,n){"use strict";var i=e("../lib/class"),o=e("../lib/helper"),r=e("./instances"),a=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"),f=e("./handler/touch");t.exports=function(e,t){t="object"==typeof t?t:{},i.add(e,"ps-container");var n=r.add(e);n.settings=o.extend(n.settings,t),s(e),l(e),u(e),d(e),h(e),(o.env.supportsTouch||o.env.supportsIePointer)&&f(e,o.env.supportsTouch,o.env.supportsIePointer),n.settings.useKeyboard&&c(e),a(e)}},{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(e,t,n){"use strict";function i(e){var t=this;t.settings=d.clone(l),t.containerWidth=null,t.containerHeight=null,t.contentWidth=null,t.contentHeight=null,t.isRtl="rtl"===s.css(e,"direction"),t.event=new c,t.ownerDocument=e.ownerDocument||document,t.scrollbarXRail=s.appendTo(s.e("div","ps-scrollbar-x-rail"),e),t.scrollbarX=s.appendTo(s.e("div","ps-scrollbar-x"),t.scrollbarXRail),t.scrollbarXActive=null,t.scrollbarXWidth=null,t.scrollbarXLeft=null,t.scrollbarXBottom=d.toInt(s.css(t.scrollbarXRail,"bottom")),t.isScrollbarXUsingBottom=t.scrollbarXBottom===t.scrollbarXBottom,t.scrollbarXTop=t.isScrollbarXUsingBottom?null:d.toInt(s.css(t.scrollbarXRail,"top")),t.railBorderXWidth=d.toInt(s.css(t.scrollbarXRail,"borderLeftWidth"))+d.toInt(s.css(t.scrollbarXRail,"borderRightWidth")),t.railXMarginWidth=d.toInt(s.css(t.scrollbarXRail,"marginLeft"))+d.toInt(s.css(t.scrollbarXRail,"marginRight")),t.railXWidth=null,t.scrollbarYRail=s.appendTo(s.e("div","ps-scrollbar-y-rail"),e),t.scrollbarY=s.appendTo(s.e("div","ps-scrollbar-y"),t.scrollbarYRail),t.scrollbarYActive=null,t.scrollbarYHeight=null,t.scrollbarYTop=null,t.scrollbarYRight=d.toInt(s.css(t.scrollbarYRail,"right")),t.isScrollbarYUsingRight=t.scrollbarYRight===t.scrollbarYRight,t.scrollbarYLeft=t.isScrollbarYUsingRight?null:d.toInt(s.css(t.scrollbarYRail,"left")),t.scrollbarYOuterWidth=t.isRtl?d.outerWidth(t.scrollbarY):null,t.railBorderYWidth=d.toInt(s.css(t.scrollbarYRail,"borderTopWidth"))+d.toInt(s.css(t.scrollbarYRail,"borderBottomWidth")),t.railYMarginHeight=d.toInt(s.css(t.scrollbarYRail,"marginTop"))+d.toInt(s.css(t.scrollbarYRail,"marginBottom")),t.railYHeight=null}function o(e){return"undefined"==typeof e.dataset?e.getAttribute("data-ps-id"):e.dataset.psId}function r(e,t){"undefined"==typeof e.dataset?e.setAttribute("data-ps-id",t):e.dataset.psId=t}function a(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 r(e,t),h[t]=new i(e),h[t]},n.remove=function(e){delete h[o(e)],a(e)},n.get=function(e){return h[o(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 o(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,a.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,a.css(t.scrollbarYRail,i),a.css(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),a.css(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}var r=e("../lib/class"),a=e("../lib/dom"),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)||a.appendTo(t.scrollbarXRail,e),e.contains(t.scrollbarYRail)||a.appendTo(t.scrollbarYRail,e),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),o(e,t),r[t.scrollbarXActive?"add":"remove"](e,"ps-active-x"),r[t.scrollbarYActive?"add":"remove"](e,"ps-active-y")}},{"../lib/class":2,"../lib/dom":3,"../lib/helper":6,"./instances":18}],20:[function(e,t,n){"use strict";var i=e("../lib/dom"),o=e("./instances"),r=e("./update-geometry");t.exports=function(e){var t=o.get(e);i.css(t.scrollbarXRail,"display","none"),i.css(t.scrollbarYRail,"display","none"),r(e),i.css(t.scrollbarXRail,"display","block"),i.css(t.scrollbarYRail,"display","block")}},{"../lib/dom":3,"./instances":18,"./update-geometry":19}]},{},[1]),define("WoltLabSuite/Core/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,o="";"c"===n&&(n="Y-m-dTH:i:sP");for(var r=0,a=n.length;r11?"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;case"\\":i="",r+1864e5)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("WoltLabSuite/Core/Date/Time/Relative",["Dom/ChangeListener","Language","WoltLabSuite/Core/Date/Util","WoltLabSuite/Core/Timer/Repeating"],function(e,t,n,i){"use strict";var o=elByTag("time"),r=null;return{setup:function(){this._refresh(),new i(this._refresh.bind(this),6e4),e.add("WoltLabSuite/Core/Date/Time/Relative",this._refresh.bind(this))},_refresh:function(){var e=new Date,i=(e.getTime()-e.getMilliseconds())/1e3;null===r&&(r=i-TIME_NOW);for(var a=0,s=o.length;a=i||i1)return void(u&&e.triggerEvent(document,"touchend"));if(!u&&(s||l)){if(document.documentElement.classList.contains("pageOverlayActive")){for(var d=!1,h=0;hi.x+100&&this.close(),"right"===u&&o>i.x-100&&this.close()),i=null,u=""}}.bind(this)),document.addEventListener("touchmove",function(e){if(u&&null!==i){var o=e.touches,s=!1,l=!1;"left"===u&&(s=o[0].clientX>i.x+r),"right"===u&&(s=o[0].clientXa;var c=this._menu.classList.contains("open");if(c||!s||l||(this.open(),c=!0),c){var d=o[0].clientX;"right"===t&&(d=document.body.clientWidth-d),d>this._menu.offsetWidth&&(d=this._menu.offsetWidth),d<0&&(d=0),this._menu.style.setProperty("transform","translateX("+("left"===t?1:-1)*(d-this._menu.offsetWidth)+"px)"),n.style.setProperty(t,Math.min(this._menu.offsetWidth,d)+"px")}}}.bind(this))},_initItems:function(){elBySelAll(".menuOverlayItemLink",this._menu,this._initItem.bind(this))},_initItem:function(e){var t=e.parentNode,i=elData(t,"more");if(i)return void e.addEventListener(WCF_CLICK_EVENT,function(o){o.preventDefault(),o.stopPropagation(),n.fire(this._eventIdentifier,"more",{handler:this,identifier:i,item:e,parent:t})}.bind(this));var o,a=e.nextElementSibling;if(null!==a)if("OL"!==a.nodeName&&a.classList.contains("menuOverlayItemLinkIcon"))for(o=elCreate("span"),o.className="menuOverlayItemWrapper",t.insertBefore(o,e),o.appendChild(e);o.nextElementSibling;)o.appendChild(o.nextElementSibling);else{var s="#"!==elAttr(e,"href"),l=t.parentNode,c=elData(a,"title");this._items.set(e,{itemList:a,parentItemList:l}),""===c&&(c=r.childByClass(e,"menuOverlayItemTitle").textContent,elData(a,"title",c));var u=this._showItemList.bind(this,e);if(s){o=elCreate("span"),o.className="menuOverlayItemWrapper",t.insertBefore(o,e),o.appendChild(e);var d=elCreate("a");elAttr(d,"href","#"),d.className="menuOverlayItemLinkIcon"+(e.classList.contains("active")?" active":""),d.innerHTML='',d.addEventListener(WCF_CLICK_EVENT,u),o.appendChild(d)}else e.classList.add("menuOverlayItemLinkMore"),e.addEventListener(WCF_CLICK_EVENT,u);var h=elCreate("li");h.className="menuOverlayHeader",o=elCreate("span"),o.className="menuOverlayItemWrapper";var f=elCreate("a");elAttr(f,"href","#"),f.className="menuOverlayItemLink menuOverlayBackLink",f.textContent=elData(l,"title"),f.addEventListener(WCF_CLICK_EVENT,this._hideItemList.bind(this,e));var p=elCreate("a");if(elAttr(p,"href","#"),p.className="menuOverlayItemLinkIcon",p.innerHTML='',p.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),o.appendChild(f),o.appendChild(p),h.appendChild(o),a.insertBefore(h,a.firstElementChild),!h.nextElementSibling.classList.contains("menuOverlayTitle")){var m=elCreate("li");m.className="menuOverlayTitle";var g=elCreate("span");g.textContent=c,m.appendChild(g),a.insertBefore(m,h.nextElementSibling)}}},_initHeader:function(){var e=elCreate("li");e.className="menuOverlayHeader";var t=elCreate("span");t.className="menuOverlayItemWrapper",e.appendChild(t);var n=elCreate("span");n.className="menuOverlayLogoWrapper",t.appendChild(n);var i=elCreate("span");i.className="menuOverlayLogo",i.style.setProperty("background-image",'url("'+elData(this._menu,"page-logo")+'")',""),n.appendChild(i);var o=elCreate("a");elAttr(o,"href","#"),o.className="menuOverlayItemLinkIcon",o.innerHTML='',o.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),t.appendChild(o);var a=r.childByClass(this._menu,"menuOverlayItemList");a.insertBefore(e,a.firstElementChild)},_hideItemList:function(e,t){t instanceof Event&&t.preventDefault(),this._menu.classList.remove("allowScroll"),this._removeActiveList=!0;var n=this._items.get(e);n.parentItemList.classList.remove("hidden"),this._updateDepth(!1)},_showItemList:function(e,t){t instanceof Event&&t.preventDefault();var i=this._items.get(e),o=elData(i.itemList,"load");if(o&&!elDataBool(e,"loaded")){var r=t.currentTarget.firstElementChild;return r.classList.contains("fa-angle-right")&&(r.classList.remove("fa-angle-right"),r.classList.add("fa-spinner")),void n.fire(this._eventIdentifier,"load_"+o)}this._menu.classList.remove("allowScroll"),i.itemList.classList.add("activeList"),i.parentItemList.classList.add("hidden"),this._activeList.push(i.itemList),this._updateDepth(!0)},_updateDepth:function(e){this._depth+=e?1:-1;var t=this._depth*-100;"rtl"===i.get("wcf.global.pageDirection")&&(t*=-1),this._menu.children[0].style.setProperty("transform","translateX("+t+"%)","")},_updateButtonState:function(){var e=!1;elBySelAll(".badgeUpdate",this._menu,function(t){~~t.textContent>0&&(e=!0)}),this._button.classList[e?"add":"remove"]("pageMenuMobileButtonHasContent")}},l}),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["Core","Dom/Traverse","./Abstract"],function(e,t,n){"use strict";function i(){this.init()}var o=null,r=null,a=null,s=null;return e.inherit(i,n,{init:function(){i._super.prototype.init.call(this,"com.woltlab.wcf.MainMenuMobile","pageMainMenuMobile","#pageHeader .mainMenu"),o=elById("pageMainMenuMobilePageOptionsContainer"),null!==o&&(a=t.childByClass(o,"menuOverlayItemList"),s=elBySel(".jsPageNavigationIcons"),elRemove(t.childByClass(a,"jsMenuOverlayItemPlaceholder")),a.addEventListener("click",function(e){e.target!==a&&null!==t.parentByClass(e.target,"menuOverlayItem",a)&&(this.close(),e.stopPropagation())}.bind(this)))},open:function(e){if(!i._super.prototype.open.call(this,e))return!1;if(null===o)return!0;if(r=s.childElementCount>0){for(var t,n;s.childElementCount;)t=s.children[0],t.classList.add("menuOverlayItem"),n=t.children[0],n.classList.add("menuOverlayItemLink"),n.classList.add("box24"),n.children[1].classList.remove("invisible"),n.children[1].classList.add("menuOverlayItemTitle"),a.appendChild(t);elShow(o)}else elHide(o);return!0},close:function(e){if(!i._super.prototype.close.call(this,e))return!1;if(r){elHide(o);for(var n,l,c=t.childByClass(a,"menuOverlayTitle");n=c.nextElementSibling;)n.classList.remove("menuOverlayItem"),l=n.children[0],l.classList.remove("menuOverlayItemLink"),l.classList.remove("box24"),l.children[1].classList.add("invisible"),l.children[1].classList.remove("menuOverlayItemTitle"),s.appendChild(n)}return!0}}),i}),define("WoltLabSuite/Core/Ui/Page/Menu/User",["Core","EventHandler","./Abstract"],function(e,t,n){"use strict";function i(){this.init()}return e.inherit(i,n,{init:function(){i._super.prototype.init.call(this,"com.woltlab.wcf.UserMenuMobile","pageUserMenuMobile","#pageHeader .userPanel"),t.add("com.woltlab.wcf.userMenu","updateBadge",function(e){elBySelAll(".menuOverlayItemBadge",this._menu,function(t){if(elData(t,"badge-identifier")===e.identifier){var n=elBySel(".badge",t);e.count?(null===n&&(n=elCreate("span"),n.className="badge badgeUpdate",t.appendChild(n)),n.textContent=e.count):null!==n&&elRemove(n),this._updateButtonState()}}.bind(this))}.bind(this))},close:function(e){var t=WCF.Dropdown.Interactive.Handler.getOpenDropdown();t?(e.preventDefault(),e.stopPropagation(),t.close()):i._super.prototype.close.call(this,e)}}),i}),define("WoltLabSuite/Core/Ui/Mobile",["Core","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Ui/CloseOverlay","Ui/Screen","./Page/Menu/Main","./Page/Menu/User"],function(e,t,n,i,o,r,a,s,l,c,u){"use strict";var d=elByClass("buttonGroupNavigation"),h=!1,f=new o,p=null,m=elByClass("message"),g={},v=null,b=null,_=null;return{setup:function(n){g=e.extend({enableMobileMenu:!0},n),p=elById("main"),t.touch()&&document.documentElement.classList.add("touch"),"desktop"!==t.platform()&&document.documentElement.classList.add("mobile");var i=elBySel(".messageGroupList");i&&(_=elByClass("messageGroup",i)),l.on("screen-md-down",{match:this.enable.bind(this),unmatch:this.disable.bind(this),setup:this._init.bind(this)}),l.on("screen-sm-down",{match:this.enableShadow.bind(this), -unmatch:this.disableShadow.bind(this),setup:this.enableShadow.bind(this)})},enable:function(){h=!0,g.enableMobileMenu&&(v.enable(),b.enable())},enableShadow:function(){_&&this.rebuildShadow(_,".messageGroupLink")},disable:function(){h=!1,g.enableMobileMenu&&(v.disable(),b.disable())},disableShadow:function(){_&&this.removeShadow(_)},_init:function(){h=!0,this._initSearchBar(),this._initButtonGroupNavigation(),this._initMessages(),this._initMobileMenu(),s.add("WoltLabSuite/Core/Ui/Mobile",this._closeAllMenus.bind(this)),r.add("WoltLabSuite/Core/Ui/Mobile",function(){this._initButtonGroupNavigation(),this._initMessages()}.bind(this))},_initSearchBar:function(){var e=elById("pageHeaderSearch"),i=elById("pageHeaderSearchInput"),o=null;n.add("com.woltlab.wcf.MainMenuMobile","more",function(n){"com.woltlab.wcf.search"===n.identifier&&(n.handler.close(!0),"ios"===t.platform()&&(o=document.body.scrollTop,l.scrollDisable()),e.style.setProperty("top",elById("pageHeader").offsetHeight+"px",""),e.classList.add("open"),i.focus(),"ios"===t.platform()&&(document.body.scrollTop=0))}),p.addEventListener(WCF_CLICK_EVENT,function(){e&&e.classList.remove("open"),"ios"===t.platform()&&null!==o&&(l.scrollEnable(),document.body.scrollTop=o,o=null)})},_initButtonGroupNavigation:function(){for(var e=0,t=d.length;e as children for li[data-name='"+r+"'] (tab menu id: '"+u+"').");this._tabs.set(r,c)}if(!this._tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+u+"').");return this._isLegacy&&(elData(this._container,"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(elData(t,"name"))===t||t.children[0].addEventListener(WCF_CLICK_EVENT,this._onClick.bind(this))}.bind(this));var t=null;if(!e){var n=o.getIdentifierFromHash(),i=null;if(""!==n&&(i=this._tabs.get(n),i&&this._container.parentNode.classList.contains("tabMenuContainer")&&(t=this._container)),!i){var r=elData(this._container,"preselect")||elData(this._container,"active");"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));var a=elData(this._container,"store");if(a){var s=elCreate("input");s.type="hidden",s.name=a,s.value=elData(this.getActiveTab(),"name"),this._container.appendChild(s),this._store=s}}return t},select:function(e,n,i){if(n=n||this._tabs.get(e),!n){if(~~e==e){e=~~e;var r=0;this._tabs.forEach(function(t){r===e&&(n=t),r++})}if(!n)throw new Error("Expected a valid tab name, '"+e+"' given (tab menu id: '"+this._container.id+"').")}e=e||elData(n,"name");var a=this.getActiveTab(),s=null;if(a){var l=elData(a,"name");if(l===e)return;i||t.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"beforeSelect",{tab:a,tabName:l}),a.classList.remove("active"),s=this._containers.get(elData(a,"name")),s.classList.remove("active"),s.classList.add("hidden"),this._isLegacy&&(a.classList.remove("ui-state-active"),s.classList.remove("ui-state-active"))}n.classList.add("active");var c=this._containers.get(e);if(c.classList.add("active"),c.classList.remove("hidden"),this._isLegacy&&(n.classList.add("ui-state-active"),c.classList.add("ui-state-active")),this._store&&(this._store.value=e),!i){t.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"select",{active:n,activeName:e,previous:a,previousName:a?elData(a,"name"):null});var u=this._isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;u&&u(this._container).trigger("wcftabsbeforeactivate",{newTab:u(n),oldTab:u(a),newPanel:u(c),oldPanel:u(s)});var d=window.location.href.replace(/#[^#]+$/,"");d+=o.getIdentifierFromHash()===e?window.location.hash:"#"+e,window.history.replaceState(void 0,void 0,d)}require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.scrollToTab(n)})},rebuild:function(){var t=new e;t.merge(this._tabs),this.validate(),this.init(t)},hasTab:function(e){return this._tabs.has(e)},_onClick:function(e){e.preventDefault(),this.select(null,e.currentTarget.parentNode)},_getTabName:function(e){var t=elData(e,"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,elData(e,"name",t))),t},getActiveTab:function(){return elBySel("#"+this._container.id+" > nav > ul > li.active")},getContainers:function(){return this._containers},getTabs:function(){return this._tabs}},o.getIdentifierFromHash=function(){return window.location.hash.match(/^#([^\/]+)+(?:\/.+)?/)?RegExp.$1:""},o}),define("WoltLabSuite/Core/Ui/TabMenu",["Dictionary","EventHandler","Dom/ChangeListener","Dom/Util","Ui/CloseOverlay","Ui/Screen","./TabMenu/Simple"],function(e,t,n,i,o,r,a){"use strict";var s=null,l=!1,c=new e;return{setup:function(){this._init(),this._selectErroneousTabs(),n.add("WoltLabSuite/Core/Ui/TabMenu",this._init.bind(this)),o.add("WoltLabSuite/Core/Ui/TabMenu",function(){s&&(s.classList.remove("active"),s=null)}),r.on("screen-sm-down",{enable:this._scrollEnable.bind(this,!1),disable:this._scrollDisable.bind(this),setup:this._scrollEnable.bind(this,!0)}),window.addEventListener("hashchange",function(){var e=a.getIdentifierFromHash(),t=e?elById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&c.forEach(function(t){t.hasTab(e)&&t.select(e)})});var e=a.getIdentifierFromHash();e&&window.setTimeout(function(){var t=elById(e);if(t&&t.classList.contains("tabMenuContent")){var n=window.scrollY||window.pageYOffset;if(n>0){var o=t.parentNode,r=o.offsetTop-50;if(r<0&&(r=0),n>r){var a=i.offset(o).top;a<=50?a=0:a-=50,window.scrollTo(0,a)}}}},100)},_init:function(){for(var e,t,n,o,r,l=elBySelAll(".tabMenuContainer:not(.staticTabMenuContainer)"),u=0,d=l.length;u nav > ul"),function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),t.target===e?(e.classList.add("active"),s=e):(e.classList.remove("active"),s=null)})}(n),elBySelAll(".tabMenu, .menu",e,function(e){var t=this._rebuildMenuOverflow.bind(this,e),n=null;elBySel("ul",e).addEventListener("scroll",function(){null!==n&&window.clearTimeout(n),n=window.setTimeout(t,10)})}.bind(this))))},_selectErroneousTabs:function(){c.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 c.get(e)},_scrollEnable:function(e){l=!0,c.forEach(function(t){var n=t.getActiveTab();e?this._rebuildMenuOverflow(n.closest(".menu, .tabMenu")):this.scrollToTab(n)}.bind(this))},_scrollDisable:function(){l=!1},scrollToTab:function(e){if(l){var t=e.closest("ul"),n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;if(n!==o){var r=e.offsetLeft,a=!1;r0&&(r-=15),r=r<0?0:Math.min(r,o-n),i===r)return;t.classList.add("enableAnimation"),i0,a=elBySel(".tabMenuOverlayLeft",e);r?(null===a&&(a=elCreate("span"),a.className="tabMenuOverlayLeft icon icon24 fa-angle-left",e.insertBefore(a,e.firstChild)),a.classList.add("active")):null!==a&&a.classList.remove("active");var s=t+i element as child of container '"+e+"'.";a.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;td)for(var g=f.length-1;g>=0;g--){var b=f[g];if(!(b.classList.contains("dropdown")||b.classList.contains("active")||b.classList.contains("ui-state-active"))&&(y.push(b),elHide(b),h.scrollWidth0?"-":"+";m=Math.abs(m);var v=Math.floor(m/60).toString(),b=(m%60).toString();g+=2===v.length?v:"0"+v,g+=":",g+=2===b.length?b:"0"+b,d?f+="T00:00:00"+g:f=f.replace(/[+-][0-9]{2}:[0-9]{2}$/,g)}h=new Date(f)}elData(r,"value",h.getTime());var _=s?"formatTime":"formatDate"+(a?"Time":"");f=e[_](h)}var y=0===f.length;if(d?(elData(r,"min-date","120"),elData(r,"max-date",(new Date).getFullYear()+"-12-31")):(r.min&&elData(r,"min-date",r.min),r.max&&elData(r,"max-date",r.max)),this._initDateRange(r,n,!0),this._initDateRange(r,n,!1),elData(r,"min-date")===elData(r,"max-date"))throw new Error("Minimum and maximum date cannot be the same (element id '"+r.id+"').");r.type="text",r.value=f,elData(r,"empty",y),elData(r,"placeholder")&&elAttr(r,"placeholder",elData(r,"placeholder"));var w=elCreate("input");w.id=r.id+"DatePicker",w.name=r.name,w.type="hidden",null!==h&&(s?w.value=e.format(h,"H:i"):u?w.value=e.format(h,"Y-m-dTH:i:s"):w.value=e.format(h,a?"c":"Y-m-d")),r.parentNode.insertBefore(w,r),r.removeAttribute("name"),r.addEventListener(WCF_CLICK_EVENT,C);var L=elCreate("div");L.className="inputAddon";var S=elCreate("a");S.className="inputSuffix button",S.addEventListener(WCF_CLICK_EVENT,C),L.appendChild(S);var E=elCreate("span");E.className="icon icon16 fa-calendar",S.appendChild(E),r.parentNode.insertBefore(L,r),L.insertBefore(r,S),c||(S=elCreate("a"),S.className="inputSuffix button",S.addEventListener(WCF_CLICK_EVENT,this.clear.bind(this,r)),y&&S.style.setProperty("visibility","hidden",""),L.appendChild(S),E=elCreate("span"),E.className="icon icon16 fa-times",S.appendChild(E));for(var x=!1,D=["tiny","short","medium","long"],T=0;T<4;T++)r.classList.contains(D[T])&&(x=!0);x||r.classList.add("short"),l.set(r,{clearButton:S,shadow:w,disableClear:c,isDateTime:a,isEmpty:y,isTimeOnly:s,ignoreTimezone:u,onClose:null})}},_initDateRange:function(e,t,n){var i="data-"+(n?"min":"max")+"-date",o=e.hasAttribute(i)?elAttr(e,i).trim():"";if(o.match(/^(\d{4})-(\d{2})-(\d{2})$/))o=new Date(o).getTime();else if("now"===o)o=t.getTime();else if(o.match(/^\d{1,3}$/)){var r=new Date(t.getTime());r.setFullYear(r.getFullYear()+~~o*(n?-1:1)),o=r.getTime()}else if(o.match(/^datePicker-(.+)$/)){if(o=RegExp.$1,null===elById(o))throw new Error("Reference date picker identified by '"+o+"' does not exists (element id: '"+e.id+"').")}else o=/^\d{4}\-\d{2}\-\d{2}T/.test(o)?new Date(o).getTime():new Date(n?1970:2038,0,1).getTime();elAttr(e,i,o)},_setup:function(){a||(a=!0,s=~~t.get("wcf.date.firstDayOfTheWeek"),C=this._open.bind(this),i.add("WoltLabSuite/Core/Date/Picker",this.init.bind(this)),r.add("WoltLabSuite/Core/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),r=elData(c,"value");r?(n=new Date(+r),"Invalid Date"===n.toString()&&(n=new Date)):n=new Date,d=elData(c,"min-date"),d.match(/^datePicker-(.+)$/)&&(d=elData(elById(RegExp.$1),"value")),d=new Date(+d),u=elData(c,"max-date"),u.match(/^datePicker-(.+)$/)&&(u=elData(elById(RegExp.$1),"value")),u=new Date(+u),i.isDateTime?(p.value=n.getHours(),m.value=n.getMinutes(),w.classList.add("datePickerTime")):w.classList.remove("datePickerTime"),w.classList[i.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),this._renderPicker(n.getDate(),n.getMonth(),n.getFullYear()),o.set(w,c)}},_close:function(){if(null!==w&&w.classList.contains("active")){w.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="",o=d.getFullYear(),r=u.getFullYear();o<=r;o++)i+='";y.innerHTML=i,y.value=n,g.value=t,w.classList.add("active")},_renderGrid:function(e,t,n){var i,o,r=void 0!==e,a=void 0!==t;if(e=~~e||~~elData(f,"day"),t=~~t,n=~~n,a||n){var l=0!==n,c=document.createDocumentFragment();c.appendChild(f),a||(t=~~elData(f,"month")),n=n||~~elData(f,"year");var p=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(pu&&(n=u.getFullYear(),t=u.getMonth(),e=u.getDate(),g.value=t,y.value=n,l=!0),p=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-01");p.getDay()!==s;)p.setDate(p.getDate()-1);elShow(h[35].parentNode);var m,C=new Date(d.getFullYear(),d.getMonth(),d.getDate());for(o=0;o<42;o++){if(35===o&&p.getMonth()!==t){elHide(h[35].parentNode);break}i=h[o],i.textContent=p.getDate(),m=p.getMonth()===t,m&&(pu&&(m=!1)),i.classList[m?"remove":"add"]("otherMonth"),p.setDate(p.getDate()+1)}if(elData(f,"month",t),elData(f,"year",n),w.insertBefore(c,_),!r&&(p=new Date(n,t,e),p.getDate()!==e)){for(;p.getMonth()!==t;)p.setDate(p.getDate()-1);e=p.getDate()}if(l){for(o=0;o<12;o++){var L=g.children[o];L.disabled=n===d.getFullYear()&&L.valueu.getMonth()}var S=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-01");S.setMonth(S.getMonth()+1),v.classList[Sd?"add":"remove"]("active")}}if(e){for(o=0;o<35;o++)i=h[o],i.classList[i.classList.contains("otherMonth")||~~i.textContent!==e?"remove":"add"]("active");elData(f,"day",e)}this._formatValue()},_formatValue:function(){var t,n,i,o=l.get(c);"true"!==elData(c,"empty")&&(o.isDateTime?(t=new Date(elData(f,"year"),elData(f,"month"),elData(f,"day"),p.value,m.value),o.isTimeOnly?(n=e.formatTime(t),i=e.format(t,"H:i")):o.ignoreTimezone?(n=e.formatDateTime(t),i=e.format(t,"Y-m-dTH:i:s")):(n=e.formatDateTime(t),i=e.format(t,"c"))):(t=new Date(elData(f,"year"),elData(f,"month"),elData(f,"day")),n=e.formatDate(t),i=e.format(t,"Y-m-d")),c.value=n,elData(c,"value",t.getTime()),o.disableClear||o.clearButton.style.removeProperty("visibility"),o.shadow.value=i)},_createPicker:function(){if(null===w){w=elCreate("div"),w.className="datePicker",w.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()});var n=elCreate("header");w.appendChild(n),b=elCreate("a"),b.className="previous",b.innerHTML='',b.addEventListener(WCF_CLICK_EVENT,this.previousMonth.bind(this)),n.appendChild(b);var i=elCreate("span");n.appendChild(i),g=elCreate("select"),g.className="month",g.addEventListener("change",this._changeMonth.bind(this)),i.appendChild(g);var o,r="",a=t.get("__monthsShort");for(o=0;o<12;o++)r+='";g.innerHTML=r,y=elCreate("select"),y.className="year",y.addEventListener("change",this._changeYear.bind(this)),i.appendChild(y),v=elCreate("a"),v.className="next",v.innerHTML='',v.addEventListener(WCF_CLICK_EVENT,this.nextMonth.bind(this)),n.appendChild(v),f=elCreate("ul"),w.appendChild(f);var l=elCreate("li");l.className="weekdays",f.appendChild(l);var c,u=t.get("__daysShort");for(o=0;o<7;o++){var d=o+s;d>6&&(d-=7),c=elCreate("span"),c.textContent=u[d],l.appendChild(c)}var C,L,S=this._click.bind(this);for(o=0;o<6;o++){L=elCreate("li"),f.appendChild(L);for(var E=0;E<7;E++)C=elCreate("a"),C.addEventListener(WCF_CLICK_EVENT,S),h.push(C),L.appendChild(C)}_=elCreate("footer"),w.appendChild(_),p=elCreate("select"),p.className="hour",p.addEventListener("change",this._formatValue.bind(this));var x="",D=new Date(2e3,0,1),T=t.get("wcf.date.timeFormat").replace(/:/,"").replace(/[isu]/g,"");for(o=0;o<24;o++)D.setHours(o),x+='";for(p.innerHTML=x,_.appendChild(p),_.appendChild(document.createTextNode(" : ")),m=elCreate("select"),m.className="minute",m.addEventListener("change",this._formatValue.bind(this)),x="",o=0;o<60;o++)x+='";m.innerHTML=x,_.appendChild(m),document.body.appendChild(w)}},previousMonth:function(){"0"===g.value?(g.value=11,y.value=~~y.value-1):g.value=~~g.value-1,this._renderGrid(void 0,g.value,y.value)},nextMonth:function(){"11"===g.value?(g.value=0,y.value=~~y.value+1):g.value=~~g.value+1,this._renderGrid(void 0,g.value,y.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")||(elData(c,"empty",!1),this._renderGrid(e.currentTarget.textContent),this._close())},getDate:function(e){return e=this._getElement(e),e.hasAttribute("data-value")?new Date(+elData(e,"value")):null},setDate:function(t,n){t=this._getElement(t);var i=l.get(t);elData(t,"value",n.getTime()),t.value=e["formatDate"+(i.isDateTime?"Time":"")](n);var o="";o=i.ignoreTimezone?"Y-m-dTH:i:s":i.isDateTime?"c":"Y-m-d",i.shadow.value=e.format(n,o)},getValue:function(e){e=this._getElement(e);var t=l.get(e);return t?t.shadow.value:""},clear:function(e){e=this._getElement(e);var t=l.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||t.clearButton.style.setProperty("visibility","hidden",""),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),elRemove(n),elAttr(e,"type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener(WCF_CLICK_EVENT,C),elRemove(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=L,L}),define("WoltLabSuite/Core/Ui/Page/Action",["Dictionary","Dom/Util"],function(e,t){"use strict";var n=new e,i=null,o=!1;return{setup:function(){o=!0,i=elCreate("ul"),i.className="pageAction",document.body.appendChild(i)},add:function(e,r,a){o===!1&&this.setup();var s=elCreate("li");if(r.classList.add("button"),r.classList.add("buttonPrimary"),s.appendChild(r),elAttr(s,"aria-hidden","toTop"===e?"true":"false"),elData(s,"name",e),"toTop"===e)s.className="toTop initiallyHidden",i.appendChild(s);else{var l=null;a&&(l=n.get(a),void 0!==l&&(l=l.parentNode)),null===l&&i.childElementCount&&(l=i.children[0]),null===l?t.prepend(s,i):i.insertBefore(s,l)}n.set(e,r),this._renderContainer()},has:function(e){return n.has(e)},get:function(e){return n.get(e)},remove:function(e){var t=n.get(e);if(void 0!==t){var o=t.parentNode;o.addEventListener("animationend",function(){try{i.removeChild(o),n.delete(e)}catch(e){}}),this.hide(e)}},hide:function(e){var t=n.get(e);t&&(elAttr(t.parentNode,"aria-hidden","true"),this._renderContainer())},show:function(e){var t=n.get(e);t&&(t.parentNode.classList.contains("initiallyHidden")&&t.parentNode.classList.remove("initiallyHidden"),elAttr(t.parentNode,"aria-hidden","false"),this._renderContainer())},_renderContainer:function(){var e=!1;if(i.childElementCount)for(var t=0,n=i.childElementCount;t',i.addEventListener(WCF_CLICK_EVENT,this._jump.bind(this)),n.add("toTop",i),window.addEventListener("scroll",this._scroll.bind(this)),this._afterScroll()}},_jump:function(e){e.preventDefault(),elById("top").scrollIntoView({behavior:"smooth"})},_scroll:function(){null!==this._timeoutScroll&&window.clearTimeout(this._timeoutScroll),this._timeoutScroll=window.setTimeout(this._callbackScrollEnd,100)},_afterScroll:function(){this._timeoutScroll=null,n[window.pageYOffset>=300?"show":"hide"]("toTop")}},i}),define("WoltLabSuite/Core/Bootstrap",["favico","enquire","perfect-scrollbar","WoltLabSuite/Core/Date/Time/Relative","Ui/SimpleDropdown","WoltLabSuite/Core/Ui/Mobile","WoltLabSuite/Core/Ui/TabMenu","WoltLabSuite/Core/Ui/FlexibleMenu","Ui/Dialog","WoltLabSuite/Core/Ui/Tooltip","WoltLabSuite/Core/Language","WoltLabSuite/Core/Environment","WoltLabSuite/Core/Date/Picker","EventHandler","Core","WoltLabSuite/Core/Ui/Page/JumpToTop"],function(e,t,n,i,o,r,a,s,l,c,u,d,h,f,p,m){"use strict";return 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,window.__wcf_bc_eventHandler=f,{setup:function(e){e=p.extend({enableMobileMenu:!0},e),d.setup(),i.setup(),h.init(),o.setup(),r.setup({enableMobileMenu:e.enableMobileMenu}),a.setup(),l.setup(),c.setup(),new m;for(var t=elBySelAll("form[method=get]"),n=0,s=t.length;n li",e),n=0,i=t.length;n"+n+"

            ")),r.content=c,r.state=C,a){var u=l.get(a).element;elData(u,"cache-id")===i&&this._show()}},_mouseEnter:function(e){if(!d){null!==h&&(window.clearTimeout(h),h=null);var t=o.identify(e.currentTarget);a===t&&null!==f&&(window.clearTimeout(f),f=null),u=t,h=window.setTimeout(function(){h=null,u===t&&this._show()}.bind(this),S)}},_mouseLeave:function(){u=null,null===f&&(null===v&&(v=this._hide.bind(this)),null!==f&&window.clearTimeout(f),f=window.setTimeout(v,L))},_popoverMouseEnter:function(){null!==f&&(window.clearTimeout(f),f=null)},_show:function(){null!==f&&(window.clearTimeout(f),f=null);var e=!1;p.classList.contains("active")?a!==u&&(this._hide(),e=!0):m.childElementCount&&(e=!0),e&&(p.classList.add("forceHide"),p.offsetTop,this._clearContent(),p.classList.remove("forceHide")),a=u;var t=l.get(a),n=s.get(elData(t.element,"cache-id"));n.state===C?(m.appendChild(n.content),this._rebuild(a)):n.state===y&&(n.state=w,c.get(t.identifier).loadCallback(t.objectId,this))},_hide:function(){null!==f&&(window.clearTimeout(f),f=null),p.classList.remove("active")},_clearContent:function(){if(a&&m.childElementCount&&!p.classList.contains("active"))for(var e=s.get(elData(l.get(a).element,"cache-id"));m.childNodes.length;)e.content.appendChild(m.childNodes[0])},_rebuild:function(){p.classList.contains("active")||(p.classList.remove("forceHide"),p.classList.add("active"),r.set(p,l.get(a).element,{pointer:!0,vertical:"top"}))},_ajaxSetup:function(){return{silent:!0}},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)}}}),define("WoltLabSuite/Core/Ui/User/Ignore",["List","Dom/ChangeListener"],function(e,t){"use strict";var n=function(){};return n.prototype={init:function(){},_rebuild:function(){},_removeClass:function(){}},n}),define("WoltLabSuite/Core/Ui/Page/Header/Menu",["Ui/Screen"],function(e){"use strict";var t,n,i,o,r=!1,a=0,s=[],l=[];return{init:function(){if(o=elBySel(".mainMenu .boxMenu"),i=o&&o.childElementCount?o.children[0]:null,null===i)throw new Error("Unable to find the menu.");e.on("screen-lg",{enable:this._enable.bind(this),disable:this._disable.bind(this),setup:this._setup.bind(this)})},_enable:function(){r=!0,this._rebuildVisibility(),window.setTimeout(this._rebuildVisibility.bind(this),1e3)},_disable:function(){r=!1},_showNext:function(e){if(e.preventDefault(),l.length){var i=l.slice(0,3).pop();this._setMarginLeft(o.clientWidth-(i.offsetLeft+i.clientWidth)),o.lastElementChild===i&&t.classList.remove("active"),n.classList.add("active")}},_showPrevious:function(e){if(e.preventDefault(),s.length){var i=s.slice(-3)[0];this._setMarginLeft(i.offsetLeft*-1),o.firstElementChild===i&&n.classList.remove("active"),t.classList.add("active")}},_setMarginLeft:function(e){a=Math.min(a+e,0),i.style.setProperty("margin-left",a+"px","")},_rebuildVisibility:function(){if(r){s=[],l=[];var e=o.clientWidth;if(o.scrollWidth>e||a<0)for(var i,c=0,u=o.childElementCount;ce&&l.push(i)}n.classList[s.length?"add":"remove"]("active"),t.classList[l.length?"add":"remove"]("active")}},_setup:function(){t=elCreate("a"),t.className="mainMenuShowNext",t.href="#",t.innerHTML='',t.addEventListener(WCF_CLICK_EVENT,this._showNext.bind(this)),o.parentNode.appendChild(t),n=elCreate("a"),n.className="mainMenuShowPrevious",n.href="#",n.innerHTML='',n.addEventListener(WCF_CLICK_EVENT,this._showPrevious.bind(this)),o.parentNode.insertBefore(n,o.parentNode.firstChild);var e=this._rebuildVisibility.bind(this);i.addEventListener("transitionend",e),window.addEventListener("resize",function(){i.style.setProperty("margin-left","0px",""),a=0,e()}),this._enable()}}}),define("WoltLabSuite/Core/BootstrapFrontend",["Ajax","WoltLabSuite/Core/Bootstrap","WoltLabSuite/Core/Controller/Style/Changer","WoltLabSuite/Core/Controller/Popover","WoltLabSuite/Core/Ui/User/Ignore","WoltLabSuite/Core/Ui/Page/Header/Menu"],function(e,t,n,i,o,r){"use strict";var a=0;return{setup:function(e){e.backgroundQueue.url=WSC_API_URL+e.backgroundQueue.url.substr(WCF_PATH.length),t.setup(),r.init(),e.styleChanger&&n.setup(),e.enableUserPopover&&this._initUserPopover(),this._invokeBackgroundQueue(e.backgroundQueue.url,e.backgroundQueue.force)},_initUserPopover:function(){i.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&&a<5&&setTimeout(i,1e3)}.bind(this)})}}}),define("WoltLabSuite/Core/ColorUtil",[],function(){"use strict";var e={hsvToRgb:function(e,t,n){var i,o,r,a,s,l={r:0,g:0,b:0};if(i=Math.floor(e/60),o=e/60-i,t/=100,n/=100,r=n*(1-t),a=n*(1-t*o),s=n*(1-t*(1-o)),0==t)l.r=l.g=l.b=n;else switch(i){case 1:l.r=a,l.g=n,l.b=r;break;case 2:l.r=r,l.g=n,l.b=s;break;case 3:l.r=r,l.g=a,l.b=n;break;case 4:l.r=s,l.g=r,l.b=n;break;case 5:l.r=n,l.g=r,l.b=a;break;case 0:case 6:l.r=n,l.g=s,l.b=r}return{r:Math.round(255*l.r),g:Math.round(255*l.g),b:Math.round(255*l.b)}},rgbToHsv:function(e,t,n){var i,o,r,a,s,l;if(e/=255,t/=255,n/=255,a=Math.max(Math.max(e,t),n),s=Math.min(Math.min(e,t),n),l=a-s,i=0,a!==s){switch(a){case e:i=60*((t-n)/l);break;case t:i=60*(2+(n-e)/l);break;case n:i=60*(4+(e-t)/l)}i<0&&(i+=360)}return o=0===a?0:l/a,r=a,{h:Math.round(i),s:Math.round(100*o),v:Math.round(100*r)}},hexToRgb:function(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){var t=e.split("");return"#"===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)}}return Number.NaN},rgbToHex:function(e,t,n){var i="0123456789ABCDEF";return void 0===t&&e.toString().match(/^rgba?\((\d+), ?(\d+), ?(d\+)(?:, ?[0-9.]+)?\)$/)&&(e=RegExp.$1,t=RegExp.$2,n=RegExp.$3),i.charAt((e-e%16)/16)+""+i.charAt(e%16)+(i.charAt((t-t%16)/16)+""+i.charAt(t%16))+(i.charAt((n-n%16)/16)+""+i.charAt(n%16))}};return window.__wcf_bc_colorUtil=e,e}),define("WoltLabSuite/Core/Permission",["Dictionary"],function(e){"use strict";var t=new e;return{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)objOwns(e,t)&&this.add(t,e[t])},get:function(e){return!!t.has(e)&&t.get(e)}}}),define("WoltLabSuite/Core/Upload",["AjaxRequest","Core","Dom/ChangeListener","Language","Dom/Util","Dom/Traverse"],function(e,t,n,i,o,r){"use strict";var a=function(){};return a.prototype={_createButton:function(){},_createFileElement:function(){},_createFileElements:function(){},_failure:function(){},_getParameters:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){},_success:function(){},_upload:function(){},_uploadFiles:function(){}},a}),define("WoltLabSuite/Core/User",[],function(){"use strict";var e=!1;return{init:function(t,n){if(e)throw new Error("User has already been initialized.");Object.defineProperty(this,"userId",{value:t,writable:!1}),Object.defineProperty(this,"username",{value:n,writable:!1}),e=!0}}}),define("WoltLabSuite/Core/Ajax/Jsonp",["Core"],function(e){"use strict";return{send:function(t,n,i,o){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'.");o=e.extend({parameterName:"callback",timeout:10},o||{});var r,a="wcf_jsonp_"+e.getUuid().replace(/-/g,"").substr(0,8),s=window.setTimeout(function(){"function"==typeof i&&i(),window[a]=void 0,elRemove(r)},1e3*(~~o.timeout||10));window[a]=function(){window.clearTimeout(s),n.apply(null,arguments),window[a]=void 0,elRemove(r)},t+=t.indexOf("?")===-1?"?":"&",t+=o.parameterName+"="+a,r=elCreate("script"),r.async=!0,elAttr(r,"src",t),document.head.appendChild(r)}}}),define("WoltLabSuite/Core/Bbcode/Collapsible",[],function(){"use strict";var e=elByClass("jsCollapsibleBbcode");return{observe:function(){for(var t,n;e.length;)t=e[0],n=null,elBySelAll(".toggleButton:not(.jsToggleButtonEnabled)",t,function(e){e.closest(".jsCollapsibleBbcode")===t&&(n=e)}),n&&!function(e,t){var n=function(n){if(e.classList.toggle("collapsed")){if(t.textContent=elData(t,"title-expand"),n instanceof Event){var i=e.getBoundingClientRect().top;if(i<0){var o=window.pageYOffset+(i-100);o<0&&(o=0),window.scrollTo(window.pageXOffset,o)}}}else t.textContent=elData(t,"title-collapse")};t.classList.add("jsToggleButtonEnabled"),t.addEventListener(WCF_CLICK_EVENT,n),0!==e.scrollTop&&n()}(t,n),t.classList.remove("jsCollapsibleBbcode")}}}),define("WoltLabSuite/Core/Controller/Captcha",["Dictionary"],function(e){"use strict";var t=new e;return{add:function(e,n){if(t.has(e))throw new Error("Captcha with id '"+e+"' is already registered.");if("function"!=typeof n)throw new TypeError("Expected a valid callback for parameter 'callback'.");t.set(e,n)},delete:function(e){if(!t.has(e))throw new Error("Unknown captcha with id '"+e+"'.");t.delete(e)()},has:function(e){return t.has(e)},getData:function(e){if(!t.has(e))throw new Error("Unknown captcha with id '"+e+"'.");return t.get(e)()}}}),define("WoltLabSuite/Core/Controller/Clipboard",["Ajax","Core","Dictionary","EventHandler","Language","List","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/SimpleDropdown","WoltLabSuite/Core/Ui/Page/Action"],function(e,t,n,i,o,r,a,s,l,c,u,d,h){"use strict";var f=function(){};return f.prototype={setup:function(){},reload:function(){},_initContainers:function(){},_loadMarkedItems:function(){},_markAll:function(){},_mark:function(){},_saveState:function(){},_executeAction:function(){},_executeProxyAction:function(){},_unmarkAll:function(){},_ajaxSetup:function(){},_ajaxSuccess:function(){},_rebuildMarkings:function(){},hideEditor:function(){},showEditor:function(){},unmark:function(){}},f}),define("WoltLabSuite/Core/Event/Key",[],function(){"use strict";function e(e,t,n){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===n}return{ArrowDown:function(t){return e(t,"ArrowDown",40)},ArrowLeft:function(t){return e(t,"ArrowLeft",37)},ArrowRight:function(t){return e(t,"ArrowRight",39)},ArrowUp:function(t){return e(t,"ArrowUp",38)},Comma:function(t){return e(t,",",44)},Enter:function(t){return e(t,"Enter",13)},Escape:function(t){return e(t,"Escape",27)},Tab:function(t){return e(t,"Tab",9)}}}),define("WoltLabSuite/Core/Language/Chooser",["Dictionary","Language","Dom/Traverse","Dom/Util","ObjectMap","Ui/SimpleDropdown"],function(e,t,n,i,o,r){"use strict";var a=new e,s=!1,l=new o,c=null;return{init:function(e,t,n,i,o,r){if(!a.has(t)){var s=elById(e);if(null===s)throw new Error("Expected a valid container id, cannot find '"+t+"'.");var l=elById(t);null===l&&(l=elCreate("input"),elAttr(l,"type","hidden"),elAttr(l,"id",t),elAttr(l,"name",t),elAttr(l,"value",n),s.appendChild(l)),this._initElement(t,l,n,i,o,r)}},_setup:function(){s||(s=!0,c=this._submit.bind(this))},_initElement:function(e,i,o,s,u,d){var h;"DD"===i.parentNode.nodeName?(h=elCreate("div"),h.className="dropdown",i.parentNode.insertBefore(h,i)):(h=i.parentNode,h.classList.add("dropdown")),elHide(i);var f=elCreate("a");f.className="dropdownToggle dropdownIndicator boxFlag box24 inputPrefix"+("DD"===i.parentNode.nodeName?" button":""),h.appendChild(f);var p=elCreate("ul");p.className="dropdownMenu",h.appendChild(p);var m,g,v,b,_=function(t){var i=~~elData(t.currentTarget,"language-id"),o=n.childByClass(p,"active");null!==o&&o.classList.remove("active"),i&&t.currentTarget.classList.add("active"),this._select(e,i,t.currentTarget)}.bind(this);for(var y in s)if(s.hasOwnProperty(y)){var w=s[y];v=elCreate("li"),v.className="boxFlag",v.addEventListener(WCF_CLICK_EVENT,_),elData(v,"language-id",y),void 0!==w.languageCode&&elData(v,"language-code",w.languageCode),p.appendChild(v),m=elCreate("a"),m.className="box24",v.appendChild(m),g=elCreate("img"),elAttr(g,"src",w.iconPath),elAttr(g,"alt",""),g.className="iconFlag",m.appendChild(g),b=elCreate("span"),b.textContent=w.languageName,m.appendChild(b),y==o&&(f.innerHTML=v.firstChild.innerHTML)}if(d)v=elCreate("li"),v.className="dropdownDivider",p.appendChild(v),v=elCreate("li"),elData(v,"language-id",0),v.addEventListener(WCF_CLICK_EVENT,_),p.appendChild(v),m=elCreate("a"),m.textContent=t.get("wcf.global.language.noSelection"),v.appendChild(m),0===o&&(f.innerHTML=v.firstChild.innerHTML),v.addEventListener(WCF_CLICK_EVENT,_);else if(0===o){f.innerHTML=null;var C=elCreate("div");f.appendChild(C),b=elCreate("span"),b.className="icon icon24 fa-question",C.appendChild(b),b=elCreate("span"),b.textContent=t.get("wcf.global.language.noSelection"),C.appendChild(b)}r.init(f),a.set(e,{callback:u,dropdownMenu:p,dropdownToggle:f,element:i});var L=n.parentByTag(i,"FORM");if(null!==L){L.addEventListener("submit",c);var S=l.get(L);void 0===S&&(S=[],l.set(L,S)),S.push(e)}},_select:function(e,t,n){var i=a.get(e);if(void 0===n){for(var o=i.dropdownMenu.childNodes,r=0,s=o.length;r for id \''+e+"'.");t.init(e,n,i,o),t.registerCallback(e,"select",this._callbackSelect.bind(this)),t.registerCallback(e,"submit",this._callbackSubmit.bind(this))},_callbackSelect:function(e){void 0!==window.jQuery&&window.jQuery(e).redactor("code.set",e.value)},_callbackSubmit:function(e){void 0!==window.jQuery&&(e.value=window.jQuery(e).redactor("code.get"))}}}),define("WoltLabSuite/Core/Ui/Notification",["Language"],function(e){"use strict";var t=!1,n=null,i=null,o=null,r=null,a=null,s={show:function(s,l,c){t||(this._init(),n="function"==typeof l?l:null,i.className=c||"success",i.textContent=e.get(s||"wcf.global.success"),t=!0,o.classList.add("active"),r=setTimeout(a,2e3))},_init:function(){null===o&&(a=this._hide.bind(this),o=elCreate("div"),o.id="systemNotification",i=elCreate("p"),i.addEventListener(WCF_CLICK_EVENT,a),o.appendChild(i),document.body.appendChild(o))},_hide:function(){clearTimeout(r),o.classList.remove("active"),null!==n&&n(),t=!1}};return s}),define("WoltLabSuite/Core/Media/Editor",["Ajax","Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Language","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Language/Chooser","WoltLabSuite/Core/Language/Input","EventKey"],function(e,t,n,i,o,r,a,s,l,c,u){"use strict";var d=function(){};return d.prototype={_ajaxSetup:function(){},_ajaxSuccess:function(){},_close:function(){},_keyPress:function(){},_saveData:function(){},_updateLanguageFields:function(){},edit:function(){}},d}),define("WoltLabSuite/Core/Media/Upload",["Core","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","Permission","Upload"],function(e,t,n,i,o,r,a,s){"use strict";var l=function(){};return l.prototype={_createFileElement:function(){},_getParameters:function(){},_success:function(){},_uploadFiles:function(){},_createButton:function(){},_createFileElements:function(){},_failure:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){},_upload:function(){}},l}),define("WoltLabSuite/Core/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:[],threshold:3},n),"function"!=typeof this._options.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this._element.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()}),this._element.addEventListener("keydown",this._keyDown.bind(this)),this._element.addEventListener("keyup",this._keyUp.bind(this))},addExcludedValue:function(e){this._options.excludedSearchValues.indexOf(e)===-1&&this._options.excludedSearchValues.push(e)},removeExcludedValue:function(e){var t=this._options.excludedSearchValues.indexOf(e);t!==-1&&this._options.excludedSearchValues.splice(t,1)},isActive:function(){return null!==this._dropdownMenu&&n.isOpen(this._element.id)},_keyDown:function(e){if(!this.isActive())return!0;if(13!==e.keyCode&&27!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode)return!0;for(var t,i=0,o=this._dropdownMenu.childElementCount;i0){var n=t.parentNode.previousElementSibling;null!==n&&n.classList.remove("active")}},_addItem:function(e,t){var n=l.get(e),i=elCreate("li");i.className="item";var o=elCreate("span");o.className="content",elData(o,"object-id",t.objectId),o.textContent=t.value;var r=elCreate("a");r.className="icon icon16 fa-times",r.addEventListener(WCF_CLICK_EVENT,f),i.appendChild(o),i.appendChild(r),n.list.insertBefore(i,n.listItem),n.suggestion.addExcludedValue(t.value),n.element.value="",this._handleLimit(e);var a=this._syncShadow(n);"function"==typeof n.options.callbackChange&&(null===a&&(a=this.getValues(e)),n.options.callbackChange(e,a))},_removeItem:function(e,t,n){t=null===e?t:e.currentTarget.parentNode;var i=t.parentNode,o=elData(i,"element-id"),r=l.get(o);r.suggestion.removeExcludedValue(t.children[0].textContent),i.removeChild(t),n||r.element.focus(),this._handleLimit(o);var a=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===a&&(a=this.getValues(o)),r.options.callbackChange(o,a))},_syncShadow:function(e){if(!e.options.isCSV)return null;for(var t="",n=this.getValues(e.element.id),i=0,o=n.length;i~~elAttr(s,"max")?o.disabled=!0:o.disabled=!1},_submit:function(e){a.get(i).callback(~~s.value),n.close(this)},_dialogSetup:function(){var t='
            ";return{id:"paginationOverlay",options:{onSetup:function(e){s=elByTag("input",e)[0],s.addEventListener("keyup",this._keyUp.bind(this)),r=elByTag("small",e)[0],o=elByTag("button",e)[0],o.addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))}.bind(this),title:e.get("wcf.global.page.pagination")},source:t}}};return l}),define("WoltLabSuite/Core/Ui/Pagination",["Core","Language","ObjectMap","StringUtil","WoltLabSuite/Core/Ui/Page/JumpTo"],function(e,t,n,i,o){"use strict";function r(e,t){this.init(e,t)}return r.prototype={SHOW_LINKS:11,init:function(t,n){this._element=t,this._options=e.extend({activePage:1,maxPage:1,callbackShouldSwitch:null,callbackSwitch:null},n),"function"!=typeof this._options.callbackShouldSwitch&&(this._options.callbackShouldSwitch=null),"function"!=typeof this._options.callbackSwitch&&(this._options.callbackSwitch=null),this._element.classList.add("pagination"),this._rebuild(this._element)},_rebuild:function(){var e=!1;this._element.innerHTML="";var n,i=elCreate("ul"),r=elCreate("li");r.className="skip",i.appendChild(r);var a="icon icon24 fa-chevron-left";this._options.activePage>1?(n=elCreate("a"),n.className=a+" jsTooltip",n.href="#",n.title=t.get("wcf.global.page.previous"),r.appendChild(n),n.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage-1))):(r.innerHTML='',r.classList.add("disabled")),i.appendChild(this._createLink(1));var s=this.SHOW_LINKS-4,l=this._options.activePage-2;l<0&&(l=0);var c=this._options.maxPage-(this._options.activePage+1);c<0&&(c=0),this._options.activePage>1&&this._options.activePagethis._options.maxPage-1&&(h=this._options.maxPage-1),l>=u?d-=u:(d-=l,h+=u-l),c>=u?h+=u:(h+=c,d-=u-c),h=Math.ceil(h),d=Math.ceil(d),d<1&&(d=1),h>this._options.maxPage&&(h=this._options.maxPage);var f='';d>1&&(d-1<2?i.appendChild(this._createLink(2)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=f,i.appendChild(r),e=!0));for(var p=d+1;p',r.classList.add("disabled")),e&&(elData(i,"pages",this._options.maxPage),o.init(i,this.switchPage.bind(this))),this._element.appendChild(i)},_createLink:function(e){var n=elCreate("li");if(e!==this._options.activePage){var o=elCreate("a");o.textContent=i.addThousandsSeparator(e),o.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,e)),n.appendChild(o)}else n.classList.add("active"),n.innerHTML=""+i.addThousandsSeparator(e)+'";return n},getActivePage:function(){return this._options.activePage},getElement:function(){return this._element},getMaxPage:function(){return this._options.maxPage},switchPage:function(e,t){if("object"==typeof t&&t.preventDefault(),e=~~e,e>0&&this._options.activePage!==e&&e<=this._options.maxPage){if(null!==this._options.callbackShouldSwitch&&this._options.callbackShouldSwitch(e)!==!0)return;this._options.activePage=e,this._rebuild(),null!==this._options.callbackSwitch&&this._options.callbackSwitch(e)}}},r}),define("WoltLabSuite/Core/Ui/Scroll",["Dom/Util"],function(e){"use strict";var t=null,n=null,i=null;return{element:function(i,o){if(!(i instanceof Element))throw new TypeError("Expected a valid DOM element.");if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(i))throw new Error("Element must be part of the visible DOM.");if(null!==t)throw new Error("Cannot scroll to element, a concurrent request is running.");o&&(t=o,null===n&&(n=this._onScroll.bind(this)),window.addEventListener("scroll",n));var r=e.offset(i).top;r<=50?r=0:r-=50;var a=window.pageYOffset;window.scrollTo({left:0,top:r,behavior:"smooth"}),window.setTimeout(function(){a===window.pageYOffset&&this._onScroll()}.bind(this),100)},_onScroll:function(){null!==i&&window.clearTimeout(i),i=window.setTimeout(function(){null!==t&&t(),window.removeEventListener("scroll",n),t=null,i=null},100)}}}),define("WoltLabSuite/Core/Media/List/Upload",["Core","Dom/ChangeListener","Dom/Traverse","Dom/Util","Language","Ui/Confirmation","Ui/Notification","../Upload"],function(e,t,n,i,o,r,a,s){"use strict";var l=function(){};return l.prototype={_createButton:function(){},_success:function(){},_upload:function(){},_createFileElement:function(){},_getParameters:function(){},_uploadFiles:function(){},_createFileElements:function(){},_failure:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){}},l}),define("WoltLabSuite/Core/Controller/Media/List",["EventHandler","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/List/Upload"],function(e,t,n,i){"use strict";var o=function(){};return o.prototype={init:function(){},_clipboardAction:function(){},_edit:function(){}},o}),define("WoltLabSuite/Core/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;n':e.icon,i.appendChild(t.children[0]),t.appendChild(i),t}}),n}),define("WoltLabSuite/Core/Ui/Acl/Simple",["Language","StringUtil","Dom/ChangeListener","WoltLabSuite/Core/Ui/User/Search/Input"],function(e,t,n,i){"use strict";var o=function(){};return o.prototype={init:function(){},_build:function(){},_select:function(){},_removeItem:function(){}},o}),define("WoltLabSuite/Core/Ui/Article/MarkAllAsRead",["Ajax"],function(e){"use strict";return{init:function(){elBySelAll(".markAllAsReadButton",void 0,function(e){e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))}.bind(this))},_click:function(t){t.preventDefault(),e.api(this)},_ajaxSuccess:function(){var e=elBySel(".mainMenu .active .badge");e&&elRemove(e),elBySelAll(".articleList .newMessageBadge",void 0,elRemove)},_ajaxSetup:function(){return{data:{actionName:"markAllAsRead",className:"wcf\\data\\article\\ArticleAction"}}}}}),define("WoltLabSuite/Core/Ui/Color/Picker",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}var n=function(e,t){return"object"==typeof window.WCF&&"function"==typeof window.WCF.ColorPicker?(n=function(e,t){var n=new window.WCF.ColorPicker(e);return"function"==typeof t.callbackSubmit&&n.setCallbackSubmit(t.callbackSubmit),n})(e,t):(0===i.length&&(window.__wcf_bc_colorPickerInit=function(){i.forEach(function(e){n(e[0],e[1])}),window.__wcf_bc_colorPickerInit=void 0,i=[]}),void i.push([e,t]))},i=[];return t.prototype={init:function(t,i){if(!(t instanceof Element))throw new TypeError("Expected a valid DOM element, use `UiColorPicker.fromSelector()` if you want to use a CSS selector.");this._options=e.extend({callbackSubmit:null},i),n(t,i)}},t.fromSelector=function(e){elBySelAll(e,void 0,function(e){new t(e)})},t}),define("WoltLabSuite/Core/Ui/Comment/Add",["Ajax","Core","EventHandler","Language","Dom/ChangeListener","Dom/Util","Dom/Traverse","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Ui/Scroll","EventKey","User","WoltLabSuite/Core/Controller/Captcha"],function(e,t,n,i,o,r,a,s,l,c,u,d,h){"use strict";var f=function(){};return f.prototype={init:function(){},_submitGuestDialog:function(){},_submit:function(){},_validate:function(){},throwError:function(){},_showLoadingOverlay:function(){},_hideLoadingOverlay:function(){},_reset:function(){},_handleError:function(){},_getEditor:function(){},_insertMessage:function(){},_ajaxSuccess:function(){},_ajaxFailure:function(){},_ajaxSetup:function(){}},f}),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["Dictionary","Ui/SimpleDropdown"],function(e,t){"use strict";function n(e){if(!i.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return i.get(e)}var i=new e,o=0;return{init:function(e,n){if(!i.has(e)){var r=elCreate("div");r.id="reusableDropdownGhost"+o++,t.initFragment(r,n),i.set(e,r.id)}},getDropdownMenu:function(e){return t.getDropdownMenu(n(e))},registerCallback:function(e,i){t.registerCallback(n(e),i)},toggleDropdown:function(e,i){t.toggleDropdown(n(e),i)}}}),define("WoltLabSuite/Core/Ui/Comment/Edit",["Ajax","Core","Dictionary","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLabSuite/Core/Ui/Scroll"],function(e,t,n,i,o,r,a,s,l,c,u,d,h){"use strict";var f=function(){};return f.prototype={init:function(){},rebuild:function(){},_click:function(){},_prepare:function(){},_showEditor:function(){},_restoreMessage:function(){},_save:function(){},_validate:function(){},throwError:function(){},_showMessage:function(){},_hideEditor:function(){},_restoreEditor:function(){},_destroyEditor:function(){},_getEditorId:function(){},_getObjectId:function(){},_ajaxFailure:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){}},f}),define("WoltLabSuite/Core/Ui/ItemList/Filter",["Core","EventKey","Language","List","StringUtil","Dom/Util"],function(e,t,n,i,o,r){"use strict";var a=function(){};return a.prototype={init:function(){},_buildItems:function(){},_prepareItem:function(){},_keyup:function(){}},a}),define("WoltLabSuite/Core/Ui/ItemList/User",["WoltLabSuite/Core/Ui/ItemList"],function(e){"use strict";var t=function(){};return t.prototype={init:function(){},getValues:function(){}},t}),define("WoltLabSuite/Core/Ui/User/List",["Ajax","Core","Dictionary","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/Pagination"],function(e,t,n,i,o,r){"use strict";function a(e){this.init(e)}return a.prototype={init:function(e){this._cache=new n,this._pageCount=0,this._pageNo=1,this._options=t.extend({className:"",dialogTitle:"",parameters:{}},e)},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t){if("number"==typeof t&&(this._pageNo=~~t),0!==this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))throw new RangeError("pageNo must be between 1 and "+this._pageCount+" ("+this._pageNo+" given).");if(this._cache.has(this._pageNo)){var n=o.open(this,this._cache.get(this._pageNo));if(this._pageCount>1){var i=elBySel(".jsPagination",n.content);null!==i&&new r(i,{activePage:this._pageNo,maxPage:this._pageCount,callbackSwitch:this._showPage.bind(this)})}}else this._options.parameters.pageNo=this._pageNo,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){void 0!==e.returnValues.pageCount&&(this._pageCount=~~e.returnValues.pageCount),this._cache.set(this._pageNo,e.returnValues.template),this._showPage()},_ajaxSetup:function(){return{data:{actionName:"getGroupedUserList",className:this._options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}},_dialogSetup:function(){return{id:i.getUniqueId(),options:{title:this._options.dialogTitle},source:null}}},a}),define("WoltLabSuite/Core/Ui/Like/Handler",["Ajax","Core","Dictionary","Language","ObjectMap","StringUtil","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/User/List","User"],function(e,t,n,i,o,r,a,s,l,c,u){"use strict";function d(e,t){this.init(e,t)}var h=!1;return d.prototype={init:function(e,n){if(""===n.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._containers=new o,this._details=new o,this._objectType=e,this._options=t.extend({badgeClassNames:"",isSingleItem:!1,markListItemAsActive:!1,renderAsButton:!0,summaryPrepend:!0,summaryUseIcon:!0,canDislike:!1,canLike:!1,canLikeOwnContent:!1,canViewSummary:!1,badgeContainerSelector:".messageHeader .messageStatus",buttonAppendToSelector:".messageFooter .messageFooterButtons",buttonBeforeSelector:"",containerSelector:"",summarySelector:".messageFooterGroup"},n),this.initContainers(n,e),a.add("WoltLabSuite/Core/Ui/Like/Handler-"+e,this.initContainers.bind(this))},initContainers:function(){for(var e,t,n=elBySelAll(this._options.containerSelector),i=!1,o=0,r=n.length;o ",s.addEventListener(WCF_CLICK_EVENT,this._like.bind(this,e)),elData(s,"type",t?"like":"dislike"),a.appendChild(s),n?n.parentNode.insertBefore(a,n):o.appendChild(a),s},_showSummary:function(e,t){t.preventDefault(),this._details.has(e)||this._details.set(e,new c({className:"wcf\\data\\like\\LikeAction",dialogTitle:i.get("wcf.like.details"),parameters:{data:{containerID:s.identify(e),objectID:this._containers.get(e).objectId,objectType:this._objectType}}})),this._details.get(e).open()},_updateBadge:function(e){var t=this._containers.get(e);if(0===t.likes&&0===t.dislikes)elHide(t.badge);else{elShow(t.badge),t.badge.classList.remove("likeCounterLiked","likeCounterDisliked");var n=t.likes-t.dislikes,o='';n>0?(o+="+"+r.addThousandsSeparator(n),t.badge.classList.add("likeCounterLiked")):n<0?(o+="−"+r.addThousandsSeparator(Math.abs(n)),t.badge.classList.add("likeCounterDisliked")):o+="±0",t.badge.innerHTML=o+"",t.badge.setAttribute("data-tooltip",i.get("wcf.like.tooltip",{dislikes:t.dislikes,likes:t.likes}))}},_updateSummary:function(e){var t=this._containers.get(e);if(t.likes){elShow(t.summary.parentNode);for(var n=[],o=Object.keys(t.users),r=0,a=o.length;r .button",elById("pageHeaderSearchInputContainer"));l.textContent=e.currentTarget.textContent}}}),define("WoltLabSuite/Core/Ui/Sortable/List",["Core","Ui/Screen"],function(e,t){"use strict";var n=function(){};return n.prototype={init:function(){},_enable:function(){},_disable:function(){}},n}),define("WoltLabSuite/Core/Ui/Style/FontAwesome",["Language","Ui/Dialog","WoltLabSuite/Core/Ui/ItemList/Filter"],function(e,t,n){"use strict";var i=function(){};return i.prototype={setup:function(){},open:function(){},_click:function(){},_dialogSetup:function(){}},i}),define("WoltLabSuite/Core/Ui/Toggle/Input",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}return t.prototype={init:function(t,n){if(this._element=elBySel(t),null===this._element)throw new Error("Unable to find element by selector '"+t+"'.");var i="INPUT"===this._element.nodeName?elAttr(this._element,"type"):"";if("checkbox"!==i&&"radio"!==i)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this._options=e.extend({hide:[],show:[]},n),["hide","show"].forEach(function(e){var t,n,i;for(n=0,i=this._options[e].length;n'),l=elCreate("li"),elData(l,"object-id",s.objectID),l.innerHTML='
            '+r+'

            '+t.escapeHTML(s.title)+"

            "+(s.description?"

            "+s.description+"

            ":"")+"
            ",l.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),c.appendChild(l);elShow(u)},_resetList:function(){var e=a.nextElementSibling;e&&e.classList.contains("innerError")&&elRemove(e),c.innerHTML="",elHide(u)},_getSearchInputHandler:function(){if(null===l){var e=this._buildList.bind(this);l=new o(elById("wcfUiPageSearchInput"),{callbackSuccess:e})}return l},_click:function(e){"A"!==e.target.nodeName&&(e.stopPropagation(),r(elData(e.currentTarget,"object-id")),i.close(this))},_dialogSetup:function(){return{id:"wcfUiPageSearchHandler",options:{onShow:function(){null===a&&(a=elById("wcfUiPageSearchInput"),s=a.parentNode.previousSibling.childNodes[0],c=elById("wcfUiPageSearchResultList"),u=elById("wcfUiPageSearchResultListContainer")),a.value="",elHide(u),c.innerHTML="",a.focus()},title:""},source:'

            '+e.get("wcf.page.pageObjectID.search.results")+'

              '}}}}),define("WoltLabSuite/Core/Ui/User/Activity/Recent",["Ajax","Language","Dom/Util"],function(e,t,n){"use strict";function i(e){this.init(e)}return i.prototype={init:function(e){this._containerId=e;var n=elById(this._containerId);this._list=elBySel(".recentActivityList",n);var i=elCreate("li");i.className="showMore",this._list.childElementCount?(i.innerHTML='",i.children[0].addEventListener(WCF_CLICK_EVENT,this._showMore.bind(this))):i.innerHTML=""+t.get("wcf.user.recentActivity.noMoreEntries")+"",this._list.appendChild(i),this._showMoreItem=i,elBySelAll(".jsRecentActivitySwitchContext .button",n,function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),e.classList.contains("active")||this._switchContext()}.bind(this))}.bind(this))},_showMore:function(t){t.preventDefault(),this._showMoreItem.children[0].disabled=!0,e.api(this,{actionName:"load",parameters:{boxID:~~elData(this._list,"box-id"),filteredByFollowedUsers:elDataBool(this._list,"filtered-by-followed-users"),lastEventId:elData(this._list,"last-event-id"),lastEventTime:elData(this._list,"last-event-time"),userID:~~elData(this._list,"user-id")}})},_switchContext:function(){e.api(this,{actionName:"switchContext"},function(){window.location.hash="#"+this._containerId,window.location.reload()}.bind(this))},_ajaxSuccess:function(e){e.returnValues.template?(n.insertHtml(e.returnValues.template,this._showMoreItem,"before"),elData(this._list,"last-event-time",e.returnValues.lastEventTime),elData(this._list,"last-event-id",e.returnValues.lastEventID),this._showMoreItem.children[0].disabled=!1):this._showMoreItem.innerHTML=""+t.get("wcf.user.recentActivity.noMoreEntries")+""},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"}}}},i}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract",["Ajax","Dom/Util"],function(e,t){"use strict";function n(e,t){}return n.prototype={init:function(e,t){this._userId=e,this._isActive=t!==!1,this._initButton(),this._updateButton()},_initButton:function(){var e=elCreate("a");e.href="#",e.addEventListener(WCF_CLICK_EVENT,this._toggle.bind(this));var n=elCreate("li");n.appendChild(e);var i=elBySel('.userProfileButtonMenu[data-menu="interaction"]');t.prepend(n,i),this._button=e,this._listItem=n},_toggle:function(t){t.preventDefault(),e.api(this,{actionName:this._getAjaxActionName(),parameters:{data:{userID:this._userId}}})},_updateButton:function(){this._button.textContent=this._getLabel(),this._listItem.classList[this._isActive?"add":"remove"]("active")},_getLabel:function(){throw new Error("Implement me!")},_getAjaxActionName:function(){throw new Error("Implement me!")},_ajaxSuccess:function(){throw new Error("Implement me!")},_ajaxSetup:function(){throw new Error("Implement me!")}},n}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow",["Core","Language","Ui/Notification","./Abstract"],function(e,t,n,i){"use strict";var o=function(){};return o.prototype={_getLabel:function(){},_getAjaxActionName:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){},init:function(){},_initButton:function(){},_toggle:function(){},_updateButton:function(){}},o}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore",["Core","Language","Ui/Notification","./Abstract"],function(e,t,n,i){"use strict";var o=function(){};return o.prototype={_getLabel:function(){},_getAjaxActionName:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){},init:function(){},_initButton:function(){},_toggle:function(){},_updateButton:function(){}},o}),function(e){e.matches=e.matches||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector,e.closest=e.closest||function(e){for(var t=this;t&&!t.matches(e);)t=t.parentElement;return t}}(Element.prototype),define("closest",function(){}),function(e){function t(){for(;i.length&&"function"==typeof i[0];)i.shift()()}var n=e.require,i=[],o=0;e.require=function(r,a,s){if(!Array.isArray(r))return n.apply(e,arguments);var l=o++;i.push(l),s?n(r,function(){var n=arguments;i[i.indexOf(l)]=function(){a.apply(e,n)},t()},function(){var n=arguments;i[i.indexOf(l)]=function(){s.apply(e,n)},t()}):n(r,function(){var n=arguments;i[i.indexOf(l)]=function(){a.apply(e,n)},t()})},e.require.config=n.config}(window),define("require.linearExecution",function(){}); \ No newline at end of file +var requirejs,require,define;!function(global,Promise,undef){function commentReplace(e,t){return t||""}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return e&&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,o){!n&&hasProp(e,o)||(!i||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[o]=t:(e[o]||(e[o]={}),mixin(e[o],t,n,i)))}),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach(function(e){t=t[e]}),t}function newContext(e){function t(e){var t,n,i=e.length;for(t=0;t0&&(e.splice(t-1,2),t-=2)}}function n(e,n,i){var o,a,r,s,l,c,u,d,h,f,p,m=n&&n.split("/"),g=m,v=M.map,b=v&&v["*"];if(e&&(e=e.split("/"),u=e.length-1,M.nodeIdCompat&&jsSuffixRegExp.test(e[u])&&(e[u]=e[u].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&m&&(g=m.slice(0,m.length-1),e=g.concat(e)),t(e),e=e.join("/")),i&&v&&(m||b)){r=e.split("/");e:for(s=r.length;s>0;s-=1){if(c=r.slice(0,s).join("/"),m)for(l=m.length;l>0;l-=1)if(a=getOwn(v,m.slice(0,l).join("/")),a&&(a=getOwn(a,c))){d=a,h=s;break e}!f&&b&&getOwn(b,c)&&(f=getOwn(b,c),p=s)}!d&&f&&(d=f,h=p),d&&(r.splice(0,h,d),e=r.join("/"))}return o=getOwn(M.pkgs,e),o?o:e}function i(e){function t(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}return t}function o(e){var t,n,i,o;for(t=0;t0;r-=1)if(s=a.slice(0,r).join("/"),c=getOwn(o,s)){Array.isArray(c)&&(c=c[0]),a.splice(0,r,c);break}l=a.join("/"),l+=t||(/^data\:|^blob\:|\?/.test(l)||n?"":".js"),l=("/"===l.charAt(0)||l.match(/^[\w\+\.\-]+:/)?"":M.baseUrl)+l}return M.urlArgs&&!/^blob\:/.test(l)?l+M.urlArgs(e,l):l},i.toUrl=function(t){var o,a=t.lastIndexOf("."),r=t.split("/")[0],s="."===r||".."===r;return a!==-1&&(!s||a>1)&&(o=t.substring(a,t.length),t=t.substring(0,a)),i.nameToUrl(n(t,e),o,!0)},i.defined=function(t){return hasProp(k,L(t,e,!0).id)},i.specified=function(t){return t=L(t,e,!0).id,hasProp(k,t)||hasProp(U,t)},i}function r(e,t,n){e&&(k[e]=n,requirejs.onResourceLoad&&requirejs.onResourceLoad(T,t.map,t.deps)),t.finished=!0,t.resolve(n)}function s(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function l(e){return function(t){return n(t,e,!0)}}function c(e){e.factoryCalled=!0;var t,n=e.map.id;try{t=e.factory.apply(k[n],e.values)}catch(t){return s(e,t)}n?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=k[n])):N.splice(N.indexOf(e),1),r(n,e,t)}function u(e,t){this.rejected||this.depDefined[t]||(this.depDefined[t]=!0,this.depCount+=1,this.values[t]=e,this.depending||this.depCount!==this.depMax||c(this))}function d(e,t){var n={};return n.promise=new Promise(function(t,i){n.resolve=t,n.reject=function(t){e||N.splice(N.indexOf(n),1),i(t)}}),n.map=e?t||L(e):{},n.depCount=0,n.depMax=0,n.values=[],n.depDefined=[],n.depFinished=u,n.map.pr&&(n.deps=[L(n.map.pr)]),n}function h(e,t){var n;return e?(n=hasProp(U,e)&&U[e],n||(n=U[e]=d(e,t))):(n=d(),N.push(n)),n}function f(e,t){return function(n){e.rejected||(n.dynaId||(n.dynaId="id"+(B+=1),n.requireModules=[t]),s(e,n))}}function p(e,t,n,i){n.depMax+=1,S(e,t).then(function(e){n.depFinished(e,i)},f(n,e.id)).catch(f(n,n.map.id))}function m(e){function t(t){n||r(e,h(e),t)}var n;return t.error=function(t){h(e).reject(t)},t.fromText=function(t,i){var a=h(e),r=L(L(e).n),l=r.id;n=!0,a.factory=function(e,t){return t},i&&(t=i),hasProp(M.config,e)&&(M.config[l]=M.config[e]);try{w.exec(t)}catch(e){s(a,new Error("fromText eval for "+l+" failed: "+e))}o(l),a.deps=[r],p(r,null,a,a.deps.length)},t}function g(e,t,n){e.load(t.n,a(n),m(t.id),M)}function v(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 b(e,t,n){var i=e.map.id;t[i]=!0,!e.finished&&e.deps&&e.deps.forEach(function(i){var o=i.id,a=!hasProp(E,o)&&h(o,i);!a||a.finished||n[o]||(hasProp(t,o)?e.deps.forEach(function(t,n){t.id===o&&e.depFinished(k[o],n)}):b(a,t,n))}),n[i]=!0}function _(e){var t,n=[],i=1e3*M.waitSeconds,o=i&&O+i<(new Date).getTime();0===j&&(e?e.finished||b(e,{},{}):N.length&&N.forEach(function(e){b(e,{},{})})),o?(eachProp(U,function(e){e.finished||n.push(e.map.id)}),t=new Error("Timeout for modules: "+n),t.requireModules=n,w.onError(t)):(j||N.length)&&(x||(x=!0,setTimeout(function(){x=!1,_()},70)))}function y(e){return setTimeout(function(){e.dynaId&&H[e.dynaId]||(H[e.dynaId]=!0,w.onError(e))}),e}var w,C,L,S,E,x,D,T,k={},I={},M={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},A={},N=[],U={},P={},W={},j=0,O=(new Date).getTime(),B=0,H={},R={},F={},V=Promise.resolve();return D="function"==typeof importScripts?function(e){var t=e.url;R[t]||(R[t]=!0,h(e.id),importScripts(t),o(e.id))}:function(e){var t,n=e.id,i=e.url;R[i]||(R[i]=!0,t=document.createElement("script"),t.setAttribute("data-requiremodule",n),t.type=M.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,j+=1,t.addEventListener("load",function(){j-=1,o(n)},!1),t.addEventListener("error",function(){j-=1;var e,i=getOwn(M.paths,n),o=getOwn(U,n);i&&Array.isArray(i)&&i.length>1?(t.parentNode.removeChild(t),i.shift(),o.map=L(n),D(o.map)):(e=new Error("Load failed: "+n+": "+t.src),e.requireModules=[n],h(n).reject(e))},!1),t.src=i,document.head.appendChild(t))},S=function(e,t){var n,i,o=e.id,a=M.shim[o];if(hasProp(I,o))n=I[o],delete I[o],C.apply(undef,n);else if(!hasProp(U,o))if(e.pr){if(!(i=getOwn(F,o)))return S(L(e.pr)).then(function(n){var i=e.prn?e:L(o,t,!0),a=i.id,r=getOwn(M.shim,a);return hasProp(W,a)||(W[a]=!0,r&&r.deps?w(r.deps,function(){g(n,i,t)}):g(n,i,t)),h(a).promise});e.url=w.nameToUrl(i),D(e)}else a&&a.deps?w(a.deps,function(){D(e)}):D(e);return h(o).promise},L=function(e,t,i){if("string"!=typeof e)return e;var o,a,r,s,c,u,d=e+" & "+(t||"")+" & "+!!i;return r=v(e),s=r[0],e=r[1],!s&&hasProp(A,d)?A[d]:(s&&(s=n(s,t,i),o=hasProp(k,s)&&k[s]),s?o&&o.normalize?(e=o.normalize(e,l(t)),u=!0):e=e.indexOf("!")===-1?n(e,t,i):e:(e=n(e,t,i),r=v(e),s=r[0],e=r[1],a=w.nameToUrl(e)),c={id:s?s+"!"+e:e,n:e,pr:s,url:a,prn:s&&u},s||(A[d]=c),c)},E={require:function(e){return a(e)},exports:function(e){var t=k[e];return"undefined"!=typeof t?t:k[e]={}},module:function(e){return{id:e,uri:"",exports:E.exports(e),config:function(){return getOwn(M.config,e)||{}}}}},C=function(e,t,n,i,o){if(!e||!hasProp(P,e)){P[e]=!0;var a=h(e);return t&&!Array.isArray(t)&&(n=t,t=[]),i||(hasProp(M,"defaultErrback")?M.defaultErrback&&(i=M.defaultErrback):i=y),i&&a.promise.catch(i),o=o||e,"function"==typeof n?(!t.length&&n.length&&(n.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,function(e,n){t.push(n)}),t=(1===n.length?["require"]:["require","exports","module"]).concat(t)),a.factory=n,a.deps=t,a.depending=!0,t.forEach(function(n,i){var r;t[i]=r=L(n,o,!0),n=r.id,"require"===n?a.values[i]=E.require(e):"exports"===n?(a.values[i]=E.exports(e),a.usingExports=!0):"module"===n?a.values[i]=a.cjsModule=E.module(e):void 0===n?a.values[i]=void 0:p(r,o,a,i)}),a.depending=!1,a.depCount===a.depMax&&c(a)):e&&r(e,a,n),O=(new Date).getTime(),e||_(a),a.promise}},w=a(null,!0),w.config=function(t){if(t.context&&t.context!==e){var n=getOwn(contexts,t.context);return n?n.req.config(t):newContext(t.context).config(t)}if(A={},t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs){var o=t.urlArgs;t.urlArgs=function(e,t){return(t.indexOf("?")===-1?"?":"&")+o}}var a=M.shim,r={paths:!0,bundles:!0,config:!0,map:!0};return eachProp(t,function(e,t){r[t]?(M[t]||(M[t]={}),mixin(M[t],e,!0,!0)):M[t]=e}),t.bundles&&eachProp(t.bundles,function(e,t){e.forEach(function(e){e!==t&&(F[e]=t)})}),t.shim&&(eachProp(t.shim,function(e,t){Array.isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=i(e)),a[t]=e}),M.shim=a),t.packages&&t.packages.forEach(function(e){var t,n;e="string"==typeof e?{name:e}:e,n=e.name,t=e.location,t&&(M.paths[n]=e.location),M.pkgs[n]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")}),(t.deps||t.callback)&&w(t.deps,t.callback),w},w.onError=function(e){throw e},T={id:e,defined:k,waiting:I,config:M,deferreds:U,req:w},contexts[e]=T,w}if(!Promise)throw new Error("No Promise implementation available");var topReq,dataMain,src,subPath,bootstrapConfig=requirejs||require,hasOwn=Object.prototype.hasOwnProperty,contexts={},queue=[],currDirRegExp=/^\.\//,urlRegExp=/^\/|\:|\?|\.js$/,commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,slice=Array.prototype.slice;"function"!=typeof requirejs&&(requirejs=topReq=newContext("_"),"function"!=typeof require&&(require=topReq),topReq.exec=function(text){return eval(text)},topReq.contexts=contexts,define=function(){queue.push(slice.call(arguments,0))},define.amd={jQuery:!0},bootstrapConfig&&topReq.config(bootstrapConfig),topReq.isBrowser&&!contexts._.config.skipDataMain&&(dataMain=document.querySelectorAll("script[data-main]")[0],dataMain=dataMain&&dataMain.getAttribute("data-main"),dataMain&&(dataMain=dataMain.replace(jsSuffixRegExp,""),bootstrapConfig&&bootstrapConfig.baseUrl||dataMain.indexOf("!")!==-1||(src=dataMain.split("/"),dataMain=src.pop(),subPath=src.length?src.join("/")+"/":"./",topReq.config({baseUrl:subPath})),topReq([dataMain]))))}(this,"undefined"!=typeof Promise?Promise:void 0),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:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],function(){return window.jQuery}),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.elAttrBool=function(e,t){var n=elAttr(e,t);return"1"===n||"true"===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,i){var o=(n||t).querySelectorAll(e);return"function"==typeof i&&Array.prototype.forEach.call(o,i),o},e.elByTag=function(e,n){return(n||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elData=function(e,t,n){return t="data-"+t,void 0===n?e.getAttribute(t)||"":void e.setAttribute(t,n)},e.elDataBool=function(e,t){var n=elData(e,t);return"1"===n||"true"===n},e.elHide=function(e){e.style.setProperty("display","none","")},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var n=0,i=e.length;n0||navigator.msMaxTouchPoints>0?"touchstart":"click";Object.defineProperty(e,"WCF_CLICK_EVENT",{value:"click"}),function(){function t(){e.history.state&&e.history.state.name&&"initial"!==e.history.state.name?(e.history.replaceState({name:"skip",depth:++n},""),e.history.back(),setTimeout(t,1)):e.history.replaceState({name:"initial"},"")}var n=0;t(),e.addEventListener("popstate",function(t){t.state&&t.state.name&&"skip"===t.state.name&&e.history.go(t.state.depth)})}()}(window,document),define("wcf.globalHelper",function(){}),define("WoltLabSuite/Core/Core",[],function(){"use strict";var e=function(e){return"object"==typeof e&&(Array.isArray(e)||i.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="wsc"+window.WCF_PATH.hashCode()+"-",i={clone:function(t){return e(t)},convertLegacyUrl:function(e){return e.replace(/^index\.php\/(.*?)\/\?/,function(e,t){var n=t.split(/([A-Z][a-z0-9]+)/);t="";for(var i=0,o=n.length;iu&&x.push("'"+this.terminals_[L]+"'");k=f.showPosition?"Parse error on line "+(s+1)+":\n"+f.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==d?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(k,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:g,expected:x})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+y+", token: "+b);switch(w[0]){case 1:n.push(b),i.push(f.yytext),o.push(f.yylloc),n.push(w[1]),b=null,_?(b=_,_=null):(l=f.yyleng,r=f.yytext,s=f.yylineno,g=f.yylloc,c>0&&c--);break;case 2:if(S=this.productions_[w[1]][1],T.$=i[i.length-S],T._$={first_line:o[o.length-(S||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(S||1)].first_column,last_column:o[o.length-1].last_column},v&&(T._$.range=[o[o.length-(S||1)].range[0],o[o.length-1].range[1]]),C=this.performAction.apply(T,[r,l,s,p.yy,w[1],i,o].concat(h)),"undefined"!=typeof C)return C;S&&(n=n.slice(0,-1*S*2),i=i.slice(0,-1*S),o=o.slice(0,-1*S)),n.push(this.productions_[w[1]][0]),i.push(T.$),o.push(T._$),E=a[n[n.length-2]][n[n.length-1]],n.push(E);break;case 3:return!0}}return!0}},b=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 o=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=[o[0],o[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,o;if(this.options.backtrack_lexer&&(o={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&&(o.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 o)this[a]=o[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 o=this._currentRules(),a=0;at[0].length)){if(t=n,i=a,this.options.backtrack_lexer){if(e=this.test_match(n,o[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,o[i]),e!==!1&&e):""===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 52;case 3:return 52;case 4:return 40;case 5:return 41;case 6:return 46;case 7:return 44;case 8:return 45;case 9:return 47;case 10:return 49;case 11:return 50;case 12:return 32;case 13:return 33;case 14:return this.begin("command"),30;case 15:return this.begin("command"),31;case 16:return this.begin("command"),13;case 17:return this.begin("command"),37;case 18:return this.begin("command"),37;case 19:return 35;case 20:return 18;case 21:return 26;case 22:return 27; +case 23:return this.begin("command"),19;case 24:return this.begin("command"),21;case 25:return 22;case 26:return this.begin("command"),23;case 27:return 39;case 28:return 25;case 29:return this.begin("command"),28;case 30:return this.popState(),15;case 31:return 12;case 32:return 5;case 33:return 11}},rules:[/^(?:\{\*[\s\S]*?\*\})/,/^(?:\{literal\}[\s\S]*?\{\/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))/,/^(?:\})/,/^(?:\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],inclusive:!0},INITIAL:{rules:[0,1,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,31,32,33],inclusive:!0}}};return e}();return v.lexer=b,v}),define("WoltLabSuite/Core/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("WoltLabSuite/Core/StringUtil",["Language","./NumberUtil"],function(e,t){"use strict";return{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,"&").replace(/"/g,""").replace(//g,">")},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 o=n.split(".");return n=this.addThousandsSeparator(o[0]),o.length>1&&(n+=e.get("wcf.global.decimalPoint")+o[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(/&/g,"&").replace(/"/g,'"').replace(/</g,"<").replace(/>/g,">")},shortUnit:function(e){var n="";return e>=1e6?(e/=1e6,e=e>10?Math.floor(e):t.round(e,-1),n="M"):e>=1e3&&(e/=1e3,e=e>10?Math.floor(e):t.round(e,-1),n="k"),this.formatNumeric(e)+n}}}),define("WoltLabSuite/Core/Template",["./Template.grammar","./StringUtil","Language"],function(e,t,n){"use strict";function i(){this.yy={}}function o(i){void 0===n&&(n=require("Language")),void 0===t&&(t=require("StringUtil"));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(e){throw console.debug(e.message),e}}return i.prototype=e,e.Parser=i,e=new i,Object.defineProperty(o,"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")}}),o.prototype={fetch:function(e){throw new Error("This Template is not initialized.")}},o}),define("WoltLabSuite/Core/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 o=n.get(e);if(void 0===o)return e;if("string"==typeof o){try{n.set(e,new t(o))}catch(i){n.set(e,new t("{literal}"+o.replace(/\{\/literal\}/g,"{/literal}{ldelim}/literal}{literal}")+"{/literal}"))}o=n.get(e)}return o instanceof t&&(o=o.fetch(i)),o}};return i}),define("WoltLabSuite/Core/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("WoltLabSuite/Core/Dom/Change/Listener",["CallbackList"],function(e){"use strict";var t=new e,n=!1;return{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}}}}),define("WoltLabSuite/Core/Environment",[],function(){"use strict";var e="other",t="none",n="desktop",i=!1;return{setup:function(){if("object"==typeof window.chrome)e="chrome";else for(var o=window.getComputedStyle(document.documentElement),a=0,r=o.length;a0||window.DocumentTouch&&document instanceof DocumentTouch},browser:function(){return e},editor:function(){return t},platform:function(){return n},touch:function(){return i}}}),define("WoltLabSuite/Core/Dom/Util",["Environment","StringUtil"],function(e,t){"use strict";function n(e,t,n){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");for(var i,o=n+"Sibling";null!==e&&e!==t;){if(null!==e[n+"ElementSibling"])return!1;if(e[o])for(i=e[o];i;){if(""!==i.textContent.trim())return!1;i=i[o]}e=e.parentNode}return!0}var i=0,o={createFragmentFromHtml:function(e){var t=elCreate("div");this.setInnerHtml(t,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 instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");var t=elAttr(e,"id");return t||(t=this.getUniqueId(),elAttr(e,"id",t)),t},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:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend:function(e,t){0===t.childNodes.length?t.appendChild(e):t.insertBefore(e,t.childNodes[0])},insertAfter:function(e,t){null!==t.nextElementSibling?t.parentNode.insertBefore(e,t.nextElementSibling):t.parentNode.appendChild(e)},setStyles:function(e,t){var n=!1;for(var i in t)t.hasOwnProperty(i)&&(/ !important$/.test(t[i])?(n=!0,t[i]=t[i].replace(/ !important$/,"")):n=!1,"important"!==e.style.getPropertyPriority(i)||n||e.style.removeProperty(i),e.style.setProperty(i,t[i],n?"important":""))},styleAsInt:function(e,t){var n=e.getPropertyValue(t);return null===n?0:parseInt(n)},setInnerHtml:function(e,t){e.innerHTML=t;for(var n,i,o=elBySelAll("script",e),a=0,r=o.length;ao&&(s=!1)):"right"===e?i.left+n.widtho)&&(s=!1)),{align:e,left:a,right:r,result:s}},_tryAlignmentVertical:function(e,t,n,i,o,a){var r="auto",s="auto",l=!0;if("top"===e){var c=document.body.clientHeight;r=c-i.top+a,c-(r+t.height)<(window.scrollY||window.pageYOffset)&&(l=!1)}else s=i.top+n.height+a,s+t.height-(window.scrollY||window.pageYOffset)>o&&(l=!1);return{align:e,bottom:r,top:s,result:l}}}}),define("WoltLabSuite/Core/Ui/CloseOverlay",["CallbackList"],function(e){"use strict";var t=new e,n={setup:function(){document.body.addEventListener(WCF_CLICK_EVENT,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("WoltLabSuite/Core/Ui/Dropdown/Simple",["CallbackList","Core","Dictionary","Ui/Alignment","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/CloseOverlay"],function(e,t,n,i,o,a,r,s){"use strict";var l=null,c=new e,u=!1,d=new n,h=new n,f=null;return{setup:function(){u||(u=!0,f=elCreate("div"),f.className="dropdownMenuContainer",document.body.appendChild(f),l=elByClass("dropdownToggle"),this.initAll(),s.add("WoltLabSuite/Core/Ui/Dropdown/Simple",this.closeAll.bind(this)),o.add("WoltLabSuite/Core/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;e0&&0===o.scrollTop?e.preventDefault():e.wheelDelta<0&&o.scrollTop+l===c&&e.preventDefault()})}elData(e,"target",s),n&&setTimeout(function(){t.triggerEvent(e,WCF_CLICK_EVENT)},10)},initFragment:function(e,t){this.setup();var n=r.identify(e);d.has(n)||(d.set(n,e),f.appendChild(t),h.set(n,t))},registerCallback:function(e,t){c.add(e,t)},getDropdown:function(e){return d.get(e)},getDropdownMenu:function(e){return h.get(e)},toggleDropdown:function(e,t){this._toggle(null,e,t)},setAlignment:function(e,t,n){var o,a=elBySel(".dropdownToggle",e);null!==a&&a.parentNode.classList.contains("inputAddonTextarea")&&(o=a),i.set(t,n||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:o||null,horizontal:"right"===elData(t,"dropdown-alignment-horizontal")?"right":"left",vertical:"top"===elData(t,"dropdown-alignment-vertical")?"top":"bottom"})},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")},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;try{this.close(e),elRemove(h.get(e))}catch(e){}return h.delete(e),d.delete(e),!0},_onDialogScroll:function(e){for(var t=e.currentTarget,n=elBySelAll(".dropdown.dropdownOpen",t),i=0,o=n.length;i=c.top+t.offsetHeight?this.toggleDropdown(s):l.left<=c.left?this.toggleDropdown(s):l.left>=c.left+t.offsetWidth?this.toggleDropdown(s):this.setAlignment(s,h.get(s))}},_onScroll:function(){d.forEach(function(e,t){e.classList.contains("dropdownOpen")&&(elDataBool(e,"is-overlay-dropdown-button")?this.setAlignment(e,h.get(t)):this.close(t))}.bind(this))},_notifyCallbacks:function(e,t){c.forEach(e,function(n){n(e,t)})},_toggle:function(e,t,n){null!==e&&(e.preventDefault(),e.stopPropagation(),t=elData(e.currentTarget,"target"));var i=d.get(t),o=!1;if(void 0!==i){if(e){var r=e.currentTarget,s=r.parentNode;s!==i&&(s.classList.add("dropdown"),s.id=i.id,i.classList.remove("dropdown"),i.id="",i=s,d.set(t,s))}if(elDataBool(i,"dropdown-prevent-toggle")&&i.classList.contains("dropdownOpen")&&(o=!0),null===elData(i,"is-overlay-dropdown-button")){var l=a.parentByClass(i,"dialogContent");elData(i,"is-overlay-dropdown-button",null!==l),null!==l&&l.addEventListener("scroll",this._onDialogScroll.bind(this))}}return d.forEach(function(e,i){var a=h.get(i);if(e.classList.contains("dropdownOpen"))o===!1&&(e.classList.remove("dropdownOpen"),a.classList.remove("dropdownOpen"),this._notifyCallbacks(i,"close"));else if(i===t&&a.childElementCount>0){if(e.classList.add("dropdownOpen"),a.classList.add("dropdownOpen"),a.childElementCount&&elDataBool(a.children[0],"scroll-to-active")){var r=a.children[0];r.removeAttribute("data-scroll-to-active");for(var s=null,l=0,c=r.childElementCount;lu.clientHeight?"add":"remove"]("forceScrollbar"),this._notifyCallbacks(i,"open"),this.setAlignment(e,a,n)}}.bind(this)),window.WCF.Dropdown.Interactive.Handler.closeAll(),null===e}}}),define("WoltLabSuite/Core/Ui/Dialog",["enquire","Ajax","Core","Dictionary","Environment","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/Screen","Ui/SimpleDropdown"],function(e,t,n,i,o,a,r,s,l,c,u,d,h){"use strict";var f=null,p=null,m=new i,g=new r,v=!1,b=null,_=elByClass("jsStaticDialog");return{setup:function(){void 0===t&&(t=require("Ajax")),p=elCreate("div"),p.classList.add("dialogOverlay"),elAttr(p,"aria-hidden","true"),p.addEventListener(WCF_CLICK_EVENT,this._closeOnBackdrop.bind(this)),p.addEventListener("wheel",function(e){e.target===p&&e.preventDefault()}),elById("content").appendChild(p),b=function(e){return 27!==e.keyCode||"INPUT"===e.target.nodeName||"TEXTAREA"===e.target.nodeName||(this.close(f),!1)}.bind(this),d.on("screen-xs",{match:function(){v=!0},unmatch:function(){v=!1},setup:function(){v=!0}}),this._initStaticDialogs(),s.add("Ui/Dialog",this._initStaticDialogs.bind(this)),d.setDialogContainer(p),"ios"===o.platform()&&window.addEventListener("resize",function(){m.forEach(function(e){elAttrBool(e.dialog,"aria-hidden")||this.rebuild(elData(e.dialog,"id"))}.bind(this))}.bind(this))},_initStaticDialogs:function(){for(var e,t,n;_.length;)e=_[0],e.classList.remove("jsStaticDialog"),n=elData(e,"dialog-id"),n&&(t=elById(n))&&function(e,t){t.classList.remove("jsStaticDialogContent"),elHide(t),e.addEventListener(WCF_CLICK_EVENT,this.openStatic.bind(this,t.id,null,{title:elData(t,"title")}))}.bind(this)(e,t)},open:function(e,i){var o=g.get(e);if(n.isPlainObject(o))return this.openStatic(o.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()'.");o={id:a.id};var r=!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),s.removeAttribute("id"),elShow(s)}else if(null===a.source)a.source=i;else if("function"==typeof a.source)a.source();else if(n.isPlainObject(a.source)){if("string"!=typeof i||""===i.trim())return 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(m.get(a.id).content,t))}.bind(this)),{};a.source=i}else{if("string"==typeof a.source){var s=elCreate("div");elAttr(s,"id",a.id),c.setInnerHtml(s,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.");r=!1}return g.set(e,o),this.openStatic(a.id,a.source,a.options,r)},openStatic:function(e,t,i,r){document.documentElement.classList.add("pageOverlayActive"),m.has(e)?this._updateDialog(e,t):(i=n.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:a.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},i),i.closable||(i.backdropCloseOnClick=!1),i.closeConfirmMessage&&(i.onBeforeClose=function(e){u.show({confirm:this.close.bind(this,e),message:i.closeConfirmMessage})}.bind(this)),this._createDialog(e,t,i));var s=m.get(e);return"ios"===o.platform()?(d.scrollDisable(),window.setTimeout(function(){var e=elBySel("input, textarea",s.content);null!==e&&e.focus()}.bind(this),200)):"desktop"!==o.platform()&&d.scrollDisable(),s},setTitle:function(e,t){if("object"==typeof e){var n=g.get(e);void 0!==n&&(e=n.id)}var i=m.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");var o=elByClass("dialogTitle",i.dialog);o.length&&(o[0].textContent=t)},_createDialog:function(e,t,n,i){var o=null;if(null===t&&(o=elById(e),null===o))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"),elData(a,"id",e);var r=elCreate("header");a.appendChild(r);var s=c.getUniqueId();elAttr(a,"aria-labelledby",s);var l=elCreate("span");if(l.classList.add("dialogTitle"),l.textContent=n.title,elAttr(l,"id",s),r.appendChild(l),n.closable){var u=elCreate("a");u.className="dialogCloseButton jsTooltip",elAttr(u,"title",n.closeButtonLabel),elAttr(u,"aria-label",n.closeButtonLabel), +u.addEventListener(WCF_CLICK_EVENT,this._close.bind(this)),r.appendChild(u);var d=elCreate("span");d.className="icon icon24 fa-times",u.appendChild(d)}var h=elCreate("div");h.classList.add("dialogContent"),n.disableContentPadding&&h.classList.add("dialogContentNoPadding"),a.appendChild(h),h.addEventListener("wheel",function(e){for(var t,n,i,o=!1,a=e.target;;){if(t=a.clientHeight,n=a.scrollHeight,t0&&i>0){o=!0;break}if(e.wheelDelta<0&&i+t1?(f=elCreate("div"),f.id=e,f.appendChild(t)):f=t}}else f=o;h.appendChild(f),"none"===f.style.getPropertyValue("display")&&elShow(f),m.set(e,{backdropCloseOnClick:n.backdropCloseOnClick,content:f,dialog:a,header:r,onBeforeClose:n.onBeforeClose,onClose:n.onClose,onShow:n.onShow}),c.prepend(a,p),"function"==typeof n.onSetup&&n.onSetup(f),i!==!0&&this._updateDialog(e,null)},_updateDialog:function(e,t){var n=m.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&&c.setInnerHtml(n.content,t),"true"===elAttr(n.dialog,"aria-hidden")){"true"===elAttr(p,"aria-hidden")&&window.addEventListener("keyup",b),elAttr(n.dialog,"aria-hidden","false"),elAttr(p,"aria-hidden","false"),elData(p,"close-on-click",n.backdropCloseOnClick?"true":"false"),f=e;var i=elBySel(".jsDialogAutoFocus",n.dialog);null!==i&&null!==i.offsetParent&&i.focus(),"function"==typeof n.onShow&&n.onShow(n.content),h.closeAll(),window.WCF.Dropdown.Interactive.Handler.closeAll()}this.rebuild(e),s.trigger()},rebuild:function(e){var t=m.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+=c.outerHeight(i),a-=1,n.style.setProperty("margin-bottom",a+"px","")):(n.classList.remove("dialogForm"),n.style.removeProperty("margin-bottom")),a+=c.outerHeight(t.header);var r=window.innerHeight*(v?1:.8)-a;if(n.style.setProperty("max-height",~~r+"px",""),"chrome"===o.browser()&&(t.content.scrollHeight>r?t.content.style.setProperty("margin-right","-1px",""):t.content.style.removeProperty("margin-right")),"chrome"===o.browser()||"safari"===o.browser()){var s=parseFloat(window.getComputedStyle(t.content).width),l=Math.round(s)%2!==0;t.content.classList[l?"add":"remove"]("jsWebKitFractionalPixel")}}},_close:function(e){e.preventDefault();var t=m.get(f);return"function"==typeof t.onBeforeClose?(t.onBeforeClose(f),!1):void this.close(f)},_closeOnBackdrop:function(e){return e.target!==p||void("true"===elData(p,"close-on-click")?this._close(e):e.preventDefault())},close:function(e){if("object"==typeof e){var t=g.get(e);void 0!==t&&(e=t.id)}var n=m.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");elAttr(n.dialog,"aria-hidden","true"),"function"==typeof n.onClose&&n.onClose(e),f=null;for(var i=0;i=200&&this.status<300||304===this.status?i.responseType&&0!==this.getResponseHeader("Content-Type").indexOf(i.responseType)?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 o=this._options.data;"object"==typeof o&&"FormData"!==e.getType(o)&&(o=e.serialize(o)),this._xhr.send(o)}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 objOwns(this._options,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(n){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 r=null;try{r=JSON.parse(e.responseText)}catch(e){}var s=!0;if("function"==typeof n.failure&&(s=n.failure(r||{},e.responseText||"",e,n.data)),n.ignoreError!==!0&&s!==!1){var c="",u="";if(null!==r?(r.stacktrace?c="

              Stacktrace:

              "+r.stacktrace+"

              ":r.exceptionID&&(c="

              Exception ID: "+r.exceptionID+"

              "),u=r.message,r.previous.forEach(function(e){c+="

              "+e.message+"

              ",c+="

              Stacktrace

              "+e.stacktrace+"

              "})):u=e.responseText,!u||"undefined"===u)return;var d='

              '+u+"

              "+c+"
              ";void 0===o&&(o=require("Ui/Dialog")),o.openStatic(i.getUniqueId(),d,{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,o=t.length;i=0,v.ie=!1,v.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,v.supported=v.chrome||v.ff||v.opera;var w=[];m=function(){},h=g=!1;var C=function(){a=i(y,e),a.bgColor=n(a.bgColor),a.textColor=n(a.textColor),a.position=a.position.toLowerCase(),a.animation=M.types[""+a.animation]?a.animation:y.animation;var t=a.position.indexOf("up")>-1,o=a.position.indexOf("left")>-1;if(t||o)for(var h=0;h0?d.height:32,l=d.width>0?d.width:32,c.height=s,c.width=l,u=c.getContext("2d"),L.ready()}):(d.setAttribute("src",""),s=32,l=32,d.height=s,d.width=l,c.height=s,c.width=l,u=c.getContext("2d"),L.ready())},L={};L.ready=function(){h=!0,L.reset(),m()},L.reset=function(){h&&(w=[],f=!1,p=!1,u.clearRect(0,0,l,s),u.drawImage(d,0,0,l,s),I.setIcon(c),window.clearTimeout(b),window.clearTimeout(_))},L.start=function(){if(h&&!p){var e=function(){f=w[0],p=!1,w.length>0&&(w.shift(),L.start())};if(w.length>0){p=!0;var t=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(e){e in w[0].options&&(a[e]=w[0].options[e])}),M.run(w[0].options,function(){e()},!1)};f?M.run(f.options,function(){t()},!0):t()}}};var S={},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};S.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()},S.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 x=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&&M.types[""+t.animation]&&(i.options.animation=""+t.animation),"type"in t&&S[""+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])}),w.push(i),w.length>100)throw"Too many badges requests in queue.";L.start()}else L.reset()}catch(e){throw"Error setting badge. Message: "+e.message}},h&&m()},D=function(e){m=function(){try{var t=e.width,n=e.height,i=document.createElement("img"),o=t/l=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},I.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=r;r=document.createElement("link"),v.opera&&r.setAttribute("rel","icon"),r.setAttribute("rel","icon"),r.setAttribute("type","image/png"),document.getElementsByTagName("head")[0].appendChild(r),r.setAttribute("href",t),n.parentNode&&n.parentNode.removeChild(n)}else r.setAttribute("href",t)};var M={};return M.duration=40,M.types={},M.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}],M.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],M.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}],M.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}],M.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}],M.run=function(e,t,n,r){var s=M.types[o()?"none":a.animation];return r=n===!0?"undefined"!=typeof r?r:s.length-1:"undefined"!=typeof r?r:0,t=t?t:function(){},r=0?(S[a.type](i(e,s[r])),b=setTimeout(function(){n?r-=1:r+=1,M.run(e,t,n,r)},M.duration),I.setIcon(c),void 0):void t()},C(),{badge:x,video:T,image:D,webcam:k,reset:L.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 o(r,s){if(!n[r]){if(!t[r]){var l="function"==typeof require&&require;if(!s&&l)return l(r,!0);if(a)return a(r,!0);var c=new Error("Cannot find module '"+r+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[r]={exports:{}};t[r][0].call(u.exports,function(e){var n=t[r][1][e];return o(n?n:e)},u,u.exports,e,t,n,i)}return n[r].exports}for(var a="function"==typeof require&&require,r=0;r=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):o(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 o(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):o(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)||(this.element.removeEventListener(e,i,!1),!1)},this)},i.prototype.unbindAll=function(){for(var e in this.events)this.unbind(e)};var o=function(){this.eventElements=[]};o.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},o.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},o.prototype.unbind=function(e,t,n){this.eventElement(e).unbind(t,n)},o.prototype.unbindAll=function(){for(var e=0;e1&&(c=1),e.scrollTop=(t.contentHeight-t.containerHeight)*c,r(e)}),t.event.bind(t.scrollbarX,"click",i),t.event.bind(t.scrollbarXRail,"click",function(i){var a=o.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;c<0?c=0:c>1&&(c=1),e.scrollLeft=(t.contentWidth-t.containerWidth)*c,r(e)})}var o=e("../../lib/helper"),a=e("../instances"),r=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 o=i+n,a=t.containerWidth-t.scrollbarXWidth;o<0?t.scrollbarXLeft=0:o>a?t.scrollbarXLeft=a:t.scrollbarXLeft=o;var s=r.toInt(t.scrollbarXLeft*(t.contentWidth-t.containerWidth)/(t.containerWidth-t.scrollbarXWidth));e.scrollLeft=s}var i=null,o=null,s=function(t){n(t.pageX-o),l(e),t.stopPropagation(),t.preventDefault()},c=function(){r.stopScrolling(e,"x"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarX,"mousedown",function(n){o=n.pageX,i=r.toInt(a.css(t.scrollbarX,"left")),r.startScrolling(e,"x"),t.event.bind(t.ownerDocument,"mousemove",s),t.event.once(t.ownerDocument,"mouseup",c),n.stopPropagation(),n.preventDefault()})}function o(e,t){function n(n){var o=i+n,a=t.containerHeight-t.scrollbarYHeight;o<0?t.scrollbarYTop=0:o>a?t.scrollbarYTop=a:t.scrollbarYTop=o;var s=r.toInt(t.scrollbarYTop*(t.contentHeight-t.containerHeight)/(t.containerHeight-t.scrollbarYHeight));e.scrollTop=s}var i=null,o=null,s=function(t){n(t.pageY-o),l(e),t.stopPropagation(),t.preventDefault()},c=function(){r.stopScrolling(e,"y"),t.event.unbind(t.ownerDocument,"mousemove",s)};t.event.bind(t.scrollbarY,"mousedown",function(n){o=n.pageY,i=r.toInt(a.css(t.scrollbarY,"top")),r.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"),r=e("../../lib/helper"),s=e("../instances"),l=e("../update-geometry");t.exports=function(e){var t=s.get(e);i(e,t),o(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 o=e.scrollTop;if(0===n){if(!t.scrollbarYActive)return!1;if(0===o&&i>0||o>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var a=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===a&&n<0||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(o.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,r(e),a=n(c,u),a&&s.preventDefault()}})}var o=e("../../lib/helper"),a=e("../instances"),r=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 o=e.scrollTop;if(0===n){if(!t.scrollbarYActive)return!1;if(0===o&&i>0||o>=t.contentHeight-t.containerHeight&&i<0)return!t.settings.wheelPropagation}var a=e.scrollLeft;if(0===i){if(!t.scrollbarXActive)return!1;if(0===a&&n<0||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 o=i.scrollHeight-i.clientHeight;if(o>0&&!(0===i.scrollTop&&n>0||i.scrollTop===o&&n<0))return!0;var a=i.scrollLeft-i.clientWidth;if(a>0&&!(0===i.scrollLeft&&t<0||i.scrollLeft===a&&t>0))return!0}return!1}function s(s){if(o.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),r(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 o=e("../../lib/helper"),a=e("../instances"),r=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 o=e("../instances"),a=e("../update-geometry");t.exports=function(e){var t=o.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 r(e)):void clearInterval(l)},50))}function s(){l&&(clearInterval(l),l=null),o.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.xa.right-3?(c.left=5,o.startScrolling(e,"x")):c.left=0,n.ya.bottom-3?(n.y-a.bottom+3<5?c.top=5:c.top=20,o.startScrolling(e,"y")):c.top=0,0===c.top&&0===c.left?s():i()}})}var o=e("../../lib/helper"),a=e("../instances"),r=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 r(n,i){var o=e.scrollTop,a=e.scrollLeft,r=Math.abs(n),s=Math.abs(i);if(s>r){if(i<0&&o===t.contentHeight-t.containerHeight||i>0&&0===o)return!t.settings.swipePropagation}else if(r>s&&(n<0&&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(){_=!0}function c(){_=!1}function u(e){return e.targetTouches?e.targetTouches[0]:e}function d(e){return!(!e.targetTouches||1!==e.targetTouches.length)||!(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE)}function h(e){if(d(e)){y=!0;var t=u(e);m.pageX=t.pageX,m.pageY=t.pageY,g=(new Date).getTime(),null!==b&&clearInterval(b),e.stopPropagation()}}function f(e){if(!_&&y&&d(e)){var t=u(e),n={pageX:t.pageX,pageY:t.pageY},i=n.pageX-m.pageX,o=n.pageY-m.pageY;s(i,o),m=n;var a=(new Date).getTime(),l=a-g;l>0&&(v.x=i/l,v.y=o/l,g=a),r(i,o)&&(e.stopPropagation(),e.preventDefault())}}function p(){!_&&y&&(y=!1,clearInterval(b),b=setInterval(function(){return o.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,_=!1,y=!1;n&&(t.event.bind(window,"touchstart",l),t.event.bind(window,"touchend",c),t.event.bind(e,"touchstart",h),t.event.bind(e,"touchmove",f),t.event.bind(e,"touchend",p)),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",f),t.event.bind(e,"pointerup",p)):window.MSPointerEvent&&(t.event.bind(window,"MSPointerDown",l),t.event.bind(window,"MSPointerUp",c),t.event.bind(e,"MSPointerDown",h),t.event.bind(e,"MSPointerMove",f),t.event.bind(e,"MSPointerUp",p)))}var o=e("../instances"),a=e("../update-geometry");t.exports=function(e,t,n){var a=o.get(e);i(e,a,t,n)}},{"../instances":18,"../update-geometry":19}],17:[function(e,t,n){"use strict";var i=e("../lib/class"),o=e("../lib/helper"),a=e("./instances"),r=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"),f=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=o.extend(n.settings,t),s(e),l(e),u(e),d(e),h(e),(o.env.supportsTouch||o.env.supportsIePointer)&&f(e,o.env.supportsTouch,o.env.supportsIePointer),n.settings.useKeyboard&&c(e),r(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 o(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 r(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[o(e)],r(e)},n.get=function(e){return h[o(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 o(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,r.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,r.css(t.scrollbarYRail,i),r.css(t.scrollbarX,{left:t.scrollbarXLeft,width:t.scrollbarXWidth-t.railBorderXWidth}),r.css(t.scrollbarY,{top:t.scrollbarYTop,height:t.scrollbarYHeight-t.railBorderYWidth})}var a=e("../lib/class"),r=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)||r.appendTo(t.scrollbarXRail,e),e.contains(t.scrollbarYRail)||r.appendTo(t.scrollbarYRail,e),!t.settings.suppressScrollX&&t.containerWidth+t.settings.scrollXMarginOffset=t.railXWidth-t.scrollbarXWidth&&(t.scrollbarXLeft=t.railXWidth-t.scrollbarXWidth),t.scrollbarYTop>=t.railYHeight-t.scrollbarYHeight&&(t.scrollbarYTop=t.railYHeight-t.scrollbarYHeight),o(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"),o=e("./instances"),a=e("./update-geometry");t.exports=function(e){var t=o.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("WoltLabSuite/Core/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,o="";"c"===n&&(n="Y-m-dTH:i:sP");for(var a=0,r=n.length;a11?"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;case"\\":i="",a+1(new Date).getTime()&&elData(t,"is-future-date","true"),t},getTimezoneDate:function(e,t){var n=new Date(e),i=6e4*n.getTimezoneOffset();return new Date(e+i+t)}};return t}),define("WoltLabSuite/Core/Timer/Repeating",[],function(){"use strict";function e(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||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("WoltLabSuite/Core/Date/Time/Relative",["Dom/ChangeListener","Language","WoltLabSuite/Core/Date/Util","WoltLabSuite/Core/Timer/Repeating"],function(e,t,n,i){"use strict";var o=elByTag("time"),a=null;return{setup:function(){this._refresh(),new i(this._refresh.bind(this),6e4),e.add("WoltLabSuite/Core/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 r=0,s=o.length;r=i||i1)return void(u&&e.triggerEvent(document,"touchend"));if(!u&&(s||l)){if(document.documentElement.classList.contains("pageOverlayActive")){for(var d=!1,h=0;hi.x+100&&this.close(),"right"===u&&o>i.x-100&&this.close()),i=null,u=""}}.bind(this)),document.addEventListener("touchmove",function(e){if(u&&null!==i){var o=e.touches,s=!1,l=!1;"left"===u&&(s=o[0].clientX>i.x+a),"right"===u&&(s=o[0].clientXr;var c=this._menu.classList.contains("open");if(c||!s||l||(this.open(),c=!0),c){var d=o[0].clientX;"right"===t&&(d=document.body.clientWidth-d),d>this._menu.offsetWidth&&(d=this._menu.offsetWidth),d<0&&(d=0),this._menu.style.setProperty("transform","translateX("+("left"===t?1:-1)*(d-this._menu.offsetWidth)+"px)"),n.style.setProperty(t,Math.min(this._menu.offsetWidth,d)+"px")}}}.bind(this))},_initItems:function(){elBySelAll(".menuOverlayItemLink",this._menu,this._initItem.bind(this))},_initItem:function(e){var t=e.parentNode,i=elData(t,"more");if(i)return void e.addEventListener(WCF_CLICK_EVENT,function(o){o.preventDefault(),o.stopPropagation(),n.fire(this._eventIdentifier,"more",{handler:this,identifier:i,item:e,parent:t})}.bind(this));var o,r=e.nextElementSibling;if(null!==r)if("OL"!==r.nodeName&&r.classList.contains("menuOverlayItemLinkIcon"))for(o=elCreate("span"),o.className="menuOverlayItemWrapper",t.insertBefore(o,e),o.appendChild(e);o.nextElementSibling;)o.appendChild(o.nextElementSibling);else{var s="#"!==elAttr(e,"href"),l=t.parentNode,c=elData(r,"title");this._items.set(e,{itemList:r,parentItemList:l}),""===c&&(c=a.childByClass(e,"menuOverlayItemTitle").textContent,elData(r,"title",c));var u=this._showItemList.bind(this,e);if(s){o=elCreate("span"),o.className="menuOverlayItemWrapper",t.insertBefore(o,e),o.appendChild(e);var d=elCreate("a");elAttr(d,"href","#"),d.className="menuOverlayItemLinkIcon"+(e.classList.contains("active")?" active":""),d.innerHTML='',d.addEventListener(WCF_CLICK_EVENT,u),o.appendChild(d)}else e.classList.add("menuOverlayItemLinkMore"),e.addEventListener(WCF_CLICK_EVENT,u);var h=elCreate("li");h.className="menuOverlayHeader",o=elCreate("span"),o.className="menuOverlayItemWrapper";var f=elCreate("a");elAttr(f,"href","#"),f.className="menuOverlayItemLink menuOverlayBackLink",f.textContent=elData(l,"title"),f.addEventListener(WCF_CLICK_EVENT,this._hideItemList.bind(this,e));var p=elCreate("a");if(elAttr(p,"href","#"),p.className="menuOverlayItemLinkIcon",p.innerHTML='',p.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),o.appendChild(f),o.appendChild(p),h.appendChild(o),r.insertBefore(h,r.firstElementChild),!h.nextElementSibling.classList.contains("menuOverlayTitle")){var m=elCreate("li");m.className="menuOverlayTitle";var g=elCreate("span");g.textContent=c,m.appendChild(g),r.insertBefore(m,h.nextElementSibling)}}},_initHeader:function(){var e=elCreate("li");e.className="menuOverlayHeader";var t=elCreate("span");t.className="menuOverlayItemWrapper",e.appendChild(t);var n=elCreate("span");n.className="menuOverlayLogoWrapper",t.appendChild(n);var i=elCreate("span");i.className="menuOverlayLogo",i.style.setProperty("background-image",'url("'+elData(this._menu,"page-logo")+'")',""),n.appendChild(i);var o=elCreate("a");elAttr(o,"href","#"),o.className="menuOverlayItemLinkIcon",o.innerHTML='',o.addEventListener(WCF_CLICK_EVENT,this.close.bind(this)),t.appendChild(o);var r=a.childByClass(this._menu,"menuOverlayItemList");r.insertBefore(e,r.firstElementChild)},_hideItemList:function(e,t){t instanceof Event&&t.preventDefault(),this._menu.classList.remove("allowScroll"),this._removeActiveList=!0;var n=this._items.get(e);n.parentItemList.classList.remove("hidden"),this._updateDepth(!1)},_showItemList:function(e,t){t instanceof Event&&t.preventDefault();var i=this._items.get(e),o=elData(i.itemList,"load");if(o&&!elDataBool(e,"loaded")){var a=t.currentTarget.firstElementChild;return a.classList.contains("fa-angle-right")&&(a.classList.remove("fa-angle-right"),a.classList.add("fa-spinner")),void n.fire(this._eventIdentifier,"load_"+o)}this._menu.classList.remove("allowScroll"),i.itemList.classList.add("activeList"),i.parentItemList.classList.add("hidden"),this._activeList.push(i.itemList),this._updateDepth(!0)},_updateDepth:function(e){this._depth+=e?1:-1;var t=this._depth*-100;"rtl"===i.get("wcf.global.pageDirection")&&(t*=-1),this._menu.children[0].style.setProperty("transform","translateX("+t+"%)","")},_updateButtonState:function(){var e=!1;elBySelAll(".badgeUpdate",this._menu,function(t){~~t.textContent>0&&(e=!0)}),this._button.classList[e?"add":"remove"]("pageMenuMobileButtonHasContent")}},l}),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["Core","Dom/Traverse","./Abstract"],function(e,t,n){"use strict";function i(){this.init()}var o=null,a=null,r=null,s=null;return e.inherit(i,n,{init:function(){i._super.prototype.init.call(this,"com.woltlab.wcf.MainMenuMobile","pageMainMenuMobile","#pageHeader .mainMenu"),o=elById("pageMainMenuMobilePageOptionsContainer"),null!==o&&(r=t.childByClass(o,"menuOverlayItemList"),s=elBySel(".jsPageNavigationIcons"),elRemove(t.childByClass(r,"jsMenuOverlayItemPlaceholder")),r.addEventListener("click",function(e){e.target!==r&&null!==t.parentByClass(e.target,"menuOverlayItem",r)&&(this.close(),e.stopPropagation())}.bind(this)))},open:function(e){if(!i._super.prototype.open.call(this,e))return!1;if(null===o)return!0;if(a=s.childElementCount>0){for(var t,n;s.childElementCount;)t=s.children[0],t.classList.add("menuOverlayItem"),n=t.children[0],n.classList.add("menuOverlayItemLink"),n.classList.add("box24"),n.children[1].classList.remove("invisible"),n.children[1].classList.add("menuOverlayItemTitle"),r.appendChild(t);elShow(o)}else elHide(o);return!0},close:function(e){if(!i._super.prototype.close.call(this,e))return!1;if(a){elHide(o);for(var n,l,c=t.childByClass(r,"menuOverlayTitle");n=c.nextElementSibling;)n.classList.remove("menuOverlayItem"),l=n.children[0],l.classList.remove("menuOverlayItemLink"),l.classList.remove("box24"),l.children[1].classList.add("invisible"),l.children[1].classList.remove("menuOverlayItemTitle"),s.appendChild(n)}return!0}}),i}),define("WoltLabSuite/Core/Ui/Page/Menu/User",["Core","EventHandler","./Abstract"],function(e,t,n){"use strict";function i(){this.init()}return e.inherit(i,n,{init:function(){var e=elBySel("#pageUserMenuMobile > .menuOverlayItemList");return 1===e.childElementCount&&e.children[0].classList.contains("menuOverlayTitle")?void elBySel("#pageHeader .userPanel").classList.add("hideUserPanel"):(i._super.prototype.init.call(this,"com.woltlab.wcf.UserMenuMobile","pageUserMenuMobile","#pageHeader .userPanel"),void t.add("com.woltlab.wcf.userMenu","updateBadge",function(e){elBySelAll(".menuOverlayItemBadge",this._menu,function(t){if(elData(t,"badge-identifier")===e.identifier){var n=elBySel(".badge",t);e.count?(null===n&&(n=elCreate("span"),n.className="badge badgeUpdate",t.appendChild(n)),n.textContent=e.count):null!==n&&elRemove(n),this._updateButtonState()}}.bind(this))}.bind(this)))},close:function(e){var t=WCF.Dropdown.Interactive.Handler.getOpenDropdown();t?(e.preventDefault(),e.stopPropagation(),t.close()):i._super.prototype.close.call(this,e)}}),i}),define("WoltLabSuite/Core/Ui/Mobile",["Core","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Ui/CloseOverlay","Ui/Screen","./Page/Menu/Main","./Page/Menu/User"],function(e,t,n,i,o,a,r,s,l,c,u){"use strict";var d=elByClass("buttonGroupNavigation"),h=!1,f=new o,p=null,m=elByClass("message"),g={},v=null,b=null,_=null;return{setup:function(n){g=e.extend({enableMobileMenu:!0},n),p=elById("main"),t.touch()&&document.documentElement.classList.add("touch"),"desktop"!==t.platform()&&document.documentElement.classList.add("mobile");var i=elBySel(".messageGroupList");i&&(_=elByClass("messageGroup",i)),l.on("screen-md-down",{match:this.enable.bind(this),unmatch:this.disable.bind(this),setup:this._init.bind(this)}),l.on("screen-sm-down",{match:this.enableShadow.bind(this),unmatch:this.disableShadow.bind(this),setup:this.enableShadow.bind(this)})},enable:function(){h=!0,g.enableMobileMenu&&(v.enable(),b.enable())},enableShadow:function(){_&&this.rebuildShadow(_,".messageGroupLink")},disable:function(){h=!1,g.enableMobileMenu&&(v.disable(),b.disable())},disableShadow:function(){_&&this.removeShadow(_)},_init:function(){h=!0,this._initSearchBar(),this._initButtonGroupNavigation(),this._initMessages(),this._initMobileMenu(),s.add("WoltLabSuite/Core/Ui/Mobile",this._closeAllMenus.bind(this)),a.add("WoltLabSuite/Core/Ui/Mobile",function(){this._initButtonGroupNavigation(),this._initMessages()}.bind(this))},_initSearchBar:function(){var e=elById("pageHeaderSearch"),i=elById("pageHeaderSearchInput"),o=null;n.add("com.woltlab.wcf.MainMenuMobile","more",function(n){"com.woltlab.wcf.search"===n.identifier&&(n.handler.close(!0),"ios"===t.platform()&&(o=document.body.scrollTop,l.scrollDisable()),e.style.setProperty("top",elById("pageHeader").offsetHeight+"px",""),e.classList.add("open"),i.focus(),"ios"===t.platform()&&(document.body.scrollTop=0))}),p.addEventListener(WCF_CLICK_EVENT,function(){e&&e.classList.remove("open"),"ios"===t.platform()&&null!==o&&(l.scrollEnable(),document.body.scrollTop=o,o=null)})},_initButtonGroupNavigation:function(){for(var e=0,t=d.length;e 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&&(elData(this._container,"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(elData(t,"name"))===t||t.children[0].addEventListener(WCF_CLICK_EVENT,this._onClick.bind(this))}.bind(this));var t=null;if(!e){var n=o.getIdentifierFromHash(),i=null;if(""!==n&&(i=this._tabs.get(n),i&&this._container.parentNode.classList.contains("tabMenuContainer")&&(t=this._container)),!i){var a=elData(this._container,"preselect")||elData(this._container,"active");"true"!==a&&a||(a=!0),a===!0?this._tabs.forEach(function(e){i||e.previousElementSibling||(i=e)}):"false"!==a&&(i=this._tabs.get(a))}i&&(this._containers.forEach(function(e){e.classList.add("hidden")}),this.select(null,i,!0));var r=elData(this._container,"store");if(r){var s=elCreate("input");s.type="hidden",s.name=r,s.value=elData(this.getActiveTab(),"name"),this._container.appendChild(s),this._store=s}}return t},select:function(e,n,i){if(n=n||this._tabs.get(e),!n){if(~~e==e){e=~~e;var a=0;this._tabs.forEach(function(t){a===e&&(n=t),a++})}if(!n)throw new Error("Expected a valid tab name, '"+e+"' given (tab menu id: '"+this._container.id+"')."); +}e=e||elData(n,"name");var r=this.getActiveTab(),s=null;if(r){var l=elData(r,"name");if(l===e)return;i||t.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"beforeSelect",{tab:r,tabName:l}),r.classList.remove("active"),s=this._containers.get(elData(r,"name")),s.classList.remove("active"),s.classList.add("hidden"),this._isLegacy&&(r.classList.remove("ui-state-active"),s.classList.remove("ui-state-active"))}n.classList.add("active");var c=this._containers.get(e);if(c.classList.add("active"),c.classList.remove("hidden"),this._isLegacy&&(n.classList.add("ui-state-active"),c.classList.add("ui-state-active")),this._store&&(this._store.value=e),!i){t.fire("com.woltlab.wcf.simpleTabMenu_"+this._container.id,"select",{active:n,activeName:e,previous:r,previousName:r?elData(r,"name"):null});var u=this._isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;u&&u(this._container).trigger("wcftabsbeforeactivate",{newTab:u(n),oldTab:u(r),newPanel:u(c),oldPanel:u(s)});var d=window.location.href.replace(/#[^#]+$/,"");d+=o.getIdentifierFromHash()===e?window.location.hash:"#"+e,window.history.replaceState(void 0,void 0,d)}require(["WoltLabSuite/Core/Ui/TabMenu"],function(e){e.scrollToTab(n)})},rebuild:function(){var t=new e;t.merge(this._tabs),this.validate(),this.init(t)},hasTab:function(e){return this._tabs.has(e)},_onClick:function(e){e.preventDefault(),this.select(null,e.currentTarget.parentNode)},_getTabName:function(e){var t=elData(e,"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,elData(e,"name",t))),t},getActiveTab:function(){return elBySel("#"+this._container.id+" > nav > ul > li.active")},getContainers:function(){return this._containers},getTabs:function(){return this._tabs}},o.getIdentifierFromHash=function(){return window.location.hash.match(/^#([^\/]+)+(?:\/.+)?/)?RegExp.$1:""},o}),define("WoltLabSuite/Core/Ui/TabMenu",["Dictionary","EventHandler","Dom/ChangeListener","Dom/Util","Ui/CloseOverlay","Ui/Screen","./TabMenu/Simple"],function(e,t,n,i,o,a,r){"use strict";var s=null,l=!1,c=new e;return{setup:function(){this._init(),this._selectErroneousTabs(),n.add("WoltLabSuite/Core/Ui/TabMenu",this._init.bind(this)),o.add("WoltLabSuite/Core/Ui/TabMenu",function(){s&&(s.classList.remove("active"),s=null)}),a.on("screen-sm-down",{enable:this._scrollEnable.bind(this,!1),disable:this._scrollDisable.bind(this),setup:this._scrollEnable.bind(this,!0)}),window.addEventListener("hashchange",function(){var e=r.getIdentifierFromHash(),t=e?elById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&c.forEach(function(t){t.hasTab(e)&&t.select(e)})});var e=r.getIdentifierFromHash();e&&window.setTimeout(function(){var t=elById(e);if(t&&t.classList.contains("tabMenuContent")){var n=window.scrollY||window.pageYOffset;if(n>0){var o=t.parentNode,a=o.offsetTop-50;if(a<0&&(a=0),n>a){var r=i.offset(o).top;r<=50?r=0:r-=50,window.scrollTo(0,r)}}}},100)},_init:function(){for(var e,t,n,o,a,l=elBySelAll(".tabMenuContainer:not(.staticTabMenuContainer)"),u=0,d=l.length;u nav > ul"),function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),t.stopPropagation(),t.target===e?(e.classList.add("active"),s=e):(e.classList.remove("active"),s=null)})}(n),elBySelAll(".tabMenu, .menu",e,function(e){var t=this._rebuildMenuOverflow.bind(this,e),n=null;elBySel("ul",e).addEventListener("scroll",function(){null!==n&&window.clearTimeout(n),n=window.setTimeout(t,10)})}.bind(this))))},_selectErroneousTabs:function(){c.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 c.get(e)},_scrollEnable:function(e){l=!0,c.forEach(function(t){var n=t.getActiveTab();e?this._rebuildMenuOverflow(n.closest(".menu, .tabMenu")):this.scrollToTab(n)}.bind(this))},_scrollDisable:function(){l=!1},scrollToTab:function(e){if(l){var t=e.closest("ul"),n=t.clientWidth,i=t.scrollLeft,o=t.scrollWidth;if(n!==o){var a=e.offsetLeft,r=!1;a0&&(a-=15),a=a<0?0:Math.min(a,o-n),i===a)return;t.classList.add("enableAnimation"),i0,r=elBySel(".tabMenuOverlayLeft",e);a?(null===r&&(r=elCreate("span"),r.className="tabMenuOverlayLeft icon icon24 fa-angle-left",e.insertBefore(r,e.firstChild)),r.classList.add("active")):null!==r&&r.classList.remove("active");var s=t+i element as child of container '"+e+"'.";r.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;td)for(var g=f.length-1;g>=0;g--){var b=f[g];if(!(b.classList.contains("dropdown")||b.classList.contains("active")||b.classList.contains("ui-state-active"))&&(y.push(b),elHide(b),h.scrollWidth0?"-":"+";m=Math.abs(m);var v=Math.floor(m/60).toString(),b=(m%60).toString();g+=2===v.length?v:"0"+v,g+=":",g+=2===b.length?b:"0"+b,d?f+="T00:00:00"+g:f=f.replace(/[+-][0-9]{2}:[0-9]{2}$/,g)}h=new Date(f)}elData(a,"value",h.getTime());var _=s?"formatTime":"formatDate"+(r?"Time":"");f=e[_](h)}var y=0===f.length;if(d?(elData(a,"min-date","120"),elData(a,"max-date",(new Date).getFullYear()+"-12-31")):(a.min&&elData(a,"min-date",a.min),a.max&&elData(a,"max-date",a.max)),this._initDateRange(a,n,!0),this._initDateRange(a,n,!1),elData(a,"min-date")===elData(a,"max-date"))throw new Error("Minimum and maximum date cannot be the same (element id '"+a.id+"').");a.type="text",a.value=f,elData(a,"empty",y),elData(a,"placeholder")&&elAttr(a,"placeholder",elData(a,"placeholder"));var w=elCreate("input");w.id=a.id+"DatePicker",w.name=a.name,w.type="hidden",null!==h&&(s?w.value=e.format(h,"H:i"):u?w.value=e.format(h,"Y-m-dTH:i:s"):w.value=e.format(h,r?"c":"Y-m-d")),a.parentNode.insertBefore(w,a),a.removeAttribute("name"),a.addEventListener(WCF_CLICK_EVENT,C);var L=elCreate("div");L.className="inputAddon";var S=elCreate("a");S.className="inputSuffix button",S.addEventListener(WCF_CLICK_EVENT,C),L.appendChild(S);var E=elCreate("span");E.className="icon icon16 fa-calendar",S.appendChild(E),a.parentNode.insertBefore(L,a),L.insertBefore(a,S),c||(S=elCreate("a"),S.className="inputSuffix button",S.addEventListener(WCF_CLICK_EVENT,this.clear.bind(this,a)),y&&S.style.setProperty("visibility","hidden",""),L.appendChild(S),E=elCreate("span"),E.className="icon icon16 fa-times",S.appendChild(E));for(var x=!1,D=["tiny","short","medium","long"],T=0;T<4;T++)a.classList.contains(D[T])&&(x=!0);x||a.classList.add("short"),l.set(a,{clearButton:S,shadow:w,disableClear:c,isDateTime:r,isEmpty:y,isTimeOnly:s,ignoreTimezone:u,onClose:null})}},_initDateRange:function(e,t,n){var i="data-"+(n?"min":"max")+"-date",o=e.hasAttribute(i)?elAttr(e,i).trim():"";if(o.match(/^(\d{4})-(\d{2})-(\d{2})$/))o=new Date(o).getTime();else if("now"===o)o=t.getTime();else if(o.match(/^\d{1,3}$/)){var a=new Date(t.getTime());a.setFullYear(a.getFullYear()+~~o*(n?-1:1)),o=a.getTime()}else if(o.match(/^datePicker-(.+)$/)){if(o=RegExp.$1,null===elById(o))throw new Error("Reference date picker identified by '"+o+"' does not exists (element id: '"+e.id+"').")}else o=/^\d{4}\-\d{2}\-\d{2}T/.test(o)?new Date(o).getTime():new Date(n?1970:2038,0,1).getTime();elAttr(e,i,o)},_setup:function(){r||(r=!0,s=~~t.get("wcf.date.firstDayOfTheWeek"),C=this._open.bind(this),i.add("WoltLabSuite/Core/Date/Picker",this.init.bind(this)),a.add("WoltLabSuite/Core/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=elData(c,"value");a?(n=new Date(+a),"Invalid Date"===n.toString()&&(n=new Date)):n=new Date,d=elData(c,"min-date"),d.match(/^datePicker-(.+)$/)&&(d=elData(elById(RegExp.$1),"value")),d=new Date(+d),u=elData(c,"max-date"),u.match(/^datePicker-(.+)$/)&&(u=elData(elById(RegExp.$1),"value")),u=new Date(+u),i.isDateTime?(p.value=n.getHours(),m.value=n.getMinutes(),w.classList.add("datePickerTime")):w.classList.remove("datePickerTime"),w.classList[i.isTimeOnly?"add":"remove"]("datePickerTimeOnly"),this._renderPicker(n.getDate(),n.getMonth(),n.getFullYear()),o.set(w,c)}},_close:function(){if(null!==w&&w.classList.contains("active")){w.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="",o=d.getFullYear(),a=u.getFullYear();o<=a;o++)i+='";y.innerHTML=i,y.value=n,g.value=t,w.classList.add("active")},_renderGrid:function(e,t,n){var i,o,a=void 0!==e,r=void 0!==t;if(e=~~e||~~elData(f,"day"),t=~~t,n=~~n,r||n){var l=0!==n,c=document.createDocumentFragment();c.appendChild(f),r||(t=~~elData(f,"month")),n=n||~~elData(f,"year");var p=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(pu&&(n=u.getFullYear(),t=u.getMonth(),e=u.getDate(),g.value=t,y.value=n,l=!0),p=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-01");p.getDay()!==s;)p.setDate(p.getDate()-1);elShow(h[35].parentNode);var m,C=new Date(d.getFullYear(),d.getMonth(),d.getDate());for(o=0;o<42;o++){if(35===o&&p.getMonth()!==t){elHide(h[35].parentNode);break}i=h[o],i.textContent=p.getDate(),m=p.getMonth()===t,m&&(pu&&(m=!1)),i.classList[m?"remove":"add"]("otherMonth"),p.setDate(p.getDate()+1)}if(elData(f,"month",t),elData(f,"year",n),w.insertBefore(c,_),!a&&(p=new Date(n,t,e),p.getDate()!==e)){for(;p.getMonth()!==t;)p.setDate(p.getDate()-1);e=p.getDate()}if(l){for(o=0;o<12;o++){var L=g.children[o];L.disabled=n===d.getFullYear()&&L.valueu.getMonth()}var S=new Date(n+"-"+("0"+(t+1).toString()).slice(-2)+"-01");S.setMonth(S.getMonth()+1),v.classList[Sd?"add":"remove"]("active")}}if(e){for(o=0;o<35;o++)i=h[o],i.classList[i.classList.contains("otherMonth")||~~i.textContent!==e?"remove":"add"]("active");elData(f,"day",e)}this._formatValue()},_formatValue:function(){var t,n,i,o=l.get(c);"true"!==elData(c,"empty")&&(o.isDateTime?(t=new Date(elData(f,"year"),elData(f,"month"),elData(f,"day"),p.value,m.value),o.isTimeOnly?(n=e.formatTime(t),i=e.format(t,"H:i")):o.ignoreTimezone?(n=e.formatDateTime(t),i=e.format(t,"Y-m-dTH:i:s")):(n=e.formatDateTime(t),i=e.format(t,"c"))):(t=new Date(elData(f,"year"),elData(f,"month"),elData(f,"day")),n=e.formatDate(t),i=e.format(t,"Y-m-d")),c.value=n,elData(c,"value",t.getTime()),o.disableClear||o.clearButton.style.removeProperty("visibility"),o.shadow.value=i)},_createPicker:function(){if(null===w){w=elCreate("div"),w.className="datePicker",w.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()});var n=elCreate("header");w.appendChild(n),b=elCreate("a"),b.className="previous",b.innerHTML='',b.addEventListener(WCF_CLICK_EVENT,this.previousMonth.bind(this)),n.appendChild(b);var i=elCreate("span");n.appendChild(i),g=elCreate("select"),g.className="month",g.addEventListener("change",this._changeMonth.bind(this)),i.appendChild(g);var o,a="",r=t.get("__monthsShort");for(o=0;o<12;o++)a+='";g.innerHTML=a,y=elCreate("select"),y.className="year",y.addEventListener("change",this._changeYear.bind(this)),i.appendChild(y),v=elCreate("a"),v.className="next",v.innerHTML='',v.addEventListener(WCF_CLICK_EVENT,this.nextMonth.bind(this)),n.appendChild(v),f=elCreate("ul"),w.appendChild(f);var l=elCreate("li");l.className="weekdays",f.appendChild(l);var c,u=t.get("__daysShort");for(o=0;o<7;o++){var d=o+s;d>6&&(d-=7),c=elCreate("span"),c.textContent=u[d],l.appendChild(c)}var C,L,S=this._click.bind(this);for(o=0;o<6;o++){L=elCreate("li"),f.appendChild(L);for(var E=0;E<7;E++)C=elCreate("a"),C.addEventListener(WCF_CLICK_EVENT,S),h.push(C),L.appendChild(C)}_=elCreate("footer"),w.appendChild(_),p=elCreate("select"),p.className="hour",p.addEventListener("change",this._formatValue.bind(this));var x="",D=new Date(2e3,0,1),T=t.get("wcf.date.timeFormat").replace(/:/,"").replace(/[isu]/g,"");for(o=0;o<24;o++)D.setHours(o),x+='";for(p.innerHTML=x,_.appendChild(p),_.appendChild(document.createTextNode(" : ")),m=elCreate("select"),m.className="minute",m.addEventListener("change",this._formatValue.bind(this)),x="",o=0;o<60;o++)x+='";m.innerHTML=x,_.appendChild(m),document.body.appendChild(w)}},previousMonth:function(){"0"===g.value?(g.value=11,y.value=~~y.value-1):g.value=~~g.value-1,this._renderGrid(void 0,g.value,y.value)},nextMonth:function(){"11"===g.value?(g.value=0,y.value=~~y.value+1):g.value=~~g.value+1,this._renderGrid(void 0,g.value,y.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")||(elData(c,"empty",!1),this._renderGrid(e.currentTarget.textContent),this._close())},getDate:function(e){return e=this._getElement(e),e.hasAttribute("data-value")?new Date(+elData(e,"value")):null},setDate:function(t,n){t=this._getElement(t);var i=l.get(t);elData(t,"value",n.getTime()),t.value=e["formatDate"+(i.isDateTime?"Time":"")](n);var o="";o=i.ignoreTimezone?"Y-m-dTH:i:s":i.isDateTime?"c":"Y-m-d",i.shadow.value=e.format(n,o)},getValue:function(e){e=this._getElement(e);var t=l.get(e);return t?t.shadow.value:""},clear:function(e){e=this._getElement(e);var t=l.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||t.clearButton.style.setProperty("visibility","hidden",""),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),elRemove(n),elAttr(e,"type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener(WCF_CLICK_EVENT,C),elRemove(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=L,L}),define("WoltLabSuite/Core/Ui/Page/Action",["Dictionary","Dom/Util"],function(e,t){"use strict";var n=new e,i=null,o=!1;return{setup:function(){o=!0,i=elCreate("ul"),i.className="pageAction",document.body.appendChild(i)},add:function(e,a,r){o===!1&&this.setup();var s=elCreate("li");if(a.classList.add("button"),a.classList.add("buttonPrimary"),s.appendChild(a),elAttr(s,"aria-hidden","toTop"===e?"true":"false"),elData(s,"name",e),"toTop"===e)s.className="toTop initiallyHidden",i.appendChild(s);else{var l=null;r&&(l=n.get(r),void 0!==l&&(l=l.parentNode)),null===l&&i.childElementCount&&(l=i.children[0]),null===l?t.prepend(s,i):i.insertBefore(s,l)}n.set(e,a),this._renderContainer()},has:function(e){return n.has(e)},get:function(e){return n.get(e)},remove:function(e){var t=n.get(e);if(void 0!==t){var o=t.parentNode;o.addEventListener("animationend",function(){try{i.removeChild(o),n.delete(e)}catch(e){}}),this.hide(e)}},hide:function(e){var t=n.get(e);t&&(elAttr(t.parentNode,"aria-hidden","true"),this._renderContainer())},show:function(e){var t=n.get(e);t&&(t.parentNode.classList.contains("initiallyHidden")&&t.parentNode.classList.remove("initiallyHidden"),elAttr(t.parentNode,"aria-hidden","false"),this._renderContainer())},_renderContainer:function(){var e=!1;if(i.childElementCount)for(var t=0,n=i.childElementCount;t',i.addEventListener(WCF_CLICK_EVENT,this._jump.bind(this)),n.add("toTop",i),window.addEventListener("scroll",this._scroll.bind(this)),this._afterScroll()}},_jump:function(e){e.preventDefault(),elById("top").scrollIntoView({behavior:"smooth"})},_scroll:function(){null!==this._timeoutScroll&&window.clearTimeout(this._timeoutScroll),this._timeoutScroll=window.setTimeout(this._callbackScrollEnd,100)},_afterScroll:function(){this._timeoutScroll=null,n[window.pageYOffset>=300?"show":"hide"]("toTop")}},i}),define("WoltLabSuite/Core/Bootstrap",["favico","enquire","perfect-scrollbar","WoltLabSuite/Core/Date/Time/Relative","Ui/SimpleDropdown","WoltLabSuite/Core/Ui/Mobile","WoltLabSuite/Core/Ui/TabMenu","WoltLabSuite/Core/Ui/FlexibleMenu","Ui/Dialog","WoltLabSuite/Core/Ui/Tooltip","WoltLabSuite/Core/Language","WoltLabSuite/Core/Environment","WoltLabSuite/Core/Date/Picker","EventHandler","Core","WoltLabSuite/Core/Ui/Page/JumpToTop"],function(e,t,n,i,o,a,r,s,l,c,u,d,h,f,p,m){"use strict";return 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,window.__wcf_bc_eventHandler=f,{setup:function(e){e=p.extend({enableMobileMenu:!0},e),d.setup(),i.setup(),h.init(),o.setup(),a.setup({enableMobileMenu:e.enableMobileMenu}),r.setup(),l.setup(),c.setup(),new m;for(var t=elBySelAll("form[method=get]"),n=0,s=t.length;n li",e),n=0,i=t.length;n"+n+"

              ")),a.content=c,a.state=C,r){var u=l.get(r).element;elData(u,"cache-id")===i&&this._show()}},_mouseEnter:function(e){if(!d){null!==h&&(window.clearTimeout(h),h=null);var t=o.identify(e.currentTarget);r===t&&null!==f&&(window.clearTimeout(f),f=null),u=t,h=window.setTimeout(function(){h=null,u===t&&this._show()}.bind(this),S)}},_mouseLeave:function(){u=null,null===f&&(null===v&&(v=this._hide.bind(this)),null!==f&&window.clearTimeout(f),f=window.setTimeout(v,L))},_popoverMouseEnter:function(){null!==f&&(window.clearTimeout(f),f=null)},_show:function(){null!==f&&(window.clearTimeout(f),f=null);var e=!1;p.classList.contains("active")?r!==u&&(this._hide(),e=!0):m.childElementCount&&(e=!0),e&&(p.classList.add("forceHide"),p.offsetTop,this._clearContent(),p.classList.remove("forceHide")),r=u;var t=l.get(r);if(void 0!==t){var n=s.get(elData(t.element,"cache-id"));n.state===C?(m.appendChild(n.content),this._rebuild(r)):n.state===y&&(n.state=w,c.get(t.identifier).loadCallback(t.objectId,this))}},_hide:function(){null!==f&&(window.clearTimeout(f),f=null),p.classList.remove("active")},_clearContent:function(){if(r&&m.childElementCount&&!p.classList.contains("active"))for(var e=s.get(elData(l.get(r).element,"cache-id"));m.childNodes.length;)e.content.appendChild(m.childNodes[0])},_rebuild:function(){p.classList.contains("active")||(p.classList.remove("forceHide"),p.classList.add("active"),a.set(p,l.get(r).element,{pointer:!0,vertical:"top"}))},_ajaxSetup:function(){return{silent:!0}},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)}}}),define("WoltLabSuite/Core/Ui/User/Ignore",["List","Dom/ChangeListener"],function(e,t){"use strict";var n=function(){};return n.prototype={init:function(){},_rebuild:function(){},_removeClass:function(){}},n}),define("WoltLabSuite/Core/Ui/Page/Header/Menu",["Ui/Screen"],function(e){"use strict";var t,n,i,o,a=!1,r=0,s=[],l=[];return{init:function(){if(o=elBySel(".mainMenu .boxMenu"),i=o&&o.childElementCount?o.children[0]:null,null===i)throw new Error("Unable to find the menu.");e.on("screen-lg",{enable:this._enable.bind(this),disable:this._disable.bind(this),setup:this._setup.bind(this)})},_enable:function(){a=!0,this._rebuildVisibility(),window.setTimeout(this._rebuildVisibility.bind(this),1e3)},_disable:function(){a=!1},_showNext:function(e){if(e.preventDefault(),l.length){var i=l.slice(0,3).pop();this._setMarginLeft(o.clientWidth-(i.offsetLeft+i.clientWidth)),o.lastElementChild===i&&t.classList.remove("active"),n.classList.add("active")}},_showPrevious:function(e){if(e.preventDefault(),s.length){var i=s.slice(-3)[0];this._setMarginLeft(i.offsetLeft*-1),o.firstElementChild===i&&n.classList.remove("active"),t.classList.add("active")}},_setMarginLeft:function(e){r=Math.min(r+e,0),i.style.setProperty("margin-left",r+"px","")},_rebuildVisibility:function(){if(a){s=[],l=[];var e=o.clientWidth;if(o.scrollWidth>e||r<0)for(var i,c=0,u=o.childElementCount;ce&&l.push(i)}n.classList[s.length?"add":"remove"]("active"),t.classList[l.length?"add":"remove"]("active")}},_setup:function(){t=elCreate("a"),t.className="mainMenuShowNext",t.href="#",t.innerHTML='',t.addEventListener(WCF_CLICK_EVENT,this._showNext.bind(this)),o.parentNode.appendChild(t),n=elCreate("a"),n.className="mainMenuShowPrevious",n.href="#",n.innerHTML='',n.addEventListener(WCF_CLICK_EVENT,this._showPrevious.bind(this)),o.parentNode.insertBefore(n,o.parentNode.firstChild);var e=this._rebuildVisibility.bind(this);i.addEventListener("transitionend",e),window.addEventListener("resize",function(){i.style.setProperty("margin-left","0px",""),r=0,e()}),this._enable()}}}),define("WoltLabSuite/Core/BootstrapFrontend",["Ajax","WoltLabSuite/Core/Bootstrap","WoltLabSuite/Core/Controller/Style/Changer","WoltLabSuite/Core/Controller/Popover","WoltLabSuite/Core/Ui/User/Ignore","WoltLabSuite/Core/Ui/Page/Header/Menu"],function(e,t,n,i,o,a){"use strict";var r=0;return{setup:function(e){e.backgroundQueue.url=WSC_API_URL+e.backgroundQueue.url.substr(WCF_PATH.length),t.setup(),a.init(),e.styleChanger&&n.setup(),e.enableUserPopover&&this._initUserPopover(),this._invokeBackgroundQueue(e.backgroundQueue.url,e.backgroundQueue.force)},_initUserPopover:function(){i.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){r++,e>0&&r<5&&setTimeout(i,1e3)}.bind(this)})}}}),define("WoltLabSuite/Core/ColorUtil",[],function(){"use strict";var e={hsvToRgb:function(e,t,n){var i,o,a,r,s,l={r:0,g:0,b:0};if(i=Math.floor(e/60),o=e/60-i,t/=100,n/=100,a=n*(1-t),r=n*(1-t*o),s=n*(1-t*(1-o)),0==t)l.r=l.g=l.b=n;else switch(i){case 1:l.r=r,l.g=n,l.b=a;break;case 2:l.r=a,l.g=n,l.b=s;break;case 3:l.r=a,l.g=r,l.b=n;break;case 4:l.r=s,l.g=a,l.b=n;break;case 5:l.r=n,l.g=a,l.b=r;break;case 0:case 6:l.r=n,l.g=s,l.b=a}return{r:Math.round(255*l.r),g:Math.round(255*l.g),b:Math.round(255*l.b)}},rgbToHsv:function(e,t,n){var i,o,a,r,s,l;if(e/=255,t/=255,n/=255,r=Math.max(Math.max(e,t),n),s=Math.min(Math.min(e,t),n),l=r-s,i=0,r!==s){switch(r){case e:i=60*((t-n)/l);break;case t:i=60*(2+(n-e)/l);break;case n:i=60*(4+(e-t)/l)}i<0&&(i+=360)}return o=0===r?0:l/r,a=r,{h:Math.round(i),s:Math.round(100*o),v:Math.round(100*a)}},hexToRgb:function(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){var t=e.split("");return"#"===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)}}return Number.NaN},rgbToHex:function(e,t,n){var i="0123456789ABCDEF";return void 0===t&&e.toString().match(/^rgba?\((\d+), ?(\d+), ?(d\+)(?:, ?[0-9.]+)?\)$/)&&(e=RegExp.$1,t=RegExp.$2,n=RegExp.$3),i.charAt((e-e%16)/16)+""+i.charAt(e%16)+(i.charAt((t-t%16)/16)+""+i.charAt(t%16))+(i.charAt((n-n%16)/16)+""+i.charAt(n%16))}};return window.__wcf_bc_colorUtil=e,e}),define("WoltLabSuite/Core/FileUtil",["Dictionary","StringUtil"],function(e,t){"use strict";var n=e.fromObject({zip:"archive",rar:"archive",tar:"archive",gz:"archive",mp3:"audio",ogg:"audio",wav:"audio",php:"code",html:"code",htm:"code",tpl:"code",js:"code",xls:"excel",ods:"excel",xlsx:"excel",gif:"image",jpg:"image",jpeg:"image",png:"image",bmp:"image",avi:"video",wmv:"video",mov:"video",mp4:"video",mpg:"video",mpeg:"video",flv:"video",pdf:"pdf",ppt:"powerpoint",pptx:"powerpoint",txt:"text",doc:"word",docx:"word",odt:"word"});return{formatFilesize:function(e,n){void 0===n&&(n=2);var i="Byte";return e>=1e3&&(e/=1e3,i="kB"),e>=1e3&&(e/=1e3,i="MB"),e>=1e3&&(e/=1e3,i="GB"),e>=1e3&&(e/=1e3,i="TB"),t.formatNumeric(e,-n)+" "+i},getIconNameByFilename:function(e){var t=e.lastIndexOf(".");if(t!==!1){var i=e.substr(t+1);if(n.has(i))return n.get(i)}return""}}}),define("WoltLabSuite/Core/Permission",["Dictionary"],function(e){"use strict";var t=new e;return{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)objOwns(e,t)&&this.add(t,e[t])},get:function(e){return!!t.has(e)&&t.get(e)}}}),define("WoltLabSuite/Core/Upload",["AjaxRequest","Core","Dom/ChangeListener","Language","Dom/Util","Dom/Traverse"],function(e,t,n,i,o,a){"use strict";var r=function(){};return r.prototype={_createButton:function(){},_createFileElement:function(){},_createFileElements:function(){},_failure:function(){},_getParameters:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){},_success:function(){},_upload:function(){},_uploadFiles:function(){}},r}),define("WoltLabSuite/Core/User",[],function(){"use strict";var e,t=!1;return{getLink:function(){return e},init:function(n,i,o){if(t)throw new Error("User has already been initialized.");Object.defineProperty(this,"userId",{value:n,writable:!1}),Object.defineProperty(this,"username",{value:i,writable:!1}),e=o,t=!0}}}),define("WoltLabSuite/Core/Ajax/Jsonp",["Core"],function(e){"use strict";return{send:function(t,n,i,o){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'.");o=e.extend({parameterName:"callback",timeout:10},o||{});var a,r="wcf_jsonp_"+e.getUuid().replace(/-/g,"").substr(0,8),s=window.setTimeout(function(){"function"==typeof i&&i(),window[r]=void 0,elRemove(a)},1e3*(~~o.timeout||10));window[r]=function(){window.clearTimeout(s),n.apply(null,arguments),window[r]=void 0,elRemove(a)},t+=t.indexOf("?")===-1?"?":"&",t+=o.parameterName+"="+r,a=elCreate("script"),a.async=!0,elAttr(a,"src",t),document.head.appendChild(a)}}}),define("WoltLabSuite/Core/Bbcode/Collapsible",[],function(){"use strict";var e=elByClass("jsCollapsibleBbcode");return{observe:function(){for(var t,n;e.length;)t=e[0],n=null,elBySelAll(".toggleButton:not(.jsToggleButtonEnabled)",t,function(e){e.closest(".jsCollapsibleBbcode")===t&&(n=e)}),n&&!function(e,t){var n=function(n){if(e.classList.toggle("collapsed")){if(t.textContent=elData(t,"title-expand"),n instanceof Event){var i=e.getBoundingClientRect().top;if(i<0){var o=window.pageYOffset+(i-100);o<0&&(o=0),window.scrollTo(window.pageXOffset,o)}}}else t.textContent=elData(t,"title-collapse")};t.classList.add("jsToggleButtonEnabled"),t.addEventListener(WCF_CLICK_EVENT,n),0!==e.scrollTop&&n()}(t,n),t.classList.remove("jsCollapsibleBbcode")}}}),define("WoltLabSuite/Core/Controller/Captcha",["Dictionary"],function(e){"use strict";var t=new e;return{add:function(e,n){if(t.has(e))throw new Error("Captcha with id '"+e+"' is already registered.");if("function"!=typeof n)throw new TypeError("Expected a valid callback for parameter 'callback'.");t.set(e,n)},delete:function(e){if(!t.has(e))throw new Error("Unknown captcha with id '"+e+"'.");t.delete(e)()},has:function(e){return t.has(e)},getData:function(e){if(!t.has(e))throw new Error("Unknown captcha with id '"+e+"'.");return t.get(e)()}}}),define("WoltLabSuite/Core/Controller/Clipboard",["Ajax","Core","Dictionary","EventHandler","Language","List","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Confirmation","Ui/SimpleDropdown","WoltLabSuite/Core/Ui/Page/Action"],function(e,t,n,i,o,a,r,s,l,c,u,d,h){"use strict";return{setup:function(){},reload:function(){},_initContainers:function(){},_loadMarkedItems:function(){},_markAll:function(){},_mark:function(){},_saveState:function(){},_executeAction:function(){},_executeProxyAction:function(){},_unmarkAll:function(){},_ajaxSetup:function(){},_ajaxSuccess:function(){},_rebuildMarkings:function(){},hideEditor:function(){},showEditor:function(){},unmark:function(){}}}),define("WoltLabSuite/Core/Event/Key",[],function(){"use strict";function e(e,t,n){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===n}return{ArrowDown:function(t){return e(t,"ArrowDown",40)},ArrowLeft:function(t){return e(t,"ArrowLeft",37)},ArrowRight:function(t){return e(t,"ArrowRight",39)},ArrowUp:function(t){return e(t,"ArrowUp",38)},Comma:function(t){return e(t,",",44)},Enter:function(t){return e(t,"Enter",13)},Escape:function(t){return e(t,"Escape",27)},Tab:function(t){return e(t,"Tab",9)}}}),define("WoltLabSuite/Core/Language/Chooser",["Dictionary","Language","Dom/Traverse","Dom/Util","ObjectMap","Ui/SimpleDropdown"],function(e,t,n,i,o,a){"use strict";var r=new e,s=!1,l=new o,c=null;return{init:function(e,t,n,i,o,a){if(!r.has(t)){var s=elById(e);if(null===s)throw new Error("Expected a valid container id, cannot find '"+t+"'.");var l=elById(t);null===l&&(l=elCreate("input"),elAttr(l,"type","hidden"),elAttr(l,"id",t),elAttr(l,"name",t),elAttr(l,"value",n),s.appendChild(l)),this._initElement(t,l,n,i,o,a)}},_setup:function(){s||(s=!0,c=this._submit.bind(this))},_initElement:function(e,i,o,s,u,d){var h;"DD"===i.parentNode.nodeName?(h=elCreate("div"),h.className="dropdown",i.parentNode.insertBefore(h,i)):(h=i.parentNode,h.classList.add("dropdown")),elHide(i);var f=elCreate("a");f.className="dropdownToggle dropdownIndicator boxFlag box24 inputPrefix"+("DD"===i.parentNode.nodeName?" button":""),h.appendChild(f);var p=elCreate("ul");p.className="dropdownMenu",h.appendChild(p);var m,g,v,b,_=function(t){var i=~~elData(t.currentTarget,"language-id"),o=n.childByClass(p,"active");null!==o&&o.classList.remove("active"),i&&t.currentTarget.classList.add("active"),this._select(e,i,t.currentTarget)}.bind(this);for(var y in s)if(s.hasOwnProperty(y)){var w=s[y];v=elCreate("li"),v.className="boxFlag",v.addEventListener(WCF_CLICK_EVENT,_),elData(v,"language-id",y),void 0!==w.languageCode&&elData(v,"language-code",w.languageCode),p.appendChild(v),m=elCreate("a"),m.className="box24",v.appendChild(m),g=elCreate("img"),elAttr(g,"src",w.iconPath),elAttr(g,"alt",""),g.className="iconFlag",m.appendChild(g),b=elCreate("span"),b.textContent=w.languageName,m.appendChild(b),y==o&&(f.innerHTML=v.firstChild.innerHTML)}if(d)v=elCreate("li"),v.className="dropdownDivider",p.appendChild(v),v=elCreate("li"),elData(v,"language-id",0),v.addEventListener(WCF_CLICK_EVENT,_),p.appendChild(v),m=elCreate("a"),m.textContent=t.get("wcf.global.language.noSelection"),v.appendChild(m),0===o&&(f.innerHTML=v.firstChild.innerHTML),v.addEventListener(WCF_CLICK_EVENT,_);else if(0===o){f.innerHTML=null;var C=elCreate("div");f.appendChild(C),b=elCreate("span"),b.className="icon icon24 fa-question",C.appendChild(b),b=elCreate("span"),b.textContent=t.get("wcf.global.language.noSelection"),C.appendChild(b)}a.init(f),r.set(e,{callback:u,dropdownMenu:p,dropdownToggle:f,element:i});var L=n.parentByTag(i,"FORM");if(null!==L){L.addEventListener("submit",c);var S=l.get(L);void 0===S&&(S=[],l.set(L,S)),S.push(e)}},_select:function(e,t,n){var i=r.get(e);if(void 0===n){for(var o=i.dropdownMenu.childNodes,a=0,s=o.length;a for id \''+e+"'.");t.init(e,n,i,o),t.registerCallback(e,"select",this._callbackSelect.bind(this)),t.registerCallback(e,"submit",this._callbackSubmit.bind(this))},_callbackSelect:function(e){void 0!==window.jQuery&&window.jQuery(e).redactor("code.set",e.value)},_callbackSubmit:function(e){void 0!==window.jQuery&&(e.value=window.jQuery(e).redactor("code.get"))}}}),define("WoltLabSuite/Core/Ui/Notification",["Language"],function(e){"use strict";var t=!1,n=null,i=null,o=null,a=null,r=null,s={show:function(s,l,c){t||(this._init(),n="function"==typeof l?l:null,i.className=c||"success",i.textContent=e.get(s||"wcf.global.success"),t=!0,o.classList.add("active"),a=setTimeout(r,2e3))},_init:function(){null===o&&(r=this._hide.bind(this),o=elCreate("div"),o.id="systemNotification",i=elCreate("p"),i.addEventListener(WCF_CLICK_EVENT,r),o.appendChild(i),document.body.appendChild(o))},_hide:function(){clearTimeout(a),o.classList.remove("active"),null!==n&&n(),t=!1}};return s}),define("WoltLabSuite/Core/Media/Editor",["Ajax","Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Language","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Language/Chooser","WoltLabSuite/Core/Language/Input","EventKey"],function(e,t,n,i,o,a,r,s,l,c,u){"use strict";var d=function(){};return d.prototype={_ajaxSetup:function(){},_ajaxSuccess:function(){},_close:function(){},_keyPress:function(){},_saveData:function(){},_updateLanguageFields:function(){},edit:function(){}},d}),define("WoltLabSuite/Core/Media/Upload",["Core","DateUtil","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","Permission","Upload","User","WoltLabSuite/Core/FileUtil"],function(e,t,n,i,o,a,r,s,l,c,u){"use strict";var d=function(){};return d.prototype={_createFileElement:function(){},_getParameters:function(){},_success:function(){},_uploadFiles:function(){},_createButton:function(){},_createFileElements:function(){},_failure:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){},_upload:function(){}},d}),define("WoltLabSuite/Core/Notification/Handler",["Ajax","Core","EventHandler"],function(e,t,n){"use strict";if(!("Promise"in window&&"Notification"in window))return{setup:function(){}};var i=!1,o="",a=0,r=window.TIME_NOW,s=null,l=0;return{setup:function(e){if(e=t.extend({enableNotifications:!1,icon:"",sessionKeepAlive:0},e),o=e.icon,l=60*e.sessionKeepAlive,this._prepareNextRequest(),document.addEventListener("visibilitychange",this._onVisibilityChange.bind(this)),window.addEventListener("storage",this._onStorage.bind(this)),this._onVisibilityChange(),e.enableNotifications)switch(window.Notification.permission){case"granted":i=!0;break;case"default":window.Notification.requestPermission(function(e){"granted"===e&&(i=!0)})}},_onVisibilityChange:function(){if(a=document.hidden?Date.now():0,!document.hidden){var e=(Date.now()-a)/6e4;e>4&&(this._resetTimer(),this._dispatchRequest())}},_getNextDelay:function(){if(0===a)return 5;var e=~~((Date.now()-a)/6e4);return e<15?5:e<30?10:15},_resetTimer:function(){null!==s&&(window.clearTimeout(s),s=null)},_prepareNextRequest:function(){this._resetTimer();var e=Math.min(this._getNextDelay(),l);s=window.setTimeout(this._dispatchRequest.bind(this),6e4*e)},_dispatchRequest:function(){var t={};n.fire("com.woltlab.wcf.notification","beforePoll",t),t.lastRequestTimestamp=r,e.api(this,{parameters:t})},_onStorage:function(){this._prepareNextRequest();var e,i,o=!1;try{e=window.localStorage.getItem(t.getStoragePrefix()+"notification"),i=window.localStorage.getItem(t.getStoragePrefix()+"keepAliveData"),e=JSON.parse(e),i=JSON.parse(i)}catch(e){o=!0}o||n.fire("com.woltlab.wcf.notification","onStorage",{pollData:e,keepAliveData:i})},_ajaxSuccess:function(e){var i=!1,o=e.returnValues.keepAliveData,a=e.returnValues.pollData;window.WCF.System.PushNotification.executeCallbacks(o);try{window.localStorage.setItem(t.getStoragePrefix()+"notification",JSON.stringify(a)),window.localStorage.setItem(t.getStoragePrefix()+"keepAliveData",JSON.stringify(o))}catch(e){i=!0,window.console.log(e)}i||this._prepareNextRequest(),r=e.returnValues.lastRequestTimestamp,n.fire("com.woltlab.wcf.notification","afterPoll",a),this._showNotification(a)},_showNotification:function(e){i&&"object"==typeof e.notification&&"string"==typeof e.notification.message&&new window.Notification(e.notification.title,{body:e.notification.message,icon:o})},_ajaxSetup:function(){return{data:{actionName:"poll",className:"wcf\\data\\session\\SessionAction"},ignoreError:!window.ENABLE_DEBUG_MODE,silent:!window.ENABLE_DEBUG_MODE}}}}),define("WoltLabSuite/Core/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:[],threshold:3},n),"function"!=typeof this._options.callbackSelect)throw new Error("Expected a valid callback for option 'callbackSelect'.");this._element.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()}),this._element.addEventListener("keydown",this._keyDown.bind(this)),this._element.addEventListener("keyup",this._keyUp.bind(this))},addExcludedValue:function(e){this._options.excludedSearchValues.indexOf(e)===-1&&this._options.excludedSearchValues.push(e)},removeExcludedValue:function(e){var t=this._options.excludedSearchValues.indexOf(e);t!==-1&&this._options.excludedSearchValues.splice(t,1)},isActive:function(){return null!==this._dropdownMenu&&n.isOpen(this._element.id)},_keyDown:function(e){if(!this.isActive())return!0;if(13!==e.keyCode&&27!==e.keyCode&&38!==e.keyCode&&40!==e.keyCode)return!0;for(var t,i=0,o=this._dropdownMenu.childElementCount;i0){var n=t.parentNode.previousElementSibling;null!==n&&n.classList.remove("active")}},_addItem:function(e,t){var n=l.get(e),i=elCreate("li");i.className="item";var o=elCreate("span");o.className="content",elData(o,"object-id",t.objectId),o.textContent=t.value;var a=elCreate("a");a.className="icon icon16 fa-times",a.addEventListener(WCF_CLICK_EVENT,f),i.appendChild(o),i.appendChild(a),n.list.insertBefore(i,n.listItem),n.suggestion.addExcludedValue(t.value),n.element.value="",this._handleLimit(e);var r=this._syncShadow(n);"function"==typeof n.options.callbackChange&&(null===r&&(r=this.getValues(e)),n.options.callbackChange(e,r))},_removeItem:function(e,t,n){t=null===e?t:e.currentTarget.parentNode;var i=t.parentNode,o=elData(i,"element-id"),a=l.get(o);a.suggestion.removeExcludedValue(t.children[0].textContent),i.removeChild(t),n||a.element.focus(),this._handleLimit(o);var r=this._syncShadow(a);"function"==typeof a.options.callbackChange&&(null===r&&(r=this.getValues(o)),a.options.callbackChange(o,r))},_syncShadow:function(e){if(!e.options.isCSV)return null;for(var t="",n=this.getValues(e.element.id),i=0,o=n.length;i~~elAttr(s,"max")?o.disabled=!0:o.disabled=!1},_submit:function(e){r.get(i).callback(~~s.value),n.close(this)},_dialogSetup:function(){var t='
              ";return{id:"paginationOverlay",options:{onSetup:function(e){s=elByTag("input",e)[0],s.addEventListener("keyup",this._keyUp.bind(this)),a=elByTag("small",e)[0],o=elByTag("button",e)[0],o.addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))}.bind(this),title:e.get("wcf.global.page.pagination")},source:t}}};return l}),define("WoltLabSuite/Core/Ui/Pagination",["Core","Language","ObjectMap","StringUtil","WoltLabSuite/Core/Ui/Page/JumpTo"],function(e,t,n,i,o){"use strict";function a(e,t){this.init(e,t)}return a.prototype={SHOW_LINKS:11,init:function(t,n){this._element=t,this._options=e.extend({activePage:1,maxPage:1,callbackShouldSwitch:null,callbackSwitch:null},n),"function"!=typeof this._options.callbackShouldSwitch&&(this._options.callbackShouldSwitch=null),"function"!=typeof this._options.callbackSwitch&&(this._options.callbackSwitch=null),this._element.classList.add("pagination"),this._rebuild(this._element)},_rebuild:function(){var e=!1;this._element.innerHTML="";var n,i=elCreate("ul"),a=elCreate("li");a.className="skip",i.appendChild(a);var r="icon icon24 fa-chevron-left";this._options.activePage>1?(n=elCreate("a"),n.className=r+" jsTooltip",n.href="#",n.title=t.get("wcf.global.page.previous"),a.appendChild(n), +n.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage-1))):(a.innerHTML='',a.classList.add("disabled")),i.appendChild(this._createLink(1));var s=this.SHOW_LINKS-4,l=this._options.activePage-2;l<0&&(l=0);var c=this._options.maxPage-(this._options.activePage+1);c<0&&(c=0),this._options.activePage>1&&this._options.activePagethis._options.maxPage-1&&(h=this._options.maxPage-1),l>=u?d-=u:(d-=l,h+=u-l),c>=u?h+=u:(h+=c,d-=u-c),h=Math.ceil(h),d=Math.ceil(d),d<1&&(d=1),h>this._options.maxPage&&(h=this._options.maxPage);var f='';d>1&&(d-1<2?i.appendChild(this._createLink(2)):(a=elCreate("li"),a.className="jumpTo",a.innerHTML=f,i.appendChild(a),e=!0));for(var p=d+1;p',a.classList.add("disabled")),e&&(elData(i,"pages",this._options.maxPage),o.init(i,this.switchPage.bind(this))),this._element.appendChild(i)},_createLink:function(e){var n=elCreate("li");if(e!==this._options.activePage){var o=elCreate("a");o.textContent=i.addThousandsSeparator(e),o.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,e)),n.appendChild(o)}else n.classList.add("active"),n.innerHTML=""+i.addThousandsSeparator(e)+'";return n},getActivePage:function(){return this._options.activePage},getElement:function(){return this._element},getMaxPage:function(){return this._options.maxPage},switchPage:function(e,t){if("object"==typeof t&&t.preventDefault(),e=~~e,e>0&&this._options.activePage!==e&&e<=this._options.maxPage){if(null!==this._options.callbackShouldSwitch&&this._options.callbackShouldSwitch(e)!==!0)return;this._options.activePage=e,this._rebuild(),null!==this._options.callbackSwitch&&this._options.callbackSwitch(e)}}},a}),define("WoltLabSuite/Core/Ui/Scroll",["Dom/Util"],function(e){"use strict";var t=null,n=null,i=null;return{element:function(i,o){if(!(i instanceof Element))throw new TypeError("Expected a valid DOM element.");if(void 0!==o&&"function"!=typeof o)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(i))throw new Error("Element must be part of the visible DOM.");if(null!==t)throw new Error("Cannot scroll to element, a concurrent request is running.");o&&(t=o,null===n&&(n=this._onScroll.bind(this)),window.addEventListener("scroll",n));var a=e.offset(i).top;a<=50?a=0:a-=50;var r=window.pageYOffset;window.scrollTo({left:0,top:a,behavior:"smooth"}),window.setTimeout(function(){r===window.pageYOffset&&this._onScroll()}.bind(this),100)},_onScroll:function(){null!==i&&window.clearTimeout(i),i=window.setTimeout(function(){null!==t&&t(),window.removeEventListener("scroll",n),t=null,i=null},100)}}}),define("WoltLabSuite/Core/Media/List/Upload",["Core","Dom/Util","../Upload"],function(e,t,n){"use strict";var i=function(){};return i.prototype={_createButton:function(){},_success:function(){},_upload:function(){},_createFileElement:function(){},_getParameters:function(){},_uploadFiles:function(){},_createFileElements:function(){},_failure:function(){},_insertButton:function(){},_progress:function(){},_removeButton:function(){}},i}),define("WoltLabSuite/Core/Controller/Media/List",["Dom/ChangeListener","EventHandler","WoltLabSuite/Core/Controller/Clipboard","WoltLabSuite/Core/Media/Editor","WoltLabSuite/Core/Media/List/Upload"],function(e,t,n,i,o){"use strict";var a=function(){};return a.prototype={init:function(){},_clipboardAction:function(){},_edit:function(){}},a}),define("WoltLabSuite/Core/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;n':e.icon,i.appendChild(t.children[0]),t.appendChild(i),t}}),n}),define("WoltLabSuite/Core/Ui/Acl/Simple",["Language","StringUtil","Dom/ChangeListener","WoltLabSuite/Core/Ui/User/Search/Input"],function(e,t,n,i){"use strict";var o=function(){};return o.prototype={init:function(){},_build:function(){},_select:function(){},_removeItem:function(){}},o}),define("WoltLabSuite/Core/Ui/Article/MarkAllAsRead",["Ajax"],function(e){"use strict";return{init:function(){elBySelAll(".markAllAsReadButton",void 0,function(e){e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this))}.bind(this))},_click:function(t){t.preventDefault(),e.api(this)},_ajaxSuccess:function(){var e=elBySel(".mainMenu .active .badge");e&&elRemove(e),elBySelAll(".articleList .newMessageBadge",void 0,elRemove)},_ajaxSetup:function(){return{data:{actionName:"markAllAsRead",className:"wcf\\data\\article\\ArticleAction"}}}}}),define("WoltLabSuite/Core/Ui/Color/Picker",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}var n=function(e,t){return"object"==typeof window.WCF&&"function"==typeof window.WCF.ColorPicker?(n=function(e,t){var n=new window.WCF.ColorPicker(e);return"function"==typeof t.callbackSubmit&&n.setCallbackSubmit(t.callbackSubmit),n})(e,t):(0===i.length&&(window.__wcf_bc_colorPickerInit=function(){i.forEach(function(e){n(e[0],e[1])}),window.__wcf_bc_colorPickerInit=void 0,i=[]}),void i.push([e,t]))},i=[];return t.prototype={init:function(t,i){if(!(t instanceof Element))throw new TypeError("Expected a valid DOM element, use `UiColorPicker.fromSelector()` if you want to use a CSS selector.");this._options=e.extend({callbackSubmit:null},i),n(t,i)}},t.fromSelector=function(e){elBySelAll(e,void 0,function(e){new t(e)})},t}),define("WoltLabSuite/Core/Ui/Comment/Add",["Ajax","Core","EventHandler","Language","Dom/ChangeListener","Dom/Util","Dom/Traverse","Ui/Dialog","Ui/Notification","WoltLabSuite/Core/Ui/Scroll","EventKey","User","WoltLabSuite/Core/Controller/Captcha"],function(e,t,n,i,o,a,r,s,l,c,u,d,h){"use strict";var f=function(){};return f.prototype={init:function(){},_submitGuestDialog:function(){},_submit:function(){},_validate:function(){},throwError:function(){},_showLoadingOverlay:function(){},_hideLoadingOverlay:function(){},_reset:function(){},_handleError:function(){},_getEditor:function(){},_insertMessage:function(){},_ajaxSuccess:function(){},_ajaxFailure:function(){},_ajaxSetup:function(){}},f}),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["Dictionary","Ui/SimpleDropdown"],function(e,t){"use strict";function n(e){if(!i.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return i.get(e)}var i=new e,o=0;return{init:function(e,n){if(!i.has(e)){var a=elCreate("div");a.id="reusableDropdownGhost"+o++,t.initFragment(a,n),i.set(e,a.id)}},getDropdownMenu:function(e){return t.getDropdownMenu(n(e))},registerCallback:function(e,i){t.registerCallback(n(e),i)},toggleDropdown:function(e,i){t.toggleDropdown(n(e),i)}}}),define("WoltLabSuite/Core/Ui/Comment/Edit",["Ajax","Core","Dictionary","Environment","EventHandler","Language","List","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLabSuite/Core/Ui/Scroll"],function(e,t,n,i,o,a,r,s,l,c,u,d,h){"use strict";var f=function(){};return f.prototype={init:function(){},rebuild:function(){},_click:function(){},_prepare:function(){},_showEditor:function(){},_restoreMessage:function(){},_save:function(){},_validate:function(){},throwError:function(){},_showMessage:function(){},_hideEditor:function(){},_restoreEditor:function(){},_destroyEditor:function(){},_getEditorId:function(){},_getObjectId:function(){},_ajaxFailure:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){}},f}),define("WoltLabSuite/Core/Ui/ItemList/Filter",["Core","EventKey","Language","List","StringUtil","Dom/Util"],function(e,t,n,i,o,a){"use strict";var r=function(){};return r.prototype={init:function(){},_buildItems:function(){},_prepareItem:function(){},_keyup:function(){}},r}),define("WoltLabSuite/Core/Ui/ItemList/User",["WoltLabSuite/Core/Ui/ItemList"],function(e){"use strict";var t=function(){};return t.prototype={init:function(){},getValues:function(){}},t}),define("WoltLabSuite/Core/Ui/User/List",["Ajax","Core","Dictionary","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/Pagination"],function(e,t,n,i,o,a){"use strict";function r(e){this.init(e)}return r.prototype={init:function(e){this._cache=new n,this._pageCount=0,this._pageNo=1,this._options=t.extend({className:"",dialogTitle:"",parameters:{}},e)},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t){if("number"==typeof t&&(this._pageNo=~~t),0!==this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))throw new RangeError("pageNo must be between 1 and "+this._pageCount+" ("+this._pageNo+" given).");if(this._cache.has(this._pageNo)){var n=o.open(this,this._cache.get(this._pageNo));if(this._pageCount>1){var i=elBySel(".jsPagination",n.content);null!==i&&new a(i,{activePage:this._pageNo,maxPage:this._pageCount,callbackSwitch:this._showPage.bind(this)})}}else this._options.parameters.pageNo=this._pageNo,e.api(this,{parameters:this._options.parameters})},_ajaxSuccess:function(e){void 0!==e.returnValues.pageCount&&(this._pageCount=~~e.returnValues.pageCount),this._cache.set(this._pageNo,e.returnValues.template),this._showPage()},_ajaxSetup:function(){return{data:{actionName:"getGroupedUserList",className:this._options.className,interfaceName:"wcf\\data\\IGroupedUserListAction"}}},_dialogSetup:function(){return{id:i.getUniqueId(),options:{title:this._options.dialogTitle},source:null}}},r}),define("WoltLabSuite/Core/Ui/Like/Handler",["Ajax","Core","Dictionary","Language","ObjectMap","StringUtil","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLabSuite/Core/Ui/User/List","User"],function(e,t,n,i,o,a,r,s,l,c,u){"use strict";function d(e,t){this.init(e,t)}var h=!1;return d.prototype={init:function(e,n){if(""===n.containerSelector)throw new Error("[WoltLabSuite/Core/Ui/Like/Handler] Expected a non-empty string for option 'containerSelector'.");this._containers=new o,this._details=new o,this._objectType=e,this._options=t.extend({badgeClassNames:"",isSingleItem:!1,markListItemAsActive:!1,renderAsButton:!0,summaryPrepend:!0,summaryUseIcon:!0,canDislike:!1,canLike:!1,canLikeOwnContent:!1,canViewSummary:!1,badgeContainerSelector:".messageHeader .messageStatus",buttonAppendToSelector:".messageFooter .messageFooterButtons",buttonBeforeSelector:"",containerSelector:"",summarySelector:".messageFooterGroup"},n),this.initContainers(n,e),r.add("WoltLabSuite/Core/Ui/Like/Handler-"+e,this.initContainers.bind(this))},initContainers:function(){for(var e,t,n=elBySelAll(this._options.containerSelector),i=!1,o=0,a=n.length;o ",s.addEventListener(WCF_CLICK_EVENT,this._like.bind(this,e)),elData(s,"type",t?"like":"dislike"),r.appendChild(s),n?n.parentNode.insertBefore(r,n):o.appendChild(r),s},_showSummary:function(e,t){t.preventDefault(),this._details.has(e)||this._details.set(e,new c({className:"wcf\\data\\like\\LikeAction",dialogTitle:i.get("wcf.like.details"),parameters:{data:{containerID:s.identify(e),objectID:this._containers.get(e).objectId,objectType:this._objectType}}})),this._details.get(e).open()},_updateBadge:function(e){var t=this._containers.get(e);if(0===t.likes&&0===t.dislikes)elHide(t.badge);else{elShow(t.badge),t.badge.classList.remove("likeCounterLiked","likeCounterDisliked");var n=t.likes-t.dislikes,o='';n>0?(o+="+"+a.addThousandsSeparator(n),t.badge.classList.add("likeCounterLiked")):n<0?(o+="−"+a.addThousandsSeparator(Math.abs(n)),t.badge.classList.add("likeCounterDisliked")):o+="±0",t.badge.innerHTML=o+"",t.badge.setAttribute("data-tooltip",i.get("wcf.like.tooltip",{dislikes:t.dislikes,likes:t.likes}))}},_updateSummary:function(e){var t=this._containers.get(e);if(t.likes){elShow(t.summary.parentNode);for(var n=[],o=Object.keys(t.users),a=0,r=o.length;a .button",elById("pageHeaderSearchInputContainer"));l.textContent=e.currentTarget.textContent}}}),define("WoltLabSuite/Core/Ui/Sortable/List",["Core","Ui/Screen"],function(e,t){"use strict";var n=function(){};return n.prototype={init:function(){},_enable:function(){},_disable:function(){}},n}),define("WoltLabSuite/Core/Ui/Style/FontAwesome",["Language","Ui/Dialog","WoltLabSuite/Core/Ui/ItemList/Filter"],function(e,t,n){"use strict";var i=function(){};return i.prototype={setup:function(){},open:function(){},_click:function(){},_dialogSetup:function(){}},i}),define("WoltLabSuite/Core/Ui/Toggle/Input",["Core"],function(e){"use strict";function t(e,t){this.init(e,t)}return t.prototype={init:function(t,n){if(this._element=elBySel(t),null===this._element)throw new Error("Unable to find element by selector '"+t+"'.");var i="INPUT"===this._element.nodeName?elAttr(this._element,"type"):"";if("checkbox"!==i&&"radio"!==i)throw new Error("Illegal element, expected input[type='checkbox'] or input[type='radio'].");this._options=e.extend({hide:[],show:[]},n),["hide","show"].forEach(function(e){var t,n,i;for(n=0,i=this._options[e].length;n'),l=elCreate("li"),elData(l,"object-id",s.objectID),l.innerHTML='
              '+a+'

              '+t.escapeHTML(s.title)+"

              "+(s.description?"

              "+s.description+"

              ":"")+"
              ",l.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),c.appendChild(l);elShow(u)},_resetList:function(){var e=r.nextElementSibling;e&&e.classList.contains("innerError")&&elRemove(e),c.innerHTML="",elHide(u)},_getSearchInputHandler:function(){if(null===l){var e=this._buildList.bind(this);l=new o(elById("wcfUiPageSearchInput"),{callbackSuccess:e})}return l},_click:function(e){"A"!==e.target.nodeName&&(e.stopPropagation(),a(elData(e.currentTarget,"object-id")),i.close(this))},_dialogSetup:function(){return{id:"wcfUiPageSearchHandler",options:{onShow:function(){null===r&&(r=elById("wcfUiPageSearchInput"),s=r.parentNode.previousSibling.childNodes[0],c=elById("wcfUiPageSearchResultList"),u=elById("wcfUiPageSearchResultListContainer")),r.value="",elHide(u),c.innerHTML="",r.focus()},title:""},source:'

              '+e.get("wcf.page.pageObjectID.search.results")+'

                '}}}}),define("WoltLabSuite/Core/Ui/User/Activity/Recent",["Ajax","Language","Dom/Util"],function(e,t,n){"use strict";function i(e){this.init(e)}return i.prototype={init:function(e){this._containerId=e;var n=elById(this._containerId);this._list=elBySel(".recentActivityList",n);var i=elCreate("li");i.className="showMore",this._list.childElementCount?(i.innerHTML='",i.children[0].addEventListener(WCF_CLICK_EVENT,this._showMore.bind(this))):i.innerHTML=""+t.get("wcf.user.recentActivity.noMoreEntries")+"",this._list.appendChild(i),this._showMoreItem=i,elBySelAll(".jsRecentActivitySwitchContext .button",n,function(e){e.addEventListener(WCF_CLICK_EVENT,function(t){t.preventDefault(),e.classList.contains("active")||this._switchContext()}.bind(this))}.bind(this))},_showMore:function(t){t.preventDefault(),this._showMoreItem.children[0].disabled=!0,e.api(this,{actionName:"load",parameters:{boxID:~~elData(this._list,"box-id"),filteredByFollowedUsers:elDataBool(this._list,"filtered-by-followed-users"),lastEventId:elData(this._list,"last-event-id"),lastEventTime:elData(this._list,"last-event-time"),userID:~~elData(this._list,"user-id")}})},_switchContext:function(){e.api(this,{actionName:"switchContext"},function(){window.location.hash="#"+this._containerId,window.location.reload()}.bind(this))},_ajaxSuccess:function(e){e.returnValues.template?(n.insertHtml(e.returnValues.template,this._showMoreItem,"before"),elData(this._list,"last-event-time",e.returnValues.lastEventTime),elData(this._list,"last-event-id",e.returnValues.lastEventID),this._showMoreItem.children[0].disabled=!1):this._showMoreItem.innerHTML=""+t.get("wcf.user.recentActivity.noMoreEntries")+""},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"}}}},i}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Abstract",["Ajax","Dom/Util"],function(e,t){"use strict";function n(e,t){}return n.prototype={init:function(e,t){this._userId=e,this._isActive=t!==!1,this._initButton(),this._updateButton()},_initButton:function(){var e=elCreate("a");e.href="#",e.addEventListener(WCF_CLICK_EVENT,this._toggle.bind(this));var n=elCreate("li");n.appendChild(e);var i=elBySel('.userProfileButtonMenu[data-menu="interaction"]');t.prepend(n,i),this._button=e,this._listItem=n},_toggle:function(t){t.preventDefault(),e.api(this,{actionName:this._getAjaxActionName(),parameters:{data:{userID:this._userId}}})},_updateButton:function(){this._button.textContent=this._getLabel(),this._listItem.classList[this._isActive?"add":"remove"]("active")},_getLabel:function(){throw new Error("Implement me!")},_getAjaxActionName:function(){throw new Error("Implement me!")},_ajaxSuccess:function(){throw new Error("Implement me!")},_ajaxSetup:function(){throw new Error("Implement me!")}},n}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Follow",["Core","Language","Ui/Notification","./Abstract"],function(e,t,n,i){"use strict";var o=function(){};return o.prototype={_getLabel:function(){},_getAjaxActionName:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){},init:function(){},_initButton:function(){},_toggle:function(){},_updateButton:function(){}},o}),define("WoltLabSuite/Core/Ui/User/Profile/Menu/Item/Ignore",["Core","Language","Ui/Notification","./Abstract"],function(e,t,n,i){"use strict";var o=function(){};return o.prototype={_getLabel:function(){},_getAjaxActionName:function(){},_ajaxSuccess:function(){},_ajaxSetup:function(){},init:function(){},_initButton:function(){},_toggle:function(){},_updateButton:function(){}},o}),function(e){e.matches=e.matches||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector,e.closest=e.closest||function(e){for(var t=this;t&&!t.matches(e);)t=t.parentElement;return t}}(Element.prototype),define("closest",function(){}),function(e){function t(){for(;i.length&&"function"==typeof i[0];)i.shift()()}var n=e.require,i=[],o=0;e.require=function(a,r,s){if(!Array.isArray(a))return n.apply(e,arguments);var l=new Promise(function(e,r){var s=o++;i.push(s),n(a,function(){var n=arguments;i[i.indexOf(s)]=function(){e(n)},t()},function(e){i[i.indexOf(s)]=function(){r(e)},t()})});return r&&l.then(function(t){r.apply(e,t)}),s&&l.catch(s),l},e.require.config=n.config}(window),define("require.linearExecution",function(){}); \ No newline at end of file -- 2.20.1