Updating minified JavaScript files
authorwoltlab.com <woltlab@woltlab.com>
Fri, 29 Jul 2016 19:47:18 +0000 (21:47 +0200)
committerwoltlab.com <woltlab@woltlab.com>
Fri, 29 Jul 2016 19:47:18 +0000 (21:47 +0200)
wcfsetup/install/files/acp/js/WCF.ACP.min.js
wcfsetup/install/files/js/WCF.Core.min.js

index c18cd889c89e8c0432df4a44d242fcba04e52599..acb1437b13b1bf58568c058b8439f67db4566208 100644 (file)
@@ -1,3 +1,3 @@
 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){$(".jsCronjobRow").each($.proxy(function(t,a){var i=$(a).find(".jsExecuteButton"),s=i.data("objectID");return WCF.inArray(s,e.objectIDs)?(e.returnValues[s]&&($(a).find("td.columnNextExec").html(e.returnValues[s].formatted),$(a).wcfHighlight()),this._notification.show(),!1):void 0},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=$('<div style="overflow: auto"><pre>'+t.next().html()+"</pre></div>").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.cronjob.log.error.details")})):(this._dialog.html("<pre>"+t.next().html()+"</pre>"),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?t:"InstallPackage",this._allowRollback=a===!0,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;i>a;a++){var s=t[a];s.length&&(e.length&&(e+="-"),e+=s.toLowerCase())}this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?"+e+"/&t="+SECURITY_TOKEN})},_init:function(){$("#submitButton").click($.proxy(this.prepareInstallation,this))},_failure:function(){null!==this._dialog&&($("#packageInstallationProgress").removeAttr("value"),this._setIcon("times")),this._allowRollback&&null!==this._dialog&&this._purgeTemplateContent($.proxy(function(){var e=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent"));$('<button class="buttonPrimary">'+WCF.Language.get("wcf.acp.package.installation.rollback")+"</button>").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(){this._proxy.setOption("data",this._getParameters()),this._proxy.sendRequest()},_getParameters:function(){return{queueID:this._queueID,step:"prepare"}},_success:function(e){if(this._shouldRender=!1,null===this._dialog&&(this._dialog=$('<div id="packageInstallationDialog" />').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();var a=new WCF.ACP.Package.Uninstallation;a.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=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent")),a=$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").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 t=this;if($("#packageInstallationInnerContent").html(e.innerTemplate).find("input").keyup(function(a){a.keyCode===$.ui.keyCode.ENTER&&t._submit(e)}),e.step&&e.node){$("#packageInstallationProgress").removeAttr("value"),this._setIcon("question");var a=$('<div class="formSubmit" />').appendTo($("#packageInstallationInnerContent"));$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").appendTo(a).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]&&(t[n]=$key?{}:[]),$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();return this._validate(e)?(e.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"search",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:e}),void this._proxy.sendRequest()):!1},_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?!1:!0},_success:function(e){switch(e.actionName){case"getResultList":this._insertTemplate(e.returnValues.template);break;case"prepareInstallation":if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1);t.prepareInstallation()}else e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").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?!0:!1,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&&$('<div class="contentNavigation" />').insertAfter(this._packageSearchResultList).wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this))},_showPage:function(e,t){return t&&t.activePage&&(this._pageNo=t.activePage),this._pageNo<1||this._pageNo>this._pageCount?void console.debug("[WCF.ACP.Package.Search] Cannot access page "+this._pageNo+" of "+this._pageCount):void(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");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1);t.prepareInstallation()}else e.returnValues.template&&(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").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?!0:!1,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?!0:!1,username:$.trim($("#packageUpdateServerUsername").val())}),this._proxy.setOption("data",{actionName:"prepareUpdate",className:"wcf\\data\\package\\update\\PackageUpdateAction",parameters:i}),this._proxy.sendRequest()}},_success:function(e){if(e.returnValues.queueID){null!==this._dialog&&this._dialog.wcfDialog("close");var t=new WCF.ACP.Package.Installation(e.returnValues.queueID,void 0,!1,!0);t.prepareInstallation()}else e.returnValues.excludedPackages?(null===this._dialog?(this._dialog=$("<div>"+e.returnValues.template+"</div>").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=$("<div>"+e.returnValues.template+"</div>").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())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").insertAfter(t),i=!1),""===$.trim(a.val())&&($('<small class="innerError">'+WCF.Language.get("wcf.global.form.error.empty")+"</small>").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,e===!0)$(".jsButtonPackageUpdate").click($.proxy(this._click,this));else{var t=$('<li><a class="button"><span class="icon icon16 fa-refresh"></span> <span>'+WCF.Language.get("wcf.acp.package.searchForUpdates")+"</span></a></li>");t.click($.proxy(this._click,this)).prependTo($(".contentNavigation:eq(0) > nav:not(.pagination) > 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){e.returnValues.url?window.location=e.returnValues.url:(this._dialog=$("<div>"+WCF.Language.get("wcf.acp.package.searchForUpdates.noResults")+"</div>").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)});var e=$('<li><a class="button"><span class="icon icon16 fa-shopping-cart" /> <span>'+WCF.Language.get("wcf.acp.pluginStore.purchasedItems.button.search")+"</span></a></li>");e.prependTo($(".contentNavigation:eq(0) > nav:not(.pagination) > 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){if(e.returnValues.template){null===this._dialog?(this._dialog=$("<div />").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 t=this._dialog.find("button").click($.proxy(this._submit,this));this._dialog.find("input").keyup(function(e){return e.which==$.ui.keyCode.ENTER?(t.trigger("click"),!1):void 0})}else e.returnValues.noResults?null===this._dialog?(this._dialog=$("<div />").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=$("<div />").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=$('<div id="'+this._dialogID+'" />').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=$('<div class="formSubmit" />').appendTo(this._dialog);$('<button class="buttonPrimary">'+WCF.Language.get("wcf.global.button.next")+"</button>").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()});var e=WCF.Dropdown.getDropdownMenu("pageHeaderSearchType");e.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&&$('<li class="dropdownDivider" />').appendTo(this._list),$('<li class="dropdownText">'+e.title+"</li>").appendTo(this._list);for(var t in e.items){var a=e.items[t];$('<li><a href="'+a.link+'"><span>'+WCF.String.escapeHTML(a.title)+"</span>"+(a.subtitle?"<small>"+WCF.String.escapeHTML(a.subtitle)+"</small>":"")+"</a></li>").appendTo(this._list),this._itemCount++}},_handleEmptyResult:function(){return $('<li class="dropdownText">'+WCF.Language.get("wcf.acp.search.noResults")+"</li>").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(){return-1===this._itemIndex?!1:void(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=$("<div />").hide().appendTo(document.body),this._dialog.append($('<div class="section"><dl><dt><label for="userBanReason">'+WCF.Language.get("wcf.acp.user.banReason")+'</label></dt><dd><textarea id="userBanReason" cols="40" rows="3" /><small>'+WCF.Language.get("wcf.acp.user.banReason.description")+'</small></dd></dl><dl><dt></dt><dd><label for="userBanNeverExpires"><input type="checkbox" name="userBanNeverExpires" id="userBanNeverExpires" checked> '+WCF.Language.get("wcf.acp.user.ban.neverExpires")+'</label></dd></dl><dl id="userBanExpiresSettings" style="display: none;"><dt><label for="userBanExpires">'+WCF.Language.get("wcf.acp.user.ban.expires")+'</label></dt><dd><input type="date" name="userBanExpires" id="userBanExpires" class="medium" min="'+new Date(1e3*TIME_NOW).toISOString()+'" data-ignore-timezone="true" /><small>'+WCF.Language.get("wcf.acp.user.ban.expires.description")+"</small></dd></dl></div>")),this._dialog.append($('<div class="formSubmit"><button class="buttonPrimary" accesskey="s">'+WCF.Language.get("wcf.global.button.submit")+"</button></div>")),this._dialog.find("#userBanNeverExpires").change(function(){$("#userBanExpiresSettings").toggle()}),this._dialog.find("button").click($.proxy(this._submit,this))):($("#userBanReason").val(""),$("#userBanNeverExpires").prop("checked",!0),$("#userBanExpiresSettings").hide(),$("#userBanExpiresDatePicker, #userBanExpires").val("")),this._dialog.data("userIDs",e),this._dialog.wcfDialog({title:WCF.Language.get("wcf.acp.user.ban.sure")})},_submit:function(){this._dialog.find(".innerError").remove();var e="";if(!$("#userBanNeverExpires").is(":checked")){var e=$("#userBanExpiresDatePicker").val();if(!e)return void this._dialog.find("#userBanExpiresSettings > dd > small").prepend($('<small class="innerError" />').text(WCF.Language.get("wcf.global.form.error.empty")))}this._proxy.setOption("data",{actionName:"ban",className:"wcf\\data\\user\\UserAction",objectIDs:this._dialog.data("userIDs"),parameters:{banReason:$("#userBanReason").val(),banExpires:e}}),this._proxy.sendRequest()},_success:function(e){$(".jsBanButton").each(function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("unban"==e.actionName?i.data("banned",!1).data("tooltip",i.data("banMessage")).removeClass("fa-lock").addClass("fa-unlock"):i.data("banned",!0).data("tooltip",i.data("unbanMessage")).removeClass("fa-unlock").addClass("fa-lock"))});var t=new WCF.System.Notification;t.show(),WCF.Clipboard.reload(),"ban"==e.actionName&&this._dialog.wcfDialog("close")}},WCF.ACP.User.Group={},WCF.ACP.User.Group.Copy=Class.extend({_groupID:0,init:function(e){this._groupID=e,$(".jsButtonUserGroupCopy").click($.proxy(this._click,this))},_click:function(){var e=$('<div class="section" />');e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyMembers" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyMembers")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyMembers.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyUserGroupOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyUserGroupOptions.description")+"</small></dd></dl>")),e.append($('<dl class="wide"><dt /><dd><label><input type="checkbox" id="copyACLOptions" value="1" /> '+WCF.Language.get("wcf.acp.group.copy.copyACLOptions")+"</label><small>"+WCF.Language.get("wcf.acp.group.copy.copyACLOptions.description")+"</small></dd></dl>")),WCF.System.Confirmation.show(WCF.Language.get("wcf.acp.group.copy.confirmMessage"),$.proxy(function(e){"confirm"===e&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"copy",className:"wcf\\data\\user\\group\\UserGroupAction",objectIDs:[this._groupID],parameters:{copyACLOptions:$("#copyACLOptions").is(":checked"),copyMembers:$("#copyMembers").is(":checked"),copyUserGroupOptions:$("#copyUserGroupOptions").is(":checked")}},success:function(e){window.location=e.returnValues.redirectURL}})},this),"",e,!0)}}),WCF.ACP.User.EnableHandler={_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsEnableButton").click($.proxy(function(e){var t=$(e.currentTarget);t.data("enabled")?this.disable([t.data("objectID")]):this.enable([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.enable"===e.data.actionName&&this.enable(e.data.parameters.objectIDs)},disable:function(e){this._proxy.setOption("data",{actionName:"disable",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},enable:function(e){this._proxy.setOption("data",{actionName:"enable",className:"wcf\\data\\user\\UserAction",objectIDs:e}),this._proxy.sendRequest()},_success:function(e){$(".jsEnableButton").each(function(t,a){var i=$(a);WCF.inArray(i.data("objectID"),e.objectIDs)&&("disable"==e.actionName?i.data("enabled",!1).data("tooltip",i.data("enableMessage")).removeClass("fa-check-square-o").addClass("fa-square-o"):i.data("enabled",!0).data("tooltip",i.data("disableMessage")).removeClass("fa-square-o").addClass("fa-check-square-o"));
 
-});var t=new WCF.System.Notification;t.show(function(){window.location.reload()})}},WCF.ACP.User.SendNewPasswordHandler={init:function(){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.sendNewPassword"===e.data.actionName&&WCF.System.Confirmation.show(e.data.parameters.confirmMessage,function(t){"confirm"===t&&new WCF.ACP.Worker("sendingNewPasswords","wcf\\system\\worker\\SendNewPasswordWorker",WCF.Language.get("wcf.acp.user.sendNewPassword.workerTitle"),{userIDs:e.data.parameters.objectIDs})})}},WCF.ACP.Import={},WCF.ACP.Import.Manager=Class.extend({_currentAction:"",_dialog:null,_index:-1,_objectTypes:[],_proxy:null,_redirectURL:"",init:function(e,t){this._currentAction="",this._index=-1,this._objectTypes=e,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?worker-proxy/&t="+SECURITY_TOKEN}),this._redirectURL=t,this._invoke()},_invoke:function(){if(this._index++,this._index>=this._objectTypes.length){this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check"),this._dialog.find("h1").text(WCF.Language.get("wcf.acp.dataImport.completed"));var e=$('<div class="formSubmit" />').appendTo(this._dialog.find("#workerContainer"));$("<button>"+WCF.Language.get("wcf.global.button.next")+"</button>").click($.proxy(function(){new WCF.Action.Proxy({autoSend:!0,data:{noRedirect:1},dataType:"html",success:$.proxy(function(){window.location=this._redirectURL},this),url:"index.php?cache-clear/&t="+SECURITY_TOKEN})},this)).appendTo(e),this._dialog.wcfDialog("render")}else this._run(WCF.Language.get("wcf.acp.dataImport.data."+this._objectTypes[this._index]),this._objectTypes[this._index])},_run:function(e,t){this._currentAction=e,this._proxy.setOption("data",{className:"wcf\\system\\worker\\ImportWorker",parameters:{objectType:t}}),this._proxy.sendRequest()},_success:function(e){null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.dataImport")})),e.template&&this._dialog.html(e.template),this._currentAction&&this._dialog.find("h1").text(this._currentAction),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()):this._invoke()}}),WCF.ACP.Stat={},WCF.ACP.Stat.Chart=Class.extend({init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$("#statRefreshButton").click($.proxy(this._refresh,this)),this._refresh()},_refresh:function(){var e=[];$("input[name=objectTypeID]:checked").each(function(){e.push($(this).val())}),e.length&&(this._proxy.setOption("data",{className:"wcf\\data\\stat\\daily\\StatDailyAction",actionName:"getData",parameters:{startDate:$("#startDateDatePicker").val(),endDate:$("#endDateDatePicker").val(),value:$("input[name=value]:checked").val(),dateGrouping:$("input[name=dateGrouping]:checked").val(),objectTypeIDs:e}}),this._proxy.sendRequest())},_success:function(e){switch($("input[name=dateGrouping]:checked").val()){case"yearly":var t=[1,"year"],a=WCF.Language.get("wcf.acp.stat.timeFormat.yearly");break;case"monthly":var t=[1,"month"],a=WCF.Language.get("wcf.acp.stat.timeFormat.monthly");break;case"weekly":var t=[7,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.weekly");break;default:var t=[1,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.daily")}var i={series:{lines:{show:!0},points:{show:!0}},grid:{hoverable:!0},xaxis:{mode:"time",minTickSize:t,timeformat:a,monthNames:WCF.Language.get("__monthsShort")},yaxis:{min:0,tickDecimals:0,tickFormatter:function(e){return WCF.String.addThousandsSeparator(e)}}},s=[];for(var n in e.returnValues){for(var o=e.returnValues[n],r=0;r<o.data.length;r++)o.data[r][0]*=1e3;s.push(o)}$.plot("#chart",s,i),$("#chart").on("plothover",function(e,t,a){a?$("#chartTooltip").html(a.series.xaxis.tickFormatter(a.datapoint[0],a.series.xaxis)+", "+WCF.String.formatNumeric(a.datapoint[1])+" "+a.series.label).css({top:a.pageY+5,left:a.pageX+5}).wcfFadeIn():$("#chartTooltip").hide()}),s.length||$("#chart").append('<p style="position: absolute; font-size: 1.2rem; text-align: center; top: 50%; margin-top: -20px; width: 100%">'+WCF.Language.get("wcf.acp.stat.noData")+"</p>")}}),WCF.ACP.Ad={},WCF.ACP.Ad.LocationHandler=Class.extend({_pageConditions:null,_pageControllers:null,init:function(){this._pageConditions=$("#pageConditions"),this._pageControllers=$("#pageControllers");var e=this._pageControllers.parents("dl:eq(0)");e.hide();var t=e.parent("fieldset");t.children("dl:visible").length||t.hide();var a=t.next("fieldset");a&&(a.data("margin-top",a.css("margin-top")),a.css("margin-top",0)),e.next("dl").css("margin-top",0),$("#objectTypeID").on("change",$.proxy(this._setPageController,this)),this._setPageController(),$("#adForm").submit($.proxy(this._submit,this))},_setPageController:function(){var e=$("#objectTypeID").find("option:checked");e.data("page")?this._pageControllers.val([this._pageControllers.find('option[data-object-type="'+e.data("page")+'"]').val()]).change():this._pageControllers.val([]).change()},_submit:function(){this._pageConditions.is(":hidden")?this._pageConditions.find("select, input").remove():this._pageControllers.val([])}}),WCF.ACP.Tag={},WCF.ACP.Tag.SetAsSynonymsHandler=Class.extend({_dialog:null,_objectIDs:[],init:function(){require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.tag",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.tag.setAsSynonyms"===e.data.actionName&&(this._objectIDs=e.data.parameters.objectIDs,null===this._dialog&&(this._dialog=$('<div id="setAsSynonymsDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.tag.setAsSynonyms")})),this._dialog.html(e.data.parameters.template),$button=this._dialog.find('button[data-type="submit"]').disable().click($.proxy(this._submit,this)),this._dialog.find("input[type=radio]").change(function(){$button.enable()}))},_submit:function(){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"setAsSynonyms",className:"wcf\\data\\tag\\TagAction",objectIDs:this._objectIDs,parameters:{tagID:this._dialog.find('input[name="tagID"]:checked').val()}},success:$.proxy(function(){this._dialog.wcfDialog("close"),(new WCF.System.Notification).show(function(){window.location.reload()})},this)})}});
\ No newline at end of file
+});var t=new WCF.System.Notification;t.show(function(){window.location.reload()})}},WCF.ACP.User.SendNewPasswordHandler={init:function(){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.sendNewPassword"===e.data.actionName&&WCF.System.Confirmation.show(e.data.parameters.confirmMessage,function(t){"confirm"===t&&new WCF.ACP.Worker("sendingNewPasswords","wcf\\system\\worker\\SendNewPasswordWorker",WCF.Language.get("wcf.acp.user.sendNewPassword.workerTitle"),{userIDs:e.data.parameters.objectIDs})})}},WCF.ACP.Import={},WCF.ACP.Import.Manager=Class.extend({_currentAction:"",_dialog:null,_index:-1,_objectTypes:[],_proxy:null,_redirectURL:"",init:function(e,t){this._currentAction="",this._index=-1,this._objectTypes=e,this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?worker-proxy/&t="+SECURITY_TOKEN}),this._redirectURL=t,this._invoke()},_invoke:function(){if(this._index++,this._index>=this._objectTypes.length){this._dialog.find(".fa-spinner").removeClass("fa-spinner").addClass("fa-check"),this._dialog.find("h1").text(WCF.Language.get("wcf.acp.dataImport.completed"));var e=$('<div class="formSubmit" />').appendTo(this._dialog.find("#workerContainer"));$("<button>"+WCF.Language.get("wcf.global.button.next")+"</button>").click($.proxy(function(){new WCF.Action.Proxy({autoSend:!0,data:{noRedirect:1},dataType:"html",success:$.proxy(function(){window.location=this._redirectURL},this),url:"index.php?cache-clear/&t="+SECURITY_TOKEN})},this)).appendTo(e),this._dialog.wcfDialog("render")}else this._run(WCF.Language.get("wcf.acp.dataImport.data."+this._objectTypes[this._index]),this._objectTypes[this._index])},_run:function(e,t){this._currentAction=e,this._proxy.setOption("data",{className:"wcf\\system\\worker\\ImportWorker",parameters:{objectType:t}}),this._proxy.sendRequest()},_success:function(e){null===this._dialog&&(this._dialog=$("<div />").hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.dataImport")})),e.template&&this._dialog.html(e.template),this._currentAction&&this._dialog.find("h1").text(this._currentAction),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()):this._invoke()}}),WCF.ACP.Stat={},WCF.ACP.Stat.Chart=Class.extend({init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$("#statRefreshButton").click($.proxy(this._refresh,this)),this._refresh()},_refresh:function(){var e=[];$("input[name=objectTypeID]:checked").each(function(){e.push($(this).val())}),e.length&&(this._proxy.setOption("data",{className:"wcf\\data\\stat\\daily\\StatDailyAction",actionName:"getData",parameters:{startDate:$("#startDateDatePicker").val(),endDate:$("#endDateDatePicker").val(),value:$("input[name=value]:checked").val(),dateGrouping:$("input[name=dateGrouping]:checked").val(),objectTypeIDs:e}}),this._proxy.sendRequest())},_success:function(e){switch($("input[name=dateGrouping]:checked").val()){case"yearly":var t=[1,"year"],a=WCF.Language.get("wcf.acp.stat.timeFormat.yearly");break;case"monthly":var t=[1,"month"],a=WCF.Language.get("wcf.acp.stat.timeFormat.monthly");break;case"weekly":var t=[7,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.weekly");break;default:var t=[1,"day"],a=WCF.Language.get("wcf.acp.stat.timeFormat.daily")}var i={series:{lines:{show:!0},points:{show:!0}},grid:{hoverable:!0},xaxis:{mode:"time",minTickSize:t,timeformat:a,monthNames:WCF.Language.get("__monthsShort")},yaxis:{min:0,tickDecimals:0,tickFormatter:function(e){return WCF.String.addThousandsSeparator(e)}}},s=[];for(var n in e.returnValues){for(var o=e.returnValues[n],r=0;r<o.data.length;r++)o.data[r][0]*=1e3;s.push(o)}$.plot("#chart",s,i),$("#chart").on("plothover",function(e,t,a){a?$("#chartTooltip").html(a.series.xaxis.tickFormatter(a.datapoint[0],a.series.xaxis)+", "+WCF.String.formatNumeric(a.datapoint[1])+" "+a.series.label).css({top:a.pageY+5,left:a.pageX+5}).wcfFadeIn():$("#chartTooltip").hide()}),s.length||$("#chart").append('<p style="position: absolute; font-size: 1.2rem; text-align: center; top: 50%; margin-top: -20px; width: 100%">'+WCF.Language.get("wcf.acp.stat.noData")+"</p>")}}),WCF.ACP.Ad={},WCF.ACP.Ad.LocationHandler=Class.extend({_pageConditions:null,_pageInputs:[],init:function(){this._pageConditions=$("#pageConditions"),this._pageInputs=$('input[name="pageIDs[]"]');var e=$(this._pageInputs[0]).parents("dl:eq(0)");e.hide();var t=e.parent("section");t.children("dl:visible").length||t.hide();var a=t.next("section");if(a){var i=a.css("margin-top");a.css("margin-top",0),require(["EventHandler"],function(e){e.add("com.woltlab.wcf.pageConditionDependence","checkVisivility",function(){t.is(":visible")?a.css("margin-top",i):a.css("margin-top",0)})})}e.next("dl").css("margin-top",0),$("#objectTypeID").on("change",$.proxy(this._setPageController,this)),this._setPageController(),$("#adForm").submit($.proxy(this._submit,this))},_setPageController:function(){var e=$("#objectTypeID").find("option:checked");require(["Core"],function(t){for(var a,i,s=0,n=this._pageInputs.length;n>s;s++)a=this._pageInputs[s],i=!1,e.data("page")&&elData(a,"identifier")===e.data("page")?(a.checked||(i=!0),a.checked=!0):(a.checked&&(i=!0),a.checked=!1),i&&t.triggerEvent(this._pageInputs[s],"change")}.bind(this))},_submit:function(){if(this._pageConditions.is(":hidden"))this._pageConditions.find("select, input").remove();else for(var e=0,t=this._pageInputs.length;t>e;e++)this._pageInputs[e].checked=!1}}),WCF.ACP.Tag={},WCF.ACP.Tag.SetAsSynonymsHandler=Class.extend({_dialog:null,_objectIDs:[],init:function(){require(["EventHandler"],function(e){e.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.tag",this._clipboardAction.bind(this))}.bind(this))},_clipboardAction:function(e){"com.woltlab.wcf.tag.setAsSynonyms"===e.data.actionName&&(this._objectIDs=e.data.parameters.objectIDs,null===this._dialog&&(this._dialog=$('<div id="setAsSynonymsDialog" />').hide().appendTo(document.body),this._dialog.wcfDialog({closable:!1,title:WCF.Language.get("wcf.acp.tag.setAsSynonyms")})),this._dialog.html(e.data.parameters.template),$button=this._dialog.find('button[data-type="submit"]').disable().click($.proxy(this._submit,this)),this._dialog.find("input[type=radio]").change(function(){$button.enable()}))},_submit:function(){new WCF.Action.Proxy({autoSend:!0,data:{actionName:"setAsSynonyms",className:"wcf\\data\\tag\\TagAction",objectIDs:this._objectIDs,parameters:{tagID:this._dialog.find('input[name="tagID"]:checked').val()}},success:$.proxy(function(){this._dialog.wcfDialog("close"),(new WCF.System.Notification).show(function(){window.location.reload()})},this)})}});
\ No newline at end of file
index e1527cc9d34e72b6562a31fa5f915a5ca8ccd229..96c98f72f6cc77ff91c9686a5b28d1be3ed62d32 100644 (file)
@@ -7,4 +7,4 @@ var a=elData(e,"attachment-id");i>0?e.outerHTML="[attach="+a+","+t+","+i+"][/att
 !h)){var f=elCreate("small");f.className="innerError",f.textContent=r.get("wcf.global.form.error.multilingual"),n.parentNode.parentNode.appendChild(f)}if(!c.validate("title_"+this._media.mediaID,!0)&&(d=!0,!p)){var f=elCreate("small");f.className="innerError",f.textContent=r.get("wcf.global.form.error.multilingual"),thistitle.parentNode.parentNode.appendChild(f)}this._media.altText=c.getValues("altText_"+this._media.mediaID).toObject(),this._media.caption=c.getValues("caption_"+this._media.mediaID).toObject(),this._media.title=c.getValues("title_"+this._media.mediaID).toObject()}else this._media.altText[this._media.languageID]=i.value,this._media.caption[this._media.languageID]=n.value,this._media.title[this._media.languageID]=s.value;for(var m={allowAll:~~elById("mediaEditor_"+this._media.mediaID+"_aclAllowAll").checked,group:[],user:[]},g=elBySelAll('input[name="aclValues[group][]"]',t),v=0,b=g.length;b>v;v++)m.group.push(~~g[v].value);for(var _=elBySelAll('input[name="aclValues[user][]"]',t),v=0,b=_.length;b>v;v++)m.user.push(~~_[v].value);d||(u&&elRemove(u),h&&elRemove(h),p&&elRemove(p),e.api(this,{actionName:"update",objectIDs:[this._media.mediaID],parameters:{aclValues:m,altText:this._media.altText,caption:this._media.caption,data:{isMultilingual:this._media.isMultilingual,languageID:this._media.languageID},title:this._media.title}}))},_updateLanguageFields:function(e,t){e&&(t=e.currentTarget);var i=elById("mediaEditor_"+this._media.mediaID+"_languageIDContainer").parentNode;t.checked?(c.enable("title_"+this._media.mediaID),c.enable("caption_"+this._media.mediaID),c.enable("altText_"+this._media.mediaID),elHide(i)):(c.disable("title_"+this._media.mediaID),c.disable("caption_"+this._media.mediaID),c.disable("altText_"+this._media.mediaID),elShow(i))},edit:function(e){if(null!==this._media)throw new Error("Cannot edit media with id '"+e.mediaID+"' while editing media with id '"+this._media.mediaID+"'");this._media=e,this._dialogs.has("mediaEditor_"+e.mediaID)||this._dialogs.set("mediaEditor_"+e.mediaID,{_dialogSetup:function(){return{id:"mediaEditor_"+e.mediaID,options:{backdropCloseOnClick:!1,onClose:this._close.bind(this),title:r.get("wcf.media.edit")},source:{after:function(e,t){setTimeout(function(){l.setLanguageId("languageID",this._media.languageID||LANGUAGE_ID),this._media.isMultilingual&&(c.setValues("altText_"+this._media.mediaID,i.fromObject(this._media.altText||{})),c.setValues("caption_"+this._media.mediaID,i.fromObject(this._media.caption||{})),c.setValues("title_"+this._media.mediaID,i.fromObject(this._media.title||{})));var t=elBySel("input[name=isMultilingual]",e);t.addEventListener("change",this._updateLanguageFields.bind(this)),this._updateLanguageFields(null,t);var a=this._keyPress.bind(this);elBySel("input[name=altText]",e).addEventListener("keypress",a),elBySel("input[name=title]",e).addEventListener("keypress",a),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("WoltLab/WCF/Media/Search",["Ajax","Dom/Traverse","Dom/Util","Language","Ui/SimpleDropdown"],function(e,t,i,n,a){"use strict";function r(e){this._fileType="all";var i=a.getDropdownMenu(this._getIdPrefix()+"Search");if(i){this._fileTypes=t.childrenBySel(i,"li:not(.dropdownDivider)");for(var n=this._selectFileType.bind(this),r=0,o=this._fileTypes.length;o>r;r++){var s=this._fileTypes[r];e&&elData(s,"file-type")==e&&(this._fileType=e),this._fileTypes[r].addEventListener(WCF_CLICK_EVENT,n)}e&&e.length&&this._updateDropdownButtonLabel(),a.registerCallback(this._getIdPrefix()+"Search",this._updateFileTypeDropdown.bind(this));var l=t.parentByTag(elById(this._getIdPrefix()+"Search"),"FORM");l&&l.addEventListener("submit",function(){var e=elCreate("input");elAttr(e,"type","hidden"),elAttr(e,"name","fileType"),elAttr(e,"value",this._fileType),l.appendChild(e)}.bind(this))}else this._fileType=null}return r.prototype={_getIdPrefix:function(){return"media"},_selectFileType:function(e){this._fileType=elData(e.currentTarget,"file-type"),this._updateDropdownButtonLabel(e)},_updateDropdownButtonLabel:function(e){var i=a.getDropdown(this._getIdPrefix()+"Search"),r=t.childBySel(t.childByClass(i,"dropdownToggle"),"SPAN");if("all"!==this._fileType){var o;if(e)o=e.currentTarget;else for(var s=0,l=this._fileTypes.length;l>s;s++){var c=this._fileTypes[s];if(elData(c,"file-type")==this._fileType){o=c;break}}r.textContent=t.childBySel(o,"SPAN").textContent}else r.textContent=n.get("wcf.media.search.filetype")},_updateFileTypeDropdown:function(){for(var e=0,t=this._fileTypes.length;t>e;e++){var i=this._fileTypes[e];i.classList[elData(i,"file-type")===this._fileType?"add":"remove"]("active")}}},r}),define("WoltLab/WCF/Media/Upload",["Core","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","Permission","Upload","WoltLab/WCF/File/Util"],function(e,t,i,n,a,r,o,s,l){"use strict";function c(t,i,n){n=n||{},this._mediaManager=null,n.mediaManager&&(this._mediaManager=n.mediaManager,delete n.mediaManager),s.call(this,t,i,e.extend({className:"wcf\\data\\media\\MediaAction",multiple:this._mediaManager?!0:!1,singleFileRequests:!0},n))}return e.inherit(c,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(){return this._mediaManager?e.extend(c._super.prototype._getParameters.call(this),{fileTypeFilters:this._mediaManager.getOption("fileTypeFilters")}):c._super.prototype._getParameters.call(this)},_success:function(e,n){for(var o=this._fileElements[e],s=0,c=o.length;c>s;s++){var d=o[s],u=elData(d,"internal-file-id"),h=n.returnValues.media[u];if(elRemove(i.childByTag(i.childByClass(d,"mediaInformation"),"PROGRESS")),h){var p=i.childByTag(i.childByClass(d,"mediaThumbnail"),"SPAN");if(h.tinyThumbnailType){var f=p.parentNode;elRemove(p);var m=elCreate("img");elAttr(m,"src",h.tinyThumbnailLink),elAttr(m,"alt",""),m.style.setProperty("width","144px"),m.style.setProperty("height","144px"),f.appendChild(m)}else p.classList.remove("fa-spinner"),p.classList.add(l.getIconClassByMimeType(h.fileType));d.className="jsClipboardObject",elData(d,"object-id",h.mediaID),this._mediaManager&&(this._mediaManager.setupMediaElement(h,d),this._mediaManager.resetMedia(),this._mediaManager.addMedia(h,d))}else{var g=n.returnValues.errors[u];g||(g={errorType:"uploadFailed",filename:elData(d,"filename")});var p=i.childByTag(i.childByClass(d,"mediaThumbnail"),"SPAN");p.classList.remove("fa-spinner"),p.classList.add("fa-remove"),p.classList.add("pointer"),d.classList.add("uploadFailed"),d.addEventListener(WCF_CLICK_EVENT,function(){elRemove(this)});var v=i.childByClass(i.childByClass(d,"mediaInformation"),"mediaTitle");v.innerText=r.get("wcf.media.upload.error."+g.errorType,{filename:g.filename})}t.trigger()}a.fire("com.woltlab.wcf.media.upload","success",{files:o,media:n.returnValues.media,upload:this})}}),c}),define("WoltLab/WCF/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:[],treshold: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){-1===this._options.excludedSearchValues.indexOf(e)&&this._options.excludedSearchValues.push(e)},removeExcludedValue:function(e){var t=this._options.excludedSearchValues.indexOf(e);-1!==t&&this._options.excludedSearchValues.splice(t,1)},_keyDown:function(e){if(null===this._dropdownMenu||!i.isOpen(this._element.id))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;a>n&&(t=this._dropdownMenu.children[n],!t.classList.contains("active"));)n++;if(13===e.keyCode)i.close(this._element.id),this._select(t);else if(27===e.keyCode){if(!i.isOpen(this._element.id))return!0;i.close(this._element.id)}else{var r=0;38===e.keyCode?r=(0===n?a:n)-1:40===e.keyCode&&(r=n+1,r===a&&(r=0)),r!==n&&(t.classList.remove("active"),this._dropdownMenu.children[r].classList.add("active"))}return e.preventDefault(),!1},_select:function(e){var t=e instanceof Event;t&&(e=e.currentTarget.parentNode),this._options.callbackSelect(this._element.id,{objectId:elData(e.children[0],"object-id"),value:e.textContent}),t&&this._element.focus()},_keyUp:function(t){var n=t.currentTarget.value.trim();if(this._value!==n){if(n.length<this._options.treshold)return null!==this._dropdownMenu&&i.close(this._element.id),void(this._value=n);this._value=n,e.api(this,{parameters:{data:{excludedSearchValues:this._options.excludedSearchValues,searchString:n}}})}},_ajaxSetup:function(){return{data:this._options.ajax}},_ajaxSuccess:function(e){if(null===this._dropdownMenu?(this._dropdownMenu=elCreate("div"),this._dropdownMenu.className="dropdownMenu",i.initFragment(this._element,this._dropdownMenu)):this._dropdownMenu.innerHTML="",e.returnValues.length){for(var t,n,a,r=0,o=e.returnValues.length;o>r;r++)n=e.returnValues[r],t=elCreate("a"),t.textContent=n.label,elData(t,"object-id",n.objectID),t.addEventListener(WCF_CLICK_EVENT,this._select.bind(this)),a=elCreate("li"),0===r&&(a.className="active"),a.appendChild(t),this._dropdownMenu.appendChild(a);i.open(this._element.id)}else i.close(this._element.id)}},n}),define("WoltLab/WCF/Ui/ItemList",["Core","Dictionary","Language","Dom/Traverse","WoltLab/WCF/Ui/Suggestion"],function(e,t,i,n,a){"use strict";var r="",o=new t,s=!1,l=null,c=null,d=null,u=null;return{init:function(t,i,r){var s=elById(t);if(null===s)throw new Error("Expected a valid element id, '"+t+"' is invalid.");r=e.extend({ajax:{actionName:"getSearchResultList",className:"",data:{}},excludedSearchValues:[],maxItems:-1,maxLength:-1,restricted:!1,isCSV:!1,callbackChange:null,callbackSubmit:null,submitFieldName:""},r);var l=n.parentByTag(s,"FORM");if(null!==l&&r.isCSV===!1){if(!r.submitFieldName.length&&"function"!=typeof r.callbackSubmit)throw new Error("Expected a valid function for option 'callbackSubmit', a non-empty value for option 'submitFieldName' or enabling the option 'submitFieldCSV'.");l.addEventListener("submit",function(){var e=this.getValues(t);if(r.submitFieldName.length)for(var i,n=0,a=e.length;a>n;n++)i=elCreate("input"),i.type="hidden",i.name=r.submitFieldName.replace(/{$objectId}/,e[n].objectId),i.value=e[n].value,l.appendChild(i);else r.callbackSubmit(l,e)}.bind(this))}this._setup();var c=this._createUI(s,r),d=new a(t,{ajax:r.ajax,callbackSelect:this._addItem.bind(this),excludedSearchValues:r.excludedSearchValues});if(o.set(t,{dropdownMenu:null,element:c.element,list:c.list,listItem:c.element.parentNode,options:r,shadow:c.shadow,suggestion:d}),i=c.values.length?c.values:i,Array.isArray(i))for(var u,h=0,p=i.length;p>h;h++)u=i[h],"string"==typeof u&&(u={objectId:0,value:u}),this._addItem(t,u)},getValues:function(e){if(!o.has(e))throw new Error("Element id '"+e+"' is unknown.");for(var t,i,a=o.get(e),r=n.childrenByClass(a.list,"item"),s=[],l=0,c=r.length;c>l;l++)i=r[l],t={objectId:elData(i,"object-id"),value:n.childByTag(i,"SPAN").textContent},s.push(t);return s},setValues:function(e,t){if(!o.has(e))throw new Error("Element id '"+e+"' is unknown.");var i,a,r=o.get(e),s=n.childrenByClass(r.list,"item");for(i=0,a=s.length;a>i;i++)this._removeItem(null,s[i],!0);for(i=0,a=t.length;a>i;i++)this._addItem(e,t[i])},_setup:function(){s||(s=!0,l=this._keyDown.bind(this),c=this._keyPress.bind(this),d=this._keyUp.bind(this),u=this._removeItem.bind(this))},_createUI:function(e,t){var i=elCreate("ol");i.className="inputItemList",elData(i,"element-id",e.id),i.addEventListener(WCF_CLICK_EVENT,function(t){t.target===i&&e.focus()});var n=elCreate("li");n.className="input",i.appendChild(n),e.addEventListener("keydown",l),e.addEventListener("keypress",c),e.addEventListener("keyup",d),e.parentNode.insertBefore(i,e),n.appendChild(e),-1!==t.maxLength&&elAttr(e,"maxLength",t.maxLength);var a=null,r=[];if(t.isCSV&&(a=elCreate("input"),a.className="itemListInputShadow",a.type="hidden",a.name=e.name,e.removeAttribute("name"),i.parentNode.insertBefore(a,i),"TEXTAREA"===e.nodeName)){for(var o,s=e.value.split(","),u=0,h=s.length;h>u;u++)o=s[u].trim(),o.length&&r.push(o);var p=elCreate("input");e.parentNode.insertBefore(p,e),p.id=e.id,elRemove(e),e=p}return{element:e,list:i,shadow:a,values:r}},_handleLimit:function(e){var t=o.get(e);-1!==t.options.maxItems&&(t.list.childElementCount-1<t.options.maxItems?t.element.disabled&&(t.element.disabled=!1,t.element.removeAttribute("placeholder")):t.element.disabled||(t.element.disabled=!0,elAttr(t.element,"placeholder",i.get("wcf.global.form.input.maxItems"))))},_keyDown:function(e){var t=e.currentTarget,i=t.parentNode.previousElementSibling;r=t.id,8===e.keyCode?0===t.value.length&&null!==i&&(i.classList.contains("active")?this._removeItem(null,i):i.classList.add("active")):27===e.keyCode&&null!==i&&i.classList.contains("active")&&i.classList.remove("active")},_keyPress:function(e){if(13==e.charCode||44==e.charCode){if(e.preventDefault(),o.get(e.currentTarget.id).options.restricted)return;var t=e.currentTarget.value.trim();t.length&&this._addItem(e.currentTarget.id,{objectId:0,value:t})}},_keyUp:function(e){var t=e.currentTarget;if(t.value.length>0){var i=t.parentNode.previousElementSibling;null!==i&&i.classList.remove("active")}},_addItem:function(e,t){var i=o.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,u),n.appendChild(a),n.appendChild(r),i.list.insertBefore(n,i.listItem),i.suggestion.addExcludedValue(t.value),i.element.value="",this._handleLimit(e);var s=this._syncShadow(i);"function"==typeof i.options.callbackChange&&(null===s&&(s=this.getValues(e)),i.options.callbackChange(e,s))},_removeItem:function(e,t,i){t=null===e?t:e.currentTarget.parentNode;var n=t.parentNode,a=elData(n,"element-id"),r=o.get(a);r.suggestion.removeExcludedValue(t.children[0].textContent),n.removeChild(t),i||r.element.focus(),this._handleLimit(a);var s=this._syncShadow(r);"function"==typeof r.options.callbackChange&&(null===s&&(s=this.getValues(a)),r.options.callbackChange(a,s))},_syncShadow:function(e){if(!e.options.isCSV)return null;for(var t="",i=this.getValues(e.element.id),n=0,a=i.length;a>n;n++)t+=(t.length?",":"")+i[n].value;return e.shadow.value=t,i}}}),define("WoltLab/WCF/Ui/Page/JumpTo",["Language","ObjectMap","Ui/Dialog"],function(e,t,i){"use strict";var n=null,a=null,r=null,o=new t,s=null,l={init:function(e,t){if(t=t||null,null===t){var i=elData(e,"link");t=i?function(e){window.location=i.replace(/pageNo=%d/,"pageNo="+e)}:function(){}}else if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.");o.has(e)||elBySelAll(".jumpTo",e,function(i){i.addEventListener(WCF_CLICK_EVENT,this._click.bind(this,e)),o.set(e,{callback:t})}.bind(this))},_click:function(t,a){n=t,"object"==typeof a&&a.preventDefault(),i.open(this);var o=elData(t,"pages");s.value=o,s.setAttribute("max",o),s.select(),r.textContent=e.get("wcf.page.jumpTo.description").replace(/#pages#/,o)},_keyUp:function(e){if(13===e.which&&a.disabled===!1)return void this._submit();var t=~~s.value;1>t||t>~~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='<dl><dt><label for="jsPaginationPageNo">'+e.get("wcf.page.jumpTo")+'</label></dt><dd><input type="number" id="jsPaginationPageNo" value="1" min="1" max="1" class="tiny"><small></small></dd></dl><div class="formSubmit"><button class="buttonPrimary">'+e.get("wcf.global.button.submit")+"</button></div>";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("WoltLab/WCF/Ui/Pagination",["Core","Language","ObjectMap","StringUtil","WoltLab/WCF/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 icon16 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='<span class="'+o+'"></span>',r.classList.add("disabled")),n.appendChild(this._createLink(1));var s=this.SHOW_LINKS-4,l=this._options.activePage-2;0>l&&(l=0);var c=this._options.maxPage-(this._options.activePage+1);0>c&&(c=0),this._options.activePage>1&&this._options.activePage<this._options.maxPage&&s--;var d=s/2,u=this._options.activePage,h=this._options.activePage;1>u&&(u=1),1>h&&(h=1),h>this._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),1>u&&(u=1),h>this._options.maxPage&&(h=this._options.maxPage);var p='<a class="jsTooltip" title="'+t.get("wcf.page.jumpTo")+'">&hellip;</a>';u>1&&(2>u-1?n.appendChild(this._createLink(2)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=p,n.appendChild(r),e=!0));for(var f=u+1;h>f;f++)n.appendChild(this._createLink(f));h<this._options.maxPage&&(this._options.maxPage-h<2?n.appendChild(this._createLink(this._options.maxPage-1)):(r=elCreate("li"),r.className="jumpTo",r.innerHTML=p,n.appendChild(r),e=!0)),n.appendChild(this._createLink(this._options.maxPage)),r=elCreate("li"),r.className="skip",n.appendChild(r),o="icon icon16 fa-chevron-right",this._options.activePage<this._options.maxPage?(i=elCreate("a"),i.className=o+" jsTooltip",i.href="#",i.title=t.get("wcf.global.page.next"),r.appendChild(i),i.addEventListener(WCF_CLICK_EVENT,this.switchPage.bind(this,this._options.activePage+1))):(r.innerHTML='<span class="'+o+'"></span>',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="<span>"+n.addThousandsSeparator(e)+'</span><span class="invisible">'+t.get("wcf.page.pagePosition",{pageNo:e,pages:this._options.maxPage})+"</span>";return i},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("WoltLab/WCF/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;50>=r?r=0:r-=50,window.scrollTo({left:0,top:r,behavior:"smooth"})},_onScroll:function(){null!==n&&window.clearTimeout(n),n=window.setTimeout(function(){t(),window.removeEventListener("scroll",i),t=null,n=null},100)}}}),define("WoltLab/WCF/Controller/Notice/Dismiss",["Ajax"],function(e){"use strict";var t={setup:function(){var e=elByClass("jsDismissNoticeButton");if(e.length)for(var t=this._click.bind(this),i=0,n=e.length;n>i;i++)e[i].addEventListener(WCF_CLICK_EVENT,t)},_click:function(t){var i=t.currentTarget;e.apiOnce({data:{actionName:"dismiss",className:"wcf\\data\\notice\\NoticeAction",objectIDs:[elData(i,"object-id")]},success:function(){var e=i.parentNode;e.addEventListener("transitionend",function(){elRemove(e)}),e.classList.remove("active")}})}};return t}),define("WoltLab/WCF/Media/Manager/Search",["Ajax","Core","Dom/Traverse","Dom/Util","Language","WoltLab/WCF/Media/Search","Ui/SimpleDropdown"],function(e,t,i,n,a,r,o){"use strict";function s(e){r.call(this),this._mediaManager=e,this._searchMode=!1,this._input=elById(this._getIdPrefix()+"SearchField"),this._input.addEventListener("keypress",this._keyPress.bind(this)),this._cancelButton=elById(this._getIdPrefix()+"SearchCancelButton"),this._cancelButton.addEventListener(WCF_CLICK_EVENT,this._cancelSearch.bind(this))}return t.inherit(s,r,{_ajaxSetup:function(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\media\\MediaAction",interfaceName:"wcf\\data\\ISearchAction"}}},_ajaxSuccess:function(e){this._mediaManager.setMedia(e.returnValues.media||{},e.returnValues.template||"")},_cancelSearch:function(){this._searchMode&&(this._searchMode=!1,this._mediaManager.resetMedia(),this.resetSearch())},_getIdPrefix:function(){return"mediaManager"},_keyPress:function(e){if(13===e.charCode){e.preventDefault();var t=i.childByClass(this._input.parentNode.parentNode,"innerInfo");this._input.value.length>=3?(t&&elHide(t),this._search()):t?elShow(t):(t=elCreate("p"),t.className="innerInfo",t.textContent=a.get("wcf.media.search.info.searchStringThreshold"),n.insertAfter(t,this._input.parentNode))}},_search:function(){this._searchMode=!0,e.api(this,{parameters:{fileType:this._fileType,fileTypeFilters:this._mediaManager.getOption("fileTypeFilters"),mode:this._mediaManager.getMode(),searchString:this._input.value}})},_selectFileType:function(e){s._super.prototype._selectFileType.call(this,e),this._search()},hideSearch:function(){elHide(elById(this._getIdPrefix()+"Search"))},resetSearch:function(){this._input.value="",this._fileType="all",this._updateDropdownButtonLabel()},showSearch:function(){elShow(elById(this._getIdPrefix()+"Search"))}}),s}),define("WoltLab/WCF/Media/Manager/Base",["Core","Dictionary","Dom/ChangeListener","Dom/Traverse","Dom/Util","EventHandler","Language","List","Permission","Ui/Dialog","Ui/Notification","WoltLab/WCF/Controller/Clipboard","WoltLab/WCF/Media/Editor","WoltLab/WCF/Media/Upload","WoltLab/WCF/Media/Manager/Search"],function(e,t,i,n,a,r,o,s,l,c,d,u,h,p,f){"use strict";function m(n){this._options=e.extend({dialogTitle:o.get("wcf.media.manager"),fileTypeFilters:{}},n),this._media=new t,this._mediaData=new t,this._mediaCache=null,this._mediaManagerMediaList=null,this._search=null,l.get("admin.content.cms.canManageMedia")&&(this._mediaEditor=new h(this)),i.add("WoltLab/WCF/Media/Manager",this._addButtonEventListeners.bind(this))}return m.prototype={_addButtonEventListeners:function(){if(this._mediaManagerMediaList)for(var e=n.childrenByTag(this._mediaManagerMediaList,"LI"),t=0,i=e.length;i>t;t++){var a=e[t];if(l.get("admin.content.cms.canManageMedia")){var r=elByClass("jsMediaEditIcon",a)[0];r&&(r.classList.remove("jsMediaEditIcon"),r.addEventListener(WCF_CLICK_EVENT,this._editMedia.bind(this)))}}},_click:function(e){e.preventDefault(),c.open(this)},_clipboardAction:function(e){if("com.woltlab.wcf.media.delete"===e.data.actionName&&null===e.responseData){for(var t=e.responseData.objectIDs,i=0,n=t.length;n>i;i++)this.removeMedia(~~t[i],!0);d.show()}},_dialogClose:function(){u.hideEditor("com.woltlab.wcf.media")},_dialogInit:function(e,t){var i=t.returnValues.media||{};for(var a in i)objOwns(i,a)&&this._mediaData.set(~~a,i[a]);this._mediaManagerMediaList=elById("mediaManagerMediaList");for(var o=n.childrenByTag(this._mediaManagerMediaList,"LI"),s=0,c=o.length;c>s;s++){var d=o[s];this._media.set(~~elData(d,"object-id"),d)}l.get("admin.content.cms.canManageMedia")&&(new p("mediaManagerMediaUploadButton","mediaManagerMediaList",{mediaManager:this}),u.setup({hasMarkedItems:t.returnValues.hasMarkedItems?!0:!1,pageClassName:"menuManagerDialog-"+this.getMode()}),r.add("com.woltlab.wcf.clipboard","com.woltlab.wcf.media",this._clipboardAction.bind(this))),this._search=new f(this),o.length||this._search.hideSearch(),this._dialogShow()},_dialogSetup:function(){return{id:"mediaManager",options:{onClose:this._dialogClose.bind(this),onShow:this._dialogShow.bind(this),title:this._options.dialogTitle},source:{after:this._dialogInit.bind(this),data:{actionName:"getManagementDialog",className:"wcf\\data\\media\\MediaAction",parameters:{mode:this.getMode(),fileTypeFilters:this._options.fileTypeFilters}}}}},_dialogShow:function(){this._mediaManagerMediaList&&u.showEditor("com.woltlab.wcf.media")},_editMedia:function(e){if(!l.get("admin.content.cms.canManageMedia"))throw new Error("You are not allowed to edit media files.");c.close("mediaManager"),this._mediaEditor.edit(this._mediaData.get(~~elData(e.currentTarget,"object-id")))},_editorClose:function(){c.open(this)},_editorSuccess:function(e){c.open(this),this._mediaData.set(~~e.mediaID,e);var t=this._media.get(~~e.mediaID),i=elByClass("mediaTitle",t)[0];e.isMultilingual?i.textContent=e.title[LANGUAGE_ID]||e.filename:i.textContent=e.title[e.languageID]||e.filename},_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 l=n.childrenByTag(this._mediaManagerMediaList,"LI"),c=0,d=l.length;d>c;c++){var h=l[c];this._media.has(elData(h,"object-id"))?elShow(h):elHide(h)}i.trigger(),u.reload()},addMedia:function(e,t){e.languageID||(e.isMultilingual=1),this._mediaData.set(~~e.mediaID,e),this._media.set(~~e.mediaID,t),1===this._media.size&&this._search.showSearch()},getMode:function(){return""},getOption:function(e){return this._options[e]?this._options[e]:null},removeMedia:function(e,t){this._media.has(e)&&(elRemove(this._media.get(e)),this._media["delete"](e),this._mediaData["delete"](e)),t&&this._mediaCache&&this._mediaCache.has(e)&&this._mediaCache["delete"](e)},resetMedia:function(){null!==this._mediaCache&&(this._setMedia(this._mediaCache),this._mediaCache=null,this._search.resetSearch())},setMedia:function(e,t){this._mediaCache||(this._mediaCache=this._media);var i=!1;for(var a in e)objOwns(e,a)&&(i=!0);if(i){var r=elCreate("ul");r.innerHTML=t;for(var o=n.childrenByTag(r,"LI"),s=0,l=o.length;l>s;s++){var c=o[s];this._mediaData.has(~~elData(c,"object-id"))||(this._mediaData.set(elData(c,"object-id"),c),this._mediaManagerMediaList.appendChild(c))}}this._setMedia(e)},setupMediaElement:function(e,t){var i=n.childByClass(t,"mediaInformation"),a=elCreate("nav");a.className="buttonGroupNavigation",i.parentNode.appendChild(a);var r=elCreate("ul");r.className="smallButtons buttonGroup",a.appendChild(r);var s=elCreate("li");r.appendChild(s);var c=elCreate("input");if(c.className="jsClipboardItem jsMediaCheckbox",elAttr(c,"type","checkbox"),elData(c,"object-id",e.mediaID),s.appendChild(c),l.get("admin.content.cms.canManageMedia")){s=elCreate("li"),r.appendChild(s);var d=elCreate("a");s.appendChild(d);var u=elCreate("span");u.className="icon icon16 fa-pencil jsTooltip jsMediaEditIcon",elData(u,"object-id",e.mediaID),elAttr(u,"title",o.get("wcf.global.button.edit")),d.appendChild(u),s=elCreate("li"),r.appendChild(s),d=elCreate("a"),s.appendChild(d),u=elCreate("span"),u.className="icon icon16 fa-times jsTooltip jsMediaDeleteIcon",elData(u,"object-id",e.mediaID),elAttr(u,"title",o.get("wcf.global.button.delete")),d.appendChild(u)}}},m}),define("WoltLab/WCF/Media/Manager/Editor",["Core","Dictionary","Dom/Traverse","Language","Ui/Dialog","WoltLab/WCF/Media/Manager/Base"],function(e,t,i,n,a,r){"use strict";function o(i){i=e.extend({callbackInsert:null},i),r.call(this,i),this._activeButton=null,this._buttons=elByClass(this._options.buttonClass||"jsMediaEditorButton");for(var n=0,a=this._buttons.length;a>n;n++)this._buttons[n].addEventListener(WCF_CLICK_EVENT,this._click.bind(this));this._mediaToInsert=new t,this._mediaToInsertByClipboard=!1}return e.inherit(o,r,{_addButtonEventListeners:function(){if(o._super.prototype._addButtonEventListeners.call(this),this._mediaManagerMediaList)for(var e=i.childrenByTag(this._mediaManagerMediaList,"LI"),t=0,n=e.length;n>t;t++){var a=e[t],r=elByClass("jsMediaInsertIcon",a)[0];r&&(r.classList.remove("jsMediaInsertIcon"),r.addEventListener(WCF_CLICK_EVENT,this._openInsertDialog.bind(this)))}},_buildInsertDialog:function(){var e,t="",i=["small","medium","large"];e:for(var r=0,o=i.length;o>r;r++){e=i[r];for(var s=0,l=this._mediaToInsert.length;l>s;s++)if(!this._mediaToInsert[r][e+"ThumbnailType"])continue e;t+='<option value="'+e+'">'+n.get("wcf.media.insert.imageSize."+e)+"</option>"}t+='<option value="original">'+n.get("wcf.media.insert.imageSize.original")+"</option>";var c='<div class="section">'+(this._mediaToInsert.size>1?"<dl><dt>"+n.get("wcf.media.insert.type")+'</dt><dd><select name="insertType"><option value="separate">'+n.get("wcf.media.insert.type.separate")+'</option><option value="gallery">'+n.get("wcf.media.insert.type.gallery")+"</option></select></dd></dl>":"")+'<dl class="thumbnailSizeSelection"><dt>'+n.get("wcf.media.insert.imageSize")+'</dt><dd><select name="thumbnailSize">'+t+'</select></dd></dl></div><div class="formSubmit"><button class="buttonPrimary">'+n.get("wcf.global.button.insert")+"</button></div>";a.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("select[name=insertType]",e);if(null!==t){var i=elByClass("thumbnailSizeSelection",e)[0];t.addEventListener("change",function(e){"gallery"===e.currentTarget.value?elHide(i):elShow(i)})}}.bind(this),title:n.get("wcf.media.insert")},source:c}}.bind(this)})},_click:function(e){this._activeButton=e.currentTarget,o._super.prototype._click.call(this,e);
 },_clipboardAction:function(e){o._super.prototype._clipboardAction.call(this,e),"com.woltlab.wcf.media.insert"===e.data.actionName&&this.insertMedia(e.data.parameters.objectIDs,!0)},_getInsertDialogId:function(){var e="mediaInsert";return this._mediaToInsert.forEach(function(t,i){e+="-"+i}),e},_insertMedia:function(e){var i,n="separate";if(e){a.close(this._getInsertDialogId());var r=e.currentTarget.closest(".dialogContent");this._mediaToInsert.size>1&&(n=elBySel("select[name=insertType]",r).value),i=elBySel("select[name=thumbnailSize]",r).value}null!==this._options.callbackInsert?this._options.callbackInsert(this._mediaToInsert,n,i):"separate"===n?(this._options.editor.buffer.set(),this._mediaToInsert.forEach(this._insertMediaItem.bind(this,i))):this._insertMediaGallery(),this._mediaToInsertByClipboard,this._mediaToInsert=new t,this._mediaToInsertByClipboard=!1,a.close(this)},_insertMediaGallery:function(){var e=[];this._mediaToInsert.forEach(function(t){e.push(t.mediaID)}),this._options.editor.buffer.set(),this._options.editor.insert.text("[wsmg='"+e.join(",")+"'][/wsmg]")},_insertMediaItem:function(e,t){if(t.isImage){for(var i,n=["small","medium","large","original"],a="",r=0;4>r&&(i=n[r],!t[i+"ThumbnailHeight"]||(a=i,e!=i));r++);e=a,this._options.editor.insert.html('<img src="'+t[e+"ThumbnailLink"]+'" class="woltlabSuiteMedia" data-media-id="'+t.mediaID+'" data-media-size="'+e+'">')}else this._options.editor.insert.text("[wsm='"+t.mediaID+"'][/wsm]")},_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,r=!0,o=0,s=e.length;s>o;o++)n=this._mediaData.get(e[o]),this._mediaToInsert.set(n.mediaID,n),n.isImage||(r=!1);if(r){a.close(this);var l=this._getInsertDialogId();a.getDialog(l)?a.openStatic(l):this._buildInsertDialog()}else this._insertMedia()},getMode:function(){return"editor"},setupMediaElement:function(e,t){o._super.prototype.setupMediaElement.call(this,e,t);var i=elBySel("nav.buttonGroupNavigation > ul.smallButtons",t),a=elCreate("li");i.appendChild(a);var r=elCreate("a");a.appendChild(r);var s=elCreate("span");s.className="icon icon16 fa-plus jsTooltip jsMediaInsertIcon",elData(s,"object-id",e.mediaID),elAttr(s,"title",n.get("wcf.media.button.insert")),r.appendChild(s)}}),o}),define("WoltLab/WCF/Media/Manager/Select",["Core","Dom/Traverse","Dom/Util","Language","ObjectMap","Ui/Dialog","WoltLab/WCF/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;n>t;t++){var r=this._buttons[t],s=elData(r,"store");if(s){var l=elById(s);if(l&&"INPUT"===l.tagName){this._buttons[t].addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),this._storeElements.set(r,l);var c=elCreate("p");c.className="button",i.insertAfter(c,r);var d=elCreate("span");d.className="icon icon16 fa-times",c.appendChild(d),l.value||elHide(c),c.addEventListener(WCF_CLICK_EVENT,this._removeMedia.bind(this))}}}}return e.inherit(s,o,{_addButtonEventListeners:function(){if(s._super.prototype._addButtonEventListeners.call(this),this._mediaManagerMediaList)for(var e=t.childrenByTag(this._mediaManagerMediaList,"LI"),i=0,n=e.length;n>i;i++){var a=e[i],r=elByClass("jsMediaSelectIcon",a)[0];r&&(r.classList.remove("jsMediaSelectIcon"),r.addEventListener(WCF_CLICK_EVENT,this._chooseMedia.bind(this)))}},_chooseMedia:function(e){if(null===this._activeButton)throw new Error("Media cannot be chosen if no button is active.");var t=this._mediaData.get(~~elData(e.currentTarget,"object-id"));elById(elData(this._activeButton,"store")).value=t.mediaID;var i=elData(this._activeButton,"display");if(i){var n=elById(i);n&&t.isImage&&(n.innerHTML='<img src="'+t.smallThumbnailLink+'" alt="'+t.altText+'" />')}elShow(this._activeButton.nextElementSibling),r.close("mediaManager")},_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;o>r;r++)i=a[r],n.value&&n.value==elData(i,"object-id")?i.classList.add("jsSelected"):i.classList.remove("jsSelected")},getMode:function(){return"select"},setupMediaElement:function(e,t){s._super.prototype.setupMediaElement.call(this,e,t);var i=elBySel("nav.buttonGroupNavigation > ul.smallButtons",t),a=elCreate("li");i.appendChild(a);var r=elCreate("a");a.appendChild(r);var o=elCreate("span");o.className="icon icon16 fa-check jsTooltip jsMediaSelectIcon",elData(o,"object-id",e.mediaID),elAttr(o,"title",n.get("wcf.media.button.choose")),r.appendChild(o)},_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("WoltLab/WCF/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,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))},_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<this._options.minLength?void(this._dropdownContainerId&&a.close(this._dropdownContainerId)):void(this._options.delay?(null!==this._timerDelay&&window.clearTimeout(this._timerDelay),this._timerDelay=window.setTimeout(function(){this._search(t)}.bind(this),this._options.delay)):this._search(t))},_search:function(t){this._request&&this._request.abortPrevious(),this._request=e.api(this,this._getParameters(t))},_getParameters:function(e){return{parameters:{data:{searchString:e}}}},_keyboardNextItem:function(){this._activeItem.classList.remove("active"),this._activeItem.nextElementSibling?this._activeItem=this._activeItem.nextElementSibling:this._activeItem=this._list.children[0],this._activeItem.classList.add("active")},_keyboardPreviousItem:function(){this._activeItem.classList.remove("active"),this._activeItem.previousElementSibling?this._activeItem=this._activeItem.previousElementSibling:this._activeItem=this._list.children[this._list.childElementCount-1],this._activeItem.classList.add("active")},_keyboardSelectItem:function(){this._selectItem(this._activeItem)},_clickSelectItem:function(e){this._selectItem(e.currentTarget)},_selectItem:function(e){this._options.callbackSelect&&this._options.callbackSelect(e)===!1?this._element.value="":this._element.value=elData(e,"label"),this._activeItem=null,a.close(this._dropdownContainerId)},_ajaxSuccess:function(e){var t=!1;if(null===this._list?(this._list=elCreate("ul"),this._list.className="dropdownMenu",t=!0,"function"==typeof this._options.callbackDropdownInit&&this._options.callbackDropdownInit(this._list)):this._list.innerHTML="","object"==typeof e.returnValues){var i,r=this._clickSelectItem.bind(this);for(var o in e.returnValues)e.returnValues.hasOwnProperty(o)&&(i=this._createListItem(e.returnValues[o]),i.addEventListener(WCF_CLICK_EVENT,r),this._list.appendChild(i))}t&&(n.insertAfter(this._list,this._element),a.initFragment(this._element.parentNode,this._list),this._dropdownContainerId=n.identify(this._element.parentNode)),this._dropdownContainerId&&(this._activeItem=null,this._list.childElementCount||this._handleEmptyResult()!==!1?(a.open(this._dropdownContainerId),this._list.childElementCount&&~~elData(this._list.children[0],"object-id")&&(this._activeItem=this._list.children[0],this._activeItem.classList.add("active"))):a.close(this._dropdownContainerId))},_handleEmptyResult:function(){if(!this._options.noResultPlaceholder)return!1;var e=elCreate("li");e.className="dropdownText";var t=elCreate("span");return t.textContent=this._options.noResultPlaceholder,e.appendChild(t),this._list.appendChild(e),!0},_createListItem:function(e){var t=elCreate("li");elData(t,"object-id",e.objectID),elData(t,"label",e.label);var i=elCreate("span");return i.textContent=e.label,t.appendChild(i),t},_ajaxSetup:function(){return{data:this._options.ajax}}},r}),define("WoltLab/WCF/Ui/User/Search/Input",["Core","WoltLab/WCF/Ui/Search/Input"],function(e,t){"use strict";function i(e,t){this.init(e,t)}return e.inherit(i,t,{init:function(t,n){var a=e.isPlainObject(n)&&n.includeUserGroups===!0;n=e.extend({ajax:{className:"wcf\\data\\user\\UserAction",parameters:{data:{includeUserGroups:a?1:0}}}},n),i._super.prototype.init.call(this,t,n)},_createListItem:function(e){var t=i._super.prototype._createListItem.call(this,e);elData(t,"type",e.type);var n=elCreate("div");return n.className="box16",n.innerHTML="group"===e.type?'<span class="icon icon16 fa-users"></span>':e.icon,n.appendChild(t.children[0]),t.appendChild(n),t}}),i}),define("WoltLab/WCF/Ui/Acl/Simple",["Language","Dom/ChangeListener","WoltLab/WCF/Ui/User/Search/Input"],function(e,t,i){"use strict";function n(e){this.init(e)}return n.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)}),new i(elById(this._prefix+"aclSearchInput"),{callbackSelect:this._select.bind(this),includeUserGroups:!0,preventSubmit:!0}),this._aclListContainer=elById(this._prefix+"aclListContainer"),this._list=elById(this._prefix+"aclAccessList"),this._list.addEventListener(WCF_CLICK_EVENT,this._removeItem.bind(this)),t.trigger()},_select:function(i){var n=elData(i,"type"),a='<span class="icon icon16 fa-'+("group"===n?"users":"user")+'"></span>';a+='<span class="aclLabel">'+elData(i,"label")+"</span>",a+='<span class="icon icon16 fa-times pointer jsTooltip" title="'+e.get("wcf.global.button.delete")+'"></span>',a+='<input type="hidden" name="aclValues['+n+'][]" value="'+elData(i,"object-id")+'">';var r=elCreate("li");r.innerHTML=a;var o=elBySel(".fa-user",this._list);return null===o?this._list.appendChild(r):this._list.insertBefore(r,o.parentNode),elShow(this._aclListContainer),t.trigger(),!1},_removeItem:function(e){e.target.classList.contains("fa-times")&&(elRemove(e.target.parentNode),0===this._list.childElementCount&&elHide(this._aclListContainer))}},n}),define("WoltLab/WCF/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("WoltLab/WCF/Ui/ItemList/Filter",["EventKey","Language","List","StringUtil","Dom/Util"],function(e,t,i,n,a){"use strict";function r(e){this.init(e)}return r.prototype={init:function(i){this._value="";var n=elById(i);if(null===n)throw new Error("Expected a valid element id, '"+i+"' does not match anything.");if(!n.classList.contains("scrollableCheckboxList"))throw new Error("Filter only works with elements with the CSS class 'scrollableCheckboxList'.");var a=elCreate("div");a.className="itemListFilter",n.parentNode.insertBefore(a,n),a.appendChild(n);var r=elCreate("div");r.className="inputAddon";var o=elCreate("input");o.className="long",o.type="text",o.placeholder=t.get("wcf.global.filter.placeholder"),o.addEventListener("keydown",function(t){e.Enter(t)&&t.preventDefault()}),o.addEventListener("keyup",this._keyup.bind(this));var s=elCreate("a");s.href="#",s.className="button inputSuffix jsTooltip",s.title=t.get("wcf.global.filter.button.clear"),s.innerHTML='<span class="icon icon16 fa-times"></span>',s.addEventListener("click",function(e){e.preventDefault(),this._input.value="",this._keyup()}.bind(this)),r.appendChild(o),r.appendChild(s),a.appendChild(r),this._container=a,this._element=n,this._input=o,this._items=null,this._fragment=null},_buildItems:function(){this._items=new i;for(var e,t=0,n=this._element.childElementCount;n>t;t++){e=this._element.children[t];for(var a=e.children[0],r=a.textContent.trim(),o=a.children[0];o.nextSibling;)a.removeChild(o.nextSibling);a.appendChild(document.createTextNode(" "));var s=elCreate("span");s.textContent=r,a.appendChild(s),this._items.add({item:e,span:s,text:r})}},_keyup:function(){var e=this._input.value.trim();if(this._value!==e){null===this._fragment&&(this._fragment=document.createDocumentFragment(),this._element.style.setProperty("height",this._element.offsetHeight+"px","")),this._fragment.appendChild(this._element),null===this._items&&this._buildItems();var i=new RegExp("("+n.escapeRegExp(e)+")","i"),r=""===e;this._items.forEach(function(t){""===e?(t.span.textContent=t.text,elShow(t.item)):i.test(t.text)?(t.span.innerHTML=t.text.replace(i,"<u>$1</u>"),elShow(t.item),r=!0):elHide(t.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),r?o&&elRemove(o):o||(o=elCreate("small"),o.className="innerError",o.textContent=t.get("wcf.global.filter.error.noMatches"),a.insertAfter(o,this._container))}}},r}),define("WoltLab/WCF/Ui/ItemList/User",["WoltLab/WCF/Ui/ItemList"],function(e){"use strict";var t={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)}};return t}),define("WoltLab/WCF/Ui/User/List",["Ajax","Core","Dictionary","Dom/Util","Ui/Dialog","WoltLab/WCF/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("WoltLab/WCF/Ui/Like/Handler",["Ajax","Core","Dictionary","Language","ObjectMap","StringUtil","Dom/ChangeListener","Dom/Util","Ui/Dialog","WoltLab/WCF/Ui/User/List"],function(e,t,i,n,a,r,o,s,l,c){"use strict";function d(e,t){this.init(e,t)}var u=!1;return d.prototype={init:function(e,i){if(""===i.containerSelector)throw new Error("[WoltLab/WCF/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("WoltLab/WCF/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;r>a;a++)e=i[a],this._containers.has(e)||(t={badge:null,dislikeButton:null,likeButton:null,summary:null,dislikes:~~elData(e,"like-dislikes"),liked:~~elData(e,"like-liked"),likes:~~elData(e,"like-likes"),objectId:~~elData(e,"object-id"),users:JSON.parse(elData(e,"like-users"))},this._containers.set(e,t),this._buildWidget(e,t),n=!0);n&&o.trigger()},_buildWidget:function(e,t){if(this._options.canViewSummary){var i,n,a,r=this._options.isSingleItem?elBySel(this._options.summarySelector):elBySel(this._options.summarySelector,e);null!==r&&(i=elCreate("div"),i.className="likesSummary",this._options.summaryUseIcon&&(a=elCreate("span"),a.className="icon icon16 fa-thumbs-o-up",i.appendChild(a)),n=elCreate("span"),n.className="likesSummaryContent",n.addEventListener(WCF_CLICK_EVENT,this._showSummary.bind(this,e)),i.appendChild(n),this._options.summaryPrepend?s.prepend(i,r):r.appendChild(i),t.summary=n,this._updateSummary(e))}var o,l,c=this._options.isSingleItem?elBySel(this._options.badgeContainerSelector):elBySel(this._options.badgeContainerSelector,e);if(null!==c&&(o=elCreate("a"),o.href="#",o.className="wcfLikeCounter jsTooltip"+(this._options.badgeClassNames?" "+this._options.badgeClassNames:""),o.addEventListener(WCF_CLICK_EVENT,this._showSummary.bind(this,e)),"OL"===c.nodeName||"UL"===c.nodeName?(l=elCreate("li"),l.appendChild(o),c.appendChild(l)):c.appendChild(o),t.badge=o,this._updateBadge(e)),this._options.canLike&&(WCF.User.userID!=elData(e,"user-id")||this._options.canLikeOwnContent)){var d=this._options.buttonAppendToSelector?this._options.isSingleItem?elBySel(this._options.buttonAppendToSelector):elBySel(this._options.buttonAppendToSelector,e):null,u=this._options.buttonBeforeSelector?this._options.isSingleItem?elBySel(this._options.buttonBeforeSelector):elBySel(this._options.buttonBeforeSelector,e):null;if(null===u&&null===d)throw new Error("Unable to find insert location for like/dislike buttons.");t.likeButton=this._createButton(e,!0,u,d),this._options.canDislike&&(t.dislikeButton=this._createButton(e,!1,u,d)),this._updateActiveState(e)}},_createButton:function(e,t,i,a){var r=n.get("wcf.like.button."+(t?"like":"dislike")),o=elCreate("li");o.className="wcf"+(t?"Like":"Dislike")+"Button";var s=elCreate("a");return s.className="jsTooltip"+(this._options.renderAsButton?" button":""),s.href="#",s.title=r,s.innerHTML='<span class="icon icon16 fa-thumbs-o-'+(t?"up":"down")+'"></span> <span class="invisible">'+r+"</span>",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);var i=t.likes-t.dislikes,a='<span class="icon icon16 fa-thumbs-o-'+(0>i?"down":"up")+'"></span><span class="wcfLikeValue">';i>0?(a+="+"+r.addThousandsSeparator(i),t.badge.classList.add("likeCounterLiked")):0>i?(a+="−"+r.addThousandsSeparator(Math.abs(i)),t.badge.classList.add("likeCounterDisliked")):a+="±0",t.badge.innerHTML=a+"</span>",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;o>r;r++)i.push(t.users[a[r]]);var s=t.likes-i.length;t.summary.innerHTML=n.get("wcf.like.summary",{users:i,others:s})}else elHide(t.summary.parentNode)},_updateActiveState:function(e){var t=this._containers.get(e),i=this._options.markListItemAsActive?t.dislikeButton.parentNode:t.dislikeButton,n=this._options.markListItemAsActive?t.likeButton.parentNode:t.likeButton;null!==t.dislikeButton&&i.classList.remove("active"),n.classList.remove("active"),1===t.liked?n.classList.add("active"):-1===t.liked&&null!==t.dislikeButton&&i.classList.add("active")},_like:function(t,i){i.preventDefault(),u||(u=!0,e.api(this,{actionName:elData(i.currentTarget,"type"),parameters:{data:{containerID:s.identify(t),objectID:this._containers.get(t).objectId,objectType:this._objectType}}}))},_ajaxSuccess:function(e){var t=elById(e.returnValues.containerID),i=this._containers.get(t);if(void 0!==i){i.dislikes=~~e.returnValues.dislikes,i.likes=~~e.returnValues.likes;var n=e.returnValues.users;i.users=[];for(var a=Object.keys(n),o=0,s=a.length;s>o;o++)i.users.push(r.escapeHTML(n[a[o]].username));1==e.returnValues.isLiked?i.liked=1:1==e.returnValues.isDisliked?i.liked=-1:i.liked=0,this._updateBadge(t),this._options.canViewSummary&&this._updateSummary(t),this._updateActiveState(t),this._details["delete"](t),u=!1}},_ajaxSetup:function(){return{data:{className:"wcf\\data\\like\\LikeAction"}}}},d}),define("WoltLab/WCF/Ui/Message/InlineEditor",["Ajax","Core","Dictionary","Environment","EventHandler","Language","ObjectMap","Dom/ChangeListener","Dom/Traverse","Dom/Util","Ui/Notification","Ui/ReusableDropdown","WoltLab/WCF/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._activeDropdownElement=null,this._activeElement=null,this._dropdownMenu=null,this._elements=new o,this._options=t.extend({canEditInline:!1,className:"",containerId:0,dropdownIdentifier:"",editorPrefix:"messageEditor",messageSelector:".jsMessage",quoteManager:null},e),this.rebuild(),s.add("Ui/Message/InlineEdit_"+this._options.className,this.rebuild.bind(this))},rebuild:function(){for(var e,t,i,n=elBySelAll(this._options.messageSelector),a=0,r=n.length;r>a;a++)if(i=n[a],!this._elements.has(i)){e=elBySel(".jsMessageEditButton",i),null!==e&&(t=elDataBool(i,"can-edit"),this._options.canEditInline||elDataBool(i,"can-edit-inline")?(e.addEventListener(WCF_CLICK_EVENT,this._clickDropdown.bind(this,i)),e.classList.add("jsDropdownEnabled"),t&&e.addEventListener("dblclick",this._click.bind(this,i))):t&&e.addEventListener(WCF_CLICK_EVENT,this._click.bind(this,i)));var o=elBySel(".messageBody",i),s=elBySel(".messageFooter",i),l=elBySel(".messageHeader",i);this._elements.set(i,{button:e,messageBody:o,messageBodyEditor:null,messageFooter:s,messageFooterButtons:elBySel(".messageFooterButtons",s),messageHeader:l,messageText:elBySel(".messageText",o)})}},_click:function(t,i){null===t&&(t=this._activeDropdownElement),i&&i.preventDefault(),null===this._activeElement?(this._activeElement=t,this._prepare(),e.api(this,{actionName:"beginEdit",parameters:{containerID:this._options.containerId,objectID:this._getObjectId(t)}})):d.show("wcf.message.error.editorAlreadyInUse",null,"warning")},_clickDropdown:function(e,i){i.preventDefault();var n=i.currentTarget;if(!n.classList.contains("dropdownToggle")){if(n.classList.add("dropdownToggle"),n.parentNode.classList.add("dropdown"),function(e,t){e.addEventListener(WCF_CLICK_EVENT,function(i){i.preventDefault(),i.stopPropagation(),this._activeDropdownElement=t,u.toggleDropdown(this._options.dropdownIdentifier,e)}.bind(this))}.bind(this)(n,e),null===this._dropdownMenu){this._dropdownMenu=elCreate("ul"),this._dropdownMenu.className="dropdownMenu";var r=this._dropdownGetItems();a.fire("com.woltlab.wcf.inlineEditor","dropdownInit_"+this._options.dropdownIdentifier,{items:r}),this._dropdownBuild(r),u.init(this._options.dropdownIdentifier,this._dropdownMenu),u.registerCallback(this._options.dropdownIdentifier,this._dropdownToggle.bind(this))}setTimeout(function(){t.triggerEvent(n,WCF_CLICK_EVENT)},10)}},_dropdownBuild:function(e){for(var t,i,n,a=this._clickDropdownItem.bind(this),o=0,s=e.length;s>o;o++)t=e[o],n=elCreate("li"),elData(n,"item",t.item),"divider"===t.item?n.className="dropdownDivider":(i=elCreate("span"),i.textContent=r.get(t.label),n.appendChild(i),"editItem"===t.item?n.addEventListener(WCF_CLICK_EVENT,this._click.bind(this,null)):n.addEventListener(WCF_CLICK_EVENT,a)),this._dropdownMenu.appendChild(n)},_dropdownToggle:function(e,t){var i=this._elements.get(this._activeDropdownElement);if(i.button.parentNode.classList["open"===t?"add":"remove"]("dropdownOpen"),i.messageFooterButtons.classList["open"===t?"add":"remove"]("forceVisible"),"open"===t){var n=this._dropdownOpen();a.fire("com.woltlab.wcf.inlineEditor","dropdownOpen_"+this._options.dropdownIdentifier,{element:this._activeDropdownElement,visibility:n});for(var r,o,s=!1,l=0;l<this._dropdownMenu.childElementCount;l++)o=this._dropdownMenu.children[l],r=elData(o,"item"),"divider"===r?s?(elShow(o),s=!1):elHide(o):objOwns(n,r)&&n[r]===!1?(elHide(o),l>0&&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(n.messageBody,e.returnValues.message),"string"==typeof e.returnValues.attachmentList){for(var o=0,s=r.length;s>o;o++)elRemove(r[o]);var l=elCreate("div");for(c.setInnerHtml(l,e.returnValues.attachmentList);l.childNodes.length;)n.messageFooter.appendChild(l.childNodes[0])}if("string"==typeof e.returnValues.poll){var u=elBySel(".pollContainer",n.messageBody);null!==u&&elRemove(u.parentNode);var h=elCreate("div");h.className="jsInlineEditorHideContent",c.setInnerHtml(h,e.returnValues.poll),c.prepend(h,n.messageBody)}this._restoreMessage(),this._updateHistory(this._getHash(this._getObjectId(t))),a.fire("com.woltlab.wcf.redactor","autosaveDestroy_"+i),d.show(),this._options.quoteManager&&(this._options.quoteManager.clearAlternativeEditor(),this._options.quoteManager.countQuotes())},_hideEditor:function(){var e=this._elements.get(this._activeElement);elHide(l.childByClass(e.messageBodyEditor,"editorContainer"));var t=elCreate("span");t.className="icon icon48 fa-spinner",e.messageBodyEditor.appendChild(t)},_restoreEditor:function(){var e=this._elements.get(this._activeElement),t=elBySel(".fa-spinner",e.messageBodyEditor);elRemove(t);var i=l.childByClass(e.messageBodyEditor,"editorContainer");null!==i&&elShow(i)},_destroyEditor:function(){a.fire("com.woltlab.wcf.redactor2","autosaveDestroy_"+this._getEditorId()),a.fire("com.woltlab.wcf.redactor","destroy_"+this._getEditorId())},_getHash:function(e){return"#message"+e},_updateHistory:function(e){window.location.hash=e},_getEditorId:function(){return this._options.editorPrefix+this._getObjectId(this._activeElement)},_getObjectId:function(e){return~~elData(e,"object-id")},_ajaxFailure:function(e){var t=this._elements.get(this._activeElement),i=elBySel(".redactor-editor",t.messageBodyEditor);if(null===i)return this._restoreMessage(),!0;if(this._restoreEditor(),!e||void 0===e.returnValues||void 0===e.returnValues.errorType)return!0;var n=elBySel(".innerError",t.messageBodyEditor);return null===n&&(n=elCreate("small"),n.className="innerError",c.insertAfter(n,i)),n.textContent=e.returnValues.errorType,!1},_ajaxSuccess:function(e){switch(e.actionName){case"beginEdit":this._showEditor(e);break;case"save":this._showMessage(e);
 }},_ajaxSetup:function(){return{data:{className:this._options.className,interfaceName:"wcf\\data\\IMessageInlineEditorAction"}}},legacyGetDropdownMenus:function(){return this._dropdownMenus},legacyGetElements:function(){return this._elements},legacyEdit:function(e){this._click(elById(e),null)}},p}),define("WoltLab/WCF/Ui/Message/Manager",["Ajax","Core","Dictionary","Language","Dom/ChangeListener","Dom/Util"],function(e,t,i,n,a,r){"use strict";function o(e){this.init(e)}return o.prototype={init:function(e){this._elements=null,this._options=t.extend({className:"",selector:""},e),this.rebuild(),a.add("Ui/Message/Manager"+this._options.className,this.rebuild.bind(this))},rebuild:function(){this._elements=new i;for(var e,t=elBySelAll(this._options.selector),n=0,a=t.length;a>n;n++)e=t[n],this._elements.set(elData(e,"object-id"),e)},getPermission:function(e,t){t="can-"+this._getAttributeName(t);var i=this._elements.get(e);if(void 0===i)throw new Error("Unknown object id '"+e+"' for selector '"+this._options.selector+"'");return elDataBool(i,t)},getPropertyValue:function(e,t,i){var n=this._elements.get(e);if(void 0===n)throw new Error("Unknown object id '"+e+"' for selector '"+this._options.selector+"'");return window[i?"elDataBool":"elData"](n,this._getAttributeName(t))},update:function(t,i,n){e.api(this,{actionName:i,parameters:n||{},objectIDs:[t]})},updateItems:function(e,t){Array.isArray(e)||(e=[e]);for(var i,n=0,a=e.length;a>n;n++)if(i=this._elements.get(e[n]),void 0!==i)for(var r in t)t.hasOwnProperty(r)&&this._update(i,r,t[r])},updateAllItems:function(e){var t=[];this._elements.forEach(function(e,i){t.push(i)}.bind(this)),this.updateItems(t,e)},_update:function(e,t,i){elData(e,this._getAttributeName(t),i);var n=1==i||i===!0||"true"===i;this._updateState(e,t,i,n)},_updateState:function(e,t,i,n){switch(t){case"isDeleted":e.classList[n?"add":"remove"]("messageDeleted"),this._toggleMessageStatus(e,"jsIconDeleted","wcf.message.status.deleted","red",n);break;case"isDisabled":e.classList[n?"add":"remove"]("messageDisabled"),this._toggleMessageStatus(e,"jsIconDisabled","wcf.message.status.disabled","green",n)}},_toggleMessageStatus:function(e,t,i,a,o){var s=elBySel(".messageStatus",e);if(null===s){var l=elBySel(".messageHeaderMetaData",e);if(null===l)return;s=elCreate("ul"),s.className="messageStatus",r.insertAfter(s,l)}var c=elBySel("."+t,s);if(o){if(null!==c)return;c=elCreate("span"),c.className="badge label "+a+" "+t,c.textContent=n.get(i);var d=elCreate("li");d.appendChild(c),s.appendChild(d)}else{if(null===c)return;elRemove(c.parentNode)}},_getAttributeName:function(e){if(-1!==e.indexOf("-"))return e;for(var t,i="",n=e.split(/([A-Z][a-z]+)/),a=0,r=n.length;r>a;a++)t=n[a],t.length&&(i.length&&(i+="-"),i+=t.toLowerCase());return i},_ajaxSuccess:function(){throw new Error("Method _ajaxSuccess() must be implemented by deriving functions.")},_ajaxSetup:function(){return{data:{className:this._options.className}}}},o}),define("WoltLab/WCF/Ui/Message/Reply",["Ajax","Core","EventHandler","Language","Dom/ChangeListener","Dom/Util","Dom/Traverse","Ui/Dialog","Ui/Notification","WoltLab/WCF/Ui/Scroll","EventKey","User","WoltLab/WCF/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._options=t.extend({ajax:{className:""},quoteManager:null,successMessage:"wcf.global.success.add"},e),this._container=elById("messageQuickReply"),this._content=elBySel(".messageContent",this._container),this._textarea=elById("text"),this._editor=null,this._loadingOverlay=null,elBySel(".message",this._container).classList.add("jsInvalidQuoteTarget");var i=this._submit.bind(this),n=elBySel('button[data-type="save"]');n.addEventListener(WCF_CLICK_EVENT,i);for(var a=elBySelAll(".jsQuickReply"),r=0,o=a.length;o>r;r++)a[r].addEventListener(WCF_CLICK_EVENT,function(e){e.preventDefault(),c.element(this._container,function(){this._getEditor().focus.end()}.bind(this))}.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 o=r.getDataAttributes(this._container,"data-",!0,!0);o.data={message:this._getEditor().code.get()},o.removeQuoteIDs=this._options.quoteManager?this._options.quoteManager.getQuotesMarkedForRemoval():[],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=t,r.insertAfter(i,e)},_showLoadingOverlay:function(){null===this._loadingOverlay&&(this._loadingOverlay=elCreate("div"),this._loadingOverlay.className="messageContentLoadingOverlay",this._loadingOverlay.innerHTML='<span class="icon icon96 fa-spinner"></span>'),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("<p>​</p>"),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;"DESC"===elData(this._container,"sort-order")?(r.insertHtml(e.returnValues.template,this._container,"after"),t=r.identify(this._container.nextElementSibling)):(r.insertHtml(e.returnValues.template,this._container,"before"),t=r.identify(this._container.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?!0:(this._handleError(e),!1)},_ajaxSetup:function(){return{data:{actionName:"quickReply",className:this._options.ajax.className,interfaceName:"wcf\\data\\IMessageQuickReplyAction"}}}},p}),define("WoltLab/WCF/Ui/Message/Share",["EventHandler"],function(e){"use strict";return{_pageDescription:"",_pageUrl:"",init:function(){var t=elBySel(".messageShareButtons"),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)}},n=elBySel('meta[property="og:title"]');null!==n&&(this._pageDescription=encodeURIComponent(n.content));var a=elBySel('meta[property="og:url"]');null!==a&&(this._pageUrl=encodeURIComponent(a.content)),e.fire("com.woltlab.wcf.message.share","shareProvider",{container:t,providers:i,pageDescription:this._pageDescription,pageUrl:this._pageUrl});for(var r in i)i.hasOwnProperty(r)&&null!==i[r].link&&i[r].link.addEventListener(WCF_CLICK_EVENT,i[r].share)},_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("WoltLab/WCF/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;d>o;o++)t=e.returnValues[o],r+='<li><div class="containerHeadline pointer" data-page-id="'+t.pageID+'"><h3>'+n.escapeHTML(t.name)+"</h3><small>"+n.escapeHTML(t.displayLink)+"</small></div></li>";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:'<div class="section"><dl><dt><label for="wcfUiPageSearchInput">'+i.get("wcf.page.search.name")+'</label></dt><dd><div class="inputAddon"><input type="text" id="wcfUiPageSearchInput" class="long"><a href="#" class="inputSuffix"><span class="icon icon16 fa-search"></span></a></div></dd></dl></div><section id="wcfUiPageSearchResultContainer" class="section" style="display: none;"><header class="sectionHeader"><h2 class="sectionTitle">'+i.get("wcf.page.search.results")+'</h2><p class="sectionDescription">'+i.get("wcf.page.search.results.description")+'</p></header><ol id="wcfUiPageSearchResultList" class="containerList"></ol></section>'}}}}),define("WoltLab/WCF/Ui/Redactor/Autosave",["Dom/Traverse"],function(e){"use strict";function t(e){this.init(e)}var i=15,n="wsc"+window.WCF_PATH.hashCode()+"-";return t.prototype={init:function(t){this._editor=null,this._element=t,this._key=n+elData(this._element,"autosave"),this._lastMessage="",this._timer=null,this._cleanup(),this._element.removeAttribute("data-autosave");var i=e.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(t){window.console.warn("Unable to access local storage: "+t.message)}try{e=JSON.parse(e)}catch(t){e=""}if(null!==e&&"object"==typeof e){var i=~~elData(this._element,"autosave-last-edit-time");return 1e3*i>e.timestamp?this._element.value: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*i),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)}},_saveToStorage:function(){var e=this._editor.code.get();if(this._editor.utils.isEmpty(e)&&(e=""),this._lastMessage!==e)try{window.localStorage.setItem(this._key,JSON.stringify({content:e,timestamp:Date.now()})),this._lastMessage=e}catch(t){window.console.warn("Unable to write to local storage: "+t.message)}},_cleanup:function(){for(var e,t,i=Date.now()-6048e5,a=0,r=window.localStorage.length;r>a;a++)if(e=window.localStorage.key(a),0===e.indexOf(n)){try{t=window.localStorage.getItem(e)}catch(o){window.console.warn("Unable to access local storage: "+o.message)}try{t=JSON.parse(t)}catch(o){t={timestamp:0}}if(!t||t.timestamp<i)try{window.localStorage.removeItem(e)}catch(o){window.console.warn("Unable to remove from local storage: "+o.message)}}}},t}),define("WoltLab/WCF/Ui/Redactor/Code",["EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog"],function(e,t,i,n,a,r){"use strict";function o(e){this.init(e)}var s=0;return o.prototype={init:function(t){this._editor=t,this._elementId=this._editor.$element[0].id,this._pre=null,e.add("com.woltlab.wcf.redactor2","bbcode_code_"+this._elementId,this._bbcodeCode.bind(this)),e.add("com.woltlab.wcf.redactor2","observe_load_"+this._elementId,this._observeLoad.bind(this)),this._editor.opts.activeButtonsStates.pre="code",this._callbackEdit=this._edit.bind(this),this._observeLoad()},_bbcodeCode:function(e){e.cancel=!0,this._editor.button.toggle({},"pre","func","block.format");var t=this._editor.selection.block();t&&"PRE"===t.nodeName&&(this._setTitle(t),t.addEventListener(WCF_CLICK_EVENT,this._callbackEdit))},_observeLoad:function(){elBySelAll("pre",this._editor.$editor[0],function(e){e.addEventListener(WCF_CLICK_EVENT,this._callbackEdit),this._setTitle(e)}.bind(this))},_edit:function(e){var t=e.currentTarget;if(0===s){s=~~window.getComputedStyle(t).paddingTop.replace(/px$/,"");var i=window.getComputedStyle(t,"::before");s+=~~i.paddingTop.replace(/px$/,""),s+=~~i.height.replace(/px$/,""),s+=~~i.paddingBottom.replace(/px$/,"")}var n=a.offset(t);e.pageY>n.top&&e.pageY<n.top+s&&(e.preventDefault(),this._pre=t,r.open(this))},_save:function(e){e.preventDefault();var t="redactor-code-"+this._elementId;["file","highlighter","line"].forEach(function(e){elData(this._pre,e,elById(t+"-"+e).value)}.bind(this)),this._setTitle(this._pre),this._editor.caret.after(this._pre),r.close(this)},_setTitle:function(e){var t=elData(e,"file"),n=elData(e,"highlighter");n=this._editor.opts.woltlab.highlighters.hasOwnProperty(n)?this._editor.opts.woltlab.highlighters[n]:"";var a=i.get("wcf.editor.code.title",{file:t,highlighter:n});elData(e,"title")!==a&&elData(e,"title",a)},_dialogSetup:function(){var e="redactor-code-"+this._elementId,t=e+"-button-save",a=e+"-file",r=e+"-highlighter",o=e+"-line";return{id:e,options:{onSetup:function(){elById(t).addEventListener(WCF_CLICK_EVENT,this._save.bind(this));var e='<option value="">'+i.get("wcf.editor.code.highlighter.detect")+"</option>",a=[];for(var o in this._editor.opts.woltlab.highlighters)this._editor.opts.woltlab.highlighters.hasOwnProperty(o)&&a.push([o,this._editor.opts.woltlab.highlighters[o]]);a.sort(function(e,t){return e[1]<t[1]?-1:e[1]>t[1]?1:0}),a.forEach(function(t){e+='<option value="'+t[0]+'">'+n.escapeHTML(t[1])+"</option>"}.bind(this)),elById(r).innerHTML=e}.bind(this),onShow:function(){elById(r).value=elData(this._pre,"highlighter");var e=elData(this._pre,"line");elById(o).value=""===e?1:~~e,elById(a).value=elData(this._pre,"file")}.bind(this),title:i.get("wcf.editor.code.edit")},source:'<div class="section"><dl><dt><label for="'+r+'">'+i.get("wcf.editor.code.highlighter")+'</label></dt><dd><select id="'+r+'"></select><small>'+i.get("wcf.editor.code.highlighter.description")+'</small></dd></dl><dl><dt><label for="'+o+'">'+i.get("wcf.editor.code.line")+'</label></dt><dd><input type="number" id="'+o+'" min="0" value="1" class="long"><small>'+i.get("wcf.editor.code.line.description")+'</small></dd></dl><dl><dt><label for="'+a+'">'+i.get("wcf.editor.code.file")+'</label></dt><dd><input type="text" id="'+a+'" class="long"><small>'+i.get("wcf.editor.code.file.description")+'</small></dd></dl></div><div class="formSubmit"><button id="'+t+'" class="buttonPrimary">'+i.get("wcf.global.button.save")+"</button></div>"}}},o}),define("WoltLab/WCF/Ui/Redactor/Format",["Dom/Util"],function(e){"use strict";return{format:function(t,i,n,a){var r=window.getSelection();if(r.rangeCount){var o=r.getRangeAt(0),s=null;o.collapsed&&(s=elCreate("strike"),s.textContent="​",o.insertNode(s),o=document.createRange(),o.selectNodeContents(s),r.removeAllRanges(),r.addRange(o)),null===s&&document.execCommand("strikethrough");for(var l,c,d,u=elBySelAll("strike",t),h=0,p=u.length;p>h;h++){if(d=u[h],l=elCreate(i),n&&(l.className=n),"object"==typeof a)for(c in a)a.hasOwnProperty(c)&&elAttr(l,key,a[key]);e.replaceElement(d,l)}}},removeFormat:function(t,i){i=i.toUpperCase();for(var n=elByTag("strike",t);n.length;)e.unwrapChildNodes(n[0]);document.execCommand("strikethrough");for(var a,r,o;n.length;){for(o=n[0],r=this._getLastMatchingParent(o,t,i),null!==r&&this._handleParentNodes(o,r,i),a=elByTag(i.toLowerCase(),o);a.length;)e.unwrapChildNodes(a[0]);e.unwrapChildNodes(o)}},_handleParentNodes:function(t,i,n){var a;if(!e.isAtNodeStart(t,i)){a=document.createRange(),a.setStartBefore(i),a.setEndBefore(t);var r=a.extractContents();i.parentNode.insertBefore(r,i)}e.isAtNodeEnd(t,i)||(a=document.createRange(),a.setStartAfter(t),a.setEndAfter(i),r=a.extractContents(),i.parentNode.insertBefore(r,i.nextSibling));for(var o=elByTag(n,i);o.length;)e.unwrapChildNodes(o[0]);e.unwrapChildNodes(i)},_getLastMatchingParent:function(e,t,i){for(var n=e.parentNode,a=null;n!==t;)n.nodeName===i&&(a=n),n=n.parentNode;return a}}}),define("WoltLab/WCF/Ui/Redactor/Link",["Language","Ui/Dialog"],function(e,t){"use strict";var i=!1,n=null;return{showDialog:function(a){t.open(this),t.setTitle(this,e.get("wcf.editor.link."+(a.insert?"add":"edit")));var r=elById("redactor-modal-button-action");r.textContent=e.get("wcf.global.button."+(a.insert?"insert":"save")),n=a.submitCallback,i||(i=!0,r.addEventListener(WCF_CLICK_EVENT,this._submit.bind(this)))},_submit:function(){if(n())t.close(this);else{var i=elById("redactor-link-url"),a=i.nextElementSibling&&"SMALL"===i.nextElementSibling.nodeName?i.nextElementSibling:null;null===a&&(a=elCreate("small"),a.className="innerError",a.textContent=e.get("wcf.global.form.error.empty"),i.parentNode.appendChild(a))}},_dialogSetup:function(){return{id:"redactorDialogLink",options:{onClose:function(){var e=elById("redactor-link-url"),t=e.nextElementSibling&&"SMALL"===e.nextElementSibling.nodeName?e.nextElementSibling:null;null!==t&&elRemove(t)}},source:'<dl><dt><label for="redactor-link-url">'+e.get("wcf.editor.link.url")+'</label></dt><dd><input type="url" id="redactor-link-url" class="long"></dd></dl><dl><dt><label for="redactor-link-url-text">'+e.get("wcf.editor.link.text")+'</label></dt><dd><input type="text" id="redactor-link-url-text" class="long"></dd></dl><div class="formSubmit"><button id="redactor-modal-button-action" class="buttonPrimary"></button></div>'}}}}),define("WoltLab/WCF/Ui/Redactor/Mention",["Ajax","Environment","EventHandler","Ui/Alignment"],function(e,t,i,n){"use strict";function a(e){this.init(e)}return a.prototype={init:function(e){this._active=!1,this._caret=null,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))},_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}t.preventDefault(),e.cancel=!0}},_keyUp:function(t){var i=t.event;if(13===i.which)return void(this._active=!1);var n=this._getTextLineInFrontOfCaret();if(n.length){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()},_setUsername:function(e,t){e&&(e.preventDefault(),t=e.currentTarget);var i=window.getSelection();i.removeAllRanges(),i.addRange(this._caret);var n=i.getRangeAt(0).cloneRange();this._redactor.buffer.set();var a=n.startContainer,r=n.startOffset-(this._mentionStart.length+1);0>r&&(a=a.previousSibling,r=a.length-(this._mentionStart.length+1)-(n.startOffset-1));var o=document.createRange();o.setStart(a,r),o.setEnd(n.startContainer,n.startOffset),i.removeAllRanges(),i.addRange(o);var s=getSelection().getRangeAt(0);s.deleteContents(),s.collapse(!0);var l=elCreate("woltlab-mention");elAttr(l,"contenteditable","false"),elData(l,"user-id",elData(t,"user-id")),elData(l,"username",elData(t,"username")),l.textContent=elData(t,"username");var c=document.createTextNode("‌");s.insertNode(c),s.insertNode(l),o=document.createRange(),o.selectNode(c),o.collapse(!1),i.removeAllRanges(),i.addRange(o),this._redactor.selection.save(),this._hideDropdown()},_getTextLineInFrontOfCaret:function(){var e=window.getSelection().getRangeAt(0);if(!e.collapsed)return"";"firefox"===t.browser()&&e.startContainer.nodeType===Node.TEXT_NODE&&e.startContainer.parentNode.normalize();var i=e.startContainer.textContent.substr(0,e.startOffset),n=i;i="";for(var a=!1,r=0;r<n.length;r++){var o=n.charCodeAt(r).toString(16);"200b"===o||/\s/.test(n[r])&&("a0"!==o&&"20"!==o||a)?(a=!1,i=""):(("a0"===o||"20"===o)&&(a=!0),"@"===n[r]&&r&&/\s/.test(n[r-1])&&(a=!1,i=""),i+=n[r])}return i},_ajaxSetup:function(){return{data:{actionName:"getSearchResultList",className:"wcf\\data\\user\\UserAction",interfaceName:"wcf\\data\\ISearchAction",parameters:{data:{includeUserGroups:!1}}}}},_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",elById("dropdownMenuContainer").appendChild(this._dropdownMenu)),this._dropdownMenu.innerHTML="";for(var t,i,n,a=this._setUsername.bind(this),r=0,o=e.returnValues.length;o>r;r++)n=e.returnValues[r],i=elCreate("li"),t=elCreate("a"),t.addEventListener(WCF_CLICK_EVENT,a),t.className="box16",t.innerHTML="<span>"+n.icon+"</span> <span>"+n.label+"</span>",elData(t,"user-id",n.objectID),elData(t,"username",n.label),i.appendChild(t),this._dropdownMenu.appendChild(i);this._dropdownMenu.classList.add("dropdownOpen"),this._dropdownActive=!0,this._updateDropdownPosition()},_getDropdownMenuPosition:function(){this._redactor.selection.save();var e=window.getSelection(),t=e.getRangeAt(0).cloneRange(),i=document.createRange();i.setStart(t.startContainer,t.startOffset-(this._mentionStart.length+1)),i.setEnd(t.startContainer,t.startOffset),e.removeAllRanges(),e.addRange(i);var n=e.getRangeAt(0).getBoundingClientRect(),a={top:Math.round(n.bottom)+window.scrollY,left:Math.round(n.left)+document.body.scrollLeft};return null===this._lineHeight&&(this._lineHeight=Math.round(n.bottom-n.top-window.scrollY)),this._redactor.selection.restore(),this._caret=t,a},_updateDropdownPosition:function(){try{var e=this._getDropdownMenuPosition();e.top+=7,this._dropdownMenu.style.setProperty("left",e.left+"px",""),this._dropdownMenu.style.setProperty("top",e.top+"px",""),this._selectItem(0),e.top+this._dropdownMenu.offsetHeight+10>window.innerHeight+window.scrollY?(this._dropdownMenu.classList.add("dropdownArrowBottom"),this._dropdownMenu.style.setProperty("top",e.top-this._dropdownMenu.offsetHeight-2*this._lineHeight+7+"px","")):this._dropdownMenu.classList.remove("dropdownArrowBottom")}catch(t){console.debug(t)}},_selectItem:function(e){var t=elBySel(".active",this._dropdownMenu);null!==t&&t.classList.remove("active"),this._itemIndex+=e,-1===this._itemIndex?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}},a}),define("WoltLab/WCF/Ui/Redactor/Metacode",["Dom/Util"],function(e){"use strict";return{convert:function(t){var i=elCreate("div");i.innerHTML=t.textContent;for(var n,a,r,o,s,l=elByTag("woltlab-metacode",i);l.length;)a=l[0],r=elData(a,"name"),n=elData(a,"attributes"),s=this._getOpeningTag(r,n),o=this._getClosingTag(r),a.parentNode===i?(e.prepend(s,this._getFirstParagraph(a)),this._getLastParagraph(a).appendChild(o)):(e.prepend(s,a),a.appendChild(o)),e.unwrapChildNodes(a);t.textContent=i.innerHTML},_getOpeningTag:function(e,t){try{t=JSON.parse(atob(t))}catch(i){}Array.isArray(t)||(t=[]);var n="["+e;if(t.length){for(var a=0,r=t.length;r>a;a++)/^'.*'$/.test(t[a])||(t[a]="'"+t[a]+"'");n+="="+t.join(",")}return document.createTextNode(n+"]")},_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}}}),define("WoltLab/WCF/Ui/Redactor/Page",["WoltLab/WCF/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("WoltLab/WCF/Ui/Redactor/Quote",["Core","EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog"],function(e,t,i,n,a,r,o){"use strict";function s(e,t){this.init(e,t)}var l=0;return s.prototype={init:function(e,i){this._blockquote=null,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._editor.opts.activeButtonsStates.blockquote="woltlabQuote",this._callbackEdit=this._edit.bind(this),this._observeLoad(),t.add("com.woltlab.wcf.redactor2","insertQuote_"+this._elementId,this._insertQuote.bind(this))},_insertQuote:function(t){this._editor.buffer.set();var i=this._editor.selection.block();if(i===!1&&(this._editor.selection.restore(),i=this._editor.selection.block()),"P"!==i.nodeName){for(var n=this._editor.core.editor()[0];i.parentNode!==n;)i=i.parentNode;var a=this._editor.caret.next(i);if(void 0===a||"P"!==a.nodeName){var o=elCreate("p");o.textContent="​",r.insertAfter(o,i)}this._editor.caret.after(i)}var s="";s=t.isText?this._editor.marker.html():t.content;var l=e.getUuid();this._editor.insert.html('<blockquote id="'+l+'">'+s+"</blockquote>");var c=elById(l);elData(c,"author",t.author),elData(c,"link",t.link),t.isText&&this.insert.text(t.content),c.removeAttribute("id"),this._editor.caret.after(c),this._editor.selection.save()},_click:function(){this._editor.button.toggle({},"blockquote","func","block.format");var e=this._editor.selection.block();e&&"BLOCKQUOTE"===e.nodeName&&(this._setTitle(e),e.addEventListener(WCF_CLICK_EVENT,this._callbackEdit))},_observeLoad:function(){elBySelAll("blockquote",this._editor.$editor[0],function(e){e.addEventListener(WCF_CLICK_EVENT,this._callbackEdit),this._setTitle(e)}.bind(this))},_edit:function(e){var t=e.currentTarget;if(0===l){l=~~window.getComputedStyle(t).paddingTop.replace(/px$/,"");var i=window.getComputedStyle(t,"::before");l+=~~i.paddingTop.replace(/px$/,""),l+=~~i.height.replace(/px$/,""),l+=~~i.paddingBottom.replace(/px$/,"")}var n=r.offset(t);e.pageY>n.top&&e.pageY<n.top+l&&(e.preventDefault(),this._blockquote=t,o.open(this))},_save:function(e){e.preventDefault();var t="redactor-quote-"+this._elementId,i=elById(t+"-url"),a=elBySel(".innerError",i.parentNode);null!==a&&elRemove(a);var r=i.value.replace(/\u200B/g,"").trim();return r.length&&!/^https?:\/\/[^\/]+/.test(r)?(a=elCreate("small"),a.className="innerError",a.textContent=n.get("wcf.editor.quote.url.error.invalid"),void i.parentNode.insertBefore(a,i.nextElementSibling)):(elData(this._blockquote,"author",elById(t+"-author").value),elData(this._blockquote,"url",r),this._setTitle(this._blockquote),this._editor.caret.after(this._blockquote),void o.close(this))},_setTitle:function(e){var t=n.get("wcf.editor.quote.title",{author:elData(e,"author"),url:elData(e,"url")});elData(e,"title")!==t&&elData(e,"title",t)},_dialogSetup:function(){var e="redactor-quote-"+this._elementId,t=e+"-author",i=e+"-button-save",a=e+"-url";return{id:e,options:{onSetup:function(){elById(i).addEventListener(WCF_CLICK_EVENT,this._save.bind(this))}.bind(this),onShow:function(){elById(t).value=elData(this._blockquote,"author"),elById(a).value=elData(this._blockquote,"url")}.bind(this),title:n.get("wcf.editor.quote.edit")},source:'<div class="section"><dl><dt><label for="'+t+'">'+n.get("wcf.editor.quote.author")+'</label></dt><dd><input type="text" id="'+t+'" class="long"></dd></dl><dl><dt><label for="'+a+'">'+n.get("wcf.editor.quote.url")+'</label></dt><dd><input type="text" id="'+a+'" class="long"><small>'+n.get("wcf.editor.quote.url.description")+'</small></dd></dl></div><div class="formSubmit"><button id="'+i+'" class="buttonPrimary">'+n.get("wcf.global.button.save")+"</button></div>"}}},s}),define("WoltLab/WCF/Ui/Redactor/Spoiler",["EventHandler","EventKey","Language","StringUtil","Dom/Util","Ui/Dialog"],function(e,t,i,n,a,r){"use strict";function o(e){this.init(e)}var s=0;return o.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._editor.WoltLabBlock.register("woltlab-spoiler",!0),this._editor.opts.activeButtonsStates["woltlab-spoiler"]="woltlabSpoiler",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))},_observeLoad:function(){elBySelAll("woltlab-spoiler",this._editor.$editor[0],function(e){e.addEventListener(WCF_CLICK_EVENT,this._callbackEdit),this._setTitle(e)}.bind(this))},_edit:function(e){var t=e.currentTarget;if(0===s){s=~~window.getComputedStyle(t).paddingTop.replace(/px$/,"");var i=window.getComputedStyle(t,"::before");s+=~~i.paddingTop.replace(/px$/,""),s+=~~i.height.replace(/px$/,""),s+=~~i.paddingBottom.replace(/px$/,"")}var n=a.offset(t);e.pageY>n.top&&e.pageY<n.top+s&&(e.preventDefault(),this._spoiler=t,r.open(this))},_save:function(e){e.preventDefault(),elData(this._spoiler,"label",elById("redactor-spoiler-"+this._elementId+"-label").value),this._setTitle(this._spoiler),this._editor.caret.after(this._spoiler),r.close(this)},_setTitle:function(e){var t=i.get("wcf.editor.spoiler.title",{label:elData(e,"label")});elData(e,"title")!==t&&elData(e,"title",t)},_dialogSetup:function(){var e="redactor-spoiler-"+this._elementId,t=e+"-button-save",n=e+"-label";return{id:e,options:{onSetup:function(){elById(t).addEventListener(WCF_CLICK_EVENT,this._save.bind(this))}.bind(this),onShow:function(){elById(n).value=elData(this._spoiler,"label")}.bind(this),title:i.get("wcf.editor.spoiler.edit")},source:'<div class="section"><dl><dt><label for="'+n+'">'+i.get("wcf.editor.spoiler.label")+'</label></dt><dd><input type="text" id="'+n+'" class="long"><small>'+i.get("wcf.editor.spoiler.label.description")+'</small></dd></dl></div><div class="formSubmit"><button id="'+t+'" class="buttonPrimary">'+i.get("wcf.global.button.save")+"</button></div>"}}},o}),define("WoltLab/WCF/Ui/Search/Page",["Core","Dom/Util","Ui/SimpleDropdown","./Input"],function(e,t,i,n){"use strict";return{init:function(a){var r=elById("pageHeaderSearchInput");new n(r,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},callbackDropdownInit:function(e){e.classList.add("dropdownMenuPageSearch"),elData(e,"dropdown-alignment-horizontal","right");var i=r.clientWidth;e.style.setProperty("min-width",i+"px","");var n=r.parentNode,a=t.offset(n).left+n.clientWidth-(t.offset(r).left+i),o=t.styleAsInt(window.getComputedStyle(n),"padding-bottom");e.style.setProperty("transform","translateX(-"+Math.ceil(a)+"px) translateY(-"+o+"px)","")}});var o=i.getDropdownMenu(t.identify(elBySel(".pageHeaderSearchType"))),s=this._click.bind(this);elBySelAll("a[data-object-type]",o,function(e){e.addEventListener(WCF_CLICK_EVENT,s)});var l=elBySel('a[data-object-type="'+a+'"]',o);e.triggerEvent(l,WCF_CLICK_EVENT)},_click:function(e){e.preventDefault();var t=elData(e.currentTarget,"object-type"),i=elById("pageHeaderSearchParameters");i.innerHTML="";var n=elData(e.currentTarget,"parameters");n=n?JSON.parse(n):{},t&&(n["types[]"]=t);for(var a in n)if(n.hasOwnProperty(a)){var r=elCreate("input");r.type="hidden",r.name=a,r.value=n[a],i.appendChild(r)}var o=elBySel(".pageHeaderSearchType > .button",elById("pageHeaderSearchInputContainer"));o.textContent=e.currentTarget.textContent}}}),define("WoltLab/WCF/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;n>i;i++)if(t=this._options[e][i],"string"!=typeof t&&!(t instanceof Element))throw new TypeError("The array '"+e+"' may only contain string selectors or DOM elements.")}.bind(this)),this._element.addEventListener("change",this._change.bind(this))},_change:function(e){var t=e.currentTarget.checked;this._handleElements(this._options.show,t),this._handleElements(this._options.hide,!t)},_handleElements:function(e,t){for(var i,n,a=0,r=e.length;r>a;a++){if(i=e[a],"string"==typeof i){if(n=elBySel(i),null===n)throw new Error("Unable to find element by selector '"+i+"'.");e[a]=i=n}window[t?"elShow":"elHide"](i)}}},t}),define("WoltLab/WCF/Ui/User/Editor",["Ajax","Language","StringUtil","Dom/Util","Ui/Dialog","Ui/Notification"],function(e,t,i,n,a,r){"use strict";var o="",s=null;return{init:function(){s=elBySel(".userProfileUser"),["ban","disableAvatar","disableSignature","enable"].forEach(function(e){var t=elBySel(".userProfileButtonMenu .jsButtonUser"+i.ucfirst(e));t&&(elData(t,"action",e),t.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)))}.bind(this))},_click:function(t){t.preventDefault();var i=elData(t.currentTarget,"action"),n="";switch(i){case"ban":elDataBool(s,"banned")&&(n="unban");break;case"disableAvatar":elDataBool(s,"disable-avatar")&&(n="enableAvatar");break;case"disableSignature":elDataBool(s,"disable-signature")&&(n="enableSignature");break;case"enable":n=elDataBool(s,"is-disabled")?"enable":"disable"}""===n?(o=i,a.open(this)):e.api(this,{actionName:n})},_submit:function(i){i.preventDefault();var n=elById("wcfUiUserEditorExpiresLabel"),a=n.previousElementSibling;a.classList.contains("innerError")&&elRemove(a);var r="";elById("wcfUiUserEditorNeverExpires").checked||(r=elById("wcfUiUserEditorExpiresDatePicker").value,""===r&&(a=elCreate("small"),a.className="innerError",a.textContent=t.get("wcf.global.form.error.empty"),n.parentNode.insertBefore(a,n)));var s={};s[o+"Expires"]=r,s[o+"Reason"]=elById("wcfUiUserEditorReason").value.trim(),e.api(this,{actionName:o,parameters:s})},_ajaxSuccess:function(e){switch(e.actionName){case"ban":case"unban":elData(s,"banned","ban"===e.actionName),elBySel(".userProfileButtonMenu .jsButtonUserBan").textContent=t.get("wcf.user."+("ban"===e.actionName?"unban":"ban"));var i=elBySel(".contentTitle",s),n=elBySel(".jsUserBanned",i);"ban"===e.actionName?(n=elCreate("span"),n.className="icon icon16 fa-lock jsUserBanned jsTooltip",n.title=t.get("wcf.user.banned"),i.appendChild(n)):n&&elRemove(n);break;case"disableAvatar":case"enableAvatar":elData(s,"disable-avatar","disableAvatar"===e.actionName),elBySel(".userProfileButtonMenu .jsButtonUserDisableAvatar").textContent=t.get("wcf.user."+("disableAvatar"===e.actionName?"enable":"disable")+"Avatar");break;case"disableSignature":case"enableSignature":elData(s,"disable-signature","disableSignature"===e.actionName),elBySel(".userProfileButtonMenu .jsButtonUserDisableSignature").textContent=t.get("wcf.user."+("disableSignature"===e.actionName?"enable":"disable")+"Signature");break;case"enable":case"disable":elData(s,"is-disabled","disable"===e.actionName),elBySel(".userProfileButtonMenu .jsButtonUserEnable").textContent=t.get("wcf.acp.user."+("enable"===e.actionName?"disable":"enable"))}("ban"===e.actionName||"disableAvatar"===e.actionName||"disableSignature"===e.actionName)&&a.close(this),r.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\UserAction",objectIDs:[elData(s,"object-id")]}}},_dialogSetup:function(){return{id:"wcfUiUserEditor",options:{onSetup:function(e){elById("wcfUiUserEditorNeverExpires").addEventListener("change",function(){window[this.checked?"elHide":"elShow"](elById("wcfUiUserEditorExpiresSettings"))}),elBySel("button.buttonPrimary",e).addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))}.bind(this),onShow:function(e){a.setTitle("wcfUiUserEditor",t.get("wcf.user."+o+".confirmMessage"));var i=elById("wcfUiUserEditorReason").nextElementSibling,n="wcf.user."+o+".reason.description";i.textContent=t.get(n),window[i.textContent===n?"elHide":"elShow"](i),i=elById("wcfUiUserEditorNeverExpires").nextElementSibling,i.textContent=t.get("wcf.user."+o+".neverExpires"),i=elBySel('label[for="wcfUiUserEditorExpires"]',e),i.textContent=t.get("wcf.user."+o+".expires"),i=elById("wcfUiUserEditorExpiresLabel"),i.textContent=t.get("wcf.user."+o+".expires.description")}},source:'<div class="section"><dl><dt><label for="wcfUiUserEditorReason">'+t.get("wcf.global.reason")+'</label></dt><dd><textarea id="wcfUiUserEditorReason" cols="40" rows="3"></textarea><small></small></dd></dl><dl><dt></dt><dd><label><input type="checkbox" id="wcfUiUserEditorNeverExpires" checked> <span></span></label></dd></dl><dl id="wcfUiUserEditorExpiresSettings" style="display: none"><dt><label for="wcfUiUserEditorExpires"></label></dt><dd><input type="date" name="wcfUiUserEditorExpires" id="wcfUiUserEditorExpires" class="medium" min="'+new Date(1e3*TIME_NOW).toISOString()+'" data-ignore-timezone="true"><small id="wcfUiUserEditorExpiresLabel"></small></dd></dl></div><div class="formSubmit"><button class="buttonPrimary">'+t.get("wcf.global.button.submit")+"</button></div>"}}}}),define("WoltLab/WCF/Controller/Condition/Page/Dependence",["Dom/Traverse"],function(e){"use strict";function t(t,n){this._dependentElement=t,this._pageIds=n;for(var a=0,r=i.length;r>a;a++)i[a].addEventListener("change",this._checkVisibility.bind(this));e.parentByTag(this._dependentElement,"FORM").addEventListener("submit",function(){"none"===this._dependentElement.style.getPropertyValue("display")&&this._dependentElement.remove()}.bind(this)),this._checkVisibility()}var i=elBySelAll('input[name="pageIDs[]"]');return t.prototype={_checkVisibility:function(){for(var e,t=0,n=i.length;n>t;t++)if(e=i[t],e.checked&&-1!==this._pageIds.indexOf(~~e.value))return void elShow(this._dependentElement);elHide(this._dependentElement)}},t}),define("WoltLab/WCF/Controller/User/Notification/Settings",["Dictionary","Language","Dom/Traverse","Ui/SimpleDropdown"],function(e,t,i,n){"use strict";var a=new e,r=null,o=null,s={setup:function(){r=this._click.bind(this),o=this._selectType.bind(this);for(var e,t,i=elBySelAll("#notificationSettings .flexibleButtonGroup"),n=0,a=i.length;a>n;n++)e=i[n],t=elBySel(".notificationSettingsEmail",e),null!==t&&this._initGroup(e,t)},_initGroup:function(e,t){var n=~~elData(e,"object-id"),o=elById("settings_"+n+"_disabled");o.addEventListener(WCF_CLICK_EVENT,function(){t.classList.remove("active")});var s=elById("settings_"+n+"_enabled");s.addEventListener(WCF_CLICK_EVENT,function(){t.classList.add("active")});var l=i.childByTag(t,"INPUT"),c=i.childByTag(t,"A");elData(c,"object-id",n),c.addEventListener(WCF_CLICK_EVENT,r),a.set(n,{button:c,dropdownMenu:null,mailSetting:t,mailValue:l})},_click:function(e){e.preventDefault();var t=e.currentTarget,r=~~elData(t,"object-id"),o=a.get(r);if(null===o.dropdownMenu)o.dropdownMenu=this._createDropdown(r,o.mailValue.value),t.parentNode.classList.add("dropdown"),t.parentNode.appendChild(o.dropdownMenu),n.init(t,!0);else for(var s=i.childrenByTag(o.dropdownMenu,"LI"),l=o.mailValue.value,c=0;4>c;c++)s[c].classList[elData(s[c],"value")===l?"add":"remove"]("active")},_createDropdown:function(e,i){var n=elCreate("ul");n.className="dropdownMenu",elData(n,"object-id",e);for(var a,r,s,l=["instant","daily","divider","none"],c=0;4>c;c++)s=l[c],r=elCreate("li"),"divider"===s?r.className="dropdownDivider":(a=elCreate("a"),a.textContent=t.get("wcf.user.notification.mailNotificationType."+s),r.appendChild(a),elData(r,"value",s),r.addEventListener(WCF_CLICK_EVENT,o),i===s&&(r.className="active")),n.appendChild(r);return n},_selectType:function(e){var i=elData(e.currentTarget,"value"),n=~~elData(e.currentTarget.parentNode,"object-id"),r=a.get(n);r.mailValue.value=i,elBySel("span.title",r.mailSetting).textContent=t.get("wcf.user.notification.mailNotificationType."+i),r.button.classList["none"===i?"remove":"add"]("yellow"),r.button.classList["none"===i?"remove":"add"]("active")}};return s}),define("WoltLab/WCF/Ui/Page/Header/Fixed",["Core","EventHandler","Ui/Alignment","Ui/CloseOverlay","Ui/Screen","Ui/SimpleDropdown"],function(e,t,i,n,a,r){"use strict";var o,s,l,c,d=!1,u=!1;return{init:function(){o=elById("pageHeader"),s=elById("pageHeaderContainer"),this._initStickyPageHeader(),this._initSearchBar(),a.on("screen-md-down",{match:function(){u=!0},unmatch:function(){u=!1},setup:function(){u=!0}})},_initStickyPageHeader:function(){o.clientHeight&&o.style.setProperty("min-height",o.clientHeight+"px"),c=o.clientHeight-elBySel(".mainMenu",o).clientHeight,this._scroll(),window.addEventListener("scroll",this._scroll.bind(this))},_initSearchBar:function(){var a=elById("pageHeaderSearch");a.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()});var r=elById("pageHeaderSearchInput"),s=elBySel(".pageHeaderSearchLabel");l=elById("pageHeaderSearchInputContainer");var c=elById("topMenu");s.addEventListener(WCF_CLICK_EVENT,function(){!d&&!u||o.classList.contains("searchBarOpen")||(i.set(l,c,{horizontal:"right"}),o.classList.add("searchBarOpen"),WCF.Dropdown.Interactive.Handler.closeAll(),r.focus())}),n.add("WoltLab/WCF/Ui/Page/Header/Fixed",function(){o.classList.remove("searchBarOpen")}),t.add("com.woltlab.wcf.MainMenuMobile","more",function(t){"com.woltlab.wcf.search"===t.identifier&&(t.handler.close(!0),e.triggerEvent(elById("pageHeaderSearchInput"),WCF_CLICK_EVENT))}.bind(this))},_scroll:function(){var e=d;d=window.scrollY>c,o.classList[d?"add":"remove"]("sticky"),s.classList[d?"add":"remove"]("stickyPageHeader"),!d&&e&&(o.classList.remove("searchBarOpen"),["bottom","left","right","top"].forEach(function(e){l.style.removeProperty(e)}))}}}),define("WoltLab/WCF/Ui/Page/Search/Input",["Core","WoltLab/WCF/Ui/Search/Input"],function(e,t){"use strict";function i(e,t){this.init(e,t)}return e.inherit(i,t,{init:function(t,n){if(n=e.extend({ajax:{className:"wcf\\data\\page\\PageAction"},callbackSuccess:null},n),"function"!=typeof n.callbackSuccess)throw new Error("Expected a valid callback function for 'callbackSuccess'.");i._super.prototype.init.call(this,t,n),this._pageId=0},setPageId:function(e){this._pageId=e},_getParameters:function(e){var t=i._super.prototype._getParameters.call(this,e);return t.objectIDs=[this._pageId],t},_ajaxSuccess:function(e){this._options.callbackSuccess(e)}}),i}),define("WoltLab/WCF/Ui/Page/Search/Handler",["Language","StringUtil","Dom/Util","Ui/Dialog","./Input"],function(e,t,i,n,a){"use strict";var r=null,o=null,s=null,l=null,c=null;return{open:function(e,t,i){r=i,n.open(this),n.setTitle(this,t),this._getSearchInputHandler().setPageId(e)},_buildList:function(n){if(this._resetList(),!Array.isArray(n.returnValues)||0===n.returnValues.length){var a=elCreate("small");return a.className="innerError",a.textContent=e.get("wcf.page.pageObjectID.search.noResults"),void i.insertAfter(a,o)}for(var r,s,d,u=0,h=n.returnValues.length;h>u;u++)s=n.returnValues[u],r=s.image,/^fa-/.test(r)&&(r='<span class="icon icon48 '+r+'"></span>'),d=elCreate("li"),elData(d,"object-id",s.objectID),d.innerHTML='<div class="box48">'+r+'<div><div class="containerHeadline"><h3><a href="'+t.escapeHTML(s.link)+'">'+t.escapeHTML(s.title)+"</a></h3>"+(s.description?"<p>"+s.description+"</p>":"")+"</div></div></div>",d.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),l.appendChild(d);elShow(c)},_resetList:function(){var e=o.nextElementSibling;e&&e.classList.contains("innerError")&&elRemove(e),l.innerHTML="",elHide(c)},_getSearchInputHandler:function(){if(null===s){var e=this._buildList.bind(this);s=new a(elById("wcfUiPageSearchInput"),{callbackSuccess:e})}return s},_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"),l=elById("wcfUiPageSearchResultList"),c=elById("wcfUiPageSearchResultListContainer")),o.value="",elHide(c),l.innerHTML="",o.focus()},title:""},source:'<div class="section"><dl><dt><label for="wcfUiPageSearchInput">'+e.get("wcf.page.pageObjectID.search.terms")+'</label></dt><dd><input type="text" id="wcfUiPageSearchInput" class="long"><small>'+e.get("wcf.page.pageObjectID.search.terms.description")+'</small></dd></dl></div><section id="wcfUiPageSearchResultListContainer" class="section sectionContainerList"><header class="sectionHeader"><h2 class="sectionTitle">'+e.get("wcf.page.pageObjectID.search.results")+'</h2><p class="sectionDescription">'+e.get("wcf.page.pageObjectID.search.results.description")+'</p></header><ul id="wcfUiPageSearchResultList" class="containerList wcfUiPageSearchResultList"></ul></section>'}}}}),define("WoltLab/WCF/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("WoltLab/WCF/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?!0:!1,this._updateButton(),i.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\follow\\UserFollowAction"}}}}),a}),define("WoltLab/WCF/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?!0:!1,this._updateButton(),i.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\ignore\\UserIgnoreAction"}}}}),a}),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){if(!Array.isArray(r))return i.apply(e,arguments);var s=a++;n.push(s),i(r,function(){var i=arguments;n[n.indexOf(s)]=function(){o.apply(e,i)},t()})},e.require.config=i.config}(window),define("require.linearExecution",function(){});
\ No newline at end of file
+e.add("com.woltlab.wcf.redactor2","observe_load_"+this._elementId,this._observeLoad.bind(this)),this._editor.WoltLabBlock.register("woltlab-spoiler",!0),this._editor.opts.activeButtonsStates["woltlab-spoiler"]="woltlabSpoiler",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))},_observeLoad:function(){elBySelAll("woltlab-spoiler",this._editor.$editor[0],function(e){e.addEventListener(WCF_CLICK_EVENT,this._callbackEdit),this._setTitle(e)}.bind(this))},_edit:function(e){var t=e.currentTarget;if(0===s){s=~~window.getComputedStyle(t).paddingTop.replace(/px$/,"");var i=window.getComputedStyle(t,"::before");s+=~~i.paddingTop.replace(/px$/,""),s+=~~i.height.replace(/px$/,""),s+=~~i.paddingBottom.replace(/px$/,"")}var n=a.offset(t);e.pageY>n.top&&e.pageY<n.top+s&&(e.preventDefault(),this._spoiler=t,r.open(this))},_save:function(e){e.preventDefault(),elData(this._spoiler,"label",elById("redactor-spoiler-"+this._elementId+"-label").value),this._setTitle(this._spoiler),this._editor.caret.after(this._spoiler),r.close(this)},_setTitle:function(e){var t=i.get("wcf.editor.spoiler.title",{label:elData(e,"label")});elData(e,"title")!==t&&elData(e,"title",t)},_dialogSetup:function(){var e="redactor-spoiler-"+this._elementId,t=e+"-button-save",n=e+"-label";return{id:e,options:{onSetup:function(){elById(t).addEventListener(WCF_CLICK_EVENT,this._save.bind(this))}.bind(this),onShow:function(){elById(n).value=elData(this._spoiler,"label")}.bind(this),title:i.get("wcf.editor.spoiler.edit")},source:'<div class="section"><dl><dt><label for="'+n+'">'+i.get("wcf.editor.spoiler.label")+'</label></dt><dd><input type="text" id="'+n+'" class="long"><small>'+i.get("wcf.editor.spoiler.label.description")+'</small></dd></dl></div><div class="formSubmit"><button id="'+t+'" class="buttonPrimary">'+i.get("wcf.global.button.save")+"</button></div>"}}},o}),define("WoltLab/WCF/Ui/Search/Page",["Core","Dom/Util","Ui/SimpleDropdown","./Input"],function(e,t,i,n){"use strict";return{init:function(a){var r=elById("pageHeaderSearchInput");new n(r,{ajax:{className:"wcf\\data\\search\\keyword\\SearchKeywordAction"},callbackDropdownInit:function(e){e.classList.add("dropdownMenuPageSearch"),elData(e,"dropdown-alignment-horizontal","right");var i=r.clientWidth;e.style.setProperty("min-width",i+"px","");var n=r.parentNode,a=t.offset(n).left+n.clientWidth-(t.offset(r).left+i),o=t.styleAsInt(window.getComputedStyle(n),"padding-bottom");e.style.setProperty("transform","translateX(-"+Math.ceil(a)+"px) translateY(-"+o+"px)","")}});var o=i.getDropdownMenu(t.identify(elBySel(".pageHeaderSearchType"))),s=this._click.bind(this);elBySelAll("a[data-object-type]",o,function(e){e.addEventListener(WCF_CLICK_EVENT,s)});var l=elBySel('a[data-object-type="'+a+'"]',o);e.triggerEvent(l,WCF_CLICK_EVENT)},_click:function(e){e.preventDefault();var t=elData(e.currentTarget,"object-type"),i=elById("pageHeaderSearchParameters");i.innerHTML="";var n=elData(e.currentTarget,"parameters");n=n?JSON.parse(n):{},t&&(n["types[]"]=t);for(var a in n)if(n.hasOwnProperty(a)){var r=elCreate("input");r.type="hidden",r.name=a,r.value=n[a],i.appendChild(r)}var o=elBySel(".pageHeaderSearchType > .button",elById("pageHeaderSearchInputContainer"));o.textContent=e.currentTarget.textContent}}}),define("WoltLab/WCF/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;n>i;i++)if(t=this._options[e][i],"string"!=typeof t&&!(t instanceof Element))throw new TypeError("The array '"+e+"' may only contain string selectors or DOM elements.")}.bind(this)),this._element.addEventListener("change",this._change.bind(this))},_change:function(e){var t=e.currentTarget.checked;this._handleElements(this._options.show,t),this._handleElements(this._options.hide,!t)},_handleElements:function(e,t){for(var i,n,a=0,r=e.length;r>a;a++){if(i=e[a],"string"==typeof i){if(n=elBySel(i),null===n)throw new Error("Unable to find element by selector '"+i+"'.");e[a]=i=n}window[t?"elShow":"elHide"](i)}}},t}),define("WoltLab/WCF/Ui/User/Editor",["Ajax","Language","StringUtil","Dom/Util","Ui/Dialog","Ui/Notification"],function(e,t,i,n,a,r){"use strict";var o="",s=null;return{init:function(){s=elBySel(".userProfileUser"),["ban","disableAvatar","disableSignature","enable"].forEach(function(e){var t=elBySel(".userProfileButtonMenu .jsButtonUser"+i.ucfirst(e));t&&(elData(t,"action",e),t.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)))}.bind(this))},_click:function(t){t.preventDefault();var i=elData(t.currentTarget,"action"),n="";switch(i){case"ban":elDataBool(s,"banned")&&(n="unban");break;case"disableAvatar":elDataBool(s,"disable-avatar")&&(n="enableAvatar");break;case"disableSignature":elDataBool(s,"disable-signature")&&(n="enableSignature");break;case"enable":n=elDataBool(s,"is-disabled")?"enable":"disable"}""===n?(o=i,a.open(this)):e.api(this,{actionName:n})},_submit:function(i){i.preventDefault();var n=elById("wcfUiUserEditorExpiresLabel"),a=n.previousElementSibling;a.classList.contains("innerError")&&elRemove(a);var r="";elById("wcfUiUserEditorNeverExpires").checked||(r=elById("wcfUiUserEditorExpiresDatePicker").value,""===r&&(a=elCreate("small"),a.className="innerError",a.textContent=t.get("wcf.global.form.error.empty"),n.parentNode.insertBefore(a,n)));var s={};s[o+"Expires"]=r,s[o+"Reason"]=elById("wcfUiUserEditorReason").value.trim(),e.api(this,{actionName:o,parameters:s})},_ajaxSuccess:function(e){switch(e.actionName){case"ban":case"unban":elData(s,"banned","ban"===e.actionName),elBySel(".userProfileButtonMenu .jsButtonUserBan").textContent=t.get("wcf.user."+("ban"===e.actionName?"unban":"ban"));var i=elBySel(".contentTitle",s),n=elBySel(".jsUserBanned",i);"ban"===e.actionName?(n=elCreate("span"),n.className="icon icon16 fa-lock jsUserBanned jsTooltip",n.title=t.get("wcf.user.banned"),i.appendChild(n)):n&&elRemove(n);break;case"disableAvatar":case"enableAvatar":elData(s,"disable-avatar","disableAvatar"===e.actionName),elBySel(".userProfileButtonMenu .jsButtonUserDisableAvatar").textContent=t.get("wcf.user."+("disableAvatar"===e.actionName?"enable":"disable")+"Avatar");break;case"disableSignature":case"enableSignature":elData(s,"disable-signature","disableSignature"===e.actionName),elBySel(".userProfileButtonMenu .jsButtonUserDisableSignature").textContent=t.get("wcf.user."+("disableSignature"===e.actionName?"enable":"disable")+"Signature");break;case"enable":case"disable":elData(s,"is-disabled","disable"===e.actionName),elBySel(".userProfileButtonMenu .jsButtonUserEnable").textContent=t.get("wcf.acp.user."+("enable"===e.actionName?"disable":"enable"))}("ban"===e.actionName||"disableAvatar"===e.actionName||"disableSignature"===e.actionName)&&a.close(this),r.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\UserAction",objectIDs:[elData(s,"object-id")]}}},_dialogSetup:function(){return{id:"wcfUiUserEditor",options:{onSetup:function(e){elById("wcfUiUserEditorNeverExpires").addEventListener("change",function(){window[this.checked?"elHide":"elShow"](elById("wcfUiUserEditorExpiresSettings"))}),elBySel("button.buttonPrimary",e).addEventListener(WCF_CLICK_EVENT,this._submit.bind(this))}.bind(this),onShow:function(e){a.setTitle("wcfUiUserEditor",t.get("wcf.user."+o+".confirmMessage"));var i=elById("wcfUiUserEditorReason").nextElementSibling,n="wcf.user."+o+".reason.description";i.textContent=t.get(n),window[i.textContent===n?"elHide":"elShow"](i),i=elById("wcfUiUserEditorNeverExpires").nextElementSibling,i.textContent=t.get("wcf.user."+o+".neverExpires"),i=elBySel('label[for="wcfUiUserEditorExpires"]',e),i.textContent=t.get("wcf.user."+o+".expires"),i=elById("wcfUiUserEditorExpiresLabel"),i.textContent=t.get("wcf.user."+o+".expires.description")}},source:'<div class="section"><dl><dt><label for="wcfUiUserEditorReason">'+t.get("wcf.global.reason")+'</label></dt><dd><textarea id="wcfUiUserEditorReason" cols="40" rows="3"></textarea><small></small></dd></dl><dl><dt></dt><dd><label><input type="checkbox" id="wcfUiUserEditorNeverExpires" checked> <span></span></label></dd></dl><dl id="wcfUiUserEditorExpiresSettings" style="display: none"><dt><label for="wcfUiUserEditorExpires"></label></dt><dd><input type="date" name="wcfUiUserEditorExpires" id="wcfUiUserEditorExpires" class="medium" min="'+new Date(1e3*TIME_NOW).toISOString()+'" data-ignore-timezone="true"><small id="wcfUiUserEditorExpiresLabel"></small></dd></dl></div><div class="formSubmit"><button class="buttonPrimary">'+t.get("wcf.global.button.submit")+"</button></div>"}}}}),define("WoltLab/WCF/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;c>n;n++)a[n].addEventListener("change",this._checkVisibility.bind(this));l=!0}t.parentByTag(e,"FORM").addEventListener("submit",function(){"none"===e.style.getPropertyValue("display")&&e.remove()}),this._checkVisibility()},_checkVisibility:function(){var e,t,n;e:for(var s=0,l=r.length;l>s;s++){e=r[s],n=o.get(e);for(var c=0,d=a.length;d>c;c++)if(t=a[c],t.checked&&-1!==n.indexOf(~~t.value)){this._showDependentElement(e);continue e}this._hideDependentElement(e)}i.fire("com.woltlab.wcf.pageConditionDependence","checkVisivility")},_hideDependentElement:function(e){elHide(e);for(var t=s.get(e),i=0,n=t.length;n>i;i++)elHide(t[i]);s.set(e,[])},_showDependentElement:function(e){elShow(e);for(var t=e;(t=t.parentNode)&&t instanceof Element;)"none"===t.style.getPropertyValue("display")&&s.get(e).push(t),elShow(t)}}}),define("WoltLab/WCF/Controller/User/Notification/Settings",["Dictionary","Language","Dom/Traverse","Ui/SimpleDropdown"],function(e,t,i,n){"use strict";var a=new e,r=null,o=null,s={setup:function(){r=this._click.bind(this),o=this._selectType.bind(this);for(var e,t,i=elBySelAll("#notificationSettings .flexibleButtonGroup"),n=0,a=i.length;a>n;n++)e=i[n],t=elBySel(".notificationSettingsEmail",e),null!==t&&this._initGroup(e,t)},_initGroup:function(e,t){var n=~~elData(e,"object-id"),o=elById("settings_"+n+"_disabled");o.addEventListener(WCF_CLICK_EVENT,function(){t.classList.remove("active")});var s=elById("settings_"+n+"_enabled");s.addEventListener(WCF_CLICK_EVENT,function(){t.classList.add("active")});var l=i.childByTag(t,"INPUT"),c=i.childByTag(t,"A");elData(c,"object-id",n),c.addEventListener(WCF_CLICK_EVENT,r),a.set(n,{button:c,dropdownMenu:null,mailSetting:t,mailValue:l})},_click:function(e){e.preventDefault();var t=e.currentTarget,r=~~elData(t,"object-id"),o=a.get(r);if(null===o.dropdownMenu)o.dropdownMenu=this._createDropdown(r,o.mailValue.value),t.parentNode.classList.add("dropdown"),t.parentNode.appendChild(o.dropdownMenu),n.init(t,!0);else for(var s=i.childrenByTag(o.dropdownMenu,"LI"),l=o.mailValue.value,c=0;4>c;c++)s[c].classList[elData(s[c],"value")===l?"add":"remove"]("active")},_createDropdown:function(e,i){var n=elCreate("ul");n.className="dropdownMenu",elData(n,"object-id",e);for(var a,r,s,l=["instant","daily","divider","none"],c=0;4>c;c++)s=l[c],r=elCreate("li"),"divider"===s?r.className="dropdownDivider":(a=elCreate("a"),a.textContent=t.get("wcf.user.notification.mailNotificationType."+s),r.appendChild(a),elData(r,"value",s),r.addEventListener(WCF_CLICK_EVENT,o),i===s&&(r.className="active")),n.appendChild(r);return n},_selectType:function(e){var i=elData(e.currentTarget,"value"),n=~~elData(e.currentTarget.parentNode,"object-id"),r=a.get(n);r.mailValue.value=i,elBySel("span.title",r.mailSetting).textContent=t.get("wcf.user.notification.mailNotificationType."+i),r.button.classList["none"===i?"remove":"add"]("yellow"),r.button.classList["none"===i?"remove":"add"]("active")}};return s}),define("WoltLab/WCF/Ui/Page/Header/Fixed",["Core","EventHandler","Ui/Alignment","Ui/CloseOverlay","Ui/Screen","Ui/SimpleDropdown"],function(e,t,i,n,a,r){"use strict";var o,s,l,c,d=!1,u=!1;return{init:function(){o=elById("pageHeader"),s=elById("pageHeaderContainer"),this._initStickyPageHeader(),this._initSearchBar(),a.on("screen-md-down",{match:function(){u=!0},unmatch:function(){u=!1},setup:function(){u=!0}})},_initStickyPageHeader:function(){o.clientHeight&&o.style.setProperty("min-height",o.clientHeight+"px"),c=o.clientHeight-elBySel(".mainMenu",o).clientHeight,this._scroll(),window.addEventListener("scroll",this._scroll.bind(this))},_initSearchBar:function(){var a=elById("pageHeaderSearch");a.addEventListener(WCF_CLICK_EVENT,function(e){e.stopPropagation()});var r=elById("pageHeaderSearchInput"),s=elBySel(".pageHeaderSearchLabel");l=elById("pageHeaderSearchInputContainer");var c=elById("topMenu");s.addEventListener(WCF_CLICK_EVENT,function(){!d&&!u||o.classList.contains("searchBarOpen")||(i.set(l,c,{horizontal:"right"}),o.classList.add("searchBarOpen"),WCF.Dropdown.Interactive.Handler.closeAll(),r.focus())}),n.add("WoltLab/WCF/Ui/Page/Header/Fixed",function(){o.classList.remove("searchBarOpen")}),t.add("com.woltlab.wcf.MainMenuMobile","more",function(t){"com.woltlab.wcf.search"===t.identifier&&(t.handler.close(!0),e.triggerEvent(elById("pageHeaderSearchInput"),WCF_CLICK_EVENT))}.bind(this))},_scroll:function(){var e=d;d=window.scrollY>c,o.classList[d?"add":"remove"]("sticky"),s.classList[d?"add":"remove"]("stickyPageHeader"),!d&&e&&(o.classList.remove("searchBarOpen"),["bottom","left","right","top"].forEach(function(e){l.style.removeProperty(e)}))}}}),define("WoltLab/WCF/Ui/Page/Search/Input",["Core","WoltLab/WCF/Ui/Search/Input"],function(e,t){"use strict";function i(e,t){this.init(e,t)}return e.inherit(i,t,{init:function(t,n){if(n=e.extend({ajax:{className:"wcf\\data\\page\\PageAction"},callbackSuccess:null},n),"function"!=typeof n.callbackSuccess)throw new Error("Expected a valid callback function for 'callbackSuccess'.");i._super.prototype.init.call(this,t,n),this._pageId=0},setPageId:function(e){this._pageId=e},_getParameters:function(e){var t=i._super.prototype._getParameters.call(this,e);return t.objectIDs=[this._pageId],t},_ajaxSuccess:function(e){this._options.callbackSuccess(e)}}),i}),define("WoltLab/WCF/Ui/Page/Search/Handler",["Language","StringUtil","Dom/Util","Ui/Dialog","./Input"],function(e,t,i,n,a){"use strict";var r=null,o=null,s=null,l=null,c=null;return{open:function(e,t,i){r=i,n.open(this),n.setTitle(this,t),this._getSearchInputHandler().setPageId(e)},_buildList:function(n){if(this._resetList(),!Array.isArray(n.returnValues)||0===n.returnValues.length){var a=elCreate("small");return a.className="innerError",a.textContent=e.get("wcf.page.pageObjectID.search.noResults"),void i.insertAfter(a,o)}for(var r,s,d,u=0,h=n.returnValues.length;h>u;u++)s=n.returnValues[u],r=s.image,/^fa-/.test(r)&&(r='<span class="icon icon48 '+r+'"></span>'),d=elCreate("li"),elData(d,"object-id",s.objectID),d.innerHTML='<div class="box48">'+r+'<div><div class="containerHeadline"><h3><a href="'+t.escapeHTML(s.link)+'">'+t.escapeHTML(s.title)+"</a></h3>"+(s.description?"<p>"+s.description+"</p>":"")+"</div></div></div>",d.addEventListener(WCF_CLICK_EVENT,this._click.bind(this)),l.appendChild(d);elShow(c)},_resetList:function(){var e=o.nextElementSibling;e&&e.classList.contains("innerError")&&elRemove(e),l.innerHTML="",elHide(c)},_getSearchInputHandler:function(){if(null===s){var e=this._buildList.bind(this);s=new a(elById("wcfUiPageSearchInput"),{callbackSuccess:e})}return s},_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"),l=elById("wcfUiPageSearchResultList"),c=elById("wcfUiPageSearchResultListContainer")),o.value="",elHide(c),l.innerHTML="",o.focus()},title:""},source:'<div class="section"><dl><dt><label for="wcfUiPageSearchInput">'+e.get("wcf.page.pageObjectID.search.terms")+'</label></dt><dd><input type="text" id="wcfUiPageSearchInput" class="long"><small>'+e.get("wcf.page.pageObjectID.search.terms.description")+'</small></dd></dl></div><section id="wcfUiPageSearchResultListContainer" class="section sectionContainerList"><header class="sectionHeader"><h2 class="sectionTitle">'+e.get("wcf.page.pageObjectID.search.results")+'</h2><p class="sectionDescription">'+e.get("wcf.page.pageObjectID.search.results.description")+'</p></header><ul id="wcfUiPageSearchResultList" class="containerList wcfUiPageSearchResultList"></ul></section>'}}}}),define("WoltLab/WCF/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("WoltLab/WCF/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?!0:!1,this._updateButton(),i.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\follow\\UserFollowAction"}}}}),a}),define("WoltLab/WCF/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?!0:!1,this._updateButton(),i.show()},_ajaxSetup:function(){return{data:{className:"wcf\\data\\user\\ignore\\UserIgnoreAction"}}}}),a}),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){if(!Array.isArray(r))return i.apply(e,arguments);var s=a++;n.push(s),i(r,function(){var i=arguments;n[n.indexOf(s)]=function(){o.apply(e,i)},t()})},e.require.config=i.config}(window),define("require.linearExecution",function(){});
\ No newline at end of file