From 9deb213f52bb2c0e8e7542947a68517308d174c8 Mon Sep 17 00:00:00 2001 From: WoltLab Date: Fri, 30 Aug 2024 11:38:05 +0000 Subject: [PATCH] Updating minified JavaScript files --- wcfsetup/install/files/js/WoltLabSuite.Core.min.js | 4 ++-- wcfsetup/install/files/js/WoltLabSuite.Core.tiny.min.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite.Core.min.js b/wcfsetup/install/files/js/WoltLabSuite.Core.min.js index 5795b95482..a3e22d6c39 100644 --- a/wcfsetup/install/files/js/WoltLabSuite.Core.min.js +++ b/wcfsetup/install/files/js/WoltLabSuite.Core.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 i;for(i in e)if(hasProp(e,i)&&t(e[i],i))break}function mixin(e,t,i,n){return t&&eachProp(t,(function(t,o){!i&&hasProp(e,o)||(!n||"object"!=typeof t||!t||Array.isArray(t)||"function"==typeof t||t instanceof RegExp?e[o]=t:(e[o]||(e[o]={}),mixin(e[o],t,i,n)))})),e}function getGlobal(e){if(!e)return e;var t=global;return e.split(".").forEach((function(e){t=t[e]})),t}function newContext(e){function t(e,t,i){var n,o,r,a,s,l,c,d,u,p,m=t&&t.split("/"),h=x.map,f=h&&h["*"];if(e&&(l=(e=e.split("/")).length-1,x.nodeIdCompat&&jsSuffixRegExp.test(e[l])&&(e[l]=e[l].replace(jsSuffixRegExp,"")),"."===e[0].charAt(0)&&m&&(e=m.slice(0,m.length-1).concat(e)),function(e){var t,i,n=e.length;for(t=0;t0&&(e.splice(t-1,2),t-=2)}}(e),e=e.join("/")),i&&h&&(m||f)){e:for(r=(o=e.split("/")).length;r>0;r-=1){if(s=o.slice(0,r).join("/"),m)for(a=m.length;a>0;a-=1)if((n=getOwn(h,m.slice(0,a).join("/")))&&(n=getOwn(n,s))){c=n,d=r;break e}!u&&f&&getOwn(f,s)&&(u=getOwn(f,s),p=r)}!c&&u&&(c=u,d=p),c&&(o.splice(0,d,c),e=o.join("/"))}return getOwn(x.pkgs,e)||e}function i(e){var t,i,n,o;for(t=0;t0;a-=1)if(l=getOwn(n,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)||i?"":".js")).charAt(0)||s.match(/^[\w\+\.\-]+:/)?"":x.baseUrl)+s}return x.urlArgs&&!/^blob\:/.test(s)?s+x.urlArgs(e,s):s},o.toUrl=function(i){var n,r=i.lastIndexOf("."),a=i.split("/")[0];return-1!==r&&(!("."===a||".."===a)||r>1)&&(n=i.substring(r,i.length),i=i.substring(0,r)),o.nameToUrl(t(i,e),n,!0)},o.defined=function(t){return _(t,e,!0).id in L},o.specified=function(t){return(t=_(t,e,!0).id)in L||t in T},o}function o(e,t,i){e&&(L[e]=i,requirejs.onResourceLoad&&requirejs.onResourceLoad(C,t.map,t.deps)),t.finished=!0,t.resolve(i)}function r(e,t){e.finished=!0,e.rejected=!0,e.reject(t)}function a(e){e.factoryCalled=!0;var t,i=e.map.id;try{t=C.execCb(i,e.factory,e.values,L[i])}catch(t){return r(e,t)}i?t===undef&&(e.cjsModule?t=e.cjsModule.exports:e.usingExports&&(t=L[i])):M.splice(M.indexOf(e),1),o(i,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 i={};return i.promise=new Promise((function(t,n){i.resolve=t,i.reject=function(t){e||M.splice(M.indexOf(i),1),n(t)}})),i.map=e?t||_(e):{},i.depCount=0,i.depMax=0,i.values=[],i.depDefined=[],i.depFinished=s,i.map.pr&&(i.deps=[_(i.map.pr)]),i}function c(e,t){var i;return e?(i=e in T&&T[e])||(i=T[e]=l(e,t)):(i=l(),M.push(i)),i}function d(e,t){return function(i){e.rejected||(i.dynaId||(i.dynaId="id"+(q+=1),i.requireModules=[t]),r(e,i))}}function u(e,t,i,n){i.depMax+=1,w(e,t).then((function(e){i.depFinished(e,n)}),d(i,e.id)).catch(d(i,i.map.id))}function p(e,t,a){e.load(t.n,n(a),function(e){function t(t){n||o(e,c(e),t)}var n;return t.error=function(t){r(c(e),t)},t.fromText=function(t,o){var a,s=c(e),l=_(_(e).n),d=l.id;n=!0,s.factory=function(e,t){return t},o&&(t=o),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)}i(d),s.deps=[l],u(l,null,s,s.deps.length)},t}(t.id),x)}function m(e){var t,i=e?e.indexOf("!"):-1;return i>-1&&(t=e.substring(0,i),e=e.substring(i+1,e.length)),[t,e]}function h(e,t,i){var n=e.map.id;t[n]=!0,!e.finished&&e.deps&&e.deps.forEach((function(n){var o=n.id,r=!hasProp(y,o)&&c(o,n);!r||r.finished||i[o]||(hasProp(t,o)?e.deps.forEach((function(t,i){t.id===o&&e.depFinished(L[o],i)})):h(r,t,i))})),i[n]=!0}function f(e){var t,i,n,o=[],a=1e3*x.waitSeconds,s=a&&j+a<(new Date).getTime();if(0===P&&(e?e.finished||h(e,{},{}):M.length&&M.forEach((function(e){h(e,{},{})}))),s){for(i in T)(n=T[i]).finished||o.push(n.map.id);(t=new Error("Timeout for modules: "+o)).requireModules=o,t.requireType="timeout",o.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&&O[e.dynaId]||(O[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:{}},I=obj(),M=[],T=obj(),D=obj(),A=obj(),P=0,j=(new Date).getTime(),q=0,O=obj(),B=obj(),N=obj(),F=Promise.resolve();return S="function"==typeof importScripts?function(e){var t=e.url;B[t]||(B[t]=!0,c(e.id),importScripts(t),i(e.id))}:function(e){var t,n=e.id,o=e.url;B[o]||(B[o]=!0,(t=document.createElement("script")).setAttribute("data-requiremodule",n),t.type=x.scriptType||"text/javascript",t.charset="utf-8",t.async=!0,P+=1,t.addEventListener("load",(function(){P-=1,i(n)}),!1),t.addEventListener("error",(function(){var e,i,o;P-=1,(i=getOwn(x.paths,n))&&Array.isArray(i)&&i.length>1?(t.parentNode.removeChild(t),i.shift(),(o=c(n)).map=_(n),o.map.url=b.nameToUrl(n),S(o.map)):((e=new Error("Load failed: "+n+": "+t.src)).requireModules=[n],e.requireType="scripterror",r(c(n),e))}),!1),t.src=o,x.onNodeCreated&&x.onNodeCreated(t,x,n,o),10===document.documentMode?asap.then((function(){document.head.appendChild(t)})):document.head.appendChild(t))},w=function(e,t){var i,n,o=e.id,r=x.shim[o];if(o in k)i=k[o],delete k[o],v.apply(undef,i);else if(!(o in T))if(e.pr){if(!(n=getOwn(N,o)))return w(_(e.pr)).then((function(i){var n=e.prn?e:_(o,t,!0),r=n.id,a=getOwn(x.shim,r);return r in A||(A[r]=!0,a&&a.deps?b(a.deps,(function(){p(i,n,t)})):p(i,n,t)),c(r).promise}));e.url=b.nameToUrl(n),S(e)}else r&&r.deps?b(r.deps,(function(){S(e)})):S(e);return c(o).promise},_=function(e,i,n){if("string"!=typeof e)return e;var o,r,a,s,l,c,d=e+" & "+(i||"")+" & "+!!n;return s=(a=m(e))[0],e=a[1],!s&&d in I?I[d]:(s&&(o=(s=t(s,i,n))in L&&L[s]),s?o&&o.normalize?(e=o.normalize(e,function(e){return function(i){return t(i,e,!0)}}(i)),c=!0):e=-1===e.indexOf("!")?t(e,i,n):e:(s=(a=m(e=t(e,i,n)))[0],e=a[1],r=b.nameToUrl(e)),l={id:s?s+"!"+e:e,n:e,pr:s,url:r,prn:s&&c},s||(I[d]=l),l)},y={require:function(e){return n(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:y.exports(e),config:function(){return getOwn(x.config,e)||{}}}}},v=function(e,t,i,n,r){if(e){if(e in D)return;D[e]=!0}var s=c(e);return t&&!Array.isArray(t)&&(i=t,t=[]),t=t?slice.call(t,0):null,n||(hasProp(x,"defaultErrback")?x.defaultErrback&&(n=x.defaultErrback):n=g),n&&s.promise.catch(n),r=r||e,"function"==typeof i?(!t.length&&i.length&&(i.toString().replace(commentRegExp,commentReplace).replace(cjsRequireRegExp,(function(e,i){t.push(i)})),t=(1===i.length?["require"]:["require","exports","module"]).concat(t)),s.factory=i,s.deps=t,s.depending=!0,t.forEach((function(i,n){var o;t[n]=o=_(i,r,!0),"require"===(i=o.id)?s.values[n]=y.require(e):"exports"===i?(s.values[n]=y.exports(e),s.usingExports=!0):"module"===i?s.values[n]=s.cjsModule=y.module(e,s.map.url):void 0===i?s.values[n]=void 0:u(o,r,s,n)})),s.depending=!1,s.depCount===s.depMax&&a(s)):e&&o(e,s,i),j=(new Date).getTime(),e||f(s),s.promise},(b=n(null,!0)).config=function(t){var i,n,o,r;return t.context&&t.context!==e?(i=getOwn(contexts,t.context))?i.req.config(t):newContext(t.context).config(t):(I=obj(),t.baseUrl&&"/"!==t.baseUrl.charAt(t.baseUrl.length-1)&&(t.baseUrl+="/"),"string"==typeof t.urlArgs&&(n=t.urlArgs,t.urlArgs=function(e,t){return(-1===t.indexOf("?")?"?":"&")+n}),o=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&&(N[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)),o[t]=e})),x.shim=o),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:T,req:b,execCb:function(e,t,i,n){return t.apply(n,i)}},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","diff-match-patch":"3rdParty/diff-match-patch/diff_match_patch.min"},packages:[{name:"codemirror",location:"3rdParty/codemirror",main:"lib/codemirror"},{name:"@woltlab/visual-dom-diff",location:"3rdParty/visual-dom-diff",main:"index"}],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 i;e.elAttr=function(e,t,i){if(void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elAttrBool=function(e,t){var i=elAttr(e,t);return"1"===i||"true"===i},e.elByClass=function(e,i){return(i||t).getElementsByClassName(e)},e.elById=function(e){return t.getElementById(e)},e.elBySel=function(e,i){return(i||t).querySelector(e)},e.elBySelAll=function(e,i,n){var o=(i||t).querySelectorAll(e);return"function"==typeof n&&Array.prototype.forEach.call(o,n),o},e.elByTag=function(e,i){return(i||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,i){if(t="data-"+t,void 0===i)return e.getAttribute(t)||"";e.setAttribute(t,i)},e.elDataBool=function(e,t){var i=elData(e,t);return"1"===i||"true"===i},e.elHide=function(e){e.style.setProperty("display","none","")},e.elIsHidden=function(e){return"none"===e.style.getPropertyValue("display")},e.elInnerError=function(e,t,i){var n,o,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 o=e,(n=a).classList.contains("inputAddon")&&(n=a.parentElement,o=a),null!==(r=o.nextElementSibling)&&"SMALL"===r.nodeName&&r.classList.contains("innerError")||(""===t?r=null:((r=elCreate("small")).className="innerError",n.insertBefore(r,o.nextSibling))),""===t?null!==r&&(a.removeChild(r),r=null):r[i?"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 i=0,n=e.length;ie.trim())).find((e=>e.startsWith("XSRF-TOKEN=")));if(void 0===e)return"COOKIE_NOT_FOUND";const[i,n]=e.split(/=/,2);return decodeURIComponent(n.trim())}})}(window,document),define("wcf.globalHelper",(function(){})),function(e){function t(e,t){return e!==i&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(i,n){return e[i]=t?t(i,n):n}}var i="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};"function"==typeof define&&define.amd?define("tslib",["exports"],(function(n){e(t(i,t(n)))})):"object"==typeof module&&"object"==typeof module.exports?e(t(i,t(module.exports))):e(t(i))}((function(e){var t,i,n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])};__extends=function(e,t){function i(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)},__assign=Object.assign||function(e){var t,i,n,o;for(i=1,n=arguments.length;i=0;r--)(o=e[r])&&(s=(a<3?o(s):a>3?o(t,i,s):o(t,i))||s);return a>3&&s&&Object.defineProperty(t,i,s),s},__param=function(e,t){return function(i,n){t(i,n,e)}},__esDecorate=function(e,t,i,n,o,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=n.kind,m="getter"===p?"get":"setter"===p?"set":"value",h=!t&&e?n.static?e:e.prototype:null,f=t||(h?Object.getOwnPropertyDescriptor(h,n.name):{}),g=!1;for(l=i.length-1;l>=0;l--){for(d in c={},n)c[d]="access"===d?{}:n[d];for(d in n.access)c.access[d]=n.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,i[l])("accessor"===p?{get:f.get,set:f.set}:f[m],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))&&o.unshift(s)}else(s=a(u))&&("field"===p?o.unshift(s):f[m]=s)}h&&Object.defineProperty(h,n.name,f),g=!0},__runInitializers=function(e,t,i){var n,o=arguments.length>2;for(n=0;n0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},__read=function(e,t){var i,n,o,r,a="function"==typeof Symbol&&e[Symbol.iterator];if(!a)return e;i=a.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)o.push(n.value)}catch(e){r={error:e}}finally{try{n&&!n.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}return o},__spread=function(){for(var e=[],t=0;t1||o(e,t)}))})}function o(e,t){try{(i=c[e](t)).value instanceof __await?Promise.resolve(i.value.v).then(r,a):s(d[0][2],i)}catch(e){s(d[0][3],e)}var i}function r(e){o("next",e)}function a(e){o("throw",e)}function s(e,t){e(t),d.shift(),d.length&&o(d[0][0],d[0][1])}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var l,c=i.apply(e,t||[]),d=[];return l={},n("next"),n("throw"),n("return"),l[Symbol.asyncIterator]=function(){return this},l},__asyncDelegator=function(e){function t(t,o){i[t]=e[t]?function(i){return(n=!n)?{value:__await(e[t](i)),done:!1}:o?o(i):i}:o}var i,n;return i={},t("next"),t("throw",(function(e){throw e})),t("return"),i[Symbol.iterator]=function(){return this},i},__asyncValues=function(e){function t(t){i[t]=e[t]&&function(i){return new Promise((function(n,o){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,o,(i=e[t](i)).done,i.value)}))}}if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),i={},t("next"),t("throw"),t("return"),i[Symbol.asyncIterator]=function(){return this},i)},__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 i,n;if(e&&e.__esModule)return e;if(i={},null!=e)for(n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&__createBinding(i,e,n);return t(i,e),i},__importDefault=function(e){return e&&e.__esModule?e:{default:e}},__classPrivateFieldGet=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)},__classPrivateFieldSet=function(e,t,i,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,i):o?o.value=i:t.set(e,i),i},__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,i){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n;if(i){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:i})}else i&&e.stack.push({async:!0});return t},i="function"==typeof SuppressedError?SuppressedError:function(e,t,i){var n=new Error(i);return n.name="SuppressedError",n.error=e,n.suppressed=t,n},__disposeResources=function(e){function t(t){e.error=e.hasError?new i(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function i(){for(var n,o;e.stack.length;){n=e.stack.pop();try{if(o=n.dispose&&n.dispose.call(n.value),n.async)return Promise.resolve(o).then(i,(function(e){return t(e),i()}))}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 i(){return void 0===o&&(o=new n),o}Object.defineProperty(t,"__esModule",{value:!0}),t.hide=t.show=void 0;class n{_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 o;t.show=function(){i().show()},t.hide=function(){i().hide()}})),define("WoltLabSuite/Core/Core",["require","exports"],(function(e,t){"use strict";function i(e){return r(e)}function n(e,...t){const r=i(e=e||{});for(let i=0,a=t.length;i{Array.isArray(a[t])||"object"!=typeof a[t]?r[t]=a[t]:o(a[t])?r[t]=n(e[t],a[t]):r[t]=a[t]}))}return r}function o(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)||o(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((i=>t[i]=r(e[i]))),t},s="wsc"+window.WCF_PATH.hashCode()+"-";t.clone=i,t.convertLegacyUrl=function(e){return e.replace(/^index\.php\/(.*?)\/\?/,((e,t)=>{const i=t.split(/([A-Z][a-z0-9]+)/);t="";for(let e=0,n=i.length;e{const t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},t.serialize=function e(t,i){if(null===t)return"";const n=[];return Object.keys(t).forEach((o=>{const r=i?i+"["+o+"]":o,a=t[o];"object"==typeof a?n.push(e(a,r)):n.push(encodeURIComponent(r)+"="+encodeURIComponent(a))})),n.join("&")},t.triggerEvent=function(e,t){if("click"===t&&e instanceof HTMLElement)return void e.click();const i=new Event(t,{bubbles:!0,cancelable:!0});e.dispatchEvent(i)},t.getStoragePrefix=function(){return s},t.stringToBool=function(e){return"1"===e||"true"===e},t.debounce=function(e,t=50,i={isImmediate:!1}){let n;return function(...o){const r=i.isImmediate&&void 0===n;void 0!==n&&clearTimeout(n),n=setTimeout((()=>{n=void 0,i.isImmediate||e.apply(this,o)}),t),r&&e.apply(this,o)}},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,i]=e.split(/=/,2);return decodeURIComponent(i.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,i)=>{e.forEach(t)})):this._callbacks.get(e)?.forEach(t)}}})),define("WoltLabSuite/Core/Dom/Change/Listener",["require","exports","tslib","../../CallbackList"],(function(e,t,i,n){"use strict";const o=new((n=i.__importDefault(n)).default);let r=!1;return{add:o.add.bind(o),remove:o.remove.bind(o),trigger(){if(!r)try{r=!0,o.forEach(null,(e=>e()))}finally{r=!1}}}})),define("WoltLabSuite/Core/Language",["require","exports"],(function(e,t){"use strict";function i(e,t={}){return window.WoltLabLanguage.getPhrase(e,t)}function n(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=i,t.registerPhrase=n,t.get=function(e,t={}){return i(e,t)},t.add=function(e,t){n(e,t)},t.addObject=function(e){Object.entries(e).forEach((([e,t])=>{n(e,t)}))}})),define("WoltLabSuite/Core/Component/Dialog/Controls",["require","exports","tslib","../../Language"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogControls=void 0,n=i.__importStar(n);class o{#e;constructor(e){this.#e=e}asAlert(e){const t={cancel:void 0,extra:void 0,isAlert:!0,primary:e?.primary||n.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||n.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||n.get("wcf.dialog.button.primary.submit")};return this.#e.attachControls(t),this.#e}withoutControls(){return this.#e}}t.DialogControls=o,t.default=o})),define("WoltLabSuite/Core/StringUtil",["require","exports"],(function(e,t){"use strict";function i(e,t){const i=t?-t:2;return e.toLocaleString(document.documentElement.lang,{maximumFractionDigits:i}).replace("-","−")}function n(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=i,t.lcfirst=function(e){return String(e).substring(0,1).toLowerCase()+e.substring(1)},t.ucfirst=n,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"),i(e,-1)+t},t.toCamelCase=function(e){return e.includes("-")?e.split("-").map(((e,t)=>(t>0&&(e=n(e)),e))).join(""):e}})),define("WoltLabSuite/Core/Dom/Util",["require","exports","tslib","../StringUtil"],(function(e,t,i,n){"use strict";function o(e,t,i){if(!t.contains(e))throw new Error("Ancestor element does not contain target element.");let n,o=e;const r=i+"Sibling";for(;null!==o&&o!==t;){if(null!==o[i+"ElementSibling"])return!1;if(o[r])for(n=o[r];n;){if(""!==n.textContent.trim())return!1;n=n[r]}o=o.parentNode}return!0}n=i.__importStar(n);let r=0;const a={createFragmentFromHtml(e){const t=document.createElement("div");a.setInnerHtml(t,e);const i=document.createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return i},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 i=e.offsetHeight;return i+=~~t.marginTop+~~t.marginBottom,i},outerWidth(e,t){t=t||window.getComputedStyle(e);let i=e.offsetWidth;return i+=~~t.marginLeft+~~t.marginRight,i},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 i=!1;Object.keys(t).forEach((n=>{/ !important$/.test(t[n])?(i=!0,t[n]=t[n].replace(/ !important$/,"")):i=!1,"important"!==e.style.getPropertyPriority(n)||i||e.style.removeProperty(n),e.style.setProperty(n,t[n],i?"important":"")}))},styleAsInt(e,t){const i=e.getPropertyValue(t);return null===i?0:parseInt(i,10)},setInnerHtml(e,t){let i;e.innerHTML=t,i=e instanceof HTMLTemplateElement?e.content:e;const n=i.querySelectorAll("script");for(let e=0,t=n.length;ee.contains(t),getDataAttributes(e,t,i,o){0!==(t=t||"").indexOf("data-")&&(t="data-"+t),i=!0===i,o=!0===o;const r={};for(let a=0,s=e.attributes.length;ao(e,t,"previous"),isAtNodeEnd:(e,t)=>o(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,i){const n=e.parentNode;if(null===n)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 o=n,r=e;o.classList.contains("inputAddon")&&(o=n.parentElement,r=n);let a=r.nextElementSibling;return null!==a&&"SMALL"===a.nodeName&&a.classList.contains("innerError")||(""===t?a=null:(a=document.createElement("small"),a.className="innerError",o.insertBefore(a,r.nextSibling))),""===t?null!==a&&(a.remove(),a=null):i?a.innerHTML=t:a.textContent=t,a},innerSuccess(e,t,i){const n=e.parentNode;if(null===n)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 o=e.nextElementSibling;return null!==o&&"SMALL"===o.nodeName&&o.classList.contains("innerSuccess")||(""===t?o=null:(o=document.createElement("small"),o.className="innerSuccess",n.insertBefore(o,e.nextSibling))),""===t?null!==o&&(o.remove(),o=null):i?o.innerHTML=t:o.textContent=t,o},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,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerGlobalRejectionHandler=t.InvalidJson=t.ExpectedJson=t.StatusNotOk=t.ConnectionError=t.ApiError=void 0,o=i.__importStar(o),r=i.__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="",i="";if(e instanceof l)i=e.originalError instanceof TypeError?r.get("wcf.global.error.ajax.network",{message:e.message}):e.message;else if(e instanceof u)i=await e.response.clone().text();else if(e instanceof d||e instanceof c){let n;try{n=await e.response.clone().json()}catch(t){i=await e.response.clone().text()}if(n&&o.isPlainObject(n)&&Object.keys(n).length>0)n.returnValues&&n.returnValues.description&&(t+=`

Description:

${n.returnValues.description}

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

File:

${n.file} in line ${n.line}

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

Stacktrace:

${n.stacktrace}

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

Exception ID: ${n.exceptionID}

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

${e.message}

`,t+=`

Stacktrace

${e.stacktrace}

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

${i}

${t}
`}(e);if(t instanceof HTMLIFrameElement){const e=(0,n.dialogFactory)().fromHtml(`
${t.outerHTML}
`).asAlert();e.show(r.get("wcf.global.error.title")),e.querySelector("dialog").classList.add("dialog--iframe")}else""!==t&&(0,n.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,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareRequest=void 0,n=i.__importStar(n);class a{url;constructor(e){this.url=e}delete(){return new l(this.url,0)}get(){return new c(this.url,1)}post(e){return new l(this.url,2,e)}}let s=!1;window.addEventListener("beforeunload",(()=>s=!0));class l{#t=new Map;#i;#n;#o;#r;#a=!0;#s=!1;constructor(e,t,i){this.#i=e,this.#n=t,this.#o=i}getAbortController(){return void 0===this.#r&&(this.#r=new AbortController),this.#r}disableLoadingIndicator(){return this.#a=!1,this}withHeader(e,t){return this.#t.set(e,t),this}allowCaching(){return this.#s=!0,this}async fetchAsJson(){const e=await this.#l({headers:{accept:"application/json"}});if(void 0===e)return;const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new o.ExpectedJson(e);let i;try{i=await e.json()}catch(t){throw new o.InvalidJson(e)}return i}async fetchAsResponse(){return this.#l()}async#l(t={}){(0,o.registerGlobalRejectionHandler)(),this.#t.set("X-Requested-With","XMLHttpRequest"),this.#t.set("X-XSRF-TOKEN",(0,r.getXsrfToken)());const a=Object.fromEntries(this.#t),l=(0,r.extend)({headers:a,mode:"same-origin",credentials:"same-origin",cache:this.#s?"default":"no-store",redirect:"error"},t);2===this.#n?(l.method="POST",this.#o&&(this.#o instanceof Blob?(l.headers["Content-Type"]="application/octet-stream",l.body=this.#o):this.#o instanceof FormData?(l.headers["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8",l.body=this.#o):(l.headers["Content-Type"]="application/json; charset=UTF-8",l.body=JSON.stringify(this.#o)))):0===this.#n?l.method="DELETE":l.method="GET",this.#r&&(l.signal=this.#r.signal);const c=this.#a;c&&n.show();try{const t=await fetch(this.#i,l);if(!t.ok)throw new o.StatusNotOk(t);return"yes"===t.headers.get("woltlab-background-queue-check")&&new Promise(((t,i)=>{e(["../BackgroundQueue"],t,i)})).then(i.__importStar).then((e=>e.invoke())),t}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{c&&n.hide()}}}class c extends l{allowCaching(){return super.allowCaching(),this}}t.prepareRequest=function(e){return new a(e.toString())}})),define("WoltLabSuite/Core/Devtools",["require","exports"],(function(e,t){"use strict";function i(){window.sessionStorage&&window.sessionStorage.setItem("__wsc_devtools_config",JSON.stringify(n))}let n={editorAutosave:!0,editorInspector:!1,eventLogging:!1};const o={help(){window.console.log(""),window.console.log("%cAvailable commands:","text-decoration: underline"),Object.keys(o).filter((e=>"_internal_"!==e)).sort().forEach((e=>{window.console.log(`\tDevtools.${e}()`)})),window.console.log("")},toggleEditorAutosave(e){n.editorAutosave=!e&&!n.editorAutosave,i(),window.console.log("%c\tEditor autosave "+(n.editorAutosave?"enabled":"disabled"),"font-style: italic")},toggleEditorInspector(e){n.editorInspector=!!e||!n.editorInspector,i(),window.console.log("%c\tEditor inspector "+(n.editorInspector?"enabled":"disabled"),"font-style: italic")},toggleEventLogging(e){n.eventLogging=!!e||!n.eventLogging,i(),window.console.log("%c\tEvent logging "+(n.eventLogging?"enabled":"disabled"),"font-style: italic")},_internal_:{enable(){if(window.Devtools=o,window.console.log("%cDevtools for WoltLab Suite loaded","font-weight: bold"),window.sessionStorage){const e=window.sessionStorage.getItem("__wsc_devtools_config");try{null!==e&&(n=JSON.parse(e))}catch(e){}n.editorAutosave||o.toggleEditorAutosave(!0),n.editorInspector&&o.toggleEditorInspector(!0),n.eventLogging&&o.toggleEventLogging(!0)}window.console.log("Settings are saved per browser session, enter `Devtools.help()` to learn more."),window.console.log("")},editorAutosave:()=>n.editorAutosave,editorInspector:()=>n.editorInspector,eventLog(e,t){n.eventLogging&&window.console.log("[Devtools.EventLogging] Firing event: "+t+" @ "+e)}}};return o})),define("WoltLabSuite/Core/Event/Handler",["require","exports","tslib","../Core","../Devtools"],(function(e,t,i,n,o){"use strict";function r(e,t){"string"!=typeof t&&(t=void 0);const i=a.get(e);void 0!==i&&(void 0===t?a.delete(e):i.delete(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.removeAllBySuffix=t.removeAll=t.remove=t.fire=t.add=void 0,n=i.__importStar(n),o=i.__importDefault(o);const a=new Map;t.add=function(e,t,i){if("function"!=typeof i)throw new TypeError(`Expected a valid callback for '${t}'@'${e}'.`);let o=a.get(e);void 0===o&&(o=new Map,a.set(e,o));let r=o.get(t);void 0===r&&(r=new Map,o.set(t,r));const s=n.getUuid();return r.set(s,i),s},t.fire=function(e,t,i){o.default._internal_.eventLog(e,t),i=i||{},a.get(e)?.get(t)?.forEach((e=>e(i)))},t.remove=function(e,t,i){a.get(e)?.get(t)?.delete(i)},t.removeAll=r,t.removeAllBySuffix=function(e,t){const i=a.get(e);if(void 0===i)return;const n=-1*(t="_"+t).length;i.forEach(((i,o)=>{o.substr(n)===t&&r(e,o)}))}})),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,i,n,o){"use strict";function r(){!0!==p?(p=!0,m=!1,o.fire("com.woltlab.wcf.form.builder.dependency","checkContainers"),p=!1,m&&r()):m=!0}function a(){const e=[];d.forEach(((t,i)=>{const o=document.getElementById(i);if(null===o)return void e.push(i);let r=!0;var a;t.forEach((e=>{var t;e.checkDependency()||(t=o,n.default.hide(t),s.add(t),t.classList.contains("tabMenuContent")&&t.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===t.dataset.name&&n.default.hide(e)})),t.querySelectorAll("[max], [maxlength], [min], [required]").forEach((e=>{const t=new Map,i=e.getAttribute("max");i&&(t.set("max",i),e.removeAttribute("max"));const n=e.getAttribute("maxlength");n&&(t.set("maxlength",n),e.removeAttribute("maxlength"));const o=e.getAttribute("min");o&&(t.set("min",o),e.removeAttribute("min")),e.required&&(t.set("required","true"),e.removeAttribute("required")),u.set(e,t)})),r=!1)})),r&&(a=o,n.default.show(a),s.delete(a),a.classList.contains("tabMenuContent")&&a.parentNode.querySelector(".tabMenu").querySelectorAll("li").forEach((e=>{e.dataset.name===a.dataset.name&&n.default.show(e)})),a.querySelectorAll("input, select").forEach((e=>{let t=e.parentNode;for(;t!==a&&!n.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,n=i.__importDefault(n),o=i.__importStar(o);const s=new Set,l=new Map,c=new WeakSet,d=new Map,u=new WeakMap;let p=!1,m=!0;t.addContainerCheckCallback=function(e){if("function"!=typeof e)throw new TypeError("Expected a valid callback for parameter 'callback'.");o.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=n.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((i=>{i.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,i)=>{t.contains(document.getElementById(i))&&d.delete(i),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,i,n,o,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,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__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 i=e.getData();if(!(i instanceof Promise))throw new TypeError("Data for field with id '"+e.getId()+"' is no promise.");t.push(i)})),Promise.all(t).then((e=>e.reduce(((e,t)=>n.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 i=t.getId();if(s(e,i))throw new Error("Form field with id '"+i+"' has already been registered for form with id '"+e+"'.");c.get(e).set(i,t),o.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),o.fire("WoltLabSuite/Core/Form/Builder/Manager","registerForm",{formId:e})},t.unregisterForm=function(e){if(!l(e))throw new Error("Unknown form with id '"+e+"'.");o.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),o.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,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FormBuilderSetup=void 0,o=i.__importStar(o),r=i.__importStar(r);class a{async fromEndpoint(t){const a=await(0,n.prepareRequest)(t).get().fetchAsJson(),{dialogFactory:s}=await new Promise(((t,i)=>{e(["../Dialog"],t,i)})).then(i.__importStar),l=s().fromHtml(a.dialog).asPrompt();return new Promise((e=>{l.addEventListener("validate",(i=>{const s=r.getData(a.formId).then((async i=>{i instanceof Promise&&(i=await i);const s=await(0,n.prepareRequest)(t).post(i).fetchAsJson();return"dialog"in s?(r.unregisterForm(a.formId),o.setInnerHtml(l.content,s.dialog),!1):(l.addEventListener("primary",(()=>{r.hasForm(a.formId)&&r.unregisterForm(a.formId),e({ok:!0,result:s.result})})),!0)}));i.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,i,n,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogSetup=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__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 n.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=o.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 n.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 i=document.createElement("div");i.id="pageOverlayContainer";const n=[];t.adoptPageOverlayContainer=function(e){n.push(e),e.append(i)},t.releasePageOverlayContainer=function(e){if(!n.includes(e))throw new Error("Cannot release the page overlay from a container that (no longer) adopts it.",{cause:{element:e}});const t=n.indexOf(e);if(0===t)throw new Error("Cannot release the page overlay, there is no previous owner.",{cause:{element:e}});t!==n.length-1?n.splice(t,1):(n.pop(),n[n.length-1].append(i))},t.getPageOverlayContainer=function(){return i}})),define("WoltLabSuite/Core/Ui/Screen",["require","exports","tslib","../Core"],(function(e,t,i,n){"use strict";function o(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'.");m.has(e)&&(e=m.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&&m.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,n=i.__importStar(n);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)"})),m=new Map;t.on=function(e,t){const i=n.getUuid(),o=r(e);return"function"==typeof t.match&&o.callbacksMatch.set(i,t.match),"function"==typeof t.unmatch&&o.callbacksUnmatch.set(i,t.unmatch),"function"==typeof t.setup&&(o.mql.matches?t.setup():o.callbacksSetup.set(i,t.setup)),i},t.remove=function(e,t){const i=r(e);i.callbacksMatch.delete(t),i.callbacksUnmatch.delete(t),i.callbacksSetup.delete(t)},t.is=o,t.scrollDisable=function(){if(0===c){d=document.body.scrollTop,l="body",d||(d=document.documentElement.scrollTop,l="documentElement");const e=document.getElementById("pageContainer");o("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");o("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,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogElement=void 0,n=i.__importDefault(n),r=i.__importStar(r);const s=document.createElement("div");class l extends HTMLElement{#c;#e;#d;#u;constructor(){super(),this.#c=document.createElement("div"),this.#e=document.createElement("dialog"),this.#u=document.createElement("div")}show(e){if(0===e.trim().length)throw new Error("Cannot open the modal dialog without a title.");this.#u.textContent=e,this.open||(null===s.parentElement&&document.getElementById("content").append(s),this.parentElement!==s&&s.append(this),this.#e.showModal(),(0,o.adoptPageOverlayContainer)(this.#e),(0,a.scrollDisable)())}close(){this.#e.close(),this.#p()}#p(){if(null===this.parentNode)return;const e=new CustomEvent("afterClose");this.dispatchEvent(e),(0,o.releasePageOverlayContainer)(this.#e),(0,a.scrollEnable)(),this.remove()}get dialog(){return this.#e}get content(){return this.#c}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.#d)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.#d=document.createElement("form"),this.#d.method="dialog",this.#d.classList.add("dialog__form"),this.#c.insertAdjacentElement("beforebegin",this.#d),this.#d.append(this.#c,t),e.isAlert&&(void 0===e.cancel?this.#e.setAttribute("role","alert"):this.#e.setAttribute("role","alertdialog")),this.#d.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.#m(),this.#h()&&this.close())}))):this.#h()||(e.preventDefault(),this.#m())})),this.#e.addEventListener("close",(()=>{""===this.#e.returnValue||this.#m(),this.#p()})),t.addEventListener("cancel",(()=>{const e=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(e),!e.defaultPrevented&&this.#h()&&this.close()})),void 0!==e.extra&&t.addEventListener("extra",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)}))}#m(){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",(()=>{if(this.#h()){const e=new CustomEvent("cancel",{cancelable:!1});this.dispatchEvent(e),this.close()}})));const i=document.createElement("div");i.classList.add("dialog__header"),this.#u.classList.add("dialog__title"),i.append(this.#u),e&&i.append(e);const o=document.createElement("div");o.classList.add("dialog__document"),o.setAttribute("role","document"),o.append(i),this.#c.classList.add("dialog__content"),this.#d?o.append(this.#d):o.append(this.#c),this.#e.append(o),this.#e.classList.add("dialog"),this.#e.setAttribute("aria-labelledby",n.default.identify(this.#u)),this.#e.addEventListener("cancel",(e=>{const t=new CustomEvent("cancel",{cancelable:!0});this.dispatchEvent(t),t.defaultPrevented?e.preventDefault():this.#h()?this.#p():e.preventDefault()})),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",{cancelable:!0});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,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WoltlabCoreDialogControlElement=void 0,n=i.__importStar(n);class o extends HTMLElement{#f;#g;#b;set primary(e){this.setAttribute("primary",e)}get primary(){let e=this.getAttribute("primary");return e||(e=n.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=n.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.#b&&(this.#b=document.createElement("button"),this.#b.type="submit",this.#b.value="primary",this.#b.autofocus=!0,this.#b.classList.add("button","buttonPrimary","dialog__control__button","dialog__control__button--primary"),this.#b.textContent=this.primary,this.append(this.#b),new MutationObserver((()=>{this.#b.disabled=e.incomplete})).observe(e,{attributeFilter:["incomplete"]}),e.incomplete&&(this.#b.disabled=!0)),void 0===this.#f&&void 0!==this.cancel&&(this.#f=document.createElement("button"),this.#f.type="button",this.#f.value="cancel",this.#f.classList.add("button","dialog__control__button","dialog__control__button--cancel"),this.#f.textContent=this.cancel,this.#f.addEventListener("click",(()=>{const e=new CustomEvent("cancel");this.dispatchEvent(e)})),this.append(this.#f),e.addEventListener("backdrop",(e=>{e.preventDefault(),this.#f.click()}))),void 0===this.#g&&void 0!==this.extra&&(this.#g=document.createElement("button"),this.#g.type="button",this.#g.value="extra",this.#g.classList.add("button","dialog__control__button","dialog__control__button--extra"),this.#g.textContent=this.extra,this.#g.addEventListener("click",(()=>{const e=new CustomEvent("extra");this.dispatchEvent(e)})),this.append(this.#g))}}t.WoltlabCoreDialogControlElement=o,window.customElements.define("woltlab-core-dialog-control",o),t.default=o})),define("WoltLabSuite/Core/Component/Dialog",["require","exports","./Dialog/Setup","../Element/woltlab-core-dialog","../Element/woltlab-core-dialog-control"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dialogFactory=void 0,t.dialogFactory=function(){return new i.DialogSetup}})),define("WoltLabSuite/Core/Ajax/Request",["require","exports","tslib","./Status","../Core","../Dom/Change/Listener","../Language","../Component/Dialog","../StringUtil"],(function(e,t,i,n,o,r,a,s,l){"use strict";n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);let c=!1,d=!1;return class{_options;_data;_xhr;constructor(e){this._options=o.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=o.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||n.show(),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=o.clone(this._options),i=this._xhr;if(i.onload=()=>{i.readyState===XMLHttpRequest.DONE&&(i.status>=200&&i.status<300||304===i.status?204===i.status?this._success(i,t):t.responseType&&this.getContentType(i)!==t.responseType?this._failure(i,t):this._success(i,t):this._failure(i,t))},i.onerror=()=>{this._failure(i,t)},this._options.progress&&(i.onprogress=this._options.progress),this._options.uploadProgress&&(i.upload.onprogress=this._options.uploadProgress),"POST"===this._options.type){let e=this._options.data;"object"==typeof e&&"FormData"!==o.getType(e)&&(e=o.serialize(e)),i.send(e)}else i.send()}abortPrevious(){void 0!==this._xhr&&(this._xhr.abort(),this._xhr=void 0,this._options.silent||n.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"!==o.getType(e)&&(e=o.extend(this._data,e)),this._options.data=e}_success(t,o){if(o.silent||n.hide(),"function"==typeof o.success){let n=null;if("application/json"===this.getContentType(t)){try{n=JSON.parse(t.responseText)}catch(e){return void this._failure(t,o)}n&&n.returnValues&&void 0!==n.returnValues.template&&(n.returnValues.template=n.returnValues.template.trim()),"yes"===t.getResponseHeader("woltlab-background-queue-check")&&new Promise(((t,i)=>{e(["../BackgroundQueue"],t,i)})).then(i.__importStar).then((e=>e.invoke()))}o.success(n||{},t.responseText,t,o.data)}this._finalize(t,o)}_failure(e,t){if(d)return;t.silent||n.hide();let i=null;try{i=JSON.parse(e.responseText)}catch(e){}let o=!0;if("function"==typeof t.failure&&(o=!1!==t.failure(i||{},e.responseText||"",e,t.data)),!0!==t.ignoreError&&o){const t=this.getErrorHtml(i,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(e,t)}getErrorHtml(e,t){let i,n="";if(null!==e&&Object.keys(e).length>0)e.returnValues&&e.returnValues.description&&(n+=`

Description:

${e.returnValues.description}

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

File:

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

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

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

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

Stacktrace:

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

Exception ID: ${e.exceptionID}

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

${e.message}

`,n+=`

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}i=t.responseText}if(!i||"undefined"===i){if(!window.ENABLE_DEBUG_MODE)return null;i="XMLHttpRequest failed without a responseText. Check your browser console."}return`

${i}

${n}
`}_finalize(e,t){"function"==typeof t.finalize&&t.finalize(e),this._xhr===e&&(this._xhr=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,i,n,o,r){"use strict";async function a(e){const t=e.headers.get("content-type");if(!t||!t.includes("application/json"))throw new n.ExpectedJson(e);let i;try{i=await e.json()}catch(t){throw new n.InvalidJson(e)}return i}let s;Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=t.DboAction=void 0,o=i.__importStar(o),r=i.__importStar(r);class l{#v;#_;#w=[];#o={};#a=!0;#y;constructor(e,t){this.#v=e,this.#_=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.#a=!1,this}async dispatch(){(0,n.registerGlobalRejectionHandler)();const t=window.WSC_API_URL+"index.php?ajax-proxy/&t="+r.getXsrfToken(),l={actionName:this.#v,className:this.#_};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.#a;d&&o.show();try{const o=await fetch(t,c);if(!o.ok)throw new n.StatusNotOk(o);const r=await a(o);return"yes"===o.headers.get("woltlab-background-queue-check")&&new Promise(((t,i)=>{e(["../BackgroundQueue"],t,i)})).then(i.__importStar).then((e=>e.invoke())),r.returnValues}catch(e){if(e instanceof n.ApiError)throw e;if(e instanceof DOMException&&"AbortError"===e.name)return;if(!s)throw new n.ConnectionError(e)}finally{d&&o.hide()}}}t.DboAction=l,t.default=l,t.handleValidationErrors=async function(e,t){if(!(e instanceof n.StatusNotOk))throw e;const i=e.response.clone();try{const e=await a(i);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,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.handleValidationErrors=t.dboAction=t.getRequestObject=t.apiOnce=t.api=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r);const s=new WeakMap;t.api=function(e,t,i,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="+o.getXsrfToken(),t.withCredentials=!0),a=new n.default(t),s.set(e,a)}let l=null,c=null;return"function"==typeof i&&(l=a.getOption("success"),a.setOption("success",i)),"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="+o.getXsrfToken(),e.withCredentials=!0),new n.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,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.invoke=t.setUrl=void 0,n=i.__importStar(n);class o{_invocations=0;_isBusy=!1;_url;constructor(e){this._url=e}invoke(){this._isBusy||(this._isBusy=!0,n.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 o(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,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTimezoneDate=t.getTimeElement=t.gmdate=t.format=t.formatDateTime=t.formatTime=t.formatDate=void 0,n=i.__importStar(n);const o=document.documentElement.lang,r=new Intl.DateTimeFormat(o,{dateStyle:"long"}),a=new Intl.DateTimeFormat(o,{hour:"numeric",minute:"numeric"}),s=new Intl.DateTimeFormat(o,{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 i="";for(let o=0,r=t.length;o11?"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=n.get("__days")[e.getDay()];break;case"D":a=n.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=n.get("__months")[e.getMonth()];break;case"M":a=n.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="",o+1Date.now()&&(t.static=!0),t},t.getTimezoneDate=function(e,t){const i=6e4*new Date(e).getTimezoneOffset();return new Date(e+i+t)}})),define("WoltLabSuite/Core/Dom/Traverse",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(!(e instanceof Element))throw new TypeError("Expected a valid element as first argument.");const n=[];for(let o=0;o!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 i(e,1,t)[0]||null},t.childByClass=function(e,t){return i(e,2,t)[0]||null},t.childByTag=function(e,t){return i(e,3,t)[0]||null},t.childrenBySel=function(e,t){return i(e,1,t)},t.childrenByClass=function(e,t){return i(e,2,t)},t.childrenByTag=function(e,t){return i(e,3,t)},t.parentBySel=function(e,t,i){return n(e,1,t,i)},t.parentByClass=function(e,t,i){return n(e,2,t,i)},t.parentByTag=function(e,t,i){return n(e,3,t,i)},t.next=function(e){return o(e,"nextElementSibling",0,"")},t.nextBySel=function(e,t){return o(e,"nextElementSibling",1,t)},t.nextByClass=function(e,t){return o(e,"nextElementSibling",2,t)},t.nextByTag=function(e,t){return o(e,"nextElementSibling",3,t)},t.prev=function(e){return o(e,"previousElementSibling",0,"")},t.prevBySel=function(e,t){return o(e,"previousElementSibling",1,t)},t.prevByClass=function(e,t){return o(e,"previousElementSibling",2,t)},t.prevByTag=function(e,t){return o(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 i="other",n="desktop",o=!1;t.setup=function(){if("object"==typeof window.chrome)i="chrome";else{const e=window.getComputedStyle(document.documentElement);for(let t=0,n=e.length;t0||window.DocumentTouch&&document instanceof window.DocumentTouch,"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1&&(i="safari",n="ios")},t.browser=function(){return i},t.platform=function(){return n},t.touch=function(){return o}})),define("WoltLabSuite/Core/Ui/Alignment",["require","exports","tslib","../Core","../Dom/Traverse","../Dom/Util","../Language","../Environment"],(function(e,t,i,n,o,r,a,s){"use strict";function l(e,t,i,n,o,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=n.top-r;s=o-e,e-t.heighto&&(c=!1);else{const a=n.top+window.scrollY;if("top"===e){const{clientHeight:e}=document.body;s=e-a+r,e-(s+t.height)o&&(c=!1)}return{align:e,bottom:s,top:l,result:c}}function c(e,t,i,n,o){let r="auto",a="auto",s=!0;return"left"===e?(r=n.left,r+t.width>o&&(s=!1)):"right"===e?n.left+i.widtho)&&(s=!1)),{align:e,left:r,right:a,result:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.set=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__importStar(s),t.set=function(e,t,i){let d;i=n.extend({verticalOffset:0,pointer:!1,pointerClassNames:[],refDimensionsElement:null,horizontal:"left",vertical:"bottom",allowFlip:"both"},i||{}),Array.isArray(i.pointerClassNames)&&i.pointerClassNames.length===(i.pointer?1:2)||(i.pointerClassNames=[]),-1===["left","right","center"].indexOf(i.horizontal)&&(i.horizontal="left"),"bottom"!==i.vertical&&(i.vertical="top"),-1===["both","horizontal","vertical","none"].indexOf(i.allowFlip)&&(i.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(i.refDimensionsElement instanceof HTMLElement?i.refDimensionsElement:t),m=t.getBoundingClientRect(),h=window.innerHeight,f=document.body.clientWidth;let g=null,b=!1;if("center"===i.horizontal&&(b=!0,g=c(i.horizontal,u,p,m,f),g.result||("both"===i.allowFlip||"horizontal"===i.allowFlip?i.horizontal="left":g.result=!0)),"rtl"===a.get("wcf.global.pageDirection")&&(i.horizontal="left"===i.horizontal?"right":"left"),null===g||!g.result){const e=g;if(g=c(i.horizontal,u,p,m,f),!g.result&&("both"===i.allowFlip||"horizontal"===i.allowFlip)){const t=c("left"===i.horizontal?"right":"left",u,p,m,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,(i=>i(e,t)))}Object.defineProperty(t,"__esModule",{value:!0}),t.execute=t.remove=t.add=t.Origin=void 0;const s=new((n=i.__importDefault(n)).default);var l;!function(e){e.Document="document",e.DropDown="dropdown",e.Search="search"}(l||(t.Origin=l={}));let c=!1;t.add=o,t.remove=r,t.execute=a;const d={add:o,remove:r,execute:a};t.default=d})),function(e,t){var i,n;"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define("tabbable",["exports"],t):(e="undefined"!=typeof globalThis?globalThis:e||self,i=e.tabbable,t(n=e.tabbable={}),n.noConflict=function(){return e.tabbable=i,n})}(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])"],i=t.join(","),n="undefined"==typeof Element,o=n?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,r=!n&&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,i){var n,o;return void 0===i&&(i=!0),""===(o=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert"))||"true"===o||i&&t&&e(t.parentNode)},s=function(e,t,n){if(a(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(i));return t&&o.call(e,i)&&r.unshift(e),r.filter(n)},l=function e(t,n,r){var s,l,c,d,u,p,m,h;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})):(o.call(c,i)&&r.filter(c)&&(n||!t.includes(c))&&s.push(c),p=c.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(c),m=!a(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(c)),p&&m?(h=e(!0===p?c.children:p.children,!0,r),r.flatten?s.push.apply(s,h):s.push({scopeParent:c,candidates:h})):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,i=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===i||"true"===i}(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},m=function(e){var t=e.getBoundingClientRect(),i=t.width,n=t.height;return 0===i&&0===n},h=function(e,t){return!(t.disabled||a(t)||function(e){return p(e)&&"hidden"===e.type}(t)||function(e,t){var i,n,a,s,l=t.displayCheck,c=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;if(i=o.call(e,"details>summary:first-of-type")?e.parentElement:e,o.call(i,"details:not([open]) *"))return!0;if(l&&"full"!==l&&"legacy-full"!==l){if("non-zero-area"===l)return m(e)}else{if("function"==typeof c){for(n=e;e;){if(a=e.parentElement,s=r(e),a&&!a.shadowRoot&&!0===c(a))return m(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=n}if(function(e){var t,i,n,o,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!==(i=d)&&void 0!==i&&null!==(n=i.ownerDocument)&&void 0!==n&&n.contains(d)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.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,i,n;if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(i=0;i=0)},b=function e(t){var i=[],n=[];return t.forEach((function(t,o){var r=!!t.scopeParent,a=r?t.scopeParent:t,s=function(e,t){var i=d(e);return i<0&&t&&!c(e)?0:i}(a,r),l=r?e(t.candidates):a;0===s?r?i.push.apply(i,l):i.push(a):n.push({documentOrder:o,tabIndex:s,item:t,isScope:r,content:l})})),n.sort(u).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(i)},v=t.concat("iframe").join(",");e.focusable=function(e,t){return(t=t||{}).getShadowRoot?l([e],t.includeContainer,{filter:h.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):s(e,t.includeContainer,h.bind(null,t))},e.getTabIndex=d,e.isFocusable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==o.call(e,v)&&h(t,e)},e.isTabbable=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==o.call(e,i)&&f(t,e)},e.tabbable=function(e,t){var i;return i=(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(i)},Object.defineProperty(e,"__esModule",{value:!0})})),function(e,t){var i,n;"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,i=e.focusTrap,t(n=e.focusTrap={},e.tabbable),n.noConflict=function(){return e.focusTrap=i,n})}(this,(function(e,t){"use strict";function i(e,t){var i,n=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)),n}function n(e){var t,n;for(t=1;t1?t-1:0),n=1;n1?t-1:0),n=1;n=0?m.activeElement:(e=g.tabbableGroups[0])&&e.firstTabbableNode||_("fallbackFocus")),!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},y=function(){if(g.containerGroups=g.containers.map((function(e){var i=t.tabbable(e,f.tabbableOptions),n=t.focusable(e,f.tabbableOptions),o=i.length>0?i[0]:void 0,r=i.length>0?i[i.length-1]:void 0,a=n.find((function(e){return t.isTabbable(e)})),s=n.slice().reverse().find((function(e){return t.isTabbable(e)})),l=!!i.find((function(e){return t.getTabIndex(e)>0}));return{container:e,tabbableNodes:i,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:o,lastTabbableNode:r,firstDomTabbableNode:a,lastDomTabbableNode:s,nextTabbableNode:function(e){var o=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=i.indexOf(e);return r<0?o?n.slice(n.indexOf(e)+1).find((function(e){return t.isTabbable(e)})):n.slice(0,n.indexOf(e)).reverse().find((function(e){return t.isTabbable(e)})):i[r+(o?1:-1)]}}})),g.tabbableGroups=g.containerGroups.filter((function(e){return e.tabbableNodes.length>0})),g.tabbableGroups.length<=0&&!_("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!==m.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(w()))},S=function(e){var t=_("setReturnFocus",e);return t||!1!==t&&e},C=function(e){var i,n,o,a,s,l,d,p,m,h=e.target,b=e.event,w=e.isBackward,E=void 0!==w&&w;return h=h||u(b),y(),i=null,g.tabbableGroups.length>0?(o=(n=v(h,b))>=0?g.containerGroups[n]:void 0,n<0?i=E?g.tabbableGroups[g.tabbableGroups.length-1].lastTabbableNode:g.tabbableGroups[0].firstTabbableNode:E?(a=c(g.tabbableGroups,(function(e){var t=e.firstTabbableNode;return h===t})),a<0&&(o.container===h||t.isFocusable(h,f.tabbableOptions)&&!t.isTabbable(h,f.tabbableOptions)&&!o.nextTabbableNode(h,!1))&&(a=n),a>=0?(s=0===a?g.tabbableGroups.length-1:a-1,l=g.tabbableGroups[s],i=t.getTabIndex(h)>=0?l.lastTabbableNode:l.lastDomTabbableNode):r(b)||(i=o.nextTabbableNode(h,!1))):(d=c(g.tabbableGroups,(function(e){var t=e.lastTabbableNode;return h===t})),d<0&&(o.container===h||t.isFocusable(h,f.tabbableOptions)&&!t.isTabbable(h,f.tabbableOptions)&&!o.nextTabbableNode(h))&&(d=n),d>=0?(p=d===g.tabbableGroups.length-1?0:d+1,m=g.tabbableGroups[p],i=t.getTabIndex(h)>=0?m.firstTabbableNode:m.firstDomTabbableNode):r(b)||(i=o.nextTabbableNode(h)))):i=_("fallbackFocus"),i},L=function(e){var t=u(e);v(t,e)>=0||(d(f.clickOutsideDeactivates,e)?o.deactivate({returnFocus:f.returnFocusOnDeactivate}):d(f.allowOutsideClick,e)||e.preventDefault())},k=function(e){var i,n,o,r,a,s=u(e),l=v(s,e)>=0;l||s instanceof Document?l&&(g.mostRecentlyFocusedNode=s):(e.stopImmediatePropagation(),n=!0,g.mostRecentlyFocusedNode?t.getTabIndex(g.mostRecentlyFocusedNode)>0?(o=v(g.mostRecentlyFocusedNode),(r=g.containerGroups[o].tabbableNodes).length>0&&(a=r.findIndex((function(e){return e===g.mostRecentlyFocusedNode})),a>=0&&(f.isKeyForward(g.recentNavEvent)?a+1=0&&(i=r[a-1],n=!1)))):g.containerGroups.some((function(e){return e.tabbableNodes.some((function(e){return t.getTabIndex(e)>0}))}))||(n=!1):n=!1,n&&(i=C({target:g.mostRecentlyFocusedNode,isBackward:f.isKeyBackward(g.recentNavEvent)})),E(i||g.mostRecentlyFocusedNode||w())),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 o.deactivate();var t;(f.isKeyForward(e)||f.isKeyBackward(e))&&function(e){var t,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];g.recentNavEvent=e,(t=C({event:e,isBackward:i}))&&(r(e)&&e.preventDefault(),E(t))}(e,f.isKeyBackward(e))},I=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 i,n;e.length>0&&(i=e[e.length-1])!==t&&i.pause(),-1===(n=e.indexOf(t))||e.splice(n,1),e.push(t)}(h,o),g.delayInitialFocusTimer=f.delayInitialFocus?l((function(){E(w())})):E(w()),m.addEventListener("focusin",k,!0),m.addEventListener("mousedown",L,{capture:!0,passive:!1}),m.addEventListener("touchstart",L,{capture:!0,passive:!1}),m.addEventListener("click",I,{capture:!0,passive:!1}),m.addEventListener("keydown",x,{capture:!0,passive:!1}),o},T=function(){if(g.active)return m.removeEventListener("focusin",k,!0),m.removeEventListener("mousedown",L,!0),m.removeEventListener("touchstart",L,!0),m.removeEventListener("click",I,!0),m.removeEventListener("keydown",x,!0),o},D="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(w())})):void 0,A=function(){D&&(D.disconnect(),g.active&&!g.paused&&g.containers.map((function(e){D.observe(e,{subtree:!0,childList:!0})})))};return(o={get active(){return g.active},get paused(){return g.paused},activate:function(e){var t,i,n,o;return g.active?this:(t=b(e,"onActivate"),i=b(e,"onPostActivate"),(n=b(e,"checkCanFocusTrap"))||y(),g.active=!0,g.paused=!1,g.nodeFocusedBeforeActivation=m.activeElement,null==t||t(),o=function(){n&&y(),M(),A(),null==i||i()},n?(n(g.containers.concat()).then(o,o),this):(o(),this))},deactivate:function(e){var t,i,r,a,s,c;return g.active?(t=n({onDeactivate:f.onDeactivate,onPostDeactivate:f.onPostDeactivate,checkCanReturnFocus:f.checkCanReturnFocus},e),clearTimeout(g.delayInitialFocusTimer),g.delayInitialFocusTimer=void 0,T(),g.active=!1,g.paused=!1,A(),function(e,t){var i=e.indexOf(t);-1!==i&&e.splice(i,1),e.length>0&&e[e.length-1].unpause()}(h,o),i=b(t,"onDeactivate"),r=b(t,"onPostDeactivate"),a=b(t,"checkCanReturnFocus"),s=b(t,"returnFocus","returnFocusOnDeactivate"),null==i||i(),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"),i=b(e,"onPostPause");return g.paused=!0,null==t||t(),T(),A(),null==i||i(),this},unpause:function(e){if(!g.paused||!g.active)return this;var t=b(e,"onUnpause"),i=b(e,"onPostUnpause");return g.paused=!1,null==t||t(),y(),M(),A(),null==i||i(),this},updateContainerElements:function(e){var t=[].concat(e).filter(Boolean);return g.containers=t.map((function(e){return"string"==typeof e?m.querySelector(e):e})),g.active&&y(),A(),this}}).updateContainerElements(e),o},Object.defineProperty(e,"__esModule",{value:!0})})),define("WoltLabSuite/Core/Helper/Selector",["require","exports"],(function(e,t){"use strict";function i(e){for(const[t,i]of a.entries()){e.matches(t)&&n(e,i);const o=e.querySelectorAll(t);for(const e of o)n(e,i)}}function n(e,t){for(const i of t)i(e)}function o(e,t){a.has(e)||a.set(e,[]),a.get(e).push(t),i(document.body),void 0===r&&(r=new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&i(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=o,t.wheneverFirstSeen=function(e,t){const i=new WeakSet;o(e,(e=>{i.has(e)||(i.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,i,n,o,r,a,s,l,c,d,u,p){"use strict";function m(e,t,i){const n=i?"minDate":"maxDate";let o=(e.dataset[n]||"").trim();if(/^(\d{4})-(\d{2})-(\d{2})$/.exec(o))o=new Date(o).getTime().toString();else if("now"===o)o=t.getTime().toString();else if(/^\d{1,3}$/.exec(o)){const e=new Date(t.getTime());e.setFullYear(e.getFullYear()+~~o*(i?-1:1)),o=e.getTime().toString()}else if(/^datePicker-(.+)$/.exec(o)){if(o=RegExp.$1,null===document.getElementById(o))throw new Error("Reference date picker identified by '"+o+"' does not exists (element id: '"+e.id+"').")}else o=/^\d{4}-\d{2}-\d{2}T/.test(o)?new Date(o).getTime().toString():new Date(i?1902:2038,0,1).getTime().toString();e.dataset[n]=o}function h(e){let t=D.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!==U)return;U=document.createElement("div"),U.className="datePicker",U.addEventListener("click",(e=>{e.stopPropagation()}));const e=document.createElement("header");U.appendChild(e),N=document.createElement("button"),N.type="button",N.className="previous jsTooltip",N.title=a.get("wcf.date.datePicker.previousMonth"),N.setAttribute("aria-label",a.get("wcf.date.datePicker.previousMonth")),N.innerHTML='',N.addEventListener("click",(()=>W.previousMonth())),e.appendChild(N);const t=document.createElement("span");e.appendChild(t),O=document.createElement("select"),O.className="month jsTooltip",O.title=a.get("wcf.date.datePicker.month"),O.setAttribute("aria-label",a.get("wcf.date.datePicker.month")),O.addEventListener("change",w),t.appendChild(O);let i="";const n=new Intl.DateTimeFormat(document.documentElement.lang,{month:"long"});for(let e=0;e<12;e++)i+=``;O.innerHTML=i,R=document.createElement("select"),R.className="year jsTooltip",R.title=a.get("wcf.date.datePicker.year"),R.setAttribute("aria-label",a.get("wcf.date.datePicker.year")),R.addEventListener("change",y),t.appendChild(R),B=document.createElement("button"),B.type="button",B.className="next jsTooltip",B.title=a.get("wcf.date.datePicker.nextMonth"),B.setAttribute("aria-label",a.get("wcf.date.datePicker.nextMonth")),B.innerHTML='',B.addEventListener("click",(()=>W.nextMonth())),e.appendChild(B),P=document.createElement("ul"),U.appendChild(P);const o=document.createElement("li");o.className="weekdays",P.appendChild(o);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,i=new Date((new Date).setDate(s.getDate()+t)),n=document.createElement("span");n.textContent=r.format(i),o.appendChild(n)}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)}}F=document.createElement("footer"),U.appendChild(F),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",_);const c=new Date(2e3,0,1),p=new Intl.DateTimeFormat(document.documentElement.lang,{hour:"numeric"});let m="";for(let e=0;e<24;e++){c.setHours(e);let t=p.formatToParts(c);const i=t.some((e=>"dayPeriod"===e.type));2!==t.length||i||(t=t.filter((e=>"literal"!==e.type))),m+=``}j.innerHTML=m,F.appendChild(j),F.appendChild(document.createTextNode(" : ")),q=document.createElement("select"),q.className="minute",q.title=a.get("wcf.date.datePicker.minute"),q.setAttribute("aria-label",a.get("wcf.date.datePicker.minute")),q.addEventListener("change",_),m="";for(let e=0;e<60;e++){const t=e<10?"0"+e.toString():e;m+=``}q.innerHTML=m,F.appendChild(q),(0,d.getPageOverlayContainer)().appendChild(U),C=(0,u.createFocusTrap)(U,{allowOutsideClick:!0,escapeDeactivates:()=>(g(),!1)})}();const t=e.currentTarget,i="INPUT"===t.nodeName?t:t.previousElementSibling;if(i===D)return void g();const o=i.closest(".dialogContent");null!==o&&(n.stringToBool(o.dataset.hasDatepickerScrollListener||"")||(o.addEventListener("scroll",b),o.dataset.hasDatepickerScrollListener="1")),D=i;const r=I.get(D),l=D.dataset.value;let c;l?(c=new Date(parseInt(l,10)),"Invalid Date"===c.toString()&&(c=new Date)):c=new Date,T=h("minDate"),T.getTime()>c.getTime()&&(c=T),M=h("maxDate"),D.dataset.maxDate&&M.getTime()${e}`;R.innerHTML=n,R.value=i.toString(),O.value=t.toString(),U.classList.add("active")}(c.getDate(),c.getMonth(),c.getFullYear()),L=()=>{s.set(U,D)},L(),window.addEventListener("scroll",L,{passive:!1}),D.nextElementSibling.setAttribute("aria-expanded","true"),C.activate()}function g(){if(null===U||!U.classList.contains("active"))return;U.classList.remove("active");const e=I.get(D);"function"==typeof e.onClose&&e.onClose(),r.fire("WoltLabSuite/Core/Date/Picker","close",{element:D}),void 0!==L&&(window.removeEventListener("scroll",L),L=void 0),D.nextElementSibling.setAttribute("aria-expanded","false"),D=null,C.deactivate()}function b(e){if(null===D)return;const t=e.currentTarget,i=c.default.offset(D),n=c.default.offset(t);i.top+D.clientHeight<=n.top||i.top>=n.top+t.offsetHeight||i.left<=n.left||i.left>=n.left+t.offsetWidth?g():s.set(U,D)}function v(e,t,i){const n=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 i&&(i=parseInt(i||"0",10)),r||i){let a=0!==i;const s=document.createDocumentFragment();s.appendChild(P),r||(t=parseInt(P.dataset.month,10)),i||(i=parseInt(P.dataset.year,10));let l=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-"+("0"+e.toString()).slice(-2));for(lM&&(i=M.getFullYear(),t=M.getMonth(),e=M.getDate(),O.value=t.toString(),R.value=i.toString(),a=!0),l=new Date(i.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(T.getFullYear(),T.getMonth(),T.getDate());for(let e=0;e<42;e++){if(35===e&&l.getMonth()!==t){c.default.hide(A[35].parentNode);break}const i=A[e];i.textContent=l.getDate().toString();const n=l.getMonth()===t;n?i.classList.remove("otherMonth"):i.classList.add("otherMonth");let r=!0;(lM)&&(r=!1),r?i.classList.remove("disabled"):i.classList.add("disabled"),n&&r&&(i.href="#",i.setAttribute("role","button"),i.tabIndex=0,i.title=o.formatDate(l),i.setAttribute("aria-label",o.formatDate(l))),l.setDate(l.getDate()+1)}if(P.dataset.month=t.toString(),P.dataset.year=i.toString(),U.insertBefore(s,F),!n&&(l=new Date(i,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=O.children[e];t.disabled=i===T.getFullYear()&&+t.valueM.getMonth()}const e=new Date(i.toString()+"-"+("0"+(t+1).toString()).slice(-2)+"-01");e.setMonth(e.getMonth()+1),B.classList[eT?"add":"remove"]("active")}}if(e){for(let t=0;t<37;t++){const i=A[t];let n=+i.textContent===e;(i.classList.contains("otherMonth")||i.classList.contains("disabled"))&&(n=!1),n?i.classList.add("active"):i.classList.remove("active")}P.dataset.day=e.toString()}_()}function _(){const e=I.get(D);let t;n.stringToBool(D.dataset.empty||"")||(t=e.isDateTime?new Date(+P.dataset.year,+P.dataset.month,+P.dataset.day,+j.value,+q.value):new Date(+P.dataset.year,+P.dataset.month,+P.dataset.day),W.setDate(D,t))}function w(e){v(void 0,+e.currentTarget.value)}function y(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")||(D.dataset.empty="false",v(+t.textContent),I.get(D).isDateTime||g())}function S(e){if("string"==typeof e&&(e=document.getElementById(e)),!(e instanceof HTMLInputElement&&e.classList.contains("inputDatePicker")&&I.has(e)))throw new Error("Expected a valid date picker input element or id.");return e}n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importDefault(l),c=i.__importDefault(c);let C,L,k=!1,x=0;const I=new Map;let M,T,D=null;const A=[];let P,j,q,O,B,N,F,R,U=null;const W={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 i="datetime"===e.getAttribute("type"),r=i&&n.stringToBool(e.dataset.timeOnly||""),s=n.stringToBool(e.dataset.disableClear||""),l=i&&n.stringToBool(e.dataset.ignoreTimezone||""),c=e.classList.contains("birthday");e.dataset.isDateTime=i?"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 i=Math.floor(e/60).toString(),n=(e%60).toString();t+=2===i.length?i:"0"+i,t+=":",t+=2===n.length?n:"0"+n,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?o.formatTime(d):i?o.formatDateTime(d):o.formatDate(d))}const h=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)),m(e,t,!0),m(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=h?"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?o.format(d,"H:i"):l?o.format(d,"Y-m-dTH:i:s"):o.format(d,i?"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 _=document.createElement("button");_.type="button",_.className="inputSuffix button jsTooltip",_.title=r?a.getPhrase("wcf.date.datePicker.time"):a.getPhrase("wcf.date.datePicker"),_.setAttribute("aria-haspopup","true"),_.setAttribute("aria-expanded","false"),_.addEventListener("click",(t=>{e.disabled||f(t)})),v.appendChild(_);let w=document.createElement("fa-icon");r?w.setIcon("clock"):w.setIcon("calendar"),_.appendChild(w),e.parentNode.insertBefore(v,e),v.insertBefore(e,_);let y=null;s||(y=document.createElement("button"),y.type="button",y.className="inputSuffix button jsTooltip",y.title=r?a.getPhrase("wcf.date.datePicker.time.clear"):a.getPhrase("wcf.date.datePicker.clear"),y.addEventListener("click",(()=>{e.disabled||W.clear(e)})),h&&(y.hidden=!0),v.appendChild(y),w=document.createElement("fa-icon"),w.setIcon("xmark"),y.appendChild(w));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?(_.classList.add("disabled"),y?.classList.add("disabled")):(_.classList.remove("disabled"),y?.classList.remove("disabled"))})).observe(e,{attributeFilter:["disabled"]}),e.disabled&&(_.classList.add("disabled"),y?.classList.add("disabled")),I.set(e,{clearButton:y,shadow:b,disableClear:s,isDateTime:i,isEmpty:h,isTimeOnly:r,ignoreTimezone:l,onClose:null})})),l.default.add("WoltLabSuite/Core/Date/Picker",(()=>g())))},previousMonth(){"0"===O.value?(O.value="11",R.value=(+R.value-1).toString()):O.value=(+O.value-1).toString(),v(void 0,+O.value,+R.value)},nextMonth(){"11"===O.value?(O.value="0",R.value=(+R.value+1).toString()):O.value=(+O.value+1).toString(),v(void 0,+O.value,+R.value)},getDate(e){const t=(e=S(e)).dataset.value||"";return t?new Date(+t):null},setDate(e,t){e=S(e);const i=I.get(e);e.dataset.value=t.getTime().toString();let n,r="";i.isDateTime?i.isTimeOnly?(n=o.formatTime(t),r="H:i"):i.ignoreTimezone?(n=o.formatDateTime(t),r="Y-m-dTH:i:s"):(n=o.formatDateTime(t),r="c"):(n=o.formatDate(t),r="Y-m-d"),e.value=n,i.shadow.value=o.format(t,r),i.disableClear||(i.clearButton.hidden=!1)},getValue(e){e=S(e);const t=I.get(e);return t?t.shadow.value:""},clear(e){e=S(e);const t=I.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=I.get(e),i=e.parentNode;i.parentNode.insertBefore(e,i),i.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,I.delete(e)},setCloseCallback(e,t){e=S(e),I.get(e).onClose=t}};return window.__wcf_bc_datePicker=W,W})),define("WoltLabSuite/Core/Form/XsrfToken",["require","exports","../Core","../Helper/Selector"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(){const e=(0,i.getXsrfToken)();(0,n.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,i,n,o,r,a,s,l,c,d,u,p){"use strict";n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d);let m,h=null;const f=new Map;let g=!1;const b=new WeakMap,v=new Map;let _;const w=["onBeforeClose","onClose","onShow"],y=["number","password","search","tel","text","url"],E={setup(){m=document.createElement("div"),m.classList.add("dialogOverlay"),m.setAttribute("aria-hidden","true"),m.addEventListener("mousedown",(e=>this._closeOnBackdrop(e))),m.addEventListener("wheel",(e=>{e.target===m&&e.preventDefault()}),{passive:!1});let e=!1;new MutationObserver((()=>{"true"===m.getAttribute("aria-hidden")?((0,p.releasePageOverlayContainer)(m),e=!1):e||((0,p.adoptPageOverlayContainer)(m),e=!0)})).observe(m,{attributes:!0,attributeFilter:["aria-hidden"]}),document.getElementById("content").appendChild(m),_=e=>{if("Escape"===e.key){const t=e.target;if("INPUT"!==t.nodeName&&"TEXTAREA"!==t.nodeName){const e=f.get(h);return!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(h),!1):(this.close(h),!1))}}return!0},r.on("screen-xs",{match(){g=!0},unmatch(){g=!1},setup(){g=!0}}),this._initStaticDialogs(),o.default.add("Ui/Dialog",(()=>{this._initStaticDialogs()})),window.addEventListener("resize",(()=>{f.forEach((e=>{n.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 i=document.getElementById(t);null!==i&&(i.classList.remove("jsStaticDialogContent"),i.dataset.isStaticDialog="true",a.default.hide(i),e.addEventListener("click",(e=>{e.preventDefault(),this.openStatic(i.id,null,{title:i.dataset.title||""})})))}}))},open(t,o){let r=b.get(t);if(r&&n.isPlainObject(r))return this.openStatic(r.id,void 0===o?null:o);if("function"!=typeof t._dialogSetup)throw new Error("Callback object does not implement the method '_dialogSetup()'.");const s=t._dialogSetup();if(!n.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=o;else if("function"==typeof s.source)s.source();else if(n.isPlainObject(s.source)){if("string"!=typeof o||""===o.trim())return new Promise(((t,i)=>{e(["../Ajax"],t,i)})).then(i.__importStar).then((e=>{const i=s.source;e.api(this,i.data,(e=>{e.returnValues&&"string"==typeof e.returnValues.template&&(this.open(t,e.returnValues.template),"function"==typeof i.after&&i.after(f.get(l).content,e))}))})),{};s.source=o}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,o,a){this.isOpen(t)||r.pageOverlayOpen(),"desktop"!==l.platform()&&(this.isOpen(t)||r.scrollDisable()),f.has(t)?this._updateDialog(t,o):((a=n.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,i)=>{e(["./Confirmation"],t,i)})).then(i.__importStar).then((e=>{e.show({confirm:this.close.bind(this,t),message:a.closeConfirmMessage||""})}))}),this._createDialog(t,o,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 i=f.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");const n=i.dialog.querySelector(".dialogTitle");n&&(n.textContent=t)},setCallback(e,t,i){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===w.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");if("function"!=typeof i&&null!==i)throw new Error("Only functions or the 'null' value are acceptable callback values ('"+typeof i+"' given).");n[t]=i},removeCallback(e,t){if("object"==typeof e){const t=b.get(e);void 0!==t&&(e=t.id)}const i=f.get(e);if(void 0===i)throw new Error(`Expected a valid dialog id, '${e}' does not match any active dialog.`);if(-1===w.indexOf(t))throw new Error("Invalid callback identifier, '"+t+"' is not recognized.");i[t]=void 0},_createDialog(e,t,i){let n=null;if(null===t&&(n=document.getElementById(e),null===n))throw new Error("Expected either a HTML string or an existing element id.");const o=document.createElement("div");o.classList.add("dialogContainer"),o.setAttribute("aria-hidden","true"),o.setAttribute("role","dialog"),o.dataset.id=e;const r=document.createElement("header");o.appendChild(r);const s=a.default.getUniqueId();o.setAttribute("aria-labelledby",s);const l=document.createElement("span");if(l.classList.add("dialogTitle"),l.textContent=i.title,l.id=s,r.appendChild(l),i.closable){const e=document.createElement("button");e.type="button",e.innerHTML='',e.classList.add("dialogCloseButton","jsTooltip"),e.title=i.closeButtonLabel,e.setAttribute("aria-label",i.closeButtonLabel),e.addEventListener("click",(()=>this._close())),r.appendChild(e)}new ResizeObserver((()=>{if("false"===o.getAttribute("aria-hidden")){const e=Math.floor(o.getBoundingClientRect().width/2);o.style.setProperty("--translate-x",`-${e}px`)}})).observe(o);const c=document.createElement("div");let d;if(c.classList.add("dialogContent"),i.disableContentPadding&&c.classList.add("dialogContentNoPadding"),o.appendChild(c),c.addEventListener("wheel",(e=>{let t,i,n,o=!1,r=e.target;for(;;){if(t=r.clientHeight,i=r.scrollHeight,t0){o=!0;break}if(e.deltaY>0&&n+t1?(d=document.createElement("div"),d.id=e,d.appendChild(t)):d=i[0]}}else d=n;c.appendChild(d),"none"===d.style.getPropertyValue("display")&&a.default.show(d);const p=(0,u.createFocusTrap)(o,{allowOutsideClick:!0,escapeDeactivates:()=>(f.get(e).closable&&E.close(e),!1),fallbackFocus:o});f.set(e,{backdropCloseOnClick:i.backdropCloseOnClick,closable:i.closable,content:d,dialog:o,focusTrap:p,header:r,onBeforeClose:i.onBeforeClose,onClose:i.onClose,onShow:i.onShow,submitButton:null,inputFields:new Set}),m.insertBefore(o,m.firstChild),"function"==typeof i.onSetup&&i.onSetup(d),this._updateDialog(e,null)},_updateDialog(e,t){const i=f.get(e);if(void 0===i)throw new Error("Expected a valid dialog id, '"+e+"' does not match any active dialog.");if("string"==typeof t&&a.default.setInnerHtml(i.content,t),n.stringToBool(i.dialog.getAttribute("aria-hidden"))){d.default.execute(),i.closable&&n.stringToBool(m.getAttribute("aria-hidden"))&&window.addEventListener("keyup",_),i.dialog.parentNode.insertBefore(i.dialog,i.dialog.parentNode.firstChild),i.dialog.setAttribute("aria-hidden","false"),m.setAttribute("aria-hidden","false"),m.setAttribute("close-on-click",i.backdropCloseOnClick?"true":"false"),h=e;const t=i.header.querySelector(".dialogCloseButton");t&&t.setAttribute("inert","true"),t&&t.removeAttribute("inert"),"function"==typeof i.onShow&&i.onShow(i.content),n.stringToBool(i.content.dataset.isStaticDialog||"")&&c.fire("com.woltlab.wcf.dialog","openStatic",{content:i.content,id:e})}this.rebuild(e),o.default.trigger(),i.focusTrap.activate()},rebuild(e){const t=this._getDialogId(e),i=f.get(t);if(void 0===i)throw new Error("Expected a valid dialog id, '"+t+"' does not match any active dialog.");if(n.stringToBool(i.dialog.getAttribute("aria-hidden")))return;const o=i.content.parentNode,r=i.content.querySelector(".formSubmit");let s=0;null!==r?(o.classList.add("dialogForm"),r.classList.add("dialogFormSubmit"),s+=a.default.outerHeight(r),s-=1,o.style.setProperty("margin-bottom",`${s}px`,"")):(o.classList.remove("dialogForm"),o.style.removeProperty("margin-bottom")),s+=a.default.outerHeight(i.header);const l=window.innerHeight*(g?1:.8)-s;if(o.style.setProperty("max-height",~~l+"px",""),""===i.dialog.style.getPropertyValue("--translate-x")){const e=Math.floor(i.dialog.getBoundingClientRect().width/2);i.dialog.style.setProperty("--translate-x",`-${e}px`)}const c=v.get(t);if(void 0!==c&&"function"==typeof c._dialogSubmit){const e=i.content.querySelectorAll('input[data-dialog-submit-on-enter="true"]'),n=i.content.querySelector('.formSubmit > input[type="submit"], .formSubmit > button[data-type="submit"]');if(null===n)return void(0===e.length&&console.warn("Broken dialog, expected a submit button.",i.content));if(i.submitButton!==n){i.submitButton=n,n.addEventListener("click",(e=>{e.preventDefault(),this._submit(t)}));const o=e=>{"Enter"===e.key&&(e.preventDefault(),this._submit(t))};let r;for(let t=0,n=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"),i=!1):(a.default.innerError(e,!1),e.closest("dl")?.classList.remove("formError")))})),i){const t=v.get(e);"function"==typeof t._dialogSubmit&&t._dialogSubmit()}},submit(e){this._submit(e)},_close(){const e=f.get(h);return void 0===e||!e.closable||("function"==typeof e.onBeforeClose?(e.onBeforeClose(h),!1):(this.close(h),!0))},_closeOnBackdrop(e){e.target===m&&(n.stringToBool(m.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 i=document.activeElement;i.closest(".dialogContainer")===t.dialog&&i.blur(),"function"==typeof t.onClose&&t.onClose(e),h=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,i,n,o,r,a,s,l,c,d){"use strict";function u(e){const t=e.currentTarget,i=t.querySelectorAll(".dropdown.dropdownOpen");for(let e=0,n=i.length;e=s.top+t.offsetHeight||r.left<=s.left||r.left>=s.left+t.offsetWidth?C.toggleDropdown(o):C.setAlignment(_.get(o),w.get(o))}}function p(){_.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen"))if(o.stringToBool(e.dataset.isOverlayDropdownButton||""))C.setAlignment(e,w.get(t));else{const i=w.get(e.id);o.stringToBool(i.dataset.dropdownIgnorePageScroll||"")||C.close(t)}}))}function m(e,t){b.forEach(e,(i=>{i(e,t)}))}function h(e,t,i,n){if(null!==e){e.preventDefault(),e.stopPropagation();const i=e.currentTarget;t=i.dataset.target,void 0===n&&e instanceof MouseEvent&&(o.stringToBool(i.dataset.isKeyboardClick||"")?delete i.dataset.isKeyboardClick:n=!0)}S=!0;try{l.default.execute(l.Origin.DropDown,t)}finally{S=!1}let a=_.get(t),s=!1;if(void 0!==a){let i,l;if(e&&(i=e.currentTarget,l=i.parentNode,l!==a&&(l.classList.add("dropdown"),l.id=a.id,a.classList.remove("dropdown"),a.id="",a=l,_.set(t,l))),void 0===n&&(i=a.closest(".dropdownToggle"),i||(i=a.querySelector(".dropdownToggle"),!i&&a.id&&(i=document.querySelector('[data-target="'+a.id+'"]'))),i&&o.stringToBool(i.dataset.dropdownLazyInit||"")&&(n=!0)),o.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="",_.forEach(((e,r)=>{const a=w.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"),m(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&&o.stringToBool(l.dataset.scrollToActive||"")){delete l.dataset.scrollToActive;let e=null;for(let t=0,i=l.childElementCount;tc.clientHeight?"add":"remove"]("forceScrollbar"),m(r,"open");let d=null;if(!n){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,i),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()):h(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 i=Array.from(t.closest(".dropdownMenu").querySelectorAll("li"));"ArrowUp"!==e.key&&"End"!==e.key||i.reverse();let n=null;const o=e=>!e.classList.contains("dropdownDivider")&&e.clientHeight>0;let r=i.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 i=r.parentByClass(e,"dropdown");if(null===i)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a parent with .dropdown.");const n=r.nextByClass(e,"dropdownMenu");if(null===n)throw new Error("Invalid dropdown passed, button '"+a.default.identify(e)+"' does not have a menu as next sibling.");y.appendChild(n);const s=a.default.identify(i);if(!_.has(s)&&(e.classList.add("jsDropdownEnabled"),e.addEventListener("click",h),e.addEventListener("keydown",f),_.set(s,i),w.set(s,n),/^wcf\d+$/.test(s)||(n.dataset.source=s),n.childElementCount&&n.children[0].classList.contains("scrollableDropdownMenu"))){const e=n.children[0];e.dataset.scrollToActive="true";let t=null,i=null;e.addEventListener("wheel",(n=>{null===t&&(t=e.clientHeight),null===i&&(i=e.scrollHeight),(n.deltaY<0&&0===e.scrollTop||n.deltaY>0&&e.scrollTop+t===i)&&n.preventDefault()}),{passive:!1})}return e.dataset.target=s,t&&setTimeout((()=>{e.dataset.dropdownLazyInit=t instanceof MouseEvent?"true":"false",o.triggerEvent(e,"click"),setTimeout((()=>{delete e.dataset.dropdownLazyInit}),10)}),10),!0},initFragment(e,t){C.setup();const i=a.default.identify(e);_.has(i)||(_.set(i,e),y.appendChild(t),w.set(i,t))},registerCallback(e,t){b.add(e,t)},getDropdown:e=>_.get(e),getDropdownMenu:e=>w.get(e),toggleDropdown(e,t,i){h(null,e,t,i)},setAlignment(e,t,i){const n=e.querySelector(".dropdownToggle"),o=null!==n?n.parentNode:null;let r;o&&o.classList.contains("inputAddonTextarea")&&(r=n),s.set(t,i||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=_.get(e);if(void 0===t)throw new Error("Unknown dropdown identifier '"+e+"'.");const i=w.get(e);C.setAlignment(t,i)},isOpen(e){const t=w.get(e);return void 0!==t&&t.classList.contains("dropdownOpen")},open(e,t,i){const n=w.get(e);void 0===n||n.classList.contains("dropdownOpen")||C.toggleDropdown(e,i,t)},close(e){const t=_.get(e);void 0!==t&&(t.classList.remove("dropdownOpen"),w.get(e).classList.remove("dropdownOpen"))},closeAll(){S||_.forEach(((e,t)=>{if(e.classList.contains("dropdownOpen")){e.classList.remove("dropdownOpen"),w.get(t).classList.remove("dropdownOpen");const i=e.querySelector(".dropdownToggle");i&&i.setAttribute("aria-expanded","false"),m(t,"close")}}))},destroy(e){if(!_.has(e))return!1;try{C.close(e),w.get(e)?.remove()}catch(e){}return w.delete(e),_.delete(e),!0},_toggle:(e,t,i,n)=>h(e,t,i,n)};return C})),define("WoltLabSuite/Core/Ui/Dropdown/Reusable",["require","exports","tslib","./Simple"],(function(e,t,i,n){"use strict";function o(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,n=i.__importDefault(n);const r=new Map;let a=0;t.init=function(e,t){if(r.has(e))return;const i=document.createElement("div");i.id="reusableDropdownGhost"+a++,n.default.initFragment(i,t),r.set(e,i.id)},t.getDropdownMenu=function(e){return n.default.getDropdownMenu(o(e))},t.registerCallback=function(e,t){n.default.registerCallback(o(e),t)},t.toggleDropdown=function(e,t){n.default.toggleDropdown(o(e),t)}})),define("WoltLabSuite/Core/Ui/Page/Menu/Container",["require","exports","tslib","focus-trap","../../Screen","../../CloseOverlay","../../../Dom/Util"],(function(e,t,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuContainer=void 0,r=i.__importDefault(r),a=i.__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,o.pageOverlayOpen)(),(0,o.scrollDisable)(),this.container.hidden=!1,this.provider.wakeup(),this.getFocusTrap().activate()}close(){this.provider.getMenuButton().setAttribute("aria-expanded","false"),(0,o.pageOverlayClose)(),(0,o.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,n.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,i,n,o,r,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageMenuMain=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__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 n.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 i=this.buildFooterMenu();i&&e.append(i);const n=new ResizeObserver((()=>this.updateOverflowIndicator(e)));Array.from(e.children).forEach((e=>{n.observe(e)}));const o=document.createDocumentFragment();return o.append(e),o}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 i=t.nextElementSibling;i&&(i.setAttribute("aria-expanded","true"),i.nextElementSibling.hidden=!1)}}buildLanguageMenu(){const e=a.getDropdownMenu("pageLanguageContainer");if(void 0===e)return null;const t=[],i=new Map;Array.from(e.children).forEach((e=>{const n=e.dataset.languageCode,o=e.querySelector("span").textContent.trim(),r=e.querySelector("img.iconFlag")||void 0;i.set(n,e.querySelector("a")),t.push({active:!1,children:[],counter:0,depth:1,identifier:n,title:o,icon:r})}));const n=document.createElement("fa-icon");n.setIcon("language"),n.size=24;const r=[{active:!1,children:t,counter:0,depth:0,identifier:"language",title:o.get("wcf.user.language"),icon:n}],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 n=e.dataset.identifier;i.get(n)?.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"),i=this.buildMenu(t);i.classList.add("pageMenuMainNavigationFooter");const n=e.querySelector("nav").getAttribute("aria-label");return i.setAttribute("aria-label",n),i}buildMenu(e){const t=this.menuItemProvider.getMenuItems(e),i=document.createElement("nav");return i.classList.add("pageMenuMainNavigation"),i.append(this.buildMenuItemList(t,!1)),i}buildMenuItemList(e,t){const i=document.createElement("ul");return i.classList.add("pageMenuMainItemList"),e.filter((e=>!(!t&&!e.link&&0===e.children.length))).forEach((e=>{i.append(this.buildMenuItem(e,t))})),i}buildMenuItem(e,t){const i=document.createElement("li");if(i.dataset.depth=e.depth.toString(),i.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 i=document.createElement("span");i.classList.add("pageMenuMainItemCounter","badge","badgeUpdate"),i.setAttribute("aria-hidden","true"),i.textContent=e.counter.toString(),null!==e.identifier&&this.menuItemBadges.set(e.identifier,i),t.append(i)}i.append(t)}else{const n=document.createElement("a");if(n.classList.add("pageMenuMainItemLabel"),n.href="#",e.icon){n.append(e.icon);const t=document.createElement("span");t.textContent=e.title,n.append(t)}else n.textContent=e.title;e.identifier&&(n.dataset.identifier=e.identifier),t&&"language"!==e.identifier||(n.addEventListener("click",(e=>{e.preventDefault(),n.nextElementSibling.click()})),n.setAttribute("aria-hidden","true")),i.append(n)}if(e.children.length){i.classList.add("pageMenuMainItemExpandable");const n=r.default.getUniqueId(),a=document.createElement("button");a.type="button",a.classList.add("pageMenuMainItemToggle"),a.setAttribute("aria-expanded","false"),a.setAttribute("aria-controls",n),a.innerHTML='';let s=e.title;e.link&&(s=o.get("wcf.menu.page.button.toggle",{title:e.title})),a.setAttribute("aria-label",s);const l=this.buildMenuItemList(e.children,t);l.id=n,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))})),i.append(a,l)}return i}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 m(){return void 0===h&&(h=document.createElement("div"),h.classList.add("dropdownMenuContainer"),(0,l.getPageOverlayContainer)().append(h)),h}let h;Object.defineProperty(t,"__esModule",{value:!0}),t.registerProvider=t.getContainer=t.updateCounter=t.getUserMenuProviders=void 0,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s);const f=new Set,g=new Map;t.getUserMenuProviders=function(){return f},t.updateCounter=function(e,t){Array.from(f).filter((t=>t.getIdentifier()===e)).forEach((e=>{e.getPanelButton().dispatchEvent(new CustomEvent("updateCounter",{detail:{counter:t}}))}))},t.getContainer=m,t.registerProvider=function(e){0===f.size&&(o.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",(i=>{i.preventDefault(),i.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,i,n,o,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,n=i.__importDefault(n),a=i.__importStar(a),s=i.__importDefault(s),t.getElement=function(){return d};let m=!1;t.setup=function(){m||(c=document.getElementById("userMenu"),d=c.querySelector(".userMenu"),p=c.querySelector("a"),n.default.add("WoltLabSuite/Core/Ui/User/Menu/ControlPanel",(()=>l())),(0,o.getContainer)().append(d),d.addEventListener("click",(e=>e.stopPropagation())),c.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),d.hidden?d.hidden&&(n.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:i,height:n}=t.getBoundingClientRect();e.style.setProperty("top",`${i+n}px`)}}(d,c)):l()})),u=(0,r.createFocusTrap)(d,{allowOutsideClick:!0,escapeDeactivates:()=>(l(),!1),fallbackFocus:d}),m=!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,i,n,o,r,a,s,l,c){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hasValidUserMenu=t.PageMenuUser=void 0,n=i.__importDefault(n),o=i.__importStar(o),a=i.__importDefault(a),l=i.__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 n.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,i=this.tabPanels.get(e);if("userMenu"===t){const e=(0,s.getElement)();e.hidden=!1,0===i.childElementCount&&(this.tabOrigins.set(i,e.parentElement),i.append(e))}else if(0===i.childElementCount){const t=this.userMenuProviders.get(e);if(t){const e=t.getView(),n=e.getElement();this.tabOrigins.set(i,n.parentElement),i.append(n),e.open()}else{const t=this.legacyUserPanels.get(e);t.open();const{top:n}=i.getBoundingClientRect();t.getDropdown().getContainer()[0].style.setProperty("--offset-top",`${n}px`)}}}detachViewsFromPanel(){this.tabPanels.forEach(((e,t)=>{if(e.childElementCount){const i=this.tabOrigins.get(e);if(i)if("userMenu"===t.dataset.origin){const t=e.children[0];t.hidden=!0,i.append(t)}else{const e=this.userMenuProviders.get(t);if(e){const t=e.getView().getElement();t.hidden=!0,i.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 i=this.tabs.indexOf(t),n=this.tabs.length-1;let o;o="ArrowLeft"===e.key?0===i?n:i-1:"ArrowRight"===e.key?i===n?0:i+1:"End"===e.key?n:0,this.tabs[o].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",o.get("wcf.menu.user")),e.append(t),this.buildControlPanelTab(t,e),(0,r.getUserMenuProviders)().forEach((i=>{const[n,o]=this.buildTab(i);t.append(n),e.append(o),this.tabs.push(n),this.tabPanels.set(n,o),this.userMenuProviders.set(n,i)})),this.buildLegacyTabs(t,e),e}buildTab(e){const t=e.getPanelButton(),i=t.querySelector("a");let n=i.querySelector("fa-icon")?.outerHTML;void 0===n&&(n='');const o={icon:n,label:i.dataset.title||i.title,origin:t.id};return this.buildTabComponents(o)}buildControlPanelTab(e,t){const i=document.getElementById("userMenu"),n=i.querySelector("a"),o={icon:this.userMenuButton.querySelector(".userAvatarImage").outerHTML,label:n.dataset.title||n.title,origin:i.id},[r,a]=this.buildTabComponents(o);e.append(r),t.append(a),this.tabs.push(r),this.tabPanels.set(r,a)}buildLegacyTabs(e,t){const i=document.querySelector(".userPanelItems"),n={panels:[]};l.fire("com.woltlab.wcf.pageMenu","legacyMenu",n),Array.from(i.children).filter((e=>void 0!==n.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((i=>{const[o,r]=this.buildTabComponents(i);e.append(o),t.append(r),this.tabs.push(o),this.tabPanels.set(o,r);const a=n.panels.find((e=>e.element.id===i.origin));this.legacyUserPanels.set(o,a.api)}))}buildTabComponents(e){const t=a.default.getUniqueId(),i=a.default.getUniqueId(),n=document.createElement("button");n.type="button",n.classList.add("pageMenuUserTab"),n.dataset.hasUnreadContent="false",n.dataset.origin=e.origin,n.id=t,n.setAttribute("aria-controls",i),n.setAttribute("aria-selected","false"),n.setAttribute("role","tab"),n.tabIndex=-1,n.setAttribute("aria-label",e.label),n.innerHTML=e.icon,n.addEventListener("click",(e=>{e.preventDefault(),this.openTab(n)})),n.addEventListener("keydown",(e=>this.keydown(e)));const o=document.createElement("div");return o.classList.add("pageMenuUserTabPanel"),o.id=i,o.hidden=!0,o.setAttribute("aria-labelledby",t),o.setAttribute("role","tabpanel"),o.tabIndex=0,[n,o]}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,i,n,o,r,a,s,l,c,d,u,p,m,h){"use strict";function f(){B=!0,g(),b(),F&&(U=new u.PageMenuMain(H),U.enable(),(0,p.hasValidUserMenu)()&&(W=new p.PageMenuUser,W.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 i=document.createElement("button");i.type="button",i.innerHTML='',i.classList.add("dropdownLabel"),i.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(i,e.firstChild)}))}function b(){document.querySelectorAll(".message").forEach((e=>{if(R.has(e))return;const t=e.querySelector(".jsMobileNavigation");if(t){t.addEventListener("click",(e=>{e.stopPropagation(),window.setTimeout((()=>{t.classList.remove("open")}),10)}));const i=e.querySelector(".messageQuickOptions");if(i&&t.childElementCount){i.classList.add("active");let n=i.querySelector(".messageQuickOptionsMobile");null===n&&(n=document.createElement("li"),n.innerHTML=`\n \n `,n.classList.add("messageQuickOptionsMobile"),i.append(n)),n.querySelector("button").addEventListener("click",(n=>{n.stopPropagation(),S(e,i,t)}))}}R.add(e)}))}function v(){document.querySelectorAll(".jsMobileButtonGroupNavigation.open, .jsMobileNavigation.open").forEach((e=>{e.classList.remove("open")})),B&&q&&E()}function _(){V=!0}function w(){V=!1,z.forEach((function(e){e.classList.remove("open")}))}function y(){z.forEach((function(e){e.addEventListener("mousedown",(function(t){V&&t.target===e&&(t.preventDefault(),e.classList.toggle("open"))}))})),V=!0}function E(){q?.classList.remove("dropdownOpen")}function S(e,t,i){if(null===q)q=document.createElement("ul"),q.className="dropdownMenu",d.init("com.woltlab.wcf.jsMobileNavigation",q);else if(q.classList.contains("dropdownOpen")&&(E(),j.deactivate(),j=void 0,O===e))return;q.innerHTML="",c.default.execute(),x(i);const o=i.previousElementSibling;if(o&&o.classList.contains("messageFooterButtonsExtra")){const e=document.createElement("li");e.className="dropdownDivider",q.appendChild(e),x(o)}l.set(q,t,{horizontal:"right",allowFlip:"vertical"}),q.classList.add("dropdownOpen"),O=e,j=(0,n.createFocusTrap)(q,{allowOutsideClick:!0,escapeDeactivates:()=>(S(e,t,i),!1),setReturnFocus:t}),j.activate()}function C(){N=!0,document.querySelectorAll(".boxMenuHasChildren > a").forEach((e=>{e.addEventListener("touchstart",(t=>{N&&"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 i=e.parentElement,n=t.target;i.contains(n)||n===i||e.setAttribute("aria-expanded","false")}),{once:!0})}),{once:!0})}),{once:!0}))}),{passive:!1})}))}function L(){N=!0}function k(){N=!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 i=e.querySelector("span:not(.icon)");t.innerHTML=`${i.textContent}`,t.children[0].addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),"A"===e.nodeName?e.click():o.triggerEvent(e,"click"),E()})),q.appendChild(t)}))}function I(){c.default.execute(),B=!0,F&&(U.enable(),W?.enable())}function M(){$&&A($,".messageGroupLink")}function T(){c.default.execute(),B=!1,F&&(U.disable(),W?.disable())}function D(){$&&P($),q&&E()}function A(e,t){Array.from(e).forEach((e=>{const i=e.parentElement;let n=i.querySelector(".mobileLinkShadow");if(null===n){const o=e.querySelector(t);o.href&&(n=document.createElement("a"),n.className="mobileLinkShadow",n.href=o.href,n.setAttribute("aria-labelledby",a.default.identify(o)),i.appendChild(n),i.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,o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importDefault(c),d=i.__importStar(d),m=i.__importStar(m),h=i.__importStar(h);let j,q=null,O=null,B=!1,N=!1,F=!1;const R=new WeakSet;let U,W,H,V=!1,$=null;const z=[];t.setup=function(e,t){F=e,H=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 i=document.querySelector(".messageGroupList");i&&($=i.getElementsByClassName("messageGroup")),m.on("screen-md-down",{match:I,unmatch:T,setup:f}),m.on("screen-sm-down",{match:M,unmatch:D,setup:M}),m.on("screen-md-down",{match:_,unmatch:w,setup:y}),!s.touch()||"ios"!==s.platform()&&"android"!==s.platform()||m.on("screen-lg",{match:L,unmatch:k,setup:C})},t.enable=I,t.enableShadow=M,t.disable=T,t.disableShadow=D,t.rebuildShadow=A,t.removeShadow=P})),define("WoltLabSuite/Core/Ui/Page/Action",["require","exports","tslib","../../Core","../../Language","../../Ui/Screen"],(function(e,t,i,n,o,r){"use strict";function a(){if(document.documentElement.classList.contains("disableScrolling"))return;const e=window.pageYOffset;e!==g?(e>=b?(m.classList.contains("initiallyHidden")&&m.classList.remove("initiallyHidden"),m.setAttribute("aria-hidden","false")):m.setAttribute("aria-hidden","true"),l(),-1!==g&&h.classList[e"false"===e.getAttribute("aria-hidden")));p.classList[e?"add":"remove"]("active"),e?h.classList.add("pageActionHasContextButtons"):h.classList.remove("pageActionHasContextButtons")}function c(){if(f)return;f=!0,h=document.createElement("div"),h.className="pageAction",p=document.createElement("div"),p.className="pageActionButtons",h.appendChild(p),m=function(){const e=document.createElement("button");return e.type="button",e.classList.add("button","buttonPrimary","pageActionButtonToTop","initiallyHidden","jsTooltip"),e.title=o.get("wcf.global.scrollUp"),e.setAttribute("aria-hidden","true"),e.innerHTML='',e.addEventListener("click",s),e}(),h.appendChild(m),document.body.appendChild(h);const e=n.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,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r);const u=new Map;let p,m,h,f=!1,g=-1,b=300;const v=n.debounce((()=>{g=-1}),50);t.setup=c,t.add=function(e,t,i){c();const n=document.createElement("div");n.className="pageActionButton",n.dataset.name=e,n.setAttribute("aria-hidden","true"),t.classList.add("button"),t.classList.add("buttonPrimary"),n.appendChild(t);let o=null;i&&(o=u.get(i)||null,o&&(o=o.parentElement)),!o&&p.childElementCount&&(o=p.children[0]),o||(o=p.firstChild),p.insertBefore(n,o),h.classList.remove("scrolledDown"),u.set(e,t),n.offsetParent,n.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 i=t.parentElement,o=()=>{try{n.stringToBool(i.getAttribute("aria-hidden"))&&(p.removeChild(i),u.delete(e)),i.removeEventListener("transitionend",o)}catch(e){}};i.addEventListener("transitionend",o),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"),h.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,i,n,o,r,a,s){"use strict";n=i.__importStar(n),o=i.__importDefault(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__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=n.childByTag(this.container,"NAV");if(null===e)return!1;const t=e.querySelectorAll("li");if(0===t.length)return!1;n.childrenByTag(this.container,"DIV").forEach((e=>{let t=e.dataset.name;t||(t=o.default.identify(e),e.dataset.name=t),this.containers.set(t,e)}));const i=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: '"+i+"') exists more than once.");const n=this.containers.get(t);if(void 0===n)throw new Error("Expected content element for li[data-name='"+t+"'] (tab menu id: '"+i+"').");if(n.parentNode!==this.container)throw new Error("Expected content element '"+t+"' (tab menu id: '"+i+"') 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: '"+i+"').");this.tabs.set(t,e)})),!this.tabs.size)throw new Error("Expected at least one tab (tab menu id: '"+i+"').");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 i;if(""!==t&&(i=this.tabs.get(t),i)){const t=this.container.parentElement;t?.classList.contains("tabMenuContainer")&&(e=this.container)}if(!i){let e=this.container.dataset.preselect||this.container.dataset.active;"true"!==e&&e||(e=!0),!0===e?this.tabs.forEach((function(e){i||o.default.isHidden(e)||e.previousElementSibling&&!o.default.isHidden(e.previousElementSibling)||(i=e)})):"string"==typeof e&&"false"!==e&&(i=this.tabs.get(e))}i&&(this.containers.forEach((e=>{e.classList.add("hidden")})),this.select(null,i,!0));const n=this.container.dataset.store;if(n){const e=document.createElement("input");e.type="hidden",e.name=n,e.value=this.getActiveTab().dataset.name||"",this.container.appendChild(e),this.store=e}return e}select(t,n,o){if(t=t?t.toString():"",!(n=n||this.tabs.get(t))){if(~~t==+t){t=~~t;let e=0;this.tabs.forEach((i=>{e===t&&(n=i),e++}))}if(!n)throw new Error(`Expected a valid tab name, '${t}' given (tab menu id: '${this.container.id}').`)}t=t||n.dataset.name||"";const r=this.getActiveTab();let c=null;if(r){const e=r.dataset.name;if(e===t)return;o||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"))}n.classList.add("active");const d=this.containers.get(t);if(d.classList.add("active"),d.classList.remove("hidden"),this.isLegacy&&(n.classList.add("ui-state-active"),d.classList.add("ui-state-active")),this.store&&(this.store.value=t),!o){a.fire("com.woltlab.wcf.simpleTabMenu_"+this.container.id,"select",{active:n,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(n),oldTab:e(r),newPanel:e(d),oldPanel:e(c)});let i=window.location.href.replace(/#+[^#]*$/,"");l.getIdentifierFromHash()===t?i+=window.location.hash:i+="#"+t,window.history.replaceState(void 0,"",i)}s.default.execute(),new Promise(((t,i)=>{e(["../TabMenu"],t,i)})).then(i.__importStar).then((e=>{e.scrollToTab(n)}))}selectFirstVisible(){let e=null;return this.tabs.forEach((t=>{e||o.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 i=e.children[0];/#([^#]+)$/.exec(i.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,i,n){"use strict";function o(){null!==l&&window.clearTimeout(l),l=window.setTimeout((()=>{for(const e of a)e();window.removeEventListener("scroll",o),a=[],r=void 0,l=null}),100)}Object.defineProperty(t,"__esModule",{value:!0}),t.element=void 0,n=i.__importDefault(n);let r,a=[],s=null,l=null;t.element=function(e,t,i="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",o);let l=n.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:i}),window.setTimeout((()=>{c===window.pageYOffset&&o()}),100)}})),define("WoltLabSuite/Core/Ui/TabMenu",["require","exports","tslib","../Dom/Change/Listener","../Dom/Util","./TabMenu/Simple","./CloseOverlay","./Screen","./Scroll"],(function(e,t,i,n,o,r,a,s,l){"use strict";function c(){document.querySelectorAll(".tabMenuContainer:not(.staticTabMenuContainer)").forEach((e=>{const t=o.default.identify(e);if(_.has(t))return;let i=new r.default(e);if(!i.validate())return;const n=i.init();if(_.set(t,i),n instanceof HTMLElement){const e=f(n.parentNode.id);e&&(i=e,i.select(n.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(){i=null,h(e)}let i=null;e.querySelector("ul").addEventListener("scroll",(()=>{null!==i&&window.clearTimeout(i),i=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 i of e.querySelectorAll("input, select, textarea"))if(!i.checkValidity()){t.preventDefault();const e=f(i.closest(".tabMenuContainer").id),n=i.closest(".tabMenuContent");return e.select(n.dataset.name||""),void l.element(i,(()=>{i.reportValidity()}))}}))}}))}function d(){_.forEach((e=>{let t=!1;e.getContainers().forEach((i=>{t||null===i.querySelector(".formError")||(t=!0,e.select(i.id))}))}))}function u(e){v=!0,_.forEach((t=>{const i=t.getActiveTab();e?h(i.closest(".menu, .tabMenu")):g(i)}))}function p(){v=!1}function m(e,t,i,n,o,r){(r||t>0)&&(t-=15),i!==(t=t<0?0:Math.min(t,n-o))&&(e.classList.add("enableAnimation"),i{e.classList.remove("enableAnimation"),e.firstElementChild.style.removeProperty("margin-left"),e.style.removeProperty("padding-left"),e.scrollLeft=t}),300))}function h(e){if(!v)return;const t=e.clientWidth,i=e.querySelector("ul"),n=i.scrollLeft,o=i.scrollWidth,r=n>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=i.clientWidth;m(i,i.scrollLeft-~~(e/2),i.scrollLeft,i.scrollWidth,e,!1)})),e.insertBefore(a,e.firstChild)),a.classList.add("active")):null!==a&&a.classList.remove("active");const s=t+n',l.className="tabMenuOverlayRight",l.addEventListener("click",(()=>{const e=i.clientWidth;m(i,i.scrollLeft+~~(e/2),i.scrollLeft,i.scrollWidth,e,!1)})),e.appendChild(l)),l.classList.add("active")):null!==l&&l.classList.remove("active")}function f(e){return _.get(e)}function g(e){if(!v)return;const t=e.closest("ul"),i=t.clientWidth,n=t.scrollLeft,o=t.scrollWidth;if(i===o)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")&&_.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 i=t.parentNode;let n=i.offsetTop-50;if(n<0&&(n=0),e>n){let e=o.default.offset(i).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,i,n,o,r,a){"use strict";function s(e){const t=e.currentTarget;let i=t.title.trim();""!==i&&(t.dataset.tooltip=i,t.setAttribute("aria-label",i),t.removeAttribute("title")),i=t.dataset.tooltip||"",d.style.removeProperty("top"),d.style.removeProperty("left"),i.length?(d.classList.add("active"),c.textContent=i,a.set(d,t,{horizontal:"center",verticalOffset:4,vertical:"top"})):d.classList.remove("active")}function l(){d.classList.remove("active")}let c,d;Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),a=i.__importStar(a),t.setup=function(){"desktop"===n.platform()&&(d=document.createElement("div"),d.id="balloonTooltip",d.classList.add("balloonTooltip"),d.addEventListener("transitionend",(()=>{d.classList.contains("active")||["bottom","left","right","top"].forEach((e=>{d.style.removeProperty(e)}))})),c=document.createElement("span"),c.id="balloonTooltipText",d.appendChild(c),(0,o.getPageOverlayContainer)().append(d),(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,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importDefault(o);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 i=e.dataset.link;t=i?e=>{window.location.href=i.replace(/pageNo=%d/,`pageNo=${e}`)}:()=>{}}this.elements.has(e)||e.querySelectorAll(".jumpTo").forEach((i=>{i.addEventListener("click",(t=>this.click(e,t))),this.elements.set(e,t)}))}click(e,t){t.preventDefault(),this.activeElement=e,o.default.open(this);const i=e.dataset.pages||"0";this.input.value=i,this.input.max=i,this.input.select(),this.description.textContent=n.get("wcf.page.jumpTo.description").replace(/#pages#/,i)}_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),o.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:n.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,i,n,o){"use strict";function r(){document.querySelectorAll("input[type=password]").forEach((e=>{s.has(e)||function(e){s.add(e);const t=document.activeElement,i=document.createElement("div");i.classList.add("inputAddon"),e.insertAdjacentElement("beforebegin",i),i.appendChild(e);const n=document.createElement("button");n.type="button",n.title=o.get("wcf.global.form.password.button.show"),n.classList.add("button","inputSuffix","jsTooltip"),n.setAttribute("aria-hidden","true"),i.appendChild(n);const r=document.createElement("fa-icon");r.setIcon("eye"),n.appendChild(r),n.addEventListener("click",(()=>{a(e,n,r)})),e.form?.addEventListener("submit",(()=>{"password"!==e.type&&a(e,n,r)})),t===e&&e.focus()}(e)}))}function a(e,t,i){"password"===e.type?(i.setIcon("eye-slash"),t.dataset.tooltip=o.get("wcf.global.form.password.button.hide"),e.type="text"):(i.setIcon("eye"),t.dataset.tooltip=o.get("wcf.global.form.password.button.show"),e.type="password")}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n),o=i.__importStar(o);const s=new WeakSet;t.setup=function(){r(),n.default.add("WoltLabSuite/Core/Ui/Password",(()=>r()))}})),define("WoltLabSuite/Core/Ui/Empty",["require","exports","tslib","../Dom/Change/Listener"],(function(e,t,i,n){"use strict";function o(){document.querySelectorAll(".jsReloadPageWhenEmpty").forEach((e=>{e.classList.remove("jsReloadPageWhenEmpty"),r.observe(e,{childList:!0})}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n);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(){o(),n.default.add("WoltLabSuite/Core/Ui/Empty",(()=>o()))}})),define("WoltLabSuite/Core/Ui/Confirmation",["require","exports","tslib","../Core","../Language","./Dialog"],(function(e,t,i,n,o,r){"use strict";function a(){return l||(l=new s),l}Object.defineProperty(t,"__esModule",{value:!0}),t.getContentElement=t.show=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__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=o.get("wcf.global.confirmation.confirm"),e.appendChild(this.confirmButton);const t=document.createElement("button");t.type="button",t.classList.add("button"),t.textContent=o.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:o.get("wcf.global.confirmation.title")}}}_dialogSubmit(){this._confirm()}}let l;t.show=function(e){if(!a().active){if((e=n.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,i,n,o,r,a,s,l){"use strict";function c(){document.querySelectorAll(`${d} ${u} ${p}`).forEach((e=>{m.has(e)||(e.addEventListener("click",(e=>function(e){function t(){n.apiOnce({data:{actionName:l,className:c,objectIDs:[p],parameters:m},success:e=>function(e,t){"reload"===e.dataset.objectActionSuccess?window.location.reload():o.fire("WoltLabSuite/Core/Ui/Object/Action",e.dataset.objectAction,{containerElement:e.closest(d),data:t,objectElement:e.closest(u)})}(i,e)})}e.preventDefault();const i=e.currentTarget,l=i.dataset.objectAction;let c=i.closest(d).dataset.objectActionClassName;i.dataset.objectActionClassName&&(c=i.dataset.objectActionClassName);let p=i.closest(u).dataset.objectId;i.dataset.objectId&&(p=i.dataset.objectId);const m={};Object.entries(i.dataset).forEach((([e,t])=>{let i=/^objectActionParameterData(.+)/.exec(e);if(i)Object.prototype.hasOwnProperty.call(m,"data")||(m.data={}),m.data[s.lcfirst(i[1])]=t;else if(i=/^objectActionParameter(.+)/.exec(e),i){const e=s.lcfirst(i[1]);if("data"===e)throw new Error("Additional object action parameters may not use 'data' as key.");m[e]=t}})),i.dataset.confirmMessage?r.show({confirm:t,message:a.get(i.dataset.confirmMessage),messageIsHtml:!0}):t()}(e))),m.add(e))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),l=i.__importDefault(l);const d=".jsObjectActionContainer[data-object-action-class-name]",u=".jsObjectActionObject[data-object-id]",p=".jsObjectAction[data-object-action]",m=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,i,n,o,r,a,s,l,c,d,u,p){"use strict";function m(){return f||(f=new h),f}Object.defineProperty(t,"__esModule",{value:!0}),t.unmark=t.showEditor=t.hideEditor=t.reload=t.setup=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importDefault(d),u=i.__importStar(u),p=i.__importStar(p);class h{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 i=this.containers.get(t);if(void 0===i){const n=e.querySelector(".jsClipboardMarkAll");null!==n&&(n.dataset.containerId=t,n.addEventListener("click",(e=>this.markAll(e)))),i={checkboxes:e.getElementsByClassName("jsClipboardItem"),element:e,markAll:n,markedObjectIds:new Set},this.containers.set(t,i)}Array.from(i.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(){n.api(this,{actionName:"getMarkedItems",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId}})}markAll(e){const t=e.currentTarget,i="INPUT"!==t.nodeName||t.checked;this.setParentAsMarked(t,i);const n=[],o=t.dataset.containerId,r=this.containers.get(o),a=r.element.dataset.type;Array.from(r.checkboxes).forEach((e=>{const o=~~e.dataset.objectId;i?e.checked||(e.checked=!0,r.markedObjectIds.add(o),n.push(o)):e.checked&&(e.checked=!1,r.markedObjectIds.delete(o),n.push(o)),this.setParentAsMarked(e,i);const a=t.closest(".jsClipboardObject");null!==a&&(i?a.classList.add("jsMarked"):a.classList.remove("jsMarked"))})),this.saveState(a,n,i)}mark(e){const t=e instanceof Event?e.currentTarget:e,i=~~t.dataset.objectId,n=t.checked,o=t.dataset.containerId,r=this.containers.get(o),a=r.element.dataset.type,s=t.closest(".jsClipboardObject");n?(r.markedObjectIds.add(i),s.classList.add("jsMarked")):(r.markedObjectIds.delete(i),s.classList.remove("jsMarked")),null!==r.markAll&&(r.markAll.checked=!Array.from(r.checkboxes).some((e=>!e.checked)),this.setParentAsMarked(r.markAll,n)),this.setParentAsMarked(t,t.checked),this.saveState(a,[i],n)}saveState(e,t,i){n.api(this,{actionName:i?"mark":"unmark",parameters:{pageClassNames:this.pageClassNames,pageObjectID:this.pageObjectId,objectIDs:t,objectType:e}})}executeAction(e){function t(){const e=i.dataset.type;s.fire("com.woltlab.wcf.clipboard",e,{data:n,listItem:i,responseData:null})}const i=e.currentTarget,n=this.itemData.get(i);if(n.url)return void(window.location.href=n.url);const r="string"==typeof n.internalData.confirmMessage?n.internalData.confirmMessage:"";let a=!0;if(o.isPlainObject(n.parameters)&&n.parameters.actionName&&n.parameters.className){if("unmarkAll"===n.parameters.actionName||Array.isArray(n.parameters.objectIDs))if(r.length){const e="string"==typeof n.internalData.template?n.internalData.template:"";c.show({confirm:()=>{const t={};e.length&&c.getContentElement().querySelectorAll("input, select, textarea").forEach((e=>{const i=e.name;switch(e.nodeName){case"INPUT":("checkbox"!==e.type&&"radio"!==e.type||e.checked)&&(t[i]=e.value);break;case"SELECT":t[i]=e.value;break;case"TEXTAREA":t[i]=e.value.trim()}})),this.executeProxyAction(i,n,t)},message:r,template:e})}else this.executeProxyAction(i,n)}else r.length&&(a=!1,c.show({confirm:t,message:r}));a&&t()}executeProxyAction(e,t,i={}){const r="unmarkAll"!==t.parameters.actionName?t.parameters.objectIDs:[],a={data:i};o.isPlainObject(t.internalData.parameters)&&Object.entries(t.internalData.parameters).forEach((([e,t])=>{a[e]=t})),n.api(this,{actionName:t.parameters.actionName,className:t.parameters.className,objectIDs:r,parameters:a},(i=>{if("unmarkAll"!==t.actionName){const n=e.dataset.type;s.fire("com.woltlab.wcf.clipboard",n,{data:t,listItem:e,responseData:i});const o=this.reloadPageOnSuccess.get(n);if(o&&o.includes(i.actionName))return void window.location.reload()}this.loadMarkedItems()}))}unmarkAll(e){const t=e.currentTarget;n.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=o.isPlainObject(e.returnValues.markedItems)?e.returnValues.markedItems:{};this.containers.forEach((e=>{const i=e.element.dataset.type,n=Array.isArray(t[i])?t[i]:[];this.rebuildMarkings(e,n)}));const i=Object.keys(e.returnValues.items||{});this.editors.forEach(((e,t)=>{i.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 n=!1,o=this.editors.get(e),r=this.editorDropdowns.get(e);void 0===o?(n=!0,o=document.createElement("a"),o.className="dropdownToggle",o.textContent=t.label,this.editors.set(e,o),r=document.createElement("ol"),r.className="dropdownMenu",this.editorDropdowns.set(e,r)):(o.textContent=t.label,r.innerHTML=""),Object.values(t.items).forEach((t=>{const i=document.createElement("li"),n=document.createElement("span");n.textContent=t.label,i.appendChild(n),r.appendChild(i),i.dataset.type=e,i.addEventListener("click",(e=>this.executeAction(e))),this.itemData.set(i,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!==i.indexOf(e)){const t=`wcfClipboard-${e}`;u.has(t)?u.show(t):(u.add(t,o),n=!0)}if(n){const e=o.parentElement;e.classList.add("dropdown"),e.appendChild(r),d.default.init(o)}}))}rebuildMarkings(e,t){let i=!0;if(Array.from(e.checkboxes).forEach((e=>{const n=e.closest(".jsClipboardObject"),o=t.includes(~~e.dataset.objectId);o||(i=!1),e.checked=o,o?n.classList.add("jsMarked"):n.classList.remove("jsMarked"),this.setParentAsMarked(e,o)})),null!==e.markAll){e.markAll.checked=i,this.setParentAsMarked(e.markAll,i);const t=e.markAll.closest(".columnMark")?.parentNode;t&&(i?t.classList.add("jsMarked"):t.classList.remove("jsMarked"))}}setParentAsMarked(e,t){const i=e.parentElement;"checkbox"===i.getAttribute("role")&&i.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){m().setup(e)},t.reload=function(){m().reload()},t.hideEditor=function(e){m().hideEditor(e)},t.showEditor=function(){m().showEditor()},t.unmark=function(e,t){m().unmark(e,t)}})),define("WoltLabSuite/Core/Ui/Object/Action/Handler",["require","exports","tslib","../../../Event/Handler","../../../Controller/Clipboard"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n=i.__importStar(n),o=i.__importStar(o),t.default=class{objectAction;constructor(e,t,i){this.objectAction=i,n.add("WoltLabSuite/Core/Ui/Object/Action",e,(e=>this.handleObjectAction(e))),document.querySelectorAll(".jsClipboardContainer[data-type]").forEach((e=>{n.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 i=t.dataset.objectId;e.responseData.objectIDs.forEach((n=>{~~n==~~i&&this.objectAction({containerElement:t.closest(".jsObjectActionContainer"),data:e.responseData,objectElement:t})}))}))}handleObjectAction(e){this.objectAction(e),o.reload()}}})),define("WoltLabSuite/Core/Ui/Object/Action/Delete",["require","exports","tslib","./Handler"],(function(e,t,i,n){"use strict";function o(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="delete"]');if(!t||t.dataset.objectActionHandler)return;const i=e.objectElement.querySelector(".jsObjectActionObjectChildren");i&&Array.from(i.children).forEach((t=>{e.objectElement.insertAdjacentElement("beforebegin",t)})),e.objectElement.remove()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n),t.setup=function(){new n.default("delete",["delete"],o)}})),define("WoltLabSuite/Core/Ui/Object/Action/Toggle",["require","exports","tslib","../../../Language","./Handler"],(function(e,t,i,n,o){"use strict";function r(e){const t=e.objectElement.querySelector('.jsObjectAction[data-object-action="toggle"]');if(!t||t.dataset.objectActionHandler)return;const i="FA-ICON"===t.nodeName?t:t.querySelector("fa-icon");if(i)if("square"===i.name){i.setIcon("square-check");const e=t.dataset.disableTitle||n.get("wcf.global.button.disable");t.title=e}else{i.setIcon("square");const e=t.dataset.enableTitle||n.get("wcf.global.button.enable");t.title=e}}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importStar(n),o=i.__importDefault(o),t.setup=function(){new o.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,i,n,o,r,a,s,l,c){"use strict";function d(){r.default.execute(r.Origin.Search),h.classList.add("searchBarOpen"),w?.parentElement.classList.add("open"),m||o.set(g,_,{horizontal:"right"}),g.style.setProperty("top",`${f.clientHeight}px`,""),v.focus(),window.setTimeout((()=>{const e=v.value.length;v.selectionStart=e,v.selectionEnd=e}),1)}function u(){if(!h.classList.contains("searchBarOpen")&&!g.classList.contains("open"))return;h.classList.remove("searchBarOpen"),g.classList.remove("open"),w?.parentElement.classList.remove("open"),["bottom","left","right","top"].forEach((e=>{g.style.removeProperty(e)})),"ios"===l.platform()&&(s.scrollEnable(),void 0!==p&&(document.body.scrollTop=p,p=void 0)),m&&v.blur();const e=document.getElementById("pageHeaderSearchMobile");e&&(e.setAttribute("aria-expanded","false"),e.querySelector("fa-icon").setIcon("magnifying-glass"));const t=g.querySelector(".pageHeaderSearchType");a.default.close(t.id)}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l);let p,m=!1;document.body.classList.contains("wcfAcp");const h=document.getElementById("pageHeader"),f=document.getElementById("pageHeaderPanel"),g=document.getElementById("pageHeaderSearch");let b;const v=document.getElementById("pageHeaderSearchInput"),_=document.getElementById("topMenu"),w=document.getElementById("userPanelSearchButton");t.init=function(){null!==g&&(function(){g.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)})),w?.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),h.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(v.parentElement.id===t)return}u(),b?.setAttribute("aria-expanded","false")}}))}(),s.on("screen-md-down",{match(){m=!0},unmatch(){m=!1,p=void 0},setup(){m=!0,function(){const e=document.getElementById("pageHeaderSearchMobile");b=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(),g.style.setProperty("top",`${h.offsetHeight}px`,""),g.classList.add("open"),v.focus(),"ios"===l.platform()&&(document.body.scrollTop=0),e.setAttribute("aria-expanded","true"),e.querySelector("fa-icon").setIcon("xmark"))})),g.addEventListener("click",(e=>{e.stopPropagation(),e.target===g&&(e.preventDefault(),u())}))}()}}),n.add("com.woltlab.wcf.Search","close",(()=>u())))}})),define("WoltLabSuite/Core/LazyLoader",["require","exports"],(function(e,t){"use strict";function i(e){void 0!==r.get(e)&&window.cancelAnimationFrame(r.get(e)),r.set(e,window.requestAnimationFrame((()=>{for(const t of o.keys())if(e.matches(t)||null!==e.querySelector(t)){for(const e of o.get(t))a.then((()=>e()));o.delete(t)}r.delete(e)})))}let n;Object.defineProperty(t,"__esModule",{value:!0}),t.whenFirstSeen=void 0;const o=new Map,r=new Map,a=new Promise((e=>{"loading"===document.readyState?document.addEventListener("readystatechange",(()=>e()),{once:!0}):e()}));t.whenFirstSeen=function(e,t){o.has(e)||o.set(e,[]),o.get(e).push(t),i(document.body),void 0===n&&(n=new MutationObserver((e=>{if(0!==o.size)for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&i(e)}))),n.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 i,n;for(i in t)"number"==typeof(n=t[i])&&(n+="px"),e.style[i]=n;return e}function i(e){var t=document.createElement("div");return t.className=e,t}function n(e,t){if(!v)throw new Error("No element matching method supported");return v.call(e,t)}function o(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 n(e,t)}))}function a(e,t){var i=e.element.classList,n=_.state.scrolling(t);i.contains(n)?clearTimeout(w[t]):i.add(n)}function s(e,t){w[t]=setTimeout((function(){return e.isAlive&&e.element.classList.remove(_.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,i,n,o){var r;if(void 0===n&&(n=!0),void 0===o&&(o=!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,i,n,o){var r,c=i[0],d=i[1],u=i[2],p=i[3],m=i[4],h=i[5];void 0===n&&(n=!0),void 0===o&&(o=!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-"+m)):t>0&&r.dispatchEvent(l("ps-scroll-"+h)),n&&function(e,t){a(e,t),s(e,t)}(e,p)),e.reach[p]&&(t||o)&&r.dispatchEvent(l("ps-"+p+"-reach-"+e.reach[p]))}(e,i,r,n,o)}function d(e){return parseInt(e,10)||0}function u(e){var i=e.element,n=Math.floor(i.scrollTop),a=i.getBoundingClientRect();e.containerWidth=Math.round(a.width),e.containerHeight=Math.round(a.height),e.contentWidth=i.scrollWidth,e.contentHeight=i.scrollHeight,i.contains(e.scrollbarXRail)||(r(i,_.element.rail("x")).forEach((function(e){return o(e)})),i.appendChild(e.scrollbarXRail)),i.contains(e.scrollbarYRail)||(r(i,_.element.rail("y")).forEach((function(e){return o(e)})),i.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,i){var n,o={width:i.railXWidth},r=Math.floor(e.scrollTop);i.isRtl?o.left=i.negativeScrollAdjustment+e.scrollLeft+i.containerWidth-i.contentWidth:o.left=e.scrollLeft,i.isScrollbarXUsingBottom?o.bottom=i.scrollbarXBottom-r:o.top=i.scrollbarXTop+r,t(i.scrollbarXRail,o),n={top:r,height:i.railYHeight},i.isScrollbarYUsingRight?i.isRtl?n.right=i.contentWidth-(i.negativeScrollAdjustment+e.scrollLeft)-i.scrollbarYRight-i.scrollbarYOuterWidth-9:n.right=i.scrollbarYRight-e.scrollLeft:i.isRtl?n.left=i.negativeScrollAdjustment+e.scrollLeft+2*i.containerWidth-i.contentWidth-i.scrollbarYLeft-i.scrollbarYOuterWidth:n.left=i.scrollbarYLeft+e.scrollLeft,t(i.scrollbarYRail,n),t(i.scrollbarX,{left:i.scrollbarXLeft,width:i.scrollbarXWidth-i.railBorderXWidth}),t(i.scrollbarY,{top:i.scrollbarYTop,height:i.scrollbarYHeight-i.railBorderYWidth})}(i,e),e.scrollbarXActive?i.classList.add(_.state.active("x")):(i.classList.remove(_.state.active("x")),e.scrollbarXWidth=0,e.scrollbarXLeft=0,i.scrollLeft=!0===e.isRtl?e.contentWidth:0),e.scrollbarYActive?i.classList.add(_.state.active("y")):(i.classList.remove(_.state.active("y")),e.scrollbarYHeight=0,e.scrollbarYTop=0,i.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 m(e,t){function i(t){t.touches&&t.touches[0]&&(t[c]=t.touches[0].pageY),b[h]=v+y*(t[c]-w),a(e,f),u(e),t.stopPropagation(),t.type.startsWith("touch")&&t.changedTouches.length>1&&t.preventDefault()}function n(){s(e,f),e[g].classList.remove(_.state.clicking),e.event.unbind(e.ownerDocument,"mousemove",i)}function o(t,o){v=b[h],o&&t.touches&&(t[c]=t.touches[0].pageY),w=t[c],y=(e[l]-e[r])/(e[d]-e[m]),o?e.event.bind(e.ownerDocument,"touchmove",i):(e.event.bind(e.ownerDocument,"mousemove",i),e.event.once(e.ownerDocument,"mouseup",n),t.preventDefault()),e[g].classList.add(_.state.clicking),t.stopPropagation()}var r=t[0],l=t[1],c=t[2],d=t[3],p=t[4],m=t[5],h=t[6],f=t[7],g=t[8],b=e.element,v=null,w=null,y=null;e.event.bind(e[p],"mousedown",(function(e){o(e)})),e.event.bind(e[p],"touchstart",(function(e){o(e,!0)}))}var h,f,g,b,v="undefined"!=typeof Element&&(Element.prototype.matches||Element.prototype.webkitMatchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector),_={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}}},w={x:null,y:null},y=function(e){this.element=e,this.handlers={}},E={isEmpty:{configurable:!0}};return y.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})},y.prototype.unbind=function(e,t){var i=this;this.handlers[e]=this.handlers[e].filter((function(n){return!(!t||n===t)||(i.element.removeEventListener(e,n,!1),!1)}))},y.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(y.prototype,E),(h=function(){this.eventElements=[]}).prototype.eventElement=function(e){var t=this.eventElements.filter((function(t){return t.element===e}))[0];return t||(t=new y(e),this.eventElements.push(t)),t},h.prototype.bind=function(e,t,i){this.eventElement(e).bind(t,i)},h.prototype.unbind=function(e,t,i){var n=this.eventElement(e);n.unbind(t,i),n.isEmpty&&this.eventElements.splice(this.eventElements.indexOf(n),1)},h.prototype.unbindAll=function(){this.eventElements.forEach((function(e){return e.unbindAll()})),this.eventElements=[]},h.prototype.once=function(e,t,i){var n=this.eventElement(e),o=function(e){n.unbind(t,o),i(e)};n.bind(t,o)},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 i=t.pageY-window.pageYOffset-e.scrollbarYRail.getBoundingClientRect().top>e.scrollbarYTop?1:-1;e.element.scrollTop+=i*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 i=t.pageX-window.pageXOffset-e.scrollbarXRail.getBoundingClientRect().left>e.scrollbarXLeft?1:-1;e.element.scrollLeft+=i*e.containerWidth,u(e),t.stopPropagation()}))},"drag-thumb":function(e){m(e,["containerWidth","contentWidth","pageX","railXWidth","scrollbarX","scrollbarXWidth","scrollLeft","x","scrollbarXRail"]),m(e,["containerHeight","contentHeight","pageY","railYHeight","scrollbarY","scrollbarYHeight","scrollTop","y","scrollbarYRail"])},keyboard:function(e){var t=e.element;e.event.bind(e.ownerDocument,"keydown",(function(i){var o,r,a,s;if(!(i.isDefaultPrevented&&i.isDefaultPrevented()||i.defaultPrevented)&&(n(t,":hover")||n(e.scrollbarX,":focus")||n(e.scrollbarY,":focus"))){if(o=document.activeElement?document.activeElement:e.ownerDocument.activeElement){if("IFRAME"===o.tagName)o=o.contentDocument.activeElement;else for(;o.shadowRoot;)o=o.shadowRoot.activeElement;if(n(s=o,"input,[contenteditable]")||n(s,"select,[contenteditable]")||n(s,"textarea,[contenteditable]")||n(s,"button,[contenteditable]"))return}switch(r=0,a=0,i.which){case 37:r=i.metaKey?-e.contentWidth:i.altKey?-e.containerWidth:-30;break;case 38:a=i.metaKey?e.contentHeight:i.altKey?e.containerHeight:30;break;case 39:r=i.metaKey?e.contentWidth:i.altKey?e.containerWidth:30;break;case 40:a=i.metaKey?-e.contentHeight:i.altKey?-e.containerHeight:-30;break;case 32:a=i.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(i,n){var o,r=Math.floor(t.scrollTop);if(0===i){if(!e.scrollbarYActive)return!1;if(0===r&&n>0||r>=e.contentHeight-e.containerHeight&&n<0)return!e.settings.wheelPropagation}if(o=t.scrollLeft,0===n){if(!e.scrollbarXActive)return!1;if(0===o&&i<0||o>=e.contentWidth-e.containerWidth&&i>0)return!e.settings.wheelPropagation}return!0}(r,a)&&i.preventDefault())}}))},wheel:function(t){function i(i){var o,r=function(e){var t=e.deltaX,i=-1*e.deltaY;return void 0!==t&&void 0!==i||(t=-1*e.wheelDeltaX/6,i=e.wheelDeltaY/6),e.deltaMode&&1===e.deltaMode&&(t*=10,i*=10),t!=t&&i!=i&&(t=0,i=e.wheelDelta),e.shiftKey?[-i,-t]:[t,i]}(i),a=r[0],s=r[1];(function(t,i,o){var r,a,s,l;if(!f.isWebKit&&n.querySelector("select:focus"))return!0;if(!n.contains(t))return!1;for(r=t;r&&r!==n;){if(r.classList.contains(_.element.consuming))return!0;if(a=e(r),o&&a.overflowY.match(/(scroll|auto)/)&&(s=r.scrollHeight-r.clientHeight)>0&&(r.scrollTop>0&&o<0||r.scrollTop0))return!0;if(i&&a.overflowX.match(/(scroll|auto)/)&&(l=r.scrollWidth-r.clientWidth)>0&&(r.scrollLeft>0&&i<0||r.scrollLeft0))return!0;r=r.parentNode}return!1})(i.target,a,s)||(o=!1,t.settings.useBothWheelAxes?t.scrollbarYActive&&!t.scrollbarXActive?(s?n.scrollTop-=s*t.settings.wheelSpeed:n.scrollTop+=a*t.settings.wheelSpeed,o=!0):t.scrollbarXActive&&!t.scrollbarYActive&&(a?n.scrollLeft+=a*t.settings.wheelSpeed:n.scrollLeft-=s*t.settings.wheelSpeed,o=!0):(n.scrollTop-=s*t.settings.wheelSpeed,n.scrollLeft+=a*t.settings.wheelSpeed),u(t),o=o||function(e,i){var o=Math.floor(n.scrollTop),r=0===n.scrollTop,a=o+n.offsetHeight===n.scrollHeight,s=0===n.scrollLeft,l=n.scrollLeft+n.offsetWidth===n.scrollWidth;return!(Math.abs(i)>=Math.abs(e)?r&&i>0||a&&i<0:s&&e>0||l&&e<0)||!t.settings.wheelPropagation}(a,s),o&&!i.ctrlKey&&(i.stopPropagation(),i.preventDefault()))}var n=t.element;void 0!==window.onwheel?t.event.bind(n,"wheel",i):void 0!==window.onmousewheel&&t.event.bind(n,"mousewheel",i)},touch:function(t){function i(e,i){l.scrollTop-=i,l.scrollLeft-=e,u(t)}function n(e){return e.targetTouches?e.targetTouches[0]:e}function o(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(o(e)){var t=n(e);c.pageX=t.pageX,c.pageY=t.pageY,d=(new Date).getTime(),null!==m&&clearInterval(m)}}function a(r){var a,s,u,m,h,g;if(o(r)){if(u=(s={pageX:(a=n(r)).pageX,pageY:a.pageY}).pageX-c.pageX,m=s.pageY-c.pageY,function(t,i,n){var o,r,a,s;if(!l.contains(t))return!1;for(o=t;o&&o!==l;){if(o.classList.contains(_.element.consuming))return!0;if(r=e(o),n&&r.overflowY.match(/(scroll|auto)/)&&(a=o.scrollHeight-o.clientHeight)>0&&(o.scrollTop>0&&n<0||o.scrollTop0))return!0;if(i&&r.overflowX.match(/(scroll|auto)/)&&(s=o.scrollWidth-o.clientWidth)>0&&(o.scrollLeft>0&&i<0||o.scrollLeft0))return!0;o=o.parentNode}return!1}(r.target,u,m))return;i(u,m),c=s,(g=(h=(new Date).getTime())-d)>0&&(p.x=u/g,p.y=m/g,d=h),function(e,i){var n=Math.floor(l.scrollTop),o=l.scrollLeft,r=Math.abs(e),a=Math.abs(i);if(a>r){if(i<0&&n===t.contentHeight-t.containerHeight||i>0&&0===n)return 0===window.scrollY&&i>0&&f.isChrome}else if(r>a&&(e<0&&o===t.contentWidth-t.containerWidth||e>0&&0===o))return!0;return!0}(u,m)&&r.preventDefault()}}function s(){t.settings.swipeEasing&&(clearInterval(m),m=setInterval((function(){t.isInitialized?clearInterval(m):p.x||p.y?Math.abs(p.x)<.01&&Math.abs(p.y)<.01?clearInterval(m):t.element?(i(30*p.x,30*p.y),p.x*=.8,p.y*=.8):clearInterval(m):clearInterval(m)}),10))}var l,c,d,p,m;(f.supportsTouch||f.supportsIePointer)&&(l=t.element,c={},d=0,p={},m=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(n,o){var r,a,s,l,c,p,m,f=this;if(void 0===o&&(o={}),"string"==typeof n&&(n=document.querySelector(n)),!n||!n.nodeName)throw new Error("no element is specified to initialize PerfectScrollbar");for(r in this.element=n,n.classList.add(_.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},o)this.settings[r]=o[r];this.containerWidth=null,this.containerHeight=null,this.contentWidth=null,this.contentHeight=null,a=function(){return n.classList.add(_.state.focus)},s=function(){return n.classList.remove(_.state.focus)},this.isRtl="rtl"===e(n).direction,!0===this.isRtl&&n.classList.add(_.rtl),this.isNegativeScroll=(p=n.scrollLeft,null,n.scrollLeft=-1,m=n.scrollLeft<0,n.scrollLeft=p,m),this.negativeScrollAdjustment=this.isNegativeScroll?n.scrollWidth-n.clientWidth:0,this.event=new h,this.ownerDocument=n.ownerDocument||document,this.scrollbarXRail=i(_.element.rail("x")),n.appendChild(this.scrollbarXRail),this.scrollbarX=i(_.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=i(_.element.rail("y")),n.appendChild(this.scrollbarYRail),this.scrollbarY=i(_.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 i=e(t);return d(i.width)+d(i.paddingLeft)+d(i.paddingRight)+d(i.borderLeftWidth)+d(i.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:n.scrollLeft<=0?"start":n.scrollLeft>=this.contentWidth-this.containerWidth?"end":null,y:n.scrollTop<=0?"start":n.scrollTop>=this.contentHeight-this.containerHeight?"end":null},this.isAlive=!0,this.settings.handlers.forEach((function(e){return g[e](f)})),this.lastScrollTop=Math.floor(n.scrollTop),this.lastScrollLeft=n.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(),o(this.scrollbarX),o(this.scrollbarY),o(this.scrollbarXRail),o(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,i,n,o,r,a,s,l,c,d,u,p,m,h,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,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importStar(l),c=i.__importStar(c),d=i.__importStar(d),u=i.__importDefault(u),p=i.__importDefault(p),m=i.__importStar(m),h=i.__importStar(h),f=i.__importStar(f),g=i.__importStar(g),b=i.__importStar(b),v=i.__importStar(v),_=i.__importStar(_),w=i.__importStar(w),y=i.__importStar(y),E=i.__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=n.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(),o.default.init(),p.default.setup(),m.setup(t.enableMobileMenu,t.pageMenuMainProvider),f.setup(),u.default.setup(),g.setup(),v.setup(),_.setup(),w.setup(),y.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((()=>{h.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,i)=>{e(["./Controller/Style/ColorScheme"],t,i)})).then(i.__importStar).then((({setup:e})=>{e()})),(0,C.whenFirstSeen)("[data-report-content]",(()=>{new Promise(((t,i)=>{e(["./Ui/Moderation/Report"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-pagination",(()=>{new Promise(((t,i)=>{e(["./Ui/Pagination/JumpToPage"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-google-maps",(()=>{new Promise(((t,i)=>{e(["./Component/GoogleMaps/woltlab-core-google-maps"],t,i)})).then(i.__importStar)})),(0,C.whenFirstSeen)("[data-google-maps-geocoding]",(()=>{new Promise(((t,i)=>{e(["./Component/GoogleMaps/Geocoding"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,C.whenFirstSeen)("woltlab-core-file",(()=>{new Promise(((t,i)=>{e(["./Component/File/woltlab-core-file"],t,i)})).then(i.__importStar)})),(0,C.whenFirstSeen)("woltlab-core-file-upload",(()=>{new Promise(((t,i)=>{e(["./Component/File/woltlab-core-file"],t,i)})).then(i.__importStar),new Promise(((t,i)=>{e(["./Component/File/Upload"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),new MutationObserver((e=>{for(const t of e)for(const e of t.addedNodes){if(!(e instanceof HTMLElement))continue;if(null===e.querySelector(".g-recaptcha-bubble-arrow"))continue;const t=e.querySelector("iframe");if(!t)continue;const i="a-"+t.name.split("-")[1],n=document.querySelector(`iframe[name="${i}"]`);n&&(n.closest("woltlab-core-dialog")&&((0,L.getPageOverlayContainer)().append(e),e.classList.add("g-recaptcha-container")))}})).observe(document.body,{childList:!0})}})),define("WoltLabSuite/Core/Ui/User/Ignore",["require","exports","tslib","../../Dom/Change/Listener"],(function(e,t,i,n){"use strict";function o(){for(let e=0,t=a.length;ec()))}function s(){f=!1}function l(e){g=Math.min(g+e,0),m.style.setProperty("margin-left",`${g}px`,"")}function c(){if(!f)return;b=[],v=[];const e=h.clientWidth,t=h.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(h.clientWidth-(e.offsetLeft+e.clientWidth)),h.lastElementChild===e&&u.classList.remove("active"),p.classList.add("active")}}()})),h.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),h.firstElementChild===e&&p.classList.remove("active"),u.classList.add("active")}}()})),h.insertAdjacentElement("afterend",p)),(t>e||g<0)&&Array.from(h.children).forEach((t=>{const i=t.offsetLeft;i<0?b.push(t):i+t.clientWidth>e&&v.push(t)})),p?.classList[b.length?"add":"remove"]("active"),u?.classList[v.length?"add":"remove"]("active")}function d(){m.addEventListener("transitionend",c),new ResizeObserver((()=>{m.style.setProperty("margin-left","0px",""),g=0,c()})).observe(h),a(),h.querySelectorAll(".boxMenuHasChildren").forEach((e=>{const t=e.querySelector(".boxMenuLink");t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded","false");const i=document.createElement("button");i.type="button",i.className="visuallyHidden",i.setAttribute("aria-label",o.get("wcf.global.button.showMenu")),e.insertBefore(i,t.nextSibling);let n=!1;i.addEventListener("click",(()=>{n=!n,t.setAttribute("aria-expanded",n?"true":"false"),i.setAttribute("aria-label",o.get(n?"wcf.global.button.hideMenu":"wcf.global.button.showMenu"))}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r);let u,p,m,h,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.");h=e,m=t,r.on("screen-lg",{match:a,unmatch:s,setup:d})}})),define("WoltLabSuite/Core/User",["require","exports"],(function(e,t){"use strict";class i{userId;username;link;guestTokenDialogEndpoint;constructor(e,t,i,n){this.userId=e,this.username=t,this.link=i,this.guestTokenDialogEndpoint=n}}let n;return{getLink:()=>n.link,init(e,t,o,r=""){if(n)throw new Error("User has already been initialized.");n=new i(e,t,o,r)},get userId(){return n.userId},get username(){return n.username},get guestTokenDialogEndpoint(){return n.guestTokenDialogEndpoint}}})),define("WoltLabSuite/Core/Ui/Message/UserConsent",["require","exports","tslib","WoltLabSuite/Core/Helper/Selector","../../Ajax","../../Core","../../Dom/Change/Listener","../../Dom/Util","../../User"],(function(e,t,i,n,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__importDefault(s),l=i.__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,n.wheneverFirstSeen)(".jsButtonMessageUserConsentEnable",(e=>{e.addEventListener("click",(e=>this.click(e)))}))}click(e){e.preventDefault(),this.enableAll=!0,this.enableAllExternalMedia(),l.default.userId?o.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 i(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=i,t.copyElementTextToClipboard=async function(e){return i(e.textContent.replace(/\u200B/g,"").replace(/\u00A0/g," "))}})),define("WoltLabSuite/Core/Ui/Notification",["require","exports","../Helper/PageOverlay","../Language"],(function(e,t,i,n){"use strict";function o(){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",o),a.appendChild(r),(0,i.getPageOverlayContainer)().appendChild(a)),c="function"==typeof t?t:null,r.className=u||"success",r.textContent=(0,n.getPhrase)(e||"wcf.global.success"),a.classList.add("active"),s=window.setTimeout(o,2e3))}})),define("WoltLabSuite/Core/Ui/Message/Share/Providers",["require","exports"],(function(e,t){"use strict";function i(e){n.add(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.getShareProviders=t.addShareProviders=t.addShareProvider=void 0;const n=new Set;t.addShareProvider=i,t.addShareProviders=function(e){e.forEach((e=>i(e)))},t.getShareProviders=function(){return n}})),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,i,n,o,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 m(e){e.preventDefault();const t=e.currentTarget,i=f(t),s=function(){const e=Array.from((0,l.getShareProviders)()).map((e=>{const[t,i,n]=e;return`\n
  • \n \n
  • \n `})).join("\n");return e?`
      ${e}
    `:""}();let m="";s&&(m=`\n
    \n
    ${(0,d.getPhrase)("wcf.message.share.socialMedia")}
    \n
    ${s}
    \n
    \n `);let h="";_&&(h=`\n
    \n
    \n
    \n \n
    \n
    \n `);const v=`\n
    \n `,w=(0,c.dialogFactory)().fromHtml(v).withoutControls();w.content.querySelectorAll(".shareDialogCopyButton").forEach((e=>e.addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,i=n.prevBySel(t,'input[type="text"]');await o.copyTextToClipboard(i.value),r.show((0,d.getPhrase)("wcf.message.share.copy.success"))}(e))))),_&&w.content.querySelector(".shareDialogNativeButton").addEventListener("click",(e=>async function(e){e.preventDefault();const t=e.currentTarget,i={url:t.dataset.url};t.dataset.title&&(i.title=t.dataset.title),await window.navigator.share(i)}(e))),s&&function(e,t){const i={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:i,pageDescription:b(),pageUrl:t}),Object.values(i).forEach((t=>{e.querySelector(t.selector)?.addEventListener("click",(()=>t.share()))}))}(w.content,i),w.show((0,d.getPhrase)("wcf.message.share"))}function h(){document.querySelectorAll(".shareButton, .wsShareButton").forEach((e=>{v.has(e)||(e.addEventListener("click",(e=>m(e))),v.add(e))}))}function f(e){return e instanceof HTMLAnchorElement?e.href:e.dataset.link}function g(e,t,i,n){window.open(t.replace("{pageURL}",n).replace("{text}",b()+(i?`%20${n}`:"")),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,n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importDefault(s),u=i.__importStar(u);const v=new WeakSet,_=void 0!==window.navigator.share;t.setup=function(){h(),s.default.add("WoltLabSuite/Core/Ui/Message/Share/Dialog",(()=>h()))}})),define("WoltLabSuite/Core/Ui/Feed/Dialog",["require","exports","tslib","../Dialog","../../StringUtil","../../Language","../../Clipboard","../Notification"],(function(e,t,i,n,o,r,a,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importStar(a),s=i.__importStar(s),t.setup=function(){document.querySelectorAll("a.rssFeed").forEach((e=>{e.addEventListener("click",(e=>function(e){e.preventDefault();const t=e.currentTarget,i=t.href,l=i.replace(/(\\?|&)at=[^&]*&?/,"$1").replace(/(\?|&)$/,"");n.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 i(e,t){const n=e.querySelector(".boxMenuLink"),o=n.querySelector(".boxMenuLinkTitle").textContent;let r=0;const a=n.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=>i(t,e)))}const c=n.getAttribute("href");let d,u;return c&&"#"!==c&&(d=n.href,"_blank"===n.target&&(u=!0)),{active:e.classList.contains("active"),children:l,counter:r,depth:t,identifier:n.parentElement.dataset.identifier,link:d,openInNewWindow:u,title:o}}Object.defineProperty(t,"__esModule",{value:!0}),t.UiPageMenuMainFrontend=void 0;class n{getMenuItems(e){return Array.from(e.children).map((e=>i(e,0)))}}t.UiPageMenuMainFrontend=n,t.default=n})),define("WoltLabSuite/Core/Notification/ServiceWorker",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,i){"use strict";function n(){return"https:"===location.protocol&&"serviceWorker"in window.navigator&&"PushManager"in window&&"showNotification"in ServiceWorkerRegistration.prototype&&(!("Notification"in window)||"denied"!==Notification.permission)}function o(){r?.register()}Object.defineProperty(t,"__esModule",{value:!0}),t.registerServiceWorker=t.setup=t.serviceWorkerSupported=void 0;let r=null;class a{#E;#S;#C;#L;constructor(e,t,i){this.#E=e,this.#S=t,this.#C=i,window.navigator.serviceWorker.register(this.#S,{scope:"/"}),this.#L=window.navigator.serviceWorker.ready}async register(){const e=await(await this.#L).pushManager.getSubscription();if(e&&this.#k(e))return;await this.unsubscribe(e);const t=await(await this.#L).pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:this.#x(this.#E)});t&&await this.#I(t)}async unsubscribe(e){e&&(await this.#I(e,!0),await e.unsubscribe())}#k(e){let t=window.btoa(String.fromCharCode(...new Uint8Array(e.options.applicationServerKey)));return t=t.replace(/\+/g,"-").replace(/\//g,"_"),t=t.replace(/=+$/,""),t===this.#E}async#I(e,t=!1){const n=e.getKey("p256dh"),o=e.getKey("auth"),r=(PushManager.supportedContentEncodings||["aes128gcm"])[0];try{await(0,i.prepareRequest)(this.#C).post({remove:t,endpoint:e.endpoint,publicKey:n?window.btoa(String.fromCharCode(...new Uint8Array(n))):null,authToken:o?window.btoa(String.fromCharCode(...new Uint8Array(o))):null,contentEncoding:r}).disableLoadingIndicator().fetchAsResponse()}catch(e){}}#x(e){const t=(e+"=".repeat((4-e.length%4)%4)).replace(/-/g,"+").replace(/_/g,"/"),i=window.atob(t),n=new Uint8Array(i.length);for(let e=0;e{e(["./Controller/Style/Changer"],t,i)})).then(i.__importStar).then((e=>{e.setup()})),""!==(g=t.endpointUserPopover)&&(0,m.whenFirstSeen)(".userLink",(()=>{new Promise(((t,i)=>{e(["./Component/Popover"],t,i)})).then(i.__importStar).then((({setupFor:e})=>{e({endpoint:g,identifier:"com.woltlab.wcf.user",selector:".userLink"})}))})),void 0!==t.executeCronjobs&&(0,h.prepareRequest)(t.executeCronjobs).get().disableLoadingIndicator().fetchAsResponse().catch((()=>{})),n.setUrl(t.backgroundQueue.url),(Math.random()<.1||t.backgroundQueue.force)&&n.invoke(),r.init(),s.init(),t.shareButtonProviders&&(0,c.addShareProviders)(t.shareButtonProviders),l.setup(),u.default.userId&&(d.setup(),t.serviceWorker&&(0,f.setup)(t.serviceWorker.publicKey,t.serviceWorker.serviceWorkerJsUrl,t.serviceWorker.registerUrl)),(0,m.whenFirstSeen)("woltlab-core-reaction-summary",(()=>{new Promise(((t,i)=>{e(["./Ui/Reaction/SummaryDetails"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,m.whenFirstSeen)("woltlab-core-comment",(()=>{new Promise(((t,i)=>{e(["./Component/Comment/woltlab-core-comment"],t,i)})).then(i.__importStar)})),(0,m.whenFirstSeen)("woltlab-core-comment-response",(()=>{new Promise(((t,i)=>{e(["./Component/Comment/Response/woltlab-core-comment-response"],t,i)})).then(i.__importStar)})),(0,m.whenFirstSeen)("[data-follow-user]",(()=>{new Promise(((t,i)=>{e(["./Component/User/Follow"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))})),(0,m.whenFirstSeen)("[data-ignore-user]",(()=>{new Promise(((t,i)=>{e(["./Component/User/Ignore"],t,i)})).then(i.__importStar).then((({setup:e})=>e()))}))}})),define("WoltLabSuite/Core/ColorUtil",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(e>359)throw new TypeError("Hue cannot be larger than 359°");t/=100,i/=100;const n=(1-Math.abs(2*i-1))*t,o=n*(1-Math.abs(e/60%2-1)),r=i-n/2,[a,s,l]=0<=e&&e<60&&[n,o,0]||60<=e&&e<120&&[o,n,0]||120<=e&&e<180&&[0,n,o]||180<=e&&e<240&&[0,o,n]||240<=e&&e<300&&[o,0,n]||300<=e&&e<360&&[n,0,o];return{r:Math.round(255*(a+r)),g:Math.round(255*(s+r)),b:Math.round(255*(l+r))}}function n(e,t,i){const n={r:0,g:0,b:0},o=Math.floor(e/60),r=e/60-o,a=(i/=100)*(1-(t/=100)),s=i*(1-t*r),l=i*(1-t*(1-r));if(0==t)n.r=n.g=n.b=i;else switch(o){case 1:n.r=s,n.g=i,n.b=a;break;case 2:n.r=a,n.g=i,n.b=l;break;case 3:n.r=a,n.g=s,n.b=i;break;case 4:n.r=l,n.g=a,n.b=i;break;case 5:n.r=i,n.g=a,n.b=s;break;case 0:case 6:n.r=i,n.g=l,n.b=a}return{r:Math.round(255*n.r),g:Math.round(255*n.g),b:Math.round(255*n.b)}}function o(e,t,i){let n,o;e/=255,t/=255,i/=255;const r=Math.max(e,t,i),a=Math.min(e,t,i),s=r-a;if(n=0,r!==a){switch(r){case e:n=(t-i)/s*60;break;case t:n=60*(2+(i-e)/s);break;case i:n=60*(4+(e-t)/s)}n<0&&(n+=360)}const l=(r+a)/2;return o=0===s?0:s/(1-Math.abs(2*l-1)),{h:Math.round(n),s:Math.round(100*o),l:Math.round(100*l)}}function r(e,t,i){let n,o;e/=255,t/=255,i/=255;const r=Math.max(Math.max(e,t),i),a=Math.min(Math.min(e,t),i),s=r-a;if(n=0,r!==a){switch(r){case e:n=(t-i)/s*60;break;case t:n=60*(2+(i-e)/s);break;case i:n=60*(4+(e-t)/s)}n<0&&(n+=360)}return o=0===r?0:s/r,{h:Math.round(n),s:Math.round(100*o),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,i){if(void 0===t){const n=/^rgba?\((\d+), ?(\d+), ?(\d+)(?:, ?[0-9.]+)?\)$/.exec(e.toString());if(!n)throw new Error("Invalid RGB data given.");e=+n[1],t=+n[2],i=+n[3]}return s(e)+s(t)+s(i)}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,i,n){if(void 0===t){const t=e;return l(t.r,t.g,t.b)+c(t.a)}return l(e,t,i)+c(n)}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 m(e){const t=p();return t.style.color="",t.style.color=e,""!==t.style.color}function h(e){if(!m(e))throw new Error(`Given string '${e}' is no valid color.`);const t=p();t.style.color=e;const i=window.getComputedStyle(t).color,n=/^rgb\((\d+), ?(\d+), ?(\d+)\)$/.exec(i);if(n)return{r:+n[1],g:+n[2],b:+n[3],a:1};{const e=/^rgba\((\d+), ?(\d+), ?(\d+), ?([0-9.]+)\)$/.exec(i);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=i,t.hsvToRgb=n,t.rgbToHsl=o,t.rgbToHsv=r,t.hexToRgb=a,t.rgbToHex=l,t.rgbaToHex=d,t.rgbaToString=u,t.isValidColor=m,t.stringToRgba=h,window.__wcf_bc_colorUtil={hexToRgb:a,hslToRgb:i,hsvToRgb:n,isValidColor:m,rgbaToHex:d,rgbaToString:u,rgbToHex:l,rgbToHsv:r,rgbToHsl:o,stringToRgba:h}})),define("WoltLabSuite/Core/Dictionary",["require","exports"],(function(e,t){"use strict";class i{_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,i=e.length;tthis.set(t,e)))}toObject(){const e={};return this._dictionary.forEach(((t,i)=>e[i]=t)),e}static fromObject(e){const t=new i;return Object.keys(e).forEach((i=>{t.set(i,e[i])})),t}get size(){return this._dictionary.size}}return i})),define("WoltLabSuite/Core/FileUtil",["require","exports","tslib","./StringUtil"],(function(e,t,i,n){"use strict";function o(e){return a.has(e)?"."+a.get(e):""}Object.defineProperty(t,"__esModule",{value:!0}),t.blobToFile=t.getExtensionByMimeType=t.getIconNameByFilename=t.formatFilesize=void 0,n=i.__importStar(n);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 i="Byte";return e>=1e3&&(e/=1e3,i="kB"),e>=1e3&&(e/=1e3,i="MB"),e>=1e3&&(e/=1e3,i="GB"),e>=1e3&&(e/=1e3,i="TB"),n.formatNumeric(e,-t)+" "+i},t.getIconNameByFilename=function(e){const t=e.lastIndexOf(".");if(-1!==t){const i=e.substr(t+1);if(r.has(i))return r.get(i)}return""},t.getExtensionByMimeType=o,t.blobToFile=function(e,t){const i=o(e.type);return new File([e],t+i,{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 i=e.toString().split("e"),n=i[1]?+i[1]-t:-t;return i=(e=Math.round(+`${i[0]}e${n}`)).toString().split("e"),n=i[1]?+i[1]+t:t,+`${i[0]}e${n}`}})),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 i(e,t){if("boolean"!=typeof t)throw new TypeError("The permission value has to be boolean.");n.set(e,t)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=t.addObject=t.add=void 0;const n=new Map;t.add=i,t.addObject=function(e){Object.keys(e).forEach((t=>i(t,e[t])))},t.get=function(e){return!!n.has(e)&&n.get(e)}})),_self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){function t(e,t,i,n){this.type=e,this.content=t,this.alias=i,this.length=0|(n||"").length}function i(e,t,i,n){var o,r;return e.lastIndex=t,(o=e.exec(i))&&n&&o[1]&&(r=o[1].length,o.index+=r,o[0]=o[0].slice(r)),o}function n(e,o,s,l,c,d){var u,p,h,f,g,b,v,_,w,y,E,S,C,L,k,x,I,M,T,D,A,P,j,q,O;for(u in s)if(s.hasOwnProperty(u)&&s[u])for(p=s[u],p=Array.isArray(p)?p:[p],h=0;h=d.reach);S+=E.value.length,E=E.next){if(C=E.value,o.length>e.length)return;if(!(C instanceof t)){if(L=1,v){if(!(k=i(y,S,e,b))||k.index>=e.length)break;for(x=k.index,I=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(T=E;T!==o.tail&&(Md.reach&&(d.reach=j),q=E.prev,A&&(q=r(o,q,A),S+=A.length),a(o,q,L),E=r(o,q,new t(u,g?m.tokenize(D,g):D,_,D)),P&&r(o,E,P),L>1&&(O={cause:u+","+h,reach:j},n(e,o,s,E.prev,S,O),d&&O.reach>d.reach&&(d.reach=O.reach))}}}}function o(){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,i){var n=t.next,o={value:i,prev:t,next:n};return t.next=o,n.prev=o,e.length++,o}function a(e,t,i){var n,o=t.next;for(n=0;n"+o.content+""},e.document?((l=m.util.currentScript())&&(m.filename=l.src,l.hasAttribute("data-manual")&&(m.manual=!0)),m.manual||("loading"===(c=document.readyState)||"interactive"===c&&l&&l.defer?document.addEventListener("DOMContentLoaded",s):window.requestAnimationFrame?window.requestAnimationFrame(s):window.setTimeout(s,16)),m):e.addEventListener?(m.disableWorkerMessageHandler||e.addEventListener("message",(function(t){var i=JSON.parse(t.data),n=i.language,o=i.code,r=i.immediateClose;e.postMessage(m.highlight(o,m.languages[n],n)),r&&e.close()}),!1),m):m}(_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/Upload",["require","exports","tslib","./Ajax/Request","./Core","./Dom/Change/Listener","./Language"],(function(e,t,i,n,o,r,a){"use strict";return n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a),class{_button=document.createElement("p");_buttonContainer;_fileElements=[];_fileUpload=document.createElement("input");_internalFileId=0;_multiFileUploadIds=[];_options;_target;constructor(e,t,i){if(!(i=i||{}).className)throw new Error("Missing class name.");this._options=o.extend({action:"upload",multiple:!1,acceptableFiles:null,name:"__files[]",singleFileRequests:!1,url:`index.php?ajax-upload/&t=${o.getXsrfToken()}`},i),this._options.url=o.convertLegacyUrl(this._options.url),0===this._options.url.indexOf("index.php")&&(this._options.url=window.WSC_API_URL+this._options.url);const n=document.getElementById(e);if(null===n)throw new Error(`Element id '${e}' is unknown.`);this._buttonContainer=n;const r=document.getElementById(t);if(null===r)throw new Error(`Element id '${t}' is unknown.`);if(this._target=r,i.multiple&&"UL"!==this._target.nodeName&&"OL"!==this._target.nodeName&&"TBODY"!==this._target.nodeName)throw new Error("Target element has to be list or table body if uploading multiple files is supported.");this._createButton()}_createButton(){this._fileUpload=document.createElement("input"),this._fileUpload.type="file",this._fileUpload.name=this._options.name,this._options.multiple&&(this._fileUpload.multiple=!0),null!==this._options.acceptableFiles&&(this._fileUpload.accept=this._options.acceptableFiles.join(",")),this._fileUpload.addEventListener("change",(e=>this._upload(e))),this._button=document.createElement("p"),this._button.className="button uploadButton",this._button.setAttribute("role","button"),this._fileUpload.addEventListener("focus",(()=>{this._fileUpload.matches(":focus-visible")&&this._button.classList.add("active")})),this._fileUpload.addEventListener("blur",(()=>{this._button.classList.remove("active")}));const e=document.createElement("span");e.textContent=a.get("wcf.global.button.upload"),this._button.appendChild(e),this._button.insertAdjacentElement("afterbegin",this._fileUpload),this._insertButton(),r.default.trigger()}_createFileElement(e){const t=document.createElement("progress");let i;switch(t.max=100,this._target.nodeName){case"OL":case"UL":return i=document.createElement("li"),i.innerText=e.name,i.appendChild(t),this._target.appendChild(i),i;case"TBODY":return this._createFileTableRow(e);default:return i=document.createElement("p"),i.appendChild(t),this._target.appendChild(i),i}}_createFileElements(e){if(!e.length)return null;const t=[];Array.from(e).forEach((e=>{const i=this._createFileElement(e);i.classList.contains("uploadFailed")||(i.dataset.filename=e.name,i.dataset.internalFileId=(this._internalFileId++).toString(),t.push(i))}));const i=this._fileElements.length;return this._fileElements.push(t),r.default.trigger(),i}_createFileTableRow(e){throw new Error("Has to be implemented in subclass.")}_failure(e,t,i,n,o){return!0}_getParameters(){return{}}_getFormData(){return{}}_insertButton(){this._buttonContainer.insertAdjacentElement("afterbegin",this._button)}_progress(e,t){const i=Math.round(t.loaded/t.total*100);this._fileElements[e].forEach((e=>{const t=e.querySelector("progress");t&&(t.value=i)}))}_removeButton(){this._button.remove(),r.default.trigger()}_success(e,t,i,n,o){}_upload(e,t,i){this._target.querySelectorAll(".uploadFailed").forEach((e=>e.remove()));let n=null,o=[];if(t)o.push(t);else if(i){let e="";switch(i.type){case"image/jpeg":e="jpg";break;case"image/gif":e="gif";break;case"image/png":e="png";break;case"image/webp":e="webp"}o.push({name:`pasted-from-clipboard.${e}`})}else o=Array.from(this._fileUpload.files);return o.length&&this.validateUpload(o)&&(this._options.singleFileRequests?(n=[],o.forEach((e=>{const t=this._uploadFiles([e],i);1!==o.length&&this._multiFileUploadIds.push(t),n.push(t)}))):n=this._uploadFiles(o,i)),this._removeButton(),this._createButton(),n}validateUpload(e){return!0}_uploadFiles(e,t){function i(e,t){null!==e&&(t=t||"",Object.entries(e).forEach((([e,n])=>{if("object"==typeof n)i(n,0===t.length?e:`${t}[${e}]`);else{const i=0===t.length?e:`${t}[${e}]`;r.append(i,n)}})))}const o=this._createFileElements(e);if(!this._fileElements[o].length)return null;const r=new FormData;for(let i=0,n=e.length;ie.find((e=>null!==e.querySelector("progress")))))}uploadBlob(e){return this._upload(null,null,e)}uploadFile(e){return this._upload(null,e)}}})),define("WoltLabSuite/Core/prism-meta",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={markup:{title:"Markup",file:"markup"},html:{title:"HTML",file:"markup"},xml:{title:"XML",file:"markup"},svg:{title:"SVG",file:"markup"},mathml:{title:"MathML",file:"markup"},ssml:{title:"SSML",file:"markup"},atom:{title:"Atom",file:"markup"},rss:{title:"RSS",file:"markup"},css:{title:"CSS",file:"css"},clike:{title:"C-like",file:"clike"},javascript:{title:"JavaScript",file:"javascript"},abap:{title:"ABAP",file:"abap"},abnf:{title:"ABNF",file:"abnf"},actionscript:{title:"ActionScript",file:"actionscript"},ada:{title:"Ada",file:"ada"},agda:{title:"Agda",file:"agda"},al:{title:"AL",file:"al"},antlr4:{title:"ANTLR4",file:"antlr4"},apacheconf:{title:"Apache Configuration",file:"apacheconf"},apex:{title:"Apex",file:"apex"},apl:{title:"APL",file:"apl"},applescript:{title:"AppleScript",file:"applescript"},aql:{title:"AQL",file:"aql"},arduino:{title:"Arduino",file:"arduino"},arff:{title:"ARFF",file:"arff"},armasm:{title:"ARM Assembly",file:"armasm"},arturo:{title:"Arturo",file:"arturo"},asciidoc:{title:"AsciiDoc",file:"asciidoc"},aspnet:{title:"ASP.NET (C#)",file:"aspnet"},asm6502:{title:"6502 Assembly",file:"asm6502"},asmatmel:{title:"Atmel AVR Assembly",file:"asmatmel"},autohotkey:{title:"AutoHotkey",file:"autohotkey"},autoit:{title:"AutoIt",file:"autoit"},avisynth:{title:"AviSynth",file:"avisynth"},"avro-idl":{title:"Avro IDL",file:"avro-idl"},awk:{title:"AWK",file:"awk"},bash:{title:"Bash",file:"bash"},sh:{title:"Shell",file:"bash"},shell:{title:"Shell",file:"bash"},basic:{title:"BASIC",file:"basic"},batch:{title:"Batch",file:"batch"},bbcode:{title:"BBcode",file:"bbcode"},bbj:{title:"BBj",file:"bbj"},bicep:{title:"Bicep",file:"bicep"},birb:{title:"Birb",file:"birb"},bison:{title:"Bison",file:"bison"},bnf:{title:"BNF",file:"bnf"},bqn:{title:"BQN",file:"bqn"},brainfuck:{title:"Brainfuck",file:"brainfuck"},brightscript:{title:"BrightScript",file:"brightscript"},bro:{title:"Bro",file:"bro"},bsl:{title:"BSL (1C:Enterprise)",file:"bsl"},c:{title:"C",file:"c"},csharp:{title:"C#",file:"csharp"},cpp:{title:"C++",file:"cpp"},cfscript:{title:"CFScript",file:"cfscript"},chaiscript:{title:"ChaiScript",file:"chaiscript"},cil:{title:"CIL",file:"cil"},cilkc:{title:"Cilk/C",file:"cilkc"},cilkcpp:{title:"Cilk/C++",file:"cilkcpp"},clojure:{title:"Clojure",file:"clojure"},cmake:{title:"CMake",file:"cmake"},cobol:{title:"COBOL",file:"cobol"},coffeescript:{title:"CoffeeScript",file:"coffeescript"},concurnas:{title:"Concurnas",file:"concurnas"},csp:{title:"Content-Security-Policy",file:"csp"},cooklang:{title:"Cooklang",file:"cooklang"},coq:{title:"Coq",file:"coq"},crystal:{title:"Crystal",file:"crystal"},"css-extras":{title:"CSS Extras",file:"css-extras"},csv:{title:"CSV",file:"csv"},cue:{title:"CUE",file:"cue"},cypher:{title:"Cypher",file:"cypher"},d:{title:"D",file:"d"},dart:{title:"Dart",file:"dart"},dataweave:{title:"DataWeave",file:"dataweave"},dax:{title:"DAX",file:"dax"},dhall:{title:"Dhall",file:"dhall"},diff:{title:"Diff",file:"diff"},django:{title:"Django/Jinja2",file:"django"},"dns-zone-file":{title:"DNS zone file",file:"dns-zone-file"},docker:{title:"Docker",file:"docker"},dot:{title:"DOT (Graphviz)",file:"dot"},ebnf:{title:"EBNF",file:"ebnf"},editorconfig:{title:"EditorConfig",file:"editorconfig"},eiffel:{title:"Eiffel",file:"eiffel"},ejs:{title:"EJS",file:"ejs"},elixir:{title:"Elixir",file:"elixir"},elm:{title:"Elm",file:"elm"},etlua:{title:"Embedded Lua templating",file:"etlua"},erb:{title:"ERB",file:"erb"},erlang:{title:"Erlang",file:"erlang"},"excel-formula":{title:"Excel Formula",file:"excel-formula"},fsharp:{title:"F#",file:"fsharp"},factor:{title:"Factor",file:"factor"},false:{title:"False",file:"false"},"firestore-security-rules":{title:"Firestore security rules",file:"firestore-security-rules"},flow:{title:"Flow",file:"flow"},fortran:{title:"Fortran",file:"fortran"},ftl:{title:"FreeMarker Template Language",file:"ftl"},gml:{title:"GameMaker Language",file:"gml"},gap:{title:"GAP (CAS)",file:"gap"},gcode:{title:"G-code",file:"gcode"},gdscript:{title:"GDScript",file:"gdscript"},gedcom:{title:"GEDCOM",file:"gedcom"},gettext:{title:"gettext",file:"gettext"},gherkin:{title:"Gherkin",file:"gherkin"},git:{title:"Git",file:"git"},glsl:{title:"GLSL",file:"glsl"},gn:{title:"GN",file:"gn"},"linker-script":{title:"GNU Linker Script",file:"linker-script"},go:{title:"Go",file:"go"},"go-module":{title:"Go module",file:"go-module"},gradle:{title:"Gradle",file:"gradle"},graphql:{title:"GraphQL",file:"graphql"},groovy:{title:"Groovy",file:"groovy"},haml:{title:"Haml",file:"haml"},handlebars:{title:"Handlebars",file:"handlebars"},mustache:{title:"Mustache",file:"handlebars"},haskell:{title:"Haskell",file:"haskell"},haxe:{title:"Haxe",file:"haxe"},hcl:{title:"HCL",file:"hcl"},hlsl:{title:"HLSL",file:"hlsl"},hoon:{title:"Hoon",file:"hoon"},http:{title:"HTTP",file:"http"},hpkp:{title:"HTTP Public-Key-Pins",file:"hpkp"},hsts:{title:"HTTP Strict-Transport-Security",file:"hsts"},ichigojam:{title:"IchigoJam",file:"ichigojam"},icon:{title:"Icon",file:"icon"},"icu-message-format":{title:"ICU Message Format",file:"icu-message-format"},idris:{title:"Idris",file:"idris"},ignore:{title:".ignore",file:"ignore"},gitignore:{title:".gitignore",file:"ignore"},hgignore:{title:".hgignore",file:"ignore"},npmignore:{title:".npmignore",file:"ignore"},inform7:{title:"Inform 7",file:"inform7"},ini:{title:"Ini",file:"ini"},io:{title:"Io",file:"io"},j:{title:"J",file:"j"},java:{title:"Java",file:"java"},javadoc:{title:"JavaDoc",file:"javadoc"},javadoclike:{title:"JavaDoc-like",file:"javadoclike"},javastacktrace:{title:"Java stack trace",file:"javastacktrace"},jexl:{title:"Jexl",file:"jexl"},jolie:{title:"Jolie",file:"jolie"},jq:{title:"JQ",file:"jq"},jsdoc:{title:"JSDoc",file:"jsdoc"},"js-extras":{title:"JS Extras",file:"js-extras"},json:{title:"JSON",file:"json"},json5:{title:"JSON5",file:"json5"},jsonp:{title:"JSONP",file:"jsonp"},jsstacktrace:{title:"JS stack trace",file:"jsstacktrace"},"js-templates":{title:"JS Templates",file:"js-templates"},julia:{title:"Julia",file:"julia"},keepalived:{title:"Keepalived Configure",file:"keepalived"},keyman:{title:"Keyman",file:"keyman"},kotlin:{title:"Kotlin",file:"kotlin"},kts:{title:"Kotlin Script",file:"kotlin"},kumir:{title:"KuMir (КуМир)",file:"kumir"},kusto:{title:"Kusto",file:"kusto"},latex:{title:"LaTeX",file:"latex"},tex:{title:"TeX",file:"latex"},context:{title:"ConTeXt",file:"latex"},latte:{title:"Latte",file:"latte"},less:{title:"Less",file:"less"},lilypond:{title:"LilyPond",file:"lilypond"},liquid:{title:"Liquid",file:"liquid"},lisp:{title:"Lisp",file:"lisp"},livescript:{title:"LiveScript",file:"livescript"},llvm:{title:"LLVM IR",file:"llvm"},log:{title:"Log file",file:"log"},lolcode:{title:"LOLCODE",file:"lolcode"},lua:{title:"Lua",file:"lua"},magma:{title:"Magma (CAS)",file:"magma"},makefile:{title:"Makefile",file:"makefile"},markdown:{title:"Markdown",file:"markdown"},"markup-templating":{title:"Markup templating",file:"markup-templating"},mata:{title:"Mata",file:"mata"},matlab:{title:"MATLAB",file:"matlab"},maxscript:{title:"MAXScript",file:"maxscript"},mel:{title:"MEL",file:"mel"},mermaid:{title:"Mermaid",file:"mermaid"},metafont:{title:"METAFONT",file:"metafont"},mizar:{title:"Mizar",file:"mizar"},mongodb:{title:"MongoDB",file:"mongodb"},monkey:{title:"Monkey",file:"monkey"},moonscript:{title:"MoonScript",file:"moonscript"},n1ql:{title:"N1QL",file:"n1ql"},n4js:{title:"N4JS",file:"n4js"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",file:"nand2tetris-hdl"},naniscript:{title:"Naninovel Script",file:"naniscript"},nasm:{title:"NASM",file:"nasm"},neon:{title:"NEON",file:"neon"},nevod:{title:"Nevod",file:"nevod"},nginx:{title:"nginx",file:"nginx"},nim:{title:"Nim",file:"nim"},nix:{title:"Nix",file:"nix"},nsis:{title:"NSIS",file:"nsis"},objectivec:{title:"Objective-C",file:"objectivec"},ocaml:{title:"OCaml",file:"ocaml"},odin:{title:"Odin",file:"odin"},opencl:{title:"OpenCL",file:"opencl"},openqasm:{title:"OpenQasm",file:"openqasm"},oz:{title:"Oz",file:"oz"},parigp:{title:"PARI/GP",file:"parigp"},parser:{title:"Parser",file:"parser"},pascal:{title:"Pascal",file:"pascal"},pascaligo:{title:"Pascaligo",file:"pascaligo"},psl:{title:"PATROL Scripting Language",file:"psl"},pcaxis:{title:"PC-Axis",file:"pcaxis"},peoplecode:{title:"PeopleCode",file:"peoplecode"},perl:{title:"Perl",file:"perl"},php:{title:"PHP",file:"php"},phpdoc:{title:"PHPDoc",file:"phpdoc"},"php-extras":{title:"PHP Extras",file:"php-extras"},"plant-uml":{title:"PlantUML",file:"plant-uml"},plsql:{title:"PL/SQL",file:"plsql"},powerquery:{title:"PowerQuery",file:"powerquery"},powershell:{title:"PowerShell",file:"powershell"},processing:{title:"Processing",file:"processing"},prolog:{title:"Prolog",file:"prolog"},promql:{title:"PromQL",file:"promql"},properties:{title:".properties",file:"properties"},protobuf:{title:"Protocol Buffers",file:"protobuf"},pug:{title:"Pug",file:"pug"},puppet:{title:"Puppet",file:"puppet"},pure:{title:"Pure",file:"pure"},purebasic:{title:"PureBasic",file:"purebasic"},purescript:{title:"PureScript",file:"purescript"},python:{title:"Python",file:"python"},qsharp:{title:"Q#",file:"qsharp"},q:{title:"Q (kdb+ database)",file:"q"},qml:{title:"QML",file:"qml"},qore:{title:"Qore",file:"qore"},r:{title:"R",file:"r"},racket:{title:"Racket",file:"racket"},cshtml:{title:"Razor C#",file:"cshtml"},jsx:{title:"React JSX",file:"jsx"},tsx:{title:"React TSX",file:"tsx"},reason:{title:"Reason",file:"reason"},regex:{title:"Regex",file:"regex"},rego:{title:"Rego",file:"rego"},renpy:{title:"Ren'py",file:"renpy"},rescript:{title:"ReScript",file:"rescript"},rest:{title:"reST (reStructuredText)",file:"rest"},rip:{title:"Rip",file:"rip"},roboconf:{title:"Roboconf",file:"roboconf"},robotframework:{title:"Robot Framework",file:"robotframework"},ruby:{title:"Ruby",file:"ruby"},rust:{title:"Rust",file:"rust"},sas:{title:"SAS",file:"sas"},sass:{title:"Sass (Sass)",file:"sass"},scss:{title:"Sass (SCSS)",file:"scss"},scala:{title:"Scala",file:"scala"},scheme:{title:"Scheme",file:"scheme"},"shell-session":{title:"Shell session",file:"shell-session"},smali:{title:"Smali",file:"smali"},smalltalk:{title:"Smalltalk",file:"smalltalk"},smarty:{title:"Smarty",file:"smarty"},sml:{title:"SML",file:"sml"},solidity:{title:"Solidity (Ethereum)",file:"solidity"},"solution-file":{title:"Solution file",file:"solution-file"},soy:{title:"Soy (Closure Template)",file:"soy"},sparql:{title:"SPARQL",file:"sparql"},"splunk-spl":{title:"Splunk SPL",file:"splunk-spl"},sqf:{title:"SQF: Status Quo Function (Arma 3)",file:"sqf"},sql:{title:"SQL",file:"sql"},squirrel:{title:"Squirrel",file:"squirrel"},stan:{title:"Stan",file:"stan"},stata:{title:"Stata Ado",file:"stata"},iecst:{title:"Structured Text (IEC 61131-3)",file:"iecst"},stylus:{title:"Stylus",file:"stylus"},supercollider:{title:"SuperCollider",file:"supercollider"},swift:{title:"Swift",file:"swift"},systemd:{title:"Systemd configuration file",file:"systemd"},"t4-templating":{title:"T4 templating",file:"t4-templating"},"t4-cs":{title:"T4 Text Templates (C#)",file:"t4-cs"},"t4-vb":{title:"T4 Text Templates (VB)",file:"t4-vb"},tap:{title:"TAP",file:"tap"},tcl:{title:"Tcl",file:"tcl"},tt2:{title:"Template Toolkit 2",file:"tt2"},textile:{title:"Textile",file:"textile"},toml:{title:"TOML",file:"toml"},tremor:{title:"Tremor",file:"tremor"},trickle:{title:"trickle",file:"tremor"},troy:{title:"troy",file:"tremor"},turtle:{title:"Turtle",file:"turtle"},twig:{title:"Twig",file:"twig"},typescript:{title:"TypeScript",file:"typescript"},typoscript:{title:"TypoScript",file:"typoscript"},unrealscript:{title:"UnrealScript",file:"unrealscript"},uorazor:{title:"UO Razor Script",file:"uorazor"},uri:{title:"URI",file:"uri"},v:{title:"V",file:"v"},vala:{title:"Vala",file:"vala"},vbnet:{title:"VB.Net",file:"vbnet"},velocity:{title:"Velocity",file:"velocity"},verilog:{title:"Verilog",file:"verilog"},vhdl:{title:"VHDL",file:"vhdl"},vim:{title:"vim",file:"vim"},"visual-basic":{title:"Visual Basic",file:"visual-basic"},vba:{title:"VBA",file:"visual-basic"},warpscript:{title:"WarpScript",file:"warpscript"},wasm:{title:"WebAssembly",file:"wasm"},"web-idl":{title:"Web IDL",file:"web-idl"},wgsl:{title:"WGSL",file:"wgsl"},wiki:{title:"Wiki markup",file:"wiki"},wolfram:{title:"Wolfram language",file:"wolfram"},mathematica:{title:"Mathematica",file:"wolfram"},nb:{title:"Mathematica Notebook",file:"wolfram"},wren:{title:"Wren",file:"wren"},xeora:{title:"Xeora",file:"xeora"},"xml-doc":{title:"XML doc (.net)",file:"xml-doc"},xojo:{title:"Xojo (REALbasic)",file:"xojo"},xquery:{title:"XQuery",file:"xquery"},yaml:{title:"YAML",file:"yaml"},yang:{title:"YANG",file:"yang"},zig:{title:"Zig",file:"zig"}}})),define("WoltLabSuite/Core/Api/Error",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationError=t.ApiError=void 0,t.ApiError=class{type;code;message;param;statusCode;constructor(e,t,i,n,o){this.type=e,this.code=t,this.message=i,this.param=n,this.statusCode=o}getValidationError(){if("invalid_request_error"===this.type&&400===this.statusCode)return new i(this.code,this.message,this.param)}};class i{code;message;param;constructor(e,t,i){this.code=e,this.message=t,this.param=i}}t.ValidationError=i})),define("WoltLabSuite/Core/Api/Result",["require","exports","../Ajax/Error","../Core","./Error"],(function(e,t,i,n,o){"use strict";async function r(e){const{response:t}=e;if(void 0===t)throw e;const i=t.headers.get("content-type");if(!i||!i.includes("application/json"))throw e;let r;try{r=await t.json()}catch{throw e}if((0,n.isPlainObject)(r)&&Object.hasOwn(r,"type")&&("api_error"===r.type||"invalid_request_error"===r.type)&&"string"==typeof r.code&&"string"==typeof r.message&&"string"==typeof r.param){const e=new o.ApiError(r.type,r.code,r.message,r.param,t.status);return{ok:!1,error:e,unwrap(){throw e}}}throw e}Object.defineProperty(t,"__esModule",{value:!0}),t.apiResultFromStatusNotOk=t.apiResultFromError=t.apiResultFromValue=void 0,t.apiResultFromValue=function(e){return{ok:!0,value:e,unwrap:()=>e}},t.apiResultFromError=async function(e){if(e instanceof i.StatusNotOk)return r(e);throw e},t.apiResultFromStatusNotOk=r})),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 i,n=document.createElement("span");for(;i=t.nextNode();){const t=i,o=t.data.split(/\r?\n/);for(let i=0,r=o.length;i=1&&(n.appendChild(document.createTextNode("\n")),yield n,n=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}n.appendChild(a)}}yield n}})),define("WoltLabSuite/Core/Bbcode/Code",["require","exports","tslib","../Language","../Clipboard","../Ui/Notification","../Prism","../Prism/Helper"],(function(e,t,i,n,o,r,a,s){"use strict";async function l(){return new Promise(((e,t)=>{window.requestIdleCallback?window.requestIdleCallback(e,{timeout:5e3}):setTimeout(e,0)}))}n=i.__importStar(n),o=i.__importStar(o),r=i.__importStar(r),a=i.__importDefault(a),s=i.__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=n.get("wcf.message.bbcode.code.copy");const i=async()=>{await o.copyElementTextToClipboard(this.codeContainer),r.show(n.get("wcf.message.bbcode.code.copy.success"))};t.addEventListener("click",(()=>i())),e.appendChild(t)}async highlight(){if(!this.language)throw new Error("No language detected");const t=(await new Promise(((t,i)=>{e(["../prism-meta"],t,i)})).then(i.__importStar)).default;if(!t[this.language])throw new Error(`Unknown language '${this.language}'`);this.container.classList.add("highlighting"),await new Promise(((i,n)=>{e(["prism/components/prism-"+t[this.language].file],i,n)})).then(i.__importStar),await l();const n=a.default.languages[this.language];if(!n)throw new Error(`Invalid language '${this.language}' given.`);const o=document.createElement("div");o.innerHTML=a.default.highlight(this.codeContainer.textContent,n,this.language),await l();const r=this.codeContainer.querySelectorAll(".codeBoxLine > span"),d=s.splitIntoLines(o);for(let e=0,t=r.length;e{const t=e.dataset.titleExpand,i=e.querySelector("fa-icon");i?(i.setIcon("up-right-and-down-left-from-center"),e.title=t):e.textContent=t})),i 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,i=e.querySelector("fa-icon");i?(i.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)),n=e.querySelector(".collapsibleBbcodeOverflow")||e;t.length>0&&function(e,t,n){t.forEach((n=>{n.classList.add("jsToggleButtonEnabled"),n.addEventListener("click",(n=>i(e,t,n))),n.addEventListener("keydown",(n=>{"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),i(e,t))}))})),0!==n.scrollTop&&(n.scrollTop=0,i(e,t)),n.addEventListener("scroll",(()=>{n.scrollTop=0,e.classList.contains("collapsed")&&i(e,t)}))}(e,t,n),e.classList.remove("jsCollapsibleBbcode")}))}})),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 i{#M;constructor(e){this.#M=e}collectMetaData(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:collect-meta-data",{detail:e}))}changeData(){this.#M.dispatchEvent(new CustomEvent("ckeditor5:change-data"))}destroy(){this.#M.dispatchEvent(new CustomEvent("ckeditor5:destroy"))}discardRecoveredData(){this.#M.dispatchEvent(new CustomEvent("ckeditor5:discard-recovered-data"))}autosave(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:autosave",{detail:e}))}insertAttachment(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:insert-attachment",{detail:e}))}insertQuote(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:insert-quote",{detail:e}))}ready(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:ready",{detail:e}))}removeAttachment(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:remove-attachment",{detail:e}))}reset(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:reset",{detail:e}))}setupConfiguration(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:setup-configuration",{detail:e}))}setupFeatures(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:setup-features",{detail:e}))}submitOnEnter(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:submit-on-enter",{detail:e}))}uploadAttachment(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:upload-attachment",{detail:e}))}uploadMedia(e){this.#M.dispatchEvent(new CustomEvent("ckeditor5:upload-media",{detail:e}))}}class n{#M;constructor(e){this.#M=e}bbcode(e){return this.#M.addEventListener("ckeditor5:bbcode",(t=>{const i=e(t.detail);if(!0===i)t.preventDefault();else if(!1!==i)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.#M.addEventListener("ckeditor5:change-data",(()=>{e()})),this}collectMetaData(e){return this.#M.addEventListener("ckeditor5:collect-meta-data",(t=>{e(t.detail)})),this}destroy(e){return this.#M.addEventListener("ckeditor5:destroy",(()=>{e()})),this}discardRecoveredData(e){return this.#M.addEventListener("ckeditor5:discard-recovered-data",(()=>{e()}),{once:!0}),this}insertAttachment(e){return this.#M.addEventListener("ckeditor5:insert-attachment",(t=>{e(t.detail)})),this}insertQuote(e){return this.#M.addEventListener("ckeditor5:insert-quote",(t=>{e(t.detail)})),this}ready(e){return this.#M.addEventListener("ckeditor5:ready",(t=>{e(t.detail)}),{once:!0}),this}removeAttachment(e){return this.#M.addEventListener("ckeditor5:remove-attachment",(t=>{e(t.detail)})),this}reset(e){return this.#M.addEventListener("ckeditor5:reset",(t=>{e(t.detail)})),this}setupConfiguration(e){return this.#M.addEventListener("ckeditor5:setup-configuration",(t=>{e(t.detail)}),{once:!0}),this}setupFeatures(e){return this.#M.addEventListener("ckeditor5:setup-features",(t=>{e(t.detail)}),{once:!0}),this}submitOnEnter(e){return this.#M.addEventListener("ckeditor5:submit-on-enter",(t=>{e(t.detail)})),this}uploadAttachment(e){return this.#M.addEventListener("ckeditor5:upload-attachment",(t=>{e(t.detail)})),this}uploadMedia(e){return this.#M.addEventListener("ckeditor5:upload-media",(t=>{e(t.detail)})),this}autosave(e){return this.#M.addEventListener("ckeditor5:autosave",(t=>{e(t.detail)})),this}}t.dispatchToCkeditor=function(e){return new i(e)},t.listenToCkeditor=function(e){return new n(e)}})),define("WoltLabSuite/Core/Component/Ckeditor/Attachment",["require","exports","./Event"],(function(e,t,i){"use strict";function n(e,t,n){const o={abortController:n,file:t};return(0,i.dispatchToCkeditor)(e).uploadAttachment(o),new Promise((e=>{o.promise.then((({attachmentId:t,url:i})=>{e({"data-attachment-id":t.toString(),urls:{default:i}})})).catch((()=>{}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,i.listenToCkeditor)(e).setupConfiguration((({configuration:t,features:o})=>{o.attachment&&(t.woltlabUpload={uploadImage:(t,i)=>n(e,t,i),uploadOther:t=>n(e,t)},(0,i.listenToCkeditor)(e).ready((({ckeditor:e})=>{!function(e){(0,i.listenToCkeditor)(e.sourceElement).insertAttachment((({attachmentId:t,url:i})=>{""===i?e.insertText(`[attach=${t}][/attach]`):e.insertHtml(``)}))}(e),function(e){(0,i.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,i,n){void 0===n&&(n=i);var o=Object.getOwnPropertyDescriptor(t,i);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,n,o)}:function(e,t,i,n){void 0===n&&(n=i),e[n]=t[i]}),__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,i;if(e&&e.__esModule)return e;if(t={},null!=e)for(i in e)"default"!==i&&Object.prototype.hasOwnProperty.call(e,i)&&__createBinding(t,e,i);return __setModuleDefault(t,e),t},define("WoltLabSuite/Core/Component/Ckeditor/Media",["require","exports","./Event"],(function(e,t,i){"use strict";function n(e,t,n){const o={abortController:n,file:t};return(0,i.dispatchToCkeditor)(e).uploadMedia(o),Promise.reject()}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(t){(0,i.listenToCkeditor)(t).setupConfiguration((({configuration:e,features:i})=>{!i.attachment&&i.media&&(e.woltlabUpload={uploadImage:(e,i)=>n(t,e,i),uploadOther:e=>n(t,e)})})).ready((({ckeditor:t})=>{t.features.media&&new Promise(((t,i)=>{e(["../../Media/Manager/Editor"],t,i)})).then(__importStar).then((({MediaManagerEditor:e})=>{new e({ckeditor:t})}))}))}})),define("WoltLabSuite/Core/Api/Messages/MentionSuggestions",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mentionSuggestions=void 0,t.mentionSuggestions=async function(e){const t=new URL(window.WSC_API_URL+"index.php?api/rpc/core/messages/mentionsuggestions");let o;t.searchParams.set("query",e);try{o=await(0,i.prepareRequest)(t).get().allowCaching().disableLoadingIndicator().fetchAsJson()}catch(e){return(0,n.apiResultFromError)(e)}return(0,n.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Component/Ckeditor/Mention",["require","exports","../../Dom/Util","./Event","WoltLabSuite/Core/Api/Messages/MentionSuggestions"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,n.listenToCkeditor)(e).setupConfiguration((({configuration:e,features:t})=>{t.mention&&(e.mention={feeds:[{feed:e=>async function(e){return e.length>24?[]:(await(0,o.mentionSuggestions)(e)).unwrap().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,i.createFragmentFromHtml)(`\n ${e.icon} ${e.text}\n `).firstElementChild,marker:"@",minimumCharacters:3}]})}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Quote",["require","exports","../../StringUtil","./Event"],(function(e,t,i,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,n.listenToCkeditor)(e).ready((({ckeditor:t})=>{(0,n.listenToCkeditor)(e).insertQuote((e=>{!function(e,t){let{author:n,content:o,link:r}=t;var a;t.isText&&(a=o,o=(a=(a=(0,i.escapeHTML)(a)).replaceAll("\n\n\n\n\n",'


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

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

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


    `)}(t,e)}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Autosave",["require","exports","../../Core","../../Language","../../StringUtil","./Event"],(function(e,t,i,n,o,r){"use strict";function a(e){return`${(0,i.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 i;try{const e=window.localStorage.getItem(a(t));null!==e&&(i=JSON.parse(e))}catch{return void s(t)}if(void 0===i)return;const l=parseInt(e.sourceElement.dataset.autosaveLastEditTime)||0;if(l&&1e3*l>=i.timestamp)return;const c=e.data.get();if(c===i.html)return;e.data.set(i.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,o.escapeHTML)((0,n.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 m=(e,t,i)=>{i&&u.focus()};e.ui.focusTracker.on("change:isFocused",m);const h=()=>{e.ui.focusTracker.off("change:isFocused",m),d.insertAdjacentElement("beforebegin",e.ui.element),d.remove()};u.querySelector('button[data-type="submit"]').addEventListener("click",(()=>{h()})),u.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{e.data.set(c),s(t),""===c&&(0,r.dispatchToCkeditor)(e.sourceElement).discardRecoveredData(),h()}));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}(),i=e.ui.view.toolbar.element,r=Array.from(i.children);r.forEach((e=>e.hidden=!0)),i.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,i){!function(){const e=Date.now()-604800;Object.keys(localStorage).filter((e=>e.startsWith("ckeditor5-"))).forEach((t=>{let i,n;try{i=window.localStorage.getItem(t)}catch{return}if(null!==i){try{n=JSON.parse(i)}catch{}if(void 0===n||n.timestamp(function(e,t,i){if(""===i)return void s(t);const n={html:i,timestamp:Date.now()};try{window.localStorage.setItem(a(t),JSON.stringify(n)),(0,r.dispatchToCkeditor)(e).autosave(n)}catch(e){console.warn("Unable to write to the local storage.",e)}}(e,i,t.data.get()),Promise.resolve()),waitingTime:15e3},(0,r.listenToCkeditor)(e).reset((()=>s(i))),e instanceof HTMLTextAreaElement&&e.form&&e.form.addEventListener("submit",(()=>s(i)))}})),define("WoltLabSuite/Core/Component/Ckeditor/Configuration",["require","exports","../../Language"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createConfigurationFor=void 0;class n{#T;#D="|";#A=[];#P=[];#j={};constructor(e){this.#T=e}#q(){this.#T.undo?this.#P.push("undo","redo"):this.#A.push("Undo")}#O(){this.#P.push("bold","italic")}#B(){const e=[];this.#T.heading?e.push("heading"):this.#A.push("Heading"),this.#T.underline?e.push("underline"):this.#A.push("Underline"),this.#T.strikethrough?e.push("strikethrough"):this.#A.push("Strikethrough"),e.push(this.#D),this.#T.mark?e.push("highlight"):this.#A.push("Highlight"),this.#T.fontColor?e.push("fontColor"):this.#A.push("FontColor"),this.#T.fontFamily?e.push("fontFamily"):this.#A.push("FontFamily"),this.#T.fontSize?e.push("fontSize"):this.#A.push("FontSize"),e.push(this.#D),this.#T.subscript?e.push("subscript"):this.#A.push("Subscript"),this.#T.superscript?e.push("superscript"):this.#A.push("Superscript"),0!==e.length&&e.push(this.#D,"removeFormat"),e.length>0&&(this.#P.push({label:"woltlabToolbarGroup_format",items:e}),this.#j.format={icon:"ellipsis;false",label:(0,i.getPhrase)("wcf.editor.button.group.format")})}#N(){this.#T.list?(this.#P.push({label:"woltlabToolbarGroup_list",items:["bulletedList","numberedList","outdent","indent"]}),this.#j.list={icon:"list;false",label:(0,i.getPhrase)("wcf.editor.button.group.list")}):this.#A.push("List")}#F(){this.#T.alignment?this.#P.push("alignment"):this.#A.push("Alignment")}#R(){this.#T.link?this.#P.push("link"):this.#A.push("Link","LinkImage")}#U(){this.#T.image?(this.#P.push("insertImage"),this.#T.attachment||this.#A.push("ImageUpload","ImageUploadUI","WoltlabAttachment")):this.#T.link&&this.#A.push("LinkImage")}#W(){this.#T.codeBlock?this.#P.push("codeBlock"):this.#A.push("CodeBlock","WoltlabCodeBlock"),this.#T.code?this.#P.push("code"):this.#A.push("Code","WoltlabCode")}#H(){this.#T.table?this.#P.push("insertTable"):this.#A.push("Table","TableToolbar"),this.#T.quoteBlock?this.#P.push("blockQuote"):this.#A.push("BlockQuote","WoltlabBlockQuote"),this.#T.spoiler?this.#P.push("spoiler"):this.#A.push("WoltlabSpoiler"),this.#T.html?this.#P.push("htmlEmbed"):this.#A.push("HtmlEmbed","WoltlabHtmlEmbed")}#V(){this.#P.push(this.#D)}#$(){this.#T.media||this.#A.push("WoltlabMedia")}#z(){this.#T.mention||this.#A.push("Mention","WoltlabMention")}#G(){let e=!1;return this.#P.filter((t=>"string"==typeof t&&t===this.#D?!!e&&(e=!1,!0):(e=!0,!0)))}build(){if(this.#A.length>0||this.#P.length>0)throw new Error("Cannot build the configuration twice.");this.#q(),this.#V(),this.#V(),this.#O(),this.#R(),this.#B(),this.#V(),this.#N(),this.#F(),this.#V(),this.#U(),this.#W(),this.#H(),this.#V(),this.#$(),this.#z()}toConfig(){const e=Object.keys(window.CKEDITOR_TRANSLATIONS).find((e=>"en"!==e)),t=e||"en",{dictionary:n}=window.CKEDITOR_TRANSLATIONS[t];return n.Author=(0,i.getPhrase)("wcf.ckeditor.quote.author"),n.Filename=(0,i.getPhrase)("wcf.ckeditor.code.fileName"),n["Line number"]=(0,i.getPhrase)("wcf.ckeditor.code.lineNumber"),n.Quote=(0,i.getPhrase)("wcf.ckeditor.quote"),n["Quote from %0"]=(0,i.getPhrase)("wcf.ckeditor.quoteFrom"),n.Spoiler=(0,i.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,i.getPhrase)("wcf.ckeditor.marker.warning"),color:"var(--marker-warning)",type:"marker"},{model:"markerError",class:"marker-error",title:(0,i.getPhrase)("wcf.ckeditor.marker.error"),color:"var(--marker-error)",type:"marker"},{model:"markerInfo",class:"marker-info",title:(0,i.getPhrase)("wcf.ckeditor.marker.info"),color:"var(--marker-info)",type:"marker"},{model:"markerSuccess",class:"marker-success",title:(0,i.getPhrase)("wcf.ckeditor.marker.success"),color:"var(--marker-success)",type:"marker"}]},language:e,link:{defaultProtocol:"https://"},removePlugins:this.#A,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.#G(),ui:{poweredBy:{label:null},viewportOffset:{top:50}},woltlabToolbarGroup:this.#j,extraPlugins:[]}}}t.createConfigurationFor=function(e){const t=new n(e);return t.build(),t.toConfig()}})),define("WoltLabSuite/Core/Component/Ckeditor/SubmitOnEnter",["require","exports","./Event"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e,t){e.editing.view.document.on("enter",((e,n)=>{if(n.isSoft)return;n.preventDefault(),e.stop();const o=t.getHtml();""!==o&&(0,i.dispatchToCkeditor)(t.sourceElement).submitOnEnter({ckeditor:t,html:o})}),{priority:"high"})}})),define("WoltLabSuite/Core/Component/Ckeditor/Normalizer",["require","exports","tslib","../../Dom/Util"],(function(e,t,i,n){"use strict";function o(e,t){const i=e.closest("p");if(null===i)return;const n=document.createElement("figure");n.classList.add("image",t),n.append(e),i.insertAdjacentElement("beforebegin",n),""===i.innerHTML&&i.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&&n.default.isAtNodeEnd(e,t)&&("TD"===t.tagName||t.childNodes.length>1)&&e.remove()}(e)}))}(t);const i=function(e){const t=[];return e.querySelectorAll("p").forEach((e=>{if(e.normalize(),1===e.childNodes.length){const i=e.childNodes[0];i instanceof HTMLBRElement&&"true"!==i.dataset.ckeFiller&&t.push(e)}})),t}(t);return function(e){if(0!==e.length)for(let t=0,i=e.length;t{e.remove()})),t+=o}}}(i),function(e){e.querySelectorAll("img").forEach((e=>{e.classList.contains("messageFloatObjectRight")?o(e,"image-style-side"):e.classList.contains("messageFloatObjectLeft")&&o(e,"image-style-side-left")}))}(t),t.innerHTML}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLegacyMessage=t.normalizeLegacyHtml=void 0,n=i.__importDefault(n),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 i.content.append(l),i.show(e),new Promise((e=>{i.addEventListener("primary",(()=>{e({result:!0,reason:c.value.trim()})})),i.addEventListener("cancel",(()=>{e({result:!1,reason:""})}))}))}}t.confirmationFactory=function(){return new s}})),define("WoltLabSuite/Core/Component/GuestTokenDialog",["require","exports","tslib","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/User"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGuestToken=void 0,o=i.__importDefault(o),t.getGuestToken=async function(){const{ok:e,result:t}=await(0,n.dialogFactory)().usingFormBuilder().fromEndpoint(o.default.guestTokenDialogEndpoint);if(e)return t.token}})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports"],(function(e,t){"use strict";return class{_callback;_delta;_timer;constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||t>864e5)throw new RangeError(`Invalid delta ${t}. Delta must be in the interval [0, 86400000].`);this._callback=e.bind(void 0,this),this._delta=t,this.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}})),define("WoltLabSuite/Core/Component/Popover/SharedCache",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedCache=void 0;class n{#Q=new Map;#J;constructor(e){this.#J=new URL(e)}async get(e){let t=this.#Q.get(e);if(void 0!==t)return t;this.#J.searchParams.set("id",e.toString());const n=await(0,i.prepareRequest)(this.#J).get().fetchAsResponse();return n?.ok?(t=await n.text(),this.#Q.set(e,t),t):""}reset(e){this.#Q.delete(e)}}t.SharedCache=n,t.default=n})),define("WoltLabSuite/Core/Component/Popover",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Helper/Selector","../Timer/Repeating","../Ui/Alignment","./Popover/SharedCache"],(function(e,t,i,n,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetCache=t.setupFor=void 0,n=i.__importDefault(n),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importDefault(l);class c{#K;#Z=void 0;#ee=!0;#M;#te;#ie=void 0;#ne=void 0;constructor(e,t,i){this.#K=e,this.#M=t,this.#te=i,t.addEventListener("mouseenter",(()=>{this.#oe()})),t.addEventListener("mouseleave",(()=>{this.#re()}));const n=window.matchMedia("(hover:hover)");this.#ae(n.matches),n.addEventListener("change",(e=>{this.#ae(e.matches)})),window.addEventListener("beforeunload",(()=>{this.#ae(!1)})),this.#oe()}#oe(){this.#ee&&(this.#ne?.stop(),void 0===this.#ie?this.#ie=new a.default((e=>{e.stop();const t=this.#se();this.#K.get(t).then((e=>{if(""===e)return;const t=this.#le();n.default.setInnerHtml(t,e),s.set(t,this.#M,{vertical:"top"}),t.setAttribute("aria-hidden","false")}))}),800):this.#ie.restart())}#re(){this.#ee&&(this.#ie?.stop(),void 0===this.#ne?this.#ne=new a.default((e=>{e.stop(),this.#Z?.setAttribute("aria-hidden","true")}),500):this.#ne.restart())}#ae(e){this.#ee=e,this.#Z?.setAttribute("aria-hidden","true")}#se(){return parseInt(this.#M.dataset.objectId)}#le(){return void 0===this.#Z&&(this.#Z=document.createElement("div"),this.#Z.classList.add("popoverContainer"),this.#Z.dataset.identifier=this.#te,this.#Z.setAttribute("aria-hidden","true"),this.#Z.addEventListener("transitionend",(()=>{"true"===this.#Z.getAttribute("aria-hidden")&&this.#Z.remove()})),this.#Z.addEventListener("mouseenter",(()=>{this.#ne?.stop()})),this.#Z.addEventListener("mouseleave",(()=>{this.#re()}))),null===this.#Z.parentNode&&(0,o.getPageOverlayContainer)().append(this.#Z),this.#Z}}const d=new Map;t.setupFor=function(e){const{identifier:t,endpoint:i,selector:n}=e,o=new l.default(i);d.set(t,o),(0,r.wheneverFirstSeen)(n,(e=>{null===e.closest(".popoverContainer")&&e.addEventListener("mouseenter",(()=>{new c(o,e,t)}),{once:!0})}))},t.resetCache=function(e,t){d.get(e).reset(t)}})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const i=new Map,n={add(e,t){if(i.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'.");i.set(e,t)},delete(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);i.delete(e)},has:e=>i.has(e),getData(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return i.get(e)()},setupDialog(e,t){let i;return e.addEventListener("validate",(e=>{n.has(t)&&(i=n.getData(t),n.delete(t),i instanceof Promise&&(e.detail.push(new Promise((e=>{i.then((()=>{e(!0)})).catch((()=>{e(!1)}))}))),e.preventDefault()))})),new Promise((t=>{e.addEventListener("primary",(()=>{void 0!==i?i instanceof Promise?i.then((e=>{t(e)})):t(i):t({})}))}))}};return n})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,i,n,o,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,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__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),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()})),o.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((i=>{const n=r.default.identify(i);if(this.cache.has(n))return;if(null!==i.closest(".popover"))return void this.cache.set(n,{content:null,state:0});const o=e.legacy?n:~~i.getAttribute(e.attributeName);if(0===o)return;i.addEventListener("mouseenter",(e=>this.mouseEnter(e))),i.addEventListener("mouseleave",(()=>this.mouseLeave())),i instanceof HTMLAnchorElement&&i.href&&i.addEventListener("click",(()=>this.hidePopover()));const a=`${t}-${o}`;i.dataset.cacheId=a,this.elements.set(n,{element:i,identifier:t,objectId:o.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,i){const n=`${e}-${t}`,o=this.cache.get(n);if(void 0===o)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let a=r.default.createFragmentFromHtml(i);a.childElementCount||(a=r.default.createFragmentFromHtml("

    "+i+"

    ")),o.content=a,o.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===n&&this.show()}resetCache(e,t){const i=`${e}-${t}`;this.cache.has(i)&&this.cache.set(i,{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 i=t.element.dataset.cacheId,n=this.cache.get(i);switch(n.state){case 2:this.popoverContent.appendChild(n.content),this.rebuild();break;case 0:{n.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const i=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]},i,i)}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,{vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{ignoreError:!0,silent:!0}}ajaxApi(e,t,i){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");n.api(this,e,t,i)}}let d;t.init=function(e){l().init(e)},t.setContent=function(e,t,i){l().setContent(e,t,i)},t.ajaxApi=function(e,t,i){l().ajaxApi(e,t,i)},t.resetCache=function(e,t){l().resetCache(e,t)}})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===i}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 i(e,"ArrowDown",40)},t.ArrowLeft=function(e){return i(e,"ArrowLeft",37)},t.ArrowRight=function(e){return i(e,"ArrowRight",39)},t.ArrowUp=function(e){return i(e,"ArrowUp",38)},t.Comma=function(e){return i(e,",",44)},t.End=function(e){return i(e,"End",35)},t.Enter=function(e){return i(e,"Enter",13)},t.Escape=function(e){return i(e,"Escape",27)},t.Home=function(e){return i(e,"Home",36)},t.Space=function(e){return i(e,"Space",32)},t.Tab=function(e){return i(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(...i){return!t&&(t=!0,e(...i).finally((()=>{t=!1})),!0)}}})),define("WoltLabSuite/Core/Image/ExifUtil",["require","exports"],(function(e,t){"use strict";function i(e){return e===s||e===l||e===c}function n(...e){let t=0;const i=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(i);return e.forEach((e=>{n.set(e,t),t+=e.length})),n}async function o(e){return new Promise(((t,i)=>{const n=new FileReader;n.addEventListener("error",(()=>{n.abort(),i(n.error)})),n.addEventListener("load",(()=>{t(new Uint8Array(n.result))})),n.readAsArrayBuffer(e)}))}async function r(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);if(255!==t[0]&&t[1]!==a.SOI)throw new Error("Not a JPEG");let r=t;for(let e=2;e{const n=new FileReader,o=new Image;n.addEventListener("load",(()=>{o.src=n.result})),n.addEventListener("error",(()=>{n.abort(),t(n.error)})),o.addEventListener("error",t),o.addEventListener("load",(()=>{e(o)})),n.readAsDataURL(i)})),[r,a]=await Promise.all([t,n]);return{exif:r,image:a}}async resize(e,t=this.maxWidth,i=this.maxHeight,n=this.quality,o=!1,r){const s=document.createElement("canvas");if(window.createImageBitmap&&(await createImageBitmap(e)).height!=e.height)throw new Error("Chrome Bug #1069965");const l=Math.min(t,e.width),c=Math.min(i,e.height);if(e.width<=l&&e.height<=c&&!o)return;const d=Math.min(l/e.width,c/e.height);s.width=Math.floor(e.width*d),s.height=Math.floor(e.height*d);let u=1;n>=.8?u=3:n>=.4&&(u=2);const p={quality:u,cancelToken:r,alpha:!0};return a.resize(e,s,p)}}})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";function s(e,t,i){const o=u.get(e);if(void 0===i&&void 0===(i=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),n.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=i.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),o.dropdownToggle.append(r),u.set(e,o),"function"==typeof o.callback&&o.callback(i)}function l(e){const t=e.currentTarget;p.get(t).forEach((e=>{const i=document.createElement("input");i.type="hidden",i.name=e,i.value=d(e).toString(),t.appendChild(i)}))}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,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a);const u=new Map,p=new WeakMap;t.init=function(e,t,i,n,c,d){if(u.has(t))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let h=document.getElementById(t);null===h&&(h=document.createElement("input"),h.type="hidden",h.id=t,h.name=t,h.value=i.toString(),m.appendChild(h)),function(e,t,i,n,c,d){function m(t){const i=t.currentTarget,n=~~i.dataset.languageId,o=b.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active"),s(e,n,i)}let h;const f=t.parentElement;"DD"===f.nodeName?(h=document.createElement("div"),h.className="dropdown",f.insertAdjacentElement("afterbegin",h)):(h=f,h.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"),h.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",h.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(n).forEach((([e,t])=>{const n=document.createElement("li");n.className="boxFlag",n.addEventListener("click",m),n.dataset.languageId=e,void 0!==t.languageCode&&(n.dataset.languageCode=t.languageCode),b.appendChild(n);const o=document.createElement("a");o.className="box24",o.href="#",o.addEventListener("click",(e=>e.preventDefault())),n.appendChild(o);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",o.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,o.appendChild(a),+e===i&&(g.innerHTML=o.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",m),b.appendChild(t);const n=document.createElement("a");n.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(n),0===i&&(g.innerHTML=n.innerHTML,g.append(v)),t.addEventListener("click",m)}else if(0===i){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 i=document.createElement("span");i.textContent=o.get("wcf.global.language.noSelection"),i.append(t),e.appendChild(i)}a.default.init(g),u.set(e,{callback:c,dropdownMenu:b,dropdownToggle:g,element:t});const _=t.closest("form");if(null!==_){_.addEventListener("submit",l);let t=p.get(_);void 0===t&&(t=[],p.set(_,t)),t.push(e)}}(t,h,i,n,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,i,n,o,r,a){"use strict";function s(e,t,i){const n=d.get(e),o=r.default.getDropdownMenu(n.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=o?o.textContent:"";if(n.languageId!==t){const o=p.get(e);if(n.languageId){const e=n.callbacks.get("beforeSelect");e&&e(n.element),o.set(n.languageId,n.element.value)}if(0===t?p.set(e,new Map):(n.buttonLabel.classList.contains("active")||i)&&(n.element.value=o.get(t)||""),n.buttonLabel.textContent=a,n.buttonLabel.querySelector("fa-icon")?.remove(),t){n.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),n.buttonLabel.append(e)}else n.buttonLabel.classList.remove("active");n.languageId=t}i||(n.element.blur(),n.element.focus()),n.callbacks.has("select")&&n.callbacks.get("select")(n.element)}function l(e,t){if("open"!==t)return;const i=r.default.getDropdownMenu(e),n=document.getElementById(e).dataset.inputId,o=d.get(n),a=p.get(n);Array.from(i.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let i=!1;o.languageId&&(i=t===o.languageId?""===o.element.value.trim():!a.get(t));const n=e.querySelector("span");if(n.querySelector("fa-icon")?.remove(),i){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),n.append(t)}else e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const i=d.get(e);if(!i.isEnabled)return;const n=p.get(e);i.callbacks.has("submit")&&i.callbacks.get("submit")(i.element),i.languageId&&n.set(i.languageId,i.element.value),n.size&&(n.forEach((function(i,n){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${n}]`,o.value=i,t.appendChild(o)})),i.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,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);const d=new Map,u=new WeakMap,p=new Map;t.init=function(e,t,i,n){if(p.has(e))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const h=new Map;Object.entries(t).forEach((([e,t])=>{h.set(+e,a.unescapeHTML(t))})),p.set(e,h),function(e,t,i,n,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 i=document.activeElement===t;t.insertAdjacentElement("beforebegin",p),p.appendChild(t),i&&t.focus()}p.classList.add("dropdown");const m=document.createElement("span");m.className="button dropdownToggle inputPrefix";const h=document.createElement("span");h.textContent=o.get("wcf.global.button.disabledI18n"),m.appendChild(h),p.insertBefore(m,t);const f=document.createElement("ul");f.className="dropdownMenu",m.insertAdjacentElement("afterend",f);const g=t=>{let i;i=t instanceof HTMLElement?t:t.currentTarget;const n=~~i.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active");const r=t instanceof HTMLElement;s(e,n,r)};if(Object.entries(n).forEach((([e,t])=>{const i=document.createElement("li");i.dataset.languageId=e;const n=document.createElement("span");n.textContent=t,i.appendChild(n),i.addEventListener("click",g),f.appendChild(i)})),!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 i=document.createElement("span");i.textContent=o.get("wcf.global.button.disabledI18n"),t.appendChild(i),f.appendChild(t)}let b;(a||i.size)&&(b=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(m),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:h,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,m,h,i,n)},t.registerCallback=function(e,t,i){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,i)},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 i=p.get(e);return i.set(t.languageId,t.element.value),i},t.setValues=function(e,t){const i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);i.element.value="";const n=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(n.has(0))return i.element.value=n.get(0),n.delete(0),p.set(e,n),void s(e,0,!0);p.set(e,n),i.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 i=t.buttonLabel.parentElement;n.default.hide(i),i.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 i=t.buttonLabel.parentElement;n.default.show(i),i.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 i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(!i.isEnabled)return!0;const n=p.get(e),o=r.default.getDropdownMenu(i.element.parentElement.id);i.languageId&&n.set(i.languageId,i.element.value);let a=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(n.has(t)&&0!==n.get(t).length){if(a)return!1;s=!0}else{if(s)return!1;a=!0}})),!a||t}})),define("WoltLabSuite/Core/Language/Text",["require","exports","tslib","./Input","../Component/Ckeditor"],(function(e,t,i,n,o){"use strict";function r(e){(0,o.getCkeditor)(e).setHtml(e.value)}function a(e){e.value=(0,o.getCkeditor)(e).getHtml()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),t.init=function(e,t,i,o){const s=document.getElementById(e);if(!s||"TEXTAREA"!==s.nodeName||!s.classList.contains("wysiwygTextarea"))throw new Error(`Expected \n `;const c=l.querySelector("textarea");return i.content.append(l),i.show(e),new Promise((e=>{i.addEventListener("primary",(()=>{e({result:!0,reason:c.value.trim()})})),i.addEventListener("cancel",(()=>{e({result:!1,reason:""})}))}))}}t.confirmationFactory=function(){return new s}})),define("WoltLabSuite/Core/Component/GuestTokenDialog",["require","exports","tslib","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/User"],(function(e,t,i,n,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGuestToken=void 0,o=i.__importDefault(o),t.getGuestToken=async function(){const{ok:e,result:t}=await(0,n.dialogFactory)().usingFormBuilder().fromEndpoint(o.default.guestTokenDialogEndpoint);if(e)return t.token}})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports"],(function(e,t){"use strict";return class{_callback;_delta;_timer;constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||t>864e5)throw new RangeError(`Invalid delta ${t}. Delta must be in the interval [0, 86400000].`);this._callback=e.bind(void 0,this),this._delta=t,this.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}})),define("WoltLabSuite/Core/Component/Popover/SharedCache",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedCache=void 0;class n{#Q=new Map;#J;constructor(e){this.#J=new URL(e)}async get(e){let t=this.#Q.get(e);if(void 0!==t)return t;this.#J.searchParams.set("id",e.toString());const n=await(0,i.prepareRequest)(this.#J).get().fetchAsResponse();return n?.ok?(t=await n.text(),this.#Q.set(e,t),t):""}reset(e){this.#Q.delete(e)}}t.SharedCache=n,t.default=n})),define("WoltLabSuite/Core/Component/Popover",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Helper/Selector","../Timer/Repeating","../Ui/Alignment","./Popover/SharedCache"],(function(e,t,i,n,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetCache=t.setupFor=void 0,n=i.__importDefault(n),a=i.__importDefault(a),s=i.__importStar(s),l=i.__importDefault(l);class c{#K;#Z=void 0;#ee=!0;#M;#te;#ie=void 0;#ne=void 0;constructor(e,t,i){this.#K=e,this.#M=t,this.#te=i,t.addEventListener("mouseenter",(()=>{this.#oe()})),t.addEventListener("mouseleave",(()=>{this.#re()}));const n=window.matchMedia("(hover:hover)");this.#ae(n.matches),n.addEventListener("change",(e=>{this.#ae(e.matches)})),window.addEventListener("beforeunload",(()=>{this.#ae(!1)})),this.#oe()}#oe(){this.#ee&&(this.#ne?.stop(),void 0===this.#ie?this.#ie=new a.default((e=>{e.stop();const t=this.#se();this.#K.get(t).then((e=>{if(""===e)return;const t=this.#le();n.default.setInnerHtml(t,e),s.set(t,this.#M,{vertical:"top"}),t.setAttribute("aria-hidden","false")}))}),800):this.#ie.restart())}#re(){this.#ee&&(this.#ie?.stop(),void 0===this.#ne?this.#ne=new a.default((e=>{e.stop(),this.#Z?.setAttribute("aria-hidden","true")}),500):this.#ne.restart())}#ae(e){this.#ee=e,this.#Z?.setAttribute("aria-hidden","true")}#se(){return parseInt(this.#M.dataset.objectId)}#le(){return void 0===this.#Z&&(this.#Z=document.createElement("div"),this.#Z.classList.add("popoverContainer"),this.#Z.dataset.identifier=this.#te,this.#Z.setAttribute("aria-hidden","true"),this.#Z.addEventListener("transitionend",(()=>{"true"===this.#Z.getAttribute("aria-hidden")&&this.#Z.remove()})),this.#Z.addEventListener("mouseenter",(()=>{this.#ne?.stop()})),this.#Z.addEventListener("mouseleave",(()=>{this.#re()}))),null===this.#Z.parentNode&&(0,o.getPageOverlayContainer)().append(this.#Z),this.#Z}}const d=new Map;t.setupFor=function(e){const{identifier:t,endpoint:i,selector:n}=e,o=new l.default(i);d.set(t,o),(0,r.wheneverFirstSeen)(n,(e=>{null===e.closest(".popover, .popoverContainer")&&e.addEventListener("mouseenter",(()=>{new c(o,e,t)}),{once:!0})}))},t.resetCache=function(e,t){d.get(e).reset(t)}})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const i=new Map,n={add(e,t){if(i.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'.");i.set(e,t)},delete(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);i.delete(e)},has:e=>i.has(e),getData(e){if(!i.has(e))throw new Error(`Unknown captcha with id '${e}'.`);return i.get(e)()},setupDialog(e,t){let i;return e.addEventListener("validate",(e=>{n.has(t)&&(i=n.getData(t),n.delete(t),i instanceof Promise&&(e.detail.push(new Promise((e=>{i.then((()=>{e(!0)})).catch((()=>{e(!1)}))}))),e.preventDefault()))})),new Promise((t=>{e.addEventListener("primary",(()=>{void 0!==i?i instanceof Promise?i.then((e=>{t(e)})):t(i):t({})}))}))}};return n})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,i,n,o,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,n=i.__importStar(n),o=i.__importDefault(o),r=i.__importDefault(r),a=i.__importStar(a),s=i.__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),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()})),o.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((i=>{const n=r.default.identify(i);if(this.cache.has(n))return;if(null!==i.closest(".popover, .popoverContainer"))return void this.cache.set(n,{content:null,state:0});const o=e.legacy?n:~~i.getAttribute(e.attributeName);if(0===o)return;i.addEventListener("mouseenter",(e=>this.mouseEnter(e))),i.addEventListener("mouseleave",(()=>this.mouseLeave())),i instanceof HTMLAnchorElement&&i.href&&i.addEventListener("click",(()=>this.hidePopover()));const a=`${t}-${o}`;i.dataset.cacheId=a,this.elements.set(n,{element:i,identifier:t,objectId:o.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,i){const n=`${e}-${t}`,o=this.cache.get(n);if(void 0===o)throw new Error(`Unable to find element for object id '${t}' (identifier: '${e}').`);let a=r.default.createFragmentFromHtml(i);a.childElementCount||(a=r.default.createFragmentFromHtml("

    "+i+"

    ")),o.content=a,o.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===n&&this.show()}resetCache(e,t){const i=`${e}-${t}`;this.cache.has(i)&&this.cache.set(i,{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 i=t.element.dataset.cacheId,n=this.cache.get(i);switch(n.state){case 2:this.popoverContent.appendChild(n.content),this.rebuild();break;case 0:{n.state=1;const e=this.handlers.get(t.identifier);if(e.loadCallback)e.loadCallback(t.objectId,this,t.element);else if(e.dboAction){const i=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]},i,i)}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,{vertical:"top"}))}_ajaxSuccess(){}_ajaxSetup(){return{ignoreError:!0,silent:!0}}ajaxApi(e,t,i){if("function"!=typeof t)throw new TypeError("Expected a valid callback for parameter 'success'.");n.api(this,e,t,i)}}let d;t.init=function(e){l().init(e)},t.setContent=function(e,t,i){l().setContent(e,t,i)},t.ajaxApi=function(e,t,i){l().ajaxApi(e,t,i)},t.resetCache=function(e,t){l().resetCache(e,t)}})),define("WoltLabSuite/Core/Event/Key",["require","exports"],(function(e,t){"use strict";function i(e,t,i){if(!(e instanceof Event))throw new TypeError("Expected a valid event when testing for key '"+t+"'.");return e.key===t||e.which===i}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 i(e,"ArrowDown",40)},t.ArrowLeft=function(e){return i(e,"ArrowLeft",37)},t.ArrowRight=function(e){return i(e,"ArrowRight",39)},t.ArrowUp=function(e){return i(e,"ArrowUp",38)},t.Comma=function(e){return i(e,",",44)},t.End=function(e){return i(e,"End",35)},t.Enter=function(e){return i(e,"Enter",13)},t.Escape=function(e){return i(e,"Escape",27)},t.Home=function(e){return i(e,"Home",36)},t.Space=function(e){return i(e,"Space",32)},t.Tab=function(e){return i(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(...i){return!t&&(t=!0,e(...i).finally((()=>{t=!1})),!0)}}})),define("WoltLabSuite/Core/Image/ExifUtil",["require","exports"],(function(e,t){"use strict";function i(e){return e===s||e===l||e===c}function n(...e){let t=0;const i=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(i);return e.forEach((e=>{n.set(e,t),t+=e.length})),n}async function o(e){return new Promise(((t,i)=>{const n=new FileReader;n.addEventListener("error",(()=>{n.abort(),i(n.error)})),n.addEventListener("load",(()=>{t(new Uint8Array(n.result))})),n.readAsArrayBuffer(e)}))}async function r(e){if(!(e instanceof Blob||e instanceof File))throw new TypeError("The argument must be a Blob or a File");const t=await o(e);if(255!==t[0]&&t[1]!==a.SOI)throw new Error("Not a JPEG");let r=t;for(let e=2;e{const n=new FileReader,o=new Image;n.addEventListener("load",(()=>{o.src=n.result})),n.addEventListener("error",(()=>{n.abort(),t(n.error)})),o.addEventListener("error",t),o.addEventListener("load",(()=>{e(o)})),n.readAsDataURL(i)})),[r,a]=await Promise.all([t,n]);return{exif:r,image:a}}async resize(e,t=this.maxWidth,i=this.maxHeight,n=this.quality,o=!1,r){const s=document.createElement("canvas");if(window.createImageBitmap&&(await createImageBitmap(e)).height!=e.height)throw new Error("Chrome Bug #1069965");const l=Math.min(t,e.width),c=Math.min(i,e.height);if(e.width<=l&&e.height<=c&&!o)return;const d=Math.min(l/e.width,c/e.height);s.width=Math.floor(e.width*d),s.height=Math.floor(e.height*d);let u=1;n>=.8?u=3:n>=.4&&(u=2);const p={quality:u,cancelToken:r,alpha:!0};return a.resize(e,s,p)}}})),define("WoltLabSuite/Core/Language/Chooser",["require","exports","tslib","../Core","../Language","../Dom/Util","../Ui/Dropdown/Simple"],(function(e,t,i,n,o,r,a){"use strict";function s(e,t,i){const o=u.get(e);if(void 0===i&&void 0===(i=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),n.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=i.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),o.dropdownToggle.append(r),u.set(e,o),"function"==typeof o.callback&&o.callback(i)}function l(e){const t=e.currentTarget;p.get(t).forEach((e=>{const i=document.createElement("input");i.type="hidden",i.name=e,i.value=d(e).toString(),t.appendChild(i)}))}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,n=i.__importStar(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importDefault(a);const u=new Map,p=new WeakMap;t.init=function(e,t,i,n,c,d){if(u.has(t))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let h=document.getElementById(t);null===h&&(h=document.createElement("input"),h.type="hidden",h.id=t,h.name=t,h.value=i.toString(),m.appendChild(h)),function(e,t,i,n,c,d){function m(t){const i=t.currentTarget,n=~~i.dataset.languageId,o=b.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active"),s(e,n,i)}let h;const f=t.parentElement;"DD"===f.nodeName?(h=document.createElement("div"),h.className="dropdown",f.insertAdjacentElement("afterbegin",h)):(h=f,h.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"),h.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",h.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(n).forEach((([e,t])=>{const n=document.createElement("li");n.className="boxFlag",n.addEventListener("click",m),n.dataset.languageId=e,void 0!==t.languageCode&&(n.dataset.languageCode=t.languageCode),b.appendChild(n);const o=document.createElement("a");o.className="box24",o.href="#",o.addEventListener("click",(e=>e.preventDefault())),n.appendChild(o);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",o.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,o.appendChild(a),+e===i&&(g.innerHTML=o.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",m),b.appendChild(t);const n=document.createElement("a");n.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(n),0===i&&(g.innerHTML=n.innerHTML,g.append(v)),t.addEventListener("click",m)}else if(0===i){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 i=document.createElement("span");i.textContent=o.get("wcf.global.language.noSelection"),i.append(t),e.appendChild(i)}a.default.init(g),u.set(e,{callback:c,dropdownMenu:b,dropdownToggle:g,element:t});const _=t.closest("form");if(null!==_){_.addEventListener("submit",l);let t=p.get(_);void 0===t&&(t=[],p.set(_,t)),t.push(e)}}(t,h,i,n,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,i,n,o,r,a){"use strict";function s(e,t,i){const n=d.get(e),o=r.default.getDropdownMenu(n.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=o?o.textContent:"";if(n.languageId!==t){const o=p.get(e);if(n.languageId){const e=n.callbacks.get("beforeSelect");e&&e(n.element),o.set(n.languageId,n.element.value)}if(0===t?p.set(e,new Map):(n.buttonLabel.classList.contains("active")||i)&&(n.element.value=o.get(t)||""),n.buttonLabel.textContent=a,n.buttonLabel.querySelector("fa-icon")?.remove(),t){n.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),n.buttonLabel.append(e)}else n.buttonLabel.classList.remove("active");n.languageId=t}i||(n.element.blur(),n.element.focus()),n.callbacks.has("select")&&n.callbacks.get("select")(n.element)}function l(e,t){if("open"!==t)return;const i=r.default.getDropdownMenu(e),n=document.getElementById(e).dataset.inputId,o=d.get(n),a=p.get(n);Array.from(i.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let i=!1;o.languageId&&(i=t===o.languageId?""===o.element.value.trim():!a.get(t));const n=e.querySelector("span");if(n.querySelector("fa-icon")?.remove(),i){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),n.append(t)}else e.classList.remove("missingValue")}}))}function c(e){const t=e.currentTarget;u.get(t).forEach((e=>{const i=d.get(e);if(!i.isEnabled)return;const n=p.get(e);i.callbacks.has("submit")&&i.callbacks.get("submit")(i.element),i.languageId&&n.set(i.languageId,i.element.value),n.size&&(n.forEach((function(i,n){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${n}]`,o.value=i,t.appendChild(o)})),i.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,n=i.__importDefault(n),o=i.__importStar(o),r=i.__importDefault(r),a=i.__importStar(a);const d=new Map,u=new WeakMap,p=new Map;t.init=function(e,t,i,n){if(p.has(e))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const h=new Map;Object.entries(t).forEach((([e,t])=>{h.set(+e,a.unescapeHTML(t))})),p.set(e,h),function(e,t,i,n,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 i=document.activeElement===t;t.insertAdjacentElement("beforebegin",p),p.appendChild(t),i&&t.focus()}p.classList.add("dropdown");const m=document.createElement("span");m.className="button dropdownToggle inputPrefix";const h=document.createElement("span");h.textContent=o.get("wcf.global.button.disabledI18n"),m.appendChild(h),p.insertBefore(m,t);const f=document.createElement("ul");f.className="dropdownMenu",m.insertAdjacentElement("afterend",f);const g=t=>{let i;i=t instanceof HTMLElement?t:t.currentTarget;const n=~~i.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),n&&i.classList.add("active");const r=t instanceof HTMLElement;s(e,n,r)};if(Object.entries(n).forEach((([e,t])=>{const i=document.createElement("li");i.dataset.languageId=e;const n=document.createElement("span");n.textContent=t,i.appendChild(n),i.addEventListener("click",g),f.appendChild(i)})),!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 i=document.createElement("span");i.textContent=o.get("wcf.global.button.disabledI18n"),t.appendChild(i),f.appendChild(t)}let b;(a||i.size)&&(b=Array.from(f.children).find((e=>+e.dataset.languageId===window.LANGUAGE_ID))),r.default.init(m),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:h,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,m,h,i,n)},t.registerCallback=function(e,t,i){if(!p.has(e))throw new Error(`Unknown element id '${e}'.`);d.get(e).callbacks.set(t,i)},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 i=p.get(e);return i.set(t.languageId,t.element.value),i},t.setValues=function(e,t){const i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);i.element.value="";const n=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(n.has(0))return i.element.value=n.get(0),n.delete(0),p.set(e,n),void s(e,0,!0);p.set(e,n),i.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 i=t.buttonLabel.parentElement;n.default.hide(i),i.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 i=t.buttonLabel.parentElement;n.default.show(i),i.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 i=d.get(e);if(void 0===i)throw new Error(`Expected a valid i18n input element, '${e}' is not i18n input field.`);if(!i.isEnabled)return!0;const n=p.get(e),o=r.default.getDropdownMenu(i.element.parentElement.id);i.languageId&&n.set(i.languageId,i.element.value);let a=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(n.has(t)&&0!==n.get(t).length){if(a)return!1;s=!0}else{if(s)return!1;a=!0}})),!a||t}})),define("WoltLabSuite/Core/Language/Text",["require","exports","tslib","./Input","../Component/Ckeditor"],(function(e,t,i,n,o){"use strict";function r(e){(0,o.getCkeditor)(e).setHtml(e.value)}function a(e){e.value=(0,o.getCkeditor)(e).getHtml()}Object.defineProperty(t,"__esModule",{value:!0}),t.init=void 0,n=i.__importStar(n),t.init=function(e,t,i,o){const s=document.getElementById(e);if(!s||"TEXTAREA"!==s.nodeName||!s.classList.contains("wysiwygTextarea"))throw new Error(`Expected \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/Component/GuestTokenDialog",["require","exports","tslib","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/User"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGuestToken=void 0,o=n.__importDefault(o),t.getGuestToken=async function(){const{ok:e,result:t}=await(0,i.dialogFactory)().usingFormBuilder().fromEndpoint(o.default.guestTokenDialogEndpoint);if(e)return t.token}})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports"],(function(e,t){"use strict";return class{_callback;_delta;_timer;constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||t>864e5)throw new RangeError(`Invalid delta ${t}. Delta must be in the interval [0, 86400000].`);this._callback=e.bind(void 0,this),this._delta=t,this.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}})),define("WoltLabSuite/Core/Component/Popover/SharedCache",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedCache=void 0;class i{#M=new Map;#A;constructor(e){this.#A=new URL(e)}async get(e){let t=this.#M.get(e);if(void 0!==t)return t;this.#A.searchParams.set("id",e.toString());const i=await(0,n.prepareRequest)(this.#A).get().fetchAsResponse();return i?.ok?(t=await i.text(),this.#M.set(e,t),t):""}reset(e){this.#M.delete(e)}}t.SharedCache=i,t.default=i})),define("WoltLabSuite/Core/Component/Popover",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Helper/Selector","../Timer/Repeating","../Ui/Alignment","./Popover/SharedCache"],(function(e,t,n,i,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetCache=t.setupFor=void 0,i=n.__importDefault(i),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importDefault(l);class c{#P;#D=void 0;#j=!0;#O;#q;#B=void 0;#F=void 0;constructor(e,t,n){this.#P=e,this.#O=t,this.#q=n,t.addEventListener("mouseenter",(()=>{this.#R()})),t.addEventListener("mouseleave",(()=>{this.#N()}));const i=window.matchMedia("(hover:hover)");this.#U(i.matches),i.addEventListener("change",(e=>{this.#U(e.matches)})),window.addEventListener("beforeunload",(()=>{this.#U(!1)})),this.#R()}#R(){this.#j&&(this.#F?.stop(),void 0===this.#B?this.#B=new a.default((e=>{e.stop();const t=this.#W();this.#P.get(t).then((e=>{if(""===e)return;const t=this.#H();i.default.setInnerHtml(t,e),s.set(t,this.#O,{vertical:"top"}),t.setAttribute("aria-hidden","false")}))}),800):this.#B.restart())}#N(){this.#j&&(this.#B?.stop(),void 0===this.#F?this.#F=new a.default((e=>{e.stop(),this.#D?.setAttribute("aria-hidden","true")}),500):this.#F.restart())}#U(e){this.#j=e,this.#D?.setAttribute("aria-hidden","true")}#W(){return parseInt(this.#O.dataset.objectId)}#H(){return void 0===this.#D&&(this.#D=document.createElement("div"),this.#D.classList.add("popoverContainer"),this.#D.dataset.identifier=this.#q,this.#D.setAttribute("aria-hidden","true"),this.#D.addEventListener("transitionend",(()=>{"true"===this.#D.getAttribute("aria-hidden")&&this.#D.remove()})),this.#D.addEventListener("mouseenter",(()=>{this.#F?.stop()})),this.#D.addEventListener("mouseleave",(()=>{this.#N()}))),null===this.#D.parentNode&&(0,o.getPageOverlayContainer)().append(this.#D),this.#D}}const d=new Map;t.setupFor=function(e){const{identifier:t,endpoint:n,selector:i}=e,o=new l.default(n);d.set(t,o),(0,r.wheneverFirstSeen)(i,(e=>{null===e.closest(".popoverContainer")&&e.addEventListener("mouseenter",(()=>{new c(o,e,t)}),{once:!0})}))},t.resetCache=function(e,t){d.get(e).reset(t)}})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const n=new Map,i={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=>{i.has(t)&&(n=i.getData(t),i.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 i})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,n,i,o,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,i=n.__importStar(i),o=n.__importDefault(o),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),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()})),o.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 i=r.default.identify(n);if(this.cache.has(i))return;if(null!==n.closest(".popover"))return void this.cache.set(i,{content:null,state:0});const o=e.legacy?i:~~n.getAttribute(e.attributeName);if(0===o)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}-${o}`;n.dataset.cacheId=a,this.elements.set(i,{element:n,identifier:t,objectId:o.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,n){const i=`${e}-${t}`,o=this.cache.get(i);if(void 0===o)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+"

    ")),o.content=a,o.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===i&&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,i=this.cache.get(n);switch(i.state){case 2:this.popoverContent.appendChild(i.content),this.rebuild();break;case 0:{i.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,{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'.");i.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/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,i,o,r,a){"use strict";function s(e,t,n){const o=u.get(e);if(void 0===n&&void 0===(n=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),i.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=n.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),o.dropdownToggle.append(r),u.set(e,o),"function"==typeof o.callback&&o.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,i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a);const u=new Map,p=new WeakMap;t.init=function(e,t,n,i,c,d){if(u.has(t))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let h=document.getElementById(t);null===h&&(h=document.createElement("input"),h.type="hidden",h.id=t,h.name=t,h.value=n.toString(),m.appendChild(h)),function(e,t,n,i,c,d){function m(t){const n=t.currentTarget,i=~~n.dataset.languageId,o=b.querySelector(".active");null!==o&&o.classList.remove("active"),i&&n.classList.add("active"),s(e,i,n)}let h;const f=t.parentElement;"DD"===f.nodeName?(h=document.createElement("div"),h.className="dropdown",f.insertAdjacentElement("afterbegin",h)):(h=f,h.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"),h.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",h.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(i).forEach((([e,t])=>{const i=document.createElement("li");i.className="boxFlag",i.addEventListener("click",m),i.dataset.languageId=e,void 0!==t.languageCode&&(i.dataset.languageCode=t.languageCode),b.appendChild(i);const o=document.createElement("a");o.className="box24",o.href="#",o.addEventListener("click",(e=>e.preventDefault())),i.appendChild(o);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",o.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,o.appendChild(a),+e===n&&(g.innerHTML=o.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",m),b.appendChild(t);const i=document.createElement("a");i.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(i),0===n&&(g.innerHTML=i.innerHTML,g.append(v)),t.addEventListener("click",m)}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=o.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,h,n,i,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,i,o,r,a){"use strict";function s(e,t,n){const i=d.get(e),o=r.default.getDropdownMenu(i.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=o?o.textContent:"";if(i.languageId!==t){const o=p.get(e);if(i.languageId){const e=i.callbacks.get("beforeSelect");e&&e(i.element),o.set(i.languageId,i.element.value)}if(0===t?p.set(e,new Map):(i.buttonLabel.classList.contains("active")||n)&&(i.element.value=o.get(t)||""),i.buttonLabel.textContent=a,i.buttonLabel.querySelector("fa-icon")?.remove(),t){i.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),i.buttonLabel.append(e)}else i.buttonLabel.classList.remove("active");i.languageId=t}n||(i.element.blur(),i.element.focus()),i.callbacks.has("select")&&i.callbacks.get("select")(i.element)}function l(e,t){if("open"!==t)return;const n=r.default.getDropdownMenu(e),i=document.getElementById(e).dataset.inputId,o=d.get(i),a=p.get(i);Array.from(n.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let n=!1;o.languageId&&(n=t===o.languageId?""===o.element.value.trim():!a.get(t));const i=e.querySelector("span");if(i.querySelector("fa-icon")?.remove(),n){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),i.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 i=p.get(e);n.callbacks.has("submit")&&n.callbacks.get("submit")(n.element),n.languageId&&i.set(n.languageId,n.element.value),i.size&&(i.forEach((function(n,i){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${i}]`,o.value=n,t.appendChild(o)})),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,i=n.__importDefault(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a);const d=new Map,u=new WeakMap,p=new Map;t.init=function(e,t,n,i){if(p.has(e))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const h=new Map;Object.entries(t).forEach((([e,t])=>{h.set(+e,a.unescapeHTML(t))})),p.set(e,h),function(e,t,n,i,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 m=document.createElement("span");m.className="button dropdownToggle inputPrefix";const h=document.createElement("span");h.textContent=o.get("wcf.global.button.disabledI18n"),m.appendChild(h),p.insertBefore(m,t);const f=document.createElement("ul");f.className="dropdownMenu",m.insertAdjacentElement("afterend",f);const g=t=>{let n;n=t instanceof HTMLElement?t:t.currentTarget;const i=~~n.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),i&&n.classList.add("active");const r=t instanceof HTMLElement;s(e,i,r)};if(Object.entries(i).forEach((([e,t])=>{const n=document.createElement("li");n.dataset.languageId=e;const i=document.createElement("span");i.textContent=t,n.appendChild(i),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=o.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(m),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:h,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,m,h,n,i)},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 i=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(i.has(0))return n.element.value=i.get(0),i.delete(0),p.set(e,i),void s(e,0,!0);p.set(e,i),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;i.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;i.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 i=p.get(e),o=r.default.getDropdownMenu(n.element.parentElement.id);n.languageId&&i.set(n.languageId,n.element.value);let a=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(i.has(t)&&0!==i.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{#O;constructor(e){this.#O=e}collectMetaData(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:collect-meta-data",{detail:e}))}changeData(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:change-data"))}destroy(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:destroy"))}discardRecoveredData(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:discard-recovered-data"))}autosave(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:autosave",{detail:e}))}insertAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:insert-attachment",{detail:e}))}insertQuote(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:insert-quote",{detail:e}))}ready(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:ready",{detail:e}))}removeAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:remove-attachment",{detail:e}))}reset(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:reset",{detail:e}))}setupConfiguration(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:setup-configuration",{detail:e}))}setupFeatures(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:setup-features",{detail:e}))}submitOnEnter(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:submit-on-enter",{detail:e}))}uploadAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:upload-attachment",{detail:e}))}uploadMedia(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:upload-media",{detail:e}))}}class i{#O;constructor(e){this.#O=e}bbcode(e){return this.#O.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.#O.addEventListener("ckeditor5:change-data",(()=>{e()})),this}collectMetaData(e){return this.#O.addEventListener("ckeditor5:collect-meta-data",(t=>{e(t.detail)})),this}destroy(e){return this.#O.addEventListener("ckeditor5:destroy",(()=>{e()})),this}discardRecoveredData(e){return this.#O.addEventListener("ckeditor5:discard-recovered-data",(()=>{e()}),{once:!0}),this}insertAttachment(e){return this.#O.addEventListener("ckeditor5:insert-attachment",(t=>{e(t.detail)})),this}insertQuote(e){return this.#O.addEventListener("ckeditor5:insert-quote",(t=>{e(t.detail)})),this}ready(e){return this.#O.addEventListener("ckeditor5:ready",(t=>{e(t.detail)}),{once:!0}),this}removeAttachment(e){return this.#O.addEventListener("ckeditor5:remove-attachment",(t=>{e(t.detail)})),this}reset(e){return this.#O.addEventListener("ckeditor5:reset",(t=>{e(t.detail)})),this}setupConfiguration(e){return this.#O.addEventListener("ckeditor5:setup-configuration",(t=>{e(t.detail)}),{once:!0}),this}setupFeatures(e){return this.#O.addEventListener("ckeditor5:setup-features",(t=>{e(t.detail)}),{once:!0}),this}submitOnEnter(e){return this.#O.addEventListener("ckeditor5:submit-on-enter",(t=>{e(t.detail)})),this}uploadAttachment(e){return this.#O.addEventListener("ckeditor5:upload-attachment",(t=>{e(t.detail)})),this}uploadMedia(e){return this.#O.addEventListener("ckeditor5:upload-media",(t=>{e(t.detail)})),this}autosave(e){return this.#O.addEventListener("ckeditor5:autosave",(t=>{e(t.detail)})),this}}t.dispatchToCkeditor=function(e){return new n(e)},t.listenToCkeditor=function(e){return new i(e)}})),define("WoltLabSuite/Core/Component/Ckeditor/Attachment",["require","exports","./Event"],(function(e,t,n){"use strict";function i(e,t,i){const o={abortController:i,file:t};return(0,n.dispatchToCkeditor)(e).uploadAttachment(o),new Promise((e=>{o.promise.then((({attachmentId:t,url:n})=>{e({"data-attachment-id":t.toString(),urls:{default:n}})})).catch((()=>{}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,n.listenToCkeditor)(e).setupConfiguration((({configuration:t,features:o})=>{o.attachment&&(t.woltlabUpload={uploadImage:(t,n)=>i(e,t,n),uploadOther:t=>i(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,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=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 i(e,t,i){const o={abortController:i,file:t};return(0,n.dispatchToCkeditor)(e).uploadMedia(o),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})=>{!n.attachment&&n.media&&(e.woltlabUpload={uploadImage:(e,n)=>i(t,e,n),uploadOther:e=>i(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/Api/Messages/MentionSuggestions",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mentionSuggestions=void 0,t.mentionSuggestions=async function(e){const t=new URL(window.WSC_API_URL+"index.php?api/rpc/core/messages/mentionsuggestions");let o;t.searchParams.set("query",e);try{o=await(0,n.prepareRequest)(t).get().allowCaching().disableLoadingIndicator().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Component/Ckeditor/Mention",["require","exports","../../Dom/Util","./Event","WoltLabSuite/Core/Api/Messages/MentionSuggestions"],(function(e,t,n,i,o){"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){return e.length>24?[]:(await(0,o.mentionSuggestions)(e)).unwrap().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,n.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,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,i.listenToCkeditor)(e).ready((({ckeditor:t})=>{(0,i.listenToCkeditor)(e).insertQuote((e=>{!function(e,t){let{author:i,content:o,link:r}=t;var a;t.isText&&(a=o,o=(a=(a=(0,n.escapeHTML)(a)).replaceAll("\n\n\n\n\n",'


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

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

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


    `)}(t,e)}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Autosave",["require","exports","../../Core","../../Language","../../StringUtil","./Event"],(function(e,t,n,i,o,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,o.escapeHTML)((0,i.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 m=(e,t,n)=>{n&&u.focus()};e.ui.focusTracker.on("change:isFocused",m);const h=()=>{e.ui.focusTracker.off("change:isFocused",m),d.insertAdjacentElement("beforebegin",e.ui.element),d.remove()};u.querySelector('button[data-type="submit"]').addEventListener("click",(()=>{h()})),u.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{e.data.set(c),s(t),""===c&&(0,r.dispatchToCkeditor)(e.sourceElement).discardRecoveredData(),h()}));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,i;try{n=window.localStorage.getItem(t)}catch{return}if(null!==n){try{i=JSON.parse(n)}catch{}if(void 0===i||i.timestamp(function(e,t,n){if(""===n)return void s(t);const i={html:n,timestamp:Date.now()};try{window.localStorage.setItem(a(t),JSON.stringify(i)),(0,r.dispatchToCkeditor)(e).autosave(i)}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 i{#V;#$="|";#z=[];#Y=[];#G={};constructor(e){this.#V=e}#X(){this.#V.undo?this.#Y.push("undo","redo"):this.#z.push("Undo")}#K(){this.#Y.push("bold","italic")}#J(){const e=[];this.#V.heading?e.push("heading"):this.#z.push("Heading"),this.#V.underline?e.push("underline"):this.#z.push("Underline"),this.#V.strikethrough?e.push("strikethrough"):this.#z.push("Strikethrough"),e.push(this.#$),this.#V.mark?e.push("highlight"):this.#z.push("Highlight"),this.#V.fontColor?e.push("fontColor"):this.#z.push("FontColor"),this.#V.fontFamily?e.push("fontFamily"):this.#z.push("FontFamily"),this.#V.fontSize?e.push("fontSize"):this.#z.push("FontSize"),e.push(this.#$),this.#V.subscript?e.push("subscript"):this.#z.push("Subscript"),this.#V.superscript?e.push("superscript"):this.#z.push("Superscript"),0!==e.length&&e.push(this.#$,"removeFormat"),e.length>0&&(this.#Y.push({label:"woltlabToolbarGroup_format",items:e}),this.#G.format={icon:"ellipsis;false",label:(0,n.getPhrase)("wcf.editor.button.group.format")})}#Q(){this.#V.list?(this.#Y.push({label:"woltlabToolbarGroup_list",items:["bulletedList","numberedList","outdent","indent"]}),this.#G.list={icon:"list;false",label:(0,n.getPhrase)("wcf.editor.button.group.list")}):this.#z.push("List")}#Z(){this.#V.alignment?this.#Y.push("alignment"):this.#z.push("Alignment")}#ee(){this.#V.link?this.#Y.push("link"):this.#z.push("Link","LinkImage")}#te(){this.#V.image?(this.#Y.push("insertImage"),this.#V.attachment||this.#z.push("ImageUpload","ImageUploadUI","WoltlabAttachment")):this.#V.link&&this.#z.push("LinkImage")}#ne(){this.#V.codeBlock?this.#Y.push("codeBlock"):this.#z.push("CodeBlock","WoltlabCodeBlock"),this.#V.code?this.#Y.push("code"):this.#z.push("Code","WoltlabCode")}#ie(){this.#V.table?this.#Y.push("insertTable"):this.#z.push("Table","TableToolbar"),this.#V.quoteBlock?this.#Y.push("blockQuote"):this.#z.push("BlockQuote","WoltlabBlockQuote"),this.#V.spoiler?this.#Y.push("spoiler"):this.#z.push("WoltlabSpoiler"),this.#V.html?this.#Y.push("htmlEmbed"):this.#z.push("HtmlEmbed","WoltlabHtmlEmbed")}#oe(){this.#Y.push(this.#$)}#re(){this.#V.media||this.#z.push("WoltlabMedia")}#ae(){this.#V.mention||this.#z.push("Mention","WoltlabMention")}#se(){let e=!1;return this.#Y.filter((t=>"string"==typeof t&&t===this.#$?!!e&&(e=!1,!0):(e=!0,!0)))}build(){if(this.#z.length>0||this.#Y.length>0)throw new Error("Cannot build the configuration twice.");this.#X(),this.#oe(),this.#oe(),this.#K(),this.#ee(),this.#J(),this.#oe(),this.#Q(),this.#Z(),this.#oe(),this.#te(),this.#ne(),this.#ie(),this.#oe(),this.#re(),this.#ae()}toConfig(){const e=Object.keys(window.CKEDITOR_TRANSLATIONS).find((e=>"en"!==e)),t=e||"en",{dictionary:i}=window.CKEDITOR_TRANSLATIONS[t];return i.Author=(0,n.getPhrase)("wcf.ckeditor.quote.author"),i.Filename=(0,n.getPhrase)("wcf.ckeditor.code.fileName"),i["Line number"]=(0,n.getPhrase)("wcf.ckeditor.code.lineNumber"),i.Quote=(0,n.getPhrase)("wcf.ckeditor.quote"),i["Quote from %0"]=(0,n.getPhrase)("wcf.ckeditor.quoteFrom"),i.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.#z,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.#se(),ui:{poweredBy:{label:null},viewportOffset:{top:50}},woltlabToolbarGroup:this.#G,extraPlugins:[]}}}t.createConfigurationFor=function(e){const t=new i(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,i)=>{if(i.isSoft)return;i.preventDefault(),e.stop();const o=t.getHtml();""!==o&&(0,n.dispatchToCkeditor)(t.sourceElement).submitOnEnter({ckeditor:t,html:o})}),{priority:"high"})}})),define("WoltLabSuite/Core/Component/Ckeditor/Normalizer",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,i){"use strict";function o(e,t){const n=e.closest("p");if(null===n)return;const i=document.createElement("figure");i.classList.add("image",t),i.append(e),n.insertAdjacentElement("beforebegin",i),""===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&&i.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+=o}}}(n),function(e){e.querySelectorAll("img").forEach((e=>{e.classList.contains("messageFloatObjectRight")?o(e,"image-style-side"):e.classList.contains("messageFloatObjectLeft")&&o(e,"image-style-side-left")}))}(t),t.innerHTML}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLegacyMessage=t.normalizeLegacyHtml=void 0,i=n.__importDefault(i),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/Component/GuestTokenDialog",["require","exports","tslib","WoltLabSuite/Core/Component/Dialog","WoltLabSuite/Core/User"],(function(e,t,n,i,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getGuestToken=void 0,o=n.__importDefault(o),t.getGuestToken=async function(){const{ok:e,result:t}=await(0,i.dialogFactory)().usingFormBuilder().fromEndpoint(o.default.guestTokenDialogEndpoint);if(e)return t.token}})),define("WoltLabSuite/Core/Timer/Repeating",["require","exports"],(function(e,t){"use strict";return class{_callback;_delta;_timer;constructor(e,t){if("function"!=typeof e)throw new TypeError("Expected a valid callback as first argument.");if(t<0||t>864e5)throw new RangeError(`Invalid delta ${t}. Delta must be in the interval [0, 86400000].`);this._callback=e.bind(void 0,this),this._delta=t,this.restart()}restart(){this.stop(),this._timer=setInterval(this._callback,this._delta)}stop(){void 0!==this._timer&&(clearInterval(this._timer),this._timer=void 0)}setDelta(e){this._delta=e,this.restart()}}})),define("WoltLabSuite/Core/Component/Popover/SharedCache",["require","exports","WoltLabSuite/Core/Ajax/Backend"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedCache=void 0;class i{#M=new Map;#A;constructor(e){this.#A=new URL(e)}async get(e){let t=this.#M.get(e);if(void 0!==t)return t;this.#A.searchParams.set("id",e.toString());const i=await(0,n.prepareRequest)(this.#A).get().fetchAsResponse();return i?.ok?(t=await i.text(),this.#M.set(e,t),t):""}reset(e){this.#M.delete(e)}}t.SharedCache=i,t.default=i})),define("WoltLabSuite/Core/Component/Popover",["require","exports","tslib","../Dom/Util","../Helper/PageOverlay","../Helper/Selector","../Timer/Repeating","../Ui/Alignment","./Popover/SharedCache"],(function(e,t,n,i,o,r,a,s,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetCache=t.setupFor=void 0,i=n.__importDefault(i),a=n.__importDefault(a),s=n.__importStar(s),l=n.__importDefault(l);class c{#P;#D=void 0;#j=!0;#O;#q;#B=void 0;#F=void 0;constructor(e,t,n){this.#P=e,this.#O=t,this.#q=n,t.addEventListener("mouseenter",(()=>{this.#R()})),t.addEventListener("mouseleave",(()=>{this.#N()}));const i=window.matchMedia("(hover:hover)");this.#U(i.matches),i.addEventListener("change",(e=>{this.#U(e.matches)})),window.addEventListener("beforeunload",(()=>{this.#U(!1)})),this.#R()}#R(){this.#j&&(this.#F?.stop(),void 0===this.#B?this.#B=new a.default((e=>{e.stop();const t=this.#W();this.#P.get(t).then((e=>{if(""===e)return;const t=this.#H();i.default.setInnerHtml(t,e),s.set(t,this.#O,{vertical:"top"}),t.setAttribute("aria-hidden","false")}))}),800):this.#B.restart())}#N(){this.#j&&(this.#B?.stop(),void 0===this.#F?this.#F=new a.default((e=>{e.stop(),this.#D?.setAttribute("aria-hidden","true")}),500):this.#F.restart())}#U(e){this.#j=e,this.#D?.setAttribute("aria-hidden","true")}#W(){return parseInt(this.#O.dataset.objectId)}#H(){return void 0===this.#D&&(this.#D=document.createElement("div"),this.#D.classList.add("popoverContainer"),this.#D.dataset.identifier=this.#q,this.#D.setAttribute("aria-hidden","true"),this.#D.addEventListener("transitionend",(()=>{"true"===this.#D.getAttribute("aria-hidden")&&this.#D.remove()})),this.#D.addEventListener("mouseenter",(()=>{this.#F?.stop()})),this.#D.addEventListener("mouseleave",(()=>{this.#N()}))),null===this.#D.parentNode&&(0,o.getPageOverlayContainer)().append(this.#D),this.#D}}const d=new Map;t.setupFor=function(e){const{identifier:t,endpoint:n,selector:i}=e,o=new l.default(n);d.set(t,o),(0,r.wheneverFirstSeen)(i,(e=>{null===e.closest(".popover, .popoverContainer")&&e.addEventListener("mouseenter",(()=>{new c(o,e,t)}),{once:!0})}))},t.resetCache=function(e,t){d.get(e).reset(t)}})),define("WoltLabSuite/Core/Controller/Captcha",["require","exports"],(function(e,t){"use strict";const n=new Map,i={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=>{i.has(t)&&(n=i.getData(t),i.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 i})),define("WoltLabSuite/Core/Controller/Popover",["require","exports","tslib","../Ajax","../Dom/Change/Listener","../Dom/Util","../Environment","../Ui/Alignment"],(function(e,t,n,i,o,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,i=n.__importStar(i),o=n.__importDefault(o),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),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()})),o.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 i=r.default.identify(n);if(this.cache.has(i))return;if(null!==n.closest(".popover, .popoverContainer"))return void this.cache.set(i,{content:null,state:0});const o=e.legacy?i:~~n.getAttribute(e.attributeName);if(0===o)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}-${o}`;n.dataset.cacheId=a,this.elements.set(i,{element:n,identifier:t,objectId:o.toString()}),this.cache.has(a)||this.cache.set(a,{content:null,state:0})}))}setContent(e,t,n){const i=`${e}-${t}`,o=this.cache.get(i);if(void 0===o)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+"

    ")),o.content=a,o.state=2,this.activeId&&this.elements.get(this.activeId).element.dataset.cacheId===i&&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,i=this.cache.get(n);switch(i.state){case 2:this.popoverContent.appendChild(i.content),this.rebuild();break;case 0:{i.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,{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'.");i.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/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,i,o,r,a){"use strict";function s(e,t,n){const o=u.get(e);if(void 0===n&&void 0===(n=Array.from(o.dropdownMenu.children).find((e=>~~e.dataset.languageId===t))))throw new Error(`The language id '${t}' is unknown`);o.element.value=t.toString(),i.triggerEvent(o.element,"change"),o.dropdownToggle.innerHTML=n.children[0].innerHTML;const r=document.createElement("fa-icon");r.setIcon("caret-down",!0),o.dropdownToggle.append(r),u.set(e,o),"function"==typeof o.callback&&o.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,i=n.__importStar(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importDefault(a);const u=new Map,p=new WeakMap;t.init=function(e,t,n,i,c,d){if(u.has(t))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid container id, cannot find '${t}'.`);let h=document.getElementById(t);null===h&&(h=document.createElement("input"),h.type="hidden",h.id=t,h.name=t,h.value=n.toString(),m.appendChild(h)),function(e,t,n,i,c,d){function m(t){const n=t.currentTarget,i=~~n.dataset.languageId,o=b.querySelector(".active");null!==o&&o.classList.remove("active"),i&&n.classList.add("active"),s(e,i,n)}let h;const f=t.parentElement;"DD"===f.nodeName?(h=document.createElement("div"),h.className="dropdown",f.insertAdjacentElement("afterbegin",h)):(h=f,h.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"),h.appendChild(g);const b=document.createElement("ul");b.className="dropdownMenu",h.appendChild(b);const v=document.createElement("fa-icon");if(v.setIcon("caret-down",!0),Object.entries(i).forEach((([e,t])=>{const i=document.createElement("li");i.className="boxFlag",i.addEventListener("click",m),i.dataset.languageId=e,void 0!==t.languageCode&&(i.dataset.languageCode=t.languageCode),b.appendChild(i);const o=document.createElement("a");o.className="box24",o.href="#",o.addEventListener("click",(e=>e.preventDefault())),i.appendChild(o);const r=document.createElement("img");r.src=t.iconPath,r.alt="",r.className="iconFlag",r.height=15,r.width=24,r.loading="eager",o.appendChild(r);const a=document.createElement("span");a.textContent=t.languageName,o.appendChild(a),+e===n&&(g.innerHTML=o.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",m),b.appendChild(t);const i=document.createElement("a");i.textContent=o.get("wcf.global.language.noSelection"),t.appendChild(i),0===n&&(g.innerHTML=i.innerHTML,g.append(v)),t.addEventListener("click",m)}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=o.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,h,n,i,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,i,o,r,a){"use strict";function s(e,t,n){const i=d.get(e),o=r.default.getDropdownMenu(i.element.closest(".inputAddon").id).querySelector(`[data-language-id="${t}"]`),a=o?o.textContent:"";if(i.languageId!==t){const o=p.get(e);if(i.languageId){const e=i.callbacks.get("beforeSelect");e&&e(i.element),o.set(i.languageId,i.element.value)}if(0===t?p.set(e,new Map):(i.buttonLabel.classList.contains("active")||n)&&(i.element.value=o.get(t)||""),i.buttonLabel.textContent=a,i.buttonLabel.querySelector("fa-icon")?.remove(),t){i.buttonLabel.classList.add("active");const e=document.createElement("fa-icon");e.setIcon("caret-down",!0),i.buttonLabel.append(e)}else i.buttonLabel.classList.remove("active");i.languageId=t}n||(i.element.blur(),i.element.focus()),i.callbacks.has("select")&&i.callbacks.get("select")(i.element)}function l(e,t){if("open"!==t)return;const n=r.default.getDropdownMenu(e),i=document.getElementById(e).dataset.inputId,o=d.get(i),a=p.get(i);Array.from(n.children).forEach((e=>{const t=~~(e.dataset.languageId||"");if(t){let n=!1;o.languageId&&(n=t===o.languageId?""===o.element.value.trim():!a.get(t));const i=e.querySelector("span");if(i.querySelector("fa-icon")?.remove(),n){e.classList.add("missingValue");const t=document.createElement("fa-icon");t.setIcon("triangle-exclamation"),i.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 i=p.get(e);n.callbacks.has("submit")&&n.callbacks.get("submit")(n.element),n.languageId&&i.set(n.languageId,n.element.value),i.size&&(i.forEach((function(n,i){const o=document.createElement("input");o.type="hidden",o.name=`${e}_i18n[${i}]`,o.value=n,t.appendChild(o)})),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,i=n.__importDefault(i),o=n.__importStar(o),r=n.__importDefault(r),a=n.__importStar(a);const d=new Map,u=new WeakMap,p=new Map;t.init=function(e,t,n,i){if(p.has(e))return;const m=document.getElementById(e);if(null===m)throw new Error(`Expected a valid element id, cannot find '${e}'.`);const h=new Map;Object.entries(t).forEach((([e,t])=>{h.set(+e,a.unescapeHTML(t))})),p.set(e,h),function(e,t,n,i,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 m=document.createElement("span");m.className="button dropdownToggle inputPrefix";const h=document.createElement("span");h.textContent=o.get("wcf.global.button.disabledI18n"),m.appendChild(h),p.insertBefore(m,t);const f=document.createElement("ul");f.className="dropdownMenu",m.insertAdjacentElement("afterend",f);const g=t=>{let n;n=t instanceof HTMLElement?t:t.currentTarget;const i=~~n.dataset.languageId,o=f.querySelector(".active");null!==o&&o.classList.remove("active"),i&&n.classList.add("active");const r=t instanceof HTMLElement;s(e,i,r)};if(Object.entries(i).forEach((([e,t])=>{const n=document.createElement("li");n.dataset.languageId=e;const i=document.createElement("span");i.textContent=t,n.appendChild(i),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=o.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(m),r.default.registerCallback(p.id,l),d.set(e,{buttonLabel:h,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,m,h,n,i)},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 i=new Map(Object.entries(t).map((([e,t])=>[+e,t])));if(i.has(0))return n.element.value=i.get(0),i.delete(0),p.set(e,i),void s(e,0,!0);p.set(e,i),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;i.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;i.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 i=p.get(e),o=r.default.getDropdownMenu(n.element.parentElement.id);n.languageId&&i.set(n.languageId,n.element.value);let a=!1,s=!1;return Array.from(o.children).forEach((e=>{const t=~~e.dataset.languageId;if(t)if(i.has(t)&&0!==i.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{#O;constructor(e){this.#O=e}collectMetaData(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:collect-meta-data",{detail:e}))}changeData(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:change-data"))}destroy(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:destroy"))}discardRecoveredData(){this.#O.dispatchEvent(new CustomEvent("ckeditor5:discard-recovered-data"))}autosave(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:autosave",{detail:e}))}insertAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:insert-attachment",{detail:e}))}insertQuote(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:insert-quote",{detail:e}))}ready(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:ready",{detail:e}))}removeAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:remove-attachment",{detail:e}))}reset(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:reset",{detail:e}))}setupConfiguration(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:setup-configuration",{detail:e}))}setupFeatures(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:setup-features",{detail:e}))}submitOnEnter(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:submit-on-enter",{detail:e}))}uploadAttachment(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:upload-attachment",{detail:e}))}uploadMedia(e){this.#O.dispatchEvent(new CustomEvent("ckeditor5:upload-media",{detail:e}))}}class i{#O;constructor(e){this.#O=e}bbcode(e){return this.#O.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.#O.addEventListener("ckeditor5:change-data",(()=>{e()})),this}collectMetaData(e){return this.#O.addEventListener("ckeditor5:collect-meta-data",(t=>{e(t.detail)})),this}destroy(e){return this.#O.addEventListener("ckeditor5:destroy",(()=>{e()})),this}discardRecoveredData(e){return this.#O.addEventListener("ckeditor5:discard-recovered-data",(()=>{e()}),{once:!0}),this}insertAttachment(e){return this.#O.addEventListener("ckeditor5:insert-attachment",(t=>{e(t.detail)})),this}insertQuote(e){return this.#O.addEventListener("ckeditor5:insert-quote",(t=>{e(t.detail)})),this}ready(e){return this.#O.addEventListener("ckeditor5:ready",(t=>{e(t.detail)}),{once:!0}),this}removeAttachment(e){return this.#O.addEventListener("ckeditor5:remove-attachment",(t=>{e(t.detail)})),this}reset(e){return this.#O.addEventListener("ckeditor5:reset",(t=>{e(t.detail)})),this}setupConfiguration(e){return this.#O.addEventListener("ckeditor5:setup-configuration",(t=>{e(t.detail)}),{once:!0}),this}setupFeatures(e){return this.#O.addEventListener("ckeditor5:setup-features",(t=>{e(t.detail)}),{once:!0}),this}submitOnEnter(e){return this.#O.addEventListener("ckeditor5:submit-on-enter",(t=>{e(t.detail)})),this}uploadAttachment(e){return this.#O.addEventListener("ckeditor5:upload-attachment",(t=>{e(t.detail)})),this}uploadMedia(e){return this.#O.addEventListener("ckeditor5:upload-media",(t=>{e(t.detail)})),this}autosave(e){return this.#O.addEventListener("ckeditor5:autosave",(t=>{e(t.detail)})),this}}t.dispatchToCkeditor=function(e){return new n(e)},t.listenToCkeditor=function(e){return new i(e)}})),define("WoltLabSuite/Core/Component/Ckeditor/Attachment",["require","exports","./Event"],(function(e,t,n){"use strict";function i(e,t,i){const o={abortController:i,file:t};return(0,n.dispatchToCkeditor)(e).uploadAttachment(o),new Promise((e=>{o.promise.then((({attachmentId:t,url:n})=>{e({"data-attachment-id":t.toString(),urls:{default:n}})})).catch((()=>{}))}))}Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,n.listenToCkeditor)(e).setupConfiguration((({configuration:t,features:o})=>{o.attachment&&(t.woltlabUpload={uploadImage:(t,n)=>i(e,t,n),uploadOther:t=>i(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,i){void 0===i&&(i=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,o)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=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 i(e,t,i){const o={abortController:i,file:t};return(0,n.dispatchToCkeditor)(e).uploadMedia(o),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})=>{!n.attachment&&n.media&&(e.woltlabUpload={uploadImage:(e,n)=>i(t,e,n),uploadOther:e=>i(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/Api/Messages/MentionSuggestions",["require","exports","WoltLabSuite/Core/Ajax/Backend","../Result"],(function(e,t,n,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mentionSuggestions=void 0,t.mentionSuggestions=async function(e){const t=new URL(window.WSC_API_URL+"index.php?api/rpc/core/messages/mentionsuggestions");let o;t.searchParams.set("query",e);try{o=await(0,n.prepareRequest)(t).get().allowCaching().disableLoadingIndicator().fetchAsJson()}catch(e){return(0,i.apiResultFromError)(e)}return(0,i.apiResultFromValue)(o)}})),define("WoltLabSuite/Core/Component/Ckeditor/Mention",["require","exports","../../Dom/Util","./Event","WoltLabSuite/Core/Api/Messages/MentionSuggestions"],(function(e,t,n,i,o){"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){return e.length>24?[]:(await(0,o.mentionSuggestions)(e)).unwrap().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,n.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,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setup=void 0,t.setup=function(e){(0,i.listenToCkeditor)(e).ready((({ckeditor:t})=>{(0,i.listenToCkeditor)(e).insertQuote((e=>{!function(e,t){let{author:i,content:o,link:r}=t;var a;t.isText&&(a=o,o=(a=(a=(0,n.escapeHTML)(a)).replaceAll("\n\n\n\n\n",'


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

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

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


    `)}(t,e)}))}))}})),define("WoltLabSuite/Core/Component/Ckeditor/Autosave",["require","exports","../../Core","../../Language","../../StringUtil","./Event"],(function(e,t,n,i,o,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,o.escapeHTML)((0,i.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 m=(e,t,n)=>{n&&u.focus()};e.ui.focusTracker.on("change:isFocused",m);const h=()=>{e.ui.focusTracker.off("change:isFocused",m),d.insertAdjacentElement("beforebegin",e.ui.element),d.remove()};u.querySelector('button[data-type="submit"]').addEventListener("click",(()=>{h()})),u.querySelector('button[data-type="cancel"]').addEventListener("click",(()=>{e.data.set(c),s(t),""===c&&(0,r.dispatchToCkeditor)(e.sourceElement).discardRecoveredData(),h()}));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,i;try{n=window.localStorage.getItem(t)}catch{return}if(null!==n){try{i=JSON.parse(n)}catch{}if(void 0===i||i.timestamp(function(e,t,n){if(""===n)return void s(t);const i={html:n,timestamp:Date.now()};try{window.localStorage.setItem(a(t),JSON.stringify(i)),(0,r.dispatchToCkeditor)(e).autosave(i)}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 i{#V;#$="|";#z=[];#Y=[];#G={};constructor(e){this.#V=e}#X(){this.#V.undo?this.#Y.push("undo","redo"):this.#z.push("Undo")}#K(){this.#Y.push("bold","italic")}#J(){const e=[];this.#V.heading?e.push("heading"):this.#z.push("Heading"),this.#V.underline?e.push("underline"):this.#z.push("Underline"),this.#V.strikethrough?e.push("strikethrough"):this.#z.push("Strikethrough"),e.push(this.#$),this.#V.mark?e.push("highlight"):this.#z.push("Highlight"),this.#V.fontColor?e.push("fontColor"):this.#z.push("FontColor"),this.#V.fontFamily?e.push("fontFamily"):this.#z.push("FontFamily"),this.#V.fontSize?e.push("fontSize"):this.#z.push("FontSize"),e.push(this.#$),this.#V.subscript?e.push("subscript"):this.#z.push("Subscript"),this.#V.superscript?e.push("superscript"):this.#z.push("Superscript"),0!==e.length&&e.push(this.#$,"removeFormat"),e.length>0&&(this.#Y.push({label:"woltlabToolbarGroup_format",items:e}),this.#G.format={icon:"ellipsis;false",label:(0,n.getPhrase)("wcf.editor.button.group.format")})}#Q(){this.#V.list?(this.#Y.push({label:"woltlabToolbarGroup_list",items:["bulletedList","numberedList","outdent","indent"]}),this.#G.list={icon:"list;false",label:(0,n.getPhrase)("wcf.editor.button.group.list")}):this.#z.push("List")}#Z(){this.#V.alignment?this.#Y.push("alignment"):this.#z.push("Alignment")}#ee(){this.#V.link?this.#Y.push("link"):this.#z.push("Link","LinkImage")}#te(){this.#V.image?(this.#Y.push("insertImage"),this.#V.attachment||this.#z.push("ImageUpload","ImageUploadUI","WoltlabAttachment")):this.#V.link&&this.#z.push("LinkImage")}#ne(){this.#V.codeBlock?this.#Y.push("codeBlock"):this.#z.push("CodeBlock","WoltlabCodeBlock"),this.#V.code?this.#Y.push("code"):this.#z.push("Code","WoltlabCode")}#ie(){this.#V.table?this.#Y.push("insertTable"):this.#z.push("Table","TableToolbar"),this.#V.quoteBlock?this.#Y.push("blockQuote"):this.#z.push("BlockQuote","WoltlabBlockQuote"),this.#V.spoiler?this.#Y.push("spoiler"):this.#z.push("WoltlabSpoiler"),this.#V.html?this.#Y.push("htmlEmbed"):this.#z.push("HtmlEmbed","WoltlabHtmlEmbed")}#oe(){this.#Y.push(this.#$)}#re(){this.#V.media||this.#z.push("WoltlabMedia")}#ae(){this.#V.mention||this.#z.push("Mention","WoltlabMention")}#se(){let e=!1;return this.#Y.filter((t=>"string"==typeof t&&t===this.#$?!!e&&(e=!1,!0):(e=!0,!0)))}build(){if(this.#z.length>0||this.#Y.length>0)throw new Error("Cannot build the configuration twice.");this.#X(),this.#oe(),this.#oe(),this.#K(),this.#ee(),this.#J(),this.#oe(),this.#Q(),this.#Z(),this.#oe(),this.#te(),this.#ne(),this.#ie(),this.#oe(),this.#re(),this.#ae()}toConfig(){const e=Object.keys(window.CKEDITOR_TRANSLATIONS).find((e=>"en"!==e)),t=e||"en",{dictionary:i}=window.CKEDITOR_TRANSLATIONS[t];return i.Author=(0,n.getPhrase)("wcf.ckeditor.quote.author"),i.Filename=(0,n.getPhrase)("wcf.ckeditor.code.fileName"),i["Line number"]=(0,n.getPhrase)("wcf.ckeditor.code.lineNumber"),i.Quote=(0,n.getPhrase)("wcf.ckeditor.quote"),i["Quote from %0"]=(0,n.getPhrase)("wcf.ckeditor.quoteFrom"),i.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.#z,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.#se(),ui:{poweredBy:{label:null},viewportOffset:{top:50}},woltlabToolbarGroup:this.#G,extraPlugins:[]}}}t.createConfigurationFor=function(e){const t=new i(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,i)=>{if(i.isSoft)return;i.preventDefault(),e.stop();const o=t.getHtml();""!==o&&(0,n.dispatchToCkeditor)(t.sourceElement).submitOnEnter({ckeditor:t,html:o})}),{priority:"high"})}})),define("WoltLabSuite/Core/Component/Ckeditor/Normalizer",["require","exports","tslib","../../Dom/Util"],(function(e,t,n,i){"use strict";function o(e,t){const n=e.closest("p");if(null===n)return;const i=document.createElement("figure");i.classList.add("image",t),i.append(e),n.insertAdjacentElement("beforebegin",i),""===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&&i.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+=o}}}(n),function(e){e.querySelectorAll("img").forEach((e=>{e.classList.contains("messageFloatObjectRight")?o(e,"image-style-side"):e.classList.contains("messageFloatObjectLeft")&&o(e,"image-style-side-left")}))}(t),t.innerHTML}Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLegacyMessage=t.normalizeLegacyHtml=void 0,i=n.__importDefault(i),t.normalizeLegacyHtml=r,t.normalizeLegacyMessage=function(e){if(!(e instanceof HTMLTextAreaElement))throw new TypeError("Expected the element to be a