@everymatrix/tournaments-banner 0.2.2 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,21 +0,0 @@
1
- typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./StatusBadge-CBE0IpOM.cjs"),Be=require("./TournamentImage-CokDB684.cjs"),We=(S,g)=>{window.postMessage({...g,type:S},window.location.href)},Ge=(S,g)=>{We(`Tournaments:${S}`,g)},Ve=(S,g)=>{Ge("viewTournamentDetails",{tournamentId:S.id,tournamentName:S.nameOrTitle})},Xe=S=>{const g=new Headers;return S&&g.append("X-SessionId",S),g},qe=async S=>{const g=new URL(`${S.endpoint}/v1/tournaments`);return g.searchParams.append("language",S.language),g.searchParams.append("sortField",S.sortField??"StartTime"),g.searchParams.append("sortOrder",S.sortOrder??"desc"),g.searchParams.append("platform",S.platform),(await(await fetch(g,{method:"GET",headers:Xe(S.session)})).json())?.items??[]},Ze=async S=>{const g=await qe(S),x=new Date;return g.filter(z=>new Date(z.exhibitionEndTime)>x)};var Ne={exports:{}};/** @license
2
- * eventsource.js
3
- * Available under MIT License (MIT)
4
- * https://github.com/Yaffle/EventSource/
5
- */(function(S,g){(function(x){var z=x.setTimeout,ae=x.clearTimeout,C=x.XMLHttpRequest,F=x.XDomainRequest,W=x.ActiveXObject,N=x.EventSource,H=x.document,A=x.Promise,j=x.fetch,oe=x.Response,q=x.TextDecoder,T=x.TextEncoder,we=x.AbortController;if(typeof window<"u"&&typeof H<"u"&&!("readyState"in H)&&H.body==null&&(H.readyState="loading",window.addEventListener("load",function(t){H.readyState="complete"},!1)),C==null&&W!=null&&(C=function(){return new W("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(t){function o(){}return o.prototype=t,new o}),Date.now||(Date.now=function(){return new Date().getTime()}),we==null){var f=j;j=function(t,o){var u=o.signal;return f(t,{headers:o.headers,credentials:o.credentials,cache:o.cache}).then(function(i){var y=i.body.getReader();return u._reader=y,u._aborted&&u._reader.cancel(),{status:i.status,statusText:i.statusText,headers:i.headers,body:{getReader:function(){return y}}}})},we=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function D(){this.bitsNeeded=0,this.codePoint=0}D.prototype.decode=function(t){function o(I,U,b){if(b===1)return I>=128>>U&&I<<U<=2047;if(b===2)return I>=2048>>U&&I<<U<=55295||I>=57344>>U&&I<<U<=65535;if(b===3)return I>=65536>>U&&I<<U<=1114111;throw new Error}function u(I,U){if(I===6*1)return U>>6>15?3:U>31?2:1;if(I===6*2)return U>15?3:2;if(I===6*3)return 3;throw new Error}for(var i=65533,y="",p=this.bitsNeeded,M=this.codePoint,V=0;V<t.length;V+=1){var L=t[V];p!==0&&(L<128||L>191||!o(M<<6|L&63,p-6,u(p,M)))&&(p=0,M=i,y+=String.fromCharCode(M)),p===0?(L>=0&&L<=127?(p=0,M=L):L>=192&&L<=223?(p=6*1,M=L&31):L>=224&&L<=239?(p=6*2,M=L&15):L>=240&&L<=247?(p=6*3,M=L&7):(p=0,M=i),p!==0&&!o(M,p,u(p,M))&&(p=0,M=i)):(p-=6,M=M<<6|L&63),p===0&&(M<=65535?y+=String.fromCharCode(M):(y+=String.fromCharCode(55296+(M-65535-1>>10)),y+=String.fromCharCode(56320+(M-65535-1&1023))))}return this.bitsNeeded=p,this.codePoint=M,y};var Y=function(){try{return new q().decode(new T().encode("test"),{stream:!0})==="test"}catch(t){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+t)}return!1};(q==null||T==null||!Y())&&(q=D);var m=function(){};function G(t){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=m,this.onload=m,this.onerror=m,this.onreadystatechange=m,this._contentType="",this._xhr=t,this._sendTimeout=0,this._abort=m}G.prototype.open=function(t,o){this._abort(!0);var u=this,i=this._xhr,y=1,p=0;this._abort=function(b){u._sendTimeout!==0&&(ae(u._sendTimeout),u._sendTimeout=0),(y===1||y===2||y===3)&&(y=4,i.onload=m,i.onerror=m,i.onabort=m,i.onprogress=m,i.onreadystatechange=m,i.abort(),p!==0&&(ae(p),p=0),b||(u.readyState=4,u.onabort(null),u.onreadystatechange())),y=0};var M=function(){if(y===1){var b=0,X="",Se=void 0;if("contentType"in i)b=200,X="OK",Se=i.contentType;else try{b=i.status,X=i.statusText,Se=i.getResponseHeader("Content-Type")}catch{b=0,X="",Se=void 0}b!==0&&(y=2,u.readyState=2,u.status=b,u.statusText=X,u._contentType=Se,u.onreadystatechange())}},V=function(){if(M(),y===2||y===3){y=3;var b="";try{b=i.responseText}catch{}u.readyState=3,u.responseText=b,u.onprogress()}},L=function(b,X){if((X==null||X.preventDefault==null)&&(X={preventDefault:m}),V(),y===1||y===2||y===3){if(y=4,p!==0&&(ae(p),p=0),u.readyState=4,b==="load")u.onload(X);else if(b==="error")u.onerror(X);else if(b==="abort")u.onabort(X);else throw new TypeError;u.onreadystatechange()}},I=function(b){i!=null&&(i.readyState===4?(!("onload"in i)||!("onerror"in i)||!("onabort"in i))&&L(i.responseText===""?"error":"load",b):i.readyState===3?"onprogress"in i||V():i.readyState===2&&M())},U=function(){p=z(function(){U()},500),i.readyState===3&&V()};"onload"in i&&(i.onload=function(b){L("load",b)}),"onerror"in i&&(i.onerror=function(b){L("error",b)}),"onabort"in i&&(i.onabort=function(b){L("abort",b)}),"onprogress"in i&&(i.onprogress=V),"onreadystatechange"in i&&(i.onreadystatechange=function(b){I(b)}),("contentType"in i||!("ontimeout"in C.prototype))&&(o+=(o.indexOf("?")===-1?"?":"&")+"padding=true"),i.open(t,o,!0),"readyState"in i&&(p=z(function(){U()},0))},G.prototype.abort=function(){this._abort(!1)},G.prototype.getResponseHeader=function(t){return this._contentType},G.prototype.setRequestHeader=function(t,o){var u=this._xhr;"setRequestHeader"in u&&u.setRequestHeader(t,o)},G.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},G.prototype.send=function(){if((!("ontimeout"in C.prototype)||!("sendAsBinary"in C.prototype)&&!("mozAnon"in C.prototype))&&H!=null&&H.readyState!=null&&H.readyState!=="complete"){var t=this;t._sendTimeout=z(function(){t._sendTimeout=0,t.send()},4);return}var o=this._xhr;"withCredentials"in o&&(o.withCredentials=this.withCredentials);try{o.send(void 0)}catch(u){throw u}};function Z(t){return t.replace(/[A-Z]/g,function(o){return String.fromCharCode(o.charCodeAt(0)+32)})}function J(t){for(var o=Object.create(null),u=t.split(`\r
6
- `),i=0;i<u.length;i+=1){var y=u[i],p=y.split(": "),M=p.shift(),V=p.join(": ");o[Z(M)]=V}this._map=o}J.prototype.get=function(t){return this._map[Z(t)]},C!=null&&C.HEADERS_RECEIVED==null&&(C.HEADERS_RECEIVED=2);function de(){}de.prototype.open=function(t,o,u,i,y,p,M){t.open("GET",y);var V=0;t.onprogress=function(){var I=t.responseText,U=I.slice(V);V+=U.length,u(U)},t.onerror=function(I){I.preventDefault(),i(new Error("NetworkError"))},t.onload=function(){i(null)},t.onabort=function(){i(null)},t.onreadystatechange=function(){if(t.readyState===C.HEADERS_RECEIVED){var I=t.status,U=t.statusText,b=t.getResponseHeader("Content-Type"),X=t.getAllResponseHeaders();o(I,U,b,new J(X))}},t.withCredentials=p;for(var L in M)Object.prototype.hasOwnProperty.call(M,L)&&t.setRequestHeader(L,M[L]);return t.send(),t};function K(t){this._headers=t}K.prototype.get=function(t){return this._headers.get(t)};function ee(){}ee.prototype.open=function(t,o,u,i,y,p,M){var V=null,L=new we,I=L.signal,U=new q;return j(y,{headers:M,credentials:p?"include":"same-origin",signal:I,cache:"no-store"}).then(function(b){return V=b.body.getReader(),o(b.status,b.statusText,b.headers.get("Content-Type"),new K(b.headers)),new A(function(X,Se){var $e=function(){V.read().then(function(me){if(me.done)X(void 0);else{var he=U.decode(me.value,{stream:!0});u(he),$e()}}).catch(function(me){Se(me)})};$e()})}).catch(function(b){if(b.name!=="AbortError")return b}).then(function(b){i(b)}),{abort:function(){V?.cancel(),L.abort()}}};function O(){this._listeners=Object.create(null)}function w(t){z(function(){throw t},0)}O.prototype.dispatchEvent=function(t){t.target=this;var o=this._listeners[t.type];if(o!=null)for(var u=o.length,i=0;i<u;i+=1){var y=o[i];try{typeof y.handleEvent=="function"?y.handleEvent(t):y.call(this,t)}catch(p){w(p)}}},O.prototype.addEventListener=function(t,o){t=String(t);var u=this._listeners,i=u[t];i==null&&(i=[],u[t]=i);for(var y=!1,p=0;p<i.length;p+=1)i[p]===o&&(y=!0);y||i.push(o)},O.prototype.removeEventListener=function(t,o){t=String(t);var u=this._listeners,i=u[t];if(i!=null){for(var y=[],p=0;p<i.length;p+=1)i[p]!==o&&y.push(i[p]);y.length===0?delete u[t]:u[t]=y}};function B(t){this.type=t,this.target=void 0}function te(t,o){B.call(this,t),this.data=o.data,this.lastEventId=o.lastEventId}te.prototype=Object.create(B.prototype);function l(t,o){B.call(this,t),this.status=o.status,this.statusText=o.statusText,this.headers=o.headers}l.prototype=Object.create(B.prototype);function a(t,o){B.call(this,t),this.error=o.error}a.prototype=Object.create(B.prototype);var n=-1,s=0,r=1,d=2,h=-1,v=0,R=1,k=2,Q=3,c=/^text\/event\-stream(;.*)?$/i,_=1e3,P=18e6,fe=function(t,o){var u=t==null?o:parseInt(t,10);return u!==u&&(u=o),ie(u)},ie=function(t){return Math.min(Math.max(t,_),P)},$=function(t,o,u){try{typeof o=="function"&&o.call(t,u)}catch(i){w(i)}};function E(t,o){O.call(this),o=o||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ge(this,t,o)}function se(){return C!=null&&"withCredentials"in C.prototype||F==null?new C:new F}var ue=j!=null&&oe!=null&&"body"in oe.prototype;function ge(t,o,u){o=String(o);var i=!!u.withCredentials,y=u.lastEventIdQueryParameterName||"lastEventId",p=ie(1e3),M=fe(u.heartbeatTimeout,45e3),V="",L=p,I=!1,U=0,b=u.headers||{},X=u.Transport,Se=ue&&X==null?void 0:new G(X!=null?new X:se()),$e=X!=null&&typeof X!="string"?new X:Se==null?new ee:new de,me=void 0,he=0,_e=n,xe="",Ae="",Te="",Ce="",pe=v,Ye=0,Me=0,Pe=function(ce,re,ye,be){if(_e===s)if(ce===200&&ye!=null&&c.test(ye)){_e=r,I=Date.now(),L=p,t.readyState=r;var ve=new l("open",{status:ce,statusText:re,headers:be});t.dispatchEvent(ve),$(t,t.onopen,ve)}else{var le="";ce!==200?(re&&(re=re.replace(/\s+/g," ")),le="EventSource's response has a status "+ce+" "+re+" that is not 200. Aborting the connection."):le="EventSource's response has a Content-Type specifying an unsupported type: "+(ye==null?"-":ye.replace(/\s+/g," "))+". Aborting the connection.",Re();var ve=new l("error",{status:ce,statusText:re,headers:be});t.dispatchEvent(ve),$(t,t.onerror,ve),console.error(le)}},Ue=function(ce){if(_e===r){for(var re=-1,ye=0;ye<ce.length;ye+=1){var be=ce.charCodeAt(ye);(be===10||be===13)&&(re=ye)}var ve=(re!==-1?Ce:"")+ce.slice(0,re+1);Ce=(re===-1?Ce:"")+ce.slice(re+1),ce!==""&&(I=Date.now(),U+=ce.length);for(var le=0;le<ve.length;le+=1){var be=ve.charCodeAt(le);if(pe===h&&be===10)pe=v;else if(pe===h&&(pe=v),be===13||be===10){if(pe!==v){pe===R&&(Me=le+1);var De=ve.slice(Ye,Me-1),Ee=ve.slice(Me+(Me<le&&ve.charCodeAt(Me)===32?1:0),le);De==="data"?(xe+=`
7
- `,xe+=Ee):De==="id"?Ae=Ee:De==="event"?Te=Ee:De==="retry"?(p=fe(Ee,p),L=p):De==="heartbeatTimeout"&&(M=fe(Ee,M),he!==0&&(ae(he),he=z(function(){Le()},M)))}if(pe===v){if(xe!==""){V=Ae,Te===""&&(Te="message");var Oe=new te(Te,{data:xe.slice(1),lastEventId:Ae});if(t.dispatchEvent(Oe),Te==="open"?$(t,t.onopen,Oe):Te==="message"?$(t,t.onmessage,Oe):Te==="error"&&$(t,t.onerror,Oe),_e===d)return}xe="",Te=""}pe=be===13?h:v}else pe===v&&(Ye=le,pe=R),pe===R?be===58&&(Me=le+1,pe=k):pe===k&&(pe=Q)}}},Ie=function(ce){if(_e===r||_e===s){_e=n,he!==0&&(ae(he),he=0),he=z(function(){Le()},L),L=ie(Math.min(p*16,L*2)),t.readyState=s;var re=new a("error",{error:ce});t.dispatchEvent(re),$(t,t.onerror,re),ce!=null&&console.error(ce)}},Re=function(){_e=d,me!=null&&(me.abort(),me=void 0),he!==0&&(ae(he),he=0),t.readyState=d},Le=function(){if(he=0,_e!==n){if(!I&&me!=null)Ie(new Error("No activity within "+M+" milliseconds. "+(_e===s?"No response received.":U+" chars received.")+" Reconnecting.")),me!=null&&(me.abort(),me=void 0);else{var ce=Math.max((I||Date.now())+M-Date.now(),1);I=!1,he=z(function(){Le()},ce)}return}I=!1,U=0,he=z(function(){Le()},M),_e=s,xe="",Te="",Ae=V,Ce="",Ye=0,Me=0,pe=v;var re=o;if(o.slice(0,5)!=="data:"&&o.slice(0,5)!=="blob:"&&V!==""){var ye=o.indexOf("?");re=ye===-1?o:o.slice(0,ye+1)+o.slice(ye+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Ee,Oe){return Oe===y?"":Ee}),re+=(o.indexOf("?")===-1?"?":"&")+y+"="+encodeURIComponent(V)}var be=t.withCredentials,ve={};ve.Accept="text/event-stream";var le=t.headers;if(le!=null)for(var De in le)Object.prototype.hasOwnProperty.call(le,De)&&(ve[De]=le[De]);try{me=$e.open(Se,Pe,Ue,Ie,re,be,ve)}catch(Ee){throw Re(),Ee}};t.url=o,t.readyState=s,t.withCredentials=i,t.headers=b,t._close=Re,Le()}E.prototype=Object.create(O.prototype),E.prototype.CONNECTING=s,E.prototype.OPEN=r,E.prototype.CLOSED=d,E.prototype.close=function(){this._close()},E.CONNECTING=s,E.OPEN=r,E.CLOSED=d,E.prototype.withCredentials=void 0;var ne=N;C!=null&&(N==null||!("withCredentials"in N.prototype))&&(ne=E),function(t){{var o=t(g);o!==void 0&&(S.exports=o)}}(function(t){t.EventSourcePolyfill=E,t.NativeEventSource=N,t.EventSource=ne})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:e.commonjsGlobal:globalThis)})(Ne,Ne.exports);var ke={exports:{}};(function(S,g){(function(x,z){S.exports=z()})(e.commonjsGlobal,function(){var x=1e3,z=6e4,ae=36e5,C="millisecond",F="second",W="minute",N="hour",H="day",A="week",j="month",oe="quarter",q="year",T="date",we="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,D=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,Y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(l){var a=["th","st","nd","rd"],n=l%100;return"["+l+(a[(n-20)%10]||a[n]||a[0])+"]"}},m=function(l,a,n){var s=String(l);return!s||s.length>=a?l:""+Array(a+1-s.length).join(n)+l},G={s:m,z:function(l){var a=-l.utcOffset(),n=Math.abs(a),s=Math.floor(n/60),r=n%60;return(a<=0?"+":"-")+m(s,2,"0")+":"+m(r,2,"0")},m:function l(a,n){if(a.date()<n.date())return-l(n,a);var s=12*(n.year()-a.year())+(n.month()-a.month()),r=a.clone().add(s,j),d=n-r<0,h=a.clone().add(s+(d?-1:1),j);return+(-(s+(n-r)/(d?r-h:h-r))||0)},a:function(l){return l<0?Math.ceil(l)||0:Math.floor(l)},p:function(l){return{M:j,y:q,w:A,d:H,D:T,h:N,m:W,s:F,ms:C,Q:oe}[l]||String(l||"").toLowerCase().replace(/s$/,"")},u:function(l){return l===void 0}},Z="en",J={};J[Z]=Y;var de="$isDayjsObject",K=function(l){return l instanceof B||!(!l||!l[de])},ee=function l(a,n,s){var r;if(!a)return Z;if(typeof a=="string"){var d=a.toLowerCase();J[d]&&(r=d),n&&(J[d]=n,r=d);var h=a.split("-");if(!r&&h.length>1)return l(h[0])}else{var v=a.name;J[v]=a,r=v}return!s&&r&&(Z=r),r||!s&&Z},O=function(l,a){if(K(l))return l.clone();var n=typeof a=="object"?a:{};return n.date=l,n.args=arguments,new B(n)},w=G;w.l=ee,w.i=K,w.w=function(l,a){return O(l,{locale:a.$L,utc:a.$u,x:a.$x,$offset:a.$offset})};var B=function(){function l(n){this.$L=ee(n.locale,null,!0),this.parse(n),this.$x=this.$x||n.x||{},this[de]=!0}var a=l.prototype;return a.parse=function(n){this.$d=function(s){var r=s.date,d=s.utc;if(r===null)return new Date(NaN);if(w.u(r))return new Date;if(r instanceof Date)return new Date(r);if(typeof r=="string"&&!/Z$/i.test(r)){var h=r.match(f);if(h){var v=h[2]-1||0,R=(h[7]||"0").substring(0,3);return d?new Date(Date.UTC(h[1],v,h[3]||1,h[4]||0,h[5]||0,h[6]||0,R)):new Date(h[1],v,h[3]||1,h[4]||0,h[5]||0,h[6]||0,R)}}return new Date(r)}(n),this.init()},a.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},a.$utils=function(){return w},a.isValid=function(){return this.$d.toString()!==we},a.isSame=function(n,s){var r=O(n);return this.startOf(s)<=r&&r<=this.endOf(s)},a.isAfter=function(n,s){return O(n)<this.startOf(s)},a.isBefore=function(n,s){return this.endOf(s)<O(n)},a.$g=function(n,s,r){return w.u(n)?this[s]:this.set(r,n)},a.unix=function(){return Math.floor(this.valueOf()/1e3)},a.valueOf=function(){return this.$d.getTime()},a.startOf=function(n,s){var r=this,d=!!w.u(s)||s,h=w.p(n),v=function(ie,$){var E=w.w(r.$u?Date.UTC(r.$y,$,ie):new Date(r.$y,$,ie),r);return d?E:E.endOf(H)},R=function(ie,$){return w.w(r.toDate()[ie].apply(r.toDate("s"),(d?[0,0,0,0]:[23,59,59,999]).slice($)),r)},k=this.$W,Q=this.$M,c=this.$D,_="set"+(this.$u?"UTC":"");switch(h){case q:return d?v(1,0):v(31,11);case j:return d?v(1,Q):v(0,Q+1);case A:var P=this.$locale().weekStart||0,fe=(k<P?k+7:k)-P;return v(d?c-fe:c+(6-fe),Q);case H:case T:return R(_+"Hours",0);case N:return R(_+"Minutes",1);case W:return R(_+"Seconds",2);case F:return R(_+"Milliseconds",3);default:return this.clone()}},a.endOf=function(n){return this.startOf(n,!1)},a.$set=function(n,s){var r,d=w.p(n),h="set"+(this.$u?"UTC":""),v=(r={},r[H]=h+"Date",r[T]=h+"Date",r[j]=h+"Month",r[q]=h+"FullYear",r[N]=h+"Hours",r[W]=h+"Minutes",r[F]=h+"Seconds",r[C]=h+"Milliseconds",r)[d],R=d===H?this.$D+(s-this.$W):s;if(d===j||d===q){var k=this.clone().set(T,1);k.$d[v](R),k.init(),this.$d=k.set(T,Math.min(this.$D,k.daysInMonth())).$d}else v&&this.$d[v](R);return this.init(),this},a.set=function(n,s){return this.clone().$set(n,s)},a.get=function(n){return this[w.p(n)]()},a.add=function(n,s){var r,d=this;n=Number(n);var h=w.p(s),v=function(Q){var c=O(d);return w.w(c.date(c.date()+Math.round(Q*n)),d)};if(h===j)return this.set(j,this.$M+n);if(h===q)return this.set(q,this.$y+n);if(h===H)return v(1);if(h===A)return v(7);var R=(r={},r[W]=z,r[N]=ae,r[F]=x,r)[h]||1,k=this.$d.getTime()+n*R;return w.w(k,this)},a.subtract=function(n,s){return this.add(-1*n,s)},a.format=function(n){var s=this,r=this.$locale();if(!this.isValid())return r.invalidDate||we;var d=n||"YYYY-MM-DDTHH:mm:ssZ",h=w.z(this),v=this.$H,R=this.$m,k=this.$M,Q=r.weekdays,c=r.months,_=r.meridiem,P=function($,E,se,ue){return $&&($[E]||$(s,d))||se[E].slice(0,ue)},fe=function($){return w.s(v%12||12,$,"0")},ie=_||function($,E,se){var ue=$<12?"AM":"PM";return se?ue.toLowerCase():ue};return d.replace(D,function($,E){return E||function(se){switch(se){case"YY":return String(s.$y).slice(-2);case"YYYY":return w.s(s.$y,4,"0");case"M":return k+1;case"MM":return w.s(k+1,2,"0");case"MMM":return P(r.monthsShort,k,c,3);case"MMMM":return P(c,k);case"D":return s.$D;case"DD":return w.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return P(r.weekdaysMin,s.$W,Q,2);case"ddd":return P(r.weekdaysShort,s.$W,Q,3);case"dddd":return Q[s.$W];case"H":return String(v);case"HH":return w.s(v,2,"0");case"h":return fe(1);case"hh":return fe(2);case"a":return ie(v,R,!0);case"A":return ie(v,R,!1);case"m":return String(R);case"mm":return w.s(R,2,"0");case"s":return String(s.$s);case"ss":return w.s(s.$s,2,"0");case"SSS":return w.s(s.$ms,3,"0");case"Z":return h}return null}($)||h.replace(":","")})},a.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},a.diff=function(n,s,r){var d,h=this,v=w.p(s),R=O(n),k=(R.utcOffset()-this.utcOffset())*z,Q=this-R,c=function(){return w.m(h,R)};switch(v){case q:d=c()/12;break;case j:d=c();break;case oe:d=c()/3;break;case A:d=(Q-k)/6048e5;break;case H:d=(Q-k)/864e5;break;case N:d=Q/ae;break;case W:d=Q/z;break;case F:d=Q/x;break;default:d=Q}return r?d:w.a(d)},a.daysInMonth=function(){return this.endOf(j).$D},a.$locale=function(){return J[this.$L]},a.locale=function(n,s){if(!n)return this.$L;var r=this.clone(),d=ee(n,s,!0);return d&&(r.$L=d),r},a.clone=function(){return w.w(this.$d,this)},a.toDate=function(){return new Date(this.valueOf())},a.toJSON=function(){return this.isValid()?this.toISOString():null},a.toISOString=function(){return this.$d.toISOString()},a.toString=function(){return this.$d.toUTCString()},l}(),te=B.prototype;return O.prototype=te,[["$ms",C],["$s",F],["$m",W],["$H",N],["$W",H],["$M",j],["$y",q],["$D",T]].forEach(function(l){te[l[1]]=function(a){return this.$g(a,l[0],l[1])}}),O.extend=function(l,a){return l.$i||(l(a,B,O),l.$i=!0),O},O.locale=ee,O.isDayjs=K,O.unix=function(l){return O(1e3*l)},O.en=J[Z],O.Ls=J,O.p={},O})})(ke);var Qe=ke.exports;const Je=e.getDefaultExportFromCjs(Qe);var ze={exports:{}};(function(S,g){(function(x,z){S.exports=z()})(e.commonjsGlobal,function(){var x={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},z=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,ae=/\d/,C=/\d\d/,F=/\d\d?/,W=/\d*[^-_:/,()\s\d]+/,N={},H=function(f){return(f=+f)+(f>68?1900:2e3)},A=function(f){return function(D){this[f]=+D}},j=[/[+-]\d\d:?(\d\d)?|Z/,function(f){(this.zone||(this.zone={})).offset=function(D){if(!D||D==="Z")return 0;var Y=D.match(/([+-]|\d\d)/g),m=60*Y[1]+(+Y[2]||0);return m===0?0:Y[0]==="+"?-m:m}(f)}],oe=function(f){var D=N[f];return D&&(D.indexOf?D:D.s.concat(D.f))},q=function(f,D){var Y,m=N.meridiem;if(m){for(var G=1;G<=24;G+=1)if(f.indexOf(m(G,0,D))>-1){Y=G>12;break}}else Y=f===(D?"pm":"PM");return Y},T={A:[W,function(f){this.afternoon=q(f,!1)}],a:[W,function(f){this.afternoon=q(f,!0)}],Q:[ae,function(f){this.month=3*(f-1)+1}],S:[ae,function(f){this.milliseconds=100*+f}],SS:[C,function(f){this.milliseconds=10*+f}],SSS:[/\d{3}/,function(f){this.milliseconds=+f}],s:[F,A("seconds")],ss:[F,A("seconds")],m:[F,A("minutes")],mm:[F,A("minutes")],H:[F,A("hours")],h:[F,A("hours")],HH:[F,A("hours")],hh:[F,A("hours")],D:[F,A("day")],DD:[C,A("day")],Do:[W,function(f){var D=N.ordinal,Y=f.match(/\d+/);if(this.day=Y[0],D)for(var m=1;m<=31;m+=1)D(m).replace(/\[|\]/g,"")===f&&(this.day=m)}],w:[F,A("week")],ww:[C,A("week")],M:[F,A("month")],MM:[C,A("month")],MMM:[W,function(f){var D=oe("months"),Y=(oe("monthsShort")||D.map(function(m){return m.slice(0,3)})).indexOf(f)+1;if(Y<1)throw new Error;this.month=Y%12||Y}],MMMM:[W,function(f){var D=oe("months").indexOf(f)+1;if(D<1)throw new Error;this.month=D%12||D}],Y:[/[+-]?\d+/,A("year")],YY:[C,function(f){this.year=H(f)}],YYYY:[/\d{4}/,A("year")],Z:j,ZZ:j};function we(f){var D,Y;D=f,Y=N&&N.formats;for(var m=(f=D.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(O,w,B){var te=B&&B.toUpperCase();return w||Y[B]||x[B]||Y[te].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(l,a,n){return a||n.slice(1)})})).match(z),G=m.length,Z=0;Z<G;Z+=1){var J=m[Z],de=T[J],K=de&&de[0],ee=de&&de[1];m[Z]=ee?{regex:K,parser:ee}:J.replace(/^\[|\]$/g,"")}return function(O){for(var w={},B=0,te=0;B<G;B+=1){var l=m[B];if(typeof l=="string")te+=l.length;else{var a=l.regex,n=l.parser,s=O.slice(te),r=a.exec(s)[0];n.call(w,r),O=O.replace(r,"")}}return function(d){var h=d.afternoon;if(h!==void 0){var v=d.hours;h?v<12&&(d.hours+=12):v===12&&(d.hours=0),delete d.afternoon}}(w),w}}return function(f,D,Y){Y.p.customParseFormat=!0,f&&f.parseTwoDigitYear&&(H=f.parseTwoDigitYear);var m=D.prototype,G=m.parse;m.parse=function(Z){var J=Z.date,de=Z.utc,K=Z.args;this.$u=de;var ee=K[1];if(typeof ee=="string"){var O=K[2]===!0,w=K[3]===!0,B=O||w,te=K[2];w&&(te=K[2]),N=this.$locale(),!O&&te&&(N=Y.Ls[te]),this.$d=function(s,r,d,h){try{if(["x","X"].indexOf(r)>-1)return new Date((r==="X"?1e3:1)*s);var v=we(r)(s),R=v.year,k=v.month,Q=v.day,c=v.hours,_=v.minutes,P=v.seconds,fe=v.milliseconds,ie=v.zone,$=v.week,E=new Date,se=Q||(R||k?1:E.getDate()),ue=R||E.getFullYear(),ge=0;R&&!k||(ge=k>0?k-1:E.getMonth());var ne,t=c||0,o=_||0,u=P||0,i=fe||0;return ie?new Date(Date.UTC(ue,ge,se,t,o,u,i+60*ie.offset*1e3)):d?new Date(Date.UTC(ue,ge,se,t,o,u,i)):(ne=new Date(ue,ge,se,t,o,u,i),$&&(ne=h(ne).week($).toDate()),ne)}catch{return new Date("")}}(J,ee,de,Y),this.init(),te&&te!==!0&&(this.$L=this.locale(te).$L),B&&J!=this.format(ee)&&(this.$d=new Date("")),N={}}else if(ee instanceof Array)for(var l=ee.length,a=1;a<=l;a+=1){K[1]=ee[a-1];var n=Y.apply(this,K);if(n.isValid()){this.$d=n.$d,this.$L=n.$L,this.init();break}a===l&&(this.$d=new Date(""))}else G.call(this,Z)}}})})(ze);var Ke=ze.exports;const et=e.getDefaultExportFromCjs(Ke);Je.extend(et);const Fe=(S,g=!1)=>{if(typeof S=="boolean")return S;if(S==null)return g;if(typeof S=="number")return S!==0;const x=String(S).trim().toLowerCase();return x===""?!0:x!=="false"&&x!=="0"},tt={en:{bannerSlideLabel:"Tournament {index} of {total}",bannerGoToSlide:"Go to tournament {index}"},tr:{bannerSlideLabel:"Turnuva {index} / {total}",bannerGoToSlide:"{index}. turnuvaya git"},da:{bannerSlideLabel:"Turnering {index} af {total}",bannerGoToSlide:"Gå til turnering {index}"}},nt=5e3,rt=1e3,at=!0,ot=!0,it=!0,st=!0;var ut=e.from_html('<div class="tournaments-banner svelte-h8hbcz"><div class="tournaments-banner__skeleton svelte-h8hbcz" aria-busy="true"></div></div>'),ct=e.from_html('<a class="tournaments-banner__slide svelte-h8hbcz"><!></a>'),lt=e.from_html('<button type="button"></button>'),dt=e.from_html('<div class="tournaments-banner__dots svelte-h8hbcz"></div>'),ft=e.from_html('<div class="tournaments-banner svelte-h8hbcz" role="region" aria-roledescription="carousel"><div class="tournaments-banner__track svelte-h8hbcz"></div> <!></div>');const ht={hash:"svelte-h8hbcz",code:`.tournaments-banner.svelte-h8hbcz {display:flex;flex-direction:column;gap:8px;.tournaments-banner__track:where(.svelte-h8hbcz) {display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;overscroll-behavior-x:contain;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar {display:none;}}.tournaments-banner__slide:where(.svelte-h8hbcz) {display:block;flex:0 0 100%;color:inherit;text-decoration:none;min-width:0;scroll-snap-align:start;scroll-snap-stop:always;cursor:pointer;&:focus-visible {outline:2px solid var(--border-alert, rgba(255, 204, 0, 1));outline-offset:-2px;border-radius:13px;}}.tournaments-banner__skeleton:where(.svelte-h8hbcz) {height:308px;border-radius:13px;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));
8
- animation: svelte-h8hbcz-tournaments-banner-pulse 1.5s ease-in-out infinite;}.tournaments-banner__dots:where(.svelte-h8hbcz) {display:flex;justify-content:center;gap:8px;}.tournaments-banner__dot:where(.svelte-h8hbcz) {width:8px;height:8px;padding:0;border:0;border-radius:50%;background:var(--text-subtle, rgba(223, 227, 232, 1));opacity:0.8;cursor:pointer;&.active {background:var(--text-brand, rgba(255, 204, 0, 1));opacity:1;}&:focus-visible {outline:2px solid var(--border-alert, rgba(255, 204, 0, 1));outline-offset:2px;}}}
9
-
10
- @keyframes svelte-h8hbcz-tournaments-banner-pulse {
11
- 50% {
12
- opacity: 0.4;
13
- }
14
- }
15
-
16
- @media (max-width: 767px) {.tournaments-banner.svelte-h8hbcz .tournaments-banner__skeleton:where(.svelte-h8hbcz) {height:160px;}
17
- }
18
-
19
- @media (prefers-reduced-motion: reduce) {.tournaments-banner.svelte-h8hbcz .tournaments-banner__track:where(.svelte-h8hbcz) {scroll-behavior:auto;}.tournaments-banner.svelte-h8hbcz .tournaments-banner__skeleton:where(.svelte-h8hbcz) {
20
- animation: none;}
21
- }`};function He(S,g){e.push(g,!0),e.append_styles(S,ht);const x=()=>e.store_get(e.$format,"$_",z),[z,ae]=e.setup_stores(),C=e.prop(g,"endpoint"),F=e.prop(g,"language",7,"en"),W=e.prop(g,"session"),N=e.prop(g,"platform"),H=e.prop(g,"translationurl"),A=e.prop(g,"navigationhref",7,""),j=e.prop(g,"enableautoplay",7,void 0),oe=e.prop(g,"autoplayinterval",7,void 0),q=e.prop(g,"pauseoninteraction",7,void 0),T=e.prop(g,"loop",7,void 0),we=e.prop(g,"showdots",7,void 0);e.setupI18n({withLocale:"en",translations:{}}),e.registerTranslations(tt),e.setLocale(F()),e.user_pre_effect(()=>{H()&&e.loadTranslations(H())}),e.user_effect(()=>{e.setLocale(F())});let f=e.state(e.proxy([])),D=e.state(!0),Y=e.state(0),m=e.state(null),G=e.state(!1),Z=e.state(!1),J=e.state(!1),de=e.state(!1),K=e.state(!1);const ee=e.user_derived(()=>Fe(j(),at)),O=e.user_derived(()=>Fe(q(),ot)),w=e.user_derived(()=>Fe(T(),it)),B=e.user_derived(()=>Fe(we(),st)),te=e.user_derived(()=>Number(oe())>0?Math.max(Number(oe()),rt):nt),l=c=>`${A().replace(/\/$/,"")}/${c.id}`;e.user_effect(()=>{const c={endpoint:C(),language:F(),session:W(),platform:N()};if(!c.endpoint)return;let _=!1;return e.set(D,!0),Ze(c).then(P=>{_||(e.set(f,P,!0),e.set(Y,0))}).catch(P=>{console.log(P),_||e.set(f,[],!0)}).finally(()=>{_||e.set(D,!1)}),()=>{_=!0}}),e.user_effect(()=>{const c=window.matchMedia("(prefers-reduced-motion: reduce)"),_=()=>{e.set(K,c.matches,!0)},P=()=>{e.set(de,document.visibilityState==="hidden")};return _(),P(),c.addEventListener("change",_),document.addEventListener("visibilitychange",P),()=>{c.removeEventListener("change",_),document.removeEventListener("visibilitychange",P)}}),e.user_effect(()=>{const c=e.get(Y),_=e.get(f).length,P=e.get(O)&&(e.get(G)||e.get(Z)||e.get(J)),fe=c>=_-1;if(!e.get(ee)||_<2||P||e.get(de)||e.get(K)||fe&&!e.get(w))return;const ie=setTimeout(()=>n((c+1)%_),e.get(te));return()=>clearTimeout(ie)});const a=()=>{!e.get(m)||!e.get(m).clientWidth||e.set(Y,Math.round(e.get(m).scrollLeft/e.get(m).clientWidth),!0)},n=c=>{e.get(m)?.scrollTo({left:c*e.get(m).clientWidth,behavior:"smooth"})},s=c=>{e.set(Z,c.target.matches(":focus-visible"),!0)},r=(c,_)=>{A()||(c.preventDefault(),Ve(_))};var d={get endpoint(){return C()},set endpoint(c){C(c),e.flushSync()},get language(){return F()},set language(c="en"){F(c),e.flushSync()},get session(){return W()},set session(c){W(c),e.flushSync()},get platform(){return N()},set platform(c){N(c),e.flushSync()},get translationurl(){return H()},set translationurl(c){H(c),e.flushSync()},get navigationhref(){return A()},set navigationhref(c=""){A(c),e.flushSync()},get enableautoplay(){return j()},set enableautoplay(c=void 0){j(c),e.flushSync()},get autoplayinterval(){return oe()},set autoplayinterval(c=void 0){oe(c),e.flushSync()},get pauseoninteraction(){return q()},set pauseoninteraction(c=void 0){q(c),e.flushSync()},get loop(){return T()},set loop(c=void 0){T(c),e.flushSync()},get showdots(){return we()},set showdots(c=void 0){we(c),e.flushSync()}},h=e.comment(),v=e.first_child(h);{var R=c=>{var _=ut();e.append(c,_)},k=c=>{var _=ft(),P=e.child(_);e.each(P,23,()=>e.get(f),$=>$.id,($,E,se)=>{var ue=ct(),ge=e.child(ue);{let ne=e.user_derived(()=>e.get(se)===0);Be.TournamentImage(ge,{variant:"banner",get priority(){return e.get(ne)},get src(){return e.get(E).thumbnail},get alt(){return e.get(E).nameOrTitle},get state(){return e.get(E).state},get startTime(){return e.get(E).startTime},get endTime(){return e.get(E).endTime},get language(){return F()}})}e.reset(ue),e.template_effect((ne,t)=>{e.set_attribute(ue,"href",ne),e.set_attribute(ue,"aria-label",t)},[()=>A()?l(e.get(E)):"#",()=>`${e.get(E).nameOrTitle} – ${x()("bannerSlideLabel",{values:{index:e.get(se)+1,total:e.get(f).length}})}`]),e.delegated("click",ue,ne=>r(ne,e.get(E))),e.append($,ue)}),e.reset(P),e.bind_this(P,$=>e.set(m,$),()=>e.get(m));var fe=e.sibling(P,2);{var ie=$=>{var E=dt();e.each(E,23,()=>e.get(f),se=>se.id,(se,ue,ge)=>{var ne=lt();let t;e.template_effect(o=>{t=e.set_class(ne,1,"tournaments-banner__dot svelte-h8hbcz",null,t,{active:e.get(ge)===e.get(Y)}),e.set_attribute(ne,"aria-label",o),e.set_attribute(ne,"aria-current",e.get(ge)===e.get(Y)?"true":void 0)},[()=>x()("bannerGoToSlide",{values:{index:e.get(ge)+1}})]),e.delegated("click",ne,()=>n(e.get(ge))),e.append(se,ne)}),e.reset(E),e.append($,E)};e.if_block(fe,$=>{e.get(B)&&e.get(f).length>1&&$(ie)})}e.reset(_),e.event("mouseenter",_,()=>e.set(G,!0)),e.event("mouseleave",_,()=>e.set(G,!1)),e.delegated("focusin",_,s),e.delegated("focusout",_,()=>e.set(Z,!1)),e.delegated("touchstart",_,()=>e.set(J,!0)),e.delegated("touchend",_,()=>e.set(J,!1)),e.event("touchcancel",_,()=>e.set(J,!1)),e.event("scroll",P,a),e.append(c,_)};e.if_block(v,c=>{e.get(D)?c(R):e.get(f).length&&c(k,1)})}e.append(S,h);var Q=e.pop(d);return ae(),Q}e.delegate(["focusin","focusout","touchstart","touchend","click"]);e.create_custom_element(He,{endpoint:{},language:{},session:{},platform:{},translationurl:{},navigationhref:{},enableautoplay:{},autoplayinterval:{},pauseoninteraction:{},loop:{},showdots:{}},[],[],{mode:"open"});function je(S,g){e.push(g,!0);let x=e.prop(g,"endpoint"),z=e.prop(g,"language",7,"en"),ae=e.prop(g,"session"),C=e.prop(g,"platform"),F=e.prop(g,"translationurl"),W=e.prop(g,"navigationhref"),N=e.prop(g,"enableautoplay"),H=e.prop(g,"autoplayinterval"),A=e.prop(g,"pauseoninteraction"),j=e.prop(g,"loop"),oe=e.prop(g,"showdots");var q={get endpoint(){return x()},set endpoint(T){x(T),e.flushSync()},get language(){return z()},set language(T="en"){z(T),e.flushSync()},get session(){return ae()},set session(T){ae(T),e.flushSync()},get platform(){return C()},set platform(T){C(T),e.flushSync()},get translationurl(){return F()},set translationurl(T){F(T),e.flushSync()},get navigationhref(){return W()},set navigationhref(T){W(T),e.flushSync()},get enableautoplay(){return N()},set enableautoplay(T){N(T),e.flushSync()},get autoplayinterval(){return H()},set autoplayinterval(T){H(T),e.flushSync()},get pauseoninteraction(){return A()},set pauseoninteraction(T){A(T),e.flushSync()},get loop(){return j()},set loop(T){j(T),e.flushSync()},get showdots(){return oe()},set showdots(T){oe(T),e.flushSync()}};return He(S,{get endpoint(){return x()},get language(){return z()},get session(){return ae()},get platform(){return C()},get translationurl(){return F()},get navigationhref(){return W()},get enableautoplay(){return N()},get autoplayinterval(){return H()},get pauseoninteraction(){return A()},get loop(){return j()},get showdots(){return oe()}}),e.pop(q)}customElements.define("tournaments-banner",e.create_custom_element(je,{endpoint:{},language:{},session:{},platform:{},translationurl:{},navigationhref:{},enableautoplay:{},autoplayinterval:{},pauseoninteraction:{},loop:{},showdots:{}},[],[]));const pt=Object.freeze(Object.defineProperty({__proto__:null,default:je},Symbol.toStringTag,{value:"Module"}));exports.TournamentsBanner=He;exports.TournamentsBanner_ce=pt;
@@ -1,21 +0,0 @@
1
- var qe=Object.defineProperty,Ze=Object.defineProperties;var Qe=Object.getOwnPropertyDescriptors;var ke=Object.getOwnPropertySymbols;var Je=Object.prototype.hasOwnProperty,Ke=Object.prototype.propertyIsEnumerable;var ze=(y,l,g)=>l in y?qe(y,l,{enumerable:!0,configurable:!0,writable:!0,value:g}):y[l]=g,je=(y,l)=>{for(var g in l||(l={}))Je.call(l,g)&&ze(y,g,l[g]);if(ke)for(var g of ke(l))Ke.call(l,g)&&ze(y,g,l[g]);return y},Pe=(y,l)=>Ze(y,Qe(l));var He=(y,l,g)=>new Promise((H,W)=>{var D=L=>{try{j(g.next(L))}catch(Y){W(Y)}},E=L=>{try{j(g.throw(L))}catch(Y){W(Y)}},j=L=>L.done?H(L.value):Promise.resolve(L.value).then(D,E);j((g=g.apply(y,l)).next())});typeof globalThis.HTMLElement=="undefined"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const e=require("./StatusBadge-C6v95b03.cjs"),et=require("./TournamentImage-BEMMcCkt.cjs"),tt=(y,l)=>{window.postMessage(Pe(je({},l),{type:y}),window.location.href)},nt=(y,l)=>{tt(`Tournaments:${y}`,l)},rt=(y,l)=>{nt("viewTournamentDetails",{tournamentId:y.id,tournamentName:y.nameOrTitle})},at=y=>{const l=new Headers;return y&&l.append("X-SessionId",y),l},ot=y=>He(exports,null,function*(){var W,D,E;const l=new URL(`${y.endpoint}/v1/tournaments`);l.searchParams.append("language",y.language),l.searchParams.append("sortField",(W=y.sortField)!=null?W:"StartTime"),l.searchParams.append("sortOrder",(D=y.sortOrder)!=null?D:"desc"),l.searchParams.append("platform",y.platform);const H=yield(yield fetch(l,{method:"GET",headers:at(y.session)})).json();return(E=H==null?void 0:H.items)!=null?E:[]}),it=y=>He(exports,null,function*(){const l=yield ot(y),g=new Date;return l.filter(H=>new Date(H.exhibitionEndTime)>g)});var Ue={exports:{}};/** @license
2
- * eventsource.js
3
- * Available under MIT License (MIT)
4
- * https://github.com/Yaffle/EventSource/
5
- */(function(y,l){(function(g){var H=g.setTimeout,W=g.clearTimeout,D=g.XMLHttpRequest,E=g.XDomainRequest,j=g.ActiveXObject,L=g.EventSource,Y=g.document,R=g.Promise,P=g.fetch,oe=g.Response,Z=g.TextDecoder,M=g.TextEncoder,we=g.AbortController;if(typeof window!="undefined"&&typeof Y!="undefined"&&!("readyState"in Y)&&Y.body==null&&(Y.readyState="loading",window.addEventListener("load",function(t){Y.readyState="complete"},!1)),D==null&&j!=null&&(D=function(){return new j("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(t){function o(){}return o.prototype=t,new o}),Date.now||(Date.now=function(){return new Date().getTime()}),we==null){var h=P;P=function(t,o){var u=o.signal;return h(t,{headers:o.headers,credentials:o.credentials,cache:o.cache}).then(function(i){var w=i.body.getReader();return u._reader=w,u._aborted&&u._reader.cancel(),{status:i.status,statusText:i.statusText,headers:i.headers,body:{getReader:function(){return w}}}})},we=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function x(){this.bitsNeeded=0,this.codePoint=0}x.prototype.decode=function(t){function o(k,B,_){if(_===1)return k>=128>>B&&k<<B<=2047;if(_===2)return k>=2048>>B&&k<<B<=55295||k>=57344>>B&&k<<B<=65535;if(_===3)return k>=65536>>B&&k<<B<=1114111;throw new Error}function u(k,B){if(k===6*1)return B>>6>15?3:B>31?2:1;if(k===6*2)return B>15?3:2;if(k===6*3)return 3;throw new Error}for(var i=65533,w="",v=this.bitsNeeded,$=this.codePoint,X=0;X<t.length;X+=1){var F=t[X];v!==0&&(F<128||F>191||!o($<<6|F&63,v-6,u(v,$)))&&(v=0,$=i,w+=String.fromCharCode($)),v===0?(F>=0&&F<=127?(v=0,$=F):F>=192&&F<=223?(v=6*1,$=F&31):F>=224&&F<=239?(v=6*2,$=F&15):F>=240&&F<=247?(v=6*3,$=F&7):(v=0,$=i),v!==0&&!o($,v,u(v,$))&&(v=0,$=i)):(v-=6,$=$<<6|F&63),v===0&&($<=65535?w+=String.fromCharCode($):(w+=String.fromCharCode(55296+($-65535-1>>10)),w+=String.fromCharCode(56320+($-65535-1&1023))))}return this.bitsNeeded=v,this.codePoint=$,w};var I=function(){try{return new Z().decode(new M().encode("test"),{stream:!0})==="test"}catch(t){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+t)}return!1};(Z==null||M==null||!I())&&(Z=x);var b=function(){};function V(t){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=b,this.onload=b,this.onerror=b,this.onreadystatechange=b,this._contentType="",this._xhr=t,this._sendTimeout=0,this._abort=b}V.prototype.open=function(t,o){this._abort(!0);var u=this,i=this._xhr,w=1,v=0;this._abort=function(_){u._sendTimeout!==0&&(W(u._sendTimeout),u._sendTimeout=0),(w===1||w===2||w===3)&&(w=4,i.onload=b,i.onerror=b,i.onabort=b,i.onprogress=b,i.onreadystatechange=b,i.abort(),v!==0&&(W(v),v=0),_||(u.readyState=4,u.onabort(null),u.onreadystatechange())),w=0};var $=function(){if(w===1){var _=0,q="",Se=void 0;if("contentType"in i)_=200,q="OK",Se=i.contentType;else try{_=i.status,q=i.statusText,Se=i.getResponseHeader("Content-Type")}catch($e){_=0,q="",Se=void 0}_!==0&&(w=2,u.readyState=2,u.status=_,u.statusText=q,u._contentType=Se,u.onreadystatechange())}},X=function(){if($(),w===2||w===3){w=3;var _="";try{_=i.responseText}catch(q){}u.readyState=3,u.responseText=_,u.onprogress()}},F=function(_,q){if((q==null||q.preventDefault==null)&&(q={preventDefault:b}),X(),w===1||w===2||w===3){if(w=4,v!==0&&(W(v),v=0),u.readyState=4,_==="load")u.onload(q);else if(_==="error")u.onerror(q);else if(_==="abort")u.onabort(q);else throw new TypeError;u.onreadystatechange()}},k=function(_){i!=null&&(i.readyState===4?(!("onload"in i)||!("onerror"in i)||!("onabort"in i))&&F(i.responseText===""?"error":"load",_):i.readyState===3?"onprogress"in i||X():i.readyState===2&&$())},B=function(){v=H(function(){B()},500),i.readyState===3&&X()};"onload"in i&&(i.onload=function(_){F("load",_)}),"onerror"in i&&(i.onerror=function(_){F("error",_)}),"onabort"in i&&(i.onabort=function(_){F("abort",_)}),"onprogress"in i&&(i.onprogress=X),"onreadystatechange"in i&&(i.onreadystatechange=function(_){k(_)}),("contentType"in i||!("ontimeout"in D.prototype))&&(o+=(o.indexOf("?")===-1?"?":"&")+"padding=true"),i.open(t,o,!0),"readyState"in i&&(v=H(function(){B()},0))},V.prototype.abort=function(){this._abort(!1)},V.prototype.getResponseHeader=function(t){return this._contentType},V.prototype.setRequestHeader=function(t,o){var u=this._xhr;"setRequestHeader"in u&&u.setRequestHeader(t,o)},V.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},V.prototype.send=function(){if((!("ontimeout"in D.prototype)||!("sendAsBinary"in D.prototype)&&!("mozAnon"in D.prototype))&&Y!=null&&Y.readyState!=null&&Y.readyState!=="complete"){var t=this;t._sendTimeout=H(function(){t._sendTimeout=0,t.send()},4);return}var o=this._xhr;"withCredentials"in o&&(o.withCredentials=this.withCredentials);try{o.send(void 0)}catch(u){throw u}};function Q(t){return t.replace(/[A-Z]/g,function(o){return String.fromCharCode(o.charCodeAt(0)+32)})}function K(t){for(var o=Object.create(null),u=t.split(`\r
6
- `),i=0;i<u.length;i+=1){var w=u[i],v=w.split(": "),$=v.shift(),X=v.join(": ");o[Q($)]=X}this._map=o}K.prototype.get=function(t){return this._map[Q(t)]},D!=null&&D.HEADERS_RECEIVED==null&&(D.HEADERS_RECEIVED=2);function de(){}de.prototype.open=function(t,o,u,i,w,v,$){t.open("GET",w);var X=0;t.onprogress=function(){var k=t.responseText,B=k.slice(X);X+=B.length,u(B)},t.onerror=function(k){k.preventDefault(),i(new Error("NetworkError"))},t.onload=function(){i(null)},t.onabort=function(){i(null)},t.onreadystatechange=function(){if(t.readyState===D.HEADERS_RECEIVED){var k=t.status,B=t.statusText,_=t.getResponseHeader("Content-Type"),q=t.getAllResponseHeaders();o(k,B,_,new K(q))}},t.withCredentials=v;for(var F in $)Object.prototype.hasOwnProperty.call($,F)&&t.setRequestHeader(F,$[F]);return t.send(),t};function ee(t){this._headers=t}ee.prototype.get=function(t){return this._headers.get(t)};function te(){}te.prototype.open=function(t,o,u,i,w,v,$){var X=null,F=new we,k=F.signal,B=new Z;return P(w,{headers:$,credentials:v?"include":"same-origin",signal:k,cache:"no-store"}).then(function(_){return X=_.body.getReader(),o(_.status,_.statusText,_.headers.get("Content-Type"),new ee(_.headers)),new R(function(q,Se){var $e=function(){X.read().then(function(me){if(me.done)q(void 0);else{var he=B.decode(me.value,{stream:!0});u(he),$e()}}).catch(function(me){Se(me)})};$e()})}).catch(function(_){if(_.name!=="AbortError")return _}).then(function(_){i(_)}),{abort:function(){X!=null&&X.cancel(),F.abort()}}};function A(){this._listeners=Object.create(null)}function S(t){H(function(){throw t},0)}A.prototype.dispatchEvent=function(t){t.target=this;var o=this._listeners[t.type];if(o!=null)for(var u=o.length,i=0;i<u;i+=1){var w=o[i];try{typeof w.handleEvent=="function"?w.handleEvent(t):w.call(this,t)}catch(v){S(v)}}},A.prototype.addEventListener=function(t,o){t=String(t);var u=this._listeners,i=u[t];i==null&&(i=[],u[t]=i);for(var w=!1,v=0;v<i.length;v+=1)i[v]===o&&(w=!0);w||i.push(o)},A.prototype.removeEventListener=function(t,o){t=String(t);var u=this._listeners,i=u[t];if(i!=null){for(var w=[],v=0;v<i.length;v+=1)i[v]!==o&&w.push(i[v]);w.length===0?delete u[t]:u[t]=w}};function G(t){this.type=t,this.target=void 0}function ne(t,o){G.call(this,t),this.data=o.data,this.lastEventId=o.lastEventId}ne.prototype=Object.create(G.prototype);function d(t,o){G.call(this,t),this.status=o.status,this.statusText=o.statusText,this.headers=o.headers}d.prototype=Object.create(G.prototype);function a(t,o){G.call(this,t),this.error=o.error}a.prototype=Object.create(G.prototype);var n=-1,s=0,r=1,f=2,p=-1,m=0,N=1,z=2,J=3,c=/^text\/event\-stream(;.*)?$/i,T=1e3,U=18e6,fe=function(t,o){var u=t==null?o:parseInt(t,10);return u!==u&&(u=o),ie(u)},ie=function(t){return Math.min(Math.max(t,T),U)},C=function(t,o,u){try{typeof o=="function"&&o.call(t,u)}catch(i){S(i)}};function O(t,o){A.call(this),o=o||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,ge(this,t,o)}function se(){return D!=null&&"withCredentials"in D.prototype||E==null?new D:new E}var ue=P!=null&&oe!=null&&"body"in oe.prototype;function ge(t,o,u){o=String(o);var i=!!u.withCredentials,w=u.lastEventIdQueryParameterName||"lastEventId",v=ie(1e3),$=fe(u.heartbeatTimeout,45e3),X="",F=v,k=!1,B=0,_=u.headers||{},q=u.Transport,Se=ue&&q==null?void 0:new V(q!=null?new q:se()),$e=q!=null&&typeof q!="string"?new q:Se==null?new te:new de,me=void 0,he=0,_e=n,xe="",Ae="",Te="",Ce="",pe=m,Ye=0,Me=0,Ve=function(ce,ae,ye,be){if(_e===s)if(ce===200&&ye!=null&&c.test(ye)){_e=r,k=Date.now(),F=v,t.readyState=r;var ve=new d("open",{status:ce,statusText:ae,headers:be});t.dispatchEvent(ve),C(t,t.onopen,ve)}else{var le="";ce!==200?(ae&&(ae=ae.replace(/\s+/g," ")),le="EventSource's response has a status "+ce+" "+ae+" that is not 200. Aborting the connection."):le="EventSource's response has a Content-Type specifying an unsupported type: "+(ye==null?"-":ye.replace(/\s+/g," "))+". Aborting the connection.",Re();var ve=new d("error",{status:ce,statusText:ae,headers:be});t.dispatchEvent(ve),C(t,t.onerror,ve),console.error(le)}},Xe=function(ce){if(_e===r){for(var ae=-1,ye=0;ye<ce.length;ye+=1){var be=ce.charCodeAt(ye);(be===10||be===13)&&(ae=ye)}var ve=(ae!==-1?Ce:"")+ce.slice(0,ae+1);Ce=(ae===-1?Ce:"")+ce.slice(ae+1),ce!==""&&(k=Date.now(),B+=ce.length);for(var le=0;le<ve.length;le+=1){var be=ve.charCodeAt(le);if(pe===p&&be===10)pe=m;else if(pe===p&&(pe=m),be===13||be===10){if(pe!==m){pe===N&&(Me=le+1);var De=ve.slice(Ye,Me-1),Ee=ve.slice(Me+(Me<le&&ve.charCodeAt(Me)===32?1:0),le);De==="data"?(xe+=`
7
- `,xe+=Ee):De==="id"?Ae=Ee:De==="event"?Te=Ee:De==="retry"?(v=fe(Ee,v),F=v):De==="heartbeatTimeout"&&($=fe(Ee,$),he!==0&&(W(he),he=H(function(){Le()},$)))}if(pe===m){if(xe!==""){X=Ae,Te===""&&(Te="message");var Oe=new ne(Te,{data:xe.slice(1),lastEventId:Ae});if(t.dispatchEvent(Oe),Te==="open"?C(t,t.onopen,Oe):Te==="message"?C(t,t.onmessage,Oe):Te==="error"&&C(t,t.onerror,Oe),_e===f)return}xe="",Te=""}pe=be===13?p:m}else pe===m&&(Ye=le,pe=N),pe===N?be===58&&(Me=le+1,pe=z):pe===z&&(pe=J)}}},Ne=function(ce){if(_e===r||_e===s){_e=n,he!==0&&(W(he),he=0),he=H(function(){Le()},F),F=ie(Math.min(v*16,F*2)),t.readyState=s;var ae=new a("error",{error:ce});t.dispatchEvent(ae),C(t,t.onerror,ae),ce!=null&&console.error(ce)}},Re=function(){_e=f,me!=null&&(me.abort(),me=void 0),he!==0&&(W(he),he=0),t.readyState=f},Le=function(){if(he=0,_e!==n){if(!k&&me!=null)Ne(new Error("No activity within "+$+" milliseconds. "+(_e===s?"No response received.":B+" chars received.")+" Reconnecting.")),me!=null&&(me.abort(),me=void 0);else{var ce=Math.max((k||Date.now())+$-Date.now(),1);k=!1,he=H(function(){Le()},ce)}return}k=!1,B=0,he=H(function(){Le()},$),_e=s,xe="",Te="",Ae=X,Ce="",Ye=0,Me=0,pe=m;var ae=o;if(o.slice(0,5)!=="data:"&&o.slice(0,5)!=="blob:"&&X!==""){var ye=o.indexOf("?");ae=ye===-1?o:o.slice(0,ye+1)+o.slice(ye+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Ee,Oe){return Oe===w?"":Ee}),ae+=(o.indexOf("?")===-1?"?":"&")+w+"="+encodeURIComponent(X)}var be=t.withCredentials,ve={};ve.Accept="text/event-stream";var le=t.headers;if(le!=null)for(var De in le)Object.prototype.hasOwnProperty.call(le,De)&&(ve[De]=le[De]);try{me=$e.open(Se,Ve,Xe,Ne,ae,be,ve)}catch(Ee){throw Re(),Ee}};t.url=o,t.readyState=s,t.withCredentials=i,t.headers=_,t._close=Re,Le()}O.prototype=Object.create(A.prototype),O.prototype.CONNECTING=s,O.prototype.OPEN=r,O.prototype.CLOSED=f,O.prototype.close=function(){this._close()},O.CONNECTING=s,O.OPEN=r,O.CLOSED=f,O.prototype.withCredentials=void 0;var re=L;D!=null&&(L==null||!("withCredentials"in L.prototype))&&(re=O),function(t){{var o=t(l);o!==void 0&&(y.exports=o)}}(function(t){t.EventSourcePolyfill=O,t.NativeEventSource=L,t.EventSource=re})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:e.commonjsGlobal:globalThis)})(Ue,Ue.exports);var Be={exports:{}};(function(y,l){(function(g,H){y.exports=H()})(e.commonjsGlobal,function(){var g=1e3,H=6e4,W=36e5,D="millisecond",E="second",j="minute",L="hour",Y="day",R="week",P="month",oe="quarter",Z="year",M="date",we="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(d){var a=["th","st","nd","rd"],n=d%100;return"["+d+(a[(n-20)%10]||a[n]||a[0])+"]"}},b=function(d,a,n){var s=String(d);return!s||s.length>=a?d:""+Array(a+1-s.length).join(n)+d},V={s:b,z:function(d){var a=-d.utcOffset(),n=Math.abs(a),s=Math.floor(n/60),r=n%60;return(a<=0?"+":"-")+b(s,2,"0")+":"+b(r,2,"0")},m:function d(a,n){if(a.date()<n.date())return-d(n,a);var s=12*(n.year()-a.year())+(n.month()-a.month()),r=a.clone().add(s,P),f=n-r<0,p=a.clone().add(s+(f?-1:1),P);return+(-(s+(n-r)/(f?r-p:p-r))||0)},a:function(d){return d<0?Math.ceil(d)||0:Math.floor(d)},p:function(d){return{M:P,y:Z,w:R,d:Y,D:M,h:L,m:j,s:E,ms:D,Q:oe}[d]||String(d||"").toLowerCase().replace(/s$/,"")},u:function(d){return d===void 0}},Q="en",K={};K[Q]=I;var de="$isDayjsObject",ee=function(d){return d instanceof G||!(!d||!d[de])},te=function d(a,n,s){var r;if(!a)return Q;if(typeof a=="string"){var f=a.toLowerCase();K[f]&&(r=f),n&&(K[f]=n,r=f);var p=a.split("-");if(!r&&p.length>1)return d(p[0])}else{var m=a.name;K[m]=a,r=m}return!s&&r&&(Q=r),r||!s&&Q},A=function(d,a){if(ee(d))return d.clone();var n=typeof a=="object"?a:{};return n.date=d,n.args=arguments,new G(n)},S=V;S.l=te,S.i=ee,S.w=function(d,a){return A(d,{locale:a.$L,utc:a.$u,x:a.$x,$offset:a.$offset})};var G=function(){function d(n){this.$L=te(n.locale,null,!0),this.parse(n),this.$x=this.$x||n.x||{},this[de]=!0}var a=d.prototype;return a.parse=function(n){this.$d=function(s){var r=s.date,f=s.utc;if(r===null)return new Date(NaN);if(S.u(r))return new Date;if(r instanceof Date)return new Date(r);if(typeof r=="string"&&!/Z$/i.test(r)){var p=r.match(h);if(p){var m=p[2]-1||0,N=(p[7]||"0").substring(0,3);return f?new Date(Date.UTC(p[1],m,p[3]||1,p[4]||0,p[5]||0,p[6]||0,N)):new Date(p[1],m,p[3]||1,p[4]||0,p[5]||0,p[6]||0,N)}}return new Date(r)}(n),this.init()},a.init=function(){var n=this.$d;this.$y=n.getFullYear(),this.$M=n.getMonth(),this.$D=n.getDate(),this.$W=n.getDay(),this.$H=n.getHours(),this.$m=n.getMinutes(),this.$s=n.getSeconds(),this.$ms=n.getMilliseconds()},a.$utils=function(){return S},a.isValid=function(){return this.$d.toString()!==we},a.isSame=function(n,s){var r=A(n);return this.startOf(s)<=r&&r<=this.endOf(s)},a.isAfter=function(n,s){return A(n)<this.startOf(s)},a.isBefore=function(n,s){return this.endOf(s)<A(n)},a.$g=function(n,s,r){return S.u(n)?this[s]:this.set(r,n)},a.unix=function(){return Math.floor(this.valueOf()/1e3)},a.valueOf=function(){return this.$d.getTime()},a.startOf=function(n,s){var r=this,f=!!S.u(s)||s,p=S.p(n),m=function(ie,C){var O=S.w(r.$u?Date.UTC(r.$y,C,ie):new Date(r.$y,C,ie),r);return f?O:O.endOf(Y)},N=function(ie,C){return S.w(r.toDate()[ie].apply(r.toDate("s"),(f?[0,0,0,0]:[23,59,59,999]).slice(C)),r)},z=this.$W,J=this.$M,c=this.$D,T="set"+(this.$u?"UTC":"");switch(p){case Z:return f?m(1,0):m(31,11);case P:return f?m(1,J):m(0,J+1);case R:var U=this.$locale().weekStart||0,fe=(z<U?z+7:z)-U;return m(f?c-fe:c+(6-fe),J);case Y:case M:return N(T+"Hours",0);case L:return N(T+"Minutes",1);case j:return N(T+"Seconds",2);case E:return N(T+"Milliseconds",3);default:return this.clone()}},a.endOf=function(n){return this.startOf(n,!1)},a.$set=function(n,s){var r,f=S.p(n),p="set"+(this.$u?"UTC":""),m=(r={},r[Y]=p+"Date",r[M]=p+"Date",r[P]=p+"Month",r[Z]=p+"FullYear",r[L]=p+"Hours",r[j]=p+"Minutes",r[E]=p+"Seconds",r[D]=p+"Milliseconds",r)[f],N=f===Y?this.$D+(s-this.$W):s;if(f===P||f===Z){var z=this.clone().set(M,1);z.$d[m](N),z.init(),this.$d=z.set(M,Math.min(this.$D,z.daysInMonth())).$d}else m&&this.$d[m](N);return this.init(),this},a.set=function(n,s){return this.clone().$set(n,s)},a.get=function(n){return this[S.p(n)]()},a.add=function(n,s){var r,f=this;n=Number(n);var p=S.p(s),m=function(J){var c=A(f);return S.w(c.date(c.date()+Math.round(J*n)),f)};if(p===P)return this.set(P,this.$M+n);if(p===Z)return this.set(Z,this.$y+n);if(p===Y)return m(1);if(p===R)return m(7);var N=(r={},r[j]=H,r[L]=W,r[E]=g,r)[p]||1,z=this.$d.getTime()+n*N;return S.w(z,this)},a.subtract=function(n,s){return this.add(-1*n,s)},a.format=function(n){var s=this,r=this.$locale();if(!this.isValid())return r.invalidDate||we;var f=n||"YYYY-MM-DDTHH:mm:ssZ",p=S.z(this),m=this.$H,N=this.$m,z=this.$M,J=r.weekdays,c=r.months,T=r.meridiem,U=function(C,O,se,ue){return C&&(C[O]||C(s,f))||se[O].slice(0,ue)},fe=function(C){return S.s(m%12||12,C,"0")},ie=T||function(C,O,se){var ue=C<12?"AM":"PM";return se?ue.toLowerCase():ue};return f.replace(x,function(C,O){return O||function(se){switch(se){case"YY":return String(s.$y).slice(-2);case"YYYY":return S.s(s.$y,4,"0");case"M":return z+1;case"MM":return S.s(z+1,2,"0");case"MMM":return U(r.monthsShort,z,c,3);case"MMMM":return U(c,z);case"D":return s.$D;case"DD":return S.s(s.$D,2,"0");case"d":return String(s.$W);case"dd":return U(r.weekdaysMin,s.$W,J,2);case"ddd":return U(r.weekdaysShort,s.$W,J,3);case"dddd":return J[s.$W];case"H":return String(m);case"HH":return S.s(m,2,"0");case"h":return fe(1);case"hh":return fe(2);case"a":return ie(m,N,!0);case"A":return ie(m,N,!1);case"m":return String(N);case"mm":return S.s(N,2,"0");case"s":return String(s.$s);case"ss":return S.s(s.$s,2,"0");case"SSS":return S.s(s.$ms,3,"0");case"Z":return p}return null}(C)||p.replace(":","")})},a.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},a.diff=function(n,s,r){var f,p=this,m=S.p(s),N=A(n),z=(N.utcOffset()-this.utcOffset())*H,J=this-N,c=function(){return S.m(p,N)};switch(m){case Z:f=c()/12;break;case P:f=c();break;case oe:f=c()/3;break;case R:f=(J-z)/6048e5;break;case Y:f=(J-z)/864e5;break;case L:f=J/W;break;case j:f=J/H;break;case E:f=J/g;break;default:f=J}return r?f:S.a(f)},a.daysInMonth=function(){return this.endOf(P).$D},a.$locale=function(){return K[this.$L]},a.locale=function(n,s){if(!n)return this.$L;var r=this.clone(),f=te(n,s,!0);return f&&(r.$L=f),r},a.clone=function(){return S.w(this.$d,this)},a.toDate=function(){return new Date(this.valueOf())},a.toJSON=function(){return this.isValid()?this.toISOString():null},a.toISOString=function(){return this.$d.toISOString()},a.toString=function(){return this.$d.toUTCString()},d}(),ne=G.prototype;return A.prototype=ne,[["$ms",D],["$s",E],["$m",j],["$H",L],["$W",Y],["$M",P],["$y",Z],["$D",M]].forEach(function(d){ne[d[1]]=function(a){return this.$g(a,d[0],d[1])}}),A.extend=function(d,a){return d.$i||(d(a,G,A),d.$i=!0),A},A.locale=te,A.isDayjs=ee,A.unix=function(d){return A(1e3*d)},A.en=K[Q],A.Ls=K,A.p={},A})})(Be);var st=Be.exports;const ut=e.getDefaultExportFromCjs(st);var We={exports:{}};(function(y,l){(function(g,H){y.exports=H()})(e.commonjsGlobal,function(){var g={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},H=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,W=/\d/,D=/\d\d/,E=/\d\d?/,j=/\d*[^-_:/,()\s\d]+/,L={},Y=function(h){return(h=+h)+(h>68?1900:2e3)},R=function(h){return function(x){this[h]=+x}},P=[/[+-]\d\d:?(\d\d)?|Z/,function(h){(this.zone||(this.zone={})).offset=function(x){if(!x||x==="Z")return 0;var I=x.match(/([+-]|\d\d)/g),b=60*I[1]+(+I[2]||0);return b===0?0:I[0]==="+"?-b:b}(h)}],oe=function(h){var x=L[h];return x&&(x.indexOf?x:x.s.concat(x.f))},Z=function(h,x){var I,b=L.meridiem;if(b){for(var V=1;V<=24;V+=1)if(h.indexOf(b(V,0,x))>-1){I=V>12;break}}else I=h===(x?"pm":"PM");return I},M={A:[j,function(h){this.afternoon=Z(h,!1)}],a:[j,function(h){this.afternoon=Z(h,!0)}],Q:[W,function(h){this.month=3*(h-1)+1}],S:[W,function(h){this.milliseconds=100*+h}],SS:[D,function(h){this.milliseconds=10*+h}],SSS:[/\d{3}/,function(h){this.milliseconds=+h}],s:[E,R("seconds")],ss:[E,R("seconds")],m:[E,R("minutes")],mm:[E,R("minutes")],H:[E,R("hours")],h:[E,R("hours")],HH:[E,R("hours")],hh:[E,R("hours")],D:[E,R("day")],DD:[D,R("day")],Do:[j,function(h){var x=L.ordinal,I=h.match(/\d+/);if(this.day=I[0],x)for(var b=1;b<=31;b+=1)x(b).replace(/\[|\]/g,"")===h&&(this.day=b)}],w:[E,R("week")],ww:[D,R("week")],M:[E,R("month")],MM:[D,R("month")],MMM:[j,function(h){var x=oe("months"),I=(oe("monthsShort")||x.map(function(b){return b.slice(0,3)})).indexOf(h)+1;if(I<1)throw new Error;this.month=I%12||I}],MMMM:[j,function(h){var x=oe("months").indexOf(h)+1;if(x<1)throw new Error;this.month=x%12||x}],Y:[/[+-]?\d+/,R("year")],YY:[D,function(h){this.year=Y(h)}],YYYY:[/\d{4}/,R("year")],Z:P,ZZ:P};function we(h){var x,I;x=h,I=L&&L.formats;for(var b=(h=x.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,S,G){var ne=G&&G.toUpperCase();return S||I[G]||g[G]||I[ne].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(d,a,n){return a||n.slice(1)})})).match(H),V=b.length,Q=0;Q<V;Q+=1){var K=b[Q],de=M[K],ee=de&&de[0],te=de&&de[1];b[Q]=te?{regex:ee,parser:te}:K.replace(/^\[|\]$/g,"")}return function(A){for(var S={},G=0,ne=0;G<V;G+=1){var d=b[G];if(typeof d=="string")ne+=d.length;else{var a=d.regex,n=d.parser,s=A.slice(ne),r=a.exec(s)[0];n.call(S,r),A=A.replace(r,"")}}return function(f){var p=f.afternoon;if(p!==void 0){var m=f.hours;p?m<12&&(f.hours+=12):m===12&&(f.hours=0),delete f.afternoon}}(S),S}}return function(h,x,I){I.p.customParseFormat=!0,h&&h.parseTwoDigitYear&&(Y=h.parseTwoDigitYear);var b=x.prototype,V=b.parse;b.parse=function(Q){var K=Q.date,de=Q.utc,ee=Q.args;this.$u=de;var te=ee[1];if(typeof te=="string"){var A=ee[2]===!0,S=ee[3]===!0,G=A||S,ne=ee[2];S&&(ne=ee[2]),L=this.$locale(),!A&&ne&&(L=I.Ls[ne]),this.$d=function(s,r,f,p){try{if(["x","X"].indexOf(r)>-1)return new Date((r==="X"?1e3:1)*s);var m=we(r)(s),N=m.year,z=m.month,J=m.day,c=m.hours,T=m.minutes,U=m.seconds,fe=m.milliseconds,ie=m.zone,C=m.week,O=new Date,se=J||(N||z?1:O.getDate()),ue=N||O.getFullYear(),ge=0;N&&!z||(ge=z>0?z-1:O.getMonth());var re,t=c||0,o=T||0,u=U||0,i=fe||0;return ie?new Date(Date.UTC(ue,ge,se,t,o,u,i+60*ie.offset*1e3)):f?new Date(Date.UTC(ue,ge,se,t,o,u,i)):(re=new Date(ue,ge,se,t,o,u,i),C&&(re=p(re).week(C).toDate()),re)}catch(w){return new Date("")}}(K,te,de,I),this.init(),ne&&ne!==!0&&(this.$L=this.locale(ne).$L),G&&K!=this.format(te)&&(this.$d=new Date("")),L={}}else if(te instanceof Array)for(var d=te.length,a=1;a<=d;a+=1){ee[1]=te[a-1];var n=I.apply(this,ee);if(n.isValid()){this.$d=n.$d,this.$L=n.$L,this.init();break}a===d&&(this.$d=new Date(""))}else V.call(this,Q)}}})})(We);var ct=We.exports;const lt=e.getDefaultExportFromCjs(ct);ut.extend(lt);const Fe=(y,l=!1)=>{if(typeof y=="boolean")return y;if(y==null)return l;if(typeof y=="number")return y!==0;const g=String(y).trim().toLowerCase();return g===""?!0:g!=="false"&&g!=="0"},dt={en:{bannerSlideLabel:"Tournament {index} of {total}",bannerGoToSlide:"Go to tournament {index}"},tr:{bannerSlideLabel:"Turnuva {index} / {total}",bannerGoToSlide:"{index}. turnuvaya git"},da:{bannerSlideLabel:"Turnering {index} af {total}",bannerGoToSlide:"Gå til turnering {index}"}},ft=5e3,ht=1e3,pt=!0,vt=!0,gt=!0,mt=!0;var yt=e.from_html('<div class="tournaments-banner svelte-h8hbcz"><div class="tournaments-banner__skeleton svelte-h8hbcz" aria-busy="true"></div></div>'),bt=e.from_html('<a class="tournaments-banner__slide svelte-h8hbcz"><!></a>'),wt=e.from_html('<button type="button"></button>'),_t=e.from_html('<div class="tournaments-banner__dots svelte-h8hbcz"></div>'),St=e.from_html('<div class="tournaments-banner svelte-h8hbcz" role="region" aria-roledescription="carousel"><div class="tournaments-banner__track svelte-h8hbcz"></div> <!></div>');const Tt={hash:"svelte-h8hbcz",code:`.tournaments-banner.svelte-h8hbcz {display:flex;flex-direction:column;gap:8px;.tournaments-banner__track:where(.svelte-h8hbcz) {display:flex;overflow-x:auto;scroll-snap-type:x mandatory;scroll-behavior:smooth;overscroll-behavior-x:contain;scrollbar-width:none;-ms-overflow-style:none;&::-webkit-scrollbar {display:none;}}.tournaments-banner__slide:where(.svelte-h8hbcz) {display:block;flex:0 0 100%;color:inherit;text-decoration:none;min-width:0;scroll-snap-align:start;scroll-snap-stop:always;cursor:pointer;&:focus-visible {outline:2px solid var(--border-alert, rgba(255, 204, 0, 1));outline-offset:-2px;border-radius:13px;}}.tournaments-banner__skeleton:where(.svelte-h8hbcz) {height:308px;border-radius:13px;background:var(--bg-overlay-neutral-level-1, rgba(251, 251, 251, 0.05));
8
- animation: svelte-h8hbcz-tournaments-banner-pulse 1.5s ease-in-out infinite;}.tournaments-banner__dots:where(.svelte-h8hbcz) {display:flex;justify-content:center;gap:8px;}.tournaments-banner__dot:where(.svelte-h8hbcz) {width:8px;height:8px;padding:0;border:0;border-radius:50%;background:var(--text-subtle, rgba(223, 227, 232, 1));opacity:0.8;cursor:pointer;&.active {background:var(--text-brand, rgba(255, 204, 0, 1));opacity:1;}&:focus-visible {outline:2px solid var(--border-alert, rgba(255, 204, 0, 1));outline-offset:2px;}}}
9
-
10
- @keyframes svelte-h8hbcz-tournaments-banner-pulse {
11
- 50% {
12
- opacity: 0.4;
13
- }
14
- }
15
-
16
- @media (max-width: 767px) {.tournaments-banner.svelte-h8hbcz .tournaments-banner__skeleton:where(.svelte-h8hbcz) {height:160px;}
17
- }
18
-
19
- @media (prefers-reduced-motion: reduce) {.tournaments-banner.svelte-h8hbcz .tournaments-banner__track:where(.svelte-h8hbcz) {scroll-behavior:auto;}.tournaments-banner.svelte-h8hbcz .tournaments-banner__skeleton:where(.svelte-h8hbcz) {
20
- animation: none;}
21
- }`};function Ie(y,l){e.push(l,!0),e.append_styles(y,Tt);const g=()=>e.store_get(e.$format,"$_",H),[H,W]=e.setup_stores(),D=e.prop(l,"endpoint"),E=e.prop(l,"language",7,"en"),j=e.prop(l,"session"),L=e.prop(l,"platform"),Y=e.prop(l,"translationurl"),R=e.prop(l,"navigationhref",7,""),P=e.prop(l,"enableautoplay",7,void 0),oe=e.prop(l,"autoplayinterval",7,void 0),Z=e.prop(l,"pauseoninteraction",7,void 0),M=e.prop(l,"loop",7,void 0),we=e.prop(l,"showdots",7,void 0);e.setupI18n({withLocale:"en",translations:{}}),e.registerTranslations(dt),e.setLocale(E()),e.user_pre_effect(()=>{Y()&&e.loadTranslations(Y())}),e.user_effect(()=>{e.setLocale(E())});let h=e.state(e.proxy([])),x=e.state(!0),I=e.state(0),b=e.state(null),V=e.state(!1),Q=e.state(!1),K=e.state(!1),de=e.state(!1),ee=e.state(!1);const te=e.user_derived(()=>Fe(P(),pt)),A=e.user_derived(()=>Fe(Z(),vt)),S=e.user_derived(()=>Fe(M(),gt)),G=e.user_derived(()=>Fe(we(),mt)),ne=e.user_derived(()=>Number(oe())>0?Math.max(Number(oe()),ht):ft),d=c=>`${R().replace(/\/$/,"")}/${c.id}`;e.user_effect(()=>{const c={endpoint:D(),language:E(),session:j(),platform:L()};if(!c.endpoint)return;let T=!1;return e.set(x,!0),it(c).then(U=>{T||(e.set(h,U,!0),e.set(I,0))}).catch(U=>{console.log(U),T||e.set(h,[],!0)}).finally(()=>{T||e.set(x,!1)}),()=>{T=!0}}),e.user_effect(()=>{const c=window.matchMedia("(prefers-reduced-motion: reduce)"),T=()=>{e.set(ee,c.matches,!0)},U=()=>{e.set(de,document.visibilityState==="hidden")};return T(),U(),c.addEventListener("change",T),document.addEventListener("visibilitychange",U),()=>{c.removeEventListener("change",T),document.removeEventListener("visibilitychange",U)}}),e.user_effect(()=>{const c=e.get(I),T=e.get(h).length,U=e.get(A)&&(e.get(V)||e.get(Q)||e.get(K)),fe=c>=T-1;if(!e.get(te)||T<2||U||e.get(de)||e.get(ee)||fe&&!e.get(S))return;const ie=setTimeout(()=>n((c+1)%T),e.get(ne));return()=>clearTimeout(ie)});const a=()=>{!e.get(b)||!e.get(b).clientWidth||e.set(I,Math.round(e.get(b).scrollLeft/e.get(b).clientWidth),!0)},n=c=>{var T;(T=e.get(b))==null||T.scrollTo({left:c*e.get(b).clientWidth,behavior:"smooth"})},s=c=>{e.set(Q,c.target.matches(":focus-visible"),!0)},r=(c,T)=>{R()||(c.preventDefault(),rt(T))};var f={get endpoint(){return D()},set endpoint(c){D(c),e.flushSync()},get language(){return E()},set language(c="en"){E(c),e.flushSync()},get session(){return j()},set session(c){j(c),e.flushSync()},get platform(){return L()},set platform(c){L(c),e.flushSync()},get translationurl(){return Y()},set translationurl(c){Y(c),e.flushSync()},get navigationhref(){return R()},set navigationhref(c=""){R(c),e.flushSync()},get enableautoplay(){return P()},set enableautoplay(c=void 0){P(c),e.flushSync()},get autoplayinterval(){return oe()},set autoplayinterval(c=void 0){oe(c),e.flushSync()},get pauseoninteraction(){return Z()},set pauseoninteraction(c=void 0){Z(c),e.flushSync()},get loop(){return M()},set loop(c=void 0){M(c),e.flushSync()},get showdots(){return we()},set showdots(c=void 0){we(c),e.flushSync()}},p=e.comment(),m=e.first_child(p);{var N=c=>{var T=yt();e.append(c,T)},z=c=>{var T=St(),U=e.child(T);e.each(U,23,()=>e.get(h),C=>C.id,(C,O,se)=>{var ue=bt(),ge=e.child(ue);{let re=e.user_derived(()=>e.get(se)===0);et.TournamentImage(ge,{variant:"banner",get priority(){return e.get(re)},get src(){return e.get(O).thumbnail},get alt(){return e.get(O).nameOrTitle},get state(){return e.get(O).state},get startTime(){return e.get(O).startTime},get endTime(){return e.get(O).endTime},get language(){return E()}})}e.reset(ue),e.template_effect((re,t)=>{e.set_attribute(ue,"href",re),e.set_attribute(ue,"aria-label",t)},[()=>R()?d(e.get(O)):"#",()=>`${e.get(O).nameOrTitle} – ${g()("bannerSlideLabel",{values:{index:e.get(se)+1,total:e.get(h).length}})}`]),e.delegated("click",ue,re=>r(re,e.get(O))),e.append(C,ue)}),e.reset(U),e.bind_this(U,C=>e.set(b,C),()=>e.get(b));var fe=e.sibling(U,2);{var ie=C=>{var O=_t();e.each(O,23,()=>e.get(h),se=>se.id,(se,ue,ge)=>{var re=wt();let t;e.template_effect(o=>{t=e.set_class(re,1,"tournaments-banner__dot svelte-h8hbcz",null,t,{active:e.get(ge)===e.get(I)}),e.set_attribute(re,"aria-label",o),e.set_attribute(re,"aria-current",e.get(ge)===e.get(I)?"true":void 0)},[()=>g()("bannerGoToSlide",{values:{index:e.get(ge)+1}})]),e.delegated("click",re,()=>n(e.get(ge))),e.append(se,re)}),e.reset(O),e.append(C,O)};e.if_block(fe,C=>{e.get(G)&&e.get(h).length>1&&C(ie)})}e.reset(T),e.event("mouseenter",T,()=>e.set(V,!0)),e.event("mouseleave",T,()=>e.set(V,!1)),e.delegated("focusin",T,s),e.delegated("focusout",T,()=>e.set(Q,!1)),e.delegated("touchstart",T,()=>e.set(K,!0)),e.delegated("touchend",T,()=>e.set(K,!1)),e.event("touchcancel",T,()=>e.set(K,!1)),e.event("scroll",U,a),e.append(c,T)};e.if_block(m,c=>{e.get(x)?c(N):e.get(h).length&&c(z,1)})}e.append(y,p);var J=e.pop(f);return W(),J}e.delegate(["focusin","focusout","touchstart","touchend","click"]);e.create_custom_element(Ie,{endpoint:{},language:{},session:{},platform:{},translationurl:{},navigationhref:{},enableautoplay:{},autoplayinterval:{},pauseoninteraction:{},loop:{},showdots:{}},[],[],{mode:"open"});function Ge(y,l){e.push(l,!0);let g=e.prop(l,"endpoint"),H=e.prop(l,"language",7,"en"),W=e.prop(l,"session"),D=e.prop(l,"platform"),E=e.prop(l,"translationurl"),j=e.prop(l,"navigationhref"),L=e.prop(l,"enableautoplay"),Y=e.prop(l,"autoplayinterval"),R=e.prop(l,"pauseoninteraction"),P=e.prop(l,"loop"),oe=e.prop(l,"showdots");var Z={get endpoint(){return g()},set endpoint(M){g(M),e.flushSync()},get language(){return H()},set language(M="en"){H(M),e.flushSync()},get session(){return W()},set session(M){W(M),e.flushSync()},get platform(){return D()},set platform(M){D(M),e.flushSync()},get translationurl(){return E()},set translationurl(M){E(M),e.flushSync()},get navigationhref(){return j()},set navigationhref(M){j(M),e.flushSync()},get enableautoplay(){return L()},set enableautoplay(M){L(M),e.flushSync()},get autoplayinterval(){return Y()},set autoplayinterval(M){Y(M),e.flushSync()},get pauseoninteraction(){return R()},set pauseoninteraction(M){R(M),e.flushSync()},get loop(){return P()},set loop(M){P(M),e.flushSync()},get showdots(){return oe()},set showdots(M){oe(M),e.flushSync()}};return Ie(y,{get endpoint(){return g()},get language(){return H()},get session(){return W()},get platform(){return D()},get translationurl(){return E()},get navigationhref(){return j()},get enableautoplay(){return L()},get autoplayinterval(){return Y()},get pauseoninteraction(){return R()},get loop(){return P()},get showdots(){return oe()}}),e.pop(Z)}customElements.define("tournaments-banner",e.create_custom_element(Ge,{endpoint:{},language:{},session:{},platform:{},translationurl:{},navigationhref:{},enableautoplay:{},autoplayinterval:{},pauseoninteraction:{},loop:{},showdots:{}},[],[]));const Dt=Object.freeze(Object.defineProperty({__proto__:null,default:Ge},Symbol.toStringTag,{value:"Module"}));exports.TournamentsBanner=Ie;exports.TournamentsBanner_ce=Dt;