@everymatrix/tournaments-banner 0.2.1 → 0.2.2

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,36 +0,0 @@
1
- typeof globalThis.HTMLElement>"u"&&(globalThis.HTMLElement=class{},globalThis.customElements={define(){},get(){},whenDefined(){}});const r=require("./StatusBadge-CBE0IpOM.cjs"),vt=require("./TournamentImage-CokDB684.cjs"),yt=(n,t)=>{window.postMessage({...t,type:n},window.location.href)},mt=(n,t)=>{yt(`Tournaments:${n}`,t)},gt=(n,t)=>{mt("viewTournamentDetails",{tournamentId:n.id,tournamentName:n.nameOrTitle})},bt=n=>{const t=new Headers;return n&&t.append("X-SessionId",n),t},_t=async n=>{const t=new URL(`${n.endpoint}/v1/tournaments`);return t.searchParams.append("language",n.language),t.searchParams.append("sortField",n.sortField??"StartTime"),t.searchParams.append("sortOrder",n.sortOrder??"desc"),t.searchParams.append("platform",n.platform),(await(await fetch(t,{method:"GET",headers:bt(n.session)})).json())?.items??[]},wt=async n=>{const t=await _t(n),e=new Date;return t.filter(o=>new Date(o.exhibitionEndTime)>e)};var Ze={exports:{}};/** @license
2
- * eventsource.js
3
- * Available under MIT License (MIT)
4
- * https://github.com/Yaffle/EventSource/
5
- */(function(n,t){(function(e){var o=e.setTimeout,s=e.clearTimeout,a=e.XMLHttpRequest,h=e.XDomainRequest,b=e.ActiveXObject,T=e.EventSource,P=e.document,C=e.Promise,H=e.fetch,Q=e.Response,U=e.TextDecoder,L=e.TextEncoder,X=e.AbortController;if(typeof window<"u"&&typeof P<"u"&&!("readyState"in P)&&P.body==null&&(P.readyState="loading",window.addEventListener("load",function(i){P.readyState="complete"},!1)),a==null&&b!=null&&(a=function(){return new b("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(i){function l(){}return l.prototype=i,new l}),Date.now||(Date.now=function(){return new Date().getTime()}),X==null){var E=H;H=function(i,l){var v=l.signal;return E(i,{headers:l.headers,credentials:l.credentials,cache:l.cache}).then(function(d){var x=d.body.getReader();return v._reader=x,v._aborted&&v._reader.cancel(),{status:d.status,statusText:d.statusText,headers:d.headers,body:{getReader:function(){return x}}}})},X=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function O(){this.bitsNeeded=0,this.codePoint=0}O.prototype.decode=function(i){function l(k,V,M){if(M===1)return k>=128>>V&&k<<V<=2047;if(M===2)return k>=2048>>V&&k<<V<=55295||k>=57344>>V&&k<<V<=65535;if(M===3)return k>=65536>>V&&k<<V<=1114111;throw new Error}function v(k,V){if(k===6*1)return V>>6>15?3:V>31?2:1;if(k===6*2)return V>15?3:2;if(k===6*3)return 3;throw new Error}for(var d=65533,x="",S=this.bitsNeeded,I=this.codePoint,J=0;J<i.length;J+=1){var Y=i[J];S!==0&&(Y<128||Y>191||!l(I<<6|Y&63,S-6,v(S,I)))&&(S=0,I=d,x+=String.fromCharCode(I)),S===0?(Y>=0&&Y<=127?(S=0,I=Y):Y>=192&&Y<=223?(S=6*1,I=Y&31):Y>=224&&Y<=239?(S=6*2,I=Y&15):Y>=240&&Y<=247?(S=6*3,I=Y&7):(S=0,I=d),S!==0&&!l(I,S,v(S,I))&&(S=0,I=d)):(S-=6,I=I<<6|Y&63),S===0&&(I<=65535?x+=String.fromCharCode(I):(x+=String.fromCharCode(55296+(I-65535-1>>10)),x+=String.fromCharCode(56320+(I-65535-1&1023))))}return this.bitsNeeded=S,this.codePoint=I,x};var N=function(){try{return new U().decode(new L().encode("test"),{stream:!0})==="test"}catch(i){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+i)}return!1};(U==null||L==null||!N())&&(U=O);var D=function(){};function z(i){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=D,this.onload=D,this.onerror=D,this.onreadystatechange=D,this._contentType="",this._xhr=i,this._sendTimeout=0,this._abort=D}z.prototype.open=function(i,l){this._abort(!0);var v=this,d=this._xhr,x=1,S=0;this._abort=function(M){v._sendTimeout!==0&&(s(v._sendTimeout),v._sendTimeout=0),(x===1||x===2||x===3)&&(x=4,d.onload=D,d.onerror=D,d.onabort=D,d.onprogress=D,d.onreadystatechange=D,d.abort(),S!==0&&(s(S),S=0),M||(v.readyState=4,v.onabort(null),v.onreadystatechange())),x=0};var I=function(){if(x===1){var M=0,K="",Se=void 0;if("contentType"in d)M=200,K="OK",Se=d.contentType;else try{M=d.status,K=d.statusText,Se=d.getResponseHeader("Content-Type")}catch{M=0,K="",Se=void 0}M!==0&&(x=2,v.readyState=2,v.status=M,v.statusText=K,v._contentType=Se,v.onreadystatechange())}},J=function(){if(I(),x===2||x===3){x=3;var M="";try{M=d.responseText}catch{}v.readyState=3,v.responseText=M,v.onprogress()}},Y=function(M,K){if((K==null||K.preventDefault==null)&&(K={preventDefault:D}),J(),x===1||x===2||x===3){if(x=4,S!==0&&(s(S),S=0),v.readyState=4,M==="load")v.onload(K);else if(M==="error")v.onerror(K);else if(M==="abort")v.onabort(K);else throw new TypeError;v.onreadystatechange()}},k=function(M){d!=null&&(d.readyState===4?(!("onload"in d)||!("onerror"in d)||!("onabort"in d))&&Y(d.responseText===""?"error":"load",M):d.readyState===3?"onprogress"in d||J():d.readyState===2&&I())},V=function(){S=o(function(){V()},500),d.readyState===3&&J()};"onload"in d&&(d.onload=function(M){Y("load",M)}),"onerror"in d&&(d.onerror=function(M){Y("error",M)}),"onabort"in d&&(d.onabort=function(M){Y("abort",M)}),"onprogress"in d&&(d.onprogress=J),"onreadystatechange"in d&&(d.onreadystatechange=function(M){k(M)}),("contentType"in d||!("ontimeout"in a.prototype))&&(l+=(l.indexOf("?")===-1?"?":"&")+"padding=true"),d.open(i,l,!0),"readyState"in d&&(S=o(function(){V()},0))},z.prototype.abort=function(){this._abort(!1)},z.prototype.getResponseHeader=function(i){return this._contentType},z.prototype.setRequestHeader=function(i,l){var v=this._xhr;"setRequestHeader"in v&&v.setRequestHeader(i,l)},z.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},z.prototype.send=function(){if((!("ontimeout"in a.prototype)||!("sendAsBinary"in a.prototype)&&!("mozAnon"in a.prototype))&&P!=null&&P.readyState!=null&&P.readyState!=="complete"){var i=this;i._sendTimeout=o(function(){i._sendTimeout=0,i.send()},4);return}var l=this._xhr;"withCredentials"in l&&(l.withCredentials=this.withCredentials);try{l.send(void 0)}catch(v){throw v}};function ee(i){return i.replace(/[A-Z]/g,function(l){return String.fromCharCode(l.charCodeAt(0)+32)})}function re(i){for(var l=Object.create(null),v=i.split(`\r
6
- `),d=0;d<v.length;d+=1){var x=v[d],S=x.split(": "),I=S.shift(),J=S.join(": ");l[ee(I)]=J}this._map=l}re.prototype.get=function(i){return this._map[ee(i)]},a!=null&&a.HEADERS_RECEIVED==null&&(a.HEADERS_RECEIVED=2);function se(){}se.prototype.open=function(i,l,v,d,x,S,I){i.open("GET",x);var J=0;i.onprogress=function(){var k=i.responseText,V=k.slice(J);J+=V.length,v(V)},i.onerror=function(k){k.preventDefault(),d(new Error("NetworkError"))},i.onload=function(){d(null)},i.onabort=function(){d(null)},i.onreadystatechange=function(){if(i.readyState===a.HEADERS_RECEIVED){var k=i.status,V=i.statusText,M=i.getResponseHeader("Content-Type"),K=i.getAllResponseHeaders();l(k,V,M,new re(K))}},i.withCredentials=S;for(var Y in I)Object.prototype.hasOwnProperty.call(I,Y)&&i.setRequestHeader(Y,I[Y]);return i.send(),i};function oe(i){this._headers=i}oe.prototype.get=function(i){return this._headers.get(i)};function ne(){}ne.prototype.open=function(i,l,v,d,x,S,I){var J=null,Y=new X,k=Y.signal,V=new U;return H(x,{headers:I,credentials:S?"include":"same-origin",signal:k,cache:"no-store"}).then(function(M){return J=M.body.getReader(),l(M.status,M.statusText,M.headers.get("Content-Type"),new oe(M.headers)),new C(function(K,Se){var Ce=function(){J.read().then(function(ge){if(ge.done)K(void 0);else{var he=V.decode(ge.value,{stream:!0});v(he),Ce()}}).catch(function(ge){Se(ge)})};Ce()})}).catch(function(M){if(M.name!=="AbortError")return M}).then(function(M){d(M)}),{abort:function(){J?.cancel(),Y.abort()}}};function F(){this._listeners=Object.create(null)}function A(i){o(function(){throw i},0)}F.prototype.dispatchEvent=function(i){i.target=this;var l=this._listeners[i.type];if(l!=null)for(var v=l.length,d=0;d<v;d+=1){var x=l[d];try{typeof x.handleEvent=="function"?x.handleEvent(i):x.call(this,i)}catch(S){A(S)}}},F.prototype.addEventListener=function(i,l){i=String(i);var v=this._listeners,d=v[i];d==null&&(d=[],v[i]=d);for(var x=!1,S=0;S<d.length;S+=1)d[S]===l&&(x=!0);x||d.push(l)},F.prototype.removeEventListener=function(i,l){i=String(i);var v=this._listeners,d=v[i];if(d!=null){for(var x=[],S=0;S<d.length;S+=1)d[S]!==l&&x.push(d[S]);x.length===0?delete v[i]:v[i]=x}};function q(i){this.type=i,this.target=void 0}function ie(i,l){q.call(this,i),this.data=l.data,this.lastEventId=l.lastEventId}ie.prototype=Object.create(q.prototype);function y(i,l){q.call(this,i),this.status=l.status,this.statusText=l.statusText,this.headers=l.headers}y.prototype=Object.create(q.prototype);function f(i,l){q.call(this,i),this.error=l.error}f.prototype=Object.create(q.prototype);var u=-1,p=0,c=1,m=2,_=-1,w=0,j=1,W=2,te=3,ue=/^text\/event\-stream(;.*)?$/i,g=1e3,$=18e6,G=function(i,l){var v=i==null?l:parseInt(i,10);return v!==v&&(v=l),ce(v)},ce=function(i){return Math.min(Math.max(i,g),$)},B=function(i,l,v){try{typeof l=="function"&&l.call(i,v)}catch(d){A(d)}};function R(i,l){F.call(this),l=l||{},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,ye(this,i,l)}function Z(){return a!=null&&"withCredentials"in a.prototype||h==null?new a:new h}var fe=H!=null&&Q!=null&&"body"in Q.prototype;function ye(i,l,v){l=String(l);var d=!!v.withCredentials,x=v.lastEventIdQueryParameterName||"lastEventId",S=ce(1e3),I=G(v.heartbeatTimeout,45e3),J="",Y=S,k=!1,V=0,M=v.headers||{},K=v.Transport,Se=fe&&K==null?void 0:new z(K!=null?new K:Z()),Ce=K!=null&&typeof K!="string"?new K:Se==null?new ne:new se,ge=void 0,he=0,we=u,Oe="",Pe="",Te="",Ie="",pe=w,He=0,Me=0,ht=function(le,ae,be,_e){if(we===p)if(le===200&&be!=null&&ue.test(be)){we=c,k=Date.now(),Y=S,i.readyState=c;var ve=new y("open",{status:le,statusText:ae,headers:_e});i.dispatchEvent(ve),B(i,i.onopen,ve)}else{var de="";le!==200?(ae&&(ae=ae.replace(/\s+/g," ")),de="EventSource's response has a status "+le+" "+ae+" that is not 200. Aborting the connection."):de="EventSource's response has a Content-Type specifying an unsupported type: "+(be==null?"-":be.replace(/\s+/g," "))+". Aborting the connection.",Ne();var ve=new y("error",{status:le,statusText:ae,headers:_e});i.dispatchEvent(ve),B(i,i.onerror,ve),console.error(de)}},pt=function(le){if(we===c){for(var ae=-1,be=0;be<le.length;be+=1){var _e=le.charCodeAt(be);(_e===10||_e===13)&&(ae=be)}var ve=(ae!==-1?Ie:"")+le.slice(0,ae+1);Ie=(ae===-1?Ie:"")+le.slice(ae+1),le!==""&&(k=Date.now(),V+=le.length);for(var de=0;de<ve.length;de+=1){var _e=ve.charCodeAt(de);if(pe===_&&_e===10)pe=w;else if(pe===_&&(pe=w),_e===13||_e===10){if(pe!==w){pe===j&&(Me=de+1);var Ee=ve.slice(He,Me-1),xe=ve.slice(Me+(Me<de&&ve.charCodeAt(Me)===32?1:0),de);Ee==="data"?(Oe+=`
7
- `,Oe+=xe):Ee==="id"?Pe=xe:Ee==="event"?Te=xe:Ee==="retry"?(S=G(xe,S),Y=S):Ee==="heartbeatTimeout"&&(I=G(xe,I),he!==0&&(s(he),he=o(function(){Le()},I)))}if(pe===w){if(Oe!==""){J=Pe,Te===""&&(Te="message");var Ae=new ie(Te,{data:Oe.slice(1),lastEventId:Pe});if(i.dispatchEvent(Ae),Te==="open"?B(i,i.onopen,Ae):Te==="message"?B(i,i.onmessage,Ae):Te==="error"&&B(i,i.onerror,Ae),we===m)return}Oe="",Te=""}pe=_e===13?_:w}else pe===w&&(He=de,pe=j),pe===j?_e===58&&(Me=de+1,pe=W):pe===W&&(pe=te)}}},qe=function(le){if(we===c||we===p){we=u,he!==0&&(s(he),he=0),he=o(function(){Le()},Y),Y=ce(Math.min(S*16,Y*2)),i.readyState=p;var ae=new f("error",{error:le});i.dispatchEvent(ae),B(i,i.onerror,ae),le!=null&&console.error(le)}},Ne=function(){we=m,ge!=null&&(ge.abort(),ge=void 0),he!==0&&(s(he),he=0),i.readyState=m},Le=function(){if(he=0,we!==u){if(!k&&ge!=null)qe(new Error("No activity within "+I+" milliseconds. "+(we===p?"No response received.":V+" chars received.")+" Reconnecting.")),ge!=null&&(ge.abort(),ge=void 0);else{var le=Math.max((k||Date.now())+I-Date.now(),1);k=!1,he=o(function(){Le()},le)}return}k=!1,V=0,he=o(function(){Le()},I),we=p,Oe="",Te="",Pe=J,Ie="",He=0,Me=0,pe=w;var ae=l;if(l.slice(0,5)!=="data:"&&l.slice(0,5)!=="blob:"&&J!==""){var be=l.indexOf("?");ae=be===-1?l:l.slice(0,be+1)+l.slice(be+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(xe,Ae){return Ae===x?"":xe}),ae+=(l.indexOf("?")===-1?"?":"&")+x+"="+encodeURIComponent(J)}var _e=i.withCredentials,ve={};ve.Accept="text/event-stream";var de=i.headers;if(de!=null)for(var Ee in de)Object.prototype.hasOwnProperty.call(de,Ee)&&(ve[Ee]=de[Ee]);try{ge=Ce.open(Se,ht,pt,qe,ae,_e,ve)}catch(xe){throw Ne(),xe}};i.url=l,i.readyState=p,i.withCredentials=d,i.headers=M,i._close=Ne,Le()}R.prototype=Object.create(F.prototype),R.prototype.CONNECTING=p,R.prototype.OPEN=c,R.prototype.CLOSED=m,R.prototype.close=function(){this._close()},R.CONNECTING=p,R.OPEN=c,R.CLOSED=m,R.prototype.withCredentials=void 0;var me=T;a!=null&&(T==null||!("withCredentials"in T.prototype))&&(me=R),function(i){{var l=i(t);l!==void 0&&(n.exports=l)}}(function(i){i.EventSourcePolyfill=R,i.NativeEventSource=T,i.EventSource=me})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:r.commonjsGlobal:globalThis)})(Ze,Ze.exports);var ot={exports:{}};(function(n,t){(function(e,o){n.exports=o()})(r.commonjsGlobal,function(){var e=1e3,o=6e4,s=36e5,a="millisecond",h="second",b="minute",T="hour",P="day",C="week",H="month",Q="quarter",U="year",L="date",X="Invalid Date",E=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,O=/\[([^\]]+)]|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,N={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(y){var f=["th","st","nd","rd"],u=y%100;return"["+y+(f[(u-20)%10]||f[u]||f[0])+"]"}},D=function(y,f,u){var p=String(y);return!p||p.length>=f?y:""+Array(f+1-p.length).join(u)+y},z={s:D,z:function(y){var f=-y.utcOffset(),u=Math.abs(f),p=Math.floor(u/60),c=u%60;return(f<=0?"+":"-")+D(p,2,"0")+":"+D(c,2,"0")},m:function y(f,u){if(f.date()<u.date())return-y(u,f);var p=12*(u.year()-f.year())+(u.month()-f.month()),c=f.clone().add(p,H),m=u-c<0,_=f.clone().add(p+(m?-1:1),H);return+(-(p+(u-c)/(m?c-_:_-c))||0)},a:function(y){return y<0?Math.ceil(y)||0:Math.floor(y)},p:function(y){return{M:H,y:U,w:C,d:P,D:L,h:T,m:b,s:h,ms:a,Q}[y]||String(y||"").toLowerCase().replace(/s$/,"")},u:function(y){return y===void 0}},ee="en",re={};re[ee]=N;var se="$isDayjsObject",oe=function(y){return y instanceof q||!(!y||!y[se])},ne=function y(f,u,p){var c;if(!f)return ee;if(typeof f=="string"){var m=f.toLowerCase();re[m]&&(c=m),u&&(re[m]=u,c=m);var _=f.split("-");if(!c&&_.length>1)return y(_[0])}else{var w=f.name;re[w]=f,c=w}return!p&&c&&(ee=c),c||!p&&ee},F=function(y,f){if(oe(y))return y.clone();var u=typeof f=="object"?f:{};return u.date=y,u.args=arguments,new q(u)},A=z;A.l=ne,A.i=oe,A.w=function(y,f){return F(y,{locale:f.$L,utc:f.$u,x:f.$x,$offset:f.$offset})};var q=function(){function y(u){this.$L=ne(u.locale,null,!0),this.parse(u),this.$x=this.$x||u.x||{},this[se]=!0}var f=y.prototype;return f.parse=function(u){this.$d=function(p){var c=p.date,m=p.utc;if(c===null)return new Date(NaN);if(A.u(c))return new Date;if(c instanceof Date)return new Date(c);if(typeof c=="string"&&!/Z$/i.test(c)){var _=c.match(E);if(_){var w=_[2]-1||0,j=(_[7]||"0").substring(0,3);return m?new Date(Date.UTC(_[1],w,_[3]||1,_[4]||0,_[5]||0,_[6]||0,j)):new Date(_[1],w,_[3]||1,_[4]||0,_[5]||0,_[6]||0,j)}}return new Date(c)}(u),this.init()},f.init=function(){var u=this.$d;this.$y=u.getFullYear(),this.$M=u.getMonth(),this.$D=u.getDate(),this.$W=u.getDay(),this.$H=u.getHours(),this.$m=u.getMinutes(),this.$s=u.getSeconds(),this.$ms=u.getMilliseconds()},f.$utils=function(){return A},f.isValid=function(){return this.$d.toString()!==X},f.isSame=function(u,p){var c=F(u);return this.startOf(p)<=c&&c<=this.endOf(p)},f.isAfter=function(u,p){return F(u)<this.startOf(p)},f.isBefore=function(u,p){return this.endOf(p)<F(u)},f.$g=function(u,p,c){return A.u(u)?this[p]:this.set(c,u)},f.unix=function(){return Math.floor(this.valueOf()/1e3)},f.valueOf=function(){return this.$d.getTime()},f.startOf=function(u,p){var c=this,m=!!A.u(p)||p,_=A.p(u),w=function(ce,B){var R=A.w(c.$u?Date.UTC(c.$y,B,ce):new Date(c.$y,B,ce),c);return m?R:R.endOf(P)},j=function(ce,B){return A.w(c.toDate()[ce].apply(c.toDate("s"),(m?[0,0,0,0]:[23,59,59,999]).slice(B)),c)},W=this.$W,te=this.$M,ue=this.$D,g="set"+(this.$u?"UTC":"");switch(_){case U:return m?w(1,0):w(31,11);case H:return m?w(1,te):w(0,te+1);case C:var $=this.$locale().weekStart||0,G=(W<$?W+7:W)-$;return w(m?ue-G:ue+(6-G),te);case P:case L:return j(g+"Hours",0);case T:return j(g+"Minutes",1);case b:return j(g+"Seconds",2);case h:return j(g+"Milliseconds",3);default:return this.clone()}},f.endOf=function(u){return this.startOf(u,!1)},f.$set=function(u,p){var c,m=A.p(u),_="set"+(this.$u?"UTC":""),w=(c={},c[P]=_+"Date",c[L]=_+"Date",c[H]=_+"Month",c[U]=_+"FullYear",c[T]=_+"Hours",c[b]=_+"Minutes",c[h]=_+"Seconds",c[a]=_+"Milliseconds",c)[m],j=m===P?this.$D+(p-this.$W):p;if(m===H||m===U){var W=this.clone().set(L,1);W.$d[w](j),W.init(),this.$d=W.set(L,Math.min(this.$D,W.daysInMonth())).$d}else w&&this.$d[w](j);return this.init(),this},f.set=function(u,p){return this.clone().$set(u,p)},f.get=function(u){return this[A.p(u)]()},f.add=function(u,p){var c,m=this;u=Number(u);var _=A.p(p),w=function(te){var ue=F(m);return A.w(ue.date(ue.date()+Math.round(te*u)),m)};if(_===H)return this.set(H,this.$M+u);if(_===U)return this.set(U,this.$y+u);if(_===P)return w(1);if(_===C)return w(7);var j=(c={},c[b]=o,c[T]=s,c[h]=e,c)[_]||1,W=this.$d.getTime()+u*j;return A.w(W,this)},f.subtract=function(u,p){return this.add(-1*u,p)},f.format=function(u){var p=this,c=this.$locale();if(!this.isValid())return c.invalidDate||X;var m=u||"YYYY-MM-DDTHH:mm:ssZ",_=A.z(this),w=this.$H,j=this.$m,W=this.$M,te=c.weekdays,ue=c.months,g=c.meridiem,$=function(B,R,Z,fe){return B&&(B[R]||B(p,m))||Z[R].slice(0,fe)},G=function(B){return A.s(w%12||12,B,"0")},ce=g||function(B,R,Z){var fe=B<12?"AM":"PM";return Z?fe.toLowerCase():fe};return m.replace(O,function(B,R){return R||function(Z){switch(Z){case"YY":return String(p.$y).slice(-2);case"YYYY":return A.s(p.$y,4,"0");case"M":return W+1;case"MM":return A.s(W+1,2,"0");case"MMM":return $(c.monthsShort,W,ue,3);case"MMMM":return $(ue,W);case"D":return p.$D;case"DD":return A.s(p.$D,2,"0");case"d":return String(p.$W);case"dd":return $(c.weekdaysMin,p.$W,te,2);case"ddd":return $(c.weekdaysShort,p.$W,te,3);case"dddd":return te[p.$W];case"H":return String(w);case"HH":return A.s(w,2,"0");case"h":return G(1);case"hh":return G(2);case"a":return ce(w,j,!0);case"A":return ce(w,j,!1);case"m":return String(j);case"mm":return A.s(j,2,"0");case"s":return String(p.$s);case"ss":return A.s(p.$s,2,"0");case"SSS":return A.s(p.$ms,3,"0");case"Z":return _}return null}(B)||_.replace(":","")})},f.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},f.diff=function(u,p,c){var m,_=this,w=A.p(p),j=F(u),W=(j.utcOffset()-this.utcOffset())*o,te=this-j,ue=function(){return A.m(_,j)};switch(w){case U:m=ue()/12;break;case H:m=ue();break;case Q:m=ue()/3;break;case C:m=(te-W)/6048e5;break;case P:m=(te-W)/864e5;break;case T:m=te/s;break;case b:m=te/o;break;case h:m=te/e;break;default:m=te}return c?m:A.a(m)},f.daysInMonth=function(){return this.endOf(H).$D},f.$locale=function(){return re[this.$L]},f.locale=function(u,p){if(!u)return this.$L;var c=this.clone(),m=ne(u,p,!0);return m&&(c.$L=m),c},f.clone=function(){return A.w(this.$d,this)},f.toDate=function(){return new Date(this.valueOf())},f.toJSON=function(){return this.isValid()?this.toISOString():null},f.toISOString=function(){return this.$d.toISOString()},f.toString=function(){return this.$d.toUTCString()},y}(),ie=q.prototype;return F.prototype=ie,[["$ms",a],["$s",h],["$m",b],["$H",T],["$W",P],["$M",H],["$y",U],["$D",L]].forEach(function(y){ie[y[1]]=function(f){return this.$g(f,y[0],y[1])}}),F.extend=function(y,f){return y.$i||(y(f,q,F),y.$i=!0),F},F.locale=ne,F.isDayjs=oe,F.unix=function(y){return F(1e3*y)},F.en=re[ee],F.Ls=re,F.p={},F})})(ot);var St=ot.exports;const Tt=r.getDefaultExportFromCjs(St);var it={exports:{}};(function(n,t){(function(e,o){n.exports=o()})(r.commonjsGlobal,function(){var e={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"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,a=/\d\d/,h=/\d\d?/,b=/\d*[^-_:/,()\s\d]+/,T={},P=function(E){return(E=+E)+(E>68?1900:2e3)},C=function(E){return function(O){this[E]=+O}},H=[/[+-]\d\d:?(\d\d)?|Z/,function(E){(this.zone||(this.zone={})).offset=function(O){if(!O||O==="Z")return 0;var N=O.match(/([+-]|\d\d)/g),D=60*N[1]+(+N[2]||0);return D===0?0:N[0]==="+"?-D:D}(E)}],Q=function(E){var O=T[E];return O&&(O.indexOf?O:O.s.concat(O.f))},U=function(E,O){var N,D=T.meridiem;if(D){for(var z=1;z<=24;z+=1)if(E.indexOf(D(z,0,O))>-1){N=z>12;break}}else N=E===(O?"pm":"PM");return N},L={A:[b,function(E){this.afternoon=U(E,!1)}],a:[b,function(E){this.afternoon=U(E,!0)}],Q:[s,function(E){this.month=3*(E-1)+1}],S:[s,function(E){this.milliseconds=100*+E}],SS:[a,function(E){this.milliseconds=10*+E}],SSS:[/\d{3}/,function(E){this.milliseconds=+E}],s:[h,C("seconds")],ss:[h,C("seconds")],m:[h,C("minutes")],mm:[h,C("minutes")],H:[h,C("hours")],h:[h,C("hours")],HH:[h,C("hours")],hh:[h,C("hours")],D:[h,C("day")],DD:[a,C("day")],Do:[b,function(E){var O=T.ordinal,N=E.match(/\d+/);if(this.day=N[0],O)for(var D=1;D<=31;D+=1)O(D).replace(/\[|\]/g,"")===E&&(this.day=D)}],w:[h,C("week")],ww:[a,C("week")],M:[h,C("month")],MM:[a,C("month")],MMM:[b,function(E){var O=Q("months"),N=(Q("monthsShort")||O.map(function(D){return D.slice(0,3)})).indexOf(E)+1;if(N<1)throw new Error;this.month=N%12||N}],MMMM:[b,function(E){var O=Q("months").indexOf(E)+1;if(O<1)throw new Error;this.month=O%12||O}],Y:[/[+-]?\d+/,C("year")],YY:[a,function(E){this.year=P(E)}],YYYY:[/\d{4}/,C("year")],Z:H,ZZ:H};function X(E){var O,N;O=E,N=T&&T.formats;for(var D=(E=O.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(F,A,q){var ie=q&&q.toUpperCase();return A||N[q]||e[q]||N[ie].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,f,u){return f||u.slice(1)})})).match(o),z=D.length,ee=0;ee<z;ee+=1){var re=D[ee],se=L[re],oe=se&&se[0],ne=se&&se[1];D[ee]=ne?{regex:oe,parser:ne}:re.replace(/^\[|\]$/g,"")}return function(F){for(var A={},q=0,ie=0;q<z;q+=1){var y=D[q];if(typeof y=="string")ie+=y.length;else{var f=y.regex,u=y.parser,p=F.slice(ie),c=f.exec(p)[0];u.call(A,c),F=F.replace(c,"")}}return function(m){var _=m.afternoon;if(_!==void 0){var w=m.hours;_?w<12&&(m.hours+=12):w===12&&(m.hours=0),delete m.afternoon}}(A),A}}return function(E,O,N){N.p.customParseFormat=!0,E&&E.parseTwoDigitYear&&(P=E.parseTwoDigitYear);var D=O.prototype,z=D.parse;D.parse=function(ee){var re=ee.date,se=ee.utc,oe=ee.args;this.$u=se;var ne=oe[1];if(typeof ne=="string"){var F=oe[2]===!0,A=oe[3]===!0,q=F||A,ie=oe[2];A&&(ie=oe[2]),T=this.$locale(),!F&&ie&&(T=N.Ls[ie]),this.$d=function(p,c,m,_){try{if(["x","X"].indexOf(c)>-1)return new Date((c==="X"?1e3:1)*p);var w=X(c)(p),j=w.year,W=w.month,te=w.day,ue=w.hours,g=w.minutes,$=w.seconds,G=w.milliseconds,ce=w.zone,B=w.week,R=new Date,Z=te||(j||W?1:R.getDate()),fe=j||R.getFullYear(),ye=0;j&&!W||(ye=W>0?W-1:R.getMonth());var me,i=ue||0,l=g||0,v=$||0,d=G||0;return ce?new Date(Date.UTC(fe,ye,Z,i,l,v,d+60*ce.offset*1e3)):m?new Date(Date.UTC(fe,ye,Z,i,l,v,d)):(me=new Date(fe,ye,Z,i,l,v,d),B&&(me=_(me).week(B).toDate()),me)}catch{return new Date("")}}(re,ne,se,N),this.init(),ie&&ie!==!0&&(this.$L=this.locale(ie).$L),q&&re!=this.format(ne)&&(this.$d=new Date("")),T={}}else if(ne instanceof Array)for(var y=ne.length,f=1;f<=y;f+=1){oe[1]=ne[f-1];var u=N.apply(this,oe);if(u.isValid()){this.$d=u.$d,this.$L=u.$L,this.init();break}f===y&&(this.$d=new Date(""))}else z.call(this,ee)}}})})(it);var Et=it.exports;const xt=r.getDefaultExportFromCjs(Et);Tt.extend(xt);const Dt=()=>typeof window>"u",Fe=(n,t=!1)=>{if(typeof n=="boolean")return n;if(n==null)return t;if(typeof n=="number")return n!==0;const e=String(n).trim().toLowerCase();return e===""?!0:e!=="false"&&e!=="0"},Mt={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}"}},Ot=5e3,At=1e3,Ct=!0,Lt=!0,$t=!0,Pt=!0;/*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation.
9
-
10
- Permission to use, copy, modify, and/or distribute this software for any
11
- purpose with or without fee is hereby granted.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
- PERFORMANCE OF THIS SOFTWARE.
20
- ***************************************************************************** */var Ue=function(n,t){return Ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,o){e.__proto__=o}||function(e,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(e[s]=o[s])},Ue(n,t)};function $e(n,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ue(n,t);function e(){this.constructor=n}n.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}function ze(n){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&n[t],o=0;if(e)return e.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&o>=n.length&&(n=void 0),{value:n&&n[o++],done:!n}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function We(n,t){var e=typeof Symbol=="function"&&n[Symbol.iterator];if(!e)return n;var o=e.call(n),s,a=[],h;try{for(;(t===void 0||t-- >0)&&!(s=o.next()).done;)a.push(s.value)}catch(b){h={error:b}}finally{try{s&&!s.done&&(e=o.return)&&e.call(o)}finally{if(h)throw h.error}}return a}function Be(n,t,e){if(arguments.length===2)for(var o=0,s=t.length,a;o<s;o++)(a||!(o in t))&&(a||(a=Array.prototype.slice.call(t,0,o)),a[o]=t[o]);return n.concat(a||t)}function De(n){return typeof n=="function"}function at(n){var t=function(o){Error.call(o),o.stack=new Error().stack},e=n(t);return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var ke=at(function(n){return function(e){n(this),this.message=e?e.length+` errors occurred during unsubscription:
21
- `+e.map(function(o,s){return s+1+") "+o.toString()}).join(`
22
- `):"",this.name="UnsubscriptionError",this.errors=e}});function Ge(n,t){if(n){var e=n.indexOf(t);0<=e&&n.splice(e,1)}}var je=function(){function n(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return n.prototype.unsubscribe=function(){var t,e,o,s,a;if(!this.closed){this.closed=!0;var h=this._parentage;if(h)if(this._parentage=null,Array.isArray(h))try{for(var b=ze(h),T=b.next();!T.done;T=b.next()){var P=T.value;P.remove(this)}}catch(X){t={error:X}}finally{try{T&&!T.done&&(e=b.return)&&e.call(b)}finally{if(t)throw t.error}}else h.remove(this);var C=this.initialTeardown;if(De(C))try{C()}catch(X){a=X instanceof ke?X.errors:[X]}var H=this._finalizers;if(H){this._finalizers=null;try{for(var Q=ze(H),U=Q.next();!U.done;U=Q.next()){var L=U.value;try{Qe(L)}catch(X){a=a??[],X instanceof ke?a=Be(Be([],We(a)),We(X.errors)):a.push(X)}}}catch(X){o={error:X}}finally{try{U&&!U.done&&(s=Q.return)&&s.call(Q)}finally{if(o)throw o.error}}}if(a)throw new ke(a)}},n.prototype.add=function(t){var e;if(t&&t!==this)if(this.closed)Qe(t);else{if(t instanceof n){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}},n.prototype._hasParent=function(t){var e=this._parentage;return e===t||Array.isArray(e)&&e.includes(t)},n.prototype._addParent=function(t){var e=this._parentage;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t},n.prototype._removeParent=function(t){var e=this._parentage;e===t?this._parentage=null:Array.isArray(e)&&Ge(e,t)},n.prototype.remove=function(t){var e=this._finalizers;e&&Ge(e,t),t instanceof n&&t._removeParent(this)},n.EMPTY=function(){var t=new n;return t.closed=!0,t}(),n}(),st=je.EMPTY;function ut(n){return n instanceof je||n&&"closed"in n&&De(n.remove)&&De(n.add)&&De(n.unsubscribe)}function Qe(n){De(n)?n():n.unsubscribe()}var It={Promise:void 0},Ft={setTimeout:function(n,t){for(var e=[],o=2;o<arguments.length;o++)e[o-2]=arguments[o];return setTimeout.apply(void 0,Be([n,t],We(e)))},clearTimeout:function(n){return clearTimeout(n)},delegate:void 0};function Rt(n){Ft.setTimeout(function(){throw n})}function Je(){}function Ye(n){n()}var ct=function(n){$e(t,n);function t(e){var o=n.call(this)||this;return o.isStopped=!1,e?(o.destination=e,ut(e)&&e.add(o)):o.destination=Ht,o}return t.create=function(e,o,s){return new Ve(e,o,s)},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,n.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(je),Yt=function(){function n(t){this.partialObserver=t}return n.prototype.next=function(t){var e=this.partialObserver;if(e.next)try{e.next(t)}catch(o){Re(o)}},n.prototype.error=function(t){var e=this.partialObserver;if(e.error)try{e.error(t)}catch(o){Re(o)}else Re(t)},n.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(e){Re(e)}},n}(),Ve=function(n){$e(t,n);function t(e,o,s){var a=n.call(this)||this,h;return De(e)||!e?h={next:e??void 0,error:o??void 0,complete:s??void 0}:h=e,a.destination=new Yt(h),a}return t}(ct);function Re(n){Rt(n)}function jt(n){throw n}var Ht={closed:!0,next:Je,error:jt,complete:Je},Nt=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function kt(n){return n}function Ut(n){return n.length===0?kt:n.length===1?n[0]:function(e){return n.reduce(function(o,s){return s(o)},e)}}var Ke=function(){function n(t){t&&(this._subscribe=t)}return n.prototype.lift=function(t){var e=new n;return e.source=this,e.operator=t,e},n.prototype.subscribe=function(t,e,o){var s=this,a=Wt(t)?t:new Ve(t,e,o);return Ye(function(){var h=s,b=h.operator,T=h.source;a.add(b?b.call(a,T):T?s._subscribe(a):s._trySubscribe(a))}),a},n.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){t.error(e)}},n.prototype.forEach=function(t,e){var o=this;return e=et(e),new e(function(s,a){var h=new Ve({next:function(b){try{t(b)}catch(T){a(T),h.unsubscribe()}},error:a,complete:s});o.subscribe(h)})},n.prototype._subscribe=function(t){var e;return(e=this.source)===null||e===void 0?void 0:e.subscribe(t)},n.prototype[Nt]=function(){return this},n.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Ut(t)(this)},n.prototype.toPromise=function(t){var e=this;return t=et(t),new t(function(o,s){var a;e.subscribe(function(h){return a=h},function(h){return s(h)},function(){return o(a)})})},n.create=function(t){return new n(t)},n}();function et(n){var t;return(t=n??It.Promise)!==null&&t!==void 0?t:Promise}function zt(n){return n&&De(n.next)&&De(n.error)&&De(n.complete)}function Wt(n){return n&&n instanceof ct||zt(n)&&ut(n)}var Bt=at(function(n){return function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),lt=function(n){$e(t,n);function t(){var e=n.call(this)||this;return e.closed=!1,e.currentObservers=null,e.observers=[],e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return t.prototype.lift=function(e){var o=new tt(this,this);return o.operator=e,o},t.prototype._throwIfClosed=function(){if(this.closed)throw new Bt},t.prototype.next=function(e){var o=this;Ye(function(){var s,a;if(o._throwIfClosed(),!o.isStopped){o.currentObservers||(o.currentObservers=Array.from(o.observers));try{for(var h=ze(o.currentObservers),b=h.next();!b.done;b=h.next()){var T=b.value;T.next(e)}}catch(P){s={error:P}}finally{try{b&&!b.done&&(a=h.return)&&a.call(h)}finally{if(s)throw s.error}}}})},t.prototype.error=function(e){var o=this;Ye(function(){if(o._throwIfClosed(),!o.isStopped){o.hasError=o.isStopped=!0,o.thrownError=e;for(var s=o.observers;s.length;)s.shift().error(e)}})},t.prototype.complete=function(){var e=this;Ye(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var o=e.observers;o.length;)o.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(e){return this._throwIfClosed(),n.prototype._trySubscribe.call(this,e)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var o=this,s=this,a=s.hasError,h=s.isStopped,b=s.observers;return a||h?st:(this.currentObservers=null,b.push(e),new je(function(){o.currentObservers=null,Ge(b,e)}))},t.prototype._checkFinalizedStatuses=function(e){var o=this,s=o.hasError,a=o.thrownError,h=o.isStopped;s?e.error(a):h&&e.complete()},t.prototype.asObservable=function(){var e=new Ke;return e.source=this,e},t.create=function(e,o){return new tt(e,o)},t}(Ke),tt=function(n){$e(t,n);function t(e,o){var s=n.call(this)||this;return s.destination=e,s.source=o,s}return t.prototype.next=function(e){var o,s;(s=(o=this.destination)===null||o===void 0?void 0:o.next)===null||s===void 0||s.call(o,e)},t.prototype.error=function(e){var o,s;(s=(o=this.destination)===null||o===void 0?void 0:o.error)===null||s===void 0||s.call(o,e)},t.prototype.complete=function(){var e,o;(o=(e=this.destination)===null||e===void 0?void 0:e.complete)===null||o===void 0||o.call(e)},t.prototype._subscribe=function(e){var o,s;return(s=(o=this.source)===null||o===void 0?void 0:o.subscribe(e))!==null&&s!==void 0?s:st},t}(lt),ft={now:function(){return(ft.delegate||Date).now()},delegate:void 0},Gt=function(n){$e(t,n);function t(e,o,s){e===void 0&&(e=1/0),o===void 0&&(o=1/0),s===void 0&&(s=ft);var a=n.call(this)||this;return a._bufferSize=e,a._windowTime=o,a._timestampProvider=s,a._buffer=[],a._infiniteTimeWindow=!0,a._infiniteTimeWindow=o===1/0,a._bufferSize=Math.max(1,e),a._windowTime=Math.max(1,o),a}return t.prototype.next=function(e){var o=this,s=o.isStopped,a=o._buffer,h=o._infiniteTimeWindow,b=o._timestampProvider,T=o._windowTime;s||(a.push(e),!h&&a.push(b.now()+T)),this._trimBuffer(),n.prototype.next.call(this,e)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var o=this._innerSubscribe(e),s=this,a=s._infiniteTimeWindow,h=s._buffer,b=h.slice(),T=0;T<b.length&&!e.closed;T+=a?1:2)e.next(b[T]);return this._checkFinalizedStatuses(e),o},t.prototype._trimBuffer=function(){var e=this,o=e._bufferSize,s=e._timestampProvider,a=e._buffer,h=e._infiniteTimeWindow,b=(h?1:2)*o;if(o<1/0&&b<a.length&&a.splice(0,a.length-b),!h){for(var T=s.now(),P=0,C=1;C<a.length&&a[C]<=T;C+=2)P=C;P&&a.splice(0,P+1)}},t}(lt);const rt=[],nt={},Vt=(n,t=0)=>{if(rt.indexOf(n)==-1){const e=new Gt(t);nt[n]=e,rt.push(n)}return nt[n]};typeof window<"u"&&(window.emWidgets={topic:Vt});const Xt=n=>n.toLowerCase().match(/android/i)?"Android":n.toLowerCase().match(/iphone/i)?"iPhone":n.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC";String(Number.MAX_SAFE_INTEGER).length;var qt=r.from_html('<div class="tournaments-banner svelte-h8hbcz"><div class="tournaments-banner__skeleton svelte-h8hbcz" aria-busy="true"></div></div>'),Zt=r.from_html('<a class="tournaments-banner__slide svelte-h8hbcz"><!></a>'),Qt=r.from_html('<button type="button"></button>'),Jt=r.from_html('<div class="tournaments-banner__dots svelte-h8hbcz"></div>'),Kt=r.from_html('<div class="tournaments-banner svelte-h8hbcz" role="region" aria-roledescription="carousel"><div class="tournaments-banner__track svelte-h8hbcz"></div> <!></div>');const er={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));
23
- 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;}}}
24
-
25
- @keyframes svelte-h8hbcz-tournaments-banner-pulse {
26
- 50% {
27
- opacity: 0.4;
28
- }
29
- }
30
-
31
- @media (max-width: 767px) {.tournaments-banner.svelte-h8hbcz .tournaments-banner__skeleton:where(.svelte-h8hbcz) {height:160px;}
32
- }
33
-
34
- @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) {
35
- animation: none;}
36
- }`};function Xe(n,t){r.push(t,!0),r.append_styles(n,er);const e=()=>r.store_get(r.$format,"$_",o),[o,s]=r.setup_stores(),a=r.prop(t,"endpoint"),h=r.prop(t,"language",7,"en"),b=r.prop(t,"session"),T=r.prop(t,"platformProp",7,null),P=r.prop(t,"translationurl"),C=r.prop(t,"navigationhref",7,""),H=r.prop(t,"enableautoplay",7,void 0),Q=r.prop(t,"autoplayinterval",7,void 0),U=r.prop(t,"pauseoninteraction",7,void 0),L=r.prop(t,"loop",7,void 0),X=r.prop(t,"showdots",7,void 0);r.setupI18n({withLocale:"en",translations:{}}),r.registerTranslations(Mt),r.setLocale(h()),r.user_pre_effect(()=>{P()&&r.loadTranslations(P())}),r.user_effect(()=>{r.setLocale(h())});const E=Dt()?T()??"dk":Xt(window.navigator.userAgent);let O=r.state(r.proxy([])),N=r.state(!0),D=r.state(0),z=r.state(null),ee=r.state(!1),re=r.state(!1),se=r.state(!1),oe=r.state(!1),ne=r.state(!1);const F=r.user_derived(()=>Fe(H(),Ct)),A=r.user_derived(()=>Fe(U(),Lt)),q=r.user_derived(()=>Fe(L(),$t)),ie=r.user_derived(()=>Fe(X(),Pt)),y=r.user_derived(()=>Number(Q())>0?Math.max(Number(Q()),At):Ot),f=g=>`${C().replace(/\/$/,"")}/${g.id}`;r.user_effect(()=>{const g={endpoint:a(),language:h(),session:b(),platform:E};if(!g.endpoint)return;let $=!1;return r.set(N,!0),wt(g).then(G=>{$||(r.set(O,G,!0),r.set(D,0))}).catch(G=>{console.log(G),$||r.set(O,[],!0)}).finally(()=>{$||r.set(N,!1)}),()=>{$=!0}}),r.user_effect(()=>{const g=window.matchMedia("(prefers-reduced-motion: reduce)"),$=()=>{r.set(ne,g.matches,!0)},G=()=>{r.set(oe,document.visibilityState==="hidden")};return $(),G(),g.addEventListener("change",$),document.addEventListener("visibilitychange",G),()=>{g.removeEventListener("change",$),document.removeEventListener("visibilitychange",G)}}),r.user_effect(()=>{const g=r.get(D),$=r.get(O).length,G=r.get(A)&&(r.get(ee)||r.get(re)||r.get(se)),ce=g>=$-1;if(!r.get(F)||$<2||G||r.get(oe)||r.get(ne)||ce&&!r.get(q))return;const B=setTimeout(()=>p((g+1)%$),r.get(y));return()=>clearTimeout(B)});const u=()=>{!r.get(z)||!r.get(z).clientWidth||r.set(D,Math.round(r.get(z).scrollLeft/r.get(z).clientWidth),!0)},p=g=>{r.get(z)?.scrollTo({left:g*r.get(z).clientWidth,behavior:"smooth"})},c=g=>{r.set(re,g.target.matches(":focus-visible"),!0)},m=(g,$)=>{C()||(g.preventDefault(),gt($))};var _={get endpoint(){return a()},set endpoint(g){a(g),r.flushSync()},get language(){return h()},set language(g="en"){h(g),r.flushSync()},get session(){return b()},set session(g){b(g),r.flushSync()},get platformProp(){return T()},set platformProp(g=null){T(g),r.flushSync()},get translationurl(){return P()},set translationurl(g){P(g),r.flushSync()},get navigationhref(){return C()},set navigationhref(g=""){C(g),r.flushSync()},get enableautoplay(){return H()},set enableautoplay(g=void 0){H(g),r.flushSync()},get autoplayinterval(){return Q()},set autoplayinterval(g=void 0){Q(g),r.flushSync()},get pauseoninteraction(){return U()},set pauseoninteraction(g=void 0){U(g),r.flushSync()},get loop(){return L()},set loop(g=void 0){L(g),r.flushSync()},get showdots(){return X()},set showdots(g=void 0){X(g),r.flushSync()}},w=r.comment(),j=r.first_child(w);{var W=g=>{var $=qt();r.append(g,$)},te=g=>{var $=Kt(),G=r.child($);r.each(G,23,()=>r.get(O),R=>R.id,(R,Z,fe)=>{var ye=Zt(),me=r.child(ye);{let i=r.user_derived(()=>r.get(fe)===0);vt.TournamentImage(me,{variant:"banner",get priority(){return r.get(i)},get src(){return r.get(Z).thumbnail},get alt(){return r.get(Z).nameOrTitle},get state(){return r.get(Z).state},get startTime(){return r.get(Z).startTime},get endTime(){return r.get(Z).endTime},get language(){return h()}})}r.reset(ye),r.template_effect((i,l)=>{r.set_attribute(ye,"href",i),r.set_attribute(ye,"aria-label",l)},[()=>C()?f(r.get(Z)):"#",()=>`${r.get(Z).nameOrTitle} – ${e()("bannerSlideLabel",{values:{index:r.get(fe)+1,total:r.get(O).length}})}`]),r.delegated("click",ye,i=>m(i,r.get(Z))),r.append(R,ye)}),r.reset(G),r.bind_this(G,R=>r.set(z,R),()=>r.get(z));var ce=r.sibling(G,2);{var B=R=>{var Z=Jt();r.each(Z,23,()=>r.get(O),fe=>fe.id,(fe,ye,me)=>{var i=Qt();let l;r.template_effect(v=>{l=r.set_class(i,1,"tournaments-banner__dot svelte-h8hbcz",null,l,{active:r.get(me)===r.get(D)}),r.set_attribute(i,"aria-label",v),r.set_attribute(i,"aria-current",r.get(me)===r.get(D)?"true":void 0)},[()=>e()("bannerGoToSlide",{values:{index:r.get(me)+1}})]),r.delegated("click",i,()=>p(r.get(me))),r.append(fe,i)}),r.reset(Z),r.append(R,Z)};r.if_block(ce,R=>{r.get(ie)&&r.get(O).length>1&&R(B)})}r.reset($),r.event("mouseenter",$,()=>r.set(ee,!0)),r.event("mouseleave",$,()=>r.set(ee,!1)),r.delegated("focusin",$,c),r.delegated("focusout",$,()=>r.set(re,!1)),r.delegated("touchstart",$,()=>r.set(se,!0)),r.delegated("touchend",$,()=>r.set(se,!1)),r.event("touchcancel",$,()=>r.set(se,!1)),r.event("scroll",G,u),r.append(g,$)};r.if_block(j,g=>{r.get(N)?g(W):r.get(O).length&&g(te,1)})}r.append(n,w);var ue=r.pop(_);return s(),ue}r.delegate(["focusin","focusout","touchstart","touchend","click"]);r.create_custom_element(Xe,{endpoint:{},language:{},session:{},platformProp:{},translationurl:{},navigationhref:{},enableautoplay:{},autoplayinterval:{},pauseoninteraction:{},loop:{},showdots:{}},[],[],{mode:"open"});function dt(n,t){r.push(t,!0);let e=r.prop(t,"endpoint"),o=r.prop(t,"language",7,"en"),s=r.prop(t,"session"),a=r.prop(t,"platformProp",7,null),h=r.prop(t,"translationurl"),b=r.prop(t,"navigationhref"),T=r.prop(t,"enableautoplay"),P=r.prop(t,"autoplayinterval"),C=r.prop(t,"pauseoninteraction"),H=r.prop(t,"loop"),Q=r.prop(t,"showdots");var U={get endpoint(){return e()},set endpoint(L){e(L),r.flushSync()},get language(){return o()},set language(L="en"){o(L),r.flushSync()},get session(){return s()},set session(L){s(L),r.flushSync()},get platformProp(){return a()},set platformProp(L=null){a(L),r.flushSync()},get translationurl(){return h()},set translationurl(L){h(L),r.flushSync()},get navigationhref(){return b()},set navigationhref(L){b(L),r.flushSync()},get enableautoplay(){return T()},set enableautoplay(L){T(L),r.flushSync()},get autoplayinterval(){return P()},set autoplayinterval(L){P(L),r.flushSync()},get pauseoninteraction(){return C()},set pauseoninteraction(L){C(L),r.flushSync()},get loop(){return H()},set loop(L){H(L),r.flushSync()},get showdots(){return Q()},set showdots(L){Q(L),r.flushSync()}};return Xe(n,{get endpoint(){return e()},get language(){return o()},get session(){return s()},get platformProp(){return a()},get translationurl(){return h()},get navigationhref(){return b()},get enableautoplay(){return T()},get autoplayinterval(){return P()},get pauseoninteraction(){return C()},get loop(){return H()},get showdots(){return Q()}}),r.pop(U)}customElements.define("tournaments-banner",r.create_custom_element(dt,{endpoint:{},language:{},session:{},platformProp:{},translationurl:{},navigationhref:{},enableautoplay:{},autoplayinterval:{},pauseoninteraction:{},loop:{},showdots:{}},[],[]));const tr=Object.freeze(Object.defineProperty({__proto__:null,default:dt},Symbol.toStringTag,{value:"Module"}));exports.TournamentsBanner=Xe;exports.TournamentsBanner_ce=tr;