From 2e288ad49b9cd1fca26c73c3c011304042f1bfb4 Mon Sep 17 00:00:00 2001 From: WoltLab Date: Thu, 22 Feb 2024 15:28:33 +0000 Subject: [PATCH] Updating minified JavaScript files --- wcfsetup/install/files/js/WCF.Combined.min.js | 2 +- wcfsetup/install/files/js/WCF.Combined.tiny.min.js | 2 +- wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/js/WCF.Combined.min.js b/wcfsetup/install/files/js/WCF.Combined.min.js index 81371d2c25..a41118c3fd 100755 --- a/wcfsetup/install/files/js/WCF.Combined.min.js +++ b/wcfsetup/install/files/js/WCF.Combined.min.js @@ -37,7 +37,7 @@ (function (window, undefined) { "use strict";function gm_authFailure(){WCF.System.Event.fireEvent("com.woltlab.wcf.googleMaps","authenticationFailure")}WCF.Location={},WCF.Location.Util={getLocation:function(t,e){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition((function(e){t(e.coords.latitude,e.coords.longitude)}),(function(){t(void 0,void 0)}),{timeout:e||5e3}):t(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&require(["Ui/Screen"],function(t){t.on("screen-sm-down",{setup:$.proxy(this._addSidebarMapListener,this)})}.bind(this)),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy((function(){e.open(this._map,t)}),this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a,n=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});return s&&n.setIcon(s),i&&(a=new google.maps.InfoWindow({content:i}),this._addInfoWindowEventListener(n,a),n.infoWindow=a),this._markers.push(n),n},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t,e,o,s,i=null,a=null,n=null,r=null;for(t in this._markers)o=(e=this._markers[t]).getPosition().lat(),s=e.getPosition().lng(),null===i?(i=a=o,n=r=s):(i>o?i=o:ao?n=o:r=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng()||(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._stringifyExcludedObjectIds?JSON.stringify(this._objectIDs):this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),0))},_success:function(t,e,o){var s,i;if(t.returnValues&&t.returnValues.markers)for(s in t.returnValues.markers)i=t.returnValues.markers[s],this.addMarker(i.latitude,i.longitude,i.title,null,i.infoWindow),i.objectID?this._objectIDs.push(i.objectID):i.objectIDs&&(this._objectIDs=this._objectIDs.concat(i.objectIDs))},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('
'+WCF.Language.get("wcf.map.showLocationSuggestions")+"
");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a,n=$(i),r=$('').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);return n.append($("

").append(r)),a=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",n.get(0)),r.data("marker",a),a},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){var e,o,s,i;for(void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t),e=[],o=0,s=this._markers.length;o"+WCF.String.escapeHTML(t.formatted_address)+"").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy((function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null}),this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){var o,s,i;if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){for(s in o=0,t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy((function(){this._clearList()}),this)),i=this._searchInput.parents(".dropdown").wcfIdentify(),WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i,!0),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy((function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))}),this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy((function(t){null!==t&&$(this._searchInput).val(t)}),this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(t,e,o,s,i){e&&(o=e.getPosition().lat(),s=e.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(o,s);this._geocoder.geocode({latLng:a},(function(e,o){o==google.maps.GeocoderStatus.OK?t(i?e:e[0].formatted_address):t(null)}))}}; })(this); // WCF.Message.js -(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({init:function(){}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,i,s,n){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=i,this._buttonSelector=s||".jsRevertButton",this._options=$.extend({isVersionTracker:!1,versionTrackerObjectType:"",versionTrackerObjectId:0,redirectUrl:""},n),this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var e=this;this._newIDInputs.change((function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._oldIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t>=i?$(this).disable():$(this).enable()}))})),this._oldIDInputs.change((function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._newIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t<=i?$(this).disable():$(this).enable()}))})),this._oldIDInputs.filter(":checked").change(),this._newIDInputs.filter(":checked").change()},_initElements:function(){var e=this;$(this._containerSelector).each((function(t,i){$(i).find(e._buttonSelector).click($.proxy(e._click,e))}))},_click:function(e){var t,i=$(e.currentTarget);e.preventDefault(),i.data("confirmMessage")?(t=this,WCF.System.Confirmation.show(i.data("confirmMessage"),(function(e){"cancel"!==e&&t._sendRequest(i)}),void 0,void 0,!0)):this._sendRequest(i)},_sendRequest:function(e){this._options.isVersionTracker?(this.proxy.setOption("url",window.WSC_API_URL+"index.php?ajax-invoke/&t="+window.SECURITY_TOKEN),this.proxy.setOption("data",{actionName:"revert",className:"wcf\\system\\version\\VersionTracker",parameters:{objectType:this._options.versionTrackerObjectType,objectID:this._options.versionTrackerObjectId,versionID:$(e).data("objectID")}})):this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._options.redirectUrl?(new WCF.System.Notification).show(function(){window.location=this._options.redirectUrl}.bind(this)):window.location.reload(!0)}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit((function(){$(this).find(".formSubmit input[type=submit]").disable()}));$(window).on("unload",(function(){e.find(".formSubmit input[type=submit]").enable()}))}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:null,_proxy:null,_previewButton:null,_previewButtonLabel:"",init:function(e,t,i){this._className=e,this._messageFieldID=$.wcfEscapeID(t),this._textarea=$("#"+this._messageFieldID),this._textarea.length?(i=$.wcfEscapeID(i),this._previewButton=$("#"+i),this._previewButton.length?(this._previewButton.click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),this._ckeditorApi=void 0,require(["WoltLabSuite/Core/Component/Ckeditor"],(e=>{this._ckeditorApi=e}))):console.debug("[WCF.Message.Preview] Unable to find preview button identified by '"+i+"'")):console.debug("[WCF.Message.Preview] Unable to find message field identified by '"+this._messageFieldID+"'")},_click:function(e){e.preventDefault();var t=this._getMessage();if(null!==t){if(0===t.trim().length){const e=this._textarea[0].parentElement.querySelector(".innerError");return e&&e.remove(),void elInnerError(this._getCkeditor().element,WCF.Language.get("wcf.global.form.error.empty"))}return this._proxy.setOption("data",{actionName:"getMessagePreview",className:this._className,parameters:this._getParameters(t)}),this._proxy.sendRequest(),this._previewButtonLabel=this._previewButton.html(),this._previewButton.html(WCF.Language.get("wcf.global.loading")).disable(),e.stopPropagation(),!1}console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '"+this._messageFieldID+"'")},_getParameters:function(e){var t={};return $("#settings_"+this._messageFieldID).find("input[type=checkbox]").each((function(e,i){var s=$(i);s.is(":checked")&&(t[s.prop("name")]=s.prop("value"))})),{data:{message:e},options:t}},_getMessage:function(){const e=this._getCkeditor();return void 0===e?null:e.getHtml()},_getCkeditor(e){return this._ckeditorApi.getCkeditorById(e||this._messageFieldID)},_success:function(e,t,i){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(e){},_failure:function(e){var t,i;return null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._previewButton.html(this._previewButtonLabel).enable(),(t=this._textarea.parent().children("small.innerError").empty()).length||(t=$('').appendTo(this._textarea.parent())),i="empty"===e.returnValues.errorType?WCF.Language.get("wcf.global.form.error.empty"):e.returnValues.errorMessage,e.returnValues.realErrorMessage&&(i=e.returnValues.realErrorMessage),t.html(i),!1)}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:null,_options:{},init:function(e){if(arguments.length>1&&"string"==typeof e)throw new Error("Outdated API call, please update your implementation.");if(this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFieldID:"",previewButtonID:"",messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFieldID,this._options.previewButtonID)},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'

'+e.returnValues.message+"
")}.bind(this))},_getParameters:function(e){var t,i=this._super(e);for(t in this._options)this._options.hasOwnProperty(t)&&"messageFieldID"!==t&&"previewButtonID"!==t&&(i[t]=this._options[t]);return i},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.I18nPreview=WCF.Message.Preview.extend({_activeMessageField:"",_dialog:null,_options:{},init:function(e){if(this._activeMessageField="",this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFields:[],messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");if(this._options.messageFields.length<1)throw new TypeError("Expected a non empty list of message field ids");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFields[0],"buttonMessagePreview")},_click:function(e){var t,i,s,n;for(this._messageFieldID="",this._textarea=null,t="",i=null,s=0,n=this._options.messageFields.length;s'+e.returnValues.message+"")}.bind(this))},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:null,init:function(e,t,i){if(this._availableLanguages=t,this._languageID=e||0,this._languageInput=$("#languageID"),this._updateLabel(),this._languageInput.find(".dropdownMenu > li").click($.proxy(this._click,this)),!i){var s=this._languageInput.find(".dropdownMenu");$('
  • '+this._availableLanguages[0]+"
  • ").click($.proxy(this._disable,this)).appendTo(s)}this._languageInput.parents("form").submit($.proxy(this._submit,this))},_click:function(e){this._languageID=$(e.currentTarget).data("languageID"),this._updateLabel()},_disable:function(){this._languageID=0,this._updateLabel()},_updateLabel:function(){this._languageInput.find(".dropdownToggle > span").text(this._availableLanguages[this._languageID])},_submit:function(){this._languageInput.next("input[name=languageID]").prop("value",this._languageID)}}),WCF.Message.SmileyCategories=Class.extend({_cache:[],_proxy:null,_wysiwygSelector:"",init:function(e,t,i){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._wysiwygSelector=e,this._smiliesTabMenuId=t||"smilies-"+this._wysiwygSelector,this._formBuilderUsage=i||!1,$("#"+this._smiliesTabMenuId).on("messagetabmenushow",$.proxy(this._click,this))},_click:function(e,t){var i;if(e.preventDefault(),this._formBuilderUsage){if(!t.activeTab.tab.children("a").prop("href").match(/#([a-zA-Z0-9_-]+)$/))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");if(!RegExp.$1.match(this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab(\\d+)Container"))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");i=parseInt(RegExp.$1)}else i=parseInt(t.activeTab.tab.data("smileyCategoryID"));i&&(t.activeTab.container.children("ul.smileyList").length||(void 0===this._cache[i]?(this._proxy.setOption("data",{actionName:"getSmilies",className:"wcf\\data\\smiley\\category\\SmileyCategoryAction",objectIDs:[i]}),this._proxy.sendRequest()):t.activeTab.container.html(this._cache[i])))},_success:function(e,t,i){var s=parseInt(e.returnValues.smileyCategoryID);this._cache[s]=e.returnValues.template,this._formBuilderUsage?$("#"+this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab"+s+"Container").html(e.returnValues.template):$("#smilies-"+this._wysiwygSelector+"-"+s).html(e.returnValues.template)}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(e,t,i){require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(t){new t({className:this._getClassName(),containerId:e,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,quoteManager:i||null,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(e,t){},_callbackDropdownInit:function(e,t){return this._initDropdownMenu($(e).wcfIdentify(),$(t)),null},_getClassName:function(){return""}}),WCF.Message.Submit={_buttons:{},registerButton:function(e,t){WCF.Browser.isChrome()&&(this._buttons[e]=$(t))},execute:function(e){this._buttons[e]&&this._buttons[e].trigger("click")}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({init:function(e,t,i,s,n,a,o){require(["WoltLabSuite/Core/Ui/Message/Quote"],(r=>{new r.default(e,t,i,s,n,a,o)}))}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:null,_editorId:"",_editorIdAlternative:"",_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_supportPaste:!1,_supportPasteOverride:!1,init:function(e,t,i,s){if(this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorId="",this._editorIdAlternative="",this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._supportPaste=!1,this._supportPasteOverride=!1,t){var n=$("#"+t);n.length&&(this._editorId=t,this._supportPaste=!0,this._form=n.parents("form:eq(0)"),this._form.length?(this._form.submit(this._submit.bind(this)),this._removeOnSubmit=s||[]):(this._form=null,this._supportPaste=!0===i))}this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?message-quote/&t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.quote","reload",this.countQuotes.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){const t=document.getElementById(this._editorIdAlternative?this._editorIdAlternative:this._editorId);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:i})=>{i(t).insertQuote({author:e.quote.username,content:e.quote.text,isText:!e.quote.isFullQuote,link:e.quote.link})}))}.bind(this))},setAlternativeEditor:function(e){this._editorIdAlternative||this._supportPaste||(this._hasTemplate=!1,this._supportPaste=!0,this._supportPasteOverride=!0),"object"==typeof e&&(e=e[0].id),this._editorIdAlternative=e},clearAlternativeEditor:function(){this._supportPasteOverride&&(this._hasTemplate=!1,this._supportPaste=!1,this._supportPasteOverride=!1),this._editorIdAlternative=""},register:function(e,t){this._handlers[e]=t},updateCount:function(e,t){var i,s;for(i in this._count=parseInt(e)||0,this._toggleShowQuotes(),this._handlers)this._handlers.hasOwnProperty(i)&&(s=t[i]||[],this._handlers[i].updateFullQuoteObjectIDs(s))},insertQuotes:function(e,t,i){this._insertQuotes?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:i}):this._insertQuotes=!0},_toggleShowQuotes:function(){require(["WoltLabSuite/Core/Ui/Page/Action"],function(e){var t,i="showQuotes";this._count?(void 0===(t=e.get(i))&&((t=elCreate("a")).addEventListener("mousedown",this._click.bind(this)),e.add(i,t)),t.textContent=WCF.Language.get("wcf.message.quote.showQuotes",{count:this._count}),e.show(i)):e.remove(i),this._hasTemplate=!1}.bind(this))},_click:function(){this._hasTemplate?this._dialog.wcfDialog("open"):(this._proxy.showLoadingOverlayOnce(),this._proxy.setOption("data",{actionName:"getQuotes",supportPaste:this._supportPaste}),this._proxy.sendRequest())},renderDialog:function(e){var t,i,s;null===this._dialog&&(this._dialog=$("#messageQuoteList"),this._dialog.length||(this._dialog=$('
    ').hide().appendTo(document.body))),this._dialog.html(e),t=$('
    ').appendTo(this._dialog),this._supportPaste&&(this._buttons.insert=$('").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$('").click($.proxy(this._removeSelected,this)).appendTo(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.quote.manageQuotes")}),this._dialog.wcfDialog("render"),this._hasTemplate=!0,i=this._dialog.find(".jsInsertQuote"),this._supportPaste?i.click($.proxy(this._insertQuote,this)):i.hide(),this._dialog.find("input.jsCheckbox").change($.proxy(this._changeButtons,this)),this._removeOnSubmit.length&&(s=this,this._dialog.find("input.jsRemoveQuote").each((function(e,t){var i=$(t).change($.proxy(this._change,this));WCF.inArray(i.parent("li").attr("data-quote-id"),s._removeOnSubmit)&&i.attr("checked","checked")})))},_changeButtons:function(){this._dialog.find("input.jsCheckbox:checked").length?(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertSelectedQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeSelectedQuotes"))):(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertAllQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeAllQuotes")))},_change:function(e){var t,i=$(e.currentTarget),s=i.parent("li").attr("data-quote-id");i.prop("checked")?this._removeOnSubmit.push(s):-1!==(t=this._removeOnSubmit.indexOf(s))&&this._removeOnSubmit.splice(t,1)},_insertSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),this._dialog.wcfDialog("close"),window.setTimeout((()=>{this._dialog.find("input.jsCheckbox:checked").each($.proxy((function(e,t){this._insertQuote(null,t)}),this))}),0)},_insertQuote:function(e,t){var i=$(e?e.currentTarget:t).parents("li:eq(0)"),s=i.children(".jsFullQuote")[0].textContent.trim(),n=i.parents(".message:eq(0)"),a=n.data("username"),o=n.data("link"),r=!elDataBool(i[0],"is-full-quote");const l=document.getElementById(this._editorIdAlternative?this._editorIdAlternative:this._editorId);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:e})=>{e(l).insertQuote({author:a,content:s,isText:r,link:o})})),this._removeOnSubmit.push(i.data("quote-id")),null!==e&&require(["WoltLabSuite/Core/Environment"],function(e){var t=function(){this._dialog.wcfDialog("close")}.bind(this);"ios"===e.platform()?window.setTimeout(t,100):t()}.bind(this))},_removeSelected:function(){var e,t,i;if(this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),e=[],this._dialog.find("input.jsCheckbox:checked").each((function(t,i){e.push($(i).parents("li").attr("data-quote-id"))})),e.length){for(i in t=[],this._handlers)this._handlers.hasOwnProperty(i)&&t.push(i);this._proxy.setOption("data",{actionName:"remove",getFullQuoteObjectIDs:this._handlers.length>0,objectTypes:t,quoteIDs:e}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")}},_submit:function(){var e,t,i;if(this._supportPaste&&this._removeOnSubmit.length>0)for(e=this._form.find(".formSubmit"),t=0,i=this._removeOnSubmit.length;t').appendTo(e)},getQuotesMarkedForRemoval:function(){return this._removeOnSubmit},markQuotesForRemoval:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"markForRemoval",quoteIDs:this._removeOnSubmit}),this._proxy.suppressErrors(),this._proxy.sendRequest())},removeMarkedQuotes:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"removeMarkedQuotes",getFullQuoteObjectIDs:this._handlers.length>0}),this._proxy.sendRequest())},countQuotes:function(){var e,t=[];for(e in this._handlers)this._handlers.hasOwnProperty(e)&&t.push(e);this._proxy.setOption("data",{actionName:"count",getFullQuoteObjectIDs:t.length>0,objectTypes:t}),this._proxy.sendRequest()},_success:function(e){if(null!==e){if(void 0!==e.count){var t=void 0!==e.fullQuoteObjectIDs?e.fullQuoteObjectIDs:{};this.updateCount(e.count,t)}void 0!==e.template&&(""==$.trim(e.template)?this.updateCount(0,{}):this.renderDialog(e.template))}},supportPaste:function(){return this._supportPaste}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){var t,i,s,n,a,o;e.preventDefault(),i=(t=$(e.currentTarget)).prop("href"),s=t.data("linkTitle")?t.data("linkTitle"):i,n=i.hashCode(),void 0===this._cache[n]?(a=!1,null===this._dialog?(this._dialog=$('
    ').hide().appendTo(document.body),a=!0):this._dialog.empty(),o=$('

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

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

    ").appendTo(this._dialog),$('').attr("value",'
    '+WCF.String.escapeHTML(s)+"").appendTo(o),""!==this._shareButtonsTemplate&&(o=$('

    '+WCF.Language.get("wcf.message.share")+"

    "+this._shareButtonsTemplate+"
    ").appendTo(this._dialog),elData(o.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(i))),this._cache[n]=this._dialog.html(),a?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[n]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click((function(){$(this).select()}));navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown((function(){return!1})).removeAttr("readonly").click((function(){this.setSelectionRange(0,9999)}))}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e,t,i,s,n,a,o,r,l,u=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),h=this.element.find("> div, > fieldset");if(u.length==h.length){for(e=this.element.data("preselect"),h.each((function(t,i){if(null!==elBySel(".innerError",i))return e=$(u[t]).data("name"),!1})),"true"===e&&(e=!0),this._tabs=[],this._tabsByName={},t=0;t{t(e).reset((()=>{for(var e=0,t=this._tabs.length;e ul > li[data-name] > a",o))&&$(r).trigger("mousedown");continue}if(!0===i)continue}a.tab.removeClass("active"),a.container.removeClass("active"),a.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==s&&this._trigger("show",{},{activeTab:s}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this); +(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({init:function(){}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:null,_newIDInputs:null,_containerSelector:"",_buttonSelector:".jsRevertButton",init:function(e,t,i,s,n){this._oldIDInputs=e,this._newIDInputs=t,this._containerSelector=i,this._buttonSelector=s||".jsRevertButton",this._options=$.extend({isVersionTracker:!1,versionTrackerObjectType:"",versionTrackerObjectId:0,redirectUrl:""},n),this.proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initInputs(),this._initElements()},_initInputs:function(){var e=this;this._newIDInputs.change((function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._oldIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t>=i?$(this).disable():$(this).enable()}))})),this._oldIDInputs.change((function(t){var i=parseInt($(this).val());"current"===$(this).val()&&(i=1/0),e._newIDInputs.each((function(e){var t=parseInt($(this).val());"current"===$(this).val()&&(t=1/0),t<=i?$(this).disable():$(this).enable()}))})),this._oldIDInputs.filter(":checked").change(),this._newIDInputs.filter(":checked").change()},_initElements:function(){var e=this;$(this._containerSelector).each((function(t,i){$(i).find(e._buttonSelector).click($.proxy(e._click,e))}))},_click:function(e){var t,i=$(e.currentTarget);e.preventDefault(),i.data("confirmMessage")?(t=this,WCF.System.Confirmation.show(i.data("confirmMessage"),(function(e){"cancel"!==e&&t._sendRequest(i)}),void 0,void 0,!0)):this._sendRequest(i)},_sendRequest:function(e){this._options.isVersionTracker?(this.proxy.setOption("url",window.WSC_API_URL+"index.php?ajax-invoke/&t="+window.SECURITY_TOKEN),this.proxy.setOption("data",{actionName:"revert",className:"wcf\\system\\version\\VersionTracker",parameters:{objectType:this._options.versionTrackerObjectType,objectID:this._options.versionTrackerObjectId,versionID:$(e).data("objectID")}})):this.proxy.setOption("data",{actionName:"revert",className:"wcf\\data\\edit\\history\\entry\\EditHistoryEntryAction",objectIDs:[$(e).data("objectID")]}),this.proxy.sendRequest()},_success:function(e,t,i){this._options.redirectUrl?(new WCF.System.Notification).show(function(){window.location=this._options.redirectUrl}.bind(this)):window.location.reload(!0)}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit((function(){$(this).find(".formSubmit input[type=submit]").disable()}));$(window).on("beforeunload",(function(){e.find(".formSubmit input[type=submit]").enable()}))}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:null,_proxy:null,_previewButton:null,_previewButtonLabel:"",init:function(e,t,i){this._className=e,this._messageFieldID=$.wcfEscapeID(t),this._textarea=$("#"+this._messageFieldID),this._textarea.length?(i=$.wcfEscapeID(i),this._previewButton=$("#"+i),this._previewButton.length?(this._previewButton.click($.proxy(this._click,this)),this._proxy=new WCF.Action.Proxy({failure:$.proxy(this._failure,this),success:$.proxy(this._success,this)}),this._ckeditorApi=void 0,require(["WoltLabSuite/Core/Component/Ckeditor"],(e=>{this._ckeditorApi=e}))):console.debug("[WCF.Message.Preview] Unable to find preview button identified by '"+i+"'")):console.debug("[WCF.Message.Preview] Unable to find message field identified by '"+this._messageFieldID+"'")},_click:function(e){e.preventDefault();var t=this._getMessage();if(null!==t){if(0===t.trim().length){const e=this._textarea[0].parentElement.querySelector(".innerError");return e&&e.remove(),void elInnerError(this._getCkeditor().element,WCF.Language.get("wcf.global.form.error.empty"))}return this._proxy.setOption("data",{actionName:"getMessagePreview",className:this._className,parameters:this._getParameters(t)}),this._proxy.sendRequest(),this._previewButtonLabel=this._previewButton.html(),this._previewButton.html(WCF.Language.get("wcf.global.loading")).disable(),e.stopPropagation(),!1}console.debug("[WCF.Message.Preview] Unable to access Redactor instance of '"+this._messageFieldID+"'")},_getParameters:function(e){var t={};return $("#settings_"+this._messageFieldID).find("input[type=checkbox]").each((function(e,i){var s=$(i);s.is(":checked")&&(t[s.prop("name")]=s.prop("value"))})),{data:{message:e},options:t}},_getMessage:function(){const e=this._getCkeditor();return void 0===e?null:e.getHtml()},_getCkeditor(e){return this._ckeditorApi.getCkeditorById(e||this._messageFieldID)},_success:function(e,t,i){this._previewButton.html(this._previewButtonLabel).enable(),this._textarea.parent().children("small.innerError").remove(),this._handleResponse(e)},_handleResponse:function(e){},_failure:function(e){var t,i;return null===e||void 0===e.returnValues||void 0===e.returnValues.errorType||(this._previewButton.html(this._previewButtonLabel).enable(),(t=this._textarea.parent().children("small.innerError").empty()).length||(t=$('').appendTo(this._textarea.parent())),i="empty"===e.returnValues.errorType?WCF.Language.get("wcf.global.form.error.empty"):e.returnValues.errorMessage,e.returnValues.realErrorMessage&&(i=e.returnValues.realErrorMessage),t.html(i),!1)}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:null,_options:{},init:function(e){if(arguments.length>1&&"string"==typeof e)throw new Error("Outdated API call, please update your implementation.");if(this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFieldID:"",previewButtonID:"",messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFieldID,this._options.previewButtonID)},_handleResponse:function(e){require(["WoltLabSuite/Core/Ui/Dialog"],function(t){t.open(this,'
    '+e.returnValues.message+"
    ")}.bind(this))},_getParameters:function(e){var t,i=this._super(e);for(t in this._options)this._options.hasOwnProperty(t)&&"messageFieldID"!==t&&"previewButtonID"!==t&&(i[t]=this._options[t]);return i},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.I18nPreview=WCF.Message.Preview.extend({_activeMessageField:"",_dialog:null,_options:{},init:function(e){if(this._activeMessageField="",this._options=$.extend({disallowedBBCodesPermission:"user.message.disallowedBBCodes",messageFields:[],messageObjectType:"",messageObjectID:0},e),!this._options.messageObjectType)throw new Error("Field 'messageObjectType' cannot be empty.");if(this._options.messageFields.length<1)throw new TypeError("Expected a non empty list of message field ids");this._super("wcf\\data\\bbcode\\MessagePreviewAction",this._options.messageFields[0],"buttonMessagePreview")},_click:function(e){var t,i,s,n;for(this._messageFieldID="",this._textarea=null,t="",i=null,s=0,n=this._options.messageFields.length;s'+e.returnValues.message+"
    ")}.bind(this))},_dialogSetup:function(){return{id:"messagePreview",options:{title:WCF.Language.get("wcf.global.preview")},source:null}}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:null,init:function(e,t,i){if(this._availableLanguages=t,this._languageID=e||0,this._languageInput=$("#languageID"),this._updateLabel(),this._languageInput.find(".dropdownMenu > li").click($.proxy(this._click,this)),!i){var s=this._languageInput.find(".dropdownMenu");$('
  • '+this._availableLanguages[0]+"
  • ").click($.proxy(this._disable,this)).appendTo(s)}this._languageInput.parents("form").submit($.proxy(this._submit,this))},_click:function(e){this._languageID=$(e.currentTarget).data("languageID"),this._updateLabel()},_disable:function(){this._languageID=0,this._updateLabel()},_updateLabel:function(){this._languageInput.find(".dropdownToggle > span").text(this._availableLanguages[this._languageID])},_submit:function(){this._languageInput.next("input[name=languageID]").prop("value",this._languageID)}}),WCF.Message.SmileyCategories=Class.extend({_cache:[],_proxy:null,_wysiwygSelector:"",init:function(e,t,i){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._wysiwygSelector=e,this._smiliesTabMenuId=t||"smilies-"+this._wysiwygSelector,this._formBuilderUsage=i||!1,$("#"+this._smiliesTabMenuId).on("messagetabmenushow",$.proxy(this._click,this))},_click:function(e,t){var i;if(e.preventDefault(),this._formBuilderUsage){if(!t.activeTab.tab.children("a").prop("href").match(/#([a-zA-Z0-9_-]+)$/))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");if(!RegExp.$1.match(this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab(\\d+)Container"))return void console.debug("[WCF.Message.SmileyCategories] Cannot extract category id for tab '"+t.activeTab.tab.wcfIdentify()+"'.");i=parseInt(RegExp.$1)}else i=parseInt(t.activeTab.tab.data("smileyCategoryID"));i&&(t.activeTab.container.children("ul.smileyList").length||(void 0===this._cache[i]?(this._proxy.setOption("data",{actionName:"getSmilies",className:"wcf\\data\\smiley\\category\\SmileyCategoryAction",objectIDs:[i]}),this._proxy.sendRequest()):t.activeTab.container.html(this._cache[i])))},_success:function(e,t,i){var s=parseInt(e.returnValues.smileyCategoryID);this._cache[s]=e.returnValues.template,this._formBuilderUsage?$("#"+this._smiliesTabMenuId.replace(/Container$/,"")+"_smileyCategoryTab"+s+"Container").html(e.returnValues.template):$("#smilies-"+this._wysiwygSelector+"-"+s).html(e.returnValues.template)}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:".jsMessage",_messageEditorIDPrefix:"messageEditor",init:function(e,t,i){require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(t){new t({className:this._getClassName(),containerId:e,editorPrefix:this._messageEditorIDPrefix,messageSelector:this._messageContainerSelector,quoteManager:i||null,callbackDropdownInit:this._callbackDropdownInit.bind(this)})}.bind(this))},_click:function(e,t){t=null===e?~~t:~~elData(e.currentTarget,"container-id"),require(["WoltLabSuite/Core/Ui/Message/InlineEditor"],function(e){e.legacyEdit(t)}.bind(this)),e&&e.preventDefault()},_initDropdownMenu:function(e,t){},_callbackDropdownInit:function(e,t){return this._initDropdownMenu($(e).wcfIdentify(),$(t)),null},_getClassName:function(){return""}}),WCF.Message.Submit={_buttons:{},registerButton:function(e,t){WCF.Browser.isChrome()&&(this._buttons[e]=$(t))},execute:function(e){this._buttons[e]&&this._buttons[e].trigger("click")}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({init:function(e,t,i,s,n,a,o){require(["WoltLabSuite/Core/Ui/Message/Quote"],(r=>{new r.default(e,t,i,s,n,a,o)}))}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:null,_editorId:"",_editorIdAlternative:"",_form:null,_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:null,_removeOnSubmit:[],_supportPaste:!1,_supportPasteOverride:!1,init:function(e,t,i,s){if(this._buttons={insert:null,remove:null},this._count=parseInt(e)||0,this._dialog=null,this._editorId="",this._editorIdAlternative="",this._form=null,this._handlers={},this._hasTemplate=!1,this._insertQuotes=!0,this._removeOnSubmit=[],this._supportPaste=!1,this._supportPasteOverride=!1,t){var n=$("#"+t);n.length&&(this._editorId=t,this._supportPaste=!0,this._form=n.parents("form:eq(0)"),this._form.length?(this._form.submit(this._submit.bind(this)),this._removeOnSubmit=s||[]):(this._form=null,this._supportPaste=!0===i))}this._proxy=new WCF.Action.Proxy({showLoadingOverlay:!1,success:$.proxy(this._success,this),url:"index.php?message-quote/&t="+SECURITY_TOKEN}),this._toggleShowQuotes(),WCF.System.Event.addListener("com.woltlab.wcf.quote","reload",this.countQuotes.bind(this)),WCF.System.Event.addListener("com.woltlab.wcf.message.quote","insert",function(e){const t=document.getElementById(this._editorIdAlternative?this._editorIdAlternative:this._editorId);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:i})=>{i(t).insertQuote({author:e.quote.username,content:e.quote.text,isText:!e.quote.isFullQuote,link:e.quote.link})}))}.bind(this))},setAlternativeEditor:function(e){this._editorIdAlternative||this._supportPaste||(this._hasTemplate=!1,this._supportPaste=!0,this._supportPasteOverride=!0),"object"==typeof e&&(e=e[0].id),this._editorIdAlternative=e},clearAlternativeEditor:function(){this._supportPasteOverride&&(this._hasTemplate=!1,this._supportPaste=!1,this._supportPasteOverride=!1),this._editorIdAlternative=""},register:function(e,t){this._handlers[e]=t},updateCount:function(e,t){var i,s;for(i in this._count=parseInt(e)||0,this._toggleShowQuotes(),this._handlers)this._handlers.hasOwnProperty(i)&&(s=t[i]||[],this._handlers[i].updateFullQuoteObjectIDs(s))},insertQuotes:function(e,t,i){this._insertQuotes?new WCF.Action.Proxy({autoSend:!0,data:{actionName:"getRenderedQuotes",className:e,interfaceName:"wcf\\data\\IMessageQuoteAction",parameters:{parentObjectID:t}},success:i}):this._insertQuotes=!0},_toggleShowQuotes:function(){require(["WoltLabSuite/Core/Ui/Page/Action"],function(e){var t,i="showQuotes";this._count?(void 0===(t=e.get(i))&&((t=elCreate("a")).addEventListener("mousedown",this._click.bind(this)),e.add(i,t)),t.textContent=WCF.Language.get("wcf.message.quote.showQuotes",{count:this._count}),e.show(i)):e.remove(i),this._hasTemplate=!1}.bind(this))},_click:function(){this._hasTemplate?this._dialog.wcfDialog("open"):(this._proxy.showLoadingOverlayOnce(),this._proxy.setOption("data",{actionName:"getQuotes",supportPaste:this._supportPaste}),this._proxy.sendRequest())},renderDialog:function(e){var t,i,s;null===this._dialog&&(this._dialog=$("#messageQuoteList"),this._dialog.length||(this._dialog=$('
    ').hide().appendTo(document.body))),this._dialog.html(e),t=$('
    ').appendTo(this._dialog),this._supportPaste&&(this._buttons.insert=$('").click($.proxy(this._insertSelected,this)).appendTo(t)),this._buttons.remove=$('").click($.proxy(this._removeSelected,this)).appendTo(t),this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.quote.manageQuotes")}),this._dialog.wcfDialog("render"),this._hasTemplate=!0,i=this._dialog.find(".jsInsertQuote"),this._supportPaste?i.click($.proxy(this._insertQuote,this)):i.hide(),this._dialog.find("input.jsCheckbox").change($.proxy(this._changeButtons,this)),this._removeOnSubmit.length&&(s=this,this._dialog.find("input.jsRemoveQuote").each((function(e,t){var i=$(t).change($.proxy(this._change,this));WCF.inArray(i.parent("li").attr("data-quote-id"),s._removeOnSubmit)&&i.attr("checked","checked")})))},_changeButtons:function(){this._dialog.find("input.jsCheckbox:checked").length?(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertSelectedQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeSelectedQuotes"))):(this._supportPaste&&this._buttons.insert.html(WCF.Language.get("wcf.message.quote.insertAllQuotes")),this._buttons.remove.html(WCF.Language.get("wcf.message.quote.removeAllQuotes")))},_change:function(e){var t,i=$(e.currentTarget),s=i.parent("li").attr("data-quote-id");i.prop("checked")?this._removeOnSubmit.push(s):-1!==(t=this._removeOnSubmit.indexOf(s))&&this._removeOnSubmit.splice(t,1)},_insertSelected:function(){this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),this._dialog.wcfDialog("close"),window.setTimeout((()=>{this._dialog.find("input.jsCheckbox:checked").each($.proxy((function(e,t){this._insertQuote(null,t)}),this))}),0)},_insertQuote:function(e,t){var i=$(e?e.currentTarget:t).parents("li:eq(0)"),s=i.children(".jsFullQuote")[0].textContent.trim(),n=i.parents(".message:eq(0)"),a=n.data("username"),o=n.data("link"),r=!elDataBool(i[0],"is-full-quote");const l=document.getElementById(this._editorIdAlternative?this._editorIdAlternative:this._editorId);require(["WoltLabSuite/Core/Component/Ckeditor/Event"],(({dispatchToCkeditor:e})=>{e(l).insertQuote({author:a,content:s,isText:r,link:o})})),this._removeOnSubmit.push(i.data("quote-id")),null!==e&&require(["WoltLabSuite/Core/Environment"],function(e){var t=function(){this._dialog.wcfDialog("close")}.bind(this);"ios"===e.platform()?window.setTimeout(t,100):t()}.bind(this))},_removeSelected:function(){var e,t,i;if(this._dialog.find("input.jsCheckbox:checked").length||this._dialog.find("input.jsCheckbox").prop("checked","checked"),e=[],this._dialog.find("input.jsCheckbox:checked").each((function(t,i){e.push($(i).parents("li").attr("data-quote-id"))})),e.length){for(i in t=[],this._handlers)this._handlers.hasOwnProperty(i)&&t.push(i);this._proxy.setOption("data",{actionName:"remove",getFullQuoteObjectIDs:this._handlers.length>0,objectTypes:t,quoteIDs:e}),this._proxy.sendRequest(),this._dialog.wcfDialog("close")}},_submit:function(){var e,t,i;if(this._supportPaste&&this._removeOnSubmit.length>0)for(e=this._form.find(".formSubmit"),t=0,i=this._removeOnSubmit.length;t').appendTo(e)},getQuotesMarkedForRemoval:function(){return this._removeOnSubmit},markQuotesForRemoval:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"markForRemoval",quoteIDs:this._removeOnSubmit}),this._proxy.suppressErrors(),this._proxy.sendRequest())},removeMarkedQuotes:function(){this._removeOnSubmit.length&&(this._proxy.setOption("data",{actionName:"removeMarkedQuotes",getFullQuoteObjectIDs:this._handlers.length>0}),this._proxy.sendRequest())},countQuotes:function(){var e,t=[];for(e in this._handlers)this._handlers.hasOwnProperty(e)&&t.push(e);this._proxy.setOption("data",{actionName:"count",getFullQuoteObjectIDs:t.length>0,objectTypes:t}),this._proxy.sendRequest()},_success:function(e){if(null!==e){if(void 0!==e.count){var t=void 0!==e.fullQuoteObjectIDs?e.fullQuoteObjectIDs:{};this.updateCount(e.count,t)}void 0!==e.template&&(""==$.trim(e.template)?this.updateCount(0,{}):this.renderDialog(e.template))}},supportPaste:function(){return this._supportPaste}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){var t,i,s,n,a,o;e.preventDefault(),i=(t=$(e.currentTarget)).prop("href"),s=t.data("linkTitle")?t.data("linkTitle"):i,n=i.hashCode(),void 0===this._cache[n]?(a=!1,null===this._dialog?(this._dialog=$('
    ').hide().appendTo(document.body),a=!0):this._dialog.empty(),o=$('

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

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

    ").appendTo(this._dialog),$('').attr("value",''+WCF.String.escapeHTML(s)+"").appendTo(o),""!==this._shareButtonsTemplate&&(o=$('

    '+WCF.Language.get("wcf.message.share")+"

    "+this._shareButtonsTemplate+"
    ").appendTo(this._dialog),elData(o.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(i))),this._cache[n]=this._dialog.html(),a?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[n]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click((function(){$(this).select()}));navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown((function(){return!1})).removeAttr("readonly").click((function(){this.setSelectionRange(0,9999)}))}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e,t,i,s,n,a,o,r,l,u=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),h=this.element.find("> div, > fieldset");if(u.length==h.length){for(e=this.element.data("preselect"),h.each((function(t,i){if(null!==elBySel(".innerError",i))return e=$(u[t]).data("name"),!1})),"true"===e&&(e=!0),this._tabs=[],this._tabsByName={},t=0;t{t(e).reset((()=>{for(var e=0,t=this._tabs.length;e ul > li[data-name] > a",o))&&$(r).trigger("mousedown");continue}if(!0===i)continue}a.tab.removeClass("active"),a.container.removeClass("active"),a.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==s&&this._trigger("show",{},{activeTab:s}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this); // WCF.User.js (function (window, undefined) { "use strict";WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("
    "+this._cache[t]+"
    ").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){var e,i;this._profileContent=$("#profileContent"),this._userID=t,e=this._profileContent.data("active"),i=!1,this._profileContent.find("div.tabMenuContent").each($.proxy((function(t,s){var a=$(s).wcfIdentify();e===a?this._hasContent[a]=!0:(this._hasContent[a]=!1,i=!0)}),this)),i&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy((function(t,e){var i=$(e);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1}),this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],(function(t){t.getTabMenu("profileContent").select("likes")}))}.bind(this))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(t,e,i){var s=t.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],(function(e,i){i.insertHtml(t.returnValues.template,elById(s),"append"),e.trigger()}))}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:null,_tab:null,_userID:0,init:function(t,e){this._actionName="",this._active=!1,this._cachedTemplate="",this._tab=$("#about"),this._userID=t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._initButtons(),e&&this._beginEdit()},_initButtons:function(){this._buttons={beginEdit:$(".jsButtonEditProfile:eq(0)").click(this._beginEdit.bind(this))}},_beginEdit:function(t){t&&t.preventDefault(),this._active||(this._active=!0,this._actionName="beginEdit",this._buttons.beginEdit.parent().addClass("active"),$("#profileContent").wcfTabs("select","about"),this._proxy.setOption("data",{actionName:"beginEdit",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID]}),this._proxy.sendRequest())},_save:function(){require(["WoltLabSuite/Core/Component/Ckeditor"],(({getCkeditor:t})=>{var e,i;const s=Array.from(this._tab[0].querySelectorAll("textarea")).find((e=>{if(void 0===t(e))return!1;const i={api:{throwError:elInnerError},valid:!0};return WCF.System.Event.fireEvent("com.woltlab.wcf.ckeditor5",`validate_${e.id}`,i),!1===i.valid}));s?s.parentElement.scrollIntoView({behavior:"smooth"}):(this._actionName="save",e=/values\[([a-zA-Z0-9._-]+)\]/,i={},this._tab.find("input, textarea, select").each((function(s,a){var n,o,r,c=$(a),l=null;switch(c.getTagName()){case"input":if(("radio"===(n=c.attr("type"))||"checkbox"===n)&&!c.prop("checked"))return;break;case"textarea":let e=t(a);void 0!==e&&(l=e.getHtml())}o=c.attr("name"),e.test(o)&&(r=RegExp.$1,null===l&&(l=c.val()),"checkbox"===c.attr("type")&&/\[\]$/.test(o)?(Array.isArray(i[r])||(i[r]=[]),i[r].push(l)):i[r]=l)})),this._proxy.setOption("data",{actionName:"save",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[this._userID],parameters:{values:i}}),this._proxy.sendRequest())}))},_restore:function(){this._actionName="restore",this._active=!1,this._buttons.beginEdit.parent().removeClass("active"),this._destroyEditor(),this._tab.html(this._cachedTemplate).children().css({height:"auto"})},_success:function(t,e,i){switch(this._actionName){case"beginEdit":this._prepareEdit(t);break;case"save":t.returnValues.success?(this._cachedTemplate=t.returnValues.template,this._restore()):this._prepareEdit(t,!0)}},_prepareEdit:function(t,e){this._destroyEditor();var i=this;this._tab.html((function(s,a){return!0!==e&&(i._cachedTemplate=a),t.returnValues.template})),this._tab.find("input[type=text]").attr("autocomplete","off"),this._tab.find(".formSubmit > button[data-type=save]").click($.proxy(this._save,this)),this._tab.find(".formSubmit > button[data-type=restore]").click($.proxy(this._restore,this)),this._tab.find("input").keyup((function(t){if(t.which===$.ui.keyCode.ENTER)return i._save(),t.preventDefault(),!1}))},_destroyEditor:function(){require(["WoltLabSuite/Core/Component/Ckeditor"],(({getCkeditor:t})=>{this._tab[0].querySelectorAll("textarea").forEach((e=>{const i=t(e);i?.destroy()}))}))}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e,i=this._element.val();return i?null!==this._confirmElement&&""!=(e=this._confirmElement.val())&&i!=e?this._showError(this._confirmElement,this._errorMessages.notEqual):void(this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())):this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"))},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return!(t.lengththis._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.User.Registration.LostPassword=Class.extend({_email:null,_username:null,init:function(){this._email=$("#emailInput"),this._username=$("#usernameInput"),this._email.keyup($.proxy(this._checkEmail,this)),this._username.keyup($.proxy(this._checkUsername,this)),$.browser.mozilla&&$.browser.touch&&(this._email.on("input",$.proxy(this._checkEmail,this)),this._username.on("input",$.proxy(this._checkUsername,this))),this._checkEmail(),this._checkUsername()},_checkEmail:function(){""==this._email.val()?(this._username.enable(),this._username.parents("dl:eq(0)").removeClass("disabled")):(this._username.disable(),this._username.parents("dl:eq(0)").addClass("disabled"),this._username.val(""))},_checkUsername:function(){""==this._username.val()?(this._email.enable(),this._email.parents("dl:eq(0)").removeClass("disabled")):(this._email.disable(),this._email.parents("dl:eq(0)").addClass("disabled"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:null,init:function(){this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(".jsMarkAllAsConfirmed").click((function(){WCF.System.Confirmation.show(WCF.Language.get("wcf.user.notification.markAllAsConfirmed.confirmMessage"),(function(t){"confirm"===t&&new WCF.Action.Proxy({autoSend:!0,data:{actionName:"markAllAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction"},success:function(){window.location.reload()}})}))})),this._convertList()},_convertList:function(){$(".userNotificationItemList > .notificationItem").each(function(t,e){var i=$(e);i.data("isRead")||(i.find("a:not(.userLink)").prop("href",i.data("link")),$(``).appendTo(i).click($.proxy(this._markAsConfirmed,this)))}.bind(this)),WCF.DOMNodeInsertedHandler.execute()},_markAsConfirmed:function(t){t.preventDefault();var e=$(t.currentTarget).parents(".notificationItem:eq(0)").data("objectID");return this._proxy.setOption("data",{actionName:"markAsConfirmed",className:"wcf\\data\\user\\notification\\UserNotificationAction",objectIDs:[e]}),this._proxy.sendRequest(),!1},_success:function(t,e,i){var s=$(".userNotificationItemList > .notificationItem[data-object-id="+t.returnValues.markAsRead+"]");s.data("isRead",!0),s.find(".newContentBadge").remove(),s.find(".notificationItemMarkAsConfirmed").remove(),s.removeClass("notificationUnconfirmed")}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(t){var e=$("#previewContainer");e.length||(e=$('

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

    ').insertBefore($("#signatureContainer")).wcfFadeIn()),e.children("div").first().html(t.returnValues.message)}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('
  • ").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('
  • '+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"
  • ").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($(""+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:null,_followButtonSelector:".jsFollowButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._followButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._followButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("following")?"unfollow":"follow",className:"wcf\\data\\user\\follow\\UserFollowAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._followButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.following?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unfollow")),s[0].querySelector("fa-icon").setIcon("circle-minus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unfollow"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.follow")),s[0].querySelector("fa-icon").setIcon("circle-plus"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.follow"))),s.data("following",t.returnValues.following),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Action.Ignore=Class.extend({_containerList:null,_ignoreButtonSelector:".jsIgnoreButton",_userID:0,init:function(t,e){t.length&&(this._containerList=t,e&&(this._ignoreButtonSelector=e),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._containerList.each($.proxy((function(t,e){$(e).find(this._ignoreButtonSelector).click($.proxy(this._click,this))}),this)))},_click:function(t){t.preventDefault();var e=$(t.target);e.is("a")||(e=e.closest("a")),this._userID=e.data("objectID"),this._proxy.setOption("data",{actionName:e.data("ignored")?"unignore":"ignore",className:"wcf\\data\\user\\ignore\\UserIgnoreAction",parameters:{data:{userID:this._userID}}}),this._proxy.sendRequest()},_success:function(t,e,i){this._containerList.each($.proxy((function(e,i){var s=$(i).find(this._ignoreButtonSelector).get(0);if(s&&$(s).data("objectID")==this._userID)return s=$(s),t.returnValues.isIgnoredUser?(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.unignore")),s[0].querySelector("fa-icon").setIcon("circle"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.unignore"))):(s.attr("data-tooltip",WCF.Language.get("wcf.user.button.ignore")),s[0].querySelector("fa-icon").setIcon("ban"),s.children(".invisible").text(WCF.Language.get("wcf.user.button.ignore"))),s.data("ignored",t.returnValues.isIgnoredUser),!1}),this)),(new WCF.System.Notification).show()}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(t){this._super($("#avatarUpload > dd > div"),void 0,"wcf\\data\\user\\avatar\\UserAvatarAction"),this._userID=t||0,$("#avatarForm input[type=radio]").change((function(){"custom"==$(this).val()?$("#avatarUpload > dd > div").show():$("#avatarUpload > dd > div").hide()})),$("#avatarForm input[type=radio][value=custom]:checked").length||$("#avatarUpload > dd > div").hide()},_initFile:function(t){return $("#avatarUpload > dt > img")},_success:function(t,e){e.returnValues.url?(this._updateImage(e.returnValues.url),$("#avatarUpload > dd > .innerError").remove(),new WCF.System.Notification(WCF.Language.get("wcf.user.avatar.upload.success")).show()):e.returnValues.errorType&&this._getInnerErrorElement().text(WCF.Language.get("wcf.user.avatar.upload.error."+e.returnValues.errorType))},_updateImage:function(t){$("#avatarUpload > dt > img").remove();var e=$('').css({height:"auto","max-height":"96px","max-width":"96px",width:"auto"});$("#avatarUpload > dt").prepend(e),WCF.DOMNodeInsertedHandler.execute()},_getInnerErrorElement:function(){var t=$("#avatarUpload > dd > .innerError");return t.length||(t=$(''),$("#avatarUpload > dd").append(t)),t},_getParameters:function(){return{userID:this._userID}}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){if(e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount);else if(this._cache[this._pageNo]){var i=!1;null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('
    ').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),this._pageCount>1?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()}else this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:".jsSubscribeButton",_buttons:{},_dialog:null,_notification:null,_reloadOnUnsubscribe:!1,init:function(t){this._buttons={},this._notification=null,this._reloadOnUnsubscribe=!0===t,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),$(this._buttonSelector).each($.proxy((function(t,e){var i,s,a=$(e);a.addClass("pointer"),i=a.data("objectType"),s=a.data("objectID"),void 0===this._buttons[i]&&(this._buttons[i]={}),this._buttons[i][s]=a.click($.proxy(this._click,this))}),this)),WCF.System.Event.addListener("com.woltlab.wcf.objectWatch","update",$.proxy(this._updateSubscriptionStatus,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget);this._proxy.setOption("data",{actionName:"manageSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{objectID:e.data("objectID"),objectType:e.data("objectType")}}),this._proxy.sendRequest()},_success:function(t,e,i){var s,a;"manageSubscription"===t.actionName?(null===this._dialog?(this._dialog=$("
    "+t.returnValues.template+"
    ").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.objectWatch.manageSubscription")})):(this._dialog.html(t.returnValues.template),this._dialog.wcfDialog("open")),this._dialog.find(".formSubmit > .jsButtonSave").data("objectID",t.returnValues.objectID).data("objectType",t.returnValues.objectType).click($.proxy(this._save,this)),s=this._dialog.find("input[name=enableNotification]").disable(),this._dialog.find("input[name=subscribe]").change((function(t){1==$(t.currentTarget).val()?s.enable():s.disable()})),(a=this._dialog.find("input[name=subscribe]:checked")).length&&1==a.val()&&s.enable()):"saveSubscription"===t.actionName&&this._dialog.is(":visible")&&(this._dialog.wcfDialog("close"),this._updateSubscriptionStatus({isSubscribed:t.returnValues.subscribe,objectID:t.returnValues.objectID}),null===this._notification&&(this._notification=new WCF.System.Notification(WCF.Language.get("wcf.global.success.edit"))),this._notification.show())},_save:function(t){var e=this._buttons[$(t.currentTarget).data("objectType")][$(t.currentTarget).data("objectID")],i=this._dialog.find("input[name=subscribe]:checked").val(),s=this._dialog.find("input[name=enableNotification]").is(":checked")?1:0;this._proxy.setOption("data",{actionName:"saveSubscription",className:"wcf\\data\\user\\object\\watch\\UserObjectWatchAction",parameters:{enableNotification:s,objectID:e.data("objectID"),objectType:e.data("objectType"),subscribe:i}}),this._proxy.sendRequest()},_updateSubscriptionStatus:function(t){var e=$(this._buttonSelector+"[data-object-id="+t.objectID+"]"),i=e.children(".icon");if(t.isSubscribed)i[0].querySelector("fa-icon").setIcon("bookmark",!0),e.data("isSubscribed",!0),e.addClass("active");else if(e.data("removeOnUnsubscribe")?e.parent().remove():(i[0].querySelector("fa-icon").setIcon("bookmark"),e.data("isSubscribed",!1),e.removeClass("active")),this._reloadOnUnsubscribe)return void window.location.reload();WCF.System.Event.fireEvent("com.woltlab.wcf.objectWatch","updatedSubscription",t)}}); })(this); diff --git a/wcfsetup/install/files/js/WCF.Combined.tiny.min.js b/wcfsetup/install/files/js/WCF.Combined.tiny.min.js index 16e93b0664..d8ba6dd435 100644 --- a/wcfsetup/install/files/js/WCF.Combined.tiny.min.js +++ b/wcfsetup/install/files/js/WCF.Combined.tiny.min.js @@ -37,7 +37,7 @@ (function (window, undefined) { "use strict";function gm_authFailure(){WCF.System.Event.fireEvent("com.woltlab.wcf.googleMaps","authenticationFailure")}WCF.Location={},WCF.Location.Util={getLocation:function(t,e){var o=WCF.Location.GoogleMaps.Settings.get("accessUserLocation");navigator.geolocation&&null!==o&&o?navigator.geolocation.getCurrentPosition((function(e){t(e.coords.latitude,e.coords.longitude)}),(function(){t(void 0,void 0)}),{timeout:e||5e3}):t(void 0,void 0)}},WCF.Location.GoogleMaps={},WCF.Location.GoogleMaps.Settings={_settings:{},get:function(t){return void 0===t?this._settings:void 0!==this._settings[t]?this._settings[t]:null},set:function(t,e){if($.isPlainObject(t))for(var o in t)this._settings[o]=t[o];else this._settings[t]=e}},WCF.Location.GoogleMaps.Map=Class.extend({_map:null,_markers:[],init:function(t,e){this._mapContainer=$("#"+t),this._mapOptions=$.extend(!0,this._getDefaultMapOptions(),e),this._map=new google.maps.Map(this._mapContainer[0],this._mapOptions),this._markers=[],this._mapContainer.parents(".sidebar").length&&require(["Ui/Screen"],function(t){t.on("screen-sm-down",{setup:$.proxy(this._addSidebarMapListener,this)})}.bind(this)),this.refresh()},_addInfoWindowEventListener:function(t,e){google.maps.event.addListener(t,"click",$.proxy((function(){e.open(this._map,t)}),this))},_addSidebarMapListener:function(){$(".content > .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var t={};switch(t.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),t.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom"),t.draggable=WCF.Location.GoogleMaps.Settings.get("draggable"),WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":t.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":t.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":t.mapTypeId=google.maps.MapTypeId.TERRAIN;break;default:t.mapTypeId=google.maps.MapTypeId.HYBRID}if(t.mapTypeControl="off"!=WCF.Location.GoogleMaps.Settings.get("mapTypeControl"),t.mapTypeControl)switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:t.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT}}return t.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl"),t.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel"),t.zoom=WCF.Location.GoogleMaps.Settings.get("zoom"),t},addDraggableMarker:function(t,e){var o=new google.maps.Marker({clickable:!1,draggable:!0,map:this._map,position:new google.maps.LatLng(t,e),zIndex:1});return this._markers.push(o),o},addMarker:function(t,e,o,s,i){var a,n=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(t,e),title:o});return s&&n.setIcon(s),i&&(a=new google.maps.InfoWindow({content:i}),this._addInfoWindowEventListener(n,a),n.infoWindow=a),this._markers.push(n),n},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var t=this._map.getCenter();google.maps.event.trigger(this._map,"resize"),this._map.setCenter(t)},refreshBounds:function(){var t,e,o,s,i=null,a=null,n=null,r=null;for(t in this._markers)o=(e=this._markers[t]).getPosition().lat(),s=e.getPosition().lng(),null===i?(i=a=o,n=r=s):(i>o?i=o:ao?n=o:r=t.lat()&&this._previousNorthEast.lng()>=t.lng()&&this._previousSouthWest.lat()<=e.lat()&&this._previousSouthWest.lng()<=e.lng()||(this._previousNorthEast=t,this._previousSouthWest=e,this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:$.extend(this._additionalParameters,{excludedObjectIDs:this._stringifyExcludedObjectIds?JSON.stringify(this._objectIDs):this._objectIDs,eastLongitude:t.lng(),northLatitude:t.lat(),southLatitude:e.lat(),westLongitude:e.lng()})}),this._proxy.sendRequest(),0))},_success:function(t,e,o){var s,i;if(t.returnValues&&t.returnValues.markers)for(s in t.returnValues.markers)i=t.returnValues.markers[s],this.addMarker(i.latitude,i.longitude,i.title,null,i.infoWindow),i.objectID?this._objectIDs.push(i.objectID):i.objectIDs&&(this._objectIDs=this._objectIDs.concat(i.objectIDs))},addMarker:function(t,e,o,s,i){var a=this._super(t,e,o,s,i);return this._markerClusterer.addMarker(a),this._markerSpiderfier.addMarker(a),a}}),WCF.Location.GoogleMaps.SuggestionMap=WCF.Location.GoogleMaps.LargeMap.extend({_locationSuggestionsButton:null,_suggestionSelectionCallback:null,init:function(t,e,o,s,i){this._super(t,e,o,s,i);var a=$('
    '+WCF.Language.get("wcf.map.showLocationSuggestions")+"
    ");this._locationSuggestionsButton=a.find(".googleMapsCustomControl").click($.proxy(this._toggleLocationSuggestions,this)),this._map.controls[google.maps.ControlPosition.TOP_RIGHT].push(a.get(0))},_loadMarkers:function(){this._locationSuggestionsButton.hasClass("active")&&(this._super()||(this._loadSuggestions=!1))},_success:function(t,e,o){var s=this._markers.length;this._super(t,e,o),this._loadSuggestions&&s==this._markers.length&&(this._loadSuggestions=!1,new WCF.System.Notification(WCF.Language.get("wcf.map.noLocationSuggestions"),"info").show())},_toggleLocationSuggestions:function(){var t=!this._locationSuggestionsButton.hasClass("active");t&&(this._loadSuggestions=!0),this.showSuggestions(t)},addMarker:function(t,e,o,s,i){var a,n=$(i),r=$('').text(WCF.Language.get("wcf.map.useLocationSuggestion")).click(this._suggestionSelectionCallback);return n.append($("

    ").append(r)),a=this._super(t,e,o,"//mt.google.com/vt/icon/name=icons/spotlight/spotlight-waypoint-a.png",n.get(0)),r.data("marker",a),a},setSuggestionSelectionCallback:function(t){this._suggestionSelectionCallback=t},showSuggestions:function(t){var e,o,s,i;for(void 0===t&&(t=!0),this._locationSuggestionsButton.toggleClass("active",t),e=[],o=0,s=this._markers.length;o"+WCF.String.escapeHTML(t.formatted_address)+"").appendTo(this._list);return e.data("location",t.geometry.location).data("label",t.formatted_address).click($.proxy(this._executeCallback,this)),this._itemCount++,e},_keyUp:function(t){switch(t.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;case $.ui.keyCode.UP:return void this._selectPreviousItem();case $.ui.keyCode.DOWN:return void this._selectNextItem();case $.ui.keyCode.ENTER:return this._selectElement(t)}var e=this._getSearchString(t);""===e?this._clearList(!0):e.length>=this._triggerLength?this._delay?(null!==this._timer&&this._timer.stop(),this._timer=new WCF.PeriodicalExecuter($.proxy((function(){this._geocoder.geocode({address:e},$.proxy(this._success,this)),this._timer.stop(),this._timer=null}),this),this._delay)):this._geocoder.geocode({address:e},$.proxy(this._success,this)):this._clearList(!1)},_success:function(t,e){var o,s,i;if(this._clearList(!1),e==google.maps.GeocoderStatus.OK){if($.getLength(t)){for(s in o=0,t)if(this._createListItem(t[s]),10==++o)break}else if(!this._handleEmptyResult())return;WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy((function(){this._clearList()}),this)),i=this._searchInput.parents(".dropdown").wcfIdentify(),WCF.Dropdown.getDropdownMenu(i).hasClass("dropdownOpen")||WCF.Dropdown.toggleDropdown(i,!0),this._itemIndex=-1,WCF.Dropdown.getDropdown(i).data("disableAutoFocus")||this._selectNextItem()}}}),WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(t,e,o,s,i,a){this._searchInput=o,a?(this._map=new WCF.Location.GoogleMaps.SuggestionMap(t,e,a),this._map.setSuggestionSelectionCallback($.proxy(this._useSuggestion,this))):this._map=new WCF.Location.GoogleMaps.Map(t,e),this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(o,$.proxy(this._setMarkerByLocation,this)),s&&i?this._marker=this._map.addDraggableMarker(s,i):(this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude")),WCF.Location.Util.getLocation($.proxy((function(t,e){void 0!==t&&void 0!==e&&(WCF.Location.GoogleMaps.Util.moveMarker(this._marker,t,e),WCF.Location.GoogleMaps.Util.focusMarker(this._marker))}),this))),this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},_useSuggestion:function(t){var e=$(t.currentTarget).data("marker");this._marker.setPosition(e.getPosition()),this._updateLocation(),this._map.showSuggestions(!1)},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy((function(t){null!==t&&$(this._searchInput).val(t)}),this),this._marker)},_setMarkerByLocation:function(t){this._marker.setPosition(t.location),WCF.Location.GoogleMaps.Util.focusMarker(this._marker),$(this._searchInput).val(t.label)},getMap:function(){return this._map},getMarker:function(){return this._marker}}),WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(t){t.getMap().setCenter(t.getPosition())},getMarkerPosition:function(t){return{latitude:t.getPosition().lat(),longitude:t.getPosition().lng()}},moveMarker:function(t,e,o,s){t.setPosition(new google.maps.LatLng(e,o)),s&&google.maps.event.trigger(t,"dragend")},reverseGeocoding:function(t,e,o,s,i){e&&(o=e.getPosition().lat(),s=e.getPosition().lng()),null===this._geocoder&&(this._geocoder=new google.maps.Geocoder);var a=new google.maps.LatLng(o,s);this._geocoder.geocode({latLng:a},(function(e,o){o==google.maps.GeocoderStatus.OK?t(i?e:e[0].formatted_address):t(null)}))}}; })(this); // WCF.Message.js -(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({init:function(){}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:{},_newIDInputs:{},_containerSelector:"",_buttonSelector:"",init:function(){},_initInputs:function(){},_initElements:function(){},_click:function(){},_sendRequest:function(){},_success:function(){}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit((function(){$(this).find(".formSubmit input[type=submit]").disable()}));$(window).on("unload",(function(){e.find(".formSubmit input[type=submit]").enable()}))}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_handleResponse:function(){},_failure:function(){}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:{},_options:{},init:function(){},_handleResponse:function(){},_getParameters:function(){},_dialogSetup:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",_click:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:{},init:function(){},_click:function(){},_disable:function(){},_updateLabel:function(){},_submit:function(){}}),WCF.Message.SmileyCategories=Class.extend({_cache:{},_proxy:{},_wysiwygSelector:"",init:function(){},_click:function(){},_success:function(){}}),WCF.Message.Smilies=Class.extend({_editorId:"",init:function(){},_smileyClick:function(){}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:"",_messageEditorIDPrefix:"",init:function(){},_click:function(){},_initDropdownMenu:function(){},_callbackDropdownInit:function(){},_getClassName:function(){}}),WCF.Message.Submit={_buttons:{},registerButton:function(){},execute:function(){}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:{},_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:{},_quoteManager:{},init:function(){},_initContainers:function(){},_mouseDown:function(){},_getNodeText:function(){},_mouseUp:function(){},_normalize:function(){},_getBoundingRectangle:function(){},_initCopyQuote:function(){},_getSelectedText:function(){},_saveFullQuote:function(){},_saveQuote:function(){},_saveAndInsertQuote:function(){},_success:function(){},updateFullQuoteObjectIDs:function(){}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:{},_editorId:"",_editorIdAlternative:"",_form:{},_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:{},_removeOnSubmit:{},_supportPaste:!1,init:function(){},setAlternativeEditor:function(){},clearAlternativeEditor:function(){},register:function(){},updateCount:function(){},insertQuotes:function(){},_toggleShowQuotes:function(){},_click:function(){},renderDialog:function(){},_changeButtons:function(){},_change:function(){},_insertSelected:function(){},_insertQuote:function(){},_removeSelected:function(){},_submit:function(){},getQuotesMarkedForRemoval:function(){},markQuotesForRemoval:function(){},removeMarkedQuotes:function(){},countQuotes:function(){},_success:function(){},supportPaste:function(){}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){var t,n,i,a,s,o;e.preventDefault(),n=(t=$(e.currentTarget)).prop("href"),i=t.data("linkTitle")?t.data("linkTitle"):n,a=n.hashCode(),void 0===this._cache[a]?(s=!1,null===this._dialog?(this._dialog=$('

    ').hide().appendTo(document.body),s=!0):this._dialog.empty(),o=$('

    ").appendTo(this._dialog),$('').attr("value",n).appendTo(o),o=$('

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

    ").appendTo(this._dialog),$('').attr("value",'
    '+WCF.String.escapeHTML(i)+"").appendTo(o),""!==this._shareButtonsTemplate&&(o=$('

    '+WCF.Language.get("wcf.message.share")+"

    "+this._shareButtonsTemplate+"
    ").appendTo(this._dialog),elData(o.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(n))),this._cache[a]=this._dialog.html(),s?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[a]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click((function(){$(this).select()}));navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown((function(){return!1})).removeAttr("readonly").click((function(){this.setSelectionRange(0,9999)}))}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e,t,n,i,a,s,o,l,c,u=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),r=this.element.find("> div, > fieldset");if(u.length==r.length){for(e=this.element.data("preselect"),r.each((function(t,n){if(null!==elBySel(".innerError",n))return e=$(u[t]).data("name"),!1})),"true"===e&&(e=!0),this._tabs=[],this._tabsByName={},t=0;t{t(e).reset((()=>{for(var e=0,t=this._tabs.length;e ul > li[data-name] > a",o))&&$(l).trigger("mousedown");continue}if(!0===n)continue}s.tab.removeClass("active"),s.container.removeClass("active"),s.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==i&&this._trigger("show",{},{activeTab:i}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this); +(function (window, undefined) { "use strict";WCF.Message={},WCF.Message.BBCode={},WCF.Message.BBCode.CodeViewer=Class.extend({init:function(){}}),WCF.Message.EditHistory=Class.extend({_oldIDInputs:{},_newIDInputs:{},_containerSelector:"",_buttonSelector:"",init:function(){},_initInputs:function(){},_initElements:function(){},_click:function(){},_sendRequest:function(){},_success:function(){}}),WCF.Message.FormGuard=Class.extend({init:function(){var e=$("form.jsFormGuard").removeClass("jsFormGuard").submit((function(){$(this).find(".formSubmit input[type=submit]").disable()}));$(window).on("beforeunload",(function(){e.find(".formSubmit input[type=submit]").enable()}))}}),WCF.Message.Preview=Class.extend({_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_handleResponse:function(){},_failure:function(){}}),WCF.Message.DefaultPreview=WCF.Message.Preview.extend({_dialog:{},_options:{},init:function(){},_handleResponse:function(){},_getParameters:function(){},_dialogSetup:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",_click:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.Message.Multilingualism=Class.extend({_availableLanguages:{},_languageID:0,_languageInput:{},init:function(){},_click:function(){},_disable:function(){},_updateLabel:function(){},_submit:function(){}}),WCF.Message.SmileyCategories=Class.extend({_cache:{},_proxy:{},_wysiwygSelector:"",init:function(){},_click:function(){},_success:function(){}}),WCF.Message.Smilies=Class.extend({_editorId:"",init:function(){},_smileyClick:function(){}}),WCF.Message.InlineEditor=Class.extend({_container:{},_containerID:0,_dropdowns:{},_messageContainerSelector:"",_messageEditorIDPrefix:"",init:function(){},_click:function(){},_initDropdownMenu:function(){},_callbackDropdownInit:function(){},_getClassName:function(){}}),WCF.Message.Submit={_buttons:{},registerButton:function(){},execute:function(){}},WCF.Message.Quote={},WCF.Message.Quote.Handler=Class.extend({_activeContainerID:"",_className:"",_containers:{},_containerSelector:"",_copyQuote:{},_message:"",_messageBodySelector:"",_objectID:0,_objectType:"",_proxy:{},_quoteManager:{},init:function(){},_initContainers:function(){},_mouseDown:function(){},_getNodeText:function(){},_mouseUp:function(){},_normalize:function(){},_getBoundingRectangle:function(){},_initCopyQuote:function(){},_getSelectedText:function(){},_saveFullQuote:function(){},_saveQuote:function(){},_saveAndInsertQuote:function(){},_success:function(){},updateFullQuoteObjectIDs:function(){}}),WCF.Message.Quote.Manager=Class.extend({_buttons:{},_count:0,_dialog:{},_editorId:"",_editorIdAlternative:"",_form:{},_handlers:{},_hasTemplate:!1,_insertQuotes:!0,_proxy:{},_removeOnSubmit:{},_supportPaste:!1,init:function(){},setAlternativeEditor:function(){},clearAlternativeEditor:function(){},register:function(){},updateCount:function(){},insertQuotes:function(){},_toggleShowQuotes:function(){},_click:function(){},renderDialog:function(){},_changeButtons:function(){},_change:function(){},_insertSelected:function(){},_insertQuote:function(){},_removeSelected:function(){},_submit:function(){},getQuotesMarkedForRemoval:function(){},markQuotesForRemoval:function(){},removeMarkedQuotes:function(){},countQuotes:function(){},_success:function(){},supportPaste:function(){}}),WCF.Message.Share={},WCF.Message.Share.Content=Class.extend({_cache:{},_dialog:null,_shareButtonsTemplate:"",init:function(e){this._shareButtonsTemplate=e||"",this._cache={},this._dialog=null,this._initLinks(),WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.Share.Content",$.proxy(this._initLinks,this))},_initLinks:function(){$("a.jsButtonShare").removeClass("jsButtonShare").click($.proxy(this._click,this))},_click:function(e){var t,n,i,a,s,o;e.preventDefault(),n=(t=$(e.currentTarget)).prop("href"),i=t.data("linkTitle")?t.data("linkTitle"):n,a=n.hashCode(),void 0===this._cache[a]?(s=!1,null===this._dialog?(this._dialog=$('
    ').hide().appendTo(document.body),s=!0):this._dialog.empty(),o=$('

    ").appendTo(this._dialog),$('').attr("value",n).appendTo(o),o=$('

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

    ").appendTo(this._dialog),$('').attr("value",''+WCF.String.escapeHTML(i)+"").appendTo(o),""!==this._shareButtonsTemplate&&(o=$('

    '+WCF.Language.get("wcf.message.share")+"

    "+this._shareButtonsTemplate+"
    ").appendTo(this._dialog),elData(o.children(".jsMessageShareButtons")[0],"url",WCF.String.escapeHTML(n))),this._cache[a]=this._dialog.html(),s?this._dialog.wcfDialog({title:WCF.Language.get("wcf.message.share")}):this._dialog.wcfDialog("open")):this._dialog.html(this._cache[a]).wcfDialog("open"),this._enableSelection()},_enableSelection:function(){var e=this._dialog.find("input").click((function(){$(this).select()}));navigator.userAgent.match(/iP(ad|hone|od)/)&&e.keydown((function(){return!1})).removeAttr("readonly").click((function(){this.setSelectionRange(0,9999)}))}}),$.widget("wcf.messageTabMenu",{_tabs:[],_tabsByName:{},options:{collapsible:!0},_create:function(){var e,t,n,i,a,s,o,l,c,u=this.element.find("> nav").find("> ul > li:not(.jsFlexibleMenuDropdown)"),r=this.element.find("> div, > fieldset");if(u.length==r.length){for(e=this.element.data("preselect"),r.each((function(t,n){if(null!==elBySel(".innerError",n))return e=$(u[t]).data("name"),!1})),"true"===e&&(e=!0),this._tabs=[],this._tabsByName={},t=0;t{t(e).reset((()=>{for(var e=0,t=this._tabs.length;e ul > li[data-name] > a",o))&&$(l).trigger("mousedown");continue}if(!0===n)continue}s.tab.removeClass("active"),s.container.removeClass("active"),s.tab.children("a").attr("aria-expanded",!1)}null!==e&&(e.preventDefault(),e.stopPropagation()),null!==i&&this._trigger("show",{},{activeTab:i}),$(window).trigger("resize")},showTab:function(e,t){$.isNumeric(e)||void 0!==this._tabsByName[e]&&(e=this._tabsByName[e]),void 0!==this._tabs[e]?this._showTab(null,e,t):console.debug("[wcf.messageTabMenu] Cannot locate tab identified by '"+e+"'")},getTab:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].tab:null},getContainer:function(e){return void 0!==this._tabsByName[e]?this._tabs[this._tabsByName[e]].container:null}}); })(this); // WCF.User.js (function (window, undefined) { "use strict";WCF.User.Profile={},WCF.User.Profile.ActivityPointList={_cache:{},_dialog:null,_didInit:!1,_proxy:null,init:function(){this._didInit||(this._cache={},this._dialog=null,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._init(),WCF.DOMNodeInsertedHandler.addCallback("WCF.User.Profile.ActivityPointList",$.proxy(this._init,this)),this._didInit=!0)},_init:function(){$(".activityPointsDisplay").removeClass("activityPointsDisplay").click($.proxy(this._click,this))},_click:function(t){t.preventDefault();var e=$(t.currentTarget).data("userID");void 0===this._cache[e]?(this._proxy.setOption("data",{actionName:"getDetailedActivityPointList",className:"wcf\\data\\user\\UserProfileAction",objectIDs:[e]}),this._proxy.sendRequest()):this._show(e)},_show:function(t){null===this._dialog?(this._dialog=$("
    "+this._cache[t]+"
    ").hide().appendTo(document.body),this._dialog.wcfDialog({title:WCF.Language.get("wcf.user.activityPoint")})):(this._dialog.html(this._cache[t]),this._dialog.wcfDialog("open"))},_success:function(t,e,i){this._cache[t.returnValues.userID]=t.returnValues.template,this._show(t.returnValues.userID)}},WCF.User.Profile.TabMenu=Class.extend({_hasContent:{},_profileContent:null,_proxy:null,_userID:0,init:function(t){var e,i;this._profileContent=$("#profileContent"),this._userID=t,e=this._profileContent.data("active"),i=!1,this._profileContent.find("div.tabMenuContent").each($.proxy((function(t,s){var n=$(s).wcfIdentify();e===n?this._hasContent[n]=!0:(this._hasContent[n]=!1,i=!0)}),this)),i&&(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._profileContent.on("wcftabsbeforeactivate",$.proxy(this._loadContent,this)),this._profileContent.find("> nav.tabMenu > ul > li").each($.proxy((function(t,e){var i=$(e);if(i.hasClass("ui-state-active"))return t&&this._loadContent(null,{newPanel:$("#"+i.attr("aria-controls"))}),!1}),this))),$('.userProfileUser .contentDescription a[href$="#likes"]').click(function(t){t.preventDefault(),require(["Ui/TabMenu"],(function(t){t.getTabMenu("profileContent").select("likes")}))}.bind(this))},_loadContent:function(t,e){var i=$(e.newPanel),s=i.attr("id");this._hasContent[s]||(this._proxy.setOption("data",{actionName:"getContent",className:"wcf\\data\\user\\profile\\menu\\item\\UserProfileMenuItemAction",parameters:{data:{containerID:s,menuItem:i.data("menuItem"),userID:this._userID}}}),this._proxy.sendRequest())},_success:function(t,e,i){var s=t.returnValues.containerID;this._hasContent[s]=!0,require(["Dom/ChangeListener","Dom/Util"],(function(e,i){i.insertHtml(t.returnValues.template,elById(s),"append"),e.trigger()}))}}),WCF.User.Profile.Editor=Class.extend({_actionName:"",_active:!1,_buttons:{},_cachedTemplate:"",_proxy:{},_tab:{},_userID:0,init:function(){},_initButtons:function(){},_beginEdit:function(){},_save:function(){},_restore:function(){},_success:function(){},_prepareEdit:function(){},_destroyEditor:function(){}}),WCF.User.Registration={},WCF.User.Registration.Validation=Class.extend({_actionName:"",_className:"",_confirmElement:null,_element:null,_errorMessages:{},_options:{},_proxy:null,init:function(t,e,i){this._element=t,this._element.blur($.proxy(this._blur,this)),this._confirmElement=e||null,null!==this._confirmElement&&this._confirmElement.blur($.proxy(this._blurConfirm,this)),i=i||{},this._setOptions(i),this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this),showLoadingOverlay:!1}),this._setErrorMessages()},_setOptions:function(t){},_setErrorMessages:function(){this._errorMessages={ajaxError:"",notEqual:""}},_blur:function(t){var e,i=this._element.val();return i?null!==this._confirmElement&&""!=(e=this._confirmElement.val())&&i!=e?this._showError(this._confirmElement,this._errorMessages.notEqual):void(this._validateOptions()&&(this._proxy.setOption("data",{actionName:this._actionName,className:this._className,parameters:this._getParameters()}),this._proxy.sendRequest())):this._showError(this._element,WCF.Language.get("wcf.global.form.error.empty"))},_getParameters:function(){return{}},_validateOptions:function(){return!0},_blurConfirm:function(t){if(!this._confirmElement.val())return this._showError(this._confirmElement,WCF.Language.get("wcf.global.form.error.empty"));this._blur(t)},_success:function(t,e,i){t.returnValues.isValid?(this._showSuccess(this._element),null!==this._confirmElement&&this._confirmElement.val()&&this._showSuccess(this._confirmElement)):this._showError(this._element,WCF.Language.get(this._errorMessages.ajaxError+t.returnValues.error))},_showError:function(t,e){t.parent().parent().addClass("formError").removeClass("formSuccess");var i=t.parent().find("small.innerError");i.length||(i=$("").addClass("innerError").insertAfter(t)),i.text(e)},_showSuccess:function(t){t.parent().parent().addClass("formSuccess").removeClass("formError"),t.next("small.innerError").remove()}}),WCF.User.Registration.Validation.Username=WCF.User.Registration.Validation.extend({_actionName:"validateUsername",_className:"wcf\\data\\user\\UserRegistrationAction",_setOptions:function(t){this._options=$.extend(!0,{minlength:3,maxlength:25},t)},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.username.error."}},_validateOptions:function(){var t=this._element.val();return!(t.lengththis._options.maxlength)||(this._showError(this._element,WCF.Language.get("wcf.user.username.error.invalid")),!1)},_getParameters:function(){return{username:this._element.val()}}}),WCF.User.Registration.Validation.EmailAddress=WCF.User.Registration.Validation.extend({_actionName:"validateEmailAddress",_className:"wcf\\data\\user\\UserRegistrationAction",_getParameters:function(){return{email:this._element.val()}},_setErrorMessages:function(){this._errorMessages={ajaxError:"wcf.user.email.error.",notEqual:WCF.Language.get("wcf.user.confirmEmail.error.notEqual")}}}),WCF.User.Registration.LostPassword=Class.extend({_email:null,_username:null,init:function(){this._email=$("#emailInput"),this._username=$("#usernameInput"),this._email.keyup($.proxy(this._checkEmail,this)),this._username.keyup($.proxy(this._checkUsername,this)),$.browser.mozilla&&$.browser.touch&&(this._email.on("input",$.proxy(this._checkEmail,this)),this._username.on("input",$.proxy(this._checkUsername,this))),this._checkEmail(),this._checkUsername()},_checkEmail:function(){""==this._email.val()?(this._username.enable(),this._username.parents("dl:eq(0)").removeClass("disabled")):(this._username.disable(),this._username.parents("dl:eq(0)").addClass("disabled"),this._username.val(""))},_checkUsername:function(){""==this._username.val()?(this._email.enable(),this._email.parents("dl:eq(0)").removeClass("disabled")):(this._email.disable(),this._email.parents("dl:eq(0)").addClass("disabled"),this._email.val(""))}}),WCF.Notification={},WCF.Notification.List=Class.extend({_proxy:{},init:function(){},_convertList:function(){},_markAsConfirmed:function(){},_success:function(){}}),WCF.User.SignaturePreview=WCF.Message.Preview.extend({_handleResponse:function(){},_className:"",_messageFieldID:"",_messageField:{},_proxy:{},_previewButton:{},_previewButtonLabel:"",init:function(){},_click:function(){},_getParameters:function(){},_getMessage:function(){},_success:function(){},_failure:function(){}}),WCF.User.RecentActivityLoader=Class.extend({_container:null,_filteredByFollowedUsers:!1,_loadButton:null,_proxy:null,_userID:0,init:function(t,e){this._container=$("#recentActivities"),this._filteredByFollowedUsers=!0===e,this._userID=t,null===this._userID||this._userID?(this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)}),this._container.children("li").length?(this._loadButton=$('
  • ").appendTo(this._container),this._loadButton=this._loadButton.children("button").click($.proxy(this._click,this))):$('
  • '+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"
  • ").appendTo(this._container),WCF.User.userID&&$(".jsRecentActivitySwitchContext .button").click($.proxy(this._switchContext,this))):console.debug("[WCF.User.RecentActivityLoader] Invalid parameter 'userID' given.")},_click:function(){this._loadButton.enable();var t={lastEventID:this._container.data("lastEventID"),lastEventTime:this._container.data("lastEventTime")};this._userID?t.userID=this._userID:this._filteredByFollowedUsers&&(t.filteredByFollowedUsers=1),this._proxy.setOption("data",{actionName:"load",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction",parameters:t}),this._proxy.sendRequest()},_switchContext:function(t){t.preventDefault(),$(t.currentTarget).hasClass("active")||new WCF.Action.Proxy({autoSend:!0,data:{actionName:"switchContext",className:"wcf\\data\\user\\activity\\event\\UserActivityEventAction"},success:function(){window.location.hash="#dashboardBoxRecentActivity",window.location.reload()}})},_success:function(t,e,i){t.returnValues.template?($(t.returnValues.template).insertBefore(this._loadButton.parent()),this._container.data("lastEventTime",t.returnValues.lastEventTime),this._container.data("lastEventID",t.returnValues.lastEventID),this._loadButton.enable()):($(""+WCF.Language.get("wcf.user.recentActivity.noMoreEntries")+"").appendTo(this._loadButton.parent()),this._loadButton.remove())}}),WCF.User.Action={},WCF.User.Action.Follow=Class.extend({_containerList:{},_followButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Action.Ignore=Class.extend({_containerList:{},_ignoreButtonSelector:"",_userID:0,init:function(){},_click:function(){},_success:function(){}}),WCF.User.Avatar={},WCF.User.Avatar.Upload=WCF.Upload.extend({_userID:0,init:function(){},_initFile:function(){},_success:function(){},_updateImage:function(){},_getInnerErrorElement:function(){},_getParameters:function(){},_name:"",_buttonSelector:{},_fileListSelector:{},_fileUpload:{},_className:"",_iframe:{},_internalFileID:0,_options:{},_uploadMatrix:{},_supportsAJAXUpload:!0,_overlay:{},_createButton:function(){},_insertButton:function(){},_removeButton:function(){},_upload:function(){},_createUploadMatrix:function(){},_error:function(){},_progress:function(){},_showOverlay:function(){},_evaluateResponse:function(){},_getFilename:function(){}}),WCF.User.List=Class.extend({_additionalParameters:{},_cache:{},_className:"",_dialog:null,_dialogTitle:"",_pageCount:0,_pageNo:1,_proxy:null,init:function(t,e,i){this._additionalParameters=i||{},this._cache={},this._className=t,this._dialog=null,this._dialogTitle=e,this._pageCount=0,this._pageNo=1,this._proxy=new WCF.Action.Proxy({success:$.proxy(this._success,this)})},open:function(){this._pageNo=1,this._showPage()},_showPage:function(t,e){if(e&&e.activePage&&(this._pageNo=e.activePage),0!=this._pageCount&&(this._pageNo<1||this._pageNo>this._pageCount))console.debug("[WCF.User.List] Cannot access page "+this._pageNo+" of "+this._pageCount);else if(this._cache[this._pageNo]){var i=!1;null===this._dialog&&(this._dialog=$("#userList"+this._className.hashCode()),0===this._dialog.length&&(this._dialog=$('
    ').hide().appendTo(document.body),i=!0)),this._dialog.empty(),this._dialog.html(this._cache[this._pageNo]),this._pageCount>1?this._dialog.find(".jsPagination").wcfPages({activePage:this._pageNo,maxPage:this._pageCount}).on("wcfpagesswitched",$.proxy(this._showPage,this)):this._dialog.find(".jsPagination").hide(),i?this._dialog.wcfDialog({title:this._dialogTitle}):(this._dialog.wcfDialog("option","title",this._dialogTitle),this._dialog.wcfDialog("open").wcfDialog("render")),WCF.DOMNodeInsertedHandler.execute()}else this._additionalParameters.pageNo=this._pageNo,this._proxy.setOption("data",{actionName:"getGroupedUserList",className:this._className,interfaceName:"wcf\\data\\IGroupedUserListAction",parameters:this._additionalParameters}),this._proxy.sendRequest()},_success:function(t,e,i){t.returnValues.pageCount&&(this._pageCount=t.returnValues.pageCount),this._cache[this._pageNo]=t.returnValues.template,this._showPage()}}),WCF.User.ObjectWatch={},WCF.User.ObjectWatch.Subscribe=Class.extend({_buttonSelector:"",_buttons:{},_dialog:{},_notification:{},_reloadOnUnsubscribe:!1,init:function(){},_click:function(){},_success:function(){},_save:function(){},_updateSubscriptionStatus:function(){}}); })(this); diff --git a/wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js b/wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js index 973b681f6d..356847d43e 100644 --- a/wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js +++ b/wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js @@ -1,2 +1,2 @@ -var requirejs,require,define,__extends,__assign,__rest,__decorate,__param,__esDecorate,__runInitializers,__propKey,__setFunctionName,__metadata,__awaiter,__generator,__exportStar,__values,__read,__spread,__spreadArrays,__spreadArray,__await,__asyncGenerator,__asyncDelegator,__asyncValues,__makeTemplateObject,__importStar,__importDefault,__classPrivateFieldGet,__classPrivateFieldSet,__classPrivateFieldIn,__createBinding,__addDisposableResource,__disposeResources,_self,Prism,__setModuleDefault,Reflect;(function(global,Promise,undef){function commentReplace(e,t){return t||""}function hasProp(e,t){return hasOwn.call(e,t)}function getOwn(e,t){return e&&hasProp(e,t)&&e[t]}function obj(){return Object.create(null)}function eachProp(e,t){var n;for(n in e)if(hasProp(e,n)&&t(e[n],n))break}function mixin(e,t,n,o){return t&&eachProp(t,(function(t,i){!n&&hasProp(e,i)||(!o||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[i]=t:(e[i]||(e[i]={}),mixin(e[i],t,n,o)))})),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach((function(e){t=t[e]})),t}function newContext(e){function t(e,t,n){var o,i,r,a,s,l,c,d,u,p,h=t&&t.split("/"),m=x.map,f=m&&m["*"];if(e&&(l=(e=e.split("/")).length-1,x.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),function(e){var t,n,o=e.length;for(t=0;t0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),n&&m&&(h||f)){e:for(r=(i=e.split("/")).length;r>0;r-=1){if(s=i.slice(0,r).join("/"),h)for(a=h.length;a>0;a-=1)if((o=getOwn(m,h.slice(0,a).join("/")))&&(o=getOwn(o,s))){c=o,d=r;break e}!u&&f&&getOwn(f,s)&&(u=getOwn(f,s),p=r)}!c&&u&&(c=u,d=p),c&&(i.splice(0,d,c),e=i.join("/"))}return getOwn(x.pkgs,e)||e}function n(e){var t,n,o,i;for(t=0;t0;a-=1)if(l=getOwn(o,r.slice(0,a).join("/"))){Array.isArray(l)&&(l=l[0]),r.splice(0,a,l);break}s=r.join("/"),s=("/"===(s+=t||(/^data\:|^blob\:|\?/.test(s)||n?"":".js")).charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":x.baseUrl)+s}return x.urlArgs&&!/^blob\:/.test(s)?s+x.urlArgs(e,s):s},i.toUrl=function(n){var o,r=n.lastIndexOf("."),a=n.split("/")[0];return-1!==r&&(!("."===a||".."===a)||r>1)&&(o=n.substring(r,n.length),n=n.substring(0,r)),i.nameToUrl(t(n,e),o,!0)},i.defined=function(t){return w(t,e,!0).id in L},i.specified=function(t){return(t=w(t,e,!0).id)in L||t in D},i}function i(e,t,n){e&&(L[e]=n,requirejs.onResourceLoad&&requirejs.onResourceLoad(C,t.map,t.deps)),t.finished=!0,t.resolve(n)}function r(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function a(e){e.factoryCalled=!0;var t,n=e.map.id;try{t=C.execCb(n,e.factory,e.values,L[n])}catch(t){return r(e,t)}n?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=L[n])):M.splice(M.indexOf(e),1),i(n,e,t)}function s(e,t){this.rejected||this.depDefined[t]||(this.depDefined[t]=!0,this.depCount+=1,this.values[t]=e,this.depending||this.depCount!==this.depMax||a(this))}function l(e,t){var n={};return n.promise=new Promise((function(t,o){n.resolve=t,n.reject=function(t){e||M.splice(M.indexOf(n),1),o(t)}})),n.map=e?t||w(e):{},n.depCount=0,n.depMax=0,n.values=[],n.depDefined=[],n.depFinished=s,n.map.pr&&(n.deps=[w(n.map.pr)]),n}function c(e,t){var n;return e?(n=e in D&&D[e])||(n=D[e]=l(e,t)):(n=l(),M.push(n)),n}function d(e,t){return function(n){e.rejected||(n.dynaId||(n.dynaId="id"+(O+=1),n.requireModules=[t]),r(e,n))}}function u(e,t,n,o){n.depMax+=1,y(e,t).then((function(e){n.depFinished(e,o)}),d(n,e.id)).catch(d(n,n.map.id))}function p(e,t,a){e.load(t.n,o(a),function(e){function t(t){o||i(e,c(e),t)}var o;return t.error=function(t){r(c(e),t)},t.fromText=function(t,i){var a,s=c(e),l=w(w(e).n),d=l.id;o=!0,s.factory=function(e,t){return t},i&&(t=i),hasProp(x.config,e)&&(x.config[d]=x.config[e]);try{b.exec(t)}catch(e){(a=new Error("fromText eval for "+d+" failed: "+e)).requireType="fromtexteval",r(s,a)}n(d),s.deps=[l],u(l,null,s,s.deps.length)},t}(t.id),x)}function h(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function m(e,t,n){var o=e.map.id;t[o]=!0,!e.finished&&e.deps&&e.deps.forEach((function(o){var i=o.id,r=!hasProp(_,i)&&c(i,o);!r||r.finished||n[i]||(hasProp(t,i)?e.deps.forEach((function(t,n){t.id===i&&e.depFinished(L[i],n)})):m(r,t,n))})),n[o]=!0}function f(e){var t,n,o,i=[],a=1e3*x.waitSeconds,s=a&&j+a<(new Date).getTime();if(0===P&&(e?e.finished||m(e,{},{}):M.length&&M.forEach((function(e){m(e,{},{})}))),s){for(n in D)(o=D[n]).finished||i.push(o.map.id);(t=new Error("Timeout for modules: "+i)).requireModules=i,t.requireType="timeout",i.forEach((function(e){r(c(e),t)}))}else(P||M.length)&&(E||(E=!0,setTimeout((function(){E=!1,f()}),70)))}function g(e){return setTimeout((function(){e.dynaId&&q[e.dynaId]||(q[e.dynaId]=!0,b.onError(e))})),e}var b,v,w,y,_,E,S,C,L=obj(),k=obj(),x={waitSeconds:7,baseUrl:"./",paths:{},bundles:{},pkgs:{},shim:{},config:{}},T=obj(),M=[],D=obj(),I=obj(),A=obj(),P=0,j=(new Date).getTime(),O=0,q=obj(),N=obj(),B=obj(),U=Promise.resolve();return S="function"==typeof importScripts?function(e){var t=e.url;N[t]||(N[t]=!0,c(e.id),importScripts(t),n(e.id))}:function(e){var t,o=e.id,i=e.url;N[i]||(N[i]=!0,(t=document.createElement("script")).setAttribute("data-requiremodule",o),t.type=x.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,P+=1,t.addEventListener("load",(function(){P-=1,n(o)}),!1),t.addEventListener("error",(function(){var e,n,i;P-=1,(n=getOwn(x.paths,o))&&Array.isArray(n)&&n.length>1?(t.parentNode.removeChild(t),n.shift(),(i=c(o)).map=w(o),i.map.url=b.nameToUrl(o),S(i.map)):((e=new Error("Load failed: "+o+": "+t.src)).requireModules=[o],e.requireType="scripterror",r(c(o),e))}),!1),t.src=i,x.onNodeCreated&&x.onNodeCreated(t,x,o,i),10===document.documentMode?asap.then((function(){document.head.appendChild(t)})):document.head.appendChild(t))},y=function(e,t){var n,o,i=e.id,r=x.shim[i];if(i in k)n=k[i],delete k[i],v.apply(undef,n);else if(!(i in D))if(e.pr){if(!(o=getOwn(B,i)))return y(w(e.pr)).then((function(n){var o=e.prn?e:w(i,t,!0),r=o.id,a=getOwn(x.shim,r);return r in A||(A[r]=!0,a&&a.deps?b(a.deps,(function(){p(n,o,t)})):p(n,o,t)),c(r).promise}));e.url=b.nameToUrl(o),S(e)}else r&&r.deps?b(r.deps,(function(){S(e)})):S(e);return c(i).promise},w=function(e,n,o){if("string"!=typeof e)return e;var i,r,a,s,l,c,d=e+" & "+(n||"")+" & "+!!o;return s=(a=h(e))[0],e=a[1],!s&&d in T?T[d]:(s&&(i=(s=t(s,n,o))in L&&L[s]),s?i&&i.normalize?(e=i.normalize(e,function(e){return function(n){return t(n,e,!0)}}(n)),c=!0):e=-1===e.indexOf("!")?t(e,n,o):e:(s=(a=h(e=t(e,n,o)))[0],e=a[1],r=b.nameToUrl(e)),l={id:s?s+"!"+e:e,n:e,pr:s,url:r,prn:s&&c},s||(T[d]=l),l)},_={require:function(e){return o(e)},exports:function(e){var t=L[e];return void 0!==t?t:L[e]={}},module:function(e,t){return{id:e,uri:t||"",exports:_.exports(e),config:function(){return getOwn(x.config,e)||{}}}}},v=function(e,t,n,o,r){if(e){if(e in I)return;I[e]=!0}var s=c(e);return t&&!Array.isArray(t)&&(n=t,t=[]),t=t?slice.call(t,0):null,o||(hasProp(x,"defaultErrback")?x.defaultErrback&&(o=x.defaultErrback):o=g),o&&s.promise.catch(o),r=r||e,"function"==typeof n?(!t.length&&n.length&&(n.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,(function(e,n){t.push(n)})),t=(1===n.length?["require"]:["require","exports","module"]).concat(t)),s.factory=n,s.deps=t,s.depending=!0,t.forEach((function(n,o){var i;t[o]=i=w(n,r,!0),"require"===(n=i.id)?s.values[o]=_.require(e):"exports"===n?(s.values[o]=_.exports(e),s.usingExports=!0):"module"===n?s.values[o]=s.cjsModule=_.module(e,s.map.url):void 0===n?s.values[o]=void 0:u(i,r,s,o)})),s.depending=!1,s.depCount===s.depMax&&a(s)):e&&i(e,s,n),j=(new Date).getTime(),e||f(s),s.promise},(b=o(null,!0)).config=function(t){var n,o,i,r;return t.context&&t.context!==e?(n=getOwn(contexts,t.context))?n.req.config(t):newContext(t.context).config(t):(T=obj(),t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs&&(o=t.urlArgs,t.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+o}),i=x.shim,r={paths:!0,bundles:!0,config:!0,map:!0},eachProp(t,(function(e,t){r[t]?(x[t]||(x[t]={}),mixin(x[t],e,!0,!0)):x[t]=e})),t.bundles&&eachProp(t.bundles,(function(e,t){e.forEach((function(e){e!==t&&(B[e]=t)}))})),t.shim&&(eachProp(t.shim,(function(e,t){Array.isArray(e)&&(e={deps:e}),!e.exports&&!e.init||e.exportsFn||(e.exportsFn=function(e){return function(){var t;return e.init&&(t=e.init.apply(global,arguments)),t||e.exports&&getGlobal(e.exports)}}(e)),i[t]=e})),x.shim=i),t.packages&&t.packages.forEach((function(e){var t;t=(e="string"==typeof e?{name:e}:e).name,e.location&&(x.paths[t]=e.location),x.pkgs[t]=e.name+"/"+(e.main||"main").replace(currDirRegExp,"").replace(jsSuffixRegExp,"")})),(t.deps||t.callback)&&b(t.deps,t.callback),b)},b.onError=function(e){throw e},C={id:e,defined:L,waiting:k,config:x,deferreds:D,req:b,execCb:function(e,t,n,o){return t.apply(o,n)}},contexts[e]=C,b}var topReq,dataMain,src,subPath,bootstrapConfig,hasOwn,contexts,queue,currDirRegExp,urlRegExp,commentRegExp,cjsRequireRegExp,jsSuffixRegExp,slice,asap;if(!Promise)throw new Error("No Promise implementation available");bootstrapConfig=requirejs||require,hasOwn=Object.prototype.hasOwnProperty,contexts={},queue=[],currDirRegExp=/^\.\//,urlRegExp=/^\/|\:|\?|\.js$/,commentRegExp=/\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/gm,cjsRequireRegExp=/[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,jsSuffixRegExp=/\.js$/,slice=Array.prototype.slice,"function"!=typeof requirejs&&(asap=Promise.resolve(void 0),requirejs=topReq=newContext("_"),"function"!=typeof require&&(require=topReq),topReq.exec=function(text){return eval(text)},topReq.contexts=contexts,define=function(){queue.push(slice.call(arguments,0))},define.amd={jQuery:!0},bootstrapConfig&&topReq.config(bootstrapConfig),topReq.isBrowser&&!contexts._.config.skipDataMain&&(dataMain=document.querySelectorAll("script[data-main]")[0],dataMain=dataMain&&dataMain.getAttribute("data-main"),dataMain&&(dataMain=dataMain.replace(jsSuffixRegExp,""),bootstrapConfig&&bootstrapConfig.baseUrl||-1!==dataMain.indexOf("!")||(src=dataMain.split("/"),dataMain=src.pop(),subPath=src.length?src.join("/")+"/":"./",topReq.config({baseUrl:subPath})),topReq([dataMain]))))})(this,"undefined"!=typeof Promise?Promise:void 0),define("requireLib",(function(){})),requirejs.config({paths:{"focus-trap":"3rdParty/focus-trap/focus-trap.umd.min","perfect-scrollbar":"3rdParty/perfect-scrollbar",Pica:"3rdParty/pica",pica:"3rdParty/pica",prism:"3rdParty/prism",prismjs:"3rdParty/prism/prism","qr-creator":"3rdParty/qr-creator.min","reflect-metadata":"3rdParty/reflect-metadata",tabbable:"3rdParty/focus-trap/index.umd.min",tslib:"3rdParty/tslib",zxcvbn:"3rdParty/zxcvbn","@googlemaps/markerclusterer":"3rdParty/googlemaps/markerclusterer/index.umd","@ckeditor/ckeditor5-inspector":"3rdParty/ckeditor/ckeditor5-inspector/inspector","@woltlab/editor":"3rdParty/ckeditor/ckeditor5.bundle","ckeditor5-translation":"3rdParty/ckeditor/translations"},packages:[{name:"codemirror",location:"3rdParty/codemirror",main:"lib/codemirror"}],shim:{"perfect-scrollbar":{exports:"PerfectScrollbar"},"qr-creator":{exports:"QrCreator"}},map:{"*":{Ajax:"WoltLabSuite/Core/Ajax",AjaxJsonp:"WoltLabSuite/Core/Ajax/Jsonp",AjaxRequest:"WoltLabSuite/Core/Ajax/Request",CallbackList:"WoltLabSuite/Core/CallbackList",ColorUtil:"WoltLabSuite/Core/ColorUtil",Core:"WoltLabSuite/Core/Core",DateUtil:"WoltLabSuite/Core/Date/Util",Devtools:"WoltLabSuite/Core/Devtools",Dictionary:"WoltLabSuite/Core/Dictionary","Dom/ChangeListener":"WoltLabSuite/Core/Dom/Change/Listener","Dom/Traverse":"WoltLabSuite/Core/Dom/Traverse","Dom/Util":"WoltLabSuite/Core/Dom/Util",Environment:"WoltLabSuite/Core/Environment",EventHandler:"WoltLabSuite/Core/Event/Handler",EventKey:"WoltLabSuite/Core/Event/Key",Language:"WoltLabSuite/Core/Language",List:"WoltLabSuite/Core/List",ObjectMap:"WoltLabSuite/Core/ObjectMap",Permission:"WoltLabSuite/Core/Permission",StringUtil:"WoltLabSuite/Core/StringUtil","Ui/Alignment":"WoltLabSuite/Core/Ui/Alignment","Ui/CloseOverlay":"WoltLabSuite/Core/Ui/CloseOverlay","Ui/Confirmation":"WoltLabSuite/Core/Ui/Confirmation","Ui/Dialog":"WoltLabSuite/Core/Ui/Dialog","Ui/Notification":"WoltLabSuite/Core/Ui/Notification","Ui/ReusableDropdown":"WoltLabSuite/Core/Ui/Dropdown/Reusable","Ui/Screen":"WoltLabSuite/Core/Ui/Screen","Ui/Scroll":"WoltLabSuite/Core/Ui/Scroll","Ui/SimpleDropdown":"WoltLabSuite/Core/Ui/Dropdown/Simple","Ui/TabMenu":"WoltLabSuite/Core/Ui/TabMenu",Upload:"WoltLabSuite/Core/Upload",User:"WoltLabSuite/Core/User"}},waitSeconds:0}),define("jquery",[],(function(){return window.jQuery})),define("require.config",(function(){})),function(e,t){var n;e.elAttr=function(e,t,n){if(void 0===n)return e.getAttribute(t)||"";e.setAttribute(t,n)},e.elAttrBool=function(e,t){var n=elAttr(e,t);return"1"===n||"true"===n},e.elByClass=function(e,n){return(n||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,n){return(n||t).querySelector(e)},e.elBySelAll=function(e,n,o){var i=(n||t).querySelectorAll(e);return"function"==typeof o&&Array.prototype.forEach.call(i,o),i},e.elByTag=function(e,n){return(n||t).getElementsByTagName(e)},e.elCreate=function(e){return t.createElement(e)},e.elClosest=function(e,t){if(!(e instanceof Node))throw new TypeError("Provided element is not a Node.");return e.nodeType===Node.TEXT_NODE&&null===(e=e.parentNode)?null:("string"!=typeof t&&(t=""),0===t.length?e:e.closest(t))},e.elData=function(e,t,n){if(t="data-"+t,void 0===n)return e.getAttribute(t)||"";e.setAttribute(t,n)},e.elDataBool=function(e,t){var n=elData(e,t);return"1"===n||"true"===n},e.elHide=function(e){e.style.setProperty("display","none","")},e.elIsHidden=function(e){return"none"===e.style.getPropertyValue("display")},e.elInnerError=function(e,t,n){var o,i,r,a=e.parentNode;if(null===a)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(null!=t&&!1!==t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}return i=e,(o=a).classList.contains("inputAddon")&&(o=a.parentElement,i=a),null!==(r=i.nextElementSibling)&&"SMALL"===r.nodeName&&r.classList.contains("innerError")||(""===t?r=null:((r=elCreate("small")).className="innerError",o.insertBefore(r,i.nextSibling))),""===t?null!==r&&(a.removeChild(r),r=null):r[n?"innerHTML":"textContent"]=t,r},e.elRemove=function(e){e.parentNode.removeChild(e)},e.elShow=function(e){e.style.removeProperty("display")},e.elToggle=function(e){"none"===e.style.getPropertyValue("display")?elShow(e):elHide(e)},e.forEach=function(e,t){for(var n=0,o=e.length;ne.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[n,o]=e.split(/=/,2);return decodeURIComponent(o.trim())}})}(window,document),define("wcf.globalHelper",(function(){})),function(e){function t(e,t){return e!==n&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,o){return e[n]=t?t(n,o):o}}var n="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};"function"==typeof define&&define.amd?define("tslib",["exports"],(function(o){e(t(n,t(o)))})):"object"==typeof module&&"object"==typeof module.exports?e(t(n,t(module.exports))):e(t(n))}((function(e){var t,n,o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])};__extends=function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},__assign=Object.assign||function(e){var t,n,o,i;for(n=1,o=arguments.length;n=0;r--)(i=e[r])&&(s=(a<3?i(s):a>3?i(t,n,s):i(t,n))||s);return a>3&&s&&Object.defineProperty(t,n,s),s},__param=function(e,t){return function(n,o){t(n,o,e)}},__esDecorate=function(e,t,n,o,i,r){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}var s,l,c,d,u,p=o.kind,h="getter"===p?"get":"setter"===p?"set":"value",m=!t&&e?o.static?e:e.prototype:null,f=t||(m?Object.getOwnPropertyDescriptor(m,o.name):{}),g=!1;for(l=n.length-1;l>=0;l--){for(d in c={},o)c[d]="access"===d?{}:o[d];for(d in o.access)c.access[d]=o.access[d];if(c.addInitializer=function(e){if(g)throw new TypeError("Cannot add initializers after decoration has completed");r.push(a(e||null))},u=(0,n[l])("accessor"===p?{get:f.get,set:f.set}:f[h],c),"accessor"===p){if(void 0===u)continue;if(null===u||"object"!=typeof u)throw new TypeError("Object expected");(s=a(u.get))&&(f.get=s),(s=a(u.set))&&(f.set=s),(s=a(u.init))&&i.unshift(s)}else(s=a(u))&&("field"===p?i.unshift(s):f[h]=s)}m&&Object.defineProperty(m,o.name,f),g=!0},__runInitializers=function(e,t,n){var o,i=arguments.length>2;for(o=0;o0&&r[r.length-1])||6!==n[0]&&2!==n[0])){s=0;continue}if(3===n[0]&&(!r||n[1]>r[0]&&n[1]=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(e,t){var n,o,i,r,a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;n=a.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(o=n.next()).done;)i.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(a=n.return)&&a.call(n)}finally{if(r)throw r.error}}return i},__spread=function(){for(var e=[],t=0;t1||i(e,t)}))})}function i(e,t){try{(n=c[e](t)).value instanceof __await?Promise.resolve(n.value.v).then(r,a):s(d[0][2],n)}catch(e){s(d[0][3],e)}var n}function r(e){i("next",e)}function a(e){i("throw",e)}function s(e,t){e(t),d.shift(),d.length&&i(d[0][0],d[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,c=n.apply(e,t||[]),d=[];return l={},o("next"),o("throw"),o("return"),l[Symbol.asyncIterator]=function(){return this},l},__asyncDelegator=function(e){function t(t,i){n[t]=e[t]?function(n){return(o=!o)?{value:__await(e[t](n)),done:!1}:i?i(n):n}:i}var n,o;return n={},t("next"),t("throw",(function(e){throw e})),t("return"),n[Symbol.iterator]=function(){return this},n},__asyncValues=function(e){function t(t){n[t]=e[t]&&function(n){return new Promise((function(o,i){!function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)}(o,i,(n=e[t](n)).done,n.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=e[Symbol.asyncIterator];return o?o.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),n={},t("next"),t("throw"),t("return"),n[Symbol.asyncIterator]=function(){return this},n)},__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},t=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},__importStar=function(e){var n,o;if(e&&e.__esModule)return e;if(n={},null!=e)for(o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&__createBinding(n,e,o);return t(n,e),n},__importDefault=function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet=function(e,t,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)},__classPrivateFieldSet=function(e,t,n,o,i){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?i.call(e,n):i?i.value=n:t.set(e,n),n},__classPrivateFieldIn=function(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)},__addDisposableResource=function(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");o=t[Symbol.asyncDispose]}if(void 0===o){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");o=t[Symbol.dispose]}if("function"!=typeof o)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:o,async:n})}else n&&e.stack.push({async:!0});return t},n="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var o=new Error(n);return o.name="SuppressedError",o.error=e,o.suppressed=t,o},__disposeResources=function(e){function t(t){e.error=e.hasError?new n(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(var o,i;e.stack.length;){o=e.stack.pop();try{if(i=o.dispose&&o.dispose.call(o.value),o.async)return Promise.resolve(i).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()},e("__extends",__extends),e("__assign",__assign),e("__rest",__rest),e("__decorate",__decorate),e("__param",__param),e("__esDecorate",__esDecorate),e("__runInitializers",__runInitializers),e("__propKey",__propKey),e("__setFunctionName",__setFunctionName),e("__metadata",__metadata),e("__awaiter",__awaiter),e("__generator",__generator),e("__exportStar",__exportStar),e("__createBinding",__createBinding),e("__values",__values),e("__read",__read),e("__spread",__spread),e("__spreadArrays",__spreadArrays),e("__spreadArray",__spreadArray),e("__await",__await),e("__asyncGenerator",__asyncGenerator),e("__asyncDelegator",__asyncDelegator),e("__asyncValues",__asyncValues),e("__makeTemplateObject",__makeTemplateObject),e("__importStar",__importStar),e("__importDefault",__importDefault),e("__classPrivateFieldGet",__classPrivateFieldGet),e("__classPrivateFieldSet",__classPrivateFieldSet),e("__classPrivateFieldIn",__classPrivateFieldIn),e("__addDisposableResource",__addDisposableResource),e("__disposeResources",__disposeResources)})),define("WoltLabSuite/Core/Ajax/Status",["require","exports"],(function(e,t){"use strict";function n(){return void 0===i&&(i=new o),i}Object.defineProperty(t,"__esModule",{value:!0}),t.hide=t.show=void 0;class o{_activeRequests=0;_overlay;_timer=null;constructor(){this._overlay=document.createElement("div"),this._overlay.classList.add("spinner"),this._overlay.setAttribute("role","status");const e=document.createElement("woltlab-core-loading-indicator");e.size=48,this._overlay.append(e),document.body.append(this._overlay)}show(){this._activeRequests++,null===this._timer&&(this._timer=window.setTimeout((()=>{this._activeRequests&&this._overlay.classList.add("active"),this._timer=null}),250))}hide(){0==--this._activeRequests&&(null!==this._timer&&(window.clearTimeout(this._timer),this._timer=null),this._overlay.classList.remove("active"))}}let i;t.show=function(){n().show()},t.hide=function(){n().hide()}})),define("WoltLabSuite/Core/Core",["require","exports"],(function(e,t){"use strict";function n(e){return r(e)}function o(e,...t){const r=n(e=e||{});for(let n=0,a=t.length;n{Array.isArray(a[t])||"object"!=typeof a[t]?r[t]=a[t]:i(a[t])?r[t]=o(e[t],a[t]):r[t]=a[t]}))}return r}function i(e){return"object"==typeof e&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}Object.defineProperty(t,"__esModule",{value:!0}),t.getXsrfToken=t.enableLegacyInheritance=t.debounce=t.stringToBool=t.getStoragePrefix=t.triggerEvent=t.serialize=t.getUuid=t.getType=t.isPlainObject=t.inherit=t.extend=t.convertLegacyUrl=t.clone=void 0;const r=function(e){return"object"==typeof e&&(Array.isArray(e)||i(e))?a(e):e},a=function(e){if(!e)return null;if(Array.isArray(e))return e.slice();const t={};return Object.keys(e).forEach((n=>t[n]=r(e[n]))),t},s="wsc"+window.WCF_PATH.hashCode()+"-";t.clone=n,t.convertLegacyUrl=function(e){return e.replace(/^index\.php\/(.*?)\/\?/,((e,t)=>{const n=t.split(/([A-Z][a-z0-9]+)/);t="";for(let e=0,o=n.length;e{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},t.serialize=function e(t,n){if(null===t)return"";const o=[];return Object.keys(t).forEach((i=>{const r=n?n+"["+i+"]":i,a=t[i];"object"==typeof a?o.push(e(a,r)):o.push(encodeURIComponent(r)+"="+encodeURIComponent(a))})),o.join("&")},t.triggerEvent=function(e,t){if("click"===t&&e instanceof HTMLElement)return void e.click();const n=new Event(t,{bubbles:!0,cancelable:!0});e.dispatchEvent(n)},t.getStoragePrefix=function(){return s},t.stringToBool=function(e){return"1"===e||"true"===e},t.debounce=function(e,t=50,n={isImmediate:!1}){let o;return function(...i){const r=n.isImmediate&&void 0===o;void 0!==o&&clearTimeout(o),o=setTimeout((()=>{o=void 0,n.isImmediate||e.apply(this,i)}),t),r&&e.apply(this,i)}},t.enableLegacyInheritance=function(e){console.error("Relying on the legacy inheritance is no longer supported. Please migrate your code to use ES6 classes and inheritance.",e)},t.getXsrfToken=function(){const e=document.cookie.split(";").map((e=>e.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[t,n]=e.split(/=/,2);return decodeURIComponent(n.trim())}})),define("WoltLabSuite/Core/CallbackList",["require","exports"],(function(e,t){"use strict";return class{_callbacks=new Map;add(e,t){if("function"!=typeof t)throw new TypeError("Expected a valid callback as second argument for identifier '"+e+"'.");this._callbacks.has(e)||this._callbacks.set(e,[]),this._callbacks.get(e).push(t)}remove(e){this._callbacks.delete(e)}forEach(e,t){null===e?this._callbacks.forEach(((e,n)=>{e.forEach(t)})):this._callbacks.get(e)?.forEach(t)}}})),define("WoltLabSuite/Core/Dom/Change/Listener",["require","exports","tslib","../../CallbackList"],(function(e,t,n,o){"use strict";const i=new((o=n.__importDefault(o)).default);let r=!1;return{add:i.add.bind(i),remove:i.remove.bind(i),trigger(){if(!r)try{r=!0,i.forEach(null,(e=>e()))}finally{r=!1}}}})),define("WoltLabSuite/Core/Language",["require","exports"],(function(e,t){"use strict";function n(e,t={}){return window.WoltLabLanguage.getPhrase(e,t)}function o(e,t){window.WoltLabLanguage.registerPhrase(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.addObject=t.add=t.get=t.registerPhrase=t.getPhrase=void 0,t.getPhrase=n,t.registerPhrase=o,t.get=function(e,t={}){return n(e,t)},t.add=function(e,t){o(e,t)},t.addObject=function(e){Object.entries(e).forEach((([e,t])=>{o(e,t)}))}})),define("WoltLabSuite/Core/Component/Dialog/Controls",["require","exports","tslib","../../Language"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogControls=void 0,o=n.__importStar(o);class i{#e;constructor(e){this.#e=e}asAlert(e){const t={cancel:void 0,extra:void 0,isAlert:!0,primary:e?.primary||o.get("wcf.dialog.button.primary")};return this.#e.attachControls(t),this.#e}asConfirmation(e){const t={cancel:"",extra:void 0,isAlert:!0,primary:e?.primary||o.get("wcf.dialog.button.primary.confirm")};return this.#e.attachControls(t),this.#e}asPrompt(e){const t={cancel:"",extra:e?.extra,isAlert:!1,primary:e?.primary||o.get("wcf.dialog.button.primary.submit")};return this.#e.attachControls(t),this.#e}withoutControls(){return this.#e}}t.DialogControls=i,t.default=i})),define("WoltLabSuite/Core/StringUtil",["require","exports"],(function(e,t){"use strict";function n(e,t){const n=t?-t:2;return e.toLocaleString(document.documentElement.lang,{maximumFractionDigits:n}).replace("-","−")}function o(e){return String(e).substring(0,1).toUpperCase()+e.substring(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.toCamelCase=t.shortUnit=t.unescapeHTML=t.ucfirst=t.lcfirst=t.formatNumeric=t.escapeRegExp=t.escapeHTML=t.addThousandsSeparator=void 0,t.addThousandsSeparator=function(e){return e.toLocaleString(document.documentElement.lang)},t.escapeHTML=function(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")},t.escapeRegExp=function(e){return String(e).replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")},t.formatNumeric=n,t.lcfirst=function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},t.ucfirst=o,t.unescapeHTML=function(e){return String(e).replace(/"/g,'"').replace(/'/g,"'").replace(/</g,"<").replace(/>/g,">").replace(/&/g,"&")},t.shortUnit=function(e){let t="";return e>=1e6?((e/=1e6)>10&&(e=Math.floor(e)),t="M"):e>=1e3&&((e/=1e3)>10&&(e=Math.floor(e)),t="k"),n(e,-1)+t},t.toCamelCase=function(e){return e.includes("-")?e.split("-").map(((e,t)=>(t>0&&(e=o(e)),e))).join(""):e}})),define("WoltLabSuite/Core/Dom/Util",["require","exports","tslib","../StringUtil"],(function(e,t,n,o){"use strict";function i(e,t,n){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");let o,i=e;const r=n+"Sibling";for(;null!==i&&i!==t;){if(null!==i[n+"ElementSibling"])return!1;if(i[r])for(o=i[r];o;){if(""!==o.textContent.trim())return!1;o=o[r]}i=i.parentNode}return!0}o=n.__importStar(o);let r=0;const a={createFragmentFromHtml(e){const t=document.createElement("div");a.setInnerHtml(t,e);const n=document.createDocumentFragment();for(;t.childNodes.length;)n.appendChild(t.childNodes[0]);return n},getUniqueId(){let e;do{e="wcf"+r++}while(null!==document.getElementById(e));return e},escapeAttributeSelector:e=>e.replace(/(["\\])/g,"\\$1"),identify(e){if(!(e instanceof Element))throw new TypeError("Expected a valid DOM element as argument.");let t=e.id;return t||(t=a.getUniqueId(),e.id=t),t},outerHeight(e,t){t=t||window.getComputedStyle(e);let n=e.offsetHeight;return n+=~~t.marginTop+~~t.marginBottom,n},outerWidth(e,t){t=t||window.getComputedStyle(e);let n=e.offsetWidth;return n+=~~t.marginLeft+~~t.marginRight,n},outerDimensions(e){const t=window.getComputedStyle(e);return{height:a.outerHeight(e,t),width:a.outerWidth(e,t)}},offset(e){const t=e.getBoundingClientRect();return{top:Math.round(t.top+(window.scrollY||window.pageYOffset)),left:Math.round(t.left+(window.scrollX||window.pageXOffset))}},prepend(e,t){t.insertAdjacentElement("afterbegin",e)},insertAfter(e,t){t.insertAdjacentElement("afterend",e)},setStyles(e,t){let n=!1;Object.keys(t).forEach((o=>{/ !important$/.test(t[o])?(n=!0,t[o]=t[o].replace(/ !important$/,"")):n=!1,"important"!==e.style.getPropertyPriority(o)||n||e.style.removeProperty(o),e.style.setProperty(o,t[o],n?"important":"")}))},styleAsInt(e,t){const n=e.getPropertyValue(t);return null===n?0:parseInt(n,10)},setInnerHtml(e,t){let n;e.innerHTML=t,n=e instanceof HTMLTemplateElement?e.content:e;const o=n.querySelectorAll("script");for(let e=0,t=o.length;ee.contains(t),getDataAttributes(e,t,n,i){0!==(t=t||"").indexOf("data-")&&(t="data-"+t),n=!0===n,i=!0===i;const r={};for(let a=0,s=e.attributes.length;ai(e,t,"previous"),isAtNodeEnd:(e,t)=>i(e,t,"next"),getFixedParent(e){for(;e&&e!==document.body;){if("fixed"===window.getComputedStyle(e).getPropertyValue("position"))return e;e=e.offsetParent}return null},hide(e){e.style.setProperty("display","none","")},show(e){e.style.removeProperty("display")},isHidden:e=>"none"===e.style.getPropertyValue("display"),toggle(e){a.isHidden(e)?a.show(e):a.hide(e)},innerError(e,t,n){const o=e.parentNode;if(null===o)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The error message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let i=o,r=e;i.classList.contains("inputAddon")&&(i=o.parentElement,r=o);let a=r.nextElementSibling;return null!==a&&"SMALL"===a.nodeName&&a.classList.contains("innerError")||(""===t?a=null:(a=document.createElement("small"),a.className="innerError",i.insertBefore(a,r.nextSibling))),""===t?null!==a&&(a.remove(),a=null):n?a.innerHTML=t:a.textContent=t,a},innerSuccess(e,t,n){const o=e.parentNode;if(null===o)throw new Error("Only elements that have a parent element or document are valid.");if("string"!=typeof t){if(t)throw new TypeError("The message must be a string; `false`, `null` or `undefined` can be used as a substitute for an empty string.");t=""}let i=e.nextElementSibling;return null!==i&&"SMALL"===i.nodeName&&i.classList.contains("innerSuccess")||(""===t?i=null:(i=document.createElement("small"),i.className="innerSuccess",o.insertBefore(i,e.nextSibling))),""===t?null!==i&&(i.remove(),i=null):n?i.innerHTML=t:i.textContent=t,i},closest:(e,t)=>(e instanceof HTMLElement?e:e.parentElement).closest(t),getClosestElement:e=>e instanceof HTMLElement?e:e.parentElement};return window.bc_wcfDomUtil=a,a})),define("WoltLabSuite/Core/Ajax/Error",["require","exports","tslib","../Component/Dialog","../Core","../Language","../StringUtil"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerGlobalRejectionHandler=t.InvalidJson=t.ExpectedJson=t.StatusNotOk=t.ConnectionError=t.ApiError=void 0,i=n.__importStar(i),r=n.__importStar(r);class s extends Error{name="ApiError"}t.ApiError=s;class l extends s{originalError;constructor(e){let t="Unknown error";e instanceof Error&&(t=e.message),super(t),this.name="ConnectionError",this.originalError=e}}t.ConnectionError=l;class c extends s{response;constructor(e){super("The API request returned a status code outside of the 200-299 range."),this.name="StatusNotOk",this.response=e}}t.StatusNotOk=c;class d extends s{response;constructor(e){super("The API did not return a JSON response."),this.name="ExpectedJson",this.response=e}}t.ExpectedJson=d;class u extends s{response;constructor(e){super("Failed to decode the JSON response from the API."),this.name="InvalidJson",this.response=e}}t.InvalidJson=u;let p=!1;t.registerGlobalRejectionHandler=function(){p||(window.addEventListener("unhandledrejection",(e=>{e.reason instanceof s&&(e.preventDefault(),async function(e){const t=await async function(e){let t="",n="";if(e instanceof l)n=e.originalError instanceof TypeError?r.get("wcf.global.error.ajax.network",{message:e.message}):e.message;else if(e instanceof u)n=await e.response.clone().text();else if(e instanceof d||e instanceof c){let o;try{o=await e.response.clone().json()}catch(t){n=await e.response.clone().text()}if(o&&i.isPlainObject(o)&&Object.keys(o).length>0)o.returnValues&&o.returnValues.description&&(t+=`

    Description:

    ${o.returnValues.description}

    `),o.file&&o.line&&(t+=`

    File:

    ${o.file} in line ${o.line}

    `),o.exception?t+=`
    Exception:
    ${(0,a.escapeHTML)(o.exception)}
    `:o.stacktrace?t+=`

    Stacktrace:

    ${o.stacktrace}

    `:o.exceptionID&&(t+=`

    Exception ID: ${o.exceptionID}

    `),n=o.message,o.previous&&o.previous.forEach((e=>{t+=`

    ${e.message}

    `,t+=`

    Stacktrace

    ${e.stacktrace}

    `}));else if(void 0===o){const e=document.createElement("iframe");return e.classList.add("dialog__iframe"),e.srcdoc=n,e}}if(!n||"undefined"===n){if(!window.ENABLE_DEBUG_MODE)return"";n="fetch() failed without a response body. Check your browser console."}return`

    ${n}

    ${t}
    `}(e);if(t instanceof HTMLIFrameElement){const e=(0,o.dialogFactory)().fromHtml(`
    ${t.outerHTML}
    `).asAlert();e.show(r.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else""!==t&&(0,o.dialogFactory)().fromHtml(t).asAlert().show(r.get("wcf.global.error.title"))}(e.reason))})),p=!0)}})),define("WoltLabSuite/Core/Ajax/Backend",["require","exports","tslib","./Status","./Error","../Core"],(function(e,t,n,o,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareRequest=void 0,o=n.__importStar(o);class a{url;constructor(e){this.url=e}get(){return new c(this.url,0)}post(e){return new l(this.url,1,e)}}let s=!1;window.addEventListener("unload",(()=>s=!0));class l{#t;#n;#o;#i;#r=!0;#a=!1;constructor(e,t,n){this.#t=e,this.#n=t,this.#o=n}getAbortController(){return void 0===this.#i&&(this.#i=new AbortController),this.#i}disableLoadingIndicator(){return this.#r=!1,this}allowCaching(){return this.#a=!0,this}async fetchAsJson(){const e=await this.#s({headers:{accept:"application/json"}});if(void 0===e)return;const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new i.ExpectedJson(e);let n;try{n=await e.json()}catch(t){throw new i.InvalidJson(e)}return n}async fetchAsResponse(){return this.#s()}async#s(t={}){(0,i.registerGlobalRejectionHandler)();const a=(0,r.extend)({headers:{"X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":(0,r.getXsrfToken)()},mode:"same-origin",credentials:"same-origin",cache:this.#a?"default":"no-store",redirect:"error"},t);1===this.#n?(a.method="POST",this.#o&&(this.#o instanceof FormData?(a.headers["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8",a.body=this.#o):(a.headers["Content-Type"]="application/json; charset=UTF-8",a.body=JSON.stringify(this.#o)))):a.method="GET",this.#i&&(a.signal=this.#i.signal);const l=this.#r;l&&o.show();try{const t=await fetch(this.#t,a);if(!t.ok)throw new i.StatusNotOk(t);return"yes"===t.headers.get("woltlab-background-queue-check")&&new Promise(((t,n)=>{e(["../BackgroundQueue"],t,n)})).then(n.__importStar).then((e=>e.invoke())),t}catch(e){if(e instanceof i.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new i.ConnectionError(e)}finally{l&&o.hide()}}}class c extends l{allowCaching(){return super.allowCaching(),this}}t.prepareRequest=function(e){return new a(e)}})),define("WoltLabSuite/Core/Devtools",["require","exports"],(function(e,t){"use strict";function n(){window.sessionStorage&&window.sessionStorage.setItem("__wsc_devtools_config",JSON.stringify(o))}let o={editorAutosave:!0,editorInspector:!1,eventLogging:!1};const i={help(){window.console.log(""),window.console.log("%cAvailable commands:","text-decoration: underline"),Object.keys(i).filter((e=>"_internal_"!==e)).sort().forEach((e=>{window.console.log(`\tDevtools.${e}()`)})),window.console.log("")},toggleEditorAutosave(e){o.editorAutosave=!e&&!o.editorAutosave,n(),window.console.log("%c\tEditor autosave "+(o.editorAutosave?"enabled":"disabled"),"font-style: italic")},toggleEditorInspector(e){o.editorInspector=!!e||!o.editorInspector,n(),window.console.log("%c\tEditor inspector "+(o.editorInspector?"enabled":"disabled"),"font-style: italic")},toggleEventLogging(e){o.eventLogging=!!e||!o.eventLogging,n(),window.console.log("%c\tEvent logging "+(o.eventLogging?"enabled":"disabled"),"font-style: italic")},_internal_:{enable(){if(window.Devtools=i,window.console.log("%cDevtools for WoltLab Suite loaded","font-weight: bold"),window.sessionStorage){const e=window.sessionStorage.getItem("__wsc_devtools_config");try{null!==e&&(o=JSON.parse(e))}catch(e){}o.editorAutosave||i.toggleEditorAutosave(!0),o.editorInspector&&i.toggleEditorInspector(!0),o.eventLogging&&i.toggleEventLogging(!0)}window.console.log("Settings are saved per browser session, enter `Devtools.help()` to learn more."),window.console.log("")},editorAutosave:()=>o.editorAutosave,editorInspector:()=>o.editorInspector,eventLog(e,t){o.eventLogging&&window.console.log("[Devtools.EventLogging] Firing event: "+t+" @ "+e)}}};return i})),define("WoltLabSuite/Core/Event/Handler",["require","exports","tslib","../Core","../Devtools"],(function(e,t,n,o,i){"use strict";function r(e,t){"string"!=typeof t&&(t=void 0);const n=a.get(e);void 0!==n&&(void 0===t?a.delete(e):n.delete(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeAllBySuffix=t.removeAll=t.remove=t.fire=t.add=void 0,o=n.__importStar(o),i=n.__importDefault(i);const a=new Map;t.add=function(e,t,n){if("function"!=typeof n)throw new TypeError(`Expected a valid callback for '${t}'@'${e}'.`);let i=a.get(e);void 0===i&&(i=new Map,a.set(e,i));let r=i.get(t);void 0===r&&(r=new Map,i.set(t,r));const s=o.getUuid();return r.set(s,n),s},t.fire=function(e,t,n){i.default._internal_.eventLog(e,t),n=n||{},a.get(e)?.get(t)?.forEach((e=>e(n)))},t.remove=function(e,t,n){a.get(e)?.get(t)?.delete(n)},t.removeAll=r,t.removeAllBySuffix=function(e,t){const n=a.get(e);if(void 0===n)return;const o=-1*(t="_"+t).length;n.forEach(((n,i)=>{i.substr(o)===t&&r(e,i)}))}})),define("WoltLabSuite/Core/Form/Builder/Field/Field",["require","exports"],(function(e,t){"use strict";return class{_fieldId;_field;constructor(e){this.init(e)}init(e){this._fieldId=e,this._readField()}_getData(){throw new Error("Missing implementation of WoltLabSuite/Core/Form/Builder/Field/Field._getData!")}_readField(){if(this._field=document.getElementById(this._fieldId),null===this._field)throw new Error("Unknown field with id '"+this._fieldId+"'.")}destroy(){}getData(){return Promise.resolve(this._getData())}getId(){return this._fieldId}}})),define("WoltLabSuite/Core/Form/Builder/Field/Dependency/Manager",["require","exports","tslib","../../../../Dom/Util","../../../../Event/Handler"],(function(e,t,n,o,i){"use strict";function r(){!0!==p?(p=!0,h=!1,i.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),p=!1,h&&r()):h=!0}function a(){const e=[];d.forEach(((t,n)=>{const i=document.getElementById(n);if(null===i)return void e.push(n);let r=!0;var a;t.forEach((e=>{var t;e.checkDependency()||(t=i,o.default.hide(t),s.add(t),t.classList.contains("tabMenuContent")&&t.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===t.dataset.name&&o.default.hide(e)})),t.querySelectorAll("[max], [maxlength], [min], [required]").forEach((e=>{const t=new Map,n=e.getAttribute("max");n&&(t.set("max",n),e.removeAttribute("max"));const o=e.getAttribute("maxlength");o&&(t.set("maxlength",o),e.removeAttribute("maxlength"));const i=e.getAttribute("min");i&&(t.set("min",i),e.removeAttribute("min")),e.required&&(t.set("required","true"),e.removeAttribute("required")),u.set(e,t)})),r=!1)})),r&&(a=i,o.default.show(a),s.delete(a),a.classList.contains("tabMenuContent")&&a.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===a.dataset.name&&o.default.show(e)})),a.querySelectorAll("input, select").forEach((e=>{let t=e.parentNode;for(;t!==a&&!o.default.isHidden(t);)t=t.parentNode;if(t===a&&u.has(e)){const t=u.get(e);t.has("max")&&e.setAttribute("max",t.get("max")),t.has("maxlength")&&e.setAttribute("maxlength",t.get("maxlength")),t.has("min")&&e.setAttribute("min",t.get("min")),t.has("required")&&e.setAttribute("required",""),u.delete(e)}})))})),e.forEach((e=>d.delete(e))),r()}Object.defineProperty(t,"__esModule",{value:!0}),t.unregister=t.register=t.isHiddenByDependencies=t.checkDependencies=t.checkContainers=t.addDependency=t.addContainerCheckCallback=void 0,o=n.__importDefault(o),i=n.__importStar(i);const s=new Set,l=new Map,c=new WeakSet,d=new Map,u=new WeakMap;let p=!1,h=!0;t.addContainerCheckCallback=function(e){if("function"!=typeof e)throw new TypeError("Expected a valid callback for parameter 'callback'.");i.add("com.woltlab.wcf.form.builder.dependency","checkContainers",e)},t.addDependency=function(e){const t=e.getDependentNode();d.has(t.id)?d.get(t.id).push(e):d.set(t.id,[e]),e.getFields().forEach((e=>{const t=o.default.identify(e);l.has(t)||(l.set(t,e),"INPUT"!==e.tagName||"checkbox"!==e.type&&"radio"!==e.type&&"hidden"!==e.type?e.addEventListener("input",(()=>a())):e.addEventListener("change",(()=>a())))}))},t.checkContainers=r,t.checkDependencies=a,t.isHiddenByDependencies=function(e){if(s.has(e))return!0;let t=!1;return s.forEach((n=>{n.contains(e)&&(t=!0)})),t},t.register=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(c.has(t))throw new Error("Form with id '"+e+"' has already been registered.");c.add(t)},t.unregister=function(e){const t=document.getElementById(e);if(null===t)throw new Error("Unknown element with id '"+e+"'");if(!c.has(t))throw new Error("Form with id '"+e+"' has not been registered.");c.delete(t),s.forEach((e=>{t.contains(e)&&s.delete(e)})),d.forEach(((e,n)=>{t.contains(document.getElementById(n))&&d.delete(n),e.forEach((e=>{e.getFields().forEach((e=>{l.delete(e.id),u.delete(e)}))}))}))}})),define("WoltLabSuite/Core/Form/Builder/Manager",["require","exports","tslib","../../Core","../../Event/Handler","./Field/Field","./Field/Dependency/Manager"],(function(e,t,n,o,i,r,a){"use strict";function s(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return c.get(e).has(t)}function l(e){return d.has(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.unregisterForm=t.registerForm=t.registerField=t.hasForm=t.hasField=t.getForm=t.getField=t.getData=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importStar(a);const c=new Map,d=new Map;t.getData=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");const t=[];return c.get(e).forEach((e=>{const n=e.getData();if(!(n instanceof Promise))throw new TypeError("Data for field with id '"+e.getId()+"' is no promise.");t.push(n)})),Promise.all(t).then((e=>e.reduce(((e,t)=>o.extend(e,t)),{})))},t.getField=function(e,t){if(!s(e,t))throw new Error("Unknown field with id '"+e+"' for form with id '"+t+"'.");return c.get(e).get(t)},t.getForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");return d.get(e)},t.hasField=s,t.hasForm=l,t.registerField=function(e,t){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");if(!(t instanceof r.default))throw new Error("Add field is no instance of 'WoltLabSuite/Core/Form/Builder/Field/Field'.");const n=t.getId();if(s(e,n))throw new Error("Form field with id '"+n+"' has already been registered for form with id '"+e+"'.");c.get(e).set(n,t),i.fire("WoltLabSuite/Core/Form/Builder/Manager","registerField",{field:t,formId:e})},t.registerForm=function(e){if(l(e))throw new Error("Form with id '"+e+"' has already been registered.");const t=document.getElementById(e);if(null===t)throw new Error("Unknown form with id '"+e+"'.");d.set(e,t),c.set(e,new Map),i.fire("WoltLabSuite/Core/Form/Builder/Manager","registerForm",{formId:e})},t.unregisterForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");i.fire("WoltLabSuite/Core/Form/Builder/Manager","beforeUnregisterForm",{formId:e}),d.delete(e),c.get(e).forEach((function(e){e.destroy()})),c.delete(e),a.unregister(e),i.fire("WoltLabSuite/Core/Form/Builder/Manager","afterUnregisterForm",{formId:e})}})),define("WoltLabSuite/Core/Component/FormBuilder/Setup",["require","exports","tslib","../../Ajax/Backend","../../Dom/Util","../../Form/Builder/Manager"],(function(e,t,n,o,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormBuilderSetup=void 0,i=n.__importStar(i),r=n.__importStar(r);class a{async fromEndpoint(t){const a=await(0,o.prepareRequest)(t).get().fetchAsJson(),{dialogFactory:s}=await new Promise(((t,n)=>{e(["../Dialog"],t,n)})).then(n.__importStar),l=s().fromHtml(a.dialog).asPrompt();return new Promise((e=>{l.addEventListener("validate",(n=>{const s=r.getData(a.formId).then((async n=>{n instanceof Promise&&(n=await n);const s=await(0,o.prepareRequest)(t).post(n).fetchAsJson();return"dialog"in s?(r.unregisterForm(a.formId),i.setInnerHtml(l.content,s.dialog),!1):(l.addEventListener("primary",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!0,result:s.result})})),!0)}));n.detail.push(s)})),l.addEventListener("afterClose",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!1,result:void 0})})),l.show(a.title)}))}}t.FormBuilderSetup=a,t.default=a})),define("WoltLabSuite/Core/Component/Dialog/Setup",["require","exports","tslib","./Controls","../../Dom/Util","../FormBuilder/Setup"],(function(e,t,n,o,i,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogSetup=void 0,o=n.__importDefault(o),i=n.__importStar(i),r=n.__importDefault(r);class a{fromElement(e){e instanceof HTMLTemplateElement&&(e=e.content.cloneNode(!0));const t=document.createElement("woltlab-core-dialog");return t.content.append(e),e instanceof HTMLElement&&(e.hidden=!1),new o.default(t)}fromId(e){const t=document.getElementById(e);if(null===t)throw new Error(`Unable to find the element identified by '${e}'.`);return this.fromElement(t)}fromHtml(e){const t=i.createFragmentFromHtml(e);if(0===t.childElementCount&&""===t.textContent.trim())throw new TypeError("The provided HTML string was empty.");return this.fromElement(t)}usingFormBuilder(){return new r.default}withoutContent(){const e=document.createElement("woltlab-core-dialog");return new o.default(e)}}t.DialogSetup=a,t.default=a})),define("WoltLabSuite/Core/Helper/PageOverlay",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPageOverlayContainer=t.releasePageOverlayContainer=t.adoptPageOverlayContainer=void 0;const n=document.createElement("div");n.id="pageOverlayContainer";const o=[];t.adoptPageOverlayContainer=function(e){o.push(e),e.append(n)},t.releasePageOverlayContainer=function(e){if(!o.includes(e))throw new Error("Cannot release the page overlay from a container that (no longer) adopts it.",{cause:{element:e}});const t=o.indexOf(e);if(0===t)throw new Error("Cannot release the page overlay, there is no previous owner.",{cause:{element:e}});t!==o.length-1?o.splice(t,1):(o.pop(),o[o.length-1].append(n))},t.getPageOverlayContainer=function(){return n}})),define("WoltLabSuite/Core/Ui/Screen",["require","exports","tslib","../Core"],(function(e,t,n,o){"use strict";function i(e){return r(e).mql.matches}function r(e){if("string"!=typeof e||""===e.trim())throw new TypeError("Expected a non-empty string for parameter 'query'.");h.has(e)&&(e=h.get(e)),p.has(e)&&(e=p.get(e));let t=s.get(e);return t||(t={callbacksMatch:new Map,callbacksUnmatch:new Map,callbacksSetup:new Map,mql:window.matchMedia(e)},t.mql.addListener(a),s.set(e,t),e!==t.mql.media&&h.set(t.mql.media,e)),t}function a(e){const t=r(e.media);if(e.matches)t.callbacksSetup.size?(t.callbacksSetup.forEach((e=>{e()})),t.callbacksSetup=new Map):t.callbacksMatch.forEach((e=>{e()}));else{if(t.callbacksSetup.size)return;t.callbacksUnmatch.forEach((e=>{e()}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.setDialogContainer=t.pageOverlayIsActive=t.pageOverlayClose=t.pageOverlayOpen=t.scrollEnable=t.scrollDisable=t.is=t.remove=t.on=void 0,o=n.__importStar(o);const s=new Map;let l,c=0,d=0,u=0;const p=new Map(Object.entries({"screen-xs":"(max-width: 544px)","screen-sm":"(min-width: 545px) and (max-width: 768px)","screen-sm-down":"(max-width: 768px)","screen-sm-up":"(min-width: 545px)","screen-sm-md":"(min-width: 545px) and (max-width: 1024px)","screen-md":"(min-width: 769px) and (max-width: 1024px)","screen-md-down":"(max-width: 1024px)","screen-md-up":"(min-width: 769px)","screen-lg":"(min-width: 1025px)","screen-lg-only":"(min-width: 1025px) and (max-width: 1280px)","screen-lg-down":"(max-width: 1280px)","screen-xl":"(min-width: 1281px)"})),h=new Map;t.on=function(e,t){const n=o.getUuid(),i=r(e);return"function"==typeof t.match&&i.callbacksMatch.set(n,t.match),"function"==typeof t.unmatch&&i.callbacksUnmatch.set(n,t.unmatch),"function"==typeof t.setup&&(i.mql.matches?t.setup():i.callbacksSetup.set(n,t.setup)),n},t.remove=function(e,t){const n=r(e);n.callbacksMatch.delete(t),n.callbacksUnmatch.delete(t),n.callbacksSetup.delete(t)},t.is=i,t.scrollDisable=function(){if(0===c){d=document.body.scrollTop,l="body",d||(d=document.documentElement.scrollTop,l="documentElement");const e=document.getElementById("pageContainer");i("screen-md-down")&&(e.style.setProperty("position","relative",""),e.style.setProperty("top",`-${d}px`,"")),document.documentElement.classList.add("disableScrolling")}c++},t.scrollEnable=function(){if(c&&(c--,0===c)){document.documentElement.classList.remove("disableScrolling");const e=document.getElementById("pageContainer");i("screen-md-down")&&(e.style.removeProperty("position"),e.style.removeProperty("top")),d&&(document[l].scrollTop=~~d)}},t.pageOverlayOpen=function(){0===u&&document.documentElement.classList.add("pageOverlayActive"),u++},t.pageOverlayClose=function(){u&&(u--,0===u&&document.documentElement.classList.remove("pageOverlayActive"))},t.pageOverlayIsActive=function(){return u>0},t.setDialogContainer=function(e){}})),define("WoltLabSuite/Core/Element/woltlab-core-dialog",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Language","../Ui/Screen"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogElement=void 0,o=n.__importDefault(o),r=n.__importStar(r);const s=document.createElement("div");class l extends HTMLElement{#l;#e;#c;#d;constructor(){super(),this.#l=document.createElement("div"),this.#e=document.createElement("dialog"),this.#d=document.createElement("div")}show(e){if(0===e.trim().length)throw new Error("Cannot open the modal dialog without a title.");this.#d.textContent=e,this.open||(null===s.parentElement&&document.getElementById("content").append(s),this.parentElement!==s&&s.append(this),this.#e.showModal(),(0,i.adoptPageOverlayContainer)(this.#e),(0,a.scrollDisable)())}close(){this.#e.close(),this.#u()}#u(){if(null===this.parentNode)return;const e=new CustomEvent("afterClose");this.dispatchEvent(e),(0,i.releasePageOverlayContainer)(this.#e),(0,a.scrollEnable)(),this.remove()}get dialog(){return this.#e}get content(){return this.#l}get open(){return this.#e.open}get incomplete(){return this.hasAttribute("incomplete")}set incomplete(e){e?this.setAttribute("incomplete",""):this.removeAttribute("incomplete")}attachControls(e){if(void 0!==this.#c)throw new Error("There is already a form control attached to this dialog.");void 0!==e.extra&&void 0===e.cancel&&(e.cancel="");const t=document.createElement("woltlab-core-dialog-control");t.primary=e.primary,void 0!==e.cancel&&(t.cancel=e.cancel),void 0!==e.extra&&(t.extra=e.extra),this.#c=document.createElement("form"),this.#c.method="dialog",this.#c.classList.add("dialog__form"),this.#l.insertAdjacentElement("beforebegin",this.#c),this.#c.append(this.#l,t),e.isAlert&&(void 0===e.cancel?this.#e.setAttribute("role","alert"):this.#e.setAttribute("role","alertdialog")),this.#c.addEventListener("submit",(e=>{if(this.incomplete)return void e.preventDefault();const t=new CustomEvent("validate",{cancelable:!0,detail:[]});this.dispatchEvent(t),t.defaultPrevented&&e.preventDefault(),t.detail.length>0&&(e.preventDefault(),this.incomplete=!0,Promise.all(t.detail).then((e=>{this.incomplete=!1,e.some((e=>!1===e))||(this.#p(),this.close())})))})),this.#e.addEventListener("close",(()=>{""===this.#e.returnValue||this.#p(),this.#u()})),t.addEventListener("cancel",(()=>{const e=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(e),e.defaultPrevented||this.close()})),void 0!==e.extra&&t.addEventListener("extra",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)}))}#p(){const e=new CustomEvent("primary");this.dispatchEvent(e)}connectedCallback(){if(null!==this.#e.parentElement)return;let e;const t=this.#e.getAttribute("role");"alert"!==t&&"alertdialog"!==t&&(e=document.createElement("button"),e.innerHTML='',e.classList.add("dialog__closeButton","jsTooltip"),e.title=r.get("wcf.dialog.button.close"),e.addEventListener("click",(()=>{this.close()})));const n=document.createElement("div");n.classList.add("dialog__header"),this.#d.classList.add("dialog__title"),n.append(this.#d),e&&n.append(e);const i=document.createElement("div");i.classList.add("dialog__document"),i.setAttribute("role","document"),i.append(n),this.#l.classList.add("dialog__content"),this.#c?i.append(this.#c):i.append(this.#l),this.#e.append(i),this.#e.classList.add("dialog"),this.#e.setAttribute("aria-labelledby",o.default.identify(this.#d)),this.#e.addEventListener("cancel",(()=>{const e=new CustomEvent("cancel");this.dispatchEvent(e),this.#u()})),this.#e.addEventListener("mousedown",(e=>{if(e.target===this.#e){const e=new CustomEvent("backdrop",{cancelable:!0});if(this.dispatchEvent(e),e.defaultPrevented)return;this.#h()&&this.close()}})),this.append(this.#e)}#h(){const e=new CustomEvent("close");return this.dispatchEvent(e),!1===e.defaultPrevented}}t.WoltlabCoreDialogElement=l,window.customElements.define("woltlab-core-dialog",l),t.default=l})),define("WoltLabSuite/Core/Element/woltlab-core-dialog-control",["require","exports","tslib","../Language"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogControlElement=void 0,o=n.__importStar(o);class i extends HTMLElement{#m;#f;#g;set primary(e){this.setAttribute("primary",e)}get primary(){let e=this.getAttribute("primary");return e||(e=o.get("wcf.dialog.button.primary")),e}set cancel(e){void 0===e?this.removeAttribute("cancel"):this.setAttribute("cancel",e)}get cancel(){let e=this.getAttribute("cancel");if(null!==e)return""===e&&(e=o.get("wcf.global.confirmation.cancel")),e}set extra(e){void 0===e?this.removeAttribute("extra"):this.setAttribute("extra",e)}get extra(){const e=this.getAttribute("extra");if(null!==e)return e}connectedCallback(){const e=this.closest("woltlab-core-dialog");this.classList.add("dialog__control"),this.hasAttribute("primary")||this.setAttribute("primary",""),void 0===this.#g&&(this.#g=document.createElement("button"),this.#g.type="submit",this.#g.value="primary",this.#g.autofocus=!0,this.#g.classList.add("button","buttonPrimary","dialog__control__button","dialog__control__button--primary"),this.#g.textContent=this.primary,this.append(this.#g),new MutationObserver((()=>{this.#g.disabled=e.incomplete})).observe(e,{attributeFilter:["incomplete"]}),e.incomplete&&(this.#g.disabled=!0)),void 0===this.#m&&void 0!==this.cancel&&(this.#m=document.createElement("button"),this.#m.type="button",this.#m.value="cancel",this.#m.classList.add("button","dialog__control__button","dialog__control__button--cancel"),this.#m.textContent=this.cancel,this.#m.addEventListener("click",(()=>{const e=new CustomEvent("cancel");this.dispatchEvent(e)})),this.append(this.#m),e.addEventListener("backdrop",(e=>{e.preventDefault(),this.#m.click()}))),void 0===this.#f&&void 0!==this.extra&&(this.#f=document.createElement("button"),this.#f.type="button",this.#f.value="extra",this.#f.classList.add("button","dialog__control__button","dialog__control__button--extra"),this.#f.textContent=this.extra,this.#f.addEventListener("click",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)})),this.append(this.#f))}}t.WoltlabCoreDialogControlElement=i,window.customElements.define("woltlab-core-dialog-control",i),t.default=i})),define("WoltLabSuite/Core/Component/Dialog",["require","exports","./Dialog/Setup","../Element/woltlab-core-dialog","../Element/woltlab-core-dialog-control"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dialogFactory=void 0,t.dialogFactory=function(){return new n.DialogSetup}})),define("WoltLabSuite/Core/Ajax/Request",["require","exports","tslib","./Status","../Core","../Dom/Change/Listener","../Language","../Component/Dialog","../StringUtil"],(function(e,t,n,o,i,r,a,s,l){"use strict";o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importStar(a);let c=!1,d=!1;return class{_options;_data;_previousXhr;_xhr;constructor(e){this._options=i.extend({data:{},contentType:"application/x-www-form-urlencoded; charset=UTF-8",responseType:"application/json",type:"POST",url:"",withCredentials:!1,autoAbort:!1,ignoreError:!1,pinData:!1,silent:!1,includeRequestedWith:!0,failure:null,finalize:null,success:null,progress:null,uploadProgress:null,callbackObject:null},e),"object"==typeof e.callbackObject&&(this._options.callbackObject=e.callbackObject),this._options.url=i.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url),0===this._options.url.indexOf(window.WSC_API_URL)&&(this._options.includeRequestedWith=!0,this._options.withCredentials=!0),this._options.pinData&&(this._data=this._options.data),this._options.callbackObject&&("function"==typeof this._options.callbackObject._ajaxFailure&&(this._options.failure=this._options.callbackObject._ajaxFailure.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxFinalize&&(this._options.finalize=this._options.callbackObject._ajaxFinalize.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxSuccess&&(this._options.success=this._options.callbackObject._ajaxSuccess.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxProgress&&(this._options.progress=this._options.callbackObject._ajaxProgress.bind(this._options.callbackObject)),"function"==typeof this._options.callbackObject._ajaxUploadProgress&&(this._options.uploadProgress=this._options.callbackObject._ajaxUploadProgress.bind(this._options.callbackObject))),c||(c=!0,window.addEventListener("beforeunload",(()=>d=!0)))}sendRequest(e){(e||this._options.autoAbort)&&this.abortPrevious(),this._options.silent||o.show(),this._xhr instanceof XMLHttpRequest&&(this._previousXhr=this._xhr),this._xhr=new XMLHttpRequest,this._xhr.open(this._options.type,this._options.url,!0),this._options.contentType&&this._xhr.setRequestHeader("Content-Type",this._options.contentType),(this._options.withCredentials||this._options.includeRequestedWith)&&this._xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),this._options.responseType&&this._xhr.setRequestHeader("Accept",this._options.responseType),this._options.withCredentials&&(this._xhr.withCredentials=!0);const t=i.clone(this._options),n=this._xhr;if(n.onload=()=>{n.readyState===XMLHttpRequest.DONE&&(n.status>=200&&n.status<300||304===n.status?204===n.status?this._success(n,t):t.responseType&&this.getContentType(n)!==t.responseType?this._failure(n,t):this._success(n,t):this._failure(n,t))},n.onerror=()=>{this._failure(n,t)},this._options.progress&&(n.onprogress=this._options.progress),this._options.uploadProgress&&(n.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){let e=this._options.data;"object"==typeof e&&"FormData"!==i.getType(e)&&(e=i.serialize(e)),n.send(e)}else n.send()}abortPrevious(){this._previousXhr&&(this._previousXhr.abort(),this._previousXhr=void 0,this._options.silent||o.hide())}setOption(e,t){this._options[e]=t}getOption(e){return Object.prototype.hasOwnProperty.call(this._options,e)?this._options[e]:null}setData(e){null!==this._data&&"FormData"!==i.getType(e)&&(e=i.extend(this._data,e)),this._options.data=e}_success(t,i){if(i.silent||o.hide(),"function"==typeof i.success){let o=null;if("application/json"===this.getContentType(t)){try{o=JSON.parse(t.responseText)}catch(e){return void this._failure(t,i)}o&&o.returnValues&&void 0!==o.returnValues.template&&(o.returnValues.template=o.returnValues.template.trim()),"yes"===t.getResponseHeader("woltlab-background-queue-check")&&new Promise(((t,n)=>{e(["../BackgroundQueue"],t,n)})).then(n.__importStar).then((e=>e.invoke()))}i.success(o||{},t.responseText,t,i.data)}this._finalize(i)}_failure(e,t){if(d)return;t.silent||o.hide();let n=null;try{n=JSON.parse(e.responseText)}catch(e){}let i=!0;if("function"==typeof t.failure&&(i=!1!==t.failure(n||{},e.responseText||"",e,t.data)),!0!==t.ignoreError&&i){const t=this.getErrorHtml(n,e);if(t instanceof HTMLIFrameElement){const e=(0,s.dialogFactory)().fromHtml(`
    ${t.outerHTML}
    `).asAlert();e.show(a.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else t&&(0,s.dialogFactory)().fromHtml(t).asAlert().show(a.get("wcf.global.error.title"))}this._finalize(t)}getErrorHtml(e,t){let n,o="";if(null!==e&&Object.keys(e).length>0)e.returnValues&&e.returnValues.description&&(o+=`

    Description:

    ${e.returnValues.description}

    `),e.file&&e.line&&(o+=`

    File:

    ${e.file} in line ${e.line}

    `),e.extraInformation&&(o+="
    ",o+=e.extraInformation.map((([e,t])=>`

    ${e}: ${t.toString()}

    `)).join("")),e.exception?o+=`
    Exception:
    ${(0,l.escapeHTML)(e.exception)}
    `:e.stacktrace?o+=`

    Stacktrace:

    ${e.stacktrace}
    `:e.exceptionID&&(o+=`

    Exception ID: ${e.exceptionID}

    `),n=e.message,e.previous&&e.previous.forEach((e=>{o+=`

    ${e.message}

    `,o+=`

    Stacktrace

    ${e.stacktrace}
    `}));else{if(t.getResponseHeader("content-type")?.startsWith("text/html")){const e=document.createElement("iframe");return e.classList.add("dialog__iframe"),e.srcdoc=t.responseText,e}n=t.responseText}if(!n||"undefined"===n){if(!window.ENABLE_DEBUG_MODE)return null;n="XMLHttpRequest failed without a responseText. Check your browser console."}return`

    ${n}

    ${o}
    `}_finalize(e){"function"==typeof e.finalize&&e.finalize(this._xhr),this._previousXhr=void 0,r.default.trigger(),document.querySelectorAll('a[href*="#"]').forEach((e=>{let t=e.href;-1===t.indexOf("AJAXProxy")&&-1===t.indexOf("ajax-proxy")||(t=t.substr(t.indexOf("#")),e.href=document.location.toString().replace(/#.*/,"")+t)}))}getContentType(e){const t=e.getResponseHeader("content-type");return null===t?null:t.split(";",1)[0].trim()}}})),define("WoltLabSuite/Core/Ajax/DboAction",["require","exports","tslib","./Error","./Status","../Core"],(function(e,t,n,o,i,r){"use strict";async function a(e){const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new o.ExpectedJson(e);let n;try{n=await e.json()}catch(t){throw new o.InvalidJson(e)}return n}let s;Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=t.DboAction=void 0,i=n.__importStar(i),r=n.__importStar(r);class l{#b;#v;#w=[];#o={};#r=!0;#y;constructor(e,t){this.#b=e,this.#v=t}static prepare(e,t){return void 0===s&&(s=!1,window.addEventListener("beforeunload",(()=>{s=!0}))),new l(e,t)}getAbortController(){return void 0===this.#y&&(this.#y=new AbortController),this.#y}objectIds(e){return this.#w=e,this}payload(e){return this.#o=e,this}disableLoadingIndicator(){return this.#r=!1,this}async dispatch(){(0,o.registerGlobalRejectionHandler)();const t=window.WSC_API_URL+"index.php?ajax-proxy/&t="+r.getXsrfToken(),l={actionName:this.#b,className:this.#v};this.#w&&(l.objectIDs=this.#w),this.#o&&(l.parameters=this.#o);const c={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8","X-Requested-With":"XMLHttpRequest","X-XSRF-TOKEN":r.getXsrfToken(),Accept:"application/json"},body:r.serialize(l),mode:"same-origin",credentials:"same-origin",cache:"no-store",redirect:"error"};this.#y&&(c.signal=this.#y.signal);const d=this.#r;d&&i.show();try{const i=await fetch(t,c);if(!i.ok)throw new o.StatusNotOk(i);const r=await a(i);return"yes"===i.headers.get("woltlab-background-queue-check")&&new Promise(((t,n)=>{e(["../BackgroundQueue"],t,n)})).then(n.__importStar).then((e=>e.invoke())),r.returnValues}catch(e){if(e instanceof o.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new o.ConnectionError(e)}finally{d&&i.hide()}}}t.DboAction=l,t.default=l,t.handleValidationErrors=async function(e,t){if(!(e instanceof o.StatusNotOk))throw e;const n=e.response.clone();try{const e=await a(n);if(function(e){return"code"in e&&"returnValues"in e}(e)&&412===e.code&&!0===t(e.returnValues))return}catch{}throw e}})),define("WoltLabSuite/Core/Ajax",["require","exports","tslib","./Ajax/Request","./Core","./Ajax/DboAction","./Ajax/DboAction"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=t.dboAction=t.getRequestObject=t.apiOnce=t.api=void 0,o=n.__importDefault(o),i=n.__importStar(i),r=n.__importDefault(r);const s=new WeakMap;t.api=function(e,t,n,r){"object"!=typeof t&&(t={});let a=s.get(e);if(void 0===a){if("function"!=typeof e._ajaxSetup)throw new TypeError("Callback object must implement at least _ajaxSetup().");const t=e._ajaxSetup();t.pinData=!0,t.callbackObject=e,t.url||(t.url="index.php?ajax-proxy/&t="+i.getXsrfToken(),t.withCredentials=!0),a=new o.default(t),s.set(e,a)}let l=null,c=null;return"function"==typeof n&&(l=a.getOption("success"),a.setOption("success",n)),"function"==typeof r&&(c=a.getOption("failure"),a.setOption("failure",r)),a.setData(t),a.sendRequest(),null!==l&&a.setOption("success",l),null!==c&&a.setOption("failure",c),a},t.apiOnce=function(e){e.pinData=!1,e.callbackObject=null,e.url||(e.url="index.php?ajax-proxy/&t="+i.getXsrfToken(),e.withCredentials=!0),new o.default(e).sendRequest(!1)},t.getRequestObject=function(e){if(!s.has(e))throw new Error("Expected a previously used callback object, provided object is unknown.");return s.get(e)},t.dboAction=function(e,t){return r.default.prepare(e,t)},Object.defineProperty(t,"handleValidationErrors",{enumerable:!0,get:function(){return a.handleValidationErrors}})})),define("WoltLabSuite/Core/BackgroundQueue",["require","exports","tslib","./Ajax"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invoke=t.setUrl=void 0,o=n.__importStar(o);class i{_invocations=0;_isBusy=!1;_url;constructor(e){this._url=e}invoke(){this._isBusy||(this._isBusy=!0,o.api(this))}_ajaxSuccess(e){this._invocations++,e>0&&this._invocations<5?window.setTimeout((()=>{this._isBusy=!1,this.invoke()}),1e3):(this._isBusy=!1,this._invocations=0)}_ajaxSetup(){return{url:this._url,ignoreError:!0,silent:!0}}}let r;t.setUrl=function(e){r||(r=new i(e))},t.invoke=function(){r?r.invoke():console.error("The background queue has not been initialized yet.")}})),define("WoltLabSuite/Core/Date/Util",["require","exports","tslib","../Language"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimezoneDate=t.getTimeElement=t.gmdate=t.format=t.formatDateTime=t.formatTime=t.formatDate=void 0,o=n.__importStar(o);const i=document.documentElement.lang,r=new Intl.DateTimeFormat(i,{dateStyle:"long"}),a=new Intl.DateTimeFormat(i,{hour:"numeric",minute:"numeric"}),s=new Intl.DateTimeFormat(i,{year:"numeric",day:"numeric",month:"long",hour:"numeric",minute:"numeric"});t.formatDate=function(e){return r.format(e)},t.formatTime=function(e){return a.format(e)},t.formatDateTime=function(e){return s.format(e)},t.format=function(e,t){"c"===t&&(t="Y-m-dTH:i:sP");let n="";for(let i=0,r=t.length;i11?"pm":"am";break;case"g":{const t=e.getHours();a=0===t?"12":t>12?(t-12).toString():t.toString();break}case"h":{const t=e.getHours();a=0===t?"12":t>12?(t-12).toString():t.toString(),a=a.padStart(2,"0");break}case"A":a=e.getHours()>11?"PM":"AM";break;case"G":a=e.getHours().toString();break;case"H":a=e.getHours().toString().padStart(2,"0");break;case"d":a=e.getDate().toString().padStart(2,"0");break;case"j":a=e.getDate().toString();break;case"l":a=o.get("__days")[e.getDay()];break;case"D":a=o.get("__daysShort")[e.getDay()];break;case"S":a="";break;case"m":a=(e.getMonth()+1).toString().padStart(2,"0");break;case"n":a=(e.getMonth()+1).toString();break;case"F":a=o.get("__months")[e.getMonth()];break;case"M":a=o.get("__monthsShort")[e.getMonth()];break;case"y":a=e.getFullYear().toString().slice(-2);break;case"Y":a=e.getFullYear().toString();break;case"P":{let t=e.getTimezoneOffset();a=t>0?"-":"+",t=Math.abs(t),a+=(~~(t/60)).toString().padStart(2,"0"),a+=":",a+=(t%60).toString().padStart(2,"0");break}case"r":a=e.toString();break;case"U":a=Math.round(e.getTime()/1e3).toString();break;case"\\":a="",i+1Date.now()&&(t.static=!0),t},t.getTimezoneDate=function(e,t){const n=6e4*new Date(e).getTimezoneOffset();return new Date(e+n+t)}})),define("WoltLabSuite/Core/Dom/Traverse",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");const o=[];for(let i=0;i!0],[1,(e,t)=>e.matches(t)],[2,(e,t)=>e.classList.contains(t)],[3,(e,t)=>e.nodeName===t]]);t.childBySel=function(e,t){return n(e,1,t)[0]||null},t.childByClass=function(e,t){return n(e,2,t)[0]||null},t.childByTag=function(e,t){return n(e,3,t)[0]||null},t.childrenBySel=function(e,t){return n(e,1,t)},t.childrenByClass=function(e,t){return n(e,2,t)},t.childrenByTag=function(e,t){return n(e,3,t)},t.parentBySel=function(e,t,n){return o(e,1,t,n)},t.parentByClass=function(e,t,n){return o(e,2,t,n)},t.parentByTag=function(e,t,n){return o(e,3,t,n)},t.next=function(e){return i(e,"nextElementSibling",0,"")},t.nextBySel=function(e,t){return i(e,"nextElementSibling",1,t)},t.nextByClass=function(e,t){return i(e,"nextElementSibling",2,t)},t.nextByTag=function(e,t){return i(e,"nextElementSibling",3,t)},t.prev=function(e){return i(e,"previousElementSibling",0,"")},t.prevBySel=function(e,t){return i(e,"previousElementSibling",1,t)},t.prevByClass=function(e,t){return i(e,"previousElementSibling",2,t)},t.prevByTag=function(e,t){return i(e,"previousElementSibling",3,t)}})),define("WoltLabSuite/Core/Environment",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.touch=t.platform=t.browser=t.setup=void 0;let n="other",o="desktop",i=!1;t.setup=function(){if("object"==typeof window.chrome)n="chrome";else{const e=window.getComputedStyle(document.documentElement);for(let t=0,o=e.length;t0||window.DocumentTouch&&document instanceof window.DocumentTouch,"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1&&(n="safari",o="ios")},t.browser=function(){return n},t.platform=function(){return o},t.touch=function(){return i}})),define("WoltLabSuite/Core/Ui/Alignment",["require","exports","tslib","../Core","../Dom/Traverse","../Dom/Util","../Language","../Environment"],(function(e,t,n,o,i,r,a,s){"use strict";function l(e,t,n,o,i,r,a){let s="auto",l="auto",c=!0,d=50;const u=document.getElementById("pageHeaderPanel");if(null!==u){const e=window.getComputedStyle(u).position;d="fixed"===e||"static"===e?u.offsetHeight:0}if(a)if("top"===e){const e=o.top-r;s=i-e,e-t.heighti&&(c=!1);else{const a=o.top+window.scrollY;if("top"===e){const{clientHeight:e}=document.body;s=e-a+r,e-(s+t.height)i&&(c=!1)}return{align:e,bottom:s,top:l,result:c}}function c(e,t,n,o,i){let r="auto",a="auto",s=!0;return"left"===e?(r=o.left,r+t.width>i&&(s=!1)):"right"===e?o.left+n.widthi)&&(s=!1)),{align:e,left:r,right:a,result:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.set=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importStar(s),t.set=function(e,t,n){let d;n=o.extend({verticalOffset:0,pointer:!1,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},n||{}),Array.isArray(n.pointerClassNames)&&n.pointerClassNames.length===(n.pointer?1:2)||(n.pointerClassNames=[]),-1===["left","right","center"].indexOf(n.horizontal)&&(n.horizontal="left"),"bottom"!==n.vertical&&(n.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(n.allowFlip)&&(n.allowFlip="both"),"none"===window.getComputedStyle(e).display&&(d=e.style.getPropertyValue("display"),e.style.setProperty("display","block")),r.default.setStyles(e,{bottom:"auto !important",left:"0 !important",right:"auto !important",top:"0 !important",visibility:"hidden !important"});const u=r.default.outerDimensions(e),p=r.default.outerDimensions(n.refDimensionsElement instanceof HTMLElement?n.refDimensionsElement:t),h=t.getBoundingClientRect(),m=window.innerHeight,f=document.body.clientWidth;let g=null,b=!1;if("center"===n.horizontal&&(b=!0,g=c(n.horizontal,u,p,h,f),g.result||("both"===n.allowFlip||"horizontal"===n.allowFlip?n.horizontal="left":g.result=!0)),"rtl"===a.get("wcf.global.pageDirection")&&(n.horizontal="left"===n.horizontal?"right":"left"),null===g||!g.result){const e=g;if(g=c(n.horizontal,u,p,h,f),!g.result&&("both"===n.allowFlip||"horizontal"===n.allowFlip)){const t=c("left"===n.horizontal?"right":"left",u,p,h,f);if(t.result)g=t;else if(b)g=e;else if(u.width===f)g={align:"left",left:0,result:!0,right:0};else if(u.width{a(l.Document)})),c=!0)}function r(e){s.remove(e)}function a(e,t){s.forEach(null,(n=>n(e,t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.execute=t.remove=t.add=t.Origin=void 0;const s=new((o=n.__importDefault(o)).default);var l;!function(e){e.Document="document",e.DropDown="dropdown",e.Search="search"}(l||(t.Origin=l={}));let c=!1;t.add=i,t.remove=r,t.execute=a;const d={add:i,remove:r,execute:a};t.default=d})),function(e,t){var n,o;"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("tabbable",["exports"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,n=e.tabbable,t(o=e.tabbable={}),o.noConflict=function(){return e.tabbable=n,o})}(this,(function(e){"use strict";var t=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],n=t.join(","),o="undefined"==typeof Element,i=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,r=!o&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},a=function e(t,n){var o,i;return void 0===n&&(n=!0),""===(i=null==t||null===(o=t.getAttribute)||void 0===o?void 0:o.call(t,"inert"))||"true"===i||n&&t&&e(t.parentNode)},s=function(e,t,o){if(a(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(n));return t&&i.call(e,n)&&r.unshift(e),r.filter(o)},l=function e(t,o,r){var s,l,c,d,u,p,h,m;for(s=[],l=Array.from(t);l.length;)c=l.shift(),a(c,!1)||("SLOT"===c.tagName?(u=e((d=c.assignedElements()).length?d:c.children,!0,r),r.flatten?s.push.apply(s,u):s.push({scopeParent:c,candidates:u})):(i.call(c,n)&&r.filter(c)&&(o||!t.includes(c))&&s.push(c),p=c.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(c),h=!a(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(c)),p&&h?(m=e(!0===p?c.children:p.children,!0,r),r.flatten?s.push.apply(s,m):s.push({scopeParent:c,candidates:m})):l.unshift.apply(l,c.children)));return s},c=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},d=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!c(e)?0:e.tabIndex},u=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},p=function(e){return"INPUT"===e.tagName},h=function(e){var t=e.getBoundingClientRect(),n=t.width,o=t.height;return 0===n&&0===o},m=function(e,t){return!(t.disabled||a(t)||function(e){return p(e)&&"hidden"===e.type}(t)||function(e,t){var n,o,a,s,l=t.displayCheck,c=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;if(n=i.call(e,"details>summary:first-of-type")?e.parentElement:e,i.call(n,"details:not([open]) *"))return!0;if(l&&"full"!==l&&"legacy-full"!==l){if("non-zero-area"===l)return h(e)}else{if("function"==typeof c){for(o=e;e;){if(a=e.parentElement,s=r(e),a&&!a.shadowRoot&&!0===c(a))return h(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=o}if(function(e){var t,n,o,i,a,s,l,c=e&&r(e),d=null===(t=c)||void 0===t?void 0:t.host,u=!1;if(c&&c!==e)for(u=!!(null!==(n=d)&&void 0!==n&&null!==(o=n.ownerDocument)&&void 0!==o&&o.contains(d)||null!=e&&null!==(i=e.ownerDocument)&&void 0!==i&&i.contains(e));!u&&d;)u=!(null===(s=d=null===(a=c=r(d))||void 0===a?void 0:a.host)||void 0===s||null===(l=s.ownerDocument)||void 0===l||!l.contains(d));return u}(e))return!e.getClientRects().length;if("legacy-full"!==l)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){var t,n,o;if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(n=0;n=0)},b=function e(t){var n=[],o=[];return t.forEach((function(t,i){var r=!!t.scopeParent,a=r?t.scopeParent:t,s=function(e,t){var n=d(e);return n<0&&t&&!c(e)?0:n}(a,r),l=r?e(t.candidates):a;0===s?r?n.push.apply(n,l):n.push(a):o.push({documentOrder:i,tabIndex:s,item:t,isScope:r,content:l})})),o.sort(u).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},v=t.concat("iframe").join(",");e.focusable=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:m.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s(e,t.includeContainer,m.bind(null,t))},e.getTabIndex=d,e.isFocusable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==i.call(e,v)&&m(t,e)},e.isTabbable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==i.call(e,n)&&f(t,e)},e.tabbable=function(e,t){var n;return n=(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:f.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:g}):s(e,t.includeContainer,f.bind(null,t)),b(n)},Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){var n,o;"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("tabbable")):"function"==typeof define&&define.amd?define("focus-trap",["exports","tabbable"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,n=e.focusTrap,t(o=e.focusTrap={},e.tabbable),o.noConflict=function(){return e.focusTrap=n,o})}(this,(function(e,t){"use strict";function n(e,t){var n,o=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)),o}function o(e){var t,o;for(t=1;t1?t-1:0),o=1;o1?t-1:0),o=1;o=0?h.activeElement:(e=g.tabbableGroups[0])&&e.firstTabbableNode||w("fallbackFocus")),!n)throw new Error("Your focus-trap needs to have at least one focusable element");return n},_=function(){if(g.containerGroups=g.containers.map((function(e){var n=t.tabbable(e,f.tabbableOptions),o=t.focusable(e,f.tabbableOptions),i=n.length>0?n[0]:void 0,r=n.length>0?n[n.length-1]:void 0,a=o.find((function(e){return t.isTabbable(e)})),s=o.slice().reverse().find((function(e){return t.isTabbable(e)})),l=!!n.find((function(e){return t.getTabIndex(e)>0}));return{container:e,tabbableNodes:n,focusableNodes:o,posTabIndexesFound:l,firstTabbableNode:i,lastTabbableNode:r,firstDomTabbableNode:a,lastDomTabbableNode:s,nextTabbableNode:function(e){var i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=n.indexOf(e);return r<0?i?o.slice(o.indexOf(e)+1).find((function(e){return t.isTabbable(e)})):o.slice(0,o.indexOf(e)).reverse().find((function(e){return t.isTabbable(e)})):n[r+(i?1:-1)]}}})),g.tabbableGroups=g.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),g.tabbableGroups.length<=0&&!w("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(g.containerGroups.find((function(e){return e.posTabIndexesFound}))&&g.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},E=function e(t){!1!==t&&t!==h.activeElement&&(t&&t.focus?(t.focus({preventScroll:!!f.preventScroll}),g.mostRecentlyFocusedNode=t,function(e){return e.tagName&&"input"===e.tagName.toLowerCase()&&"function"==typeof e.select}(t)&&t.select()):e(y()))},S=function(e){var t=w("setReturnFocus",e);return t||!1!==t&&e},C=function(e){var n,o,i,a,s,l,d,p,h,m=e.target,b=e.event,y=e.isBackward,E=void 0!==y&&y;return m=m||u(b),_(),n=null,g.tabbableGroups.length>0?(i=(o=v(m,b))>=0?g.containerGroups[o]:void 0,o<0?n=E?g.tabbableGroups[g.tabbableGroups.length-1].lastTabbableNode:g.tabbableGroups[0].firstTabbableNode:E?(a=c(g.tabbableGroups,(function(e){var t=e.firstTabbableNode;return m===t})),a<0&&(i.container===m||t.isFocusable(m,f.tabbableOptions)&&!t.isTabbable(m,f.tabbableOptions)&&!i.nextTabbableNode(m,!1))&&(a=o),a>=0?(s=0===a?g.tabbableGroups.length-1:a-1,l=g.tabbableGroups[s],n=t.getTabIndex(m)>=0?l.lastTabbableNode:l.lastDomTabbableNode):r(b)||(n=i.nextTabbableNode(m,!1))):(d=c(g.tabbableGroups,(function(e){var t=e.lastTabbableNode;return m===t})),d<0&&(i.container===m||t.isFocusable(m,f.tabbableOptions)&&!t.isTabbable(m,f.tabbableOptions)&&!i.nextTabbableNode(m))&&(d=o),d>=0?(p=d===g.tabbableGroups.length-1?0:d+1,h=g.tabbableGroups[p],n=t.getTabIndex(m)>=0?h.firstTabbableNode:h.firstDomTabbableNode):r(b)||(n=i.nextTabbableNode(m)))):n=w("fallbackFocus"),n},L=function(e){var t=u(e);v(t,e)>=0||(d(f.clickOutsideDeactivates,e)?i.deactivate({returnFocus:f.returnFocusOnDeactivate}):d(f.allowOutsideClick,e)||e.preventDefault())},k=function(e){var n,o,i,r,a,s=u(e),l=v(s,e)>=0;l||s instanceof Document?l&&(g.mostRecentlyFocusedNode=s):(e.stopImmediatePropagation(),o=!0,g.mostRecentlyFocusedNode?t.getTabIndex(g.mostRecentlyFocusedNode)>0?(i=v(g.mostRecentlyFocusedNode),(r=g.containerGroups[i].tabbableNodes).length>0&&(a=r.findIndex((function(e){return e===g.mostRecentlyFocusedNode})),a>=0&&(f.isKeyForward(g.recentNavEvent)?a+1=0&&(n=r[a-1],o=!1)))):g.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return t.getTabIndex(e)>0}))}))||(o=!1):o=!1,o&&(n=C({target:g.mostRecentlyFocusedNode,isBackward:f.isKeyBackward(g.recentNavEvent)})),E(n||g.mostRecentlyFocusedNode||y())),g.recentNavEvent=void 0},x=function(e){if(("Escape"===(null==(t=e)?void 0:t.key)||"Esc"===(null==t?void 0:t.key)||27===(null==t?void 0:t.keyCode))&&!1!==d(f.escapeDeactivates,e))return e.preventDefault(),void i.deactivate();var t;(f.isKeyForward(e)||f.isKeyBackward(e))&&function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g.recentNavEvent=e,(t=C({event:e,isBackward:n}))&&(r(e)&&e.preventDefault(),E(t))}(e,f.isKeyBackward(e))},T=function(e){var t=u(e);v(t,e)>=0||d(f.clickOutsideDeactivates,e)||d(f.allowOutsideClick,e)||(e.preventDefault(),e.stopImmediatePropagation())},M=function(){if(g.active)return function(e,t){var n,o;e.length>0&&(n=e[e.length-1])!==t&&n.pause(),-1===(o=e.indexOf(t))||e.splice(o,1),e.push(t)}(m,i),g.delayInitialFocusTimer=f.delayInitialFocus?l((function(){E(y())})):E(y()),h.addEventListener("focusin",k,!0),h.addEventListener("mousedown",L,{capture:!0,passive:!1}),h.addEventListener("touchstart",L,{capture:!0,passive:!1}),h.addEventListener("click",T,{capture:!0,passive:!1}),h.addEventListener("keydown",x,{capture:!0,passive:!1}),i},D=function(){if(g.active)return h.removeEventListener("focusin",k,!0),h.removeEventListener("mousedown",L,!0),h.removeEventListener("touchstart",L,!0),h.removeEventListener("click",T,!0),h.removeEventListener("keydown",x,!0),i},I="undefined"!=typeof window&&"MutationObserver"in window?new MutationObserver((function(e){e.some((function(e){return Array.from(e.removedNodes).some((function(e){return e===g.mostRecentlyFocusedNode}))}))&&E(y())})):void 0,A=function(){I&&(I.disconnect(),g.active&&!g.paused&&g.containers.map((function(e){I.observe(e,{subtree:!0,childList:!0})})))};return(i={get active(){return g.active},get paused(){return g.paused},activate:function(e){var t,n,o,i;return g.active?this:(t=b(e,"onActivate"),n=b(e,"onPostActivate"),(o=b(e,"checkCanFocusTrap"))||_(),g.active=!0,g.paused=!1,g.nodeFocusedBeforeActivation=h.activeElement,null==t||t(),i=function(){o&&_(),M(),A(),null==n||n()},o?(o(g.containers.concat()).then(i,i),this):(i(),this))},deactivate:function(e){var t,n,r,a,s,c;return g.active?(t=o({onDeactivate:f.onDeactivate,onPostDeactivate:f.onPostDeactivate,checkCanReturnFocus:f.checkCanReturnFocus},e),clearTimeout(g.delayInitialFocusTimer),g.delayInitialFocusTimer=void 0,D(),g.active=!1,g.paused=!1,A(),function(e,t){var n=e.indexOf(t);-1!==n&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}(m,i),n=b(t,"onDeactivate"),r=b(t,"onPostDeactivate"),a=b(t,"checkCanReturnFocus"),s=b(t,"returnFocus","returnFocusOnDeactivate"),null==n||n(),c=function(){l((function(){s&&E(S(g.nodeFocusedBeforeActivation)),null==r||r()}))},s&&a?(a(S(g.nodeFocusedBeforeActivation)).then(c,c),this):(c(),this)):this},pause:function(e){if(g.paused||!g.active)return this;var t=b(e,"onPause"),n=b(e,"onPostPause");return g.paused=!0,null==t||t(),D(),A(),null==n||n(),this},unpause:function(e){if(!g.paused||!g.active)return this;var t=b(e,"onUnpause"),n=b(e,"onPostUnpause");return g.paused=!1,null==t||t(),_(),M(),A(),null==n||n(),this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return g.containers=t.map((function(e){return"string"==typeof e?h.querySelector(e):e})),g.active&&_(),A(),this}}).updateContainerElements(e),i},Object.defineProperty(e,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Helper/Selector",["require","exports"],(function(e,t){"use strict";function n(e){for(const[t,n]of a.entries()){e.matches(t)&&o(e,n);const i=e.querySelectorAll(t);for(const e of i)o(e,n)}}function o(e,t){for(const n of t)n(e)}function i(e,t){a.has(e)||a.set(e,[]),a.get(e).push(t),n(document.body),void 0===r&&(r=new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&n(e)})),r.observe(document,{subtree:!0,childList:!0}))}let r;Object.defineProperty(t,"__esModule",{value:!0}),t.wheneverFirstSeen=t.wheneverSeen=void 0;const a=new Map;t.wheneverSeen=i,t.wheneverFirstSeen=function(e,t){const n=new WeakSet;i(e,(e=>{n.has(e)||(n.add(e),t(e))}))}})),define("WoltLabSuite/Core/Date/Picker",["require","exports","tslib","../Core","./Util","../Event/Handler","../Language","../Ui/Alignment","../Ui/CloseOverlay","../Dom/Util","../Helper/PageOverlay","focus-trap","../Helper/Selector"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p){"use strict";function h(e,t,n){const o=n?"minDate":"maxDate";let i=(e.dataset[o]||"").trim();if(/^(\d{4})-(\d{2})-(\d{2})$/.exec(i))i=new Date(i).getTime().toString();else if("now"===i)i=t.getTime().toString();else if(/^\d{1,3}$/.exec(i)){const e=new Date(t.getTime());e.setFullYear(e.getFullYear()+~~i*(n?-1:1)),i=e.getTime().toString()}else if(/^datePicker-(.+)$/.exec(i)){if(i=RegExp.$1,null===document.getElementById(i))throw new Error("Reference date picker identified by '"+i+"' does not exists (element id: '"+e.id+"').")}else i=/^\d{4}-\d{2}-\d{2}T/.test(i)?new Date(i).getTime().toString():new Date(n?1902:2038,0,1).getTime().toString();e.dataset[o]=i}function m(e){let t=I.dataset[e]||"";if(/^datePicker-(.+)$/.exec(t)){const e=document.getElementById(RegExp.$1);if(null===e)throw new Error(`Unable to find an element with the id '${RegExp.$1}'.`);t=e.dataset.value||""}return new Date(parseInt(t,10))}function f(e){e.stopPropagation(),function(){if(null!==H)return;H=document.createElement("div"),H.className="datePicker",H.addEventListener("click",(e=>{e.stopPropagation()}));const e=document.createElement("header");H.appendChild(e),B=document.createElement("button"),B.type="button",B.className="previous jsTooltip",B.title=a.get("wcf.date.datePicker.previousMonth"),B.setAttribute("aria-label",a.get("wcf.date.datePicker.previousMonth")),B.innerHTML='',B.addEventListener("click",(()=>R.previousMonth())),e.appendChild(B);const t=document.createElement("span");e.appendChild(t),q=document.createElement("select"),q.className="month jsTooltip",q.title=a.get("wcf.date.datePicker.month"),q.setAttribute("aria-label",a.get("wcf.date.datePicker.month")),q.addEventListener("change",y),t.appendChild(q);let n="";const o=new Intl.DateTimeFormat(document.documentElement.lang,{month:"long"});for(let e=0;e<12;e++)n+=``;q.innerHTML=n,F=document.createElement("select"),F.className="year jsTooltip",F.title=a.get("wcf.date.datePicker.year"),F.setAttribute("aria-label",a.get("wcf.date.datePicker.year")),F.addEventListener("change",_),t.appendChild(F),N=document.createElement("button"),N.type="button",N.className="next jsTooltip",N.title=a.get("wcf.date.datePicker.nextMonth"),N.setAttribute("aria-label",a.get("wcf.date.datePicker.nextMonth")),N.innerHTML='',N.addEventListener("click",(()=>R.nextMonth())),e.appendChild(N),P=document.createElement("ul"),H.appendChild(P);const i=document.createElement("li");i.className="weekdays",P.appendChild(i);const r=new Intl.DateTimeFormat(document.documentElement.lang,{weekday:"short"}),s=new Date,l=s.getDay()-x;for(let e=0;e<7;e++){const t=e-l,n=new Date((new Date).setDate(s.getDate()+t)),o=document.createElement("span");o.textContent=r.format(n),i.appendChild(o)}for(let e=0;e<6;e++){const e=document.createElement("li");P.appendChild(e);for(let t=0;t<7;t++){const t=document.createElement("a");t.addEventListener("click",E),A.push(t),e.appendChild(t)}}U=document.createElement("footer"),H.appendChild(U),j=document.createElement("select"),j.className="hour",j.title=a.get("wcf.date.datePicker.hour"),j.setAttribute("aria-label",a.get("wcf.date.datePicker.hour")),j.addEventListener("change",w);const c=new Date(2e3,0,1),p=new Intl.DateTimeFormat(document.documentElement.lang,{hour:"numeric"});let h="";for(let e=0;e<24;e++){c.setHours(e);let t=p.formatToParts(c);const n=t.some((e=>"dayPeriod"===e.type));2!==t.length||n||(t=t.filter((e=>"literal"!==e.type))),h+=``}j.innerHTML=h,U.appendChild(j),U.appendChild(document.createTextNode(" : ")),O=document.createElement("select"),O.className="minute",O.title=a.get("wcf.date.datePicker.minute"),O.setAttribute("aria-label",a.get("wcf.date.datePicker.minute")),O.addEventListener("change",w),h="";for(let e=0;e<60;e++){const t=e<10?"0"+e.toString():e;h+=``}O.innerHTML=h,U.appendChild(O),(0,d.getPageOverlayContainer)().appendChild(H),C=(0,u.createFocusTrap)(H,{allowOutsideClick:!0,escapeDeactivates:()=>(g(),!1)})}();const t=e.currentTarget,n="INPUT"===t.nodeName?t:t.previousElementSibling;if(n===I)return void g();const i=n.closest(".dialogContent");null!==i&&(o.stringToBool(i.dataset.hasDatepickerScrollListener||"")||(i.addEventListener("scroll",b),i.dataset.hasDatepickerScrollListener="1")),I=n;const r=T.get(I),l=I.dataset.value;let c;l?(c=new Date(parseInt(l,10)),"Invalid Date"===c.toString()&&(c=new Date)):c=new Date,D=m("minDate"),D.getTime()>c.getTime()&&(c=D),M=m("maxDate"),I.dataset.maxDate&&M.getTime()${e}`;F.innerHTML=o,F.value=n.toString(),q.value=t.toString(),H.classList.add("active")}(c.getDate(),c.getMonth(),c.getFullYear()),L=()=>{s.set(H,I)},L(),window.addEventListener("scroll",L,{passive:!1}),I.nextElementSibling.setAttribute("aria-expanded","true"),C.activate()}function g(){if(null===H||!H.classList.contains("active"))return;H.classList.remove("active");const e=T.get(I);"function"==typeof e.onClose&&e.onClose(),r.fire("WoltLabSuite/Core/Date/Picker","close",{element:I}),void 0!==L&&(window.removeEventListener("scroll",L),L=void 0),I.nextElementSibling.setAttribute("aria-expanded","false"),I=null,C.deactivate()}function b(e){if(null===I)return;const t=e.currentTarget,n=c.default.offset(I),o=c.default.offset(t);n.top+I.clientHeight<=o.top||n.top>=o.top+t.offsetHeight||n.left<=o.left||n.left>=o.left+t.offsetWidth?g():s.set(H,I)}function v(e,t,n){const o=void 0!==e,r=void 0!==t;if("number"!=typeof e&&(e=parseInt(e||P.dataset.day||"0",10)),"number"!=typeof t&&(t=parseInt(t||"0",10)),"number"!=typeof n&&(n=parseInt(n||"0",10)),r||n){let a=0!==n;const s=document.createDocumentFragment();s.appendChild(P),r||(t=parseInt(P.dataset.month,10)),n||(n=parseInt(P.dataset.year,10));let l=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(lM&&(n=M.getFullYear(),t=M.getMonth(),e=M.getDate(),q.value=t.toString(),F.value=n.toString(),a=!0),l=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");l.getDay()!==x;)l.setDate(l.getDate()-1);c.default.show(A[35].parentNode);const d=new Date(D.getFullYear(),D.getMonth(),D.getDate());for(let e=0;e<42;e++){if(35===e&&l.getMonth()!==t){c.default.hide(A[35].parentNode);break}const n=A[e];n.textContent=l.getDate().toString();const o=l.getMonth()===t;o?n.classList.remove("otherMonth"):n.classList.add("otherMonth");let r=!0;(lM)&&(r=!1),r?n.classList.remove("disabled"):n.classList.add("disabled"),o&&r&&(n.href="#",n.setAttribute("role","button"),n.tabIndex=0,n.title=i.formatDate(l),n.setAttribute("aria-label",i.formatDate(l))),l.setDate(l.getDate()+1)}if(P.dataset.month=t.toString(),P.dataset.year=n.toString(),H.insertBefore(s,U),!o&&(l=new Date(n,t,e),l.getDate()!==e)){for(;l.getMonth()!==t;)l.setDate(l.getDate()-1);e=l.getDate()}if(a){for(let e=0;e<12;e++){const t=q.children[e];t.disabled=n===D.getFullYear()&&+t.valueM.getMonth()}const e=new Date(n.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");e.setMonth(e.getMonth()+1),N.classList[eD?"add":"remove"]("active")}}if(e){for(let t=0;t<37;t++){const n=A[t];let o=+n.textContent===e;(n.classList.contains("otherMonth")||n.classList.contains("disabled"))&&(o=!1),o?n.classList.add("active"):n.classList.remove("active")}P.dataset.day=e.toString()}w()}function w(){const e=T.get(I);let t;o.stringToBool(I.dataset.empty||"")||(t=e.isDateTime?new Date(+P.dataset.year,+P.dataset.month,+P.dataset.day,+j.value,+O.value):new Date(+P.dataset.year,+P.dataset.month,+P.dataset.day),R.setDate(I,t))}function y(e){v(void 0,+e.currentTarget.value)}function _(e){v(void 0,void 0,+e.currentTarget.value)}function E(e){e.preventDefault();const t=e.currentTarget;t.classList.contains("otherMonth")||t.classList.contains("disabled")||(I.dataset.empty="false",v(+t.textContent),T.get(I).isDateTime||g())}function S(e){if("string"==typeof e&&(e=document.getElementById(e)),!(e instanceof HTMLInputElement&&e.classList.contains("inputDatePicker")&&T.has(e)))throw new Error("Expected a valid date picker input element or id.");return e}o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),l=n.__importDefault(l),c=n.__importDefault(c);let C,L,k=!1,x=0;const T=new Map;let M,D,I=null;const A=[];let P,j,O,q,N,B,U,F,H=null;const R={init(){k||(k=!0,x=parseInt(a.get("wcf.date.firstDayOfTheWeek"),10),(0,p.wheneverSeen)('input[type="date"]:not(.inputDatePicker), input[type="datetime"]:not(.inputDatePicker)',(e=>{const t=new Date;e.classList.add("inputDatePicker"),e.readOnly=!0;const n="datetime"===e.getAttribute("type"),r=n&&o.stringToBool(e.dataset.timeOnly||""),s=o.stringToBool(e.dataset.disableClear||""),l=n&&o.stringToBool(e.dataset.ignoreTimezone||""),c=e.classList.contains("birthday");e.dataset.isDateTime=n?"true":"false",e.dataset.isTimeOnly=r?"true":"false";let d=null,u=e.value;u||(u=e.getAttribute("value")||"");const p=/^\d+-\d+-\d+$/.test(u);if(u){if(r){d=new Date;const e=u.split(":");d.setHours(+e[0],+e[1])}else{if(l||c||p){let e=new Date(u).getTimezoneOffset(),t=e>0?"-":"+";e=Math.abs(e);const n=Math.floor(e/60).toString(),o=(e%60).toString();t+=2===n.length?n:"0"+n,t+=":",t+=2===o.length?o:"0"+o,c||p?u+="T00:00:00"+t:u=u.replace(/[+-][0-9]{2}:[0-9]{2}$/,t)}d=new Date(u)}const t=d.getTime();isNaN(t)?u="":(e.dataset.value=t.toString(),u=r?i.formatTime(d):n?i.formatDateTime(d):i.formatDate(d))}const m=0===u.length;if(c?(e.dataset.minDate="120",e.dataset.maxDate=(new Date).getFullYear().toString()+"-12-31"):(e.min&&(e.dataset.minDate=e.min),e.max&&(e.dataset.maxDate=e.max)),h(e,t,!0),h(e,t,!1),(e.dataset.minDate||"")===(e.dataset.maxDate||""))throw new Error("Minimum and maximum date cannot be the same (element id '"+e.id+"').");e.type="text",e.value=u,e.dataset.empty=m?"true":"false";const g=e.dataset.placeholder||"";g&&(e.placeholder=g);const b=document.createElement("input");b.id=e.id+"DatePicker",b.name=e.name,b.type="hidden",null!==d&&(b.value=r?i.format(d,"H:i"):l?i.format(d,"Y-m-dTH:i:s"):i.format(d,n?"c":"Y-m-d")),e.parentNode.insertBefore(b,e),e.removeAttribute("name"),e.addEventListener("click",f);const v=document.createElement("div");v.className="inputAddon inputAddonDatePicker";const w=document.createElement("button");w.type="button",w.className="inputSuffix button jsTooltip",w.title=r?a.getPhrase("wcf.date.datePicker.time"):a.getPhrase("wcf.date.datePicker"),w.setAttribute("aria-haspopup","true"),w.setAttribute("aria-expanded","false"),w.addEventListener("click",(t=>{e.disabled||f(t)})),v.appendChild(w);let y=document.createElement("fa-icon");r?y.setIcon("clock"):y.setIcon("calendar"),w.appendChild(y),e.parentNode.insertBefore(v,e),v.insertBefore(e,w);let _=null;s||(_=document.createElement("button"),_.type="button",_.className="inputSuffix button jsTooltip",_.title=r?a.getPhrase("wcf.date.datePicker.time.clear"):a.getPhrase("wcf.date.datePicker.clear"),_.addEventListener("click",(()=>{e.disabled||R.clear(e)})),m&&(_.hidden=!0),v.appendChild(_),y=document.createElement("fa-icon"),y.setIcon("xmark"),_.appendChild(y));const E=["tiny","short","medium","long"];let S=!1;for(let t=0;t<4;t++)e.classList.contains(E[t])&&(S=!0);S||e.classList.add("short"),new MutationObserver((()=>{e.disabled?(w.classList.add("disabled"),_?.classList.add("disabled")):(w.classList.remove("disabled"),_?.classList.remove("disabled"))})).observe(e,{attributeFilter:["disabled"]}),e.disabled&&(w.classList.add("disabled"),_?.classList.add("disabled")),T.set(e,{clearButton:_,shadow:b,disableClear:s,isDateTime:n,isEmpty:m,isTimeOnly:r,ignoreTimezone:l,onClose:null})})),l.default.add("WoltLabSuite/Core/Date/Picker",(()=>g())))},previousMonth(){"0"===q.value?(q.value="11",F.value=(+F.value-1).toString()):q.value=(+q.value-1).toString(),v(void 0,+q.value,+F.value)},nextMonth(){"11"===q.value?(q.value="0",F.value=(+F.value+1).toString()):q.value=(+q.value+1).toString(),v(void 0,+q.value,+F.value)},getDate(e){const t=(e=S(e)).dataset.value||"";return t?new Date(+t):null},setDate(e,t){e=S(e);const n=T.get(e);e.dataset.value=t.getTime().toString();let o,r="";n.isDateTime?n.isTimeOnly?(o=i.formatTime(t),r="H:i"):n.ignoreTimezone?(o=i.formatDateTime(t),r="Y-m-dTH:i:s"):(o=i.formatDateTime(t),r="c"):(o=i.formatDate(t),r="Y-m-d"),e.value=o,n.shadow.value=i.format(t,r),n.disableClear||(n.clearButton.hidden=!1)},getValue(e){e=S(e);const t=T.get(e);return t?t.shadow.value:""},clear(e){e=S(e);const t=T.get(e);e.removeAttribute("data-value"),e.value="",t.disableClear||(t.clearButton.hidden=!0),t.isEmpty=!0,t.shadow.value=""},destroy(e){e=S(e);const t=T.get(e),n=e.parentNode;n.parentNode.insertBefore(e,n),n.remove(),e.setAttribute("type","date"+(t.isDateTime?"time":"")),e.name=t.shadow.name,e.value=t.shadow.value,e.removeAttribute("data-value"),e.removeEventListener("click",f),t.shadow.remove(),e.classList.remove("inputDatePicker"),e.readOnly=!1,T.delete(e)},setCloseCallback(e,t){e=S(e),T.get(e).onClose=t}};return window.__wcf_bc_datePicker=R,R})),define("WoltLabSuite/Core/Form/XsrfToken",["require","exports","../Core","../Helper/Selector"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){const e=(0,n.getXsrfToken)();(0,o.wheneverFirstSeen)(".xsrfTokenInput",(t=>{(function(e){return"INPUT"===e.nodeName})(t)&&(t.value=e,t.classList.add("xsrfTokenInputHandled"))}))}})),define("WoltLabSuite/Core/Ui/Dialog",["require","exports","tslib","../Core","../Dom/Change/Listener","./Screen","../Dom/Util","../Language","../Environment","../Event/Handler","./CloseOverlay","focus-trap","../Helper/PageOverlay"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p){"use strict";o=n.__importStar(o),i=n.__importDefault(i),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),d=n.__importDefault(d);let h,m=null;const f=new Map;let g=!1;const b=new WeakMap,v=new Map;let w;const y=["onBeforeClose","onClose","onShow"],_=["number","password","search","tel","text","url"],E={setup(){h=document.createElement("div"),h.classList.add("dialogOverlay"),h.setAttribute("aria-hidden","true"),h.addEventListener("mousedown",(e=>this._closeOnBackdrop(e))),h.addEventListener("wheel",(e=>{e.target===h&&e.preventDefault()}),{passive:!1});let e=!1;new MutationObserver((()=>{"true"===h.getAttribute("aria-hidden")?((0,p.releasePageOverlayContainer)(h),e=!1):e||((0,p.adoptPageOverlayContainer)(h),e=!0)})).observe(h,{attributes:!0,attributeFilter:["aria-hidden"]}),document.getElementById("content").appendChild(h),w=e=>{if("Escape"===e.key){const t=e.target;if("INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName){const e=f.get(m);return!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(m),!1):(this.close(m),!1))}}return!0},r.on("screen-xs",{match(){g=!0},unmatch(){g=!1},setup(){g=!0}}),this._initStaticDialogs(),i.default.add("Ui/Dialog",(()=>{this._initStaticDialogs()})),window.addEventListener("resize",(()=>{f.forEach((e=>{o.stringToBool(e.dialog.getAttribute("aria-hidden"))||this.rebuild(e.dialog.dataset.id||"")}))}))},_initStaticDialogs(){document.querySelectorAll(".jsStaticDialog").forEach((e=>{e.classList.remove("jsStaticDialog");const t=e.dataset.dialogId||"";if(t){const n=document.getElementById(t);null!==n&&(n.classList.remove("jsStaticDialogContent"),n.dataset.isStaticDialog="true",a.default.hide(n),e.addEventListener("click",(e=>{e.preventDefault(),this.openStatic(n.id,null,{title:n.dataset.title||""})})))}}))},open(t,i){let r=b.get(t);if(r&&o.isPlainObject(r))return this.openStatic(r.id,void 0===i?null:i);if("function"!=typeof t._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");const s=t._dialogSetup();if(!o.isPlainObject(s))throw new Error("Expected an object literal as return value of '_dialogSetup()'.");const l=s.id;let c;if(r={id:l},void 0===s.source){if(c=document.getElementById(l),null===c)throw new Error("Element id '"+l+"' is invalid and no source attribute was given. If you want to use the `html` argument instead, please add `source: null` to your dialog configuration.");s.source=document.createDocumentFragment(),s.source.appendChild(c),c.removeAttribute("id"),a.default.show(c)}else if(null===s.source)s.source=i;else if("function"==typeof s.source)s.source();else if(o.isPlainObject(s.source)){if("string"!=typeof i||""===i.trim())return new Promise(((t,n)=>{e(["../Ajax"],t,n)})).then(n.__importStar).then((e=>{const n=s.source;e.api(this,n.data,(e=>{e.returnValues&&"string"==typeof e.returnValues.template&&(this.open(t,e.returnValues.template),"function"==typeof n.after&&n.after(f.get(l).content,e))}))})),{};s.source=i}else if("string"==typeof s.source&&(c=document.createElement("div"),c.id=l,a.default.setInnerHtml(c,s.source),s.source=document.createDocumentFragment(),s.source.appendChild(c)),!s.source.nodeType||s.source.nodeType!==Node.DOCUMENT_FRAGMENT_NODE)throw new Error("Expected at least a document fragment as 'source' attribute.");return b.set(t,r),v.set(l,t),this.openStatic(l,s.source,s.options)},openStatic(t,i,a){this.isOpen(t)||r.pageOverlayOpen(),"desktop"!==l.platform()&&(this.isOpen(t)||r.scrollDisable()),f.has(t)?this._updateDialog(t,i):((a=o.extend({backdropCloseOnClick:!0,closable:!0,closeButtonLabel:s.get("wcf.global.button.close"),closeConfirmMessage:"",disableContentPadding:!1,title:"",onBeforeClose:null,onClose:null,onShow:null},a||{})).closable||(a.backdropCloseOnClick=!1),a.closeConfirmMessage&&(a.onBeforeClose=t=>{new Promise(((t,n)=>{e(["./Confirmation"],t,n)})).then(n.__importStar).then((e=>{e.show({confirm:this.close.bind(this,t),message:a.closeConfirmMessage||""})}))}),this._createDialog(t,i,a));const c=f.get(t);return"ios"===l.platform()&&window.setTimeout((()=>{c.content.querySelector("input, textarea")?.focus()}),200),c},setTitle(e,t){e=this._getDialogId(e);const n=f.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");const o=n.dialog.querySelector(".dialogTitle");o&&(o.textContent=t)},setCallback(e,t,n){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const o=f.get(e);if(void 0===o)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===y.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");if("function"!=typeof n&&null!==n)throw new Error("Only functions or the 'null' value are acceptable callback values ('"+typeof n+"' given).");o[t]=n},removeCallback(e,t){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const n=f.get(e);if(void 0===n)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===y.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");n[t]=void 0},_createDialog(e,t,n){let o=null;if(null===t&&(o=document.getElementById(e),null===o))throw new Error("Expected either a HTML string or an existing element id.");const i=document.createElement("div");i.classList.add("dialogContainer"),i.setAttribute("aria-hidden","true"),i.setAttribute("role","dialog"),i.dataset.id=e;const r=document.createElement("header");i.appendChild(r);const s=a.default.getUniqueId();i.setAttribute("aria-labelledby",s);const l=document.createElement("span");if(l.classList.add("dialogTitle"),l.textContent=n.title,l.id=s,r.appendChild(l),n.closable){const e=document.createElement("button");e.type="button",e.innerHTML='',e.classList.add("dialogCloseButton","jsTooltip"),e.title=n.closeButtonLabel,e.setAttribute("aria-label",n.closeButtonLabel),e.addEventListener("click",(()=>this._close())),r.appendChild(e)}new ResizeObserver((()=>{if("false"===i.getAttribute("aria-hidden")){const e=Math.floor(i.getBoundingClientRect().width/2);i.style.setProperty("--translate-x",`-${e}px`)}})).observe(i);const c=document.createElement("div");let d;if(c.classList.add("dialogContent"),n.disableContentPadding&&c.classList.add("dialogContentNoPadding"),i.appendChild(c),c.addEventListener("wheel",(e=>{let t,n,o,i=!1,r=e.target;for(;;){if(t=r.clientHeight,n=r.scrollHeight,t0){i=!0;break}if(e.deltaY>0&&o+t1?(d=document.createElement("div"),d.id=e,d.appendChild(t)):d=n[0]}}else d=o;c.appendChild(d),"none"===d.style.getPropertyValue("display")&&a.default.show(d);const p=(0,u.createFocusTrap)(i,{allowOutsideClick:!0,escapeDeactivates:()=>(f.get(e).closable&&E.close(e),!1),fallbackFocus:i});f.set(e,{backdropCloseOnClick:n.backdropCloseOnClick,closable:n.closable,content:d,dialog:i,focusTrap:p,header:r,onBeforeClose:n.onBeforeClose,onClose:n.onClose,onShow:n.onShow,submitButton:null,inputFields:new Set}),h.insertBefore(i,h.firstChild),"function"==typeof n.onSetup&&n.onSetup(d),this._updateDialog(e,null)},_updateDialog(e,t){const n=f.get(e);if(void 0===n)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t&&a.default.setInnerHtml(n.content,t),o.stringToBool(n.dialog.getAttribute("aria-hidden"))){d.default.execute(),n.closable&&o.stringToBool(h.getAttribute("aria-hidden"))&&window.addEventListener("keyup",w),n.dialog.parentNode.insertBefore(n.dialog,n.dialog.parentNode.firstChild),n.dialog.setAttribute("aria-hidden","false"),h.setAttribute("aria-hidden","false"),h.setAttribute("close-on-click",n.backdropCloseOnClick?"true":"false"),m=e;const t=n.header.querySelector(".dialogCloseButton");t&&t.setAttribute("inert","true"),t&&t.removeAttribute("inert"),"function"==typeof n.onShow&&n.onShow(n.content),o.stringToBool(n.content.dataset.isStaticDialog||"")&&c.fire("com.woltlab.wcf.dialog","openStatic",{content:n.content,id:e})}this.rebuild(e),i.default.trigger(),n.focusTrap.activate()},rebuild(e){const t=this._getDialogId(e),n=f.get(t);if(void 0===n)throw new Error("Expected a valid dialog id, '"+t+"' does not match any active dialog.");if(o.stringToBool(n.dialog.getAttribute("aria-hidden")))return;const i=n.content.parentNode,r=n.content.querySelector(".formSubmit");let s=0;null!==r?(i.classList.add("dialogForm"),r.classList.add("dialogFormSubmit"),s+=a.default.outerHeight(r),s-=1,i.style.setProperty("margin-bottom",`${s}px`,"")):(i.classList.remove("dialogForm"),i.style.removeProperty("margin-bottom")),s+=a.default.outerHeight(n.header);const l=window.innerHeight*(g?1:.8)-s;if(i.style.setProperty("max-height",~~l+"px",""),""===n.dialog.style.getPropertyValue("--translate-x")){const e=Math.floor(n.dialog.getBoundingClientRect().width/2);n.dialog.style.setProperty("--translate-x",`-${e}px`)}const c=v.get(t);if(void 0!==c&&"function"==typeof c._dialogSubmit){const e=n.content.querySelectorAll('input[data-dialog-submit-on-enter="true"]'),o=n.content.querySelector('.formSubmit > input[type="submit"], .formSubmit > button[data-type="submit"]');if(null===o)return void(0===e.length&&console.warn("Broken dialog, expected a submit button.",n.content));if(n.submitButton!==o){n.submitButton=o,o.addEventListener("click",(e=>{e.preventDefault(),this._submit(t)}));const i=e=>{"Enter"===e.key&&(e.preventDefault(),this._submit(t))};let r;for(let t=0,o=e.length;t{e.required&&(""===e.value.trim()?(a.default.innerError(e,s.get("wcf.global.form.error.empty")),e.closest("dl")?.classList.add("formError"),n=!1):(a.default.innerError(e,!1),e.closest("dl")?.classList.remove("formError")))})),n){const t=v.get(e);"function"==typeof t._dialogSubmit&&t._dialogSubmit()}},submit(e){this._submit(e)},_close(){const e=f.get(m);return void 0===e||!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(m),!1):(this.close(m),!0))},_closeOnBackdrop(e){e.target===h&&(o.stringToBool(h.getAttribute("close-on-click"))?(e.preventDefault(),this._close()):e.preventDefault())},close(e){e=this._getDialogId(e);let t=f.get(e);if(void 0===t)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");try{t.focusTrap.deactivate()}catch(e){const t="Your focus-trap must have at least one container with at least one tabbable node in it at all times";if(e.message!==t)throw e}t.dialog.setAttribute("aria-hidden","true");const n=document.activeElement;n.closest(".dialogContainer")===t.dialog&&n.blur(),"function"==typeof t.onClose&&t.onClose(e),m=null;for(let e=0;e({})};return E})),define("WoltLabSuite/Core/Ui/Dropdown/Simple",["require","exports","tslib","../../CallbackList","../../Core","../../Dom/Traverse","../../Dom/Util","../Alignment","../CloseOverlay","../../Helper/PageOverlay","../../Helper/Selector"],(function(e,t,n,o,i,r,a,s,l,c,d){"use strict";function u(e){const t=e.currentTarget,n=t.querySelectorAll(".dropdown.dropdownOpen");for(let e=0,o=n.length;e=s.top+t.offsetHeight||r.left<=s.left||r.left>=s.left+t.offsetWidth?C.toggleDropdown(i):C.setAlignment(w.get(i),y.get(i))}}function p(){w.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen"))if(i.stringToBool(e.dataset.isOverlayDropdownButton||""))C.setAlignment(e,y.get(t));else{const n=y.get(e.id);i.stringToBool(n.dataset.dropdownIgnorePageScroll||"")||C.close(t)}}))}function h(e,t){b.forEach(e,(n=>{n(e,t)}))}function m(e,t,n,o){if(null!==e){e.preventDefault(),e.stopPropagation();const n=e.currentTarget;t=n.dataset.target,void 0===o&&e instanceof MouseEvent&&(i.stringToBool(n.dataset.isKeyboardClick||"")?delete n.dataset.isKeyboardClick:o=!0)}S=!0;try{l.default.execute(l.Origin.DropDown,t)}finally{S=!1}let a=w.get(t),s=!1;if(void 0!==a){let n,l;if(e&&(n=e.currentTarget,l=n.parentNode,l!==a&&(l.classList.add("dropdown"),l.id=a.id,a.classList.remove("dropdown"),a.id="",a=l,w.set(t,l))),void 0===o&&(n=a.closest(".dropdownToggle"),n||(n=a.querySelector(".dropdownToggle"),!n&&a.id&&(n=document.querySelector('[data-target="'+a.id+'"]'))),n&&i.stringToBool(n.dataset.dropdownLazyInit||"")&&(o=!0)),i.stringToBool(a.dataset.dropdownPreventToggle||"")&&a.classList.contains("dropdownOpen")&&(s=!0),""===a.dataset.isOverlayDropdownButton){const e=r.parentByClass(a,"dialogContent");a.dataset.isOverlayDropdownButton=null!==e?"true":"false",null!==e&&e.addEventListener("scroll",u)}}return E="",w.forEach(((e,r)=>{const a=y.get(r);if(e.classList.contains("dropdownOpen"))if(s)E=t;else{e.classList.remove("dropdownOpen"),a.classList.remove("dropdownOpen");const t=e.querySelector(".dropdownToggle");t&&t.setAttribute("aria-expanded","false"),h(r,"close")}else if(r===t&&a.childElementCount>0){E=t,e.classList.add("dropdownOpen"),a.classList.add("dropdownOpen");const s=e.querySelector(".dropdownToggle");s&&s.setAttribute("aria-expanded","true");const l=a.childElementCount>0?a.children[0]:null;if(l&&i.stringToBool(l.dataset.scrollToActive||"")){delete l.dataset.scrollToActive;let e=null;for(let t=0,n=l.childElementCount;tc.clientHeight?"add":"remove"]("forceScrollbar"),h(r,"open");let d=null;if(!o){a.setAttribute("role","menu"),a.tabIndex=-1,a.removeEventListener("keydown",g),a.addEventListener("keydown",g);const e=Array.from(a.querySelectorAll("li")).filter((e=>e.clientHeight>0));d=e.find((e=>e.classList.contains("active")))||e[0]||null,e.forEach((e=>{e.setAttribute("role","menuitem"),e.tabIndex=-1}))}C.setAlignment(e,a,n),null!==d&&d.focus()}})),null===e}function f(e){const t=e.currentTarget;"INPUT"!==t.nodeName&&("Enter"!==e.key&&"Space"!==e.key||(e.preventDefault(),t.dataset.requiresSynthethicClick?(t.dataset.isKeyboardClick="true",t.click()):m(e)))}function g(e){const t=document.activeElement;if("LI"===t.nodeName)if("ArrowDown"===e.key||"ArrowUp"===e.key||"End"===e.key||"Home"===e.key){e.preventDefault();const n=Array.from(t.closest(".dropdownMenu").querySelectorAll("li"));"ArrowUp"!==e.key&&"End"!==e.key||n.reverse();let o=null;const i=e=>!e.classList.contains("dropdownDivider")&&e.clientHeight>0;let r=n.indexOf(t);"End"!==e.key&&"Home"!==e.key||(r=-1);for(let e=r+1;eC.closeAll())),(0,d.wheneverFirstSeen)(".dropdownToggle",(e=>C.init(e,!1))),document.addEventListener("scroll",p),window.bc_wcfSimpleDropdown=this)},init(e,t){if(C.setup(),e.setAttribute("role","button"),e.tabIndex=0,e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-expanded","false"),e.classList.contains("jsDropdownEnabled")||e.dataset.target)return!1;const n=r.parentByClass(e,"dropdown");if(null===n)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a parent with .dropdown.");const o=r.nextByClass(e,"dropdownMenu");if(null===o)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a menu as next sibling.");_.appendChild(o);const s=a.default.identify(n);if(!w.has(s)&&(e.classList.add("jsDropdownEnabled"),e.addEventListener("click",m),e.addEventListener("keydown",f),w.set(s,n),y.set(s,o),/^wcf\d+$/.test(s)||(o.dataset.source=s),o.childElementCount&&o.children[0].classList.contains("scrollableDropdownMenu"))){const e=o.children[0];e.dataset.scrollToActive="true";let t=null,n=null;e.addEventListener("wheel",(o=>{null===t&&(t=e.clientHeight),null===n&&(n=e.scrollHeight),(o.deltaY<0&&0===e.scrollTop||o.deltaY>0&&e.scrollTop+t===n)&&o.preventDefault()}),{passive:!1})}return e.dataset.target=s,t&&setTimeout((()=>{e.dataset.dropdownLazyInit=t instanceof MouseEvent?"true":"false",i.triggerEvent(e,"click"),setTimeout((()=>{delete e.dataset.dropdownLazyInit}),10)}),10),!0},initFragment(e,t){C.setup();const n=a.default.identify(e);w.has(n)||(w.set(n,e),_.appendChild(t),y.set(n,t))},registerCallback(e,t){b.add(e,t)},getDropdown:e=>w.get(e),getDropdownMenu:e=>y.get(e),toggleDropdown(e,t,n){m(null,e,t,n)},setAlignment(e,t,n){const o=e.querySelector(".dropdownToggle"),i=null!==o?o.parentNode:null;let r;i&&i.classList.contains("inputAddonTextarea")&&(r=o),s.set(t,n||e,{pointerClassNames:["dropdownArrowBottom","dropdownArrowRight"],refDimensionsElement:r||null,horizontal:"right"===t.dataset.dropdownAlignmentHorizontal?"right":"left",vertical:"top"===t.dataset.dropdownAlignmentVertical?"top":"bottom",allowFlip:t.dataset.dropdownAllowFlip||"both"})},setAlignmentById(e){const t=w.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");const n=y.get(e);C.setAlignment(t,n)},isOpen(e){const t=y.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open(e,t,n){const o=y.get(e);void 0===o||o.classList.contains("dropdownOpen")||C.toggleDropdown(e,n,t)},close(e){const t=w.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),y.get(e).classList.remove("dropdownOpen"))},closeAll(){S||w.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen")){e.classList.remove("dropdownOpen"),y.get(t).classList.remove("dropdownOpen");const n=e.querySelector(".dropdownToggle");n&&n.setAttribute("aria-expanded","false"),h(t,"close")}}))},destroy(e){if(!w.has(e))return!1;try{C.close(e),y.get(e)?.remove()}catch(e){}return y.delete(e),w.delete(e),!0},_toggle:(e,t,n,o)=>m(e,t,n,o)};return C})),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["require","exports","tslib","./Simple"],(function(e,t,n,o){"use strict";function i(e){if(!r.has(e))throw new Error("Unknown dropdown identifier '"+e+"'");return r.get(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.toggleDropdown=t.registerCallback=t.getDropdownMenu=t.init=void 0,o=n.__importDefault(o);const r=new Map;let a=0;t.init=function(e,t){if(r.has(e))return;const n=document.createElement("div");n.id="reusableDropdownGhost"+a++,o.default.initFragment(n,t),r.set(e,n.id)},t.getDropdownMenu=function(e){return o.default.getDropdownMenu(i(e))},t.registerCallback=function(e,t){o.default.registerCallback(i(e),t)},t.toggleDropdown=function(e,t){o.default.toggleDropdown(i(e),t)}})),define("WoltLabSuite/Core/Ui/Page/Menu/Container",["require","exports","tslib","focus-trap","../../Screen","../../CloseOverlay","../../../Dom/Util"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuContainer=void 0,r=n.__importDefault(r),a=n.__importDefault(a);class s{container=document.createElement("div");content=document.createElement("div");focusTrap=void 0;provider;constructor(e){this.provider=e,this.container.hidden=!0;const t=a.default.identify(this.provider.getMenuButton());r.default.add(`WoltLabSuite/Core/Ui/PageMenu/Container-${t}`,(()=>{this.container.hidden||this.close()}))}open(){r.default.execute(),this.buildElements(),0===this.content.childElementCount&&this.content.append(this.provider.getContent()),this.provider.getMenuButton().setAttribute("aria-expanded","true"),(0,i.pageOverlayOpen)(),(0,i.scrollDisable)(),this.container.hidden=!1,this.provider.wakeup(),this.getFocusTrap().activate()}close(){this.provider.getMenuButton().setAttribute("aria-expanded","false"),(0,i.pageOverlayClose)(),(0,i.scrollEnable)(),this.container.hidden=!0,this.getFocusTrap().deactivate(),this.provider.sleep()}toggle(){this.container.hidden?this.open():this.close()}getContent(){return this.content}buildElements(){this.container.classList.contains("pageMenuContainer")||(this.container.classList.add("pageMenuContainer"),this.container.hidden=!0,this.container.addEventListener("click",(e=>{e.target===this.container&&this.close()})),this.content.classList.add("pageMenuContent"),this.content.addEventListener("click",(e=>{e.stopPropagation()})),this.container.append(this.content),document.body.append(this.container))}getFocusTrap(){return void 0===this.focusTrap&&(this.focusTrap=(0,o.createFocusTrap)(this.content,{allowOutsideClick:!0})),this.focusTrap}}t.PageMenuContainer=s,t.default=s})),define("WoltLabSuite/Core/Ui/Page/Menu/Main",["require","exports","tslib","./Container","../../../Language","../../../Dom/Util","../../Dropdown/Simple"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuMain=void 0,o=n.__importDefault(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importStar(a);class s{container;mainMenu;mainMenuButton;menuItemBadges=new Map;menuItemProvider;observer;constructor(e){this.mainMenu=document.querySelector(".mainMenu"),this.menuItemProvider=e,this.mainMenuButton=document.querySelector(".pageHeaderMenuMobile"),this.mainMenuButton.addEventListener("click",(e=>{e.stopPropagation(),this.container.toggle()})),this.container=new o.default(this),this.observer=new MutationObserver((e=>{let t=!1;e.forEach((e=>{(e.addedNodes.length>0||e.removedNodes.length>0||"characterData"===e.type)&&(t=!0)})),t&&this.refreshUnreadIndicator()})),this.watchForChanges()}enable(){this.mainMenuButton.setAttribute("aria-expanded","false"),this.mainMenuButton.querySelector("fa-icon").setIcon("bars"),this.refreshUnreadIndicator()}disable(){this.container.close(),this.mainMenuButton.setAttribute("aria-expanded","false"),this.mainMenuButton.querySelector("fa-icon").setIcon("bars")}getContent(){const e=document.createElement("div");e.classList.add("pageMenuMainContainer"),e.addEventListener("scroll",(()=>this.updateOverflowIndicator(e)),{passive:!0}),e.append(this.buildMainMenu());const t=this.buildLanguageMenu();t&&e.append(t);const n=this.buildFooterMenu();n&&e.append(n);const o=new ResizeObserver((()=>this.updateOverflowIndicator(e)));Array.from(e.children).forEach((e=>{o.observe(e)}));const i=document.createDocumentFragment();return i.append(e),i}getMenuButton(){return this.mainMenuButton}sleep(){this.watchForChanges()}wakeup(){this.observer.disconnect(),this.refreshUnreadIndicator()}watchForChanges(){this.observer.observe(this.mainMenu,{childList:!0,subtree:!0})}buildMainMenu(){const e=this.mainMenu.querySelector(".boxMenu"),t=this.buildMenu(e);return t.setAttribute("aria-label",window.PAGE_TITLE),t.setAttribute("role","navigation"),this.showActiveMenuItem(t),t}showActiveMenuItem(e){const t=e.querySelector('.pageMenuMainItemLink[aria-current="page"]');if(t){let e=t;for(;e&&e.parentElement;)if(e=e.parentElement.closest(".pageMenuMainItemList"),e){e.hidden=!1;const t=e.previousElementSibling;t?.setAttribute("aria-expanded","true")}const n=t.nextElementSibling;n&&(n.setAttribute("aria-expanded","true"),n.nextElementSibling.hidden=!1)}}buildLanguageMenu(){const e=a.getDropdownMenu("pageLanguageContainer");if(void 0===e)return null;const t=[],n=new Map;Array.from(e.children).forEach((e=>{const o=e.dataset.languageCode,i=e.querySelector("span").textContent.trim(),r=e.querySelector("img.iconFlag")||void 0;n.set(o,e.querySelector("a")),t.push({active:!1,children:[],counter:0,depth:1,identifier:o,title:i,icon:r})}));const o=document.createElement("fa-icon");o.setIcon("language"),o.size=24;const r=[{active:!1,children:t,counter:0,depth:0,identifier:"language",title:i.get("wcf.user.language"),icon:o}],s=document.createElement("nav");return s.classList.add("pageMenuMainNavigation","pageMenuMainNavigationLanguage"),s.append(this.buildMenuItemList(r,!0)),s.querySelectorAll(".pageMenuMainItemList .pageMenuMainItemLabel[data-identifier]").forEach((e=>{e.addEventListener("click",(t=>{t.preventDefault();const o=e.dataset.identifier;n.get(o)?.click()}))})),s}buildFooterMenu(){const e=document.querySelector('.box[data-box-identifier="com.woltlab.wcf.FooterMenu"]');if(null===e)return null;const t=e.querySelector(".boxMenu"),n=this.buildMenu(t);n.classList.add("pageMenuMainNavigationFooter");const o=e.querySelector("nav").getAttribute("aria-label");return n.setAttribute("aria-label",o),n}buildMenu(e){const t=this.menuItemProvider.getMenuItems(e),n=document.createElement("nav");return n.classList.add("pageMenuMainNavigation"),n.append(this.buildMenuItemList(t,!1)),n}buildMenuItemList(e,t){const n=document.createElement("ul");return n.classList.add("pageMenuMainItemList"),e.filter((e=>!(!t&&!e.link&&0===e.children.length))).forEach((e=>{n.append(this.buildMenuItem(e,t))})),n}buildMenuItem(e,t){const n=document.createElement("li");if(n.dataset.depth=e.depth.toString(),n.classList.add("pageMenuMainItem"),e.link){const t=document.createElement("a");if(t.classList.add("pageMenuMainItemLink"),t.href=e.link,t.textContent=e.title,e.active&&t.setAttribute("aria-current","page"),e.identifier&&(t.dataset.identifier=e.identifier),e.openInNewWindow&&(t.target="_blank"),e.counter>0){const n=document.createElement("span");n.classList.add("pageMenuMainItemCounter","badge","badgeUpdate"),n.setAttribute("aria-hidden","true"),n.textContent=e.counter.toString(),null!==e.identifier&&this.menuItemBadges.set(e.identifier,n),t.append(n)}n.append(t)}else{const o=document.createElement("a");if(o.classList.add("pageMenuMainItemLabel"),o.href="#",e.icon){o.append(e.icon);const t=document.createElement("span");t.textContent=e.title,o.append(t)}else o.textContent=e.title;e.identifier&&(o.dataset.identifier=e.identifier),t&&"language"!==e.identifier||(o.addEventListener("click",(e=>{e.preventDefault(),o.nextElementSibling.click()})),o.setAttribute("aria-hidden","true")),n.append(o)}if(e.children.length){n.classList.add("pageMenuMainItemExpandable");const o=r.default.getUniqueId(),a=document.createElement("button");a.type="button",a.classList.add("pageMenuMainItemToggle"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",o),a.innerHTML='';let s=e.title;e.link&&(s=i.get("wcf.menu.page.button.toggle",{title:e.title})),a.setAttribute("aria-label",s);const l=this.buildMenuItemList(e.children,t);l.id=o,l.hidden=!0,a.addEventListener("click",(()=>{this.toggleList(a,l)})),l.addEventListener("keydown",(e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),this.toggleList(a,l))})),n.append(a,l)}return n}toggleList(e,t){t.hidden?(e.setAttribute("aria-expanded","true"),t.hidden=!1):(e.setAttribute("aria-expanded","false"),t.hidden=!0,document.activeElement!==e&&e.focus())}refreshUnreadIndicator(){null!==this.mainMenu.querySelector(".boxMenuLinkOutstandingItems")?this.mainMenu.classList.add("pageMenuMobileButtonHasContent"):this.mainMenu.classList.remove("pageMenuMobileButtonHasContent"),this.menuItemProvider.getMenuItems(this.mainMenu).forEach((e=>this.refreshUnreadBage(e)))}refreshUnreadBage(e){if(null!==e.identifier){const t=this.menuItemBadges.get(e.identifier);t&&(0===e.counter?(t.remove(),this.menuItemBadges.delete(e.identifier)):parseInt(t.textContent,10)!==e.counter&&(t.textContent=e.counter.toString()))}e.children.forEach((e=>this.refreshUnreadBage(e)))}updateOverflowIndicator(e){e.clientHeight0?e.classList.add("pageMenuMainContainerOverflowTop"):e.classList.remove("pageMenuMainContainerOverflowTop"),e.clientHeight+e.scrollTopu(e))),g.set(e,t)}return g.get(e)}function h(){return void 0===m&&(m=document.createElement("div"),m.classList.add("dropdownMenuContainer"),(0,l.getPageOverlayContainer)().append(m)),m}let m;Object.defineProperty(t,"__esModule",{value:!0}),t.registerProvider=t.getContainer=t.getUserMenuProviders=void 0,o=n.__importStar(o),i=n.__importDefault(i),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s);const f=new Set,g=new Map;t.getUserMenuProviders=function(){return f},t.getContainer=h,t.registerProvider=function(e){0===f.size&&(i.default.add("WoltLabSuite/Ui/User/Menu",(()=>{f.forEach((e=>u(e)))})),r.add("com.woltlab.wcf.UserMenuMobile","more",(e=>{f.forEach((t=>{e.identifier===t.getIdentifier()&&c(t)}))})),window.addEventListener("resize",(()=>{f.forEach((e=>{const t=e.getPanelButton();t.classList.contains("open")&&d(p(e).getElement(),t)}))}),{passive:!0}),s.on("screen-md-down",{match(){f.forEach((e=>{e.getPanelButton().classList.contains("open")&&u(e)}))},setup(){f.forEach((e=>{e.getPanelButton().classList.contains("open")&&u(e)}))}})),function(e){f.add(e);const t=e.getPanelButton();t.addEventListener("click",(n=>{n.preventDefault(),n.stopPropagation(),t.classList.contains("open")?u(e):c(e)}))}(e)}})),define("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",["require","exports","tslib","../../CloseOverlay","./Manager","focus-trap","../../Alignment","../../../Dom/Util"],(function(e,t,n,o,i,r,a,s){"use strict";function l(){u.deactivate(),d.hidden=!0,c.classList.remove("open"),p.setAttribute("aria-expanded","false")}let c,d,u,p;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.getElement=void 0,o=n.__importDefault(o),a=n.__importStar(a),s=n.__importDefault(s),t.getElement=function(){return d};let h=!1;t.setup=function(){h||(c=document.getElementById("userMenu"),d=c.querySelector(".userMenu"),p=c.querySelector("a"),o.default.add("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",(()=>l())),(0,i.getContainer)().append(d),d.addEventListener("click",(e=>e.stopPropagation())),c.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),d.hidden?d.hidden&&(o.default.execute(),d.hidden=!1,c.classList.add("open"),p.setAttribute("aria-expanded","true"),u.activate(),function(e,t){if(a.set(e,t,{horizontal:"right"}),"fixed"===window.getComputedStyle(e).position&&null!==s.default.getFixedParent(t)){const{top:n,height:o}=t.getBoundingClientRect();e.style.setProperty("top",`${n+o}px`)}}(d,c)):l()})),u=(0,r.createFocusTrap)(d,{allowOutsideClick:!0,escapeDeactivates:()=>(l(),!1),fallbackFocus:d}),h=!0)}})),define("WoltLabSuite/Core/Ui/Page/Menu/User",["require","exports","tslib","./Container","../../../Language","../../User/Menu/Manager","../../../Dom/Util","../../User/Menu/ControlPanel","../../../Event/Handler","../../Screen"],(function(e,t,n,o,i,r,a,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasValidUserMenu=t.PageMenuUser=void 0,o=n.__importDefault(o),i=n.__importStar(i),a=n.__importDefault(a),l=n.__importStar(l);class d{activeTab=void 0;container;legacyUserPanels=new Map;observer;userMenuProviders=new Map;tabOrigins=new Map;tabPanels=new Map;tabs=[];userMenu;userMenuButton;constructor(){this.userMenu=document.querySelector(".userPanel"),this.userMenuButton=document.querySelector(".pageHeaderUserMobile"),this.userMenuButton.addEventListener("click",(t=>{t.stopPropagation(),e.then((()=>this.container.toggle()))})),this.container=new o.default(this);const e=new Promise((e=>{"complete"===document.readyState?e():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&e()}))}));(0,c.on)("screen-lg",{match:()=>this.detachViewsFromPanel(),unmatch:()=>this.detachViewsFromPanel()}),this.observer=new MutationObserver((()=>{this.refreshTabUnreadIndicators()}))}enable(){this.userMenuButton.setAttribute("aria-expanded","false"),this.refreshUnreadIndicator()}disable(){this.container.close(),this.userMenuButton.setAttribute("aria-expanded","false")}getContent(){const e=document.createDocumentFragment();return e.append(this.buildTabMenu()),e}getMenuButton(){return this.userMenuButton}sleep(){this.activeTab&&this.closeTab(this.activeTab),this.detachViewsFromPanel(),this.refreshUnreadIndicator()}wakeup(){this.activeTab?this.openTab(this.activeTab):this.isInMaintenanceMode()?this.openTab(this.tabs[0]):this.openNotifications(),this.refreshTabUnreadIndicators(),this.refreshUnreadIndicator()}isInMaintenanceMode(){return"wcf"===document.body.dataset.application&&"offline"===document.body.dataset.template}openNotifications(){const e=this.tabs.find((e=>"userNotifications"===e.dataset.origin));if(!e)throw new Error("Unable to find the notifications tab.");this.openTab(e)}openTab(e){this.closeActiveTab(),e.setAttribute("aria-selected","true"),e.tabIndex=0;const t=this.tabPanels.get(e);t.hidden=!1,document.activeElement!==e&&e.focus(),this.attachViewToPanel(e),this.activeTab=e,this.observer.observe(t,{attributeFilter:["data-is-unread"],childList:!0,subtree:!0})}closeActiveTab(){this.activeTab&&(this.closeTab(this.activeTab),this.activeTab=void 0)}closeTab(e){e.setAttribute("aria-selected","false"),e.tabIndex=-1,this.tabPanels.get(e).hidden=!0;const t=this.legacyUserPanels.get(e);t&&t.close(),this.observer.disconnect(),this.refreshTabUnreadIndicators()}attachViewToPanel(e){const t=e.dataset.origin,n=this.tabPanels.get(e);if("userMenu"===t){const e=(0,s.getElement)();e.hidden=!1,0===n.childElementCount&&(this.tabOrigins.set(n,e.parentElement),n.append(e))}else if(0===n.childElementCount){const t=this.userMenuProviders.get(e);if(t){const e=t.getView(),o=e.getElement();this.tabOrigins.set(n,o.parentElement),n.append(o),e.open()}else{const t=this.legacyUserPanels.get(e);t.open();const{top:o}=n.getBoundingClientRect();t.getDropdown().getContainer()[0].style.setProperty("--offset-top",`${o}px`)}}}detachViewsFromPanel(){this.tabPanels.forEach(((e,t)=>{if(e.childElementCount){const n=this.tabOrigins.get(e);if(n)if("userMenu"===t.dataset.origin){const t=e.children[0];t.hidden=!0,n.append(t)}else{const e=this.userMenuProviders.get(t);if(e){const t=e.getView().getElement();t.hidden=!0,n.append(t)}}}}))}keydown(e){const t=e.currentTarget;if("Enter"===e.key||" "===e.key)return e.preventDefault(),void this.openTab(t);if(!["ArrowLeft","ArrowRight","End","Home"].includes(e.key))return;e.preventDefault();const n=this.tabs.indexOf(t),o=this.tabs.length-1;let i;i="ArrowLeft"===e.key?0===n?o:n-1:"ArrowRight"===e.key?n===o?0:n+1:"End"===e.key?o:0,this.tabs[i].focus()}buildTabMenu(){const e=document.createElement("div");e.classList.add("pageMenuUserTabContainer");const t=document.createElement("div");return t.classList.add("pageMenuUserTabList"),t.setAttribute("role","tablist"),t.setAttribute("aria-label",i.get("wcf.menu.user")),e.append(t),this.buildControlPanelTab(t,e),(0,r.getUserMenuProviders)().forEach((n=>{const[o,i]=this.buildTab(n);t.append(o),e.append(i),this.tabs.push(o),this.tabPanels.set(o,i),this.userMenuProviders.set(o,n)})),this.buildLegacyTabs(t,e),e}buildTab(e){const t=e.getPanelButton(),n=t.querySelector("a");let o=n.querySelector("fa-icon")?.outerHTML;void 0===o&&(o='');const i={icon:o,label:n.dataset.title||n.title,origin:t.id};return this.buildTabComponents(i)}buildControlPanelTab(e,t){const n=document.getElementById("userMenu"),o=n.querySelector("a"),i={icon:this.userMenuButton.querySelector(".userAvatarImage").outerHTML,label:o.dataset.title||o.title,origin:n.id},[r,a]=this.buildTabComponents(i);e.append(r),t.append(a),this.tabs.push(r),this.tabPanels.set(r,a)}buildLegacyTabs(e,t){const n=document.querySelector(".userPanelItems"),o={panels:[]};l.fire("com.woltlab.wcf.pageMenu","legacyMenu",o),Array.from(n.children).filter((e=>void 0!==o.panels.find((t=>t.element===e)))).map((e=>{const t=e.querySelector("a");return{icon:t.querySelector(".icon").outerHTML,label:t.dataset.title||t.title,origin:e.id}})).forEach((n=>{const[i,r]=this.buildTabComponents(n);e.append(i),t.append(r),this.tabs.push(i),this.tabPanels.set(i,r);const a=o.panels.find((e=>e.element.id===n.origin));this.legacyUserPanels.set(i,a.api)}))}buildTabComponents(e){const t=a.default.getUniqueId(),n=a.default.getUniqueId(),o=document.createElement("button");o.type="button",o.classList.add("pageMenuUserTab"),o.dataset.hasUnreadContent="false",o.dataset.origin=e.origin,o.id=t,o.setAttribute("aria-controls",n),o.setAttribute("aria-selected","false"),o.setAttribute("role","tab"),o.tabIndex=-1,o.setAttribute("aria-label",e.label),o.innerHTML=e.icon,o.addEventListener("click",(e=>{e.preventDefault(),this.openTab(o)})),o.addEventListener("keydown",(e=>this.keydown(e)));const i=document.createElement("div");return i.classList.add("pageMenuUserTabPanel"),i.id=n,i.hidden=!0,i.setAttribute("aria-labelledby",t),i.setAttribute("role","tabpanel"),i.tabIndex=0,[o,i]}refreshUnreadIndicator(){null!==this.userMenu.querySelector(".badge.badgeUpdate")?this.userMenu.classList.add("pageMenuMobileButtonHasContent"):this.userMenu.classList.remove("pageMenuMobileButtonHasContent")}refreshTabUnreadIndicators(){this.userMenuProviders.forEach(((e,t)=>{e.hasUnreadContent()?t.dataset.hasUnreadContent="true":t.dataset.hasUnreadContent="false"}))}}t.PageMenuUser=d,t.hasValidUserMenu=function(){return document.getElementById("topMenu").classList.contains("userPanelLoggedIn")},t.default=d})),define("WoltLabSuite/Core/Ui/Mobile",["require","exports","tslib","focus-trap","../Core","../Dom/Change/Listener","../Dom/Util","../Environment","./Alignment","./CloseOverlay","./Dropdown/Reusable","./Page/Menu/Main","./Page/Menu/User","./Screen","../Language"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p,h,m){"use strict";function f(){N=!0,g(),b(),U&&(H=new u.PageMenuMain(W),H.enable(),(0,p.hasValidUserMenu)()&&(R=new p.PageMenuUser,R.enable())),c.default.add("WoltLabSuite/Core/Ui/Mobile",v),r.default.add("WoltLabSuite/Core/Ui/Mobile",(()=>{g(),b()})),document.addEventListener("scroll",(()=>E()),{passive:!0})}function g(){document.querySelectorAll(".buttonGroupNavigation").forEach((e=>{if(e.classList.contains("jsMobileButtonGroupNavigation"))return;e.classList.add("jsMobileButtonGroupNavigation");const t=e.querySelector(".buttonList");if(0===t.childElementCount)return;e.parentElement.classList.add("hasMobileNavigation");const n=document.createElement("button");n.type="button",n.innerHTML='',n.classList.add("dropdownLabel"),n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),v(),e.classList.toggle("open")})),t.addEventListener("click",(function(t){t.stopPropagation(),e.classList.remove("open")})),e.insertBefore(n,e.firstChild)}))}function b(){document.querySelectorAll(".message").forEach((e=>{if(F.has(e))return;const t=e.querySelector(".jsMobileNavigation");if(t){t.addEventListener("click",(e=>{e.stopPropagation(),window.setTimeout((()=>{t.classList.remove("open")}),10)}));const n=e.querySelector(".messageQuickOptions");if(n&&t.childElementCount){n.classList.add("active");let o=n.querySelector(".messageQuickOptionsMobile");null===o&&(o=document.createElement("li"),o.innerHTML=`\n \n `,o.classList.add("messageQuickOptionsMobile"),n.append(o)),o.querySelector("button").addEventListener("click",(o=>{o.stopPropagation(),S(e,n,t)}))}}F.add(e)}))}function v(){document.querySelectorAll(".jsMobileButtonGroupNavigation.open, .jsMobileNavigation.open").forEach((e=>{e.classList.remove("open")})),N&&O&&E()}function w(){V=!0}function y(){V=!1,z.forEach((function(e){e.classList.remove("open")}))}function _(){z.forEach((function(e){e.addEventListener("mousedown",(function(t){V&&t.target===e&&(t.preventDefault(),e.classList.toggle("open"))}))})),V=!0}function E(){O?.classList.remove("dropdownOpen")}function S(e,t,n){if(null===O)O=document.createElement("ul"),O.className="dropdownMenu",d.init("com.woltlab.wcf.jsMobileNavigation",O);else if(O.classList.contains("dropdownOpen")&&(E(),j.deactivate(),j=void 0,q===e))return;O.innerHTML="",c.default.execute(),x(n);const i=n.previousElementSibling;if(i&&i.classList.contains("messageFooterButtonsExtra")){const e=document.createElement("li");e.className="dropdownDivider",O.appendChild(e),x(i)}l.set(O,t,{horizontal:"right",allowFlip:"vertical"}),O.classList.add("dropdownOpen"),q=e,j=(0,o.createFocusTrap)(O,{allowOutsideClick:!0,escapeDeactivates:()=>(S(e,t,n),!1),setReturnFocus:t}),j.activate()}function C(){B=!0,document.querySelectorAll(".boxMenuHasChildren > a").forEach((e=>{e.addEventListener("touchstart",(t=>{B&&"false"===e.getAttribute("aria-expanded")&&(t.preventDefault(),e.setAttribute("aria-expanded","true"),e.addEventListener("touchend",(()=>{document.body.addEventListener("touchstart",(()=>{document.body.addEventListener("touchend",(t=>{const n=e.parentElement,o=t.target;n.contains(o)||o===n||e.setAttribute("aria-expanded","false")}),{once:!0})}),{once:!0})}),{once:!0}))}),{passive:!1})}))}function L(){B=!0}function k(){B=!1}function x(e){e.querySelectorAll(".button").forEach((e=>{if(e.classList.contains("ignoreMobileNavigation")||e.classList.contains("reactButton"))return;const t=document.createElement("li");e.classList.contains("active")&&(t.className="active");const n=e.querySelector("span:not(.icon)");t.innerHTML=`${n.textContent}`,t.children[0].addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),"A"===e.nodeName?e.click():i.triggerEvent(e,"click"),E()})),O.appendChild(t)}))}function T(){c.default.execute(),N=!0,U&&(H.enable(),R?.enable())}function M(){$&&A($,".messageGroupLink")}function D(){c.default.execute(),N=!1,U&&(H.disable(),R?.disable())}function I(){$&&P($),O&&E()}function A(e,t){Array.from(e).forEach((e=>{const n=e.parentElement;let o=n.querySelector(".mobileLinkShadow");if(null===o){const i=e.querySelector(t);i.href&&(o=document.createElement("a"),o.className="mobileLinkShadow",o.href=i.href,o.setAttribute("aria-labelledby",a.default.identify(i)),n.appendChild(o),n.classList.add("mobileLinkShadowContainer"))}}))}function P(e){Array.from(e).forEach((e=>{const t=e.parentElement;if(t.classList.contains("mobileLinkShadowContainer")){const e=t.querySelector(".mobileLinkShadow");null!==e&&e.remove(),t.classList.remove("mobileLinkShadowContainer")}}))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeShadow=t.rebuildShadow=t.disableShadow=t.disable=t.enableShadow=t.enable=t.setup=void 0,i=n.__importStar(i),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importDefault(c),d=n.__importStar(d),h=n.__importStar(h),m=n.__importStar(m);let j,O=null,q=null,N=!1,B=!1,U=!1;const F=new WeakSet;let H,R,W,V=!1,$=null;const z=[];t.setup=function(e,t){U=e,W=t,document.querySelectorAll(".boxesSidebarLeft").forEach((e=>{z.push(e)})),s.touch()&&document.documentElement.classList.add("touch"),"desktop"!==s.platform()&&document.documentElement.classList.add("mobile");const n=document.querySelector(".messageGroupList");n&&($=n.getElementsByClassName("messageGroup")),h.on("screen-md-down",{match:T,unmatch:D,setup:f}),h.on("screen-sm-down",{match:M,unmatch:I,setup:M}),h.on("screen-md-down",{match:w,unmatch:y,setup:_}),!s.touch()||"ios"!==s.platform()&&"android"!==s.platform()||h.on("screen-lg",{match:L,unmatch:k,setup:C})},t.enable=T,t.enableShadow=M,t.disable=D,t.disableShadow=I,t.rebuildShadow=A,t.removeShadow=P})),define("WoltLabSuite/Core/Ui/Page/Action",["require","exports","tslib","../../Core","../../Language","../../Ui/Screen"],(function(e,t,n,o,i,r){"use strict";function a(){if(document.documentElement.classList.contains("disableScrolling"))return;const e=window.pageYOffset;e!==g?(e>=b?(h.classList.contains("initiallyHidden")&&h.classList.remove("initiallyHidden"),h.setAttribute("aria-hidden","false")):h.setAttribute("aria-hidden","true"),l(),-1!==g&&m.classList[e"false"===e.getAttribute("aria-hidden")));p.classList[e?"add":"remove"]("active"),e?m.classList.add("pageActionHasContextButtons"):m.classList.remove("pageActionHasContextButtons")}function c(){if(f)return;f=!0,m=document.createElement("div"),m.className="pageAction",p=document.createElement("div"),p.className="pageActionButtons",m.appendChild(p),h=function(){const e=document.createElement("button");return e.type="button",e.classList.add("button","buttonPrimary","pageActionButtonToTop","initiallyHidden","jsTooltip"),e.title=i.get("wcf.global.scrollUp"),e.setAttribute("aria-hidden","true"),e.innerHTML='',e.addEventListener("click",s),e}(),m.appendChild(h),document.body.appendChild(m);const e=o.debounce(a,100);window.addEventListener("scroll",(()=>{-1===g&&(g=window.pageYOffset,window.setTimeout((()=>{a(),g=window.pageYOffset}),60)),e()}),{passive:!0}),window.addEventListener("touchstart",(()=>{-1!==g&&(g=-1)}),{passive:!0}),r.on("screen-sm-down",{match(){b=50},unmatch(){b=300},setup(){b=50}}),a()}function d(e){const t=u.get(e);t&&(t.parentElement.setAttribute("aria-hidden","true"),l())}Object.defineProperty(t,"__esModule",{value:!0}),t.show=t.hide=t.remove=t.get=t.has=t.add=t.setup=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r);const u=new Map;let p,h,m,f=!1,g=-1,b=300;const v=o.debounce((()=>{g=-1}),50);t.setup=c,t.add=function(e,t,n){c();const o=document.createElement("div");o.className="pageActionButton",o.dataset.name=e,o.setAttribute("aria-hidden","true"),t.classList.add("button"),t.classList.add("buttonPrimary"),o.appendChild(t);let i=null;n&&(i=u.get(n)||null,i&&(i=i.parentElement)),!i&&p.childElementCount&&(i=p.children[0]),i||(i=p.firstChild),p.insertBefore(o,i),m.classList.remove("scrolledDown"),u.set(e,t),o.offsetParent,o.setAttribute("aria-hidden","false"),l()},t.has=function(e){return u.has(e)},t.get=function(e){return u.get(e)},t.remove=function(e){const t=u.get(e);if(void 0!==t){const n=t.parentElement,i=()=>{try{o.stringToBool(n.getAttribute("aria-hidden"))&&(p.removeChild(n),u.delete(e)),n.removeEventListener("transitionend",i)}catch(e){}};n.addEventListener("transitionend",i),d(e)}},t.hide=d,t.show=function(e){const t=u.get(e);if(t){const e=t.parentElement;e.classList.contains("initiallyHidden")&&e.classList.remove("initiallyHidden"),e.setAttribute("aria-hidden","false"),m.classList.remove("scrolledDown"),l()}}})),define("WoltLabSuite/Core/Ui/TabMenu/Simple",["require","exports","tslib","../../Dom/Traverse","../../Dom/Util","../../Environment","../../Event/Handler","WoltLabSuite/Core/Ui/CloseOverlay"],(function(e,t,n,o,i,r,a,s){"use strict";o=n.__importStar(o),i=n.__importDefault(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importDefault(s);class l{container;containers=new Map;isLegacy=!1;store=null;tabs=new Map;constructor(e){this.container=e}validate(){if(!this.container.classList.contains("tabMenuContainer"))return!1;const e=o.childByTag(this.container,"NAV");if(null===e)return!1;const t=e.querySelectorAll("li");if(0===t.length)return!1;o.childrenByTag(this.container,"DIV").forEach((e=>{let t=e.dataset.name;t||(t=i.default.identify(e),e.dataset.name=t),this.containers.set(t,e)}));const n=this.container.id;if(t.forEach((e=>{const t=this._getTabName(e);if(!t)return;if(this.tabs.has(t))throw new Error("Tab names must be unique, li[data-name='"+t+"'] (tab menu id: '"+n+"') exists more than once.");const o=this.containers.get(t);if(void 0===o)throw new Error("Expected content element for li[data-name='"+t+"'] (tab menu id: '"+n+"').");if(o.parentNode!==this.container)throw new Error("Expected content element '"+t+"' (tab menu id: '"+n+"') to be a direct children.");if(1!==e.childElementCount||"A"!==e.children[0].nodeName)throw new Error("Expected exactly one as children for li[data-name='"+t+"'] (tab menu id: '"+n+"').");this.tabs.set(t,e)})),!this.tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+n+"').");return this.isLegacy&&(this.container.dataset.isLegacy="true",this.tabs.forEach((function(e,t){e.setAttribute("aria-controls",t)}))),!0}init(){this.tabs.forEach((e=>{const t=e.children[0];if(t.addEventListener("click",(e=>this._onClick(e))),"ios"===r.platform()){let e=!1;t.addEventListener("touchstart",(()=>{e=!0})),t.addEventListener("touchmove",(()=>{e=!1})),t.addEventListener("touchend",(t=>{e&&(e=!1,t.preventDefault(),this._onClick(t))}))}}));let e=null;const t=l.getIdentifierFromHash();let n;if(""!==t&&(n=this.tabs.get(t),n)){const t=this.container.parentElement;t?.classList.contains("tabMenuContainer")&&(e=this.container)}if(!n){let e=this.container.dataset.preselect||this.container.dataset.active;"true"!==e&&e||(e=!0),!0===e?this.tabs.forEach((function(e){n||i.default.isHidden(e)||e.previousElementSibling&&!i.default.isHidden(e.previousElementSibling)||(n=e)})):"string"==typeof e&&"false"!==e&&(n=this.tabs.get(e))}n&&(this.containers.forEach((e=>{e.classList.add("hidden")})),this.select(null,n,!0));const o=this.container.dataset.store;if(o){const e=document.createElement("input");e.type="hidden",e.name=o,e.value=this.getActiveTab().dataset.name||"",this.container.appendChild(e),this.store=e}return e}select(t,o,i){if(t=t?t.toString():"",!(o=o||this.tabs.get(t))){if(~~t==+t){t=~~t;let e=0;this.tabs.forEach((n=>{e===t&&(o=n),e++}))}if(!o)throw new Error(`Expected a valid tab name, '${t}' given (tab menu id: '${this.container.id}').`)}t=t||o.dataset.name||"";const r=this.getActiveTab();let c=null;if(r){const e=r.dataset.name;if(e===t)return;i||a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"beforeSelect",{tab:r,tabName:e}),r.classList.remove("active"),c=this.containers.get(r.dataset.name||""),c.classList.remove("active"),c.classList.add("hidden"),this.isLegacy&&(r.classList.remove("ui-state-active"),c.classList.remove("ui-state-active"))}o.classList.add("active");const d=this.containers.get(t);if(d.classList.add("active"),d.classList.remove("hidden"),this.isLegacy&&(o.classList.add("ui-state-active"),d.classList.add("ui-state-active")),this.store&&(this.store.value=t),!i){a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"select",{active:o,activeName:t,previous:r,previousName:r?r.dataset.name:null});const e=this.isLegacy&&"function"==typeof window.jQuery?window.jQuery:null;e&&e(this.container).trigger("wcftabsbeforeactivate",{newTab:e(o),oldTab:e(r),newPanel:e(d),oldPanel:e(c)});let n=window.location.href.replace(/#+[^#]*$/,"");l.getIdentifierFromHash()===t?n+=window.location.hash:n+="#"+t,window.history.replaceState(void 0,"",n)}s.default.execute(),new Promise(((t,n)=>{e(["../TabMenu"],t,n)})).then(n.__importStar).then((e=>{e.scrollToTab(o)}))}selectFirstVisible(){let e=null;return this.tabs.forEach((t=>{e||i.default.isHidden(t)||(e=t)})),e&&this.select(null,e,!1),null!==e}hasTab(e){return this.tabs.has(e)}_onClick(e){e.preventDefault();const t=e.currentTarget;this.select(null,t.parentNode)}_getTabName(e){let t=e.dataset.name||null;if(!t&&1===e.childElementCount&&"A"===e.children[0].nodeName){const n=e.children[0];/#([^#]+)$/.exec(n.href)&&(t=RegExp.$1,null===document.getElementById(t)?t=null:(this.isLegacy=!0,e.dataset.name=t))}return t}getActiveTab(){return document.querySelector("#"+this.container.id+" > nav > ul > li.active")}getContainers(){return this.containers}getTabs(){return this.tabs}static getIdentifierFromHash(){return/^#+([^/]+)+(?:\/.+)?/.exec(window.location.hash)?RegExp.$1:""}}return l})),define("WoltLabSuite/Core/Ui/Scroll",["require","exports","tslib","../Dom/Util"],(function(e,t,n,o){"use strict";function i(){null!==l&&window.clearTimeout(l),l=window.setTimeout((()=>{for(const e of a)e();window.removeEventListener("scroll",i),a=[],r=void 0,l=null}),100)}Object.defineProperty(t,"__esModule",{value:!0}),t.element=void 0,o=n.__importDefault(o);let r,a=[],s=null,l=null;t.element=function(e,t,n="smooth"){if(!(e instanceof HTMLElement))throw new TypeError("Expected a valid DOM element.");if(void 0!==t&&"function"!=typeof t)throw new TypeError("Expected a valid callback function.");if(!document.body.contains(e))throw new Error("Element must be part of the visible DOM.");if(a.length>0&&e!==r)throw new Error("Cannot scroll to element, a concurrent request is running.");if(t&&a.push(t),void 0!==r)return;r=e,window.addEventListener("scroll",i);let l=o.default.offset(e).top;if(null===s){s=50;const e=document.getElementById("pageHeaderPanel");if(null!==e){const t=window.getComputedStyle(e).position;s="fixed"===t||"static"===t?e.offsetHeight:0}}s>0&&(l<=s?l=0:l-=s);const c=window.pageYOffset;window.scrollTo({left:0,top:l,behavior:n}),window.setTimeout((()=>{c===window.pageYOffset&&i()}),100)}})),define("WoltLabSuite/Core/Ui/TabMenu",["require","exports","tslib","../Dom/Change/Listener","../Dom/Util","./TabMenu/Simple","./CloseOverlay","./Screen","./Scroll"],(function(e,t,n,o,i,r,a,s,l){"use strict";function c(){document.querySelectorAll(".tabMenuContainer:not(.staticTabMenuContainer)").forEach((e=>{const t=i.default.identify(e);if(w.has(t))return;let n=new r.default(e);if(!n.validate())return;const o=n.init();if(w.set(t,n),o instanceof HTMLElement){const e=f(o.parentNode.id);e&&(n=e,n.select(o.id,void 0,!0))}const a=document.querySelector("#"+t+" > nav > ul");a.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),e.target===a?(a.classList.add("active"),b=a):(a.classList.remove("active"),b=null)})),e.querySelectorAll(".tabMenu, .menu").forEach((e=>{function t(){n=null,m(e)}let n=null;e.querySelector("ul").addEventListener("scroll",(()=>{null!==n&&window.clearTimeout(n),n=window.setTimeout(t,10)}),{passive:!0})}));const s=e.closest("form");if(null!==s){const t=s.querySelector('input[type="submit"]');null!==t&&t.addEventListener("click",(t=>{if(!t.defaultPrevented)for(const n of e.querySelectorAll("input, select, textarea"))if(!n.checkValidity()){t.preventDefault();const e=f(n.closest(".tabMenuContainer").id),o=n.closest(".tabMenuContent");return e.select(o.dataset.name||""),void l.element(n,(()=>{n.reportValidity()}))}}))}}))}function d(){w.forEach((e=>{let t=!1;e.getContainers().forEach((n=>{t||null===n.querySelector(".formError")||(t=!0,e.select(n.id))}))}))}function u(e){v=!0,w.forEach((t=>{const n=t.getActiveTab();e?m(n.closest(".menu, .tabMenu")):g(n)}))}function p(){v=!1}function h(e,t,n,o,i,r){(r||t>0)&&(t-=15),n!==(t=t<0?0:Math.min(t,o-i))&&(e.classList.add("enableAnimation"),n{e.classList.remove("enableAnimation"),e.firstElementChild.style.removeProperty("margin-left"),e.style.removeProperty("padding-left"),e.scrollLeft=t}),300))}function m(e){if(!v)return;const t=e.clientWidth,n=e.querySelector("ul"),o=n.scrollLeft,i=n.scrollWidth,r=o>0;let a=e.querySelector(".tabMenuOverlayLeft");r?(null===a&&(a=document.createElement("button"),a.type="button",a.innerHTML='',a.className="tabMenuOverlayLeft",a.addEventListener("click",(()=>{const e=n.clientWidth;h(n,n.scrollLeft-~~(e/2),n.scrollLeft,n.scrollWidth,e,!1)})),e.insertBefore(a,e.firstChild)),a.classList.add("active")):null!==a&&a.classList.remove("active");const s=t+o',l.className="tabMenuOverlayRight",l.addEventListener("click",(()=>{const e=n.clientWidth;h(n,n.scrollLeft+~~(e/2),n.scrollLeft,n.scrollWidth,e,!1)})),e.appendChild(l)),l.classList.add("active")):null!==l&&l.classList.remove("active")}function f(e){return w.get(e)}function g(e){if(!v)return;const t=e.closest("ul"),n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;if(n===i)return;const r=e.offsetLeft;let a=!1;r{b&&(b.classList.remove("active"),b=null)})),s.on("screen-sm-down",{match(){u(!1)},unmatch:p,setup(){u(!0)}}),window.addEventListener("hashchange",(()=>{const e=r.default.getIdentifierFromHash(),t=e?document.getElementById(e):null;null!==t&&t.classList.contains("tabMenuContent")&&w.forEach((t=>{t.hasTab(e)&&t.select(e)}))}));const e=r.default.getIdentifierFromHash();e&&window.setTimeout((()=>{const t=document.getElementById(e);if(t&&t.classList.contains("tabMenuContent")){const e=window.scrollY||window.pageYOffset;if(e>0){const n=t.parentNode;let o=n.offsetTop-50;if(o<0&&(o=0),e>o){let e=i.default.offset(n).top;e<=50?e=0:e-=50,window.scrollTo(0,e)}}}}),100)},t.getTabMenu=f,t.scrollToTab=g})),define("WoltLabSuite/Core/Ui/Tooltip",["require","exports","tslib","../Environment","../Helper/PageOverlay","../Helper/Selector","./Alignment"],(function(e,t,n,o,i,r,a){"use strict";function s(e){const t=e.currentTarget;let n=t.title.trim();""!==n&&(t.dataset.tooltip=n,t.setAttribute("aria-label",n),t.removeAttribute("title")),n=t.dataset.tooltip||"",u.style.removeProperty("top"),u.style.removeProperty("left"),n.length?(u.classList.add("active"),d.textContent=n,a.set(u,t,{horizontal:"center",verticalOffset:4,pointer:!0,pointerClassNames:["inverse"],vertical:"top"})):u.classList.remove("active")}function l(){u.classList.remove("active")}let c,d,u;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),a=n.__importStar(a),t.setup=function(){"desktop"===o.platform()&&(u=document.createElement("div"),u.id="balloonTooltip",u.classList.add("balloonTooltip"),u.addEventListener("transitionend",(()=>{u.classList.contains("active")||["bottom","left","right","top"].forEach((e=>{u.style.removeProperty(e)}))})),d=document.createElement("span"),d.id="balloonTooltipText",u.appendChild(d),c=document.createElement("span"),c.classList.add("elementPointer"),c.appendChild(document.createElement("span")),u.appendChild(c),(0,i.getPageOverlayContainer)().append(u),(0,r.wheneverSeen)(".jsTooltip",(e=>{e.classList.remove("jsTooltip");const t=e.title.trim();t.length&&(e.dataset.tooltip=t,e.removeAttribute("title"),e.setAttribute("aria-label",t),e.addEventListener("mouseenter",s),e.addEventListener("mouseleave",l),e.addEventListener("click",l))})),window.addEventListener("scroll",l))}})),define("WoltLabSuite/Core/Ui/Page/JumpTo",["require","exports","tslib","../../Language","../Dialog"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=n.__importStar(o),i=n.__importDefault(i);class r{activeElement;description;elements=new Map;input;submitButton;init(e,t){if(t){if("function"!=typeof t)throw new TypeError("Expected a valid function for parameter 'callback'.")}else{const n=e.dataset.link;t=n?e=>{window.location.href=n.replace(/pageNo=%d/,`pageNo=${e}`)}:()=>{}}this.elements.has(e)||e.querySelectorAll(".jumpTo").forEach((n=>{n.addEventListener("click",(t=>this.click(e,t))),this.elements.set(e,t)}))}click(e,t){t.preventDefault(),this.activeElement=e,i.default.open(this);const n=e.dataset.pages||"0";this.input.value=n,this.input.max=n,this.input.select(),this.description.textContent=o.get("wcf.page.jumpTo.description").replace(/#pages#/,n)}_keyUp(e){if("Enter"===e.key&&!this.submitButton.disabled)return void this.submit();const t=+this.input.value;this.submitButton.disabled=t<1||t>+this.input.max}submit(){this.elements.get(this.activeElement)(+this.input.value),i.default.close(this)}_dialogSetup(){const e=`
    \n
    \n
    \n \n \n
    \n
    \n
    \n \n
    `;return{id:"paginationOverlay",options:{onSetup:e=>{this.input=e.querySelector("input"),this.input.addEventListener("keyup",(e=>this._keyUp(e))),this.description=e.querySelector("small"),this.submitButton=e.querySelector("button"),this.submitButton.addEventListener("click",(()=>this.submit()))},title:o.get("wcf.global.page.pagination")},source:e}}}let a=null;t.init=function(e,t){(null===a&&(a=new r),a).init(e,t)}})),define("WoltLabSuite/Core/Ui/Password",["require","exports","tslib","../Dom/Change/Listener","../Language"],(function(e,t,n,o,i){"use strict";function r(){document.querySelectorAll("input[type=password]").forEach((e=>{s.has(e)||function(e){s.add(e);const t=document.activeElement,n=document.createElement("div");n.classList.add("inputAddon"),e.insertAdjacentElement("beforebegin",n),n.appendChild(e);const o=document.createElement("button");o.type="button",o.title=i.get("wcf.global.form.password.button.show"),o.classList.add("button","inputSuffix","jsTooltip"),o.setAttribute("aria-hidden","true"),n.appendChild(o);const r=document.createElement("fa-icon");r.setIcon("eye"),o.appendChild(r),o.addEventListener("click",(()=>{a(e,o,r)})),e.form?.addEventListener("submit",(()=>{"password"!==e.type&&a(e,o,r)})),t===e&&e.focus()}(e)}))}function a(e,t,n){"password"===e.type?(n.setIcon("eye-slash"),t.dataset.tooltip=i.get("wcf.global.form.password.button.hide"),e.type="text"):(n.setIcon("eye"),t.dataset.tooltip=i.get("wcf.global.form.password.button.show"),e.type="password")}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importDefault(o),i=n.__importStar(i);const s=new WeakSet;t.setup=function(){r(),o.default.add("WoltLabSuite/Core/Ui/Password",(()=>r()))}})),define("WoltLabSuite/Core/Ui/Empty",["require","exports","tslib","../Dom/Change/Listener"],(function(e,t,n,o){"use strict";function i(){document.querySelectorAll(".jsReloadPageWhenEmpty").forEach((e=>{e.classList.remove("jsReloadPageWhenEmpty"),r.observe(e,{childList:!0})}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importDefault(o);const r=new MutationObserver((e=>{e.forEach((e=>{const t=e.target;(0===t.childElementCount||Array.from(t.children).every((e=>"ignore"===e.dataset.reloadPageWhenEmpty)))&&window.location.reload()}))}));t.setup=function(){i(),o.default.add("WoltLabSuite/Core/Ui/Empty",(()=>i()))}})),define("WoltLabSuite/Core/Ui/Confirmation",["require","exports","tslib","../Core","../Language","./Dialog"],(function(e,t,n,o,i,r){"use strict";function a(){return l||(l=new s),l}Object.defineProperty(t,"__esModule",{value:!0}),t.getContentElement=t.show=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r);class s{_active=!1;parameters;confirmButton;_content;dialog;text;callbackCancel;callbackConfirm;constructor(){this.dialog=document.createElement("div"),this.dialog.id="wcfSystemConfirmation",this.dialog.classList.add("systemConfirmation"),this.text=document.createElement("p"),this.dialog.appendChild(this.text),this._content=document.createElement("div"),this._content.id="wcfSystemConfirmationContent",this.dialog.appendChild(this._content);const e=document.createElement("div");e.classList.add("formSubmit"),this.dialog.appendChild(e),this.confirmButton=document.createElement("button"),this.confirmButton.type="button",this.confirmButton.dataset.type="submit",this.confirmButton.classList.add("button","buttonPrimary"),this.confirmButton.textContent=i.get("wcf.global.confirmation.confirm"),e.appendChild(this.confirmButton);const t=document.createElement("button");t.type="button",t.classList.add("button"),t.textContent=i.get("wcf.global.confirmation.cancel"),t.addEventListener("click",(()=>{r.default.close(this)})),e.appendChild(t),document.body.appendChild(this.dialog)}open(e){this.parameters=e.parameters||{},this._content.innerHTML="string"==typeof e.template?e.template.trim():"",this.text[e.messageIsHtml?"innerHTML":"textContent"]=e.message,"function"==typeof e.legacyCallback?(this.callbackCancel=t=>{e.legacyCallback("cancel",t,this.content)},this.callbackConfirm=t=>{e.legacyCallback("confirm",t,this.content)}):("function"!=typeof e.cancel&&(e.cancel=()=>{}),this.callbackCancel=e.cancel,this.callbackConfirm=e.confirm),this._active=!0,r.default.open(this)}get active(){return this._active}get content(){return this._content}_confirm(){this.callbackConfirm(this.parameters,this.content),this._active=!1,r.default.close("wcfSystemConfirmation")}_onClose(){this.active&&(this.confirmButton.blur(),this._active=!1,this.callbackCancel(this.parameters))}_onShow(){window.setTimeout((()=>{this.confirmButton.blur(),this.confirmButton.focus()}),1)}_dialogSetup(){return{id:"wcfSystemConfirmation",options:{onClose:this._onClose.bind(this),onShow:this._onShow.bind(this),title:i.get("wcf.global.confirmation.title")}}}_dialogSubmit(){this._confirm()}}let l;t.show=function(e){if(!a().active){if((e=o.extend({cancel:null,confirm:null,legacyCallback:null,message:"",messageIsHtml:!1,parameters:{},template:""},e)).message="string"==typeof e.message?e.message.trim():"",!e.message)throw new Error("Expected a non-empty string for option 'message'.");if("function"!=typeof e.confirm&&"function"!=typeof e.legacyCallback)throw new TypeError("Expected a valid callback for option 'confirm'.");a().open(e)}},t.getContentElement=function(){return a().content}})),define("WoltLabSuite/Core/Ui/Object/Action",["require","exports","tslib","../../Ajax","../../Event/Handler","../Confirmation","../../Language","../../StringUtil","../../Dom/Change/Listener"],(function(e,t,n,o,i,r,a,s,l){"use strict";function c(){document.querySelectorAll(`${d} ${u} ${p}`).forEach((e=>{h.has(e)||(e.addEventListener("click",(e=>function(e){function t(){o.apiOnce({data:{actionName:l,className:c,objectIDs:[p],parameters:h},success:e=>function(e,t){"reload"===e.dataset.objectActionSuccess?window.location.reload():i.fire("WoltLabSuite/Core/Ui/Object/Action",e.dataset.objectAction,{containerElement:e.closest(d),data:t,objectElement:e.closest(u)})}(n,e)})}e.preventDefault();const n=e.currentTarget,l=n.dataset.objectAction;let c=n.closest(d).dataset.objectActionClassName;n.dataset.objectActionClassName&&(c=n.dataset.objectActionClassName);let p=n.closest(u).dataset.objectId;n.dataset.objectId&&(p=n.dataset.objectId);const h={};Object.entries(n.dataset).forEach((([e,t])=>{let n=/^objectActionParameterData(.+)/.exec(e);if(n)Object.prototype.hasOwnProperty.call(h,"data")||(h.data={}),h.data[s.lcfirst(n[1])]=t;else if(n=/^objectActionParameter(.+)/.exec(e),n){const e=s.lcfirst(n[1]);if("data"===e)throw new Error("Additional object action parameters may not use 'data' as key.");h[e]=t}})),n.dataset.confirmMessage?r.show({confirm:t,message:a.get(n.dataset.confirmMessage),messageIsHtml:!0}):t()}(e))),h.add(e))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),l=n.__importDefault(l);const d=".jsObjectActionContainer[data-object-action-class-name]",u=".jsObjectActionObject[data-object-id]",p=".jsObjectAction[data-object-action]",h=new Set;t.setup=function(){c(),l.default.add("WoltLabSuite/Core/Ui/Action",(()=>c()))}})),define("WoltLabSuite/Core/Controller/Clipboard",["require","exports","tslib","../Ajax","../Core","../Dom/Change/Listener","../Dom/Util","../Event/Handler","../Language","../Ui/Confirmation","../Ui/Dropdown/Simple","../Ui/Page/Action","../Ui/Screen"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p){"use strict";function h(){return f||(f=new m),f}Object.defineProperty(t,"__esModule",{value:!0}),t.unmark=t.showEditor=t.hideEditor=t.reload=t.setup=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),d=n.__importDefault(d),u=n.__importStar(u),p=n.__importStar(p);class m{containers=new Map;editors=new Map;editorDropdowns=new Map;itemData=new WeakMap;knownCheckboxes=new WeakSet;pageClassNames=[];pageObjectId=0;reloadPageOnSuccess=new Map;setup(e){if(!e.pageClassName)throw new Error("Expected a non-empty string for parameter 'pageClassName'.");let t=!1;0===this.pageClassNames.length&&(t=e.hasMarkedItems,this.pageObjectId=e.pageObjectId),this.pageClassNames.push(e.pageClassName),this.initContainers(),t&&this.containers.size&&this.loadMarkedItems(),r.default.add("WoltLabSuite/Core/Controller/Clipboard",(()=>this.initContainers()))}reload(){this.containers.size&&this.loadMarkedItems()}initContainers(){document.querySelectorAll(".jsClipboardContainer").forEach((e=>{const t=a.default.identify(e);let n=this.containers.get(t);if(void 0===n){const o=e.querySelector(".jsClipboardMarkAll");null!==o&&(o.dataset.containerId=t,o.addEventListener("click",(e=>this.markAll(e)))),n={checkboxes:e.getElementsByClassName("jsClipboardItem"),element:e,markAll:o,markedObjectIds:new Set},this.containers.set(t,n)}Array.from(n.checkboxes).forEach((e=>{this.knownCheckboxes.has(e)||(e.dataset.containerId=t,null===e.closest("a")?e.addEventListener("click",(e=>this.mark(e))):e.addEventListener("click",(t=>{t.preventDefault(),window.setTimeout((()=>{e.checked=!e.checked,this.mark(e)}),10)})),this.knownCheckboxes.add(e))}))}))}loadMarkedItems(){o.api(this,{actionName:"getMarkedItems",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId}})}markAll(e){const t=e.currentTarget,n="INPUT"!==t.nodeName||t.checked;this.setParentAsMarked(t,n);const o=[],i=t.dataset.containerId,r=this.containers.get(i),a=r.element.dataset.type;Array.from(r.checkboxes).forEach((e=>{const i=~~e.dataset.objectId;n?e.checked||(e.checked=!0,r.markedObjectIds.add(i),o.push(i)):e.checked&&(e.checked=!1,r.markedObjectIds.delete(i),o.push(i)),this.setParentAsMarked(e,n);const a=t.closest(".jsClipboardObject");null!==a&&(n?a.classList.add("jsMarked"):a.classList.remove("jsMarked"))})),this.saveState(a,o,n)}mark(e){const t=e instanceof Event?e.currentTarget:e,n=~~t.dataset.objectId,o=t.checked,i=t.dataset.containerId,r=this.containers.get(i),a=r.element.dataset.type,s=t.closest(".jsClipboardObject");o?(r.markedObjectIds.add(n),s.classList.add("jsMarked")):(r.markedObjectIds.delete(n),s.classList.remove("jsMarked")),null!==r.markAll&&(r.markAll.checked=!Array.from(r.checkboxes).some((e=>!e.checked)),this.setParentAsMarked(r.markAll,o)),this.setParentAsMarked(t,t.checked),this.saveState(a,[n],o)}saveState(e,t,n){o.api(this,{actionName:n?"mark":"unmark",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId,objectIDs:t,objectType:e}})}executeAction(e){function t(){const e=n.dataset.type;s.fire("com.woltlab.wcf.clipboard",e,{data:o,listItem:n,responseData:null})}const n=e.currentTarget,o=this.itemData.get(n);if(o.url)return void(window.location.href=o.url);const r="string"==typeof o.internalData.confirmMessage?o.internalData.confirmMessage:"";let a=!0;if(i.isPlainObject(o.parameters)&&o.parameters.actionName&&o.parameters.className){if("unmarkAll"===o.parameters.actionName||Array.isArray(o.parameters.objectIDs))if(r.length){const e="string"==typeof o.internalData.template?o.internalData.template:"";c.show({confirm:()=>{const t={};e.length&&c.getContentElement().querySelectorAll("input, select, textarea").forEach((e=>{const n=e.name;switch(e.nodeName){case"INPUT":("checkbox"!==e.type&&"radio"!==e.type||e.checked)&&(t[n]=e.value);break;case"SELECT":t[n]=e.value;break;case"TEXTAREA":t[n]=e.value.trim()}})),this.executeProxyAction(n,o,t)},message:r,template:e})}else this.executeProxyAction(n,o)}else r.length&&(a=!1,c.show({confirm:t,message:r}));a&&t()}executeProxyAction(e,t,n={}){const r="unmarkAll"!==t.parameters.actionName?t.parameters.objectIDs:[],a={data:n};i.isPlainObject(t.internalData.parameters)&&Object.entries(t.internalData.parameters).forEach((([e,t])=>{a[e]=t})),o.api(this,{actionName:t.parameters.actionName,className:t.parameters.className,objectIDs:r,parameters:a},(n=>{if("unmarkAll"!==t.actionName){const o=e.dataset.type;s.fire("com.woltlab.wcf.clipboard",o,{data:t,listItem:e,responseData:n});const i=this.reloadPageOnSuccess.get(o);if(i&&i.includes(n.actionName))return void window.location.reload()}this.loadMarkedItems()}))}unmarkAll(e){const t=e.currentTarget;o.api(this,{actionName:"unmarkAll",parameters:{objectType:t.dataset.type}})}_ajaxSetup(){return{data:{className:"wcf\\data\\clipboard\\item\\ClipboardItemAction"}}}_ajaxSuccess(e){if("unmarkAll"===e.actionName){const t=e.returnValues.objectType;return void this.containers.forEach((e=>{e.element.dataset.type===t&&(e.element.querySelectorAll(".jsMarked").forEach((e=>e.classList.remove("jsMarked"))),null!==e.markAll&&(e.markAll.checked=!1,this.setParentAsMarked(e.markAll,!1)),Array.from(e.checkboxes).forEach((e=>{e.checked=!1,this.setParentAsMarked(e,!1)})),u.remove(`wcfClipboard-${t}`))}))}this.itemData=new WeakMap,this.reloadPageOnSuccess.clear();const t=i.isPlainObject(e.returnValues.markedItems)?e.returnValues.markedItems:{};this.containers.forEach((e=>{const n=e.element.dataset.type,o=Array.isArray(t[n])?t[n]:[];this.rebuildMarkings(e,o)}));const n=Object.keys(e.returnValues.items||{});this.editors.forEach(((e,t)=>{n.includes(t)||(u.remove(`wcfClipboard-${t}`),this.editorDropdowns.get(t).innerHTML="")})),e.returnValues.items&&Object.entries(e.returnValues.items).forEach((([e,t])=>{this.reloadPageOnSuccess.set(e,t.reloadPageOnSuccess);let o=!1,i=this.editors.get(e),r=this.editorDropdowns.get(e);void 0===i?(o=!0,i=document.createElement("a"),i.className="dropdownToggle",i.textContent=t.label,this.editors.set(e,i),r=document.createElement("ol"),r.className="dropdownMenu",this.editorDropdowns.set(e,r)):(i.textContent=t.label,r.innerHTML=""),Object.values(t.items).forEach((t=>{const n=document.createElement("li"),o=document.createElement("span");o.textContent=t.label,n.appendChild(o),r.appendChild(n),n.dataset.type=e,n.addEventListener("click",(e=>this.executeAction(e))),this.itemData.set(n,t)}));const a=document.createElement("li");a.classList.add("dropdownDivider"),r.appendChild(a);const s=document.createElement("li");s.dataset.type=e;const c=document.createElement("span");if(c.textContent=l.get("wcf.clipboard.item.unmarkAll"),s.appendChild(c),s.addEventListener("click",(e=>this.unmarkAll(e))),r.appendChild(s),-1!==n.indexOf(e)){const t=`wcfClipboard-${e}`;u.has(t)?u.show(t):u.add(t,i)}if(o){const e=i.parentElement;e.classList.add("dropdown"),e.appendChild(r),d.default.init(i)}}))}rebuildMarkings(e,t){let n=!0;if(Array.from(e.checkboxes).forEach((e=>{const o=e.closest(".jsClipboardObject"),i=t.includes(~~e.dataset.objectId);i||(n=!1),e.checked=i,i?o.classList.add("jsMarked"):o.classList.remove("jsMarked"),this.setParentAsMarked(e,i)})),null!==e.markAll){e.markAll.checked=n,this.setParentAsMarked(e.markAll,n);const t=e.markAll.closest(".columnMark")?.parentNode;t&&(n?t.classList.add("jsMarked"):t.classList.remove("jsMarked"))}}setParentAsMarked(e,t){const n=e.parentElement;"checkbox"===n.getAttribute("role")&&n.setAttribute("aria-checked",t?"true":"false")}hideEditor(e){u.remove("wcfClipboard-"+e),p.pageOverlayOpen()}showEditor(){this.loadMarkedItems(),p.pageOverlayClose()}unmark(e,t){this.saveState(e,t,!1)}}let f;t.setup=function(e){h().setup(e)},t.reload=function(){h().reload()},t.hideEditor=function(e){h().hideEditor(e)},t.showEditor=function(){h().showEditor()},t.unmark=function(e,t){h().unmark(e,t)}})),define("WoltLabSuite/Core/Ui/Object/Action/Handler",["require","exports","tslib","../../../Event/Handler","../../../Controller/Clipboard"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o=n.__importStar(o),i=n.__importStar(i),t.default=class{objectAction;constructor(e,t,n){this.objectAction=n,o.add("WoltLabSuite/Core/Ui/Object/Action",e,(e=>this.handleObjectAction(e))),document.querySelectorAll(".jsClipboardContainer[data-type]").forEach((e=>{o.add("com.woltlab.wcf.clipboard",e.dataset.type,(e=>{null!==e.responseData&&-1!==t.indexOf(e.responseData.actionName)&&this.handleClipboardAction(e)}))}))}handleClipboardAction(e){const t=e.listItem.dataset.type;document.querySelectorAll(`.jsClipboardContainer[data-type="${t}"] .jsClipboardObject`).forEach((t=>{const n=t.dataset.objectId;e.responseData.objectIDs.forEach((o=>{~~o==~~n&&this.objectAction({containerElement:t.closest(".jsObjectActionContainer"),data:e.responseData,objectElement:t})}))}))}handleObjectAction(e){this.objectAction(e),i.reload()}}})),define("WoltLabSuite/Core/Ui/Object/Action/Delete",["require","exports","tslib","./Handler"],(function(e,t,n,o){"use strict";function i(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="delete"]');if(!t||t.dataset.objectActionHandler)return;const n=e.objectElement.querySelector(".jsObjectActionObjectChildren");n&&Array.from(n.children).forEach((t=>{e.objectElement.insertAdjacentElement("beforebegin",t)})),e.objectElement.remove()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importDefault(o),t.setup=function(){new o.default("delete",["delete"],i)}})),define("WoltLabSuite/Core/Ui/Object/Action/Toggle",["require","exports","tslib","../../../Language","./Handler"],(function(e,t,n,o,i){"use strict";function r(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="toggle"]');if(!t||t.dataset.objectActionHandler)return;const n="FA-ICON"===t.nodeName?t:t.querySelector("fa-icon");if(n)if("square"===n.name){n.setIcon("square-check");const e=t.dataset.disableTitle||o.get("wcf.global.button.disable");t.title=e}else{n.setIcon("square");const e=t.dataset.enableTitle||o.get("wcf.global.button.enable");t.title=e}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),i=n.__importDefault(i),t.setup=function(){new i.default("toggle",["enable","disable"],r)}})),define("WoltLabSuite/Core/Ui/Search",["require","exports","tslib","../Event/Handler","./Alignment","./CloseOverlay","./Dropdown/Simple","./Screen","../Environment","../Dom/Util"],(function(e,t,n,o,i,r,a,s,l,c){"use strict";function d(){r.default.execute(r.Origin.Search),f.classList.add("searchBarOpen"),_?.parentElement.classList.add("open"),h||i.set(b,y,{horizontal:"right"}),b.style.setProperty("top",`${g.clientHeight}px`,""),w.focus(),window.setTimeout((()=>{const e=w.value.length;w.selectionStart=e,w.selectionEnd=e}),1)}function u(){if(!f.classList.contains("searchBarOpen")&&!b.classList.contains("open"))return;f.classList.remove("searchBarOpen"),b.classList.remove("open"),_?.parentElement.classList.remove("open"),["bottom","left","right","top"].forEach((e=>{b.style.removeProperty(e)})),"ios"===l.platform()&&(s.scrollEnable(),void 0!==p&&(document.body.scrollTop=p,p=void 0)),h&&w.blur();const e=document.getElementById("pageHeaderSearchMobile");e&&(e.setAttribute("aria-expanded","false"),e.querySelector("fa-icon").setIcon("magnifying-glass"));const t=b.querySelector(".pageHeaderSearchType");a.default.close(t.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l);let p,h=!1;const m=document.body.classList.contains("wcfAcp"),f=document.getElementById("pageHeader"),g=document.getElementById("pageHeaderPanel"),b=document.getElementById("pageHeaderSearch");let v;const w=document.getElementById("pageHeaderSearchInput"),y=document.getElementById("topMenu"),_=document.getElementById("userPanelSearchButton");t.init=function(){m&&null===b||(function(){b.addEventListener("click",(e=>e.stopPropagation()));const e=document.querySelector(".pageHeaderSearchType"),t=(0,c.identify)(e);a.default.getDropdownMenu(t).addEventListener("click",(e=>{e.stopPropagation(),a.default.close(t)})),_?.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),f.classList.contains("searchBarOpen")?u():d()})),r.default.add("WoltLabSuite/Core/Ui/Search",((e,t)=>{if(e!==r.Origin.Search){if(e===r.Origin.DropDown){if(document.getElementById("pageHeaderSearchTypeSelect").dataset.target===t)return;if(w.parentElement.id===t)return}u(),v?.setAttribute("aria-expanded","false")}}))}(),s.on("screen-md-down",{match(){h=!0},unmatch(){h=!1,p=void 0},setup(){h=!0,function(){const e=document.getElementById("pageHeaderSearchMobile");v=e,e.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),"true"===e.getAttribute("aria-expanded")?u():("ios"===l.platform()&&(p=document.body.scrollTop,s.scrollDisable()),d(),b.style.setProperty("top",`${f.offsetHeight}px`,""),b.classList.add("open"),w.focus(),"ios"===l.platform()&&(document.body.scrollTop=0),e.setAttribute("aria-expanded","true"),e.querySelector("fa-icon").setIcon("xmark"))})),b.addEventListener("click",(e=>{e.stopPropagation(),e.target===b&&(e.preventDefault(),u())}))}()}}),o.add("com.woltlab.wcf.Search","close",(()=>u())))}})),define("WoltLabSuite/Core/LazyLoader",["require","exports"],(function(e,t){"use strict";function n(e){void 0!==r.get(e)&&window.cancelAnimationFrame(r.get(e)),r.set(e,window.requestAnimationFrame((()=>{for(const t of i.keys())if(e.matches(t)||null!==e.querySelector(t)){for(const e of i.get(t))a.then((()=>e()));i.delete(t)}r.delete(e)})))}let o;Object.defineProperty(t,"__esModule",{value:!0}),t.whenFirstSeen=void 0;const i=new Map,r=new Map,a=new Promise((e=>{"loading"===document.readyState?document.addEventListener("readystatechange",(()=>e()),{once:!0}):e()}));t.whenFirstSeen=function(e,t){i.has(e)||i.set(e,[]),i.get(e).push(t),n(document.body),void 0===o&&(o=new MutationObserver((e=>{if(0!==i.size)for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&n(e)}))),o.observe(document,{subtree:!0,childList:!0})}})),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("perfect-scrollbar",t):(e=e||self).PerfectScrollbar=t()}(this,(function(){"use strict";function e(e){return getComputedStyle(e)}function t(e,t){var n,o;for(n in t)"number"==typeof(o=t[n])&&(o+="px"),e.style[n]=o;return e}function n(e){var t=document.createElement("div");return t.className=e,t}function o(e,t){if(!v)throw new Error("No element matching method supported");return v.call(e,t)}function i(e){e.remove?e.remove():e.parentNode&&e.parentNode.removeChild(e)}function r(e,t){return Array.prototype.filter.call(e.children,(function(e){return o(e,t)}))}function a(e,t){var n=e.element.classList,o=w.state.scrolling(t);n.contains(o)?clearTimeout(y[t]):n.add(o)}function s(e,t){y[t]=setTimeout((function(){return e.isAlive&&e.element.classList.remove(w.state.scrolling(t))}),e.settings.scrollingThreshold)}function l(e){if("function"==typeof window.CustomEvent)return new CustomEvent(e);var t=document.createEvent("CustomEvent");return t.initCustomEvent(e,!1,!1,void 0),t}function c(e,t,n,o,i){var r;if(void 0===o&&(o=!0),void 0===i&&(i=!1),"top"===t)r=["contentHeight","containerHeight","scrollTop","y","up","down"];else{if("left"!==t)throw new Error("A proper axis should be provided");r=["contentWidth","containerWidth","scrollLeft","x","left","right"]}!function(e,t,n,o,i){var r,c=n[0],d=n[1],u=n[2],p=n[3],h=n[4],m=n[5];void 0===o&&(o=!0),void 0===i&&(i=!1),r=e.element,e.reach[p]=null,r[u]<1&&(e.reach[p]="start"),r[u]>e[c]-e[d]-1&&(e.reach[p]="end"),t&&(r.dispatchEvent(l("ps-scroll-"+p)),t<0?r.dispatchEvent(l("ps-scroll-"+h)):t>0&&r.dispatchEvent(l("ps-scroll-"+m)),o&&function(e,t){a(e,t),s(e,t)}(e,p)),e.reach[p]&&(t||i)&&r.dispatchEvent(l("ps-"+p+"-reach-"+e.reach[p]))}(e,n,r,o,i)}function d(e){return parseInt(e,10)||0}function u(e){var n=e.element,o=Math.floor(n.scrollTop),a=n.getBoundingClientRect();e.containerWidth=Math.round(a.width),e.containerHeight=Math.round(a.height),e.contentWidth=n.scrollWidth,e.contentHeight=n.scrollHeight,n.contains(e.scrollbarXRail)||(r(n,w.element.rail("x")).forEach((function(e){return i(e)})),n.appendChild(e.scrollbarXRail)),n.contains(e.scrollbarYRail)||(r(n,w.element.rail("y")).forEach((function(e){return i(e)})),n.appendChild(e.scrollbarYRail)),!e.settings.suppressScrollX&&e.containerWidth+e.settings.scrollXMarginOffset=e.railXWidth-e.scrollbarXWidth&&(e.scrollbarXLeft=e.railXWidth-e.scrollbarXWidth),e.scrollbarYTop>=e.railYHeight-e.scrollbarYHeight&&(e.scrollbarYTop=e.railYHeight-e.scrollbarYHeight),function(e,n){var o,i={width:n.railXWidth},r=Math.floor(e.scrollTop);n.isRtl?i.left=n.negativeScrollAdjustment+e.scrollLeft+n.containerWidth-n.contentWidth:i.left=e.scrollLeft,n.isScrollbarXUsingBottom?i.bottom=n.scrollbarXBottom-r:i.top=n.scrollbarXTop+r,t(n.scrollbarXRail,i),o={top:r,height:n.railYHeight},n.isScrollbarYUsingRight?n.isRtl?o.right=n.contentWidth-(n.negativeScrollAdjustment+e.scrollLeft)-n.scrollbarYRight-n.scrollbarYOuterWidth-9:o.right=n.scrollbarYRight-e.scrollLeft:n.isRtl?o.left=n.negativeScrollAdjustment+e.scrollLeft+2*n.containerWidth-n.contentWidth-n.scrollbarYLeft-n.scrollbarYOuterWidth:o.left=n.scrollbarYLeft+e.scrollLeft,t(n.scrollbarYRail,o),t(n.scrollbarX,{left:n.scrollbarXLeft,width:n.scrollbarXWidth-n.railBorderXWidth}),t(n.scrollbarY,{top:n.scrollbarYTop,height:n.scrollbarYHeight-n.railBorderYWidth})}(n,e),e.scrollbarXActive?n.classList.add(w.state.active("x")):(n.classList.remove(w.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,n.scrollLeft=!0===e.isRtl?e.contentWidth:0),e.scrollbarYActive?n.classList.add(w.state.active("y")):(n.classList.remove(w.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,n.scrollTop=0)}function p(e,t){return e.settings.minScrollbarLength&&(t=Math.max(t,e.settings.minScrollbarLength)),e.settings.maxScrollbarLength&&(t=Math.min(t,e.settings.maxScrollbarLength)),t}function h(e,t){function n(t){t.touches&&t.touches[0]&&(t[c]=t.touches[0].pageY),b[m]=v+_*(t[c]-y),a(e,f),u(e),t.stopPropagation(),t.type.startsWith("touch")&&t.changedTouches.length>1&&t.preventDefault()}function o(){s(e,f),e[g].classList.remove(w.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",n)}function i(t,i){v=b[m],i&&t.touches&&(t[c]=t.touches[0].pageY),y=t[c],_=(e[l]-e[r])/(e[d]-e[h]),i?e.event.bind(e.ownerDocument,"touchmove",n):(e.event.bind(e.ownerDocument,"mousemove",n),e.event.once(e.ownerDocument,"mouseup",o),t.preventDefault()),e[g].classList.add(w.state.clicking),t.stopPropagation()}var r=t[0],l=t[1],c=t[2],d=t[3],p=t[4],h=t[5],m=t[6],f=t[7],g=t[8],b=e.element,v=null,y=null,_=null;e.event.bind(e[p],"mousedown",(function(e){i(e)})),e.event.bind(e[p],"touchstart",(function(e){i(e,!0)}))}var m,f,g,b,v="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),w={main:"ps",rtl:"ps__rtl",element:{thumb:function(e){return"ps__thumb-"+e},rail:function(e){return"ps__rail-"+e},consuming:"ps__child--consume"},state:{focus:"ps--focus",clicking:"ps--clicking",active:function(e){return"ps--active-"+e},scrolling:function(e){return"ps--scrolling-"+e}}},y={x:null,y:null},_=function(e){this.element=e,this.handlers={}},E={isEmpty:{configurable:!0}};return _.prototype.bind=function(e,t){void 0===this.handlers[e]&&(this.handlers[e]=[]),this.handlers[e].push(t),this.element.addEventListener(e,t,{passive:!1})},_.prototype.unbind=function(e,t){var n=this;this.handlers[e]=this.handlers[e].filter((function(o){return!(!t||o===t)||(n.element.removeEventListener(e,o,!1),!1)}))},_.prototype.unbindAll=function(){for(var e in this.handlers)this.unbind(e)},E.isEmpty.get=function(){var e=this;return Object.keys(this.handlers).every((function(t){return 0===e.handlers[t].length}))},Object.defineProperties(_.prototype,E),(m=function(){this.eventElements=[]}).prototype.eventElement=function(e){var t=this.eventElements.filter((function(t){return t.element===e}))[0];return t||(t=new _(e),this.eventElements.push(t)),t},m.prototype.bind=function(e,t,n){this.eventElement(e).bind(t,n)},m.prototype.unbind=function(e,t,n){var o=this.eventElement(e);o.unbind(t,n),o.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(o),1)},m.prototype.unbindAll=function(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},m.prototype.once=function(e,t,n){var o=this.eventElement(e),i=function(e){o.unbind(t,i),n(e)};o.bind(t,i)},f={isWebKit:"undefined"!=typeof document&&"WebkitAppearance"in document.documentElement.style,supportsTouch:"undefined"!=typeof window&&("ontouchstart"in window||"maxTouchPoints"in window.navigator&&window.navigator.maxTouchPoints>0||window.DocumentTouch&&document instanceof window.DocumentTouch),supportsIePointer:"undefined"!=typeof navigator&&navigator.msMaxTouchPoints,isChrome:"undefined"!=typeof navigator&&/Chrome/i.test(navigator&&navigator.userAgent)},function(){return{handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1}},g={"click-rail":function(e){e.element,e.event.bind(e.scrollbarY,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarYRail,"mousedown",(function(t){var n=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top>e.scrollbarYTop?1:-1;e.element.scrollTop+=n*e.containerHeight,u(e),t.stopPropagation()})),e.event.bind(e.scrollbarX,"mousedown",(function(e){return e.stopPropagation()})),e.event.bind(e.scrollbarXRail,"mousedown",(function(t){var n=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=n*e.containerWidth,u(e),t.stopPropagation()}))},"drag-thumb":function(e){h(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),h(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(e){var t=e.element;e.event.bind(e.ownerDocument,"keydown",(function(n){var i,r,a,s;if(!(n.isDefaultPrevented&&n.isDefaultPrevented()||n.defaultPrevented)&&(o(t,":hover")||o(e.scrollbarX,":focus")||o(e.scrollbarY,":focus"))){if(i=document.activeElement?document.activeElement:e.ownerDocument.activeElement){if("IFRAME"===i.tagName)i=i.contentDocument.activeElement;else for(;i.shadowRoot;)i=i.shadowRoot.activeElement;if(o(s=i,"input,[contenteditable]")||o(s,"select,[contenteditable]")||o(s,"textarea,[contenteditable]")||o(s,"button,[contenteditable]"))return}switch(r=0,a=0,n.which){case 37:r=n.metaKey?-e.contentWidth:n.altKey?-e.containerWidth:-30;break;case 38:a=n.metaKey?e.contentHeight:n.altKey?e.containerHeight:30;break;case 39:r=n.metaKey?e.contentWidth:n.altKey?e.containerWidth:30;break;case 40:a=n.metaKey?-e.contentHeight:n.altKey?-e.containerHeight:-30;break;case 32:a=n.shiftKey?e.containerHeight:-e.containerHeight;break;case 33:a=e.containerHeight;break;case 34:a=-e.containerHeight;break;case 36:a=e.contentHeight;break;case 35:a=-e.contentHeight;break;default:return}e.settings.suppressScrollX&&0!==r||e.settings.suppressScrollY&&0!==a||(t.scrollTop-=a,t.scrollLeft+=r,u(e),function(n,o){var i,r=Math.floor(t.scrollTop);if(0===n){if(!e.scrollbarYActive)return!1;if(0===r&&o>0||r>=e.contentHeight-e.containerHeight&&o<0)return!e.settings.wheelPropagation}if(i=t.scrollLeft,0===o){if(!e.scrollbarXActive)return!1;if(0===i&&n<0||i>=e.contentWidth-e.containerWidth&&n>0)return!e.settings.wheelPropagation}return!0}(r,a)&&n.preventDefault())}}))},wheel:function(t){function n(n){var i,r=function(e){var t=e.deltaX,n=-1*e.deltaY;return void 0!==t&&void 0!==n||(t=-1*e.wheelDeltaX/6,n=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,n*=10),t!=t&&n!=n&&(t=0,n=e.wheelDelta),e.shiftKey?[-n,-t]:[t,n]}(n),a=r[0],s=r[1];(function(t,n,i){var r,a,s,l;if(!f.isWebKit&&o.querySelector("select:focus"))return!0;if(!o.contains(t))return!1;for(r=t;r&&r!==o;){if(r.classList.contains(w.element.consuming))return!0;if(a=e(r),i&&a.overflowY.match(/(scroll|auto)/)&&(s=r.scrollHeight-r.clientHeight)>0&&(r.scrollTop>0&&i<0||r.scrollTop0))return!0;if(n&&a.overflowX.match(/(scroll|auto)/)&&(l=r.scrollWidth-r.clientWidth)>0&&(r.scrollLeft>0&&n<0||r.scrollLeft0))return!0;r=r.parentNode}return!1})(n.target,a,s)||(i=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(s?o.scrollTop-=s*t.settings.wheelSpeed:o.scrollTop+=a*t.settings.wheelSpeed,i=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(a?o.scrollLeft+=a*t.settings.wheelSpeed:o.scrollLeft-=s*t.settings.wheelSpeed,i=!0):(o.scrollTop-=s*t.settings.wheelSpeed,o.scrollLeft+=a*t.settings.wheelSpeed),u(t),i=i||function(e,n){var i=Math.floor(o.scrollTop),r=0===o.scrollTop,a=i+o.offsetHeight===o.scrollHeight,s=0===o.scrollLeft,l=o.scrollLeft+o.offsetWidth===o.scrollWidth;return!(Math.abs(n)>=Math.abs(e)?r&&n>0||a&&n<0:s&&e>0||l&&e<0)||!t.settings.wheelPropagation}(a,s),i&&!n.ctrlKey&&(n.stopPropagation(),n.preventDefault()))}var o=t.element;void 0!==window.onwheel?t.event.bind(o,"wheel",n):void 0!==window.onmousewheel&&t.event.bind(o,"mousewheel",n)},touch:function(t){function n(e,n){l.scrollTop-=n,l.scrollLeft-=e,u(t)}function o(e){return e.targetTouches?e.targetTouches[0]:e}function i(e){return!(e.pointerType&&"pen"===e.pointerType&&0===e.buttons||(!e.targetTouches||1!==e.targetTouches.length)&&(!e.pointerType||"mouse"===e.pointerType||e.pointerType===e.MSPOINTER_TYPE_MOUSE))}function r(e){if(i(e)){var t=o(e);c.pageX=t.pageX,c.pageY=t.pageY,d=(new Date).getTime(),null!==h&&clearInterval(h)}}function a(r){var a,s,u,h,m,g;if(i(r)){if(u=(s={pageX:(a=o(r)).pageX,pageY:a.pageY}).pageX-c.pageX,h=s.pageY-c.pageY,function(t,n,o){var i,r,a,s;if(!l.contains(t))return!1;for(i=t;i&&i!==l;){if(i.classList.contains(w.element.consuming))return!0;if(r=e(i),o&&r.overflowY.match(/(scroll|auto)/)&&(a=i.scrollHeight-i.clientHeight)>0&&(i.scrollTop>0&&o<0||i.scrollTop0))return!0;if(n&&r.overflowX.match(/(scroll|auto)/)&&(s=i.scrollWidth-i.clientWidth)>0&&(i.scrollLeft>0&&n<0||i.scrollLeft0))return!0;i=i.parentNode}return!1}(r.target,u,h))return;n(u,h),c=s,(g=(m=(new Date).getTime())-d)>0&&(p.x=u/g,p.y=h/g,d=m),function(e,n){var o=Math.floor(l.scrollTop),i=l.scrollLeft,r=Math.abs(e),a=Math.abs(n);if(a>r){if(n<0&&o===t.contentHeight-t.containerHeight||n>0&&0===o)return 0===window.scrollY&&n>0&&f.isChrome}else if(r>a&&(e<0&&i===t.contentWidth-t.containerWidth||e>0&&0===i))return!0;return!0}(u,h)&&r.preventDefault()}}function s(){t.settings.swipeEasing&&(clearInterval(h),h=setInterval((function(){t.isInitialized?clearInterval(h):p.x||p.y?Math.abs(p.x)<.01&&Math.abs(p.y)<.01?clearInterval(h):t.element?(n(30*p.x,30*p.y),p.x*=.8,p.y*=.8):clearInterval(h):clearInterval(h)}),10))}var l,c,d,p,h;(f.supportsTouch||f.supportsIePointer)&&(l=t.element,c={},d=0,p={},h=null,f.supportsTouch?(t.event.bind(l,"touchstart",r),t.event.bind(l,"touchmove",a),t.event.bind(l,"touchend",s)):f.supportsIePointer&&(window.PointerEvent?(t.event.bind(l,"pointerdown",r),t.event.bind(l,"pointermove",a),t.event.bind(l,"pointerup",s)):window.MSPointerEvent&&(t.event.bind(l,"MSPointerDown",r),t.event.bind(l,"MSPointerMove",a),t.event.bind(l,"MSPointerUp",s))))}},(b=function(o,i){var r,a,s,l,c,p,h,f=this;if(void 0===i&&(i={}),"string"==typeof o&&(o=document.querySelector(o)),!o||!o.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(r in this.element=o,o.classList.add(w.main),this.settings={handlers:["click-rail","drag-thumb","keyboard","wheel","touch"],maxScrollbarLength:null,minScrollbarLength:null,scrollingThreshold:1e3,scrollXMarginOffset:0,scrollYMarginOffset:0,suppressScrollX:!1,suppressScrollY:!1,swipeEasing:!0,useBothWheelAxes:!1,wheelPropagation:!0,wheelSpeed:1},i)this.settings[r]=i[r];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null,a=function(){return o.classList.add(w.state.focus)},s=function(){return o.classList.remove(w.state.focus)},this.isRtl="rtl"===e(o).direction,!0===this.isRtl&&o.classList.add(w.rtl),this.isNegativeScroll=(p=o.scrollLeft,null,o.scrollLeft=-1,h=o.scrollLeft<0,o.scrollLeft=p,h),this.negativeScrollAdjustment=this.isNegativeScroll?o.scrollWidth-o.clientWidth:0,this.event=new m,this.ownerDocument=o.ownerDocument||document,this.scrollbarXRail=n(w.element.rail("x")),o.appendChild(this.scrollbarXRail),this.scrollbarX=n(w.element.thumb("x")),this.scrollbarXRail.appendChild(this.scrollbarX),this.scrollbarX.setAttribute("tabindex",0),this.event.bind(this.scrollbarX,"focus",a),this.event.bind(this.scrollbarX,"blur",s),this.scrollbarXActive=null,this.scrollbarXWidth=null,this.scrollbarXLeft=null,l=e(this.scrollbarXRail),this.scrollbarXBottom=parseInt(l.bottom,10),isNaN(this.scrollbarXBottom)?(this.isScrollbarXUsingBottom=!1,this.scrollbarXTop=d(l.top)):this.isScrollbarXUsingBottom=!0,this.railBorderXWidth=d(l.borderLeftWidth)+d(l.borderRightWidth),t(this.scrollbarXRail,{display:"block"}),this.railXMarginWidth=d(l.marginLeft)+d(l.marginRight),t(this.scrollbarXRail,{display:""}),this.railXWidth=null,this.railXRatio=null,this.scrollbarYRail=n(w.element.rail("y")),o.appendChild(this.scrollbarYRail),this.scrollbarY=n(w.element.thumb("y")),this.scrollbarYRail.appendChild(this.scrollbarY),this.scrollbarY.setAttribute("tabindex",0),this.event.bind(this.scrollbarY,"focus",a),this.event.bind(this.scrollbarY,"blur",s),this.scrollbarYActive=null,this.scrollbarYHeight=null,this.scrollbarYTop=null,c=e(this.scrollbarYRail),this.scrollbarYRight=parseInt(c.right,10),isNaN(this.scrollbarYRight)?(this.isScrollbarYUsingRight=!1,this.scrollbarYLeft=d(c.left)):this.isScrollbarYUsingRight=!0,this.scrollbarYOuterWidth=this.isRtl?function(t){var n=e(t);return d(n.width)+d(n.paddingLeft)+d(n.paddingRight)+d(n.borderLeftWidth)+d(n.borderRightWidth)}(this.scrollbarY):null,this.railBorderYWidth=d(c.borderTopWidth)+d(c.borderBottomWidth),t(this.scrollbarYRail,{display:"block"}),this.railYMarginHeight=d(c.marginTop)+d(c.marginBottom),t(this.scrollbarYRail,{display:""}),this.railYHeight=null,this.railYRatio=null,this.reach={x:o.scrollLeft<=0?"start":o.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:o.scrollTop<=0?"start":o.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(e){return g[e](f)})),this.lastScrollTop=Math.floor(o.scrollTop),this.lastScrollLeft=o.scrollLeft,this.event.bind(this.element,"scroll",(function(e){return f.onScroll(e)})),u(this)}).prototype.update=function(){this.isAlive&&(this.negativeScrollAdjustment=this.isNegativeScroll?this.element.scrollWidth-this.element.clientWidth:0,t(this.scrollbarXRail,{display:"block"}),t(this.scrollbarYRail,{display:"block"}),this.railXMarginWidth=d(e(this.scrollbarXRail).marginLeft)+d(e(this.scrollbarXRail).marginRight),this.railYMarginHeight=d(e(this.scrollbarYRail).marginTop)+d(e(this.scrollbarYRail).marginBottom),t(this.scrollbarXRail,{display:"none"}),t(this.scrollbarYRail,{display:"none"}),u(this),c(this,"top",0,!1,!0),c(this,"left",0,!1,!0),t(this.scrollbarXRail,{display:""}),t(this.scrollbarYRail,{display:""}))},b.prototype.onScroll=function(e){this.isAlive&&(u(this),c(this,"top",this.element.scrollTop-this.lastScrollTop),c(this,"left",this.element.scrollLeft-this.lastScrollLeft),this.lastScrollTop=Math.floor(this.element.scrollTop),this.lastScrollLeft=this.element.scrollLeft)},b.prototype.destroy=function(){this.isAlive&&(this.event.unbindAll(),i(this.scrollbarX),i(this.scrollbarY),i(this.scrollbarXRail),i(this.scrollbarYRail),this.removePsClasses(),this.element=null,this.scrollbarX=null,this.scrollbarY=null,this.scrollbarXRail=null,this.scrollbarYRail=null,this.isAlive=!1)},b.prototype.removePsClasses=function(){this.element.className=this.element.className.split(" ").filter((function(e){return!e.match(/^ps([-_].+|)$/)})).join(" ")},b})),define("WoltLabSuite/Core/Bootstrap",["require","exports","tslib","./Core","./Date/Picker","./Devtools","./Dom/Change/Listener","./Environment","./Event/Handler","./Form/XsrfToken","./Language","./Ui/Dialog","./Ui/Dropdown/Simple","./Ui/Mobile","./Ui/Page/Action","./Ui/TabMenu","./Ui/Tooltip","./Ui/Page/JumpTo","./Ui/Password","./Ui/Empty","./Ui/Object/Action","./Ui/Object/Action/Delete","./Ui/Object/Action/Toggle","./Ui/Search","./LazyLoader","./Helper/PageOverlay","perfect-scrollbar"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p,h,m,f,g,b,v,w,y,_,E,S,C,L){"use strict";function k(){document.querySelectorAll("nav:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")})),document.querySelectorAll("article:not([aria-label]):not([aria-labelledby]):not([role])").forEach((e=>{e.setAttribute("role","presentation")}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),i=n.__importDefault(i),r=n.__importDefault(r),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),d=n.__importStar(d),u=n.__importDefault(u),p=n.__importDefault(p),h=n.__importStar(h),m=n.__importStar(m),f=n.__importStar(f),g=n.__importStar(g),b=n.__importStar(b),v=n.__importStar(v),w=n.__importStar(w),y=n.__importStar(y),_=n.__importStar(_),E=n.__importStar(E),null==window.WCF&&(window.WCF={}),null==window.WCF.Language&&(window.WCF.Language={}),window.WCF.Language.get=d.get,window.WCF.Language.add=d.add,window.WCF.Language.addObject=d.addObject,window.__wcf_bc_eventHandler=l,t.setup=function(t){t=o.extend({colorScheme:"light",enableMobileMenu:!0,pageMenuMainProvider:void 0},t),c.setup(),window.ENABLE_DEVELOPER_TOOLS&&r.default._internal_.enable(),(0,L.adoptPageOverlayContainer)(document.body),s.setup(),i.default.init(),p.default.setup(),h.setup(t.enableMobileMenu,t.pageMenuMainProvider),f.setup(),u.default.setup(),g.setup(),v.setup(),w.setup(),y.setup(),_.setup(),E.setup(),(0,S.init)(),document.querySelectorAll("form[method=get]").forEach((e=>{e.method="post"})),"microsoft"===s.browser()&&(window.onbeforeunload=()=>{});let l=0;l=window.setInterval((()=>{if("function"==typeof window.jQuery){window.clearInterval(l),window.jQuery((()=>{m.setup()}));const e=window.jQuery;e.browser=e.browser||{},e.browser.mobile="desktop"!==s.platform(),window.jQuery.holdReady(!1)}}),20),document.querySelectorAll(".pagination").forEach((e=>b.init(e))),window.requestAnimationFrame((()=>{const e=window.innerWidth-document.documentElement.clientWidth;document.documentElement.style.setProperty("--scrollbar-width",`${e}px`)})),k(),a.default.add("WoltLabSuite/Core/Bootstrap",(()=>k)),t.dynamicColorScheme&&new Promise(((t,n)=>{e(["./Controller/Style/ColorScheme"],t,n)})).then(n.__importStar).then((({setup:e})=>{e()})),(0,C.whenFirstSeen)("[data-report-content]",(()=>{new Promise(((t,n)=>{e(["./Ui/Moderation/Report"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-pagination",(()=>{new Promise(((t,n)=>{e(["./Ui/Pagination/JumpToPage"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-google-maps",(()=>{new Promise(((t,n)=>{e(["./Component/GoogleMaps/woltlab-core-google-maps"],t,n)})).then(n.__importStar)})),(0,C.whenFirstSeen)("[data-google-maps-geocoding]",(()=>{new Promise(((t,n)=>{e(["./Component/GoogleMaps/Geocoding"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))}))}})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,n,o,i,r,a,s){"use strict";function l(){return d||(d=new c),d}Object.defineProperty(t,"__esModule",{value:!0}),t.resetCache=t.ajaxApi=t.setContent=t.init=void 0,o=n.__importStar(o),i=n.__importDefault(i),r=n.__importDefault(r),a=n.__importStar(a),s=n.__importStar(s);class c{activeId="";cache=new Map;elements=new Map;handlers=new Map;hoverId="";popover;popoverContent;suspended=!1;timerEnter=void 0;timerLeave=void 0;constructor(){this.popover=document.createElement("div"),this.popover.className="popover forceHide",this.popoverContent=document.createElement("div"),this.popoverContent.className="popoverContent",this.popover.appendChild(this.popoverContent);const e=document.createElement("span");e.className="elementPointer",e.appendChild(document.createElement("span")),this.popover.appendChild(e),document.body.append(this.popover),this.popover.addEventListener("mouseenter",(()=>this.popoverMouseEnter())),this.popover.addEventListener("mouseleave",(()=>this.mouseLeave())),this.popover.addEventListener("animationend",(()=>this.clearContent())),window.addEventListener("beforeunload",(()=>{this.suspended=!0,this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0),this.hidePopover()})),i.default.add("WoltLabSuite/Core/Controller/Popover",(e=>this.initHandler(e)))}init(e){if("desktop"!==a.platform())return;if(e.attributeName=e.attributeName||"data-object-id",e.legacy=!0===e.legacy,this.handlers.has(e.identifier))return;const t=e.legacy?e.className:`.${e.className}`;this.handlers.set(e.identifier,{attributeName:e.attributeName,dboAction:e.dboAction,legacy:e.legacy,loadCallback:e.loadCallback,selector:t}),this.initHandler(e.identifier)}initHandler(e){"string"==typeof e&&e.length?this.initElements(this.handlers.get(e),e):this.handlers.forEach(((e,t)=>{this.initElements(e,t)}))}initElements(e,t){document.querySelectorAll(e.selector).forEach((n=>{const o=r.default.identify(n);if(this.cache.has(o))return;if(null!==n.closest(".popover"))return void this.cache.set(o,{content:null,state:0});const i=e.legacy?o:~~n.getAttribute(e.attributeName);if(0===i)return;n.addEventListener("mouseenter",(e=>this.mouseEnter(e))),n.addEventListener("mouseleave",(()=>this.mouseLeave())),n instanceof HTMLAnchorElement&&n.href&&n.addEventListener("click",(()=>this.hidePopover()));const a=`${t}-${i}`;n.dataset.cacheId=a,this.elements.set(o,{element:n,identifier:t,objectId:i.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,n){const o=`${e}-${t}`,i=this.cache.get(o);if(void 0===i)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let a=r.default.createFragmentFromHtml(n);a.childElementCount||(a=r.default.createFragmentFromHtml("

    "+n+"

    ")),i.content=a,i.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===o&&this.show()}resetCache(e,t){const n=`${e}-${t}`;this.cache.has(n)&&this.cache.set(n,{content:null,state:0})}mouseEnter(e){if(this.suspended)return;this.timerEnter&&(window.clearTimeout(this.timerEnter),this.timerEnter=void 0);const t=r.default.identify(e.currentTarget);this.activeId===t&&this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.hoverId=t,this.timerEnter=window.setTimeout((()=>{this.timerEnter=void 0,this.hoverId===t&&this.show()}),800)}mouseLeave(){this.hoverId="",this.timerLeave||(this.timerLeave=window.setTimeout((()=>this.hidePopover()),500))}popoverMouseEnter(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0)}show(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0);let e=!1;this.popover.classList.contains("active")?this.activeId!==this.hoverId&&(this.hidePopover(),e=!0):this.popoverContent.childElementCount&&(e=!0),e&&(this.popover.classList.add("forceHide"),this.popover.offsetTop,this.clearContent(),this.popover.classList.remove("forceHide")),this.activeId=this.hoverId;const t=this.elements.get(this.activeId);if(void 0===t)return;const n=t.element.dataset.cacheId,o=this.cache.get(n);switch(o.state){case 2:this.popoverContent.appendChild(o.content),this.rebuild();break;case 0:{o.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const n=e=>(this.setContent(t.identifier,t.objectId,e.returnValues.template),!0);this.ajaxApi({actionName:"getPopover",className:e.dboAction,interfaceName:"wcf\\data\\IPopoverAction",objectIDs:[t.objectId]},n,n)}break}}}hidePopover(){this.timerLeave&&(window.clearTimeout(this.timerLeave),this.timerLeave=void 0),this.popover.classList.remove("active")}clearContent(){if(this.activeId&&this.popoverContent.childElementCount&&!this.popover.classList.contains("active")){const e=this.elements.get(this.activeId).element.dataset.cacheId,t=this.cache.get(e);for(;this.popoverContent.childNodes.length;)t.content.appendChild(this.popoverContent.childNodes[0])}}rebuild(){this.popover.classList.contains("active")||(this.popover.classList.remove("forceHide"),this.popover.classList.add("active"),s.set(this.popover,this.elements.get(this.activeId).element,{pointer:!0,vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{ignoreError:!0,silent:!0}}ajaxApi(e,t,n){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");o.api(this,e,t,n)}}let d;t.init=function(e){l().init(e)},t.setContent=function(e,t,n){l().setContent(e,t,n)},t.ajaxApi=function(e,t,n){l().ajaxApi(e,t,n)},t.resetCache=function(e,t){l().resetCache(e,t)}})),define("WoltLabSuite/Core/Ui/User/Ignore",["require","exports","tslib","../../Dom/Change/Listener"],(function(e,t,n,o){"use strict";function i(){for(let e=0,t=a.length;ec()))}function s(){f=!1}function l(e){g=Math.min(g+e,0),h.style.setProperty("margin-left",`${g}px`,"")}function c(){if(!f)return;b=[],v=[];const e=m.clientWidth,t=m.scrollWidth;!p&&t>e&&(u=document.createElement("a"),u.className="mainMenuShowNext",u.href="#",u.innerHTML='',u.setAttribute("aria-hidden","true"),u.addEventListener("click",(e=>{e.preventDefault(),function(){if(v.length){const e=v.slice(0,3).pop();l(m.clientWidth-(e.offsetLeft+e.clientWidth)),m.lastElementChild===e&&u.classList.remove("active"),p.classList.add("active")}}()})),m.insertAdjacentElement("beforebegin",u),p=document.createElement("a"),p.className="mainMenuShowPrevious",p.href="#",p.innerHTML='',p.setAttribute("aria-hidden","true"),p.addEventListener("click",(e=>{e.preventDefault(),function(){if(b.length){const e=b.slice(-3)[0];l(-1*e.offsetLeft),m.firstElementChild===e&&p.classList.remove("active"),u.classList.add("active")}}()})),m.insertAdjacentElement("afterend",p)),(t>e||g<0)&&Array.from(m.children).forEach((t=>{const n=t.offsetLeft;n<0?b.push(t):n+t.clientWidth>e&&v.push(t)})),p?.classList[b.length?"add":"remove"]("active"),u?.classList[v.length?"add":"remove"]("active")}function d(){h.addEventListener("transitionend",c),new ResizeObserver((()=>{h.style.setProperty("margin-left","0px",""),g=0,c()})).observe(m),a(),m.querySelectorAll(".boxMenuHasChildren").forEach((e=>{const t=e.querySelector(".boxMenuLink");t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false");const n=document.createElement("button");n.type="button",n.className="visuallyHidden",n.setAttribute("aria-label",i.get("wcf.global.button.showMenu")),e.insertBefore(n,t.nextSibling);let o=!1;n.addEventListener("click",(()=>{o=!o,t.setAttribute("aria-expanded",o?"true":"false"),n.setAttribute("aria-label",i.get(o?"wcf.global.button.hideMenu":"wcf.global.button.showMenu"))}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r);let u,p,h,m,f=!1,g=0,b=[],v=[];t.init=function(){const e=document.querySelector(".mainMenu .boxMenu"),t=e&&e.childElementCount?e.children[0]:null;if(null===t)throw new Error("Unable to find the main menu.");m=e,h=t,r.on("screen-lg",{match:a,unmatch:s,setup:d})}})),define("WoltLabSuite/Core/User",["require","exports"],(function(e,t){"use strict";class n{userId;username;link;constructor(e,t,n){this.userId=e,this.username=t,this.link=n}}let o;return{getLink:()=>o.link,init(e,t,i){if(o)throw new Error("User has already been initialized.");o=new n(e,t,i)},get userId(){return o.userId},get username(){return o.username}}})),define("WoltLabSuite/Core/Ui/Message/UserConsent",["require","exports","tslib","WoltLabSuite/Core/Helper/Selector","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../User"],(function(e,t,n,o,i,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,i=n.__importStar(i),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importDefault(s),l=n.__importDefault(l);class c{enableAll=!1;constructor(){"all"===window.sessionStorage.getItem(`${r.getStoragePrefix()}user-consent`)&&(this.enableAll=!0),this.registerEventListeners(),a.default.add("WoltLabSuite/Core/Ui/Message/UserConsent",(()=>this.registerEventListeners()))}registerEventListeners(){this.enableAll?this.enableAllExternalMedia():(0,o.wheneverFirstSeen)(".jsButtonMessageUserConsentEnable",(e=>{e.addEventListener("click",(e=>this.click(e)))}))}click(e){e.preventDefault(),this.enableAll=!0,this.enableAllExternalMedia(),l.default.userId?i.apiOnce({data:{actionName:"saveUserConsent",className:"wcf\\data\\user\\UserAction"},silent:!0}):window.sessionStorage.setItem(`${r.getStoragePrefix()}user-consent`,"all")}enableExternalMedia(e){if(e.dataset.target)document.getElementById(e.dataset.target).hidden=!1;else{const t=atob(e.dataset.payload);s.default.insertHtml(t,e,"before")}e.remove()}enableAllExternalMedia(){document.querySelectorAll(".messageUserConsent").forEach((e=>this.enableExternalMedia(e)))}}let d;t.init=function(){d||(d=new c)}})),define("WoltLabSuite/Core/Clipboard",["require","exports"],(function(e,t){"use strict";async function n(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);throw new Error("navigator.clipboard is not supported.")}Object.defineProperty(t,"__esModule",{value:!0}),t.copyElementTextToClipboard=t.copyTextToClipboard=void 0,t.copyTextToClipboard=n,t.copyElementTextToClipboard=async function(e){return n(e.textContent.replace(/\u200B/g,"").replace(/\u00A0/g," "))}})),define("WoltLabSuite/Core/Ui/Notification",["require","exports","../Helper/PageOverlay","../Language"],(function(e,t,n,o){"use strict";function i(){clearTimeout(s),a.classList.remove("active"),null!==c&&c(),l=!1}Object.defineProperty(t,"__esModule",{value:!0}),t.show=void 0;let r,a,s,l=!1,c=null,d=!1;t.show=function(e,t,u){l||(l=!0,d||(d=!0,a=document.createElement("div"),a.id="systemNotification",r=document.createElement("p"),r.addEventListener("click",i),a.appendChild(r),(0,n.getPageOverlayContainer)().appendChild(a)),c="function"==typeof t?t:null,r.className=u||"success",r.textContent=(0,o.getPhrase)(e||"wcf.global.success"),a.classList.add("active"),s=window.setTimeout(i,2e3))}})),define("WoltLabSuite/Core/Ui/Message/Share/Providers",["require","exports"],(function(e,t){"use strict";function n(e){o.add(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getShareProviders=t.addShareProviders=t.addShareProvider=void 0;const o=new Set;t.addShareProvider=n,t.addShareProviders=function(e){e.forEach((e=>n(e)))},t.getShareProviders=function(){return o}})),define("WoltLabSuite/Core/Ui/Message/Share/Dialog",["require","exports","tslib","../../../Dom/Traverse","../../../Clipboard","../../Notification","../../../StringUtil","../../../Dom/Change/Listener","./Providers","../../../Component/Dialog","WoltLabSuite/Core/Language","../../../Event/Handler"],(function(e,t,n,o,i,r,a,s,l,c,d,u){"use strict";function p(e,t){return`\n
    \n
    ${(0,d.getPhrase)(e)}
    \n
    \n
    \n \n \n
    \n
    \n
    \n `}function h(e){e.preventDefault();const t=e.currentTarget,n=f(t),s=function(){const e=Array.from((0,l.getShareProviders)()).map((e=>{const[t,n,o]=e;return`\n
  • \n \n
  • \n `})).join("\n");return e?`
      ${e}
    `:""}();let h="";s&&(h=`\n
    \n
    ${(0,d.getPhrase)("wcf.message.share.socialMedia")}
    \n
    ${s}
    \n
    \n `);let m="";w&&(m=`\n
    \n
    \n
    \n \n
    \n
    \n `);const v=`\n
    \n `,y=(0,c.dialogFactory)().fromHtml(v).withoutControls();y.content.querySelectorAll(".shareDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,n=o.prevBySel(t,'input[type="text"]');await i.copyTextToClipboard(n.value),r.show((0,d.getPhrase)("wcf.message.share.copy.success"))}(e))))),w&&y.content.querySelector(".shareDialogNativeButton").addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,n={url:t.dataset.url};t.dataset.title&&(n.title=t.dataset.title),await window.navigator.share(n)}(e))),s&&function(e,t){const n={facebook:{selector:'.messageShareProvider[data-identifier="Facebook"]',share(){g("facebook","https://www.facebook.com/sharer.php?u={pageURL}&t={text}",!0,t)}},reddit:{selector:'.messageShareProvider[data-identifier="Reddit"]',share(){g("reddit","https://ssl.reddit.com/submit?url={pageURL}",!1,t)}},twitter:{selector:'.messageShareProvider[data-identifier="Twitter"]',share(){g("twitter","https://twitter.com/share?url={pageURL}&text={text}",!1,t)}},linkedIn:{selector:'.messageShareProvider[data-identifier="LinkedIn"]',share(){g("linkedIn","https://www.linkedin.com/cws/share?url={pageURL}",!1,t)}},pinterest:{selector:'.messageShareProvider[data-identifier="Pinterest"]',share(){g("pinterest","https://www.pinterest.com/pin/create/link/?url={pageURL}&description={text}",!1,t)}},xing:{selector:'.messageShareProvider[data-identifier="XING"]',share(){g("xing","https://www.xing.com/social_plugins/share?url={pageURL}",!1,t)}},whatsApp:{selector:'.messageShareProvider[data-identifier="WhatsApp"]',share(){window.location.href="https://api.whatsapp.com/send?text="+b()+"%20"+t}}};u.fire("com.woltlab.wcf.message.share","shareProvider",{container:e,providers:n,pageDescription:b(),pageUrl:t}),Object.values(n).forEach((t=>{e.querySelector(t.selector)?.addEventListener("click",(()=>t.share()))}))}(y.content,n),y.show((0,d.getPhrase)("wcf.message.share"))}function m(){document.querySelectorAll(".shareButton, .wsShareButton").forEach((e=>{v.has(e)||(e.addEventListener("click",(e=>h(e))),v.add(e))}))}function f(e){return e instanceof HTMLAnchorElement?e.href:e.dataset.link}function g(e,t,n,o){window.open(t.replace("{pageURL}",o).replace("{text}",b()+(n?`%20${o}`:"")),e,"height=600,width=600")}function b(){const e=document.querySelector('meta[property="og:title"]');return null!==e?encodeURIComponent(e.content):""}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importDefault(s),u=n.__importStar(u);const v=new WeakSet,w=void 0!==window.navigator.share;t.setup=function(){m(),s.default.add("WoltLabSuite/Core/Ui/Message/Share/Dialog",(()=>m()))}})),define("WoltLabSuite/Core/Ui/Feed/Dialog",["require","exports","tslib","../Dialog","../../StringUtil","../../Language","../../Clipboard","../Notification"],(function(e,t,n,o,i,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importDefault(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),t.setup=function(){document.querySelectorAll("a.rssFeed").forEach((e=>{e.addEventListener("click",(e=>function(e){e.preventDefault();const t=e.currentTarget,n=t.href,l=n.replace(/(\\?|&)at=[^&]*&?/,"$1").replace(/(\?|&)$/,"");o.default.openStatic("feedLinkDialog",`\n

    ${r.get("wcf.global.rss.accessToken.info")}

    \n
    \n
    ${r.get("wcf.global.rss.withoutAccessToken")}
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n
    ${r.get("wcf.global.rss.withAccessToken")}
    \n
    \n
    \n \n
    \n
    \n
    \n`,{onShow(e){e.querySelectorAll(".feedLinkDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget.parentNode.querySelector('input[type="text"]');await a.copyTextToClipboard(t.value),s.show(r.get("wcf.global.rss.copy.success"))}(e)))))},title:t.title||r.get("wcf.global.button.rss")})}(e)))}))}})),define("WoltLabSuite/Core/Ui/Page/Menu/Main/Frontend",["require","exports"],(function(e,t){"use strict";function n(e,t){const o=e.querySelector(".boxMenuLink"),i=o.querySelector(".boxMenuLinkTitle").textContent;let r=0;const a=o.querySelector(".boxMenuLinkOutstandingItems");a&&(r=parseInt(a.textContent.replace(/[^0-9]/,""),10));const s=e.querySelector("ol");let l=[];if(s instanceof HTMLOListElement){let e=t;e<3&&(e=t+1),l=Array.from(s.children).map((t=>n(t,e)))}const c=o.getAttribute("href");let d,u;return c&&"#"!==c&&(d=o.href,"_blank"===o.target&&(u=!0)),{active:e.classList.contains("active"),children:l,counter:r,depth:t,identifier:o.parentElement.dataset.identifier,link:d,openInNewWindow:u,title:i}}Object.defineProperty(t,"__esModule",{value:!0}),t.UiPageMenuMainFrontend=void 0;class o{getMenuItems(e){return Array.from(e.children).map((e=>n(e,0)))}}t.UiPageMenuMainFrontend=o,t.default=o})),define("WoltLabSuite/Core/BootstrapFrontend",["require","exports","tslib","./BackgroundQueue","./Bootstrap","./Controller/Popover","./Ui/User/Ignore","./Ui/Page/Header/Menu","./Ui/Message/UserConsent","./Ui/Message/Share/Dialog","./Ui/Message/Share/Providers","./Ui/Feed/Dialog","./User","./Ui/Page/Menu/Main/Frontend","./LazyLoader","./Ajax/Backend"],(function(e,t,n,o,i,r,a,s,l,c,d,u,p,h,m,f){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importStar(a),s=n.__importStar(s),l=n.__importStar(l),c=n.__importStar(c),u=n.__importStar(u),p=n.__importDefault(p),h=n.__importDefault(h),t.setup=function(t){t.backgroundQueue.url=window.WSC_API_URL+t.backgroundQueue.url.substr(window.WCF_PATH.length),i.setup({dynamicColorScheme:t.dynamicColorScheme,enableMobileMenu:!0,pageMenuMainProvider:new h.default}),s.init(),t.styleChanger&&new Promise(((t,n)=>{e(["./Controller/Style/Changer"],t,n)})).then(n.__importStar).then((e=>{e.setup()})),t.enableUserPopover&&(r.init({className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user"}),r.init({attributeName:"data-user-id",className:"userLink",dboAction:"wcf\\data\\user\\UserProfileAction",identifier:"com.woltlab.wcf.user.deprecated"})),void 0!==t.executeCronjobs&&(0,f.prepareRequest)(t.executeCronjobs).get().disableLoadingIndicator().fetchAsResponse().catch((()=>{})),o.setUrl(t.backgroundQueue.url),(Math.random()<.1||t.backgroundQueue.force)&&o.invoke(),l.init(),t.shareButtonProviders&&(0,d.addShareProviders)(t.shareButtonProviders),c.setup(),p.default.userId&&u.setup(),(0,m.whenFirstSeen)("woltlab-core-reaction-summary",(()=>{new Promise(((t,n)=>{e(["./Ui/Reaction/SummaryDetails"],t,n)})).then(n.__importStar).then((({setup:e})=>e()))})),(0,m.whenFirstSeen)("woltlab-core-comment",(()=>{new Promise(((t,n)=>{e(["./Component/Comment/woltlab-core-comment"],t,n)})).then(n.__importStar)})),(0,m.whenFirstSeen)("woltlab-core-comment-response",(()=>{new Promise(((t,n)=>{e(["./Component/Comment/Response/woltlab-core-comment-response"],t,n)})).then(n.__importStar)}))}})),define("WoltLabSuite/Core/ColorUtil",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(e>359)throw new TypeError("Hue cannot be larger than 359°");t/=100,n/=100;const o=(1-Math.abs(2*n-1))*t,i=o*(1-Math.abs(e/60%2-1)),r=n-o/2,[a,s,l]=0<=e&&e<60&&[o,i,0]||60<=e&&e<120&&[i,o,0]||120<=e&&e<180&&[0,o,i]||180<=e&&e<240&&[0,i,o]||240<=e&&e<300&&[i,0,o]||300<=e&&e<360&&[o,0,i];return{r:Math.round(255*(a+r)),g:Math.round(255*(s+r)),b:Math.round(255*(l+r))}}function o(e,t,n){const o={r:0,g:0,b:0},i=Math.floor(e/60),r=e/60-i,a=(n/=100)*(1-(t/=100)),s=n*(1-t*r),l=n*(1-t*(1-r));if(0==t)o.r=o.g=o.b=n;else switch(i){case 1:o.r=s,o.g=n,o.b=a;break;case 2:o.r=a,o.g=n,o.b=l;break;case 3:o.r=a,o.g=s,o.b=n;break;case 4:o.r=l,o.g=a,o.b=n;break;case 5:o.r=n,o.g=a,o.b=s;break;case 0:case 6:o.r=n,o.g=l,o.b=a}return{r:Math.round(255*o.r),g:Math.round(255*o.g),b:Math.round(255*o.b)}}function i(e,t,n){let o,i;e/=255,t/=255,n/=255;const r=Math.max(e,t,n),a=Math.min(e,t,n),s=r-a;if(o=0,r!==a){switch(r){case e:o=(t-n)/s*60;break;case t:o=60*(2+(n-e)/s);break;case n:o=60*(4+(e-t)/s)}o<0&&(o+=360)}const l=(r+a)/2;return i=0===s?0:s/(1-Math.abs(2*l-1)),{h:Math.round(o),s:Math.round(100*i),l:Math.round(100*l)}}function r(e,t,n){let o,i;e/=255,t/=255,n/=255;const r=Math.max(Math.max(e,t),n),a=Math.min(Math.min(e,t),n),s=r-a;if(o=0,r!==a){switch(r){case e:o=(t-n)/s*60;break;case t:o=60*(2+(n-e)/s);break;case n:o=60*(4+(e-t)/s)}o<0&&(o+=360)}return i=0===r?0:s/r,{h:Math.round(o),s:Math.round(100*i),v:Math.round(100*r)}}function a(e){if(/^#?([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(e)){const t=e.split("");return"#"===t[0]&&t.shift(),3===t.length?{r:parseInt(t[0]+""+t[0],16),g:parseInt(t[1]+""+t[1],16),b:parseInt(t[2]+""+t[2],16)}:{r:parseInt(t[0]+""+t[1],16),g:parseInt(t[2]+""+t[3],16),b:parseInt(t[4]+""+t[5],16)}}return Number.NaN}function s(e){if(e<0||e>255)throw new Error(`Invalid RGB component value '${e}' given.`);return e.toString(16).padStart(2,"0").toUpperCase()}function l(e,t,n){if(void 0===t){const o=/^rgba?\((\d+), ?(\d+), ?(\d+)(?:, ?[0-9.]+)?\)$/.exec(e.toString());if(!o)throw new Error("Invalid RGB data given.");e=+o[1],t=+o[2],n=+o[3]}return s(e)+s(t)+s(n)}function c(e){if(e<0||e>1)throw new Error(`Invalid alpha value '${e}' given.`);return Math.round(255*e).toString(16).padStart(2,"0").toUpperCase()}function d(e,t,n,o){if(void 0===t){const t=e;return l(t.r,t.g,t.b)+c(t.a)}return l(e,t,n)+c(o)}function u(e){return`rgba(${e.r}, ${e.g}, ${e.b}, ${e.a})`}function p(){let e=document.getElementById("jsColorUtilColorChecker");return null===e&&(e=document.createElement("span"),e.id="jsColorUtilColorChecker",document.body.appendChild(e)),e}function h(e){const t=p();return t.style.color="",t.style.color=e,""!==t.style.color}function m(e){if(!h(e))throw new Error(`Given string '${e}' is no valid color.`);const t=p();t.style.color=e;const n=window.getComputedStyle(t).color,o=/^rgb\((\d+), ?(\d+), ?(\d+)\)$/.exec(n);if(o)return{r:+o[1],g:+o[2],b:+o[3],a:1};{const e=/^rgba\((\d+), ?(\d+), ?(\d+), ?([0-9.]+)\)$/.exec(n);if(e)return{r:+e[1],g:+e[2],b:+e[3],a:+e[4]}}throw new Error(`Cannot process color '${e}'.`)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringToRgba=t.isValidColor=t.rgbaToString=t.rgbaToHex=t.rgbToHex=t.hexToRgb=t.rgbToHsv=t.rgbToHsl=t.hsvToRgb=t.hslToRgb=void 0,t.hslToRgb=n,t.hsvToRgb=o,t.rgbToHsl=i,t.rgbToHsv=r,t.hexToRgb=a,t.rgbToHex=l,t.rgbaToHex=d,t.rgbaToString=u,t.isValidColor=h,t.stringToRgba=m,window.__wcf_bc_colorUtil={hexToRgb:a,hslToRgb:n,hsvToRgb:o,isValidColor:h,rgbaToHex:d,rgbaToString:u,rgbToHex:l,rgbToHsv:r,rgbToHsl:i,stringToRgba:m}})),define("WoltLabSuite/Core/Dictionary",["require","exports"],(function(e,t){"use strict";class n{_dictionary=new Map;set(e,t){this._dictionary.set(e.toString(),t)}delete(e){return this._dictionary.delete(e.toString())}has(e){return this._dictionary.has(e.toString())}get(e){return this._dictionary.get(e.toString())}forEach(e){if("function"!=typeof e)throw new TypeError("forEach() expects a callback as first parameter.");this._dictionary.forEach(e)}merge(...e){for(let t=0,n=e.length;tthis.set(t,e)))}toObject(){const e={};return this._dictionary.forEach(((t,n)=>e[n]=t)),e}static fromObject(e){const t=new n;return Object.keys(e).forEach((n=>{t.set(n,e[n])})),t}get size(){return this._dictionary.size}}return n})),define("WoltLabSuite/Core/FileUtil",["require","exports","tslib","./StringUtil"],(function(e,t,n,o){"use strict";function i(e){return a.has(e)?"."+a.get(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.blobToFile=t.getExtensionByMimeType=t.getIconNameByFilename=t.formatFilesize=void 0,o=n.__importStar(o);const r=new Map(Object.entries({zip:"zipper",rar:"zipper",tar:"zipper",gz:"zipper",mp3:"audio",ogg:"audio",wav:"audio",php:"code",html:"code",htm:"code",tpl:"code",js:"code",xls:"excel",ods:"excel",xlsx:"excel",gif:"image",jpg:"image",jpeg:"image",png:"image",bmp:"image",webp:"image",avi:"video",wmv:"video",mov:"video",mp4:"video",mpg:"video",mpeg:"video",flv:"video",pdf:"pdf",ppt:"powerpoint",pptx:"powerpoint",txt:"lines",doc:"word",docx:"word",odt:"word"})),a=new Map(Object.entries({"application/zip":"zip","application/x-zip-compressed":"zip","application/rar":"rar","application/vnd.rar":"rar","application/x-rar-compressed":"rar","application/x-tar":"tar","application/x-gzip":"gz","application/gzip":"gz","audio/mpeg":"mp3","audio/mp3":"mp3","audio/ogg":"ogg","audio/x-wav":"wav","application/x-php":"php","text/html":"html","application/javascript":"js","application/vnd.ms-excel":"xls","application/vnd.oasis.opendocument.spreadsheet":"ods","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","image/gif":"gif","image/jpeg":"jpg","image/png":"png","image/x-ms-bmp":"bmp","image/bmp":"bmp","image/webp":"webp","video/x-msvideo":"avi","video/x-ms-wmv":"wmv","video/quicktime":"mov","video/mp4":"mp4","video/mpeg":"mpg","video/x-flv":"flv","application/pdf":"pdf","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","text/plain":"txt","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.oasis.opendocument.text":"odt","public.jpeg":"jpeg","public.png":"png","com.compuserve.gif":"gif","org.webmproject.webp":"webp"}));t.formatFilesize=function(e,t=2){let n="Byte";return e>=1e3&&(e/=1e3,n="kB"),e>=1e3&&(e/=1e3,n="MB"),e>=1e3&&(e/=1e3,n="GB"),e>=1e3&&(e/=1e3,n="TB"),o.formatNumeric(e,-t)+" "+n},t.getIconNameByFilename=function(e){const t=e.lastIndexOf(".");if(-1!==t){const n=e.substr(t+1);if(r.has(n))return r.get(n)}return""},t.getExtensionByMimeType=i,t.blobToFile=function(e,t){const n=i(e.type);return new File([e],t+n,{type:e.type})}})),define("WoltLabSuite/Core/List",["require","exports"],(function(e,t){"use strict";return class{_set=new Set;add(e){this._set.add(e)}clear(){this._set.clear()}delete(e){return this._set.delete(e)}forEach(e){this._set.forEach(e)}has(e){return this._set.has(e)}get size(){return this._set.size}}})),define("WoltLabSuite/Core/NumberUtil",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.round=void 0,t.round=function(e,t){if(void 0===t||0==+t)return Math.round(e);if(e=+e,t=+t,isNaN(e)||"number"!=typeof t||t%1!=0)return NaN;let n=e.toString().split("e"),o=n[1]?+n[1]-t:-t;return n=(e=Math.round(+`${n[0]}e${o}`)).toString().split("e"),o=n[1]?+n[1]+t:t,+`${n[0]}e${o}`}})),define("WoltLabSuite/Core/ObjectMap",["require","exports"],(function(e,t){"use strict";return class{_map=new WeakMap;set(e,t){if("object"!=typeof e||null===e)throw new TypeError("Only objects can be used as key");if("object"!=typeof t||null===t)throw new TypeError("Only objects can be used as value");this._map.set(e,t)}delete(e){this._map.delete(e)}has(e){return this._map.has(e)}get(e){return this._map.get(e)}}})),define("WoltLabSuite/Core/Permission",["require","exports"],(function(e,t){"use strict";function n(e,t){if("boolean"!=typeof t)throw new TypeError("The permission value has to be boolean.");o.set(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=t.addObject=t.add=void 0;const o=new Map;t.add=n,t.addObject=function(e){Object.keys(e).forEach((t=>n(t,e[t])))},t.get=function(e){return!!o.has(e)&&o.get(e)}})),_self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){function t(e,t,n,o){this.type=e,this.content=t,this.alias=n,this.length=0|(o||"").length}function n(e,t,n,o){var i,r;return e.lastIndex=t,(i=e.exec(n))&&o&&i[1]&&(r=i[1].length,i.index+=r,i[0]=i[0].slice(r)),i}function o(e,i,s,l,c,d){var u,p,m,f,g,b,v,w,y,_,E,S,C,L,k,x,T,M,D,I,A,P,j,O,q;for(u in s)if(s.hasOwnProperty(u)&&s[u])for(p=s[u],p=Array.isArray(p)?p:[p],m=0;m=d.reach);S+=E.value.length,E=E.next){if(C=E.value,i.length>e.length)return;if(!(C instanceof t)){if(L=1,v){if(!(k=n(_,S,e,b))||k.index>=e.length)break;for(x=k.index,T=k.index+k[0].length,M=S,M+=E.value.length;x>=M;)M+=(E=E.next).value.length;if(S=M-=E.value.length,E.value instanceof t)continue;for(D=E;D!==i.tail&&(Md.reach&&(d.reach=j),O=E.prev,A&&(O=r(i,O,A),S+=A.length),a(i,O,L),E=r(i,O,new t(u,g?h.tokenize(I,g):I,w,I)),P&&r(i,E,P),L>1&&(q={cause:u+","+m,reach:j},o(e,i,s,E.prev,S,q),d&&q.reach>d.reach&&(d.reach=q.reach))}}}}function i(){var e={value:null,prev:null,next:null},t={value:null,prev:e,next:null};e.next=t,this.head=e,this.tail=t,this.length=0}function r(e,t,n){var o=t.next,i={value:n,prev:t,next:o};return t.next=i,o.prev=i,e.length++,i}function a(e,t,n){var o,i=t.next;for(o=0;o"+i.content+""},e.document?((l=h.util.currentScript())&&(h.filename=l.src,l.hasAttribute("data-manual")&&(h.manual=!0)),h.manual||("loading"===(c=document.readyState)||"interactive"===c&&l&&l.defer?document.addEventListener("DOMContentLoaded",s):window.requestAnimationFrame?window.requestAnimationFrame(s):window.setTimeout(s,16)),h):e.addEventListener?(h.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var n=JSON.parse(t.data),o=n.language,i=n.code,r=n.immediateClose;e.postMessage(h.highlight(i,h.languages[o],o)),r&&e.close()}),!1),h):h}(_self),"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism),define("prism/prism",(function(){})),window.Prism=window.Prism||{},window.Prism.manual=!0,define("WoltLabSuite/Core/Prism",["prism/prism"],(function(){return window.Prism.hooks.add("wrap",(e=>{e.classes=e.classes.map((e=>`prism-${e}`))})),Prism})),define("WoltLabSuite/Core/Template",["require","exports"],(function(e,t){"use strict";return window.WoltLabTemplate})),define("WoltLabSuite/Core/Prism/Helper",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.splitIntoLines=void 0,t.splitIntoLines=function*(e){const t=document.createNodeIterator(e,NodeFilter.SHOW_TEXT,{acceptNode:()=>NodeFilter.FILTER_ACCEPT});let n,o=document.createElement("span");for(;n=t.nextNode();){const t=n,i=t.data.split(/\r?\n/);for(let n=0,r=i.length;n=1&&(o.appendChild(document.createTextNode("\n")),yield o,o=document.createElement("span"));let a=document.createTextNode(r),s=t.parentNode;for(;s&&s!==e;){const e=s.cloneNode(!1);e.appendChild(a),a=e,s=s.parentNode}o.appendChild(a)}}yield o}})),define("WoltLabSuite/Core/Bbcode/Code",["require","exports","tslib","../Language","../Clipboard","../Ui/Notification","../Prism","../Prism/Helper"],(function(e,t,n,o,i,r,a,s){"use strict";async function l(){return new Promise(((e,t)=>{window.requestIdleCallback?window.requestIdleCallback(e,{timeout:5e3}):setTimeout(e,0)}))}o=n.__importStar(o),i=n.__importStar(i),r=n.__importStar(r),a=n.__importDefault(a),s=n.__importStar(s);class c{static chunkSize=50;container;codeContainer;language;constructor(e){this.container=e,this.codeContainer=this.container.querySelector(".codeBoxCode > code"),this.language=Array.from(this.codeContainer.classList).find((e=>/^language-([a-z0-9_-]+)$/.test(e)))?.replace(/^language-/,"")}static processAll(){document.querySelectorAll(".codeBox:not([data-processed])").forEach((e=>{e.dataset.processed="1";const t=new c(e);t.language&&t.highlight(),t.createCopyButton()}))}createCopyButton(){const e=this.container.querySelector(".codeBoxHeader");if(!e)return;const t=document.createElement("button");t.type="button",t.innerHTML='',t.classList.add("jsTooltip"),t.title=o.get("wcf.message.bbcode.code.copy");const n=async()=>{await i.copyElementTextToClipboard(this.codeContainer),r.show(o.get("wcf.message.bbcode.code.copy.success"))};t.addEventListener("click",(()=>n())),e.appendChild(t)}async highlight(){if(!this.language)throw new Error("No language detected");const t=(await new Promise(((t,n)=>{e(["../prism-meta"],t,n)})).then(n.__importStar)).default;if(!t[this.language])throw new Error(`Unknown language '${this.language}'`);this.container.classList.add("highlighting"),await new Promise(((n,o)=>{e(["prism/components/prism-"+t[this.language].file],n,o)})).then(n.__importStar),await l();const o=a.default.languages[this.language];if(!o)throw new Error(`Invalid language '${this.language}' given.`);const i=document.createElement("div");i.innerHTML=a.default.highlight(this.codeContainer.textContent,o,this.language),await l();const r=this.codeContainer.querySelectorAll(".codeBoxLine > span"),d=s.splitIntoLines(i);for(let e=0,t=r.length;e{const t=e.dataset.titleExpand,n=e.querySelector("fa-icon");n?(n.setIcon("up-right-and-down-left-from-center"),e.title=t):e.textContent=t})),n instanceof Event){const t=e.getBoundingClientRect().top;if(t<0){let e=window.pageYOffset+(t-100);e<0&&(e=0),window.scrollTo(window.pageXOffset,e)}}}else t.forEach((e=>{const t=e.dataset.titleCollapse,n=e.querySelector("fa-icon");n?(n.setIcon("down-left-and-up-right-to-center"),e.title=t):e.textContent=t}))}Object.defineProperty(t,"__esModule",{value:!0}),t.observe=void 0,t.observe=function(){document.querySelectorAll(".jsCollapsibleBbcode").forEach((e=>{const t=Array.from(e.querySelectorAll(".toggleButton:not(.jsToggleButtonEnabled)")).filter((t=>t.closest(".jsCollapsibleBbcode")===e)),o=e.querySelector(".collapsibleBbcodeOverflow")||e;t.length>0&&function(e,t,o){t.forEach((o=>{o.classList.add("jsToggleButtonEnabled"),o.addEventListener("click",(o=>n(e,t,o))),o.addEventListener("keydown",(o=>{"Enter"!==o.key&&" "!==o.key||(o.preventDefault(),n(e,t))}))})),0!==o.scrollTop&&(o.scrollTop=0,n(e,t)),o.addEventListener("scroll",(()=>{o.scrollTop=0,e.classList.contains("collapsed")&&n(e,t)}))}(e,t,o),e.classList.remove("jsCollapsibleBbcode")}))}})),define("WoltLabSuite/Core/Component/Confirmation/Custom",["require","exports","tslib","../Dialog","../../Language"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConfirmationCustom=void 0,i=n.__importStar(i),t.ConfirmationCustom=class{#_;constructor(e){this.#_=e}async message(e){if(""===e.trim())throw new Error("An empty message for the delete confirmation was provided. Please use `defaultMessage()` if you do not want to provide a custom message.");const t=(0,o.dialogFactory)().fromHtml(`

    ${e}

    `).asConfirmation({primary:i.get("wcf.dialog.button.primary.confirm")});return t.show(this.#_),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async withFormElements(e){const t=(0,o.dialogFactory)().withoutContent().asConfirmation({primary:i.get("wcf.dialog.button.primary.confirm")});return e(t),t.show(this.#_),new Promise((e=>{t.addEventListener("primary",(()=>{e({result:!0,dialog:t})})),t.addEventListener("cancel",(()=>{e({result:!1,dialog:t})}))}))}async withoutMessage(){const e=(0,o.dialogFactory)().withoutContent().asConfirmation({primary:i.get("wcf.dialog.button.primary.confirm")});return e.show(this.#_),new Promise((t=>{e.addEventListener("primary",(()=>t(!0))),e.addEventListener("cancel",(()=>t(!1)))}))}}})),define("WoltLabSuite/Core/Component/Confirmation",["require","exports","tslib","./Dialog","../Language","../Dom/Util","./Confirmation/Custom"],(function(e,t,n,o,i,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.confirmationFactory=void 0,r=n.__importStar(r);class s{custom(e){return new a.ConfirmationCustom(e)}async delete(e){const t=`

    ${(0,i.getPhrase)("wcf.dialog.confirmation.cannotBeUndone")}

    `,n=(0,o.dialogFactory)().fromHtml(t).asConfirmation({primary:(0,i.getPhrase)("wcf.dialog.button.primary.delete")});let r;return r=void 0===e?(0,i.getPhrase)("wcf.dialog.confirmation.delete.indeterminate"):(0,i.getPhrase)("wcf.dialog.confirmation.delete",{title:e}),n.show(r),new Promise((e=>{n.addEventListener("primary",(()=>e(!0))),n.addEventListener("cancel",(()=>e(!1)))}))}async restore(e){const t=(0,o.dialogFactory)().withoutContent().asConfirmation();let n;return n=void 0===e?(0,i.getPhrase)("wcf.dialog.confirmation.restore.indeterminate"):(0,i.getPhrase)("wcf.dialog.confirmation.restore",{title:e}),t.show(n),new Promise((e=>{t.addEventListener("primary",(()=>e(!0))),t.addEventListener("cancel",(()=>e(!1)))}))}async softDelete(e,t=!1){let n;if(n=void 0===e?(0,i.getPhrase)("wcf.dialog.confirmation.softDelete.indeterminate"):(0,i.getPhrase)("wcf.dialog.confirmation.softDelete",{title:e}),t)return this.withReason(n,!0);const r=(0,o.dialogFactory)().withoutContent().asConfirmation();return r.show(n),new Promise((e=>{r.addEventListener("primary",(()=>{e({result:!0})})),r.addEventListener("cancel",(()=>{e({result:!1})}))}))}async withReason(e,t){const n=(0,o.dialogFactory)().withoutContent().asConfirmation(),a=r.getUniqueId(),s=(0,i.getPhrase)(t?"wcf.dialog.confirmation.reason.optional":"wcf.dialog.confirmation.reason"),l=document.createElement("dl");l.innerHTML=`\n
    \n
    \n `;const c=l.querySelector("textarea");return n.content.append(l),n.show(e),new Promise((e=>{n.addEventListener("primary",(()=>{e({result:!0,reason:c.value.trim()})})),n.addEventListener("cancel",(()=>{e({result:!1,reason:""})}))}))}}t.confirmationFactory=function(){return new s}})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const n=new Map,o={add(e,t){if(n.has(e))throw new Error(`Captcha with id '${e}' is already registered.`);if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'callback'.");n.set(e,t)},delete(e){if(!n.has(e))throw new Error(`Unknown captcha with id '${e}'.`);n.delete(e)},has:e=>n.has(e),getData(e){if(!n.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return n.get(e)()},setupDialog(e,t){let n;return e.addEventListener("validate",(e=>{o.has(t)&&(n=o.getData(t),o.delete(t),n instanceof Promise&&(e.detail.push(new Promise((e=>{n.then((()=>{e(!0)})).catch((()=>{e(!1)}))}))),e.preventDefault()))})),new Promise((t=>{e.addEventListener("primary",(()=>{void 0!==n?n instanceof Promise?n.then((e=>{t(e)})):t(n):t({})}))}))}};return o})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===n}Object.defineProperty(t,"__esModule",{value:!0}),t.Tab=t.Space=t.Home=t.Escape=t.Enter=t.End=t.Comma=t.ArrowUp=t.ArrowRight=t.ArrowLeft=t.ArrowDown=void 0,t.ArrowDown=function(e){return n(e,"ArrowDown",40)},t.ArrowLeft=function(e){return n(e,"ArrowLeft",37)},t.ArrowRight=function(e){return n(e,"ArrowRight",39)},t.ArrowUp=function(e){return n(e,"ArrowUp",38)},t.Comma=function(e){return n(e,",",44)},t.End=function(e){return n(e,"End",35)},t.Enter=function(e){return n(e,"Enter",13)},t.Escape=function(e){return n(e,"Escape",27)},t.Home=function(e){return n(e,"Home",36)},t.Space=function(e){return n(e,"Space",32)},t.Tab=function(e){return n(e,"Tab",9)}})),define("WoltLabSuite/Core/Helper/PromiseMutex",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseMutex=void 0,t.promiseMutex=function(e){let t=!1;return function(...n){return!t&&(t=!0,e(...n).finally((()=>{t=!1})),!0)}}})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,n,o,i,r,a){"use strict";function s(e,t,n){const i=u.get(e);if(void 0===n&&void 0===(n=Array.from(i.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);i.element.value=t.toString(),o.triggerEvent(i.element,"change"),i.dropdownToggle.innerHTML=n.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),i.dropdownToggle.append(r),u.set(e,i),"function"==typeof i.callback&&i.callback(n)}function l(e){const t=e.currentTarget;p.get(t).forEach((e=>{const n=document.createElement("input");n.type="hidden",n.name=e,n.value=d(e).toString(),t.appendChild(n)}))}function c(e){const t=u.get(e);if(void 0===t)throw new Error(`Expected a valid language chooser input element, '${e}' is not i18n input field.`);return t}function d(e){return~~c(e).element.value}Object.defineProperty(t,"__esModule",{value:!0}),t.setLanguageId=t.removeChooser=t.getLanguageId=t.getChooser=t.init=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importDefault(a);const u=new Map,p=new WeakMap;t.init=function(e,t,n,o,c,d){if(u.has(t))return;const h=document.getElementById(e);if(null===h)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let m=document.getElementById(t);null===m&&(m=document.createElement("input"),m.type="hidden",m.id=t,m.name=t,m.value=n.toString(),h.appendChild(m)),function(e,t,n,o,c,d){function h(t){const n=t.currentTarget,o=~~n.dataset.languageId,i=b.querySelector(".active");null!==i&&i.classList.remove("active"),o&&n.classList.add("active"),s(e,o,n)}let m;const f=t.parentElement;"DD"===f.nodeName?(m=document.createElement("div"),m.className="dropdown",f.insertAdjacentElement("afterbegin",m)):(m=f,m.classList.add("dropdown")),r.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle boxFlag box24 inputPrefix","DD"===f.nodeName&&g.classList.add("button"),m.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",m.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(o).forEach((([e,t])=>{const o=document.createElement("li");o.className="boxFlag",o.addEventListener("click",h),o.dataset.languageId=e,void 0!==t.languageCode&&(o.dataset.languageCode=t.languageCode),b.appendChild(o);const i=document.createElement("a");i.className="box24",i.href="#",i.addEventListener("click",(e=>e.preventDefault())),o.appendChild(i);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",i.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,i.appendChild(a),+e===n&&(g.innerHTML=i.innerHTML,g.append(v))})),d){const e=document.createElement("li");e.className="dropdownDivider",b.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",h),b.appendChild(t);const o=document.createElement("a");o.textContent=i.get("wcf.global.language.noSelection"),t.appendChild(o),0===n&&(g.innerHTML=o.innerHTML,g.append(v)),t.addEventListener("click",h)}else if(0===n){g.innerHTML="";const e=document.createElement("div");g.appendChild(e);const t=document.createElement("fa-icon");t.size=24,t.setIcon("question"),e.appendChild(t);const n=document.createElement("span");n.textContent=i.get("wcf.global.language.noSelection"),n.append(t),e.appendChild(n)}a.default.init(g),u.set(e,{callback:c,dropdownMenu:b,dropdownToggle:g,element:t});const w=t.closest("form");if(null!==w){w.addEventListener("submit",l);let t=p.get(w);void 0===t&&(t=[],p.set(w,t)),t.push(e)}}(t,m,n,o,c,d)},t.getChooser=c,t.getLanguageId=d,t.removeChooser=function(e){u.delete(e)},t.setLanguageId=function(e,t){if(void 0===u.get(e))throw new Error(`Expected a valid input element, '${e}' is not i18n input field.`);s(e,t)}})),define("WoltLabSuite/Core/Language/Input",["require","exports","tslib","../Dom/Util","../Language","../Ui/Dropdown/Simple","../StringUtil"],(function(e,t,n,o,i,r,a){"use strict";function s(e,t,n){const o=d.get(e),i=r.default.getDropdownMenu(o.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=i?i.textContent:"";if(o.languageId!==t){const i=p.get(e);if(o.languageId){const e=o.callbacks.get("beforeSelect");e&&e(o.element),i.set(o.languageId,o.element.value)}if(0===t?p.set(e,new Map):(o.buttonLabel.classList.contains("active")||n)&&(o.element.value=i.get(t)||""),o.buttonLabel.textContent=a,o.buttonLabel.querySelector("fa-icon")?.remove(),t){o.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),o.buttonLabel.append(e)}else o.buttonLabel.classList.remove("active");o.languageId=t}n||(o.element.blur(),o.element.focus()),o.callbacks.has("select")&&o.callbacks.get("select")(o.element)}function l(e,t){if("open"!==t)return;const n=r.default.getDropdownMenu(e),o=document.getElementById(e).dataset.inputId,i=d.get(o),a=p.get(o);Array.from(n.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let n=!1;i.languageId&&(n=t===i.languageId?""===i.element.value.trim():!a.get(t));const o=e.querySelector("span");if(o.querySelector("fa-icon")?.remove(),n){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),o.append(t)}else e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const n=d.get(e);if(!n.isEnabled)return;const o=p.get(e);n.callbacks.has("submit")&&n.callbacks.get("submit")(n.element),n.languageId&&o.set(n.languageId,n.element.value),o.size&&(o.forEach((function(n,o){const i=document.createElement("input");i.type="hidden",i.name=`${e}_i18n[${o}]`,i.value=n,t.appendChild(i)})),n.element.removeAttribute("name"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.isEnabled=t.enable=t.disable=t.setValues=t.getValues=t.unregister=t.registerCallback=t.init=void 0,o=n.__importDefault(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importStar(a);const d=new Map,u=new WeakMap,p=new Map;t.init=function(e,t,n,o){if(p.has(e))return;const h=document.getElementById(e);if(null===h)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const m=new Map;Object.entries(t).forEach((([e,t])=>{m.set(+e,a.unescapeHTML(t))})),p.set(e,m),function(e,t,n,o,a){let p=t.parentElement;if(!p.classList.contains("inputAddon")){p=document.createElement("div"),p.className="inputAddon","TEXTAREA"===t.nodeName&&p.classList.add("inputAddonTextarea"),p.dataset.inputId=e;const n=document.activeElement===t;t.insertAdjacentElement("beforebegin",p),p.appendChild(t),n&&t.focus()}p.classList.add("dropdown");const h=document.createElement("span");h.className="button dropdownToggle inputPrefix";const m=document.createElement("span");m.textContent=i.get("wcf.global.button.disabledI18n"),h.appendChild(m),p.insertBefore(h,t);const f=document.createElement("ul");f.className="dropdownMenu",h.insertAdjacentElement("afterend",f);const g=t=>{let n;n=t instanceof HTMLElement?t:t.currentTarget;const o=~~n.dataset.languageId,i=f.querySelector(".active");null!==i&&i.classList.remove("active"),o&&n.classList.add("active");const r=t instanceof HTMLElement;s(e,o,r)};if(Object.entries(o).forEach((([e,t])=>{const n=document.createElement("li");n.dataset.languageId=e;const o=document.createElement("span");o.textContent=t,n.appendChild(o),n.addEventListener("click",g),f.appendChild(n)})),!a){const e=document.createElement("li");e.className="dropdownDivider",f.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",g);const n=document.createElement("span");n.textContent=i.get("wcf.global.button.disabledI18n"),t.appendChild(n),f.appendChild(t)}let b;(a||n.size)&&(b=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(h),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:m,callbacks:new Map,element:t,languageId:0,isEnabled:!0,forceSelection:a});const v=t.closest("form");if(null!==v){v.addEventListener("submit",c);let t=u.get(v);void 0===t&&(t=[],u.set(v,t)),t.push(e)}b&&g(b)}(e,h,m,n,o)},t.registerCallback=function(e,t,n){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,n)},t.unregister=function(e){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);p.delete(e),d.delete(e)},t.getValues=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);const n=p.get(e);return n.set(t.languageId,t.element.value),n},t.setValues=function(e,t){const n=d.get(e);if(void 0===n)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);n.element.value="";const o=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(o.has(0))return n.element.value=o.get(0),o.delete(0),p.set(e,o),void s(e,0,!0);p.set(e,o),n.languageId=0,s(e,window.LANGUAGE_ID,!0)},t.disable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid element, '${e}' is not an i18n input field.`);if(!t.isEnabled)return;t.isEnabled=!1;const n=t.buttonLabel.parentElement;o.default.hide(n),n.parentElement.classList.remove("inputAddon","dropdown")},t.enable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(t.isEnabled)return;t.isEnabled=!0;const n=t.buttonLabel.parentElement;o.default.show(n),n.parentElement.classList.add("inputAddon","dropdown")},t.isEnabled=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);return t.isEnabled},t.validate=function(e,t){const n=d.get(e);if(void 0===n)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(!n.isEnabled)return!0;const o=p.get(e),i=r.default.getDropdownMenu(n.element.parentElement.id);n.languageId&&o.set(n.languageId,n.element.value);let a=!1,s=!1;return Array.from(i.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(o.has(t)&&0!==o.get(t).length){if(a)return!1;s=!0}else{if(s)return!1;a=!0}})),!a||t}})),define("WoltLabSuite/Core/Component/Ckeditor/Event",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listenToCkeditor=t.dispatchToCkeditor=void 0;class n{#E;constructor(e){this.#E=e}collectMetaData(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:collect-meta-data",{detail:e}))}changeData(){this.#E.dispatchEvent(new CustomEvent("ckeditor5:change-data"))}destroy(){this.#E.dispatchEvent(new CustomEvent("ckeditor5:destroy"))}discardRecoveredData(){this.#E.dispatchEvent(new CustomEvent("ckeditor5:discard-recovered-data"))}autosave(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:autosave",{detail:e}))}insertAttachment(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:insert-attachment",{detail:e}))}insertQuote(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:insert-quote",{detail:e}))}ready(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:ready",{detail:e}))}removeAttachment(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:remove-attachment",{detail:e}))}reset(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:reset",{detail:e}))}setupConfiguration(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:setup-configuration",{detail:e}))}setupFeatures(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:setup-features",{detail:e}))}submitOnEnter(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:submit-on-enter",{detail:e}))}uploadAttachment(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:upload-attachment",{detail:e}))}uploadMedia(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:upload-media",{detail:e}))}}class o{#E;constructor(e){this.#E=e}bbcode(e){return this.#E.addEventListener("ckeditor5:bbcode",(t=>{const n=e(t.detail);if(!0===n)t.preventDefault();else if(!1!==n)throw new Error("An event listener for the bbcode event did not return a boolean to indicate if the BBCode is handled.")})),this}changeData(e){return this.#E.addEventListener("ckeditor5:change-data",(()=>{e()})),this}collectMetaData(e){return this.#E.addEventListener("ckeditor5:collect-meta-data",(t=>{e(t.detail)})),this}destroy(e){return this.#E.addEventListener("ckeditor5:destroy",(()=>{e()})),this}discardRecoveredData(e){return this.#E.addEventListener("ckeditor5:discard-recovered-data",(()=>{e()}),{once:!0}),this}insertAttachment(e){return this.#E.addEventListener("ckeditor5:insert-attachment",(t=>{e(t.detail)})),this}insertQuote(e){return this.#E.addEventListener("ckeditor5:insert-quote",(t=>{e(t.detail)})),this}ready(e){return this.#E.addEventListener("ckeditor5:ready",(t=>{e(t.detail)}),{once:!0}),this}removeAttachment(e){return this.#E.addEventListener("ckeditor5:remove-attachment",(t=>{e(t.detail)})),this}reset(e){return this.#E.addEventListener("ckeditor5:reset",(t=>{e(t.detail)})),this}setupConfiguration(e){return this.#E.addEventListener("ckeditor5:setup-configuration",(t=>{e(t.detail)}),{once:!0}),this}setupFeatures(e){return this.#E.addEventListener("ckeditor5:setup-features",(t=>{e(t.detail)}),{once:!0}),this}submitOnEnter(e){return this.#E.addEventListener("ckeditor5:submit-on-enter",(t=>{e(t.detail)})),this}uploadAttachment(e){return this.#E.addEventListener("ckeditor5:upload-attachment",(t=>{e(t.detail)})),this}uploadMedia(e){return this.#E.addEventListener("ckeditor5:upload-media",(t=>{e(t.detail)})),this}autosave(e){return this.#E.addEventListener("ckeditor5:autosave",(t=>{e(t.detail)})),this}}t.dispatchToCkeditor=function(e){return new n(e)},t.listenToCkeditor=function(e){return new o(e)}})),define("WoltLabSuite/Core/Component/Ckeditor/Attachment",["require","exports","./Event"],(function(e,t,n){"use strict";function o(e,t,o){const i={abortController:o,file:t};return(0,n.dispatchToCkeditor)(e).uploadAttachment(i),new Promise((e=>{i.promise.then((({attachmentId:t,url:n})=>{e({"data-attachment-id":t.toString(),urls:{default:n}})}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,n.listenToCkeditor)(e).setupConfiguration((({configuration:t,features:i})=>{if(!i.attachment)return;const r=function(e){const t=document.querySelector(`.messageTabMenu[data-wysiwyg-container-id="${e.id}"]`);if(!t)return[];const n=t.querySelector(".formAttachmentContent > .formAttachmentList");return n?Array.from(n.querySelectorAll('.formAttachmentListItem[data-is-image="1"]')).map((e=>parseInt(e.dataset.objectId))):[]}(e);t.woltlabAttachment={inlineImageIds:r,resolveAttachmentUrl(e,t){let n="";return t&&(n="&thumbnail=1"),`${window.WSC_API_URL}index.php?attachment/${e}/${n}`}},t.woltlabUpload={uploadImage:(t,n)=>o(e,t,n),uploadOther:t=>o(e,t)},(0,n.listenToCkeditor)(e).ready((({ckeditor:e})=>{!function(e){(0,n.listenToCkeditor)(e.sourceElement).insertAttachment((({attachmentId:t,url:n})=>{""===n?e.insertText(`[attach=${t}][/attach]`):e.insertHtml(``)}))}(e),function(e){(0,n.listenToCkeditor)(e.sourceElement).removeAttachment((({attachmentId:t})=>{e.removeAll("imageBlock",{attachmentId:t}),e.removeAll("imageInline",{attachmentId:t})}))}(e)}))}))}})),__createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){var t,n;if(e&&e.__esModule)return e;if(t={},null!=e)for(n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t},define("WoltLabSuite/Core/Component/Ckeditor/Media",["require","exports","./Event"],(function(e,t,n){"use strict";function o(e,t,o){const i={abortController:o,file:t};return(0,n.dispatchToCkeditor)(e).uploadMedia(i),Promise.reject()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(t){(0,n.listenToCkeditor)(t).setupConfiguration((({configuration:e,features:n})=>{e.woltlabMedia={resolveMediaUrl(e,t){let n="";return"original"!==t&&(n=`&thumbnail=${t}`),`${window.WSC_API_URL}index.php?media/${e}/${n}`}},!n.attachment&&n.media&&(e.woltlabUpload={uploadImage:(e,n)=>o(t,e,n),uploadOther:e=>o(t,e)})})).ready((({ckeditor:t})=>{t.features.media&&new Promise(((t,n)=>{e(["../../Media/Manager/Editor"],t,n)})).then(__importStar).then((({MediaManagerEditor:e})=>{new e({ckeditor:t})}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Mention",["require","exports","../../Ajax/Backend","../../Dom/Util","./Event"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,i.listenToCkeditor)(e).setupConfiguration((({configuration:e,features:t})=>{t.mention&&(e.mention={feeds:[{feed:e=>async function(e){if(e.length>24)return[];const t=new URL(window.WSC_API_URL+"index.php?editor-get-mention-suggestions/");return t.searchParams.set("query",e),(await(0,n.prepareRequest)(t.toString()).get().allowCaching().disableLoadingIndicator().fetchAsJson()).map((e=>"user"===e.type?{id:`@${e.username}`,text:`@${e.username}`,icon:e.avatarTag,objectId:e.userID,type:e.type}:{id:`@${e.name}`,text:`@${e.name}`,icon:'',objectId:e.groupID,type:e.type}))}(e),itemRenderer:e=>(0,o.createFragmentFromHtml)(`\n ${e.icon} ${e.text}\n `).firstElementChild,marker:"@",minimumCharacters:3}]})}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Quote",["require","exports","../../StringUtil","./Event"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,o.listenToCkeditor)(e).ready((({ckeditor:t})=>{(0,o.listenToCkeditor)(e).insertQuote((e=>{!function(e,t){let{author:o,content:i,link:r}=t;var a;t.isText&&(a=i,i=(a=(a=(0,n.escapeHTML)(a)).replaceAll("\n\n\n\n\n",'


    ')).split("\n\n").map((e=>`

    ${e=e.replaceAll("\n","
    ")}

    `)).join("")),o=(0,n.escapeHTML)(o),r=(0,n.escapeHTML)(r),e.insertHtml(`${i}\n


    `)}(t,e)}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Autosave",["require","exports","../../Core","../../Language","../../StringUtil","./Event"],(function(e,t,n,o,i,r){"use strict";function a(e){return`${(0,n.getStoragePrefix)()}ckeditor5-${e}`}function s(e){try{window.localStorage.removeItem(a(e))}catch{}}Object.defineProperty(t,"__esModule",{value:!0}),t.initializeAutosave=t.setupRestoreDraft=t.deleteDraft=void 0,t.deleteDraft=s,t.setupRestoreDraft=function(e,t){let n;try{const e=window.localStorage.getItem(a(t));null!==e&&(n=JSON.parse(e))}catch{return void s(t)}if(void 0===n)return;const l=parseInt(e.sourceElement.dataset.autosaveLastEditTime)||0;if(l&&1e3*l>=n.timestamp)return;const c=e.data.get();if(c===n.html)return;e.data.set(n.html);const d=document.createElement("div");d.classList.add("ckeditor5__restoreDraft");const u=function(){const e=document.createElement("div");return e.classList.add("ckeditor5__restoreDraft__dialog"),e.setAttribute("role","alertdialog"),e.tabIndex=0,e.innerHTML=`\n
    \n ${(0,i.escapeHTML)((0,o.getPhrase)("wcf.editor.restoreDraft"))}\n
    \n
    \n \n \n \n
    \n `,e}(),p=document.createElement("div");p.classList.add("ckeditor5_restoreDraft__wrapper"),p.append(u),e.ui.element.insertAdjacentElement("beforebegin",d),d.append(e.ui.element,p);const h=(e,t,n)=>{n&&u.focus()};e.ui.focusTracker.on("change:isFocused",h);const m=()=>{e.ui.focusTracker.off("change:isFocused",h),d.insertAdjacentElement("beforebegin",e.ui.element),d.remove()};u.querySelector('button[data-type="submit"]').addEventListener("click",(()=>{m()})),u.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{e.data.set(c),s(t),""===c&&(0,r.dispatchToCkeditor)(e.sourceElement).discardRecoveredData(),m()}));const f=Symbol("autosave");u.querySelector('button[data-type="preview"]').addEventListener("click",(()=>{e.enableReadOnlyMode(f);const t=function(){const e=document.createElement("div");return e.classList.add("ck","ck-toolbar__items"),e.innerHTML=`\n \n `,e}(),n=e.ui.view.toolbar.element,r=Array.from(n.children);r.forEach((e=>e.hidden=!0)),n.append(t),p.hidden=!0;const a=t.querySelector("button");a.addEventListener("click",(()=>{e.disableReadOnlyMode(f),p.hidden=!1,t.remove(),r.forEach((e=>e.hidden=!1))})),a.focus()}))},t.initializeAutosave=function(e,t,n){!function(){const e=Date.now()-604800;Object.keys(localStorage).filter((e=>e.startsWith("ckeditor5-"))).forEach((t=>{let n,o;try{n=window.localStorage.getItem(t)}catch{return}if(null!==n){try{o=JSON.parse(n)}catch{}if(void 0===o||o.timestamp(function(e,t,n){if(""===n)return void s(t);const o={html:n,timestamp:Date.now()};try{window.localStorage.setItem(a(t),JSON.stringify(o)),(0,r.dispatchToCkeditor)(e).autosave(o)}catch(e){console.warn("Unable to write to the local storage.",e)}}(e,n,t.data.get()),Promise.resolve()),waitingTime:15e3},(0,r.listenToCkeditor)(e).reset((()=>s(n))),e instanceof HTMLTextAreaElement&&e.form&&e.form.addEventListener("submit",(()=>s(n)))}})),define("WoltLabSuite/Core/Component/Ckeditor/Configuration",["require","exports","../../Language"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConfigurationFor=void 0;class o{#S;#C="|";#L=[];#k=[];#x={};constructor(e){this.#S=e}#T(){this.#S.undo?this.#k.push("undo","redo"):this.#L.push("Undo")}#M(){this.#k.push("bold","italic")}#D(){const e=[];this.#S.heading?e.push("heading"):this.#L.push("Heading"),this.#S.underline?e.push("underline"):this.#L.push("Underline"),this.#S.strikethrough?e.push("strikethrough"):this.#L.push("Strikethrough"),e.push(this.#C),this.#S.mark?e.push("highlight"):this.#L.push("Highlight"),this.#S.fontColor?e.push("fontColor"):this.#L.push("FontColor"),this.#S.fontFamily?e.push("fontFamily"):this.#L.push("FontFamily"),this.#S.fontSize?e.push("fontSize"):this.#L.push("FontSize"),e.push(this.#C),this.#S.subscript?e.push("subscript"):this.#L.push("Subscript"),this.#S.superscript?e.push("superscript"):this.#L.push("Superscript"),0!==e.length&&e.push(this.#C,"removeFormat"),e.length>0&&(this.#k.push({label:"woltlabToolbarGroup_format",items:e}),this.#x.format={icon:"ellipsis;false",label:(0,n.getPhrase)("wcf.editor.button.group.format")})}#I(){this.#S.list?(this.#k.push({label:"woltlabToolbarGroup_list",items:["bulletedList","numberedList","outdent","indent"]}),this.#x.list={icon:"list;false",label:(0,n.getPhrase)("wcf.editor.button.group.list")}):this.#L.push("List")}#A(){this.#S.alignment?this.#k.push("alignment"):this.#L.push("Alignment")}#P(){this.#S.link?this.#k.push("link"):this.#L.push("Link","LinkImage")}#j(){this.#S.image?(this.#k.push("insertImage"),this.#S.attachment||this.#L.push("ImageUpload","ImageUploadUI","WoltlabAttachment")):this.#S.link&&this.#L.push("LinkImage")}#O(){this.#S.codeBlock?this.#k.push("codeBlock"):this.#L.push("CodeBlock","WoltlabCodeBlock"),this.#S.code?this.#k.push("code"):this.#L.push("Code","WoltlabCode")}#q(){this.#S.table?this.#k.push("insertTable"):this.#L.push("Table","TableToolbar"),this.#S.quoteBlock?this.#k.push("blockQuote"):this.#L.push("BlockQuote","WoltlabBlockQuote"),this.#S.spoiler?this.#k.push("spoiler"):this.#L.push("WoltlabSpoiler"),this.#S.html?this.#k.push("htmlEmbed"):this.#L.push("HtmlEmbed","WoltlabHtmlEmbed")}#N(){this.#k.push(this.#C)}#B(){this.#S.media||this.#L.push("WoltlabMedia")}#U(){this.#S.mention||this.#L.push("Mention","WoltlabMention")}#F(){let e=!1;return this.#k.filter((t=>"string"==typeof t&&t===this.#C?!!e&&(e=!1,!0):(e=!0,!0)))}build(){if(this.#L.length>0||this.#k.length>0)throw new Error("Cannot build the configuration twice.");this.#T(),this.#N(),this.#N(),this.#M(),this.#P(),this.#D(),this.#N(),this.#I(),this.#A(),this.#N(),this.#j(),this.#O(),this.#q(),this.#N(),this.#B(),this.#U()}toConfig(){const e=Object.keys(window.CKEDITOR_TRANSLATIONS).find((e=>"en"!==e)),t=e||"en",{dictionary:o}=window.CKEDITOR_TRANSLATIONS[t];return o.Author=(0,n.getPhrase)("wcf.ckeditor.quote.author"),o.Filename=(0,n.getPhrase)("wcf.ckeditor.code.fileName"),o["Line number"]=(0,n.getPhrase)("wcf.ckeditor.code.lineNumber"),o.Quote=(0,n.getPhrase)("wcf.ckeditor.quote"),o["Quote from %0"]=(0,n.getPhrase)("wcf.ckeditor.quoteFrom"),o.Spoiler=(0,n.getPhrase)("wcf.editor.button.spoiler"),{alignment:{options:[{name:"left",className:"text-left"},{name:"center",className:"text-center"},{name:"right",className:"text-right"},{name:"justify",className:"text-justify"}]},highlight:{options:[{model:"markerWarning",class:"marker-warning",title:(0,n.getPhrase)("wcf.ckeditor.marker.warning"),color:"var(--marker-warning)",type:"marker"},{model:"markerError",class:"marker-error",title:(0,n.getPhrase)("wcf.ckeditor.marker.error"),color:"var(--marker-error)",type:"marker"},{model:"markerInfo",class:"marker-info",title:(0,n.getPhrase)("wcf.ckeditor.marker.info"),color:"var(--marker-info)",type:"marker"},{model:"markerSuccess",class:"marker-success",title:(0,n.getPhrase)("wcf.ckeditor.marker.success"),color:"var(--marker-success)",type:"marker"}]},language:e,link:{defaultProtocol:"https://"},removePlugins:this.#L,fontFamily:{options:["default","Arial, Helvetica, sans-serif","Comic Sans MS, Marker Felt, cursive","Consolas, Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif",'Trebuchet MS", Helvetica, sans-serif',"Verdana, Geneva, sans-serif"]},fontSize:{options:[12,"default",18,23,28]},toolbar:this.#F(),ui:{poweredBy:{label:null},viewportOffset:{top:50}},woltlabToolbarGroup:this.#x,extraPlugins:[]}}}t.createConfigurationFor=function(e){const t=new o(e);return t.build(),t.toConfig()}})),define("WoltLabSuite/Core/Component/Ckeditor/SubmitOnEnter",["require","exports","./Event"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e,t){e.editing.view.document.on("enter",((e,o)=>{if(o.isSoft)return;o.preventDefault(),e.stop();const i=t.getHtml();""!==i&&(0,n.dispatchToCkeditor)(t.sourceElement).submitOnEnter({ckeditor:t,html:i})}),{priority:"high"})}})),define("WoltLabSuite/Core/Component/Ckeditor/Normalizer",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,o){"use strict";function i(e,t){const n=e.closest("p");if(null===n)return;const o=document.createElement("figure");o.classList.add("image",t),o.append(e),n.insertAdjacentElement("beforebegin",o),""===n.innerHTML&&n.remove()}function r(e){const t=document.createElement("div");t.innerHTML=e,function(e){e.querySelectorAll("br").forEach((e=>{!function(e){for(;;){if(e.previousSibling||e.nextSibling)return;const t=e.parentElement;switch(t.tagName){case"B":case"DEL":case"EM":case"I":case"STRONG":case"SUB":case"SUP":case"SPAN":case"U":t.insertAdjacentElement("afterend",e),t.remove();break;default:return}}}(e),function(e){if("true"===e.dataset.ckeFiller)return;const t=e.closest("p, td");null!==t&&o.default.isAtNodeEnd(e,t)&&("TD"===t.tagName||t.childNodes.length>1)&&e.remove()}(e)}))}(t);const n=function(e){const t=[];return e.querySelectorAll("p").forEach((e=>{if(e.normalize(),1===e.childNodes.length){const n=e.childNodes[0];n instanceof HTMLBRElement&&"true"!==n.dataset.ckeFiller&&t.push(e)}})),t}(t);return function(e){if(0!==e.length)for(let t=0,n=e.length;t{e.remove()})),t+=i}}}(n),function(e){e.querySelectorAll("img").forEach((e=>{e.classList.contains("messageFloatObjectRight")?i(e,"image-style-side"):e.classList.contains("messageFloatObjectLeft")&&i(e,"image-style-side-left")}))}(t),t.innerHTML}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLegacyMessage=t.normalizeLegacyHtml=void 0,o=n.__importDefault(o),t.normalizeLegacyHtml=r,t.normalizeLegacyMessage=function(e){if(!(e instanceof HTMLTextAreaElement))throw new TypeError("Expected the element to be a \n `;const c=l.querySelector("textarea");return n.content.append(l),n.show(e),new Promise((e=>{n.addEventListener("primary",(()=>{e({result:!0,reason:c.value.trim()})})),n.addEventListener("cancel",(()=>{e({result:!1,reason:""})}))}))}}t.confirmationFactory=function(){return new s}})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const n=new Map,o={add(e,t){if(n.has(e))throw new Error(`Captcha with id '${e}' is already registered.`);if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'callback'.");n.set(e,t)},delete(e){if(!n.has(e))throw new Error(`Unknown captcha with id '${e}'.`);n.delete(e)},has:e=>n.has(e),getData(e){if(!n.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return n.get(e)()},setupDialog(e,t){let n;return e.addEventListener("validate",(e=>{o.has(t)&&(n=o.getData(t),o.delete(t),n instanceof Promise&&(e.detail.push(new Promise((e=>{n.then((()=>{e(!0)})).catch((()=>{e(!1)}))}))),e.preventDefault()))})),new Promise((t=>{e.addEventListener("primary",(()=>{void 0!==n?n instanceof Promise?n.then((e=>{t(e)})):t(n):t({})}))}))}};return o})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function n(e,t,n){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===n}Object.defineProperty(t,"__esModule",{value:!0}),t.Tab=t.Space=t.Home=t.Escape=t.Enter=t.End=t.Comma=t.ArrowUp=t.ArrowRight=t.ArrowLeft=t.ArrowDown=void 0,t.ArrowDown=function(e){return n(e,"ArrowDown",40)},t.ArrowLeft=function(e){return n(e,"ArrowLeft",37)},t.ArrowRight=function(e){return n(e,"ArrowRight",39)},t.ArrowUp=function(e){return n(e,"ArrowUp",38)},t.Comma=function(e){return n(e,",",44)},t.End=function(e){return n(e,"End",35)},t.Enter=function(e){return n(e,"Enter",13)},t.Escape=function(e){return n(e,"Escape",27)},t.Home=function(e){return n(e,"Home",36)},t.Space=function(e){return n(e,"Space",32)},t.Tab=function(e){return n(e,"Tab",9)}})),define("WoltLabSuite/Core/Helper/PromiseMutex",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.promiseMutex=void 0,t.promiseMutex=function(e){let t=!1;return function(...n){return!t&&(t=!0,e(...n).finally((()=>{t=!1})),!0)}}})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,n,o,i,r,a){"use strict";function s(e,t,n){const i=u.get(e);if(void 0===n&&void 0===(n=Array.from(i.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);i.element.value=t.toString(),o.triggerEvent(i.element,"change"),i.dropdownToggle.innerHTML=n.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),i.dropdownToggle.append(r),u.set(e,i),"function"==typeof i.callback&&i.callback(n)}function l(e){const t=e.currentTarget;p.get(t).forEach((e=>{const n=document.createElement("input");n.type="hidden",n.name=e,n.value=d(e).toString(),t.appendChild(n)}))}function c(e){const t=u.get(e);if(void 0===t)throw new Error(`Expected a valid language chooser input element, '${e}' is not i18n input field.`);return t}function d(e){return~~c(e).element.value}Object.defineProperty(t,"__esModule",{value:!0}),t.setLanguageId=t.removeChooser=t.getLanguageId=t.getChooser=t.init=void 0,o=n.__importStar(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importDefault(a);const u=new Map,p=new WeakMap;t.init=function(e,t,n,o,c,d){if(u.has(t))return;const h=document.getElementById(e);if(null===h)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let m=document.getElementById(t);null===m&&(m=document.createElement("input"),m.type="hidden",m.id=t,m.name=t,m.value=n.toString(),h.appendChild(m)),function(e,t,n,o,c,d){function h(t){const n=t.currentTarget,o=~~n.dataset.languageId,i=b.querySelector(".active");null!==i&&i.classList.remove("active"),o&&n.classList.add("active"),s(e,o,n)}let m;const f=t.parentElement;"DD"===f.nodeName?(m=document.createElement("div"),m.className="dropdown",f.insertAdjacentElement("afterbegin",m)):(m=f,m.classList.add("dropdown")),r.default.hide(t);const g=document.createElement("a");g.className="dropdownToggle boxFlag box24 inputPrefix","DD"===f.nodeName&&g.classList.add("button"),m.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",m.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(o).forEach((([e,t])=>{const o=document.createElement("li");o.className="boxFlag",o.addEventListener("click",h),o.dataset.languageId=e,void 0!==t.languageCode&&(o.dataset.languageCode=t.languageCode),b.appendChild(o);const i=document.createElement("a");i.className="box24",i.href="#",i.addEventListener("click",(e=>e.preventDefault())),o.appendChild(i);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",i.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,i.appendChild(a),+e===n&&(g.innerHTML=i.innerHTML,g.append(v))})),d){const e=document.createElement("li");e.className="dropdownDivider",b.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",h),b.appendChild(t);const o=document.createElement("a");o.textContent=i.get("wcf.global.language.noSelection"),t.appendChild(o),0===n&&(g.innerHTML=o.innerHTML,g.append(v)),t.addEventListener("click",h)}else if(0===n){g.innerHTML="";const e=document.createElement("div");g.appendChild(e);const t=document.createElement("fa-icon");t.size=24,t.setIcon("question"),e.appendChild(t);const n=document.createElement("span");n.textContent=i.get("wcf.global.language.noSelection"),n.append(t),e.appendChild(n)}a.default.init(g),u.set(e,{callback:c,dropdownMenu:b,dropdownToggle:g,element:t});const w=t.closest("form");if(null!==w){w.addEventListener("submit",l);let t=p.get(w);void 0===t&&(t=[],p.set(w,t)),t.push(e)}}(t,m,n,o,c,d)},t.getChooser=c,t.getLanguageId=d,t.removeChooser=function(e){u.delete(e)},t.setLanguageId=function(e,t){if(void 0===u.get(e))throw new Error(`Expected a valid input element, '${e}' is not i18n input field.`);s(e,t)}})),define("WoltLabSuite/Core/Language/Input",["require","exports","tslib","../Dom/Util","../Language","../Ui/Dropdown/Simple","../StringUtil"],(function(e,t,n,o,i,r,a){"use strict";function s(e,t,n){const o=d.get(e),i=r.default.getDropdownMenu(o.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=i?i.textContent:"";if(o.languageId!==t){const i=p.get(e);if(o.languageId){const e=o.callbacks.get("beforeSelect");e&&e(o.element),i.set(o.languageId,o.element.value)}if(0===t?p.set(e,new Map):(o.buttonLabel.classList.contains("active")||n)&&(o.element.value=i.get(t)||""),o.buttonLabel.textContent=a,o.buttonLabel.querySelector("fa-icon")?.remove(),t){o.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),o.buttonLabel.append(e)}else o.buttonLabel.classList.remove("active");o.languageId=t}n||(o.element.blur(),o.element.focus()),o.callbacks.has("select")&&o.callbacks.get("select")(o.element)}function l(e,t){if("open"!==t)return;const n=r.default.getDropdownMenu(e),o=document.getElementById(e).dataset.inputId,i=d.get(o),a=p.get(o);Array.from(n.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let n=!1;i.languageId&&(n=t===i.languageId?""===i.element.value.trim():!a.get(t));const o=e.querySelector("span");if(o.querySelector("fa-icon")?.remove(),n){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),o.append(t)}else e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const n=d.get(e);if(!n.isEnabled)return;const o=p.get(e);n.callbacks.has("submit")&&n.callbacks.get("submit")(n.element),n.languageId&&o.set(n.languageId,n.element.value),o.size&&(o.forEach((function(n,o){const i=document.createElement("input");i.type="hidden",i.name=`${e}_i18n[${o}]`,i.value=n,t.appendChild(i)})),n.element.removeAttribute("name"))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.validate=t.isEnabled=t.enable=t.disable=t.setValues=t.getValues=t.unregister=t.registerCallback=t.init=void 0,o=n.__importDefault(o),i=n.__importStar(i),r=n.__importDefault(r),a=n.__importStar(a);const d=new Map,u=new WeakMap,p=new Map;t.init=function(e,t,n,o){if(p.has(e))return;const h=document.getElementById(e);if(null===h)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const m=new Map;Object.entries(t).forEach((([e,t])=>{m.set(+e,a.unescapeHTML(t))})),p.set(e,m),function(e,t,n,o,a){let p=t.parentElement;if(!p.classList.contains("inputAddon")){p=document.createElement("div"),p.className="inputAddon","TEXTAREA"===t.nodeName&&p.classList.add("inputAddonTextarea"),p.dataset.inputId=e;const n=document.activeElement===t;t.insertAdjacentElement("beforebegin",p),p.appendChild(t),n&&t.focus()}p.classList.add("dropdown");const h=document.createElement("span");h.className="button dropdownToggle inputPrefix";const m=document.createElement("span");m.textContent=i.get("wcf.global.button.disabledI18n"),h.appendChild(m),p.insertBefore(h,t);const f=document.createElement("ul");f.className="dropdownMenu",h.insertAdjacentElement("afterend",f);const g=t=>{let n;n=t instanceof HTMLElement?t:t.currentTarget;const o=~~n.dataset.languageId,i=f.querySelector(".active");null!==i&&i.classList.remove("active"),o&&n.classList.add("active");const r=t instanceof HTMLElement;s(e,o,r)};if(Object.entries(o).forEach((([e,t])=>{const n=document.createElement("li");n.dataset.languageId=e;const o=document.createElement("span");o.textContent=t,n.appendChild(o),n.addEventListener("click",g),f.appendChild(n)})),!a){const e=document.createElement("li");e.className="dropdownDivider",f.appendChild(e);const t=document.createElement("li");t.dataset.languageId="0",t.addEventListener("click",g);const n=document.createElement("span");n.textContent=i.get("wcf.global.button.disabledI18n"),t.appendChild(n),f.appendChild(t)}let b;(a||n.size)&&(b=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(h),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:m,callbacks:new Map,element:t,languageId:0,isEnabled:!0,forceSelection:a});const v=t.closest("form");if(null!==v){v.addEventListener("submit",c);let t=u.get(v);void 0===t&&(t=[],u.set(v,t)),t.push(e)}b&&g(b)}(e,h,m,n,o)},t.registerCallback=function(e,t,n){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,n)},t.unregister=function(e){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);p.delete(e),d.delete(e)},t.getValues=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);const n=p.get(e);return n.set(t.languageId,t.element.value),n},t.setValues=function(e,t){const n=d.get(e);if(void 0===n)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);n.element.value="";const o=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(o.has(0))return n.element.value=o.get(0),o.delete(0),p.set(e,o),void s(e,0,!0);p.set(e,o),n.languageId=0,s(e,window.LANGUAGE_ID,!0)},t.disable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid element, '${e}' is not an i18n input field.`);if(!t.isEnabled)return;t.isEnabled=!1;const n=t.buttonLabel.parentElement;o.default.hide(n),n.parentElement.classList.remove("inputAddon","dropdown")},t.enable=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(t.isEnabled)return;t.isEnabled=!0;const n=t.buttonLabel.parentElement;o.default.show(n),n.parentElement.classList.add("inputAddon","dropdown")},t.isEnabled=function(e){const t=d.get(e);if(void 0===t)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);return t.isEnabled},t.validate=function(e,t){const n=d.get(e);if(void 0===n)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(!n.isEnabled)return!0;const o=p.get(e),i=r.default.getDropdownMenu(n.element.parentElement.id);n.languageId&&o.set(n.languageId,n.element.value);let a=!1,s=!1;return Array.from(i.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(o.has(t)&&0!==o.get(t).length){if(a)return!1;s=!0}else{if(s)return!1;a=!0}})),!a||t}})),define("WoltLabSuite/Core/Component/Ckeditor/Event",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listenToCkeditor=t.dispatchToCkeditor=void 0;class n{#E;constructor(e){this.#E=e}collectMetaData(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:collect-meta-data",{detail:e}))}changeData(){this.#E.dispatchEvent(new CustomEvent("ckeditor5:change-data"))}destroy(){this.#E.dispatchEvent(new CustomEvent("ckeditor5:destroy"))}discardRecoveredData(){this.#E.dispatchEvent(new CustomEvent("ckeditor5:discard-recovered-data"))}autosave(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:autosave",{detail:e}))}insertAttachment(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:insert-attachment",{detail:e}))}insertQuote(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:insert-quote",{detail:e}))}ready(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:ready",{detail:e}))}removeAttachment(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:remove-attachment",{detail:e}))}reset(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:reset",{detail:e}))}setupConfiguration(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:setup-configuration",{detail:e}))}setupFeatures(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:setup-features",{detail:e}))}submitOnEnter(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:submit-on-enter",{detail:e}))}uploadAttachment(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:upload-attachment",{detail:e}))}uploadMedia(e){this.#E.dispatchEvent(new CustomEvent("ckeditor5:upload-media",{detail:e}))}}class o{#E;constructor(e){this.#E=e}bbcode(e){return this.#E.addEventListener("ckeditor5:bbcode",(t=>{const n=e(t.detail);if(!0===n)t.preventDefault();else if(!1!==n)throw new Error("An event listener for the bbcode event did not return a boolean to indicate if the BBCode is handled.")})),this}changeData(e){return this.#E.addEventListener("ckeditor5:change-data",(()=>{e()})),this}collectMetaData(e){return this.#E.addEventListener("ckeditor5:collect-meta-data",(t=>{e(t.detail)})),this}destroy(e){return this.#E.addEventListener("ckeditor5:destroy",(()=>{e()})),this}discardRecoveredData(e){return this.#E.addEventListener("ckeditor5:discard-recovered-data",(()=>{e()}),{once:!0}),this}insertAttachment(e){return this.#E.addEventListener("ckeditor5:insert-attachment",(t=>{e(t.detail)})),this}insertQuote(e){return this.#E.addEventListener("ckeditor5:insert-quote",(t=>{e(t.detail)})),this}ready(e){return this.#E.addEventListener("ckeditor5:ready",(t=>{e(t.detail)}),{once:!0}),this}removeAttachment(e){return this.#E.addEventListener("ckeditor5:remove-attachment",(t=>{e(t.detail)})),this}reset(e){return this.#E.addEventListener("ckeditor5:reset",(t=>{e(t.detail)})),this}setupConfiguration(e){return this.#E.addEventListener("ckeditor5:setup-configuration",(t=>{e(t.detail)}),{once:!0}),this}setupFeatures(e){return this.#E.addEventListener("ckeditor5:setup-features",(t=>{e(t.detail)}),{once:!0}),this}submitOnEnter(e){return this.#E.addEventListener("ckeditor5:submit-on-enter",(t=>{e(t.detail)})),this}uploadAttachment(e){return this.#E.addEventListener("ckeditor5:upload-attachment",(t=>{e(t.detail)})),this}uploadMedia(e){return this.#E.addEventListener("ckeditor5:upload-media",(t=>{e(t.detail)})),this}autosave(e){return this.#E.addEventListener("ckeditor5:autosave",(t=>{e(t.detail)})),this}}t.dispatchToCkeditor=function(e){return new n(e)},t.listenToCkeditor=function(e){return new o(e)}})),define("WoltLabSuite/Core/Component/Ckeditor/Attachment",["require","exports","./Event"],(function(e,t,n){"use strict";function o(e,t,o){const i={abortController:o,file:t};return(0,n.dispatchToCkeditor)(e).uploadAttachment(i),new Promise((e=>{i.promise.then((({attachmentId:t,url:n})=>{e({"data-attachment-id":t.toString(),urls:{default:n}})}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,n.listenToCkeditor)(e).setupConfiguration((({configuration:t,features:i})=>{if(!i.attachment)return;const r=function(e){const t=document.querySelector(`.messageTabMenu[data-wysiwyg-container-id="${e.id}"]`);if(!t)return[];const n=t.querySelector(".formAttachmentContent > .formAttachmentList");return n?Array.from(n.querySelectorAll('.formAttachmentListItem[data-is-image="1"]')).map((e=>parseInt(e.dataset.objectId))):[]}(e);t.woltlabAttachment={inlineImageIds:r,resolveAttachmentUrl(e,t){let n="";return t&&(n="&thumbnail=1"),`${window.WSC_API_URL}index.php?attachment/${e}/${n}`}},t.woltlabUpload={uploadImage:(t,n)=>o(e,t,n),uploadOther:t=>o(e,t)},(0,n.listenToCkeditor)(e).ready((({ckeditor:e})=>{!function(e){(0,n.listenToCkeditor)(e.sourceElement).insertAttachment((({attachmentId:t,url:n})=>{""===n?e.insertText(`[attach=${t}][/attach]`):e.insertHtml(``)}))}(e),function(e){(0,n.listenToCkeditor)(e.sourceElement).removeAttachment((({attachmentId:t})=>{e.removeAll("imageBlock",{attachmentId:t}),e.removeAll("imageInline",{attachmentId:t})}))}(e)}))}))}})),__createBinding=this&&this.__createBinding||(Object.create?function(e,t,n,o){void 0===o&&(o=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,o,i)}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]}),__setModuleDefault=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),__importStar=this&&this.__importStar||function(e){var t,n;if(e&&e.__esModule)return e;if(t={},null!=e)for(n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(t,e,n);return __setModuleDefault(t,e),t},define("WoltLabSuite/Core/Component/Ckeditor/Media",["require","exports","./Event"],(function(e,t,n){"use strict";function o(e,t,o){const i={abortController:o,file:t};return(0,n.dispatchToCkeditor)(e).uploadMedia(i),Promise.reject()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(t){(0,n.listenToCkeditor)(t).setupConfiguration((({configuration:e,features:n})=>{e.woltlabMedia={resolveMediaUrl(e,t){let n="";return"original"!==t&&(n=`&thumbnail=${t}`),`${window.WSC_API_URL}index.php?media/${e}/${n}`}},!n.attachment&&n.media&&(e.woltlabUpload={uploadImage:(e,n)=>o(t,e,n),uploadOther:e=>o(t,e)})})).ready((({ckeditor:t})=>{t.features.media&&new Promise(((t,n)=>{e(["../../Media/Manager/Editor"],t,n)})).then(__importStar).then((({MediaManagerEditor:e})=>{new e({ckeditor:t})}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Mention",["require","exports","../../Ajax/Backend","../../Dom/Util","./Event"],(function(e,t,n,o,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,i.listenToCkeditor)(e).setupConfiguration((({configuration:e,features:t})=>{t.mention&&(e.mention={feeds:[{feed:e=>async function(e){if(e.length>24)return[];const t=new URL(window.WSC_API_URL+"index.php?editor-get-mention-suggestions/");return t.searchParams.set("query",e),(await(0,n.prepareRequest)(t.toString()).get().allowCaching().disableLoadingIndicator().fetchAsJson()).map((e=>"user"===e.type?{id:`@${e.username}`,text:`@${e.username}`,icon:e.avatarTag,objectId:e.userID,type:e.type}:{id:`@${e.name}`,text:`@${e.name}`,icon:'',objectId:e.groupID,type:e.type}))}(e),itemRenderer:e=>(0,o.createFragmentFromHtml)(`\n ${e.icon} ${e.text}\n `).firstElementChild,marker:"@",minimumCharacters:3}]})}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Quote",["require","exports","../../StringUtil","./Event"],(function(e,t,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,o.listenToCkeditor)(e).ready((({ckeditor:t})=>{(0,o.listenToCkeditor)(e).insertQuote((e=>{!function(e,t){let{author:o,content:i,link:r}=t;var a;t.isText&&(a=i,i=(a=(a=(0,n.escapeHTML)(a)).replaceAll("\n\n\n\n\n",'


    ')).split("\n\n").map((e=>`

    ${e=e.replaceAll("\n","
    ")}

    `)).join("")),o=(0,n.escapeHTML)(o),r=(0,n.escapeHTML)(r),e.insertHtml(`${i}\n


    `)}(t,e)}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Autosave",["require","exports","../../Core","../../Language","../../StringUtil","./Event"],(function(e,t,n,o,i,r){"use strict";function a(e){return`${(0,n.getStoragePrefix)()}ckeditor5-${e}`}function s(e){try{window.localStorage.removeItem(a(e))}catch{}}Object.defineProperty(t,"__esModule",{value:!0}),t.initializeAutosave=t.setupRestoreDraft=t.deleteDraft=void 0,t.deleteDraft=s,t.setupRestoreDraft=function(e,t){let n;try{const e=window.localStorage.getItem(a(t));null!==e&&(n=JSON.parse(e))}catch{return void s(t)}if(void 0===n)return;const l=parseInt(e.sourceElement.dataset.autosaveLastEditTime)||0;if(l&&1e3*l>=n.timestamp)return;const c=e.data.get();if(c===n.html)return;e.data.set(n.html);const d=document.createElement("div");d.classList.add("ckeditor5__restoreDraft");const u=function(){const e=document.createElement("div");return e.classList.add("ckeditor5__restoreDraft__dialog"),e.setAttribute("role","alertdialog"),e.tabIndex=0,e.innerHTML=`\n
    \n ${(0,i.escapeHTML)((0,o.getPhrase)("wcf.editor.restoreDraft"))}\n
    \n
    \n \n \n \n
    \n `,e}(),p=document.createElement("div");p.classList.add("ckeditor5_restoreDraft__wrapper"),p.append(u),e.ui.element.insertAdjacentElement("beforebegin",d),d.append(e.ui.element,p);const h=(e,t,n)=>{n&&u.focus()};e.ui.focusTracker.on("change:isFocused",h);const m=()=>{e.ui.focusTracker.off("change:isFocused",h),d.insertAdjacentElement("beforebegin",e.ui.element),d.remove()};u.querySelector('button[data-type="submit"]').addEventListener("click",(()=>{m()})),u.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{e.data.set(c),s(t),""===c&&(0,r.dispatchToCkeditor)(e.sourceElement).discardRecoveredData(),m()}));const f=Symbol("autosave");u.querySelector('button[data-type="preview"]').addEventListener("click",(()=>{e.enableReadOnlyMode(f);const t=function(){const e=document.createElement("div");return e.classList.add("ck","ck-toolbar__items"),e.innerHTML=`\n \n `,e}(),n=e.ui.view.toolbar.element,r=Array.from(n.children);r.forEach((e=>e.hidden=!0)),n.append(t),p.hidden=!0;const a=t.querySelector("button");a.addEventListener("click",(()=>{e.disableReadOnlyMode(f),p.hidden=!1,t.remove(),r.forEach((e=>e.hidden=!1))})),a.focus()}))},t.initializeAutosave=function(e,t,n){!function(){const e=Date.now()-604800;Object.keys(localStorage).filter((e=>e.startsWith("ckeditor5-"))).forEach((t=>{let n,o;try{n=window.localStorage.getItem(t)}catch{return}if(null!==n){try{o=JSON.parse(n)}catch{}if(void 0===o||o.timestamp(function(e,t,n){if(""===n)return void s(t);const o={html:n,timestamp:Date.now()};try{window.localStorage.setItem(a(t),JSON.stringify(o)),(0,r.dispatchToCkeditor)(e).autosave(o)}catch(e){console.warn("Unable to write to the local storage.",e)}}(e,n,t.data.get()),Promise.resolve()),waitingTime:15e3},(0,r.listenToCkeditor)(e).reset((()=>s(n))),e instanceof HTMLTextAreaElement&&e.form&&e.form.addEventListener("submit",(()=>s(n)))}})),define("WoltLabSuite/Core/Component/Ckeditor/Configuration",["require","exports","../../Language"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConfigurationFor=void 0;class o{#S;#C="|";#L=[];#k=[];#x={};constructor(e){this.#S=e}#T(){this.#S.undo?this.#k.push("undo","redo"):this.#L.push("Undo")}#M(){this.#k.push("bold","italic")}#D(){const e=[];this.#S.heading?e.push("heading"):this.#L.push("Heading"),this.#S.underline?e.push("underline"):this.#L.push("Underline"),this.#S.strikethrough?e.push("strikethrough"):this.#L.push("Strikethrough"),e.push(this.#C),this.#S.mark?e.push("highlight"):this.#L.push("Highlight"),this.#S.fontColor?e.push("fontColor"):this.#L.push("FontColor"),this.#S.fontFamily?e.push("fontFamily"):this.#L.push("FontFamily"),this.#S.fontSize?e.push("fontSize"):this.#L.push("FontSize"),e.push(this.#C),this.#S.subscript?e.push("subscript"):this.#L.push("Subscript"),this.#S.superscript?e.push("superscript"):this.#L.push("Superscript"),0!==e.length&&e.push(this.#C,"removeFormat"),e.length>0&&(this.#k.push({label:"woltlabToolbarGroup_format",items:e}),this.#x.format={icon:"ellipsis;false",label:(0,n.getPhrase)("wcf.editor.button.group.format")})}#I(){this.#S.list?(this.#k.push({label:"woltlabToolbarGroup_list",items:["bulletedList","numberedList","outdent","indent"]}),this.#x.list={icon:"list;false",label:(0,n.getPhrase)("wcf.editor.button.group.list")}):this.#L.push("List")}#A(){this.#S.alignment?this.#k.push("alignment"):this.#L.push("Alignment")}#P(){this.#S.link?this.#k.push("link"):this.#L.push("Link","LinkImage")}#j(){this.#S.image?(this.#k.push("insertImage"),this.#S.attachment||this.#L.push("ImageUpload","ImageUploadUI","WoltlabAttachment")):this.#S.link&&this.#L.push("LinkImage")}#O(){this.#S.codeBlock?this.#k.push("codeBlock"):this.#L.push("CodeBlock","WoltlabCodeBlock"),this.#S.code?this.#k.push("code"):this.#L.push("Code","WoltlabCode")}#q(){this.#S.table?this.#k.push("insertTable"):this.#L.push("Table","TableToolbar"),this.#S.quoteBlock?this.#k.push("blockQuote"):this.#L.push("BlockQuote","WoltlabBlockQuote"),this.#S.spoiler?this.#k.push("spoiler"):this.#L.push("WoltlabSpoiler"),this.#S.html?this.#k.push("htmlEmbed"):this.#L.push("HtmlEmbed","WoltlabHtmlEmbed")}#N(){this.#k.push(this.#C)}#B(){this.#S.media||this.#L.push("WoltlabMedia")}#U(){this.#S.mention||this.#L.push("Mention","WoltlabMention")}#F(){let e=!1;return this.#k.filter((t=>"string"==typeof t&&t===this.#C?!!e&&(e=!1,!0):(e=!0,!0)))}build(){if(this.#L.length>0||this.#k.length>0)throw new Error("Cannot build the configuration twice.");this.#T(),this.#N(),this.#N(),this.#M(),this.#P(),this.#D(),this.#N(),this.#I(),this.#A(),this.#N(),this.#j(),this.#O(),this.#q(),this.#N(),this.#B(),this.#U()}toConfig(){const e=Object.keys(window.CKEDITOR_TRANSLATIONS).find((e=>"en"!==e)),t=e||"en",{dictionary:o}=window.CKEDITOR_TRANSLATIONS[t];return o.Author=(0,n.getPhrase)("wcf.ckeditor.quote.author"),o.Filename=(0,n.getPhrase)("wcf.ckeditor.code.fileName"),o["Line number"]=(0,n.getPhrase)("wcf.ckeditor.code.lineNumber"),o.Quote=(0,n.getPhrase)("wcf.ckeditor.quote"),o["Quote from %0"]=(0,n.getPhrase)("wcf.ckeditor.quoteFrom"),o.Spoiler=(0,n.getPhrase)("wcf.editor.button.spoiler"),{alignment:{options:[{name:"left",className:"text-left"},{name:"center",className:"text-center"},{name:"right",className:"text-right"},{name:"justify",className:"text-justify"}]},highlight:{options:[{model:"markerWarning",class:"marker-warning",title:(0,n.getPhrase)("wcf.ckeditor.marker.warning"),color:"var(--marker-warning)",type:"marker"},{model:"markerError",class:"marker-error",title:(0,n.getPhrase)("wcf.ckeditor.marker.error"),color:"var(--marker-error)",type:"marker"},{model:"markerInfo",class:"marker-info",title:(0,n.getPhrase)("wcf.ckeditor.marker.info"),color:"var(--marker-info)",type:"marker"},{model:"markerSuccess",class:"marker-success",title:(0,n.getPhrase)("wcf.ckeditor.marker.success"),color:"var(--marker-success)",type:"marker"}]},language:e,link:{defaultProtocol:"https://"},removePlugins:this.#L,fontFamily:{options:["default","Arial, Helvetica, sans-serif","Comic Sans MS, Marker Felt, cursive","Consolas, Courier New, Courier, monospace","Georgia, serif","Lucida Sans Unicode, Lucida Grande, sans-serif","Tahoma, Geneva, sans-serif","Times New Roman, Times, serif",'Trebuchet MS", Helvetica, sans-serif',"Verdana, Geneva, sans-serif"]},fontSize:{options:[12,"default",18,23,28]},toolbar:this.#F(),ui:{poweredBy:{label:null},viewportOffset:{top:50}},woltlabToolbarGroup:this.#x,extraPlugins:[]}}}t.createConfigurationFor=function(e){const t=new o(e);return t.build(),t.toConfig()}})),define("WoltLabSuite/Core/Component/Ckeditor/SubmitOnEnter",["require","exports","./Event"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e,t){e.editing.view.document.on("enter",((e,o)=>{if(o.isSoft)return;o.preventDefault(),e.stop();const i=t.getHtml();""!==i&&(0,n.dispatchToCkeditor)(t.sourceElement).submitOnEnter({ckeditor:t,html:i})}),{priority:"high"})}})),define("WoltLabSuite/Core/Component/Ckeditor/Normalizer",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,o){"use strict";function i(e,t){const n=e.closest("p");if(null===n)return;const o=document.createElement("figure");o.classList.add("image",t),o.append(e),n.insertAdjacentElement("beforebegin",o),""===n.innerHTML&&n.remove()}function r(e){const t=document.createElement("div");t.innerHTML=e,function(e){e.querySelectorAll("br").forEach((e=>{!function(e){for(;;){if(e.previousSibling||e.nextSibling)return;const t=e.parentElement;switch(t.tagName){case"B":case"DEL":case"EM":case"I":case"STRONG":case"SUB":case"SUP":case"SPAN":case"U":t.insertAdjacentElement("afterend",e),t.remove();break;default:return}}}(e),function(e){if("true"===e.dataset.ckeFiller)return;const t=e.closest("p, td");null!==t&&o.default.isAtNodeEnd(e,t)&&("TD"===t.tagName||t.childNodes.length>1)&&e.remove()}(e)}))}(t);const n=function(e){const t=[];return e.querySelectorAll("p").forEach((e=>{if(e.normalize(),1===e.childNodes.length){const n=e.childNodes[0];n instanceof HTMLBRElement&&"true"!==n.dataset.ckeFiller&&t.push(e)}})),t}(t);return function(e){if(0!==e.length)for(let t=0,n=e.length;t{e.remove()})),t+=i}}}(n),function(e){e.querySelectorAll("img").forEach((e=>{e.classList.contains("messageFloatObjectRight")?i(e,"image-style-side"):e.classList.contains("messageFloatObjectLeft")&&i(e,"image-style-side-left")}))}(t),t.innerHTML}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLegacyMessage=t.normalizeLegacyHtml=void 0,o=n.__importDefault(o),t.normalizeLegacyHtml=r,t.normalizeLegacyMessage=function(e){if(!(e instanceof HTMLTextAreaElement))throw new TypeError("Expected the element to be a