From d11cd7d592852a1d1162b6941337b5d01247b41c Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Fri, 2 Feb 2024 17:57:40 +0100 Subject: [PATCH] Fix the support for numeric phrase variants --- ts/WoltLabSuite/WebComponent/Template.ts | 8 ++------ .../install/files/js/WoltLabSuite/WebComponent.min.js | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/ts/WoltLabSuite/WebComponent/Template.ts b/ts/WoltLabSuite/WebComponent/Template.ts index a3c132040f..25fb97fd68 100644 --- a/ts/WoltLabSuite/WebComponent/Template.ts +++ b/ts/WoltLabSuite/WebComponent/Template.ts @@ -53,12 +53,8 @@ function selectPlural(parameters: PluralParameters): string { } // handle numeric attributes - const numericAttribute = Object.keys(parameters).find((key) => { - return key.toString() === parseInt(key).toString() && key.toString() === value.toString(); - }); - - if (numericAttribute) { - return numericAttribute; + if (Object.hasOwn(parameters, value.toString())) { + return parameters[value]; } let category = pluralRules.select(value); diff --git a/wcfsetup/install/files/js/WoltLabSuite/WebComponent.min.js b/wcfsetup/install/files/js/WoltLabSuite/WebComponent.min.js index a60ea228f5..ce0b621af7 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/WebComponent.min.js +++ b/wcfsetup/install/files/js/WoltLabSuite/WebComponent.min.js @@ -1,9 +1,9 @@ -"use strict";(()=>{var ke=Object.create;var te=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var xe=Object.getPrototypeOf,Ee=Object.prototype.hasOwnProperty;var se=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,n)=>(typeof require<"u"?require:r)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var _e=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),fe=(e,r)=>{for(var n in r)te(e,n,{get:r[n],enumerable:!0})},Le=(e,r,n,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of ve(r))!Ee.call(e,t)&&t!==n&&te(e,t,{get:()=>r[t],enumerable:!(h=ye(r,t))||h.enumerable});return e};var Te=(e,r,n)=>(n=e!=null?ke(xe(e)):{},Le(r||!e||!e.__esModule?te(n,"default",{value:e,enumerable:!0}):n,e));var ce=_e((O,re)=>{"use strict";var Q=function(){var e=function(R,o,f,c){for(f=f||{},c=R.length;c--;f[R[c]]=o);return f},r=[2,44],n=[5,9,11,12,13,18,19,21,22,23,25,26,28,29,30,32,33,34,35,37,39,41],h=[1,25],t=[1,27],a=[1,33],l=[1,31],d=[1,32],g=[1,28],w=[1,29],A=[1,26],S=[1,35],z=[1,41],P=[1,40],u=[11,12,15,42,43,47,49,51,52,54,55],m=[9,11,12,13,18,19,21,23,26,28,30,32,33,34,35,37,39],p=[11,12,15,42,43,46,47,48,49,51,52,54,55],x=[1,64],k=[1,65],E=[18,37,39],C=[12,15],W={trace:function(){},yy:{},symbols_:{error:2,TEMPLATE:3,CHUNK_STAR:4,EOF:5,CHUNK_STAR_repetition0:6,CHUNK:7,PLAIN_ANY:8,T_LITERAL:9,COMMAND:10,T_ANY:11,T_WS:12,"{if":13,COMMAND_PARAMETERS:14,"}":15,COMMAND_repetition0:16,COMMAND_option0:17,"{/if}":18,"{include":19,COMMAND_PARAMETER_LIST:20,"{implode":21,"{/implode}":22,"{foreach":23,COMMAND_option1:24,"{/foreach}":25,"{plural":26,PLURAL_PARAMETER_LIST:27,"{lang}":28,"{/lang}":29,"{":30,VARIABLE:31,"{#":32,"{@":33,"{ldelim}":34,"{rdelim}":35,ELSE:36,"{else}":37,ELSE_IF:38,"{elseif":39,FOREACH_ELSE:40,"{foreachelse}":41,T_VARIABLE:42,T_VARIABLE_NAME:43,VARIABLE_repetition0:44,VARIABLE_SUFFIX:45,"[":46,"]":47,".":48,"(":49,VARIABLE_SUFFIX_option0:50,")":51,"=":52,COMMAND_PARAMETER_VALUE:53,T_QUOTED_STRING:54,T_DIGITS:55,COMMAND_PARAMETERS_repetition_plus0:56,COMMAND_PARAMETER:57,T_PLURAL_PARAMETER_NAME:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",9:"T_LITERAL",11:"T_ANY",12:"T_WS",13:"{if",15:"}",18:"{/if}",19:"{include",21:"{implode",22:"{/implode}",23:"{foreach",25:"{/foreach}",26:"{plural",28:"{lang}",29:"{/lang}",30:"{",32:"{#",33:"{@",34:"{ldelim}",35:"{rdelim}",37:"{else}",39:"{elseif",41:"{foreachelse}",42:"T_VARIABLE",43:"T_VARIABLE_NAME",46:"[",47:"]",48:".",49:"(",51:")",52:"=",54:"T_QUOTED_STRING",55:"T_DIGITS"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[8,1],[8,1],[10,7],[10,3],[10,5],[10,6],[10,3],[10,3],[10,3],[10,3],[10,3],[10,1],[10,1],[36,2],[38,4],[40,2],[31,3],[45,3],[45,2],[45,3],[20,5],[20,3],[53,1],[53,1],[53,1],[14,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,3],[27,5],[27,3],[58,1],[58,1],[6,0],[6,2],[16,0],[16,2],[17,0],[17,1],[24,0],[24,1],[44,0],[44,2],[50,0],[50,1],[56,1],[56,2]],performAction:function(o,f,c,y,b,s,U){var i=s.length-1;switch(b){case 1:return s[i-1]+";";case 2:var D=s[i].reduce(function(L,T){return T.encode&&!L[1]?L[0]+=" + '"+T.value:T.encode&&L[1]?L[0]+=T.value:!T.encode&&L[1]?L[0]+="' + "+T.value:!T.encode&&!L[1]&&(L[0]+=" + "+T.value),L[1]=T.encode,L},["''",!1]);D[1]&&(D[0]+="'"),this.$=D[0];break;case 3:case 4:this.$={encode:!0,value:s[i].replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")};break;case 5:this.$={encode:!1,value:s[i]};break;case 8:this.$="(function() { if ("+s[i-5]+") { return "+s[i-3]+"; } "+s[i-2].join(" ")+" "+(s[i-1]||"")+" return ''; })()";break;case 9:if(!s[i-1].file)throw new Error("Missing parameter file");this.$=s[i-1].file+".fetch(v)";break;case 10:if(!s[i-3].from)throw new Error("Missing parameter from");if(!s[i-3].item)throw new Error("Missing parameter item");s[i-3].glue||(s[i-3].glue="', '"),this.$="(function() { return "+s[i-3].from+".map(function(item) { v["+s[i-3].item+"] = item; return "+s[i-1]+"; }).join("+s[i-3].glue+"); })()";break;case 11:if(!s[i-4].from)throw new Error("Missing parameter from");if(!s[i-4].item)throw new Error("Missing parameter item");this.$="(function() {var looped = false, result = '';if ("+s[i-4].from+" instanceof Array) {for (var i = 0; i < "+s[i-4].from+".length; i++) { looped = true;v["+s[i-4].key+"] = i;v["+s[i-4].item+"] = "+s[i-4].from+"[i];result += "+s[i-2]+";}} else {for (var key in "+s[i-4].from+") {if (!"+s[i-4].from+".hasOwnProperty(key)) continue;looped = true;v["+s[i-4].key+"] = key;v["+s[i-4].item+"] = "+s[i-4].from+"[key];result += "+s[i-2]+";}}return (looped ? result : "+(s[i-1]||"''")+"); })()";break;case 12:this.$="h.selectPlural({";var B=!1;for(var F in s[i-1])objOwns(s[i-1],F)&&(this.$+=(B?",":"")+F+": "+s[i-1][F],B=!0);this.$+="})";break;case 13:this.$="Language.get("+s[i-1]+", v)";break;case 14:this.$="h.escapeHTML("+s[i-1]+")";break;case 15:this.$="h.formatNumeric("+s[i-1]+")";break;case 16:this.$=s[i-1];break;case 17:this.$="'{'";break;case 18:this.$="'}'";break;case 19:this.$="else { return "+s[i]+"; }";break;case 20:this.$="else if ("+s[i-2]+") { return "+s[i]+"; }";break;case 21:this.$=s[i];break;case 22:this.$="v['"+s[i-1]+"']"+s[i].join("");break;case 23:this.$=s[i-2]+s[i-1]+s[i];break;case 24:this.$="['"+s[i]+"']";break;case 25:case 39:this.$=s[i-2]+(s[i-1]||"")+s[i];break;case 26:case 40:this.$=s[i],this.$[s[i-4]]=s[i-2];break;case 27:case 41:this.$={},this.$[s[i-2]]=s[i];break;case 31:this.$=s[i].join("");break;case 44:case 46:case 52:this.$=[];break;case 45:case 47:case 53:case 57:s[i-1].push(s[i]);break;case 56:this.$=[s[i]];break}},table:[e([5,9,11,12,13,19,21,23,26,28,30,32,33,34,35],r,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},e([5,18,22,25,29,37,39,41],[2,2],{7:5,8:6,10:8,9:[1,7],11:[1,9],12:[1,10],13:[1,11],19:[1,12],21:[1,13],23:[1,14],26:[1,15],28:[1,16],30:[1,17],32:[1,18],33:[1,19],34:[1,20],35:[1,21]}),{1:[2,1]},e(n,[2,45]),e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{11:h,12:t,14:22,31:30,42:a,43:l,49:d,52:g,54:w,55:A,56:23,57:24},{20:34,43:S},{20:36,43:S},{20:37,43:S},{27:38,43:z,55:P,58:39},e([9,11,12,13,19,21,23,26,28,29,30,32,33,34,35],r,{6:3,4:42}),{31:43,42:a},{31:44,42:a},{31:45,42:a},e(n,[2,17]),e(n,[2,18]),{15:[1,46]},e([15,47,51],[2,31],{31:30,57:47,11:h,12:t,42:a,43:l,49:d,52:g,54:w,55:A}),e(u,[2,56]),e(u,[2,32]),e(u,[2,33]),e(u,[2,34]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{11:h,12:t,14:48,31:30,42:a,43:l,49:d,52:g,54:w,55:A,56:23,57:24},{43:[1,49]},{15:[1,50]},{52:[1,51]},{15:[1,52]},{15:[1,53]},{15:[1,54]},{52:[1,55]},{52:[2,42]},{52:[2,43]},{29:[1,56]},{15:[1,57]},{15:[1,58]},{15:[1,59]},e(m,r,{6:3,4:60}),e(u,[2,57]),{51:[1,61]},e(p,[2,52],{44:62}),e(n,[2,9]),{31:66,42:a,53:63,54:x,55:k},e([9,11,12,13,19,21,22,23,26,28,30,32,33,34,35],r,{6:3,4:67}),e([9,11,12,13,19,21,23,25,26,28,30,32,33,34,35,41],r,{6:3,4:68}),e(n,[2,12]),{31:66,42:a,53:69,54:x,55:k},e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),e(E,[2,46],{16:70}),e(u,[2,39]),e([11,12,15,42,43,47,51,52,54,55],[2,22],{45:71,46:[1,72],48:[1,73],49:[1,74]}),{12:[1,75],15:[2,27]},e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),{22:[1,76]},{24:77,25:[2,50],40:78,41:[1,79]},{12:[1,80],15:[2,41]},{17:81,18:[2,48],36:83,37:[1,85],38:82,39:[1,84]},e(p,[2,53]),{11:h,12:t,14:86,31:30,42:a,43:l,49:d,52:g,54:w,55:A,56:23,57:24},{43:[1,87]},{11:h,12:t,14:89,31:30,42:a,43:l,49:d,50:88,51:[2,54],52:g,54:w,55:A,56:23,57:24},{20:90,43:S},e(n,[2,10]),{25:[1,91]},{25:[2,51]},e([9,11,12,13,19,21,23,25,26,28,30,32,33,34,35],r,{6:3,4:92}),{27:93,43:z,55:P,58:39},{18:[1,94]},e(E,[2,47]),{18:[2,49]},{11:h,12:t,14:95,31:30,42:a,43:l,49:d,52:g,54:w,55:A,56:23,57:24},e([9,11,12,13,18,19,21,23,26,28,30,32,33,34,35],r,{6:3,4:96}),{47:[1,97]},e(p,[2,24]),{51:[1,98]},{51:[2,55]},{15:[2,26]},e(n,[2,11]),{25:[2,21]},{15:[2,40]},e(n,[2,8]),{15:[1,99]},{18:[2,19]},e(p,[2,23]),e(p,[2,25]),e(m,r,{6:3,4:100}),e(E,[2,20])],defaultActions:{4:[2,1],40:[2,42],41:[2,43],78:[2,51],83:[2,49],89:[2,55],90:[2,26],92:[2,21],93:[2,40],96:[2,19]},parseError:function(o,f){if(f.recoverable)this.trace(o);else{var c=new Error(o);throw c.hash=f,c}},parse:function(o){var f=this,c=[0],y=[],b=[null],s=[],U=this.table,i="",D=0,B=0,F=0,L=2,T=1,me=s.slice.call(arguments,1),v=Object.create(this.lexer),j={yy:{}};for(var X in this.yy)Object.prototype.hasOwnProperty.call(this.yy,X)&&(j.yy[X]=this.yy[X]);v.setInput(o,j.yy),j.yy.lexer=v,j.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var J=v.yylloc;s.push(J);var be=v.options&&v.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(M){c.length=c.length-2*M,b.length=b.length-M,s.length=s.length-M}for(var we=function(){var M;return M=v.lex()||T,typeof M!="number"&&(M=f.symbols_[M]||M),M},_,$,H,q,De,ee,N={},Y,I,oe,Z;;){if(H=c[c.length-1],this.defaultActions[H]?q=this.defaultActions[H]:((_===null||typeof _>"u")&&(_=we()),q=U[H]&&U[H][_]),typeof q>"u"||!q.length||!q[0]){var ae="";Z=[];for(Y in U[H])this.terminals_[Y]&&Y>L&&Z.push("'"+this.terminals_[Y]+"'");v.showPosition?ae="Parse error on line "+(D+1)+`: +"use strict";(()=>{var ke=Object.create;var se=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var ve=Object.getOwnPropertyNames;var xe=Object.getPrototypeOf,Ee=Object.prototype.hasOwnProperty;var te=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,n)=>(typeof require<"u"?require:r)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var _e=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports),fe=(e,r)=>{for(var n in r)se(e,n,{get:r[n],enumerable:!0})},Le=(e,r,n,h)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of ve(r))!Ee.call(e,t)&&t!==n&&se(e,t,{get:()=>r[t],enumerable:!(h=ye(r,t))||h.enumerable});return e};var Te=(e,r,n)=>(n=e!=null?ke(xe(e)):{},Le(r||!e||!e.__esModule?se(n,"default",{value:e,enumerable:!0}):n,e));var ce=_e((O,re)=>{"use strict";var Q=function(){var e=function(R,o,f,c){for(f=f||{},c=R.length;c--;f[R[c]]=o);return f},r=[2,44],n=[5,9,11,12,13,18,19,21,22,23,25,26,28,29,30,32,33,34,35,37,39,41],h=[1,25],t=[1,27],a=[1,33],l=[1,31],d=[1,32],g=[1,28],w=[1,29],A=[1,26],S=[1,35],z=[1,41],P=[1,40],u=[11,12,15,42,43,47,49,51,52,54,55],m=[9,11,12,13,18,19,21,23,26,28,30,32,33,34,35,37,39],p=[11,12,15,42,43,46,47,48,49,51,52,54,55],x=[1,64],k=[1,65],E=[18,37,39],C=[12,15],W={trace:function(){},yy:{},symbols_:{error:2,TEMPLATE:3,CHUNK_STAR:4,EOF:5,CHUNK_STAR_repetition0:6,CHUNK:7,PLAIN_ANY:8,T_LITERAL:9,COMMAND:10,T_ANY:11,T_WS:12,"{if":13,COMMAND_PARAMETERS:14,"}":15,COMMAND_repetition0:16,COMMAND_option0:17,"{/if}":18,"{include":19,COMMAND_PARAMETER_LIST:20,"{implode":21,"{/implode}":22,"{foreach":23,COMMAND_option1:24,"{/foreach}":25,"{plural":26,PLURAL_PARAMETER_LIST:27,"{lang}":28,"{/lang}":29,"{":30,VARIABLE:31,"{#":32,"{@":33,"{ldelim}":34,"{rdelim}":35,ELSE:36,"{else}":37,ELSE_IF:38,"{elseif":39,FOREACH_ELSE:40,"{foreachelse}":41,T_VARIABLE:42,T_VARIABLE_NAME:43,VARIABLE_repetition0:44,VARIABLE_SUFFIX:45,"[":46,"]":47,".":48,"(":49,VARIABLE_SUFFIX_option0:50,")":51,"=":52,COMMAND_PARAMETER_VALUE:53,T_QUOTED_STRING:54,T_DIGITS:55,COMMAND_PARAMETERS_repetition_plus0:56,COMMAND_PARAMETER:57,T_PLURAL_PARAMETER_NAME:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",9:"T_LITERAL",11:"T_ANY",12:"T_WS",13:"{if",15:"}",18:"{/if}",19:"{include",21:"{implode",22:"{/implode}",23:"{foreach",25:"{/foreach}",26:"{plural",28:"{lang}",29:"{/lang}",30:"{",32:"{#",33:"{@",34:"{ldelim}",35:"{rdelim}",37:"{else}",39:"{elseif",41:"{foreachelse}",42:"T_VARIABLE",43:"T_VARIABLE_NAME",46:"[",47:"]",48:".",49:"(",51:")",52:"=",54:"T_QUOTED_STRING",55:"T_DIGITS"},productions_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[8,1],[8,1],[10,7],[10,3],[10,5],[10,6],[10,3],[10,3],[10,3],[10,3],[10,3],[10,1],[10,1],[36,2],[38,4],[40,2],[31,3],[45,3],[45,2],[45,3],[20,5],[20,3],[53,1],[53,1],[53,1],[14,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,1],[57,3],[27,5],[27,3],[58,1],[58,1],[6,0],[6,2],[16,0],[16,2],[17,0],[17,1],[24,0],[24,1],[44,0],[44,2],[50,0],[50,1],[56,1],[56,2]],performAction:function(o,f,c,y,b,s,U){var i=s.length-1;switch(b){case 1:return s[i-1]+";";case 2:var D=s[i].reduce(function(L,T){return T.encode&&!L[1]?L[0]+=" + '"+T.value:T.encode&&L[1]?L[0]+=T.value:!T.encode&&L[1]?L[0]+="' + "+T.value:!T.encode&&!L[1]&&(L[0]+=" + "+T.value),L[1]=T.encode,L},["''",!1]);D[1]&&(D[0]+="'"),this.$=D[0];break;case 3:case 4:this.$={encode:!0,value:s[i].replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/(\r\n|\n|\r)/g,"\\n")};break;case 5:this.$={encode:!1,value:s[i]};break;case 8:this.$="(function() { if ("+s[i-5]+") { return "+s[i-3]+"; } "+s[i-2].join(" ")+" "+(s[i-1]||"")+" return ''; })()";break;case 9:if(!s[i-1].file)throw new Error("Missing parameter file");this.$=s[i-1].file+".fetch(v)";break;case 10:if(!s[i-3].from)throw new Error("Missing parameter from");if(!s[i-3].item)throw new Error("Missing parameter item");s[i-3].glue||(s[i-3].glue="', '"),this.$="(function() { return "+s[i-3].from+".map(function(item) { v["+s[i-3].item+"] = item; return "+s[i-1]+"; }).join("+s[i-3].glue+"); })()";break;case 11:if(!s[i-4].from)throw new Error("Missing parameter from");if(!s[i-4].item)throw new Error("Missing parameter item");this.$="(function() {var looped = false, result = '';if ("+s[i-4].from+" instanceof Array) {for (var i = 0; i < "+s[i-4].from+".length; i++) { looped = true;v["+s[i-4].key+"] = i;v["+s[i-4].item+"] = "+s[i-4].from+"[i];result += "+s[i-2]+";}} else {for (var key in "+s[i-4].from+") {if (!"+s[i-4].from+".hasOwnProperty(key)) continue;looped = true;v["+s[i-4].key+"] = key;v["+s[i-4].item+"] = "+s[i-4].from+"[key];result += "+s[i-2]+";}}return (looped ? result : "+(s[i-1]||"''")+"); })()";break;case 12:this.$="h.selectPlural({";var B=!1;for(var F in s[i-1])objOwns(s[i-1],F)&&(this.$+=(B?",":"")+F+": "+s[i-1][F],B=!0);this.$+="})";break;case 13:this.$="Language.get("+s[i-1]+", v)";break;case 14:this.$="h.escapeHTML("+s[i-1]+")";break;case 15:this.$="h.formatNumeric("+s[i-1]+")";break;case 16:this.$=s[i-1];break;case 17:this.$="'{'";break;case 18:this.$="'}'";break;case 19:this.$="else { return "+s[i]+"; }";break;case 20:this.$="else if ("+s[i-2]+") { return "+s[i]+"; }";break;case 21:this.$=s[i];break;case 22:this.$="v['"+s[i-1]+"']"+s[i].join("");break;case 23:this.$=s[i-2]+s[i-1]+s[i];break;case 24:this.$="['"+s[i]+"']";break;case 25:case 39:this.$=s[i-2]+(s[i-1]||"")+s[i];break;case 26:case 40:this.$=s[i],this.$[s[i-4]]=s[i-2];break;case 27:case 41:this.$={},this.$[s[i-2]]=s[i];break;case 31:this.$=s[i].join("");break;case 44:case 46:case 52:this.$=[];break;case 45:case 47:case 53:case 57:s[i-1].push(s[i]);break;case 56:this.$=[s[i]];break}},table:[e([5,9,11,12,13,19,21,23,26,28,30,32,33,34,35],r,{3:1,4:2,6:3}),{1:[3]},{5:[1,4]},e([5,18,22,25,29,37,39,41],[2,2],{7:5,8:6,10:8,9:[1,7],11:[1,9],12:[1,10],13:[1,11],19:[1,12],21:[1,13],23:[1,14],26:[1,15],28:[1,16],30:[1,17],32:[1,18],33:[1,19],34:[1,20],35:[1,21]}),{1:[2,1]},e(n,[2,45]),e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{11:h,12:t,14:22,31:30,42:a,43:l,49:d,52:g,54:w,55:A,56:23,57:24},{20:34,43:S},{20:36,43:S},{20:37,43:S},{27:38,43:z,55:P,58:39},e([9,11,12,13,19,21,23,26,28,29,30,32,33,34,35],r,{6:3,4:42}),{31:43,42:a},{31:44,42:a},{31:45,42:a},e(n,[2,17]),e(n,[2,18]),{15:[1,46]},e([15,47,51],[2,31],{31:30,57:47,11:h,12:t,42:a,43:l,49:d,52:g,54:w,55:A}),e(u,[2,56]),e(u,[2,32]),e(u,[2,33]),e(u,[2,34]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{11:h,12:t,14:48,31:30,42:a,43:l,49:d,52:g,54:w,55:A,56:23,57:24},{43:[1,49]},{15:[1,50]},{52:[1,51]},{15:[1,52]},{15:[1,53]},{15:[1,54]},{52:[1,55]},{52:[2,42]},{52:[2,43]},{29:[1,56]},{15:[1,57]},{15:[1,58]},{15:[1,59]},e(m,r,{6:3,4:60}),e(u,[2,57]),{51:[1,61]},e(p,[2,52],{44:62}),e(n,[2,9]),{31:66,42:a,53:63,54:x,55:k},e([9,11,12,13,19,21,22,23,26,28,30,32,33,34,35],r,{6:3,4:67}),e([9,11,12,13,19,21,23,25,26,28,30,32,33,34,35,41],r,{6:3,4:68}),e(n,[2,12]),{31:66,42:a,53:69,54:x,55:k},e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),e(E,[2,46],{16:70}),e(u,[2,39]),e([11,12,15,42,43,47,51,52,54,55],[2,22],{45:71,46:[1,72],48:[1,73],49:[1,74]}),{12:[1,75],15:[2,27]},e(C,[2,28]),e(C,[2,29]),e(C,[2,30]),{22:[1,76]},{24:77,25:[2,50],40:78,41:[1,79]},{12:[1,80],15:[2,41]},{17:81,18:[2,48],36:83,37:[1,85],38:82,39:[1,84]},e(p,[2,53]),{11:h,12:t,14:86,31:30,42:a,43:l,49:d,52:g,54:w,55:A,56:23,57:24},{43:[1,87]},{11:h,12:t,14:89,31:30,42:a,43:l,49:d,50:88,51:[2,54],52:g,54:w,55:A,56:23,57:24},{20:90,43:S},e(n,[2,10]),{25:[1,91]},{25:[2,51]},e([9,11,12,13,19,21,23,25,26,28,30,32,33,34,35],r,{6:3,4:92}),{27:93,43:z,55:P,58:39},{18:[1,94]},e(E,[2,47]),{18:[2,49]},{11:h,12:t,14:95,31:30,42:a,43:l,49:d,52:g,54:w,55:A,56:23,57:24},e([9,11,12,13,18,19,21,23,26,28,30,32,33,34,35],r,{6:3,4:96}),{47:[1,97]},e(p,[2,24]),{51:[1,98]},{51:[2,55]},{15:[2,26]},e(n,[2,11]),{25:[2,21]},{15:[2,40]},e(n,[2,8]),{15:[1,99]},{18:[2,19]},e(p,[2,23]),e(p,[2,25]),e(m,r,{6:3,4:100}),e(E,[2,20])],defaultActions:{4:[2,1],40:[2,42],41:[2,43],78:[2,51],83:[2,49],89:[2,55],90:[2,26],92:[2,21],93:[2,40],96:[2,19]},parseError:function(o,f){if(f.recoverable)this.trace(o);else{var c=new Error(o);throw c.hash=f,c}},parse:function(o){var f=this,c=[0],y=[],b=[null],s=[],U=this.table,i="",D=0,B=0,F=0,L=2,T=1,me=s.slice.call(arguments,1),v=Object.create(this.lexer),j={yy:{}};for(var X in this.yy)Object.prototype.hasOwnProperty.call(this.yy,X)&&(j.yy[X]=this.yy[X]);v.setInput(o,j.yy),j.yy.lexer=v,j.yy.parser=this,typeof v.yylloc>"u"&&(v.yylloc={});var J=v.yylloc;s.push(J);var be=v.options&&v.options.ranges;typeof j.yy.parseError=="function"?this.parseError=j.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(M){c.length=c.length-2*M,b.length=b.length-M,s.length=s.length-M}for(var we=function(){var M;return M=v.lex()||T,typeof M!="number"&&(M=f.symbols_[M]||M),M},_,$,H,q,De,ee,N={},Y,I,oe,Z;;){if(H=c[c.length-1],this.defaultActions[H]?q=this.defaultActions[H]:((_===null||typeof _>"u")&&(_=we()),q=U[H]&&U[H][_]),typeof q>"u"||!q.length||!q[0]){var ae="";Z=[];for(Y in U[H])this.terminals_[Y]&&Y>L&&Z.push("'"+this.terminals_[Y]+"'");v.showPosition?ae="Parse error on line "+(D+1)+`: `+v.showPosition()+` Expecting `+Z.join(", ")+", got '"+(this.terminals_[_]||_)+"'":ae="Parse error on line "+(D+1)+": Unexpected "+(_==T?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(ae,{text:v.match,token:this.terminals_[_]||_,line:v.yylineno,loc:J,expected:Z})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+_);switch(q[0]){case 1:c.push(_),b.push(v.yytext),s.push(v.yylloc),c.push(q[1]),_=null,$?(_=$,$=null):(B=v.yyleng,i=v.yytext,D=v.yylineno,J=v.yylloc,F>0&&F--);break;case 2:if(I=this.productions_[q[1]][1],N.$=b[b.length-I],N._$={first_line:s[s.length-(I||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(I||1)].first_column,last_column:s[s.length-1].last_column},be&&(N._$.range=[s[s.length-(I||1)].range[0],s[s.length-1].range[1]]),ee=this.performAction.apply(N,[i,B,D,j.yy,q[1],b,s].concat(me)),typeof ee<"u")return ee;I&&(c=c.slice(0,-1*I*2),b=b.slice(0,-1*I),s=s.slice(0,-1*I)),c.push(this.productions_[q[1]][0]),b.push(N.$),s.push(N._$),oe=U[c[c.length-2]][c[c.length-1]],c.push(oe);break;case 3:return!0}}return!0}},ge=function(){var R={EOF:1,parseError:function(f,c){if(this.yy.parser)this.yy.parser.parseError(f,c);else throw new Error(f)},setInput:function(o,f){return this.yy=f||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var f=o.match(/(?:\r\n?|\n).*/g);return f?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},unput:function(o){var f=o.length,c=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-f),this.offset-=f;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),c.length-1&&(this.yylineno-=c.length-1);var b=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===y.length?this.yylloc.first_column:0)+y[y.length-c.length].length-c[0].length:this.yylloc.first_column-f},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-f]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true). `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(o){this.unput(this.match.slice(o))},pastInput:function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var o=this.pastInput(),f=new Array(o.length+1).join("-");return o+this.upcomingInput()+` `+f+"^"},test_match:function(o,f){var c,y,b;if(this.options.backtrack_lexer&&(b={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(b.yylloc.range=this.yylloc.range.slice(0))),y=o[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],c=this.performAction.call(this,this.yy,this,f,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),c)return c;if(this._backtrack){for(var s in b)this[s]=b[s];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,f,c,y;this._more||(this.yytext="",this.match="");for(var b=this._currentRules(),s=0;sf[0].length)){if(f=c,y=s,this.options.backtrack_lexer){if(o=this.test_match(c,b[s]),o!==!1)return o;if(this._backtrack){f=!1;continue}else return!1}else if(!this.options.flex)break}return f?(o=this.test_match(f,b[y]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var f=this.next();return f||this.lex()},begin:function(f){this.conditionStack.push(f)},popState:function(){var f=this.conditionStack.length-1;return f>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},pushState:function(f){this.begin(f)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(f,c,y,b){var s=b;switch(y){case 0:break;case 1:return c.yytext=c.yytext.substring(9,c.yytext.length-10),9;break;case 2:return 54;case 3:return 54;case 4:return 42;case 5:return 55;case 6:return 43;case 7:return 48;case 8:return 46;case 9:return 47;case 10:return 49;case 11:return 51;case 12:return 52;case 13:return 34;case 14:return 35;case 15:return this.begin("command"),32;break;case 16:return this.begin("command"),33;break;case 17:return this.begin("command"),13;break;case 18:return this.begin("command"),39;break;case 19:return this.begin("command"),39;break;case 20:return 37;case 21:return 18;case 22:return 28;case 23:return 29;case 24:return this.begin("command"),19;break;case 25:return this.begin("command"),21;break;case 26:return this.begin("command"),26;break;case 27:return 22;case 28:return this.begin("command"),23;break;case 29:return 41;case 30:return 25;case 31:return this.begin("command"),30;break;case 32:return this.popState(),15;break;case 33:return 12;case 34:return 5;case 35:return 11}},rules:[/^(?:\{\*[\s\S]*?\*\})/,/^(?:\{literal\}[\s\S]*?\{\/literal\})/,/^(?:"([^"]|\\\.)*")/,/^(?:'([^']|\\\.)*')/,/^(?:\$)/,/^(?:[0-9]+)/,/^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:=)/,/^(?:\{ldelim\})/,/^(?:\{rdelim\})/,/^(?:\{#)/,/^(?:\{@)/,/^(?:\{if )/,/^(?:\{else if )/,/^(?:\{elseif )/,/^(?:\{else\})/,/^(?:\{\/if\})/,/^(?:\{lang\})/,/^(?:\{\/lang\})/,/^(?:\{include )/,/^(?:\{implode )/,/^(?:\{plural )/,/^(?:\{\/implode\})/,/^(?:\{foreach )/,/^(?:\{foreachelse\})/,/^(?:\{\/foreach\})/,/^(?:\{(?!\s))/,/^(?:\})/,/^(?:\s+)/,/^(?:$)/,/^(?:[^{])/],conditions:{command:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],inclusive:!0},INITIAL:{rules:[0,1,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35],inclusive:!0}}};return R}();W.lexer=ge;function K(){this.yy={}}return K.prototype=W,W.Parser=K,new K}();typeof se<"u"&&typeof O<"u"&&(O.parser=Q,O.Parser=Q.Parser,O.parse=function(){return Q.parse.apply(Q,arguments)},O.main=!0,typeof re<"u"&&se.main===re&&O.main(process.argv.slice(1)))});var ne={};fe(ne,{getPhrase:()=>le,registerPhrase:()=>Ie});var he=Te(ce());var ie={};fe(ie,{add:()=>G,get:()=>le});var ue=new Map;function le(e,r={}){let n=ue.get(e);return n===void 0?e:n(r)}function G(e,r){ue.set(e,r)}function qe(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}function de(e){return Number(e).toLocaleString(document.documentElement.lang,{maximumFractionDigits:2}).replace("-","\u2212")}var Ae=new Intl.PluralRules(document.documentElement.lang);function Se(e){if(!Object.hasOwn(e,"value"))throw new Error("Missing parameter value");if(!e.other)throw new Error("Missing parameter other");let r=e.value;Array.isArray(r)&&(r=r.length);let n=Object.keys(e).find(a=>a.toString()===parseInt(a).toString()&&a.toString()===r.toString());if(n)return n;let h=Ae.select(r);e[h]===void 0&&(h="other");let t=e[h];return t.includes("#")?t.replace("#",de(r)):t}function Me(e){let r=`var tmp = {}; +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var f=this.next();return f||this.lex()},begin:function(f){this.conditionStack.push(f)},popState:function(){var f=this.conditionStack.length-1;return f>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(f){return f=this.conditionStack.length-1-Math.abs(f||0),f>=0?this.conditionStack[f]:"INITIAL"},pushState:function(f){this.begin(f)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(f,c,y,b){var s=b;switch(y){case 0:break;case 1:return c.yytext=c.yytext.substring(9,c.yytext.length-10),9;break;case 2:return 54;case 3:return 54;case 4:return 42;case 5:return 55;case 6:return 43;case 7:return 48;case 8:return 46;case 9:return 47;case 10:return 49;case 11:return 51;case 12:return 52;case 13:return 34;case 14:return 35;case 15:return this.begin("command"),32;break;case 16:return this.begin("command"),33;break;case 17:return this.begin("command"),13;break;case 18:return this.begin("command"),39;break;case 19:return this.begin("command"),39;break;case 20:return 37;case 21:return 18;case 22:return 28;case 23:return 29;case 24:return this.begin("command"),19;break;case 25:return this.begin("command"),21;break;case 26:return this.begin("command"),26;break;case 27:return 22;case 28:return this.begin("command"),23;break;case 29:return 41;case 30:return 25;case 31:return this.begin("command"),30;break;case 32:return this.popState(),15;break;case 33:return 12;case 34:return 5;case 35:return 11}},rules:[/^(?:\{\*[\s\S]*?\*\})/,/^(?:\{literal\}[\s\S]*?\{\/literal\})/,/^(?:"([^"]|\\\.)*")/,/^(?:'([^']|\\\.)*')/,/^(?:\$)/,/^(?:[0-9]+)/,/^(?:[_a-zA-Z][_a-zA-Z0-9]*)/,/^(?:\.)/,/^(?:\[)/,/^(?:\])/,/^(?:\()/,/^(?:\))/,/^(?:=)/,/^(?:\{ldelim\})/,/^(?:\{rdelim\})/,/^(?:\{#)/,/^(?:\{@)/,/^(?:\{if )/,/^(?:\{else if )/,/^(?:\{elseif )/,/^(?:\{else\})/,/^(?:\{\/if\})/,/^(?:\{lang\})/,/^(?:\{\/lang\})/,/^(?:\{include )/,/^(?:\{implode )/,/^(?:\{plural )/,/^(?:\{\/implode\})/,/^(?:\{foreach )/,/^(?:\{foreachelse\})/,/^(?:\{\/foreach\})/,/^(?:\{(?!\s))/,/^(?:\})/,/^(?:\s+)/,/^(?:$)/,/^(?:[^{])/],conditions:{command:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35],inclusive:!0},INITIAL:{rules:[0,1,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,33,34,35],inclusive:!0}}};return R}();W.lexer=ge;function K(){this.yy={}}return K.prototype=W,W.Parser=K,new K}();typeof te<"u"&&typeof O<"u"&&(O.parser=Q,O.Parser=Q.Parser,O.parse=function(){return Q.parse.apply(Q,arguments)},O.main=!0,typeof re<"u"&&te.main===re&&O.main(process.argv.slice(1)))});var ne={};fe(ne,{getPhrase:()=>le,registerPhrase:()=>Ie});var he=Te(ce());var ie={};fe(ie,{add:()=>G,get:()=>le});var ue=new Map;function le(e,r={}){let n=ue.get(e);return n===void 0?e:n(r)}function G(e,r){ue.set(e,r)}function qe(e){return String(e).replace(/&/g,"&").replace(/"/g,""").replace(//g,">")}function de(e){return Number(e).toLocaleString(document.documentElement.lang,{maximumFractionDigits:2}).replace("-","\u2212")}var Ae=new Intl.PluralRules(document.documentElement.lang);function Se(e){if(!Object.hasOwn(e,"value"))throw new Error("Missing parameter value");if(!e.other)throw new Error("Missing parameter other");let r=e.value;if(Array.isArray(r)&&(r=r.length),Object.hasOwn(e,r.toString()))return e[r];let n=Ae.select(r);e[n]===void 0&&(n="other");let h=e[n];return h.includes("#")?h.replace("#",de(r)):h}function Me(e){let r=`var tmp = {}; for (var key in v) tmp[key] = v[key]; v = tmp; v.__wcf = window.WCF; v.__window = window; @@ -60,7 +60,7 @@ Expecting `+Z.join(", ")+", got '"+(this.terminals_[_]||_)+"'":ae="Parse error o time::after { content: " (" attr(title) ")"; } - }`,E.append(C)}m&&(this.#a.dateTime=p.toISOString(),this.#a.title=g.DateAndTime.format(p));let k;if(this.static)k=this.#a.title;else if(xt?k=this.#t(E,0):p.getTime()>a?k=this.#t(E,-1):k=E.map(W=>W.value).join(""):k=g.DateAndTime.format(p)}else k=g.Date.format(p);k=k.charAt(0).toUpperCase()+k.slice(1),this.#a.textContent=k}#t(m,p){return m.map(k=>k.type==="weekday"?g.TodayOrYesterday.format(p,"day"):k.value).join("")}}window.customElements.define("woltlab-core-date-time",A);let S=()=>{document.querySelectorAll("woltlab-core-date-time").forEach(u=>u.refresh(!1))},z,P=()=>{z=window.setInterval(()=>{l(),S()},6e4)};document.addEventListener("DOMContentLoaded",()=>P(),{once:!0}),document.addEventListener("visibilitychange",()=>{document.hidden?window.clearInterval(z):(S(),P())})}{let r=[24,48,96];class n extends HTMLElement{#e;#a;connectedCallback(){this.#e===void 0&&this.#t()}attributeChangedCallback(t,a,l){if(t==="size"){let d=parseInt(l||"");if(!r.includes(d)){let g=parseInt(a||"");r.includes(g)||(g=24),this.setAttribute(t,g.toString())}}}#t(){this.classList.add("loading-indicator"),this.hasAttribute("size")||this.setAttribute("size",24 .toString()),this.#e=document.createElement("fa-icon"),this.#e.size=this.size,this.#e.setIcon("spinner"),this.#a=document.createElement("span"),this.#a.classList.add("loading-indicator__text"),this.#a.textContent=window.WoltLabLanguage.getPhrase("wcf.global.loading"),this.#a.hidden=this.hideText;let t=document.createElement("div");t.classList.add("loading-indicator__wrapper"),t.append(this.#e,this.#a),this.append(t)}get size(){return parseInt(this.getAttribute("size"))}set size(t){if(!r.includes(t))throw new TypeError(`The size ${t} is unrecognized, permitted values are ${r.join(", ")}.`);this.setAttribute("size",t.toString()),this.#e&&(this.#e.size=t)}get hideText(){return this.hasAttribute("hide-text")}set hideText(t){t?this.setAttribute("hide-text",""):this.removeAttribute("hide-text"),this.#a&&(this.#a.hidden=t)}static get observedAttributes(){return["size"]}}window.customElements.define("woltlab-core-loading-indicator",n)}{let e,r=()=>(e===void 0&&(e=window.matchMedia("(max-width: 544px)")),e);class n extends HTMLElement{#e="pagination";connectedCallback(){this.#a(),r().addEventListener("change",()=>this.#a())}#a(){if(this.innerHTML="",this.count<2)return;this.classList.add(`${this.#e}__wrapper`);let t=this.#t();this.append(t);let a=this.#n();a&&t.append(a);let l=document.createElement("ul");l.classList.add(`${this.#e}__list`),t.append(l),l.append(this.#r(1)),this.page>this.thresholdForEllipsis+1&&l.append(this.#l()),this.#f().forEach(g=>{l.append(g)}),this.count-this.page>this.thresholdForEllipsis&&l.append(this.#l()),l.append(this.#r(this.count));let d=this.#o();d&&t.append(d)}#t(){let t=document.createElement("nav");return t.setAttribute("role","navigation"),t.setAttribute("aria-label",window.WoltLabLanguage.getPhrase("wcf.page.pagination")),t.classList.add(this.#e),t}#n(){if(this.page===1)return;let t=document.createElement("div");t.classList.add(`${this.#e}__prev`);let a=this.#s(this.page-1);a instanceof HTMLAnchorElement&&(a.rel="prev"),a.title=window.WoltLabLanguage.getPhrase("wcf.global.page.previous"),a.classList.add("jsTooltip"),t.append(a);let l=document.createElement("fa-icon");return l.setIcon("arrow-left"),a.append(l),t}#o(){if(this.page===this.count)return;let t=document.createElement("div");t.classList.add(`${this.#e}__next`);let a=this.#s(this.page+1);a instanceof HTMLAnchorElement&&(a.rel="next"),a.title=window.WoltLabLanguage.getPhrase("wcf.global.page.next"),a.classList.add("jsTooltip"),t.append(a);let l=document.createElement("fa-icon");return l.setIcon("arrow-right"),a.append(l),t}#s(t){let a,l=this.getLinkUrl(t);return l?(a=document.createElement("a"),a.href=l):(a=document.createElement("button"),a.type="button",this.page===t?a.disabled=!0:a.addEventListener("click",()=>{this.#i(t)})),a.classList.add(`${this.#e}__link`),a}#r(t){let a=document.createElement("li");a.classList.add(`${this.#e}__item`);let l=this.#s(t);return l.setAttribute("aria-label",window.WoltLabLanguage.getPhrase("wcf.page.pageNo",{pageNo:t})),t===this.page&&(l.setAttribute("aria-current","page"),l.classList.add(`${this.#e}__link--current`)),l.textContent=t.toLocaleString(document.documentElement.lang),a.append(l),a}#f(){let t=[],a,l;r().matches?(a=this.page,l=this.page):(a=this.page-1,a===3&&a--,l=this.page+1,l===this.count-2&&l++);for(let d=a;d<=l;d++)d<=1||d>=this.count||t.push(this.#r(d));return t}#l(){let t=document.createElement("li");t.classList.add(`${this.#e}__item`,`${this.#e}__item--ellipsis`);let a=document.createElement("button");return a.type="button",a.title=window.WoltLabLanguage.getPhrase("wcf.page.jumpTo"),a.classList.add("pagination__link","jsTooltip"),a.innerHTML="⋯",a.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("jumpToPage"))}),t.append(a),t}get thresholdForEllipsis(){return r().matches?1:3}getLinkUrl(t){if(!this.url)return"";let a=new URL(this.url);return a.search+=a.search!==""?"&":"?",a.search+=new URLSearchParams([["pageNo",t.toString()]]).toString(),a.toString()}jumpToPage(t){let a=this.getLinkUrl(t);a?window.location.href=a:this.#i(t)}#i(t){let a=new CustomEvent("switchPage",{cancelable:!0,detail:t});this.dispatchEvent(a),a.defaultPrevented||(this.page=t)}get count(){return this.hasAttribute("count")?parseInt(this.getAttribute("count")):0}set count(t){this.setAttribute("count",t.toString()),this.#a()}get page(){return this.hasAttribute("page")?parseInt(this.getAttribute("page")):1}set page(t){this.setAttribute("page",t.toString()),this.#a()}get url(){return this.getAttribute("url")}set url(t){this.setAttribute("url",t),this.#a()}}window.customElements.define("woltlab-core-pagination",n)}{class e extends HTMLElement{connectedCallback(){this.setData(this.#a(),this.#t())}setData(n,h){this.#e(n,h)}get objectId(){return parseInt(this.getAttribute("object-id"))}get objectType(){return this.getAttribute("object-type")}#e(n,h){if(this.innerHTML="",!n.size)return;let t=document.createElement("button");t.classList.add("reactionSummary","jsTooltip"),t.title=window.WoltLabLanguage.getPhrase("wcf.reactions.summary.listReactions"),t.addEventListener("click",()=>{this.dispatchEvent(new Event("showDetails"))}),this.append(t),n.forEach((a,l)=>{let d=document.createElement("span");d.classList.add("reactionCountButton"),l===h&&d.classList.add("selected");let g=document.createElement("span");g.innerHTML=window.REACTION_TYPES[l].renderedIcon,d.append(g);let w=document.createElement("span");w.classList.add("reactionCount"),w.textContent=a.toString(),d.append(w),t.append(d)})}#a(){let n=JSON.parse(this.getAttribute("data"));return this.removeAttribute("data"),new Map(n)}#t(){return parseInt(this.getAttribute("selected-reaction"))}}window.customElements.define("woltlab-core-reaction-summary",e)}window.WoltLabLanguage=ne;window.WoltLabTemplate=V;window.HTMLParsedElement=pe;})(); + }`,E.append(C)}m&&(this.#a.dateTime=p.toISOString(),this.#a.title=g.DateAndTime.format(p));let k;if(this.static)k=this.#a.title;else if(xt?k=this.#s(E,0):p.getTime()>a?k=this.#s(E,-1):k=E.map(W=>W.value).join(""):k=g.DateAndTime.format(p)}else k=g.Date.format(p);k=k.charAt(0).toUpperCase()+k.slice(1),this.#a.textContent=k}#s(m,p){return m.map(k=>k.type==="weekday"?g.TodayOrYesterday.format(p,"day"):k.value).join("")}}window.customElements.define("woltlab-core-date-time",A);let S=()=>{document.querySelectorAll("woltlab-core-date-time").forEach(u=>u.refresh(!1))},z,P=()=>{z=window.setInterval(()=>{l(),S()},6e4)};document.addEventListener("DOMContentLoaded",()=>P(),{once:!0}),document.addEventListener("visibilitychange",()=>{document.hidden?window.clearInterval(z):(S(),P())})}{let r=[24,48,96];class n extends HTMLElement{#e;#a;connectedCallback(){this.#e===void 0&&this.#s()}attributeChangedCallback(t,a,l){if(t==="size"){let d=parseInt(l||"");if(!r.includes(d)){let g=parseInt(a||"");r.includes(g)||(g=24),this.setAttribute(t,g.toString())}}}#s(){this.classList.add("loading-indicator"),this.hasAttribute("size")||this.setAttribute("size",24 .toString()),this.#e=document.createElement("fa-icon"),this.#e.size=this.size,this.#e.setIcon("spinner"),this.#a=document.createElement("span"),this.#a.classList.add("loading-indicator__text"),this.#a.textContent=window.WoltLabLanguage.getPhrase("wcf.global.loading"),this.#a.hidden=this.hideText;let t=document.createElement("div");t.classList.add("loading-indicator__wrapper"),t.append(this.#e,this.#a),this.append(t)}get size(){return parseInt(this.getAttribute("size"))}set size(t){if(!r.includes(t))throw new TypeError(`The size ${t} is unrecognized, permitted values are ${r.join(", ")}.`);this.setAttribute("size",t.toString()),this.#e&&(this.#e.size=t)}get hideText(){return this.hasAttribute("hide-text")}set hideText(t){t?this.setAttribute("hide-text",""):this.removeAttribute("hide-text"),this.#a&&(this.#a.hidden=t)}static get observedAttributes(){return["size"]}}window.customElements.define("woltlab-core-loading-indicator",n)}{let e,r=()=>(e===void 0&&(e=window.matchMedia("(max-width: 544px)")),e);class n extends HTMLElement{#e="pagination";connectedCallback(){this.#a(),r().addEventListener("change",()=>this.#a())}#a(){if(this.innerHTML="",this.count<2)return;this.classList.add(`${this.#e}__wrapper`);let t=this.#s();this.append(t);let a=this.#n();a&&t.append(a);let l=document.createElement("ul");l.classList.add(`${this.#e}__list`),t.append(l),l.append(this.#r(1)),this.page>this.thresholdForEllipsis+1&&l.append(this.#l()),this.#f().forEach(g=>{l.append(g)}),this.count-this.page>this.thresholdForEllipsis&&l.append(this.#l()),l.append(this.#r(this.count));let d=this.#o();d&&t.append(d)}#s(){let t=document.createElement("nav");return t.setAttribute("role","navigation"),t.setAttribute("aria-label",window.WoltLabLanguage.getPhrase("wcf.page.pagination")),t.classList.add(this.#e),t}#n(){if(this.page===1)return;let t=document.createElement("div");t.classList.add(`${this.#e}__prev`);let a=this.#t(this.page-1);a instanceof HTMLAnchorElement&&(a.rel="prev"),a.title=window.WoltLabLanguage.getPhrase("wcf.global.page.previous"),a.classList.add("jsTooltip"),t.append(a);let l=document.createElement("fa-icon");return l.setIcon("arrow-left"),a.append(l),t}#o(){if(this.page===this.count)return;let t=document.createElement("div");t.classList.add(`${this.#e}__next`);let a=this.#t(this.page+1);a instanceof HTMLAnchorElement&&(a.rel="next"),a.title=window.WoltLabLanguage.getPhrase("wcf.global.page.next"),a.classList.add("jsTooltip"),t.append(a);let l=document.createElement("fa-icon");return l.setIcon("arrow-right"),a.append(l),t}#t(t){let a,l=this.getLinkUrl(t);return l?(a=document.createElement("a"),a.href=l):(a=document.createElement("button"),a.type="button",this.page===t?a.disabled=!0:a.addEventListener("click",()=>{this.#i(t)})),a.classList.add(`${this.#e}__link`),a}#r(t){let a=document.createElement("li");a.classList.add(`${this.#e}__item`);let l=this.#t(t);return l.setAttribute("aria-label",window.WoltLabLanguage.getPhrase("wcf.page.pageNo",{pageNo:t})),t===this.page&&(l.setAttribute("aria-current","page"),l.classList.add(`${this.#e}__link--current`)),l.textContent=t.toLocaleString(document.documentElement.lang),a.append(l),a}#f(){let t=[],a,l;r().matches?(a=this.page,l=this.page):(a=this.page-1,a===3&&a--,l=this.page+1,l===this.count-2&&l++);for(let d=a;d<=l;d++)d<=1||d>=this.count||t.push(this.#r(d));return t}#l(){let t=document.createElement("li");t.classList.add(`${this.#e}__item`,`${this.#e}__item--ellipsis`);let a=document.createElement("button");return a.type="button",a.title=window.WoltLabLanguage.getPhrase("wcf.page.jumpTo"),a.classList.add("pagination__link","jsTooltip"),a.innerHTML="⋯",a.addEventListener("click",()=>{this.dispatchEvent(new CustomEvent("jumpToPage"))}),t.append(a),t}get thresholdForEllipsis(){return r().matches?1:3}getLinkUrl(t){if(!this.url)return"";let a=new URL(this.url);return a.search+=a.search!==""?"&":"?",a.search+=new URLSearchParams([["pageNo",t.toString()]]).toString(),a.toString()}jumpToPage(t){let a=this.getLinkUrl(t);a?window.location.href=a:this.#i(t)}#i(t){let a=new CustomEvent("switchPage",{cancelable:!0,detail:t});this.dispatchEvent(a),a.defaultPrevented||(this.page=t)}get count(){return this.hasAttribute("count")?parseInt(this.getAttribute("count")):0}set count(t){this.setAttribute("count",t.toString()),this.#a()}get page(){return this.hasAttribute("page")?parseInt(this.getAttribute("page")):1}set page(t){this.setAttribute("page",t.toString()),this.#a()}get url(){return this.getAttribute("url")}set url(t){this.setAttribute("url",t),this.#a()}}window.customElements.define("woltlab-core-pagination",n)}{class e extends HTMLElement{connectedCallback(){this.setData(this.#a(),this.#s())}setData(n,h){this.#e(n,h)}get objectId(){return parseInt(this.getAttribute("object-id"))}get objectType(){return this.getAttribute("object-type")}#e(n,h){if(this.innerHTML="",!n.size)return;let t=document.createElement("button");t.classList.add("reactionSummary","jsTooltip"),t.title=window.WoltLabLanguage.getPhrase("wcf.reactions.summary.listReactions"),t.addEventListener("click",()=>{this.dispatchEvent(new Event("showDetails"))}),this.append(t),n.forEach((a,l)=>{let d=document.createElement("span");d.classList.add("reactionCountButton"),l===h&&d.classList.add("selected");let g=document.createElement("span");g.innerHTML=window.REACTION_TYPES[l].renderedIcon,d.append(g);let w=document.createElement("span");w.classList.add("reactionCount"),w.textContent=a.toString(),d.append(w),t.append(d)})}#a(){let n=JSON.parse(this.getAttribute("data"));return this.removeAttribute("data"),new Map(n)}#s(){return parseInt(this.getAttribute("selected-reaction"))}}window.customElements.define("woltlab-core-reaction-summary",e)}window.WoltLabLanguage=ne;window.WoltLabTemplate=V;window.HTMLParsedElement=pe;})(); /** * Handles the low level management of language items. * -- 2.20.1