@everymatrix/casino-tournaments-limited-controller 1.49.0 → 1.49.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.
@@ -10,4 +10,4 @@ Try polyfilling it using "@formatjs/intl-pluralrules"
10
10
  * https://github.com/Yaffle/EventSource/
11
11
  */(function(e,t){(function(n){var r=n.setTimeout,i=n.clearTimeout,o=n.XMLHttpRequest,s=n.XDomainRequest,a=n.ActiveXObject,l=n.EventSource,u=n.document,c=n.Promise,f=n.fetch,d=n.Response,E=n.TextDecoder,T=n.TextEncoder,I=n.AbortController;if(typeof window!="undefined"&&typeof u!="undefined"&&!("readyState"in u)&&u.body==null&&(u.readyState="loading",window.addEventListener("load",function(h){u.readyState="complete"},!1)),o==null&&a!=null&&(o=function(){return new a("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(h){function m(){}return m.prototype=h,new m}),Date.now||(Date.now=function(){return new Date().getTime()}),I==null){var U=f;f=function(h,m){var g=m.signal;return U(h,{headers:m.headers,credentials:m.credentials,cache:m.cache}).then(function(p){var y=p.body.getReader();return g._reader=y,g._aborted&&g._reader.cancel(),{status:p.status,statusText:p.statusText,headers:p.headers,body:{getReader:function(){return y}}}})},I=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function V(){this.bitsNeeded=0,this.codePoint=0}V.prototype.decode=function(h){function m(L,k,w){if(w===1)return L>=128>>k&&L<<k<=2047;if(w===2)return L>=2048>>k&&L<<k<=55295||L>=57344>>k&&L<<k<=65535;if(w===3)return L>=65536>>k&&L<<k<=1114111;throw new Error}function g(L,k){if(L===6*1)return k>>6>15?3:k>31?2:1;if(L===6*2)return k>15?3:2;if(L===6*3)return 3;throw new Error}for(var p=65533,y="",b=this.bitsNeeded,C=this.codePoint,z=0;z<h.length;z+=1){var R=h[z];b!==0&&(R<128||R>191||!m(C<<6|R&63,b-6,g(b,C)))&&(b=0,C=p,y+=String.fromCharCode(C)),b===0?(R>=0&&R<=127?(b=0,C=R):R>=192&&R<=223?(b=6*1,C=R&31):R>=224&&R<=239?(b=6*2,C=R&15):R>=240&&R<=247?(b=6*3,C=R&7):(b=0,C=p),b!==0&&!m(C,b,g(b,C))&&(b=0,C=p)):(b-=6,C=C<<6|R&63),b===0&&(C<=65535?y+=String.fromCharCode(C):(y+=String.fromCharCode(55296+(C-65535-1>>10)),y+=String.fromCharCode(56320+(C-65535-1&1023))))}return this.bitsNeeded=b,this.codePoint=C,y};var S=function(){try{return new E().decode(new T().encode("test"),{stream:!0})==="test"}catch(h){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+h)}return!1};(E==null||T==null||!S())&&(E=V);var A=function(){};function B(h){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=A,this.onload=A,this.onerror=A,this.onreadystatechange=A,this._contentType="",this._xhr=h,this._sendTimeout=0,this._abort=A}B.prototype.open=function(h,m){this._abort(!0);var g=this,p=this._xhr,y=1,b=0;this._abort=function(w){g._sendTimeout!==0&&(i(g._sendTimeout),g._sendTimeout=0),(y===1||y===2||y===3)&&(y=4,p.onload=A,p.onerror=A,p.onabort=A,p.onprogress=A,p.onreadystatechange=A,p.abort(),b!==0&&(i(b),b=0),w||(g.readyState=4,g.onabort(null),g.onreadystatechange())),y=0};var C=function(){if(y===1){var w=0,J="",me=void 0;if("contentType"in p)w=200,J="OK",me=p.contentType;else try{w=p.status,J=p.statusText,me=p.getResponseHeader("Content-Type")}catch(We){w=0,J="",me=void 0}w!==0&&(y=2,g.readyState=2,g.status=w,g.statusText=J,g._contentType=me,g.onreadystatechange())}},z=function(){if(C(),y===2||y===3){y=3;var w="";try{w=p.responseText}catch(J){}g.readyState=3,g.responseText=w,g.onprogress()}},R=function(w,J){if((J==null||J.preventDefault==null)&&(J={preventDefault:A}),z(),y===1||y===2||y===3){if(y=4,b!==0&&(i(b),b=0),g.readyState=4,w==="load")g.onload(J);else if(w==="error")g.onerror(J);else if(w==="abort")g.onabort(J);else throw new TypeError;g.onreadystatechange()}},L=function(w){p!=null&&(p.readyState===4?(!("onload"in p)||!("onerror"in p)||!("onabort"in p))&&R(p.responseText===""?"error":"load",w):p.readyState===3?"onprogress"in p||z():p.readyState===2&&C())},k=function(){b=r(function(){k()},500),p.readyState===3&&z()};"onload"in p&&(p.onload=function(w){R("load",w)}),"onerror"in p&&(p.onerror=function(w){R("error",w)}),"onabort"in p&&(p.onabort=function(w){R("abort",w)}),"onprogress"in p&&(p.onprogress=z),"onreadystatechange"in p&&(p.onreadystatechange=function(w){L(w)}),("contentType"in p||!("ontimeout"in o.prototype))&&(m+=(m.indexOf("?")===-1?"?":"&")+"padding=true"),p.open(h,m,!0),"readyState"in p&&(b=r(function(){k()},0))},B.prototype.abort=function(){this._abort(!1)},B.prototype.getResponseHeader=function(h){return this._contentType},B.prototype.setRequestHeader=function(h,m){var g=this._xhr;"setRequestHeader"in g&&g.setRequestHeader(h,m)},B.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},B.prototype.send=function(){if((!("ontimeout"in o.prototype)||!("sendAsBinary"in o.prototype)&&!("mozAnon"in o.prototype))&&u!=null&&u.readyState!=null&&u.readyState!=="complete"){var h=this;h._sendTimeout=r(function(){h._sendTimeout=0,h.send()},4);return}var m=this._xhr;"withCredentials"in m&&(m.withCredentials=this.withCredentials);try{m.send(void 0)}catch(g){throw g}};function N(h){return h.replace(/[A-Z]/g,function(m){return String.fromCharCode(m.charCodeAt(0)+32)})}function Y(h){for(var m=Object.create(null),g=h.split(`\r
12
12
  `),p=0;p<g.length;p+=1){var y=g[p],b=y.split(": "),C=b.shift(),z=b.join(": ");m[N(C)]=z}this._map=m}Y.prototype.get=function(h){return this._map[N(h)]},o!=null&&o.HEADERS_RECEIVED==null&&(o.HEADERS_RECEIVED=2);function F(){}F.prototype.open=function(h,m,g,p,y,b,C){h.open("GET",y);var z=0;h.onprogress=function(){var L=h.responseText,k=L.slice(z);z+=k.length,g(k)},h.onerror=function(L){L.preventDefault(),p(new Error("NetworkError"))},h.onload=function(){p(null)},h.onabort=function(){p(null)},h.onreadystatechange=function(){if(h.readyState===o.HEADERS_RECEIVED){var L=h.status,k=h.statusText,w=h.getResponseHeader("Content-Type"),J=h.getAllResponseHeaders();m(L,k,w,new Y(J))}},h.withCredentials=b;for(var R in C)Object.prototype.hasOwnProperty.call(C,R)&&h.setRequestHeader(R,C[R]);return h.send(),h};function Q(h){this._headers=h}Q.prototype.get=function(h){return this._headers.get(h)};function $(){}$.prototype.open=function(h,m,g,p,y,b,C){var z=null,R=new I,L=R.signal,k=new E;return f(y,{headers:C,credentials:b?"include":"same-origin",signal:L,cache:"no-store"}).then(function(w){return z=w.body.getReader(),m(w.status,w.statusText,w.headers.get("Content-Type"),new Q(w.headers)),new c(function(J,me){var We=function(){z.read().then(function(se){if(se.done)J(void 0);else{var ne=k.decode(se.value,{stream:!0});g(ne),We()}}).catch(function(se){me(se)})};We()})}).catch(function(w){if(w.name!=="AbortError")return w}).then(function(w){p(w)}),{abort:function(){z!=null&&z.cancel(),R.abort()}}};function Ce(){this._listeners=Object.create(null)}function it(h){r(function(){throw h},0)}Ce.prototype.dispatchEvent=function(h){h.target=this;var m=this._listeners[h.type];if(m!=null)for(var g=m.length,p=0;p<g;p+=1){var y=m[p];try{typeof y.handleEvent=="function"?y.handleEvent(h):y.call(this,h)}catch(b){it(b)}}},Ce.prototype.addEventListener=function(h,m){h=String(h);var g=this._listeners,p=g[h];p==null&&(p=[],g[h]=p);for(var y=!1,b=0;b<p.length;b+=1)p[b]===m&&(y=!0);y||p.push(m)},Ce.prototype.removeEventListener=function(h,m){h=String(h);var g=this._listeners,p=g[h];if(p!=null){for(var y=[],b=0;b<p.length;b+=1)p[b]!==m&&y.push(p[b]);y.length===0?delete g[h]:g[h]=y}};function ye(h){this.type=h,this.target=void 0}function ot(h,m){ye.call(this,h),this.data=m.data,this.lastEventId=m.lastEventId}ot.prototype=Object.create(ye.prototype);function we(h,m){ye.call(this,h),this.status=m.status,this.statusText=m.statusText,this.headers=m.headers}we.prototype=Object.create(ye.prototype);function st(h,m){ye.call(this,h),this.error=m.error}st.prototype=Object.create(ye.prototype);var Ze=-1,de=0,xe=1,v=2,D=-1,_=0,ee=1,at=2,Lt=3,Mt=/^text\/event\-stream(;.*)?$/i,Xr=1e3,Vr=18e6,kt=function(h,m){var g=h==null?m:parseInt(h,10);return g!==g&&(g=m),Ut(g)},Ut=function(h){return Math.min(Math.max(h,Xr),Vr)},Ne=function(h,m,g){try{typeof m=="function"&&m.call(h,g)}catch(p){it(p)}};function fe(h,m){Ce.call(this),m=m||{},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,Yr(this,h,m)}function Zr(){return o!=null&&"withCredentials"in o.prototype||s==null?new o:new s}var Wr=f!=null&&d!=null&&"body"in d.prototype;function Yr(h,m,g){m=String(m);var p=!!g.withCredentials,y=g.lastEventIdQueryParameterName||"lastEventId",b=Ut(1e3),C=kt(g.heartbeatTimeout,45e3),z="",R=b,L=!1,k=0,w=g.headers||{},J=g.Transport,me=Wr&&J==null?void 0:new B(J!=null?new J:Zr()),We=J!=null&&typeof J!="string"?new J:me==null?new $:new F,se=void 0,ne=0,ce=Ze,_e="",ut="",ge="",lt="",re=_,Ft=0,Se=0,qr=function(q,Z,ae,ue){if(ce===de)if(q===200&&ae!=null&&Mt.test(ae)){ce=xe,L=Date.now(),R=b,h.readyState=xe;var ie=new we("open",{status:q,statusText:Z,headers:ue});h.dispatchEvent(ie),Ne(h,h.onopen,ie)}else{var te="";q!==200?(Z&&(Z=Z.replace(/\s+/g," ")),te="EventSource's response has a status "+q+" "+Z+" that is not 200. Aborting the connection."):te="EventSource's response has a Content-Type specifying an unsupported type: "+(ae==null?"-":ae.replace(/\s+/g," "))+". Aborting the connection.",Gt();var ie=new we("error",{status:q,statusText:Z,headers:ue});h.dispatchEvent(ie),Ne(h,h.onerror,ie),console.error(te)}},Kr=function(q){if(ce===xe){for(var Z=-1,ae=0;ae<q.length;ae+=1){var ue=q.charCodeAt(ae);(ue===10||ue===13)&&(Z=ae)}var ie=(Z!==-1?lt:"")+q.slice(0,Z+1);lt=(Z===-1?lt:"")+q.slice(Z+1),q!==""&&(L=Date.now(),k+=q.length);for(var te=0;te<ie.length;te+=1){var ue=ie.charCodeAt(te);if(re===D&&ue===10)re=_;else if(re===D&&(re=_),ue===13||ue===10){if(re!==_){re===ee&&(Se=te+1);var ve=ie.slice(Ft,Se-1),Ae=ie.slice(Se+(Se<te&&ie.charCodeAt(Se)===32?1:0),te);ve==="data"?(_e+=`
13
- `,_e+=Ae):ve==="id"?ut=Ae:ve==="event"?ge=Ae:ve==="retry"?(b=kt(Ae,b),R=b):ve==="heartbeatTimeout"&&(C=kt(Ae,C),ne!==0&&(i(ne),ne=r(function(){Ye()},C)))}if(re===_){if(_e!==""){z=ut,ge===""&&(ge="message");var Pe=new ot(ge,{data:_e.slice(1),lastEventId:ut});if(h.dispatchEvent(Pe),ge==="open"?Ne(h,h.onopen,Pe):ge==="message"?Ne(h,h.onmessage,Pe):ge==="error"&&Ne(h,h.onerror,Pe),ce===v)return}_e="",ge=""}re=ue===13?D:_}else re===_&&(Ft=te,re=ee),re===ee?ue===58&&(Se=te+1,re=at):re===at&&(re=Lt)}}},Cn=function(q){if(ce===xe||ce===de){ce=Ze,ne!==0&&(i(ne),ne=0),ne=r(function(){Ye()},R),R=Ut(Math.min(b*16,R*2)),h.readyState=de;var Z=new st("error",{error:q});h.dispatchEvent(Z),Ne(h,h.onerror,Z),q!=null&&console.error(q)}},Gt=function(){ce=v,se!=null&&(se.abort(),se=void 0),ne!==0&&(i(ne),ne=0),h.readyState=v},Ye=function(){if(ne=0,ce!==Ze){if(!L&&se!=null)Cn(new Error("No activity within "+C+" milliseconds. "+(ce===de?"No response received.":k+" chars received.")+" Reconnecting.")),se!=null&&(se.abort(),se=void 0);else{var q=Math.max((L||Date.now())+C-Date.now(),1);L=!1,ne=r(function(){Ye()},q)}return}L=!1,k=0,ne=r(function(){Ye()},C),ce=de,_e="",ge="",ut=z,lt="",Ft=0,Se=0,re=_;var Z=m;if(m.slice(0,5)!=="data:"&&m.slice(0,5)!=="blob:"&&z!==""){var ae=m.indexOf("?");Z=ae===-1?m:m.slice(0,ae+1)+m.slice(ae+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Ae,Pe){return Pe===y?"":Ae}),Z+=(m.indexOf("?")===-1?"?":"&")+y+"="+encodeURIComponent(z)}var ue=h.withCredentials,ie={};ie.Accept="text/event-stream";var te=h.headers;if(te!=null)for(var ve in te)Object.prototype.hasOwnProperty.call(te,ve)&&(ie[ve]=te[ve]);try{se=We.open(me,qr,Kr,Cn,Z,ue,ie)}catch(Ae){throw Gt(),Ae}};h.url=m,h.readyState=de,h.withCredentials=p,h.headers=w,h._close=Gt,Ye()}fe.prototype=Object.create(Ce.prototype),fe.prototype.CONNECTING=de,fe.prototype.OPEN=xe,fe.prototype.CLOSED=v,fe.prototype.close=function(){this._close()},fe.CONNECTING=de,fe.OPEN=xe,fe.CLOSED=v,fe.prototype.withCredentials=void 0;var Tn=l;o!=null&&(l==null||!("withCredentials"in l.prototype))&&(Tn=fe),function(h){{var m=h(t);m!==void 0&&(e.exports=m)}}(function(h){h.EventSourcePolyfill=fe,h.NativeEventSource=l,h.EventSource=Tn})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:Fi:globalThis)})(mn,mn.exports);var Ns=mn.exports;const zr=e=>window.postMessage(e,window.location.href),_s=(e,t)=>{zr({type:"TournamentsTabTotalUpdate",state:e,total:t})},Kt=(e,t)=>{zr({type:"TournamentsTabLocaleTextUpdate",state:e,text:t})},Ps=e=>n=>{Object.keys(e).map(r=>{if(n.data&&n.data.type==r){const i=n.data,{type:o}=i,s=Qt(i,["type"]);e[r](s)}})},Ds=e=>{const t=Ps(e);An(()=>(window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}))},Ls=(e,t=null)=>{let n={accept:"text/event-stream"};return t&&(n["X-SessionID"]=t),new Ns.EventSourcePolyfill(e,{headers:n})},Ms=(e,t,n)=>{e&&(e.removeEventListener("message",n),e.close());let r=t;return typeof r!="undefined"&&r.addEventListener("message",n),r},ks=e=>n=>{let r=n.data;if(r)try{let i=JSON.parse(r);if(!i)return;Object.keys(e).map(o=>{if(i.messageType==o){const s=i,{messageType:a}=s,l=Qt(s,["messageType"]);console.log(a,l),e[o](l)}})}catch(i){console.error(i)}};if(typeof window!="undefined"){let e=function(t){return function(...n){try{return t.apply(this,n)}catch(r){if(r instanceof DOMException&&r.message.includes("has already been used with this registry")||r.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw r}}};customElements.define=e(customElements.define),Promise.resolve().then(()=>require("./CasinoTournamentsTab-BinV9Em4.cjs")).then(({default:t})=>{!customElements.get("casino-tournaments-tab")&&customElements.define("casino-tournaments-tab",t.element)})}function Us(e){vn(e,"svelte-1l19mel",'*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CloseButton{position:absolute;right:1.5625vw;font-size:3.4375vw;color:#FFFFFF;cursor:pointer}.NoContent{padding:120px}.Root{background:#282828}.Root .top-wrapper{padding:1.875vw;display:flex;background:#333333}.Root .top-wrapper .svg{width:10.9375vw;height:10.9375vw}.Root .top-wrapper .text{color:white;font-size:5vw;padding-left:3.125vw;font-weight:bold;line-height:5.9375vw;padding-top:2.1875vw}.Root section{padding:0 3.75vw}table{width:100%;border-collapse:collapse;font-size:3.75vw;line-height:4.375vw;@import url("https://rsms.me/inter/inter.css");}table div{font:initial;font-family:"Inter", sans-serif}@supports (font-variation-settings: normal){table div{font:initial;font-family:"Inter var", sans-serif}}table thead{background:#1C1C1C;color:#F7F7F7}table th,table td{padding:2.5vw 1.5625vw;overflow-wrap:break-word}table td{color:#B5B5B5}.Title{color:#FF8364;text-decoration-line:underline;word-break:break-word}.Title:active{opacity:0.6}.Prize .Rank:active{color:#FFD700}.Loading{display:flex;justify-content:center;padding:9.375vw}')}function er(e,t,n){const r=e.slice();return r[33]=t[n],r[35]=n,r}function tr(e,t,n){const r=e.slice();return r[36]=t[n],r}function nr(e,t,n){const r=e.slice();return r[33]=t[n],r}function Fs(e){let t;return{c(){t=Me("image"),x(t,"id","image0_2606_356"),x(t,"width","512"),x(t,"height","512"),lr(t,"xlink:href",e[7])},m(n,r){W(n,t,r)},p:K,d(n){n&&X(t)}}}function Gs(e){let t,n,r;function i(a,l){return a[5]?zs:Qs}let o=i(e),s=o(e);return{c(){t=G("section"),n=G("casino-tournaments-tab"),r=pe(),s.c(),pt(n,"tabs",e[1]),pt(n,"tab",e[0])},m(a,l){W(a,t,l),M(t,n),M(t,r),s.m(t,null)},p(a,l){l[0]&2&&pt(n,"tabs",a[1]),l[0]&1&&pt(n,"tab",a[0]),o===(o=i(a))&&s?s.p(a,l):(s.d(1),s=o(a),s&&(s.c(),s.m(t,null)))},d(a){a&&X(t),s.d()}}}function js(e){let t;return{c(){t=G("div"),t.innerHTML="<casino-tournaments-limited-controller-loader></casino-tournaments-limited-controller-loader>",x(t,"class","Loading")},m(n,r){W(n,t,r)},p:K,d(n){n&&X(t)}}}function Qs(e){let t;return{c(){t=G("div"),x(t,"class","NoContent")},m(n,r){W(n,t,r)},p:K,d(n){n&&X(t)}}}function zs(e){let t,n,r,i,o=He([e[6]("name"),e[6]("rank"),e[6]("enddate"),e[6]("prize")]),s=[];for(let u=0;u<4;u+=1)s[u]=rr(nr(e,o,u));let a=He(e[5]),l=[];for(let u=0;u<a.length;u+=1)l[u]=sr(er(e,a,u));return{c(){t=G("table"),n=G("thead"),r=G("tr");for(let u=0;u<4;u+=1)s[u].c();i=pe();for(let u=0;u<l.length;u+=1)l[u].c()},m(u,c){W(u,t,c),M(t,n),M(n,r);for(let f=0;f<4;f+=1)s[f]&&s[f].m(r,null);M(t,i);for(let f=0;f<l.length;f+=1)l[f]&&l[f].m(t,null)},p(u,c){if(c[0]&64){o=He([u[6]("name"),u[6]("rank"),u[6]("enddate"),u[6]("prize")]);let f;for(f=0;f<4;f+=1){const d=nr(u,o,f);s[f]?s[f].p(d,c):(s[f]=rr(d),s[f].c(),s[f].m(r,null))}for(;f<4;f+=1)s[f].d(1)}if(c[0]&32){a=He(u[5]);let f;for(f=0;f<a.length;f+=1){const d=er(u,a,f);l[f]?l[f].p(d,c):(l[f]=sr(d),l[f].c(),l[f].m(t,null))}for(;f<l.length;f+=1)l[f].d(1);l.length=a.length}},d(u){u&&X(t),It(s,u),It(l,u)}}}function rr(e){let t,n=e[33]+"",r;return{c(){t=G("th"),r=Be(n)},m(i,o){W(i,t,o),M(t,r)},p(i,o){o[0]&64&&n!==(n=i[33]+"")&&Re(r,n)},d(i){i&&X(t)}}}function ir(e){let t,n=e[33].title+"",r,i,o,s=(e[33].rank||" -")+"",a,l,u,c,f,d=(e[33].prize||" -")+"",E,T,I;function U(){return e[20](e[33])}let V=He(Nn(e[33].enddate)),S=[];for(let A=0;A<V.length;A+=1)S[A]=or(tr(e,V,A));return{c(){t=G("td"),r=Be(n),i=pe(),o=G("td"),a=Be(s),l=pe(),u=G("td");for(let A=0;A<S.length;A+=1)S[A].c();c=pe(),f=G("td"),E=Be(d),x(t,"class","Title"),x(t,"part","Title"),x(o,"class","Rank"),gt(o,"active",e[33].prize),x(u,"class","EndDate"),x(u,"part","EndDate"),x(u,"nowrap",""),x(f,"class","Prize"),gt(f,"active",e[33].prize)},m(A,B){W(A,t,B),M(t,r),W(A,i,B),W(A,o,B),M(o,a),W(A,l,B),W(A,u,B);for(let N=0;N<S.length;N+=1)S[N]&&S[N].m(u,null);W(A,c,B),W(A,f,B),M(f,E),T||(I=$e(t,"click",U),T=!0)},p(A,B){if(e=A,B[0]&32&&n!==(n=e[33].title+"")&&Re(r,n),B[0]&32&&s!==(s=(e[33].rank||" -")+"")&&Re(a,s),B[0]&32&&gt(o,"active",e[33].prize),B[0]&32){V=He(Nn(e[33].enddate));let N;for(N=0;N<V.length;N+=1){const Y=tr(e,V,N);S[N]?S[N].p(Y,B):(S[N]=or(Y),S[N].c(),S[N].m(u,null))}for(;N<S.length;N+=1)S[N].d(1);S.length=V.length}B[0]&32&&d!==(d=(e[33].prize||" -")+"")&&Re(E,d),B[0]&32&&gt(f,"active",e[33].prize)},d(A){A&&(X(t),X(i),X(o),X(l),X(u),X(c),X(f)),It(S,A),T=!1,I()}}}function or(e){let t,n=e[36]+"",r;return{c(){t=G("p"),r=Be(n)},m(i,o){W(i,t,o),M(t,r)},p(i,o){o[0]&32&&n!==(n=i[36]+"")&&Re(r,n)},d(i){i&&X(t)}}}function sr(e){let t,n,r,i=e[33]&&ir(e);return{c(){t=G("tbody"),n=G("tr"),i&&i.c(),r=pe()},m(o,s){W(o,t,s),M(t,n),i&&i.m(n,null),M(t,r)},p(o,s){o[33]?i?i.p(o,s):(i=ir(o),i.c(),i.m(n,null)):i&&(i.d(1),i=null)},d(o){o&&X(t),i&&i.d()}}}function Js(e){let t,n,r,i,o,s,a,l,u,c,f,d,E=e[6]("myTournaments")+"",T,I,U,V,S,A,B=e[7]&&Fs(e);function N(Q,$){return Q[4]?js:Gs}let Y=N(e),F=Y(e);return{c(){t=G("div"),n=G("div"),r=G("div"),i=Me("svg"),o=Me("rect"),s=Me("defs"),a=Me("pattern"),l=Me("use"),B&&B.c(),f=pe(),d=G("div"),T=Be(E),I=pe(),U=G("div"),U.textContent="X",V=pe(),F.c(),x(o,"width",e[3]),x(o,"height",e[3]),x(o,"fill","url(#pattern0)"),lr(l,"xlink:href","#image0_2606_356"),x(l,"transform","scale(0.00195312)"),x(a,"id","pattern0"),x(a,"patternContentUnits","objectBoundingBox"),x(a,"width","1"),x(a,"height","1"),x(i,"width",e[3]),x(i,"height",e[3]),x(i,"viewBox",u=`0 0 ${e[3]} ${e[3]}`),x(i,"fill","none"),x(i,"xmlns","http://www.w3.org/2000/svg"),x(i,"xmlns:xlink","http://www.w3.org/1999/xlink"),x(r,"class","svg"),Tt(()=>e[18].call(r)),x(d,"class","text"),x(U,"class","CloseButton"),x(U,"part","CloseButton"),x(n,"class","top-wrapper"),x(t,"class","Root"),x(t,"part","Root")},m(Q,$){W(Q,t,$),M(t,n),M(n,r),M(r,i),M(i,o),M(i,s),M(s,a),M(a,l),B&&B.m(s,null),c=ui(r,e[18].bind(r)),M(n,f),M(n,d),M(d,T),M(n,I),M(n,U),M(t,V),F.m(t,null),e[21](t),S||(A=$e(U,"click",e[19]),S=!0)},p(Q,$){$[0]&8&&x(o,"width",Q[3]),$[0]&8&&x(o,"height",Q[3]),Q[7]&&B.p(Q,$),$[0]&8&&x(i,"width",Q[3]),$[0]&8&&x(i,"height",Q[3]),$[0]&8&&u!==(u=`0 0 ${Q[3]} ${Q[3]}`)&&x(i,"viewBox",u),$[0]&64&&E!==(E=Q[6]("myTournaments")+"")&&Re(T,E),Y===(Y=N(Q))&&F?F.p(Q,$):(F.d(1),F=Y(Q),F&&(F.c(),F.m(t,null)))},i:K,o:K,d(Q){Q&&X(t),B&&B.d(),c(),F.d(),e[21](null),S=!1,A()}}}function Xs(e,t,n){let r,i,o,s,a;ri(e,Ts,v=>n(6,a=v));let{endpoint:l=""}=t,{lang:u="en"}=t,{session:c=""}=t,{state:f=void 0}=t,{states:d="Scheduled,Ongoing,Finished"}=t,{filter:E=""}=t,{clientstyling:T=""}=t,{clientstylingurl:I=""}=t,{translationurl:U=""}=t;Qr({withLocale:"en",translations:{}});const V=()=>{fetch(U).then(D=>D.json()).then(D=>{Object.keys(D).forEach(_=>{pn(_,D[_])}),we()}).catch(D=>{console.log(D)})};Object.keys(Ht).forEach(v=>{pn(v,Ht[v])});let S,A,B=0,N=yi,Y=!0,F={};const Q=v=>{let D={};i.map(_=>{D[_]||(D[_]=[])}),v.items.map(_=>{const{id:ee,nameOrTitle:at,endTime:Lt}=_.tournament,Mt={id:ee,title:at,rank:_.leaderBoard&&`#${_.leaderBoard.rank}/${_.endRank}`,enddate:Lt,prize:_.leaderBoard&&_.leaderBoard.prizeName};D[$n(_.tournament.state)].push(Mt)}),n(15,F=D)},$=ks({PlayerLeaderBoardsUpdate:v=>{Q(v),o.map(D=>{_s(D,F[D].length)})},TournamentUpdate:v=>{if(v.item){const D=v.item;let _=$n(D.state);n(15,F=ct(ft({},F),{[_]:F[_].map(ee=>ee.id===D.id?ct(ft({},ee),{title:D.nameOrTitle,enddate:D.endTime}):ee)}))}}}),Ce=(v,D)=>dt(this,null,function*(){const _=`${l}/v1/tournaments`,ee=new URL(_);ee.searchParams.append("pagination",`offset=${v},limit=${D}`),ee.searchParams.append("sortField","StartTime"),ee.searchParams.append("sortOrder","desc"),ee.searchParams.append("language",u),ee.searchParams.append("XSessionId",c),E&&ee.searchParams.append("filter",E),A=Ms(A,Ls(`${_}/leaderboard/player/updates?${ee.searchParams.toString()}`),$)});Os();const it=()=>{Ce(0,30),Rs(u),we()},ye=()=>{let v=document.createElement("style");v.innerHTML=T,S.appendChild(v)},ot=()=>{let v=new URL(I),D=document.createElement("style");fetch(v.href).then(_=>_.text()).then(_=>{D.innerHTML=_,setTimeout(()=>{S.appendChild(D)},1),setTimeout(()=>{},500)})},we=()=>{setTimeout(()=>{const v=D=>a(`${D}`);Kt("Scheduled",v("scheduled")),Kt("Ongoing",v("ongoing")),Kt("Finished",`${v("finished")} (${v("last")} 48h)`)},1)};An(()=>()=>{A&&A.removeEventListener("message",$)}),Ds({TournamentsTabSwitch:v=>dt(this,null,function*(){return n(16,r=v.tab)})});function st(){B=this.clientWidth,n(3,B)}const Ze=()=>window.postMessage({type:"OnCloseThumbnail"},window.location.href),de=v=>{window.postMessage({type:"MyTournamentFromNavClicked",tournamentId:v.id,showLeaderboard:!0},window.location.href)};function xe(v){Bt[v?"unshift":"push"](()=>{S=v,n(2,S)})}return e.$$set=v=>{"endpoint"in v&&n(8,l=v.endpoint),"lang"in v&&n(9,u=v.lang),"session"in v&&n(10,c=v.session),"state"in v&&n(0,f=v.state),"states"in v&&n(1,d=v.states),"filter"in v&&n(11,E=v.filter),"clientstyling"in v&&n(12,T=v.clientstyling),"clientstylingurl"in v&&n(13,I=v.clientstylingurl),"translationurl"in v&&n(14,U=v.translationurl)},e.$$.update=()=>{e.$$.dirty[0]&1&&n(16,r=f),e.$$.dirty[0]&2&&n(17,i=d.split(",")),e.$$.dirty[0]&131072&&(o=i.filter(v=>v!=="Finished")),e.$$.dirty[0]&98304&&n(5,s=F[r]),e.$$.dirty[0]&3840&&l&&E&&u&&c&&it(),e.$$.dirty[0]&4100&&T&&S&&ye(),e.$$.dirty[0]&8196&&I&&S&&ot(),e.$$.dirty[0]&16384&&U&&V(),e.$$.dirty[0]&512&&u&&we(),e.$$.dirty[0]&32768&&Object.keys(F).length&&(n(4,Y=!1),we())},[f,d,S,B,Y,s,a,N,l,u,c,E,T,I,U,F,r,i,st,Ze,de,xe]}class Jr extends yn{constructor(t){super(),bn(this,t,Xs,Js,Rt,{endpoint:8,lang:9,session:10,state:0,states:1,filter:11,clientstyling:12,clientstylingurl:13,translationurl:14},Us,[-1,-1])}get endpoint(){return this.$$.ctx[8]}set endpoint(t){this.$$set({endpoint:t}),he()}get lang(){return this.$$.ctx[9]}set lang(t){this.$$set({lang:t}),he()}get session(){return this.$$.ctx[10]}set session(t){this.$$set({session:t}),he()}get state(){return this.$$.ctx[0]}set state(t){this.$$set({state:t}),he()}get states(){return this.$$.ctx[1]}set states(t){this.$$set({states:t}),he()}get filter(){return this.$$.ctx[11]}set filter(t){this.$$set({filter:t}),he()}get clientstyling(){return this.$$.ctx[12]}set clientstyling(t){this.$$set({clientstyling:t}),he()}get clientstylingurl(){return this.$$.ctx[13]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),he()}get translationurl(){return this.$$.ctx[14]}set translationurl(t){this.$$set({translationurl:t}),he()}}En(Jr,{endpoint:{},lang:{},session:{},state:{},states:{},filter:{},clientstyling:{},clientstylingurl:{},translationurl:{}},[],[],!0);const Vs=Object.freeze(Object.defineProperty({__proto__:null,default:Jr},Symbol.toStringTag,{value:"Module"}));exports.CasinoTournamentsLimitedController_ce=Vs;exports.SvelteComponent=yn;exports.append=M;exports.append_styles=vn;exports.attr=x;exports.binding_callbacks=Bt;exports.create_custom_element=En;exports.destroy_each=It;exports.detach=X;exports.element=G;exports.ensure_array_like=He;exports.flush=he;exports.init=bn;exports.insert=W;exports.listen=$e;exports.noop=K;exports.onMount=An;exports.safe_not_equal=Rt;exports.set_data=Re;exports.space=pe;exports.text=Be;
13
+ `,_e+=Ae):ve==="id"?ut=Ae:ve==="event"?ge=Ae:ve==="retry"?(b=kt(Ae,b),R=b):ve==="heartbeatTimeout"&&(C=kt(Ae,C),ne!==0&&(i(ne),ne=r(function(){Ye()},C)))}if(re===_){if(_e!==""){z=ut,ge===""&&(ge="message");var Pe=new ot(ge,{data:_e.slice(1),lastEventId:ut});if(h.dispatchEvent(Pe),ge==="open"?Ne(h,h.onopen,Pe):ge==="message"?Ne(h,h.onmessage,Pe):ge==="error"&&Ne(h,h.onerror,Pe),ce===v)return}_e="",ge=""}re=ue===13?D:_}else re===_&&(Ft=te,re=ee),re===ee?ue===58&&(Se=te+1,re=at):re===at&&(re=Lt)}}},Cn=function(q){if(ce===xe||ce===de){ce=Ze,ne!==0&&(i(ne),ne=0),ne=r(function(){Ye()},R),R=Ut(Math.min(b*16,R*2)),h.readyState=de;var Z=new st("error",{error:q});h.dispatchEvent(Z),Ne(h,h.onerror,Z),q!=null&&console.error(q)}},Gt=function(){ce=v,se!=null&&(se.abort(),se=void 0),ne!==0&&(i(ne),ne=0),h.readyState=v},Ye=function(){if(ne=0,ce!==Ze){if(!L&&se!=null)Cn(new Error("No activity within "+C+" milliseconds. "+(ce===de?"No response received.":k+" chars received.")+" Reconnecting.")),se!=null&&(se.abort(),se=void 0);else{var q=Math.max((L||Date.now())+C-Date.now(),1);L=!1,ne=r(function(){Ye()},q)}return}L=!1,k=0,ne=r(function(){Ye()},C),ce=de,_e="",ge="",ut=z,lt="",Ft=0,Se=0,re=_;var Z=m;if(m.slice(0,5)!=="data:"&&m.slice(0,5)!=="blob:"&&z!==""){var ae=m.indexOf("?");Z=ae===-1?m:m.slice(0,ae+1)+m.slice(ae+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Ae,Pe){return Pe===y?"":Ae}),Z+=(m.indexOf("?")===-1?"?":"&")+y+"="+encodeURIComponent(z)}var ue=h.withCredentials,ie={};ie.Accept="text/event-stream";var te=h.headers;if(te!=null)for(var ve in te)Object.prototype.hasOwnProperty.call(te,ve)&&(ie[ve]=te[ve]);try{se=We.open(me,qr,Kr,Cn,Z,ue,ie)}catch(Ae){throw Gt(),Ae}};h.url=m,h.readyState=de,h.withCredentials=p,h.headers=w,h._close=Gt,Ye()}fe.prototype=Object.create(Ce.prototype),fe.prototype.CONNECTING=de,fe.prototype.OPEN=xe,fe.prototype.CLOSED=v,fe.prototype.close=function(){this._close()},fe.CONNECTING=de,fe.OPEN=xe,fe.CLOSED=v,fe.prototype.withCredentials=void 0;var Tn=l;o!=null&&(l==null||!("withCredentials"in l.prototype))&&(Tn=fe),function(h){{var m=h(t);m!==void 0&&(e.exports=m)}}(function(h){h.EventSourcePolyfill=fe,h.NativeEventSource=l,h.EventSource=Tn})})(typeof globalThis=="undefined"?typeof window!="undefined"?window:typeof self!="undefined"?self:Fi:globalThis)})(mn,mn.exports);var Ns=mn.exports;const zr=e=>window.postMessage(e,window.location.href),_s=(e,t)=>{zr({type:"TournamentsTabTotalUpdate",state:e,total:t})},Kt=(e,t)=>{zr({type:"TournamentsTabLocaleTextUpdate",state:e,text:t})},Ps=e=>n=>{Object.keys(e).map(r=>{if(n.data&&n.data.type==r){const i=n.data,{type:o}=i,s=Qt(i,["type"]);e[r](s)}})},Ds=e=>{const t=Ps(e);An(()=>(window.addEventListener("message",t),()=>{window.removeEventListener("message",t)}))},Ls=(e,t=null)=>{let n={accept:"text/event-stream"};return t&&(n["X-SessionID"]=t),new Ns.EventSourcePolyfill(e,{headers:n})},Ms=(e,t,n)=>{e&&(e.removeEventListener("message",n),e.close());let r=t;return typeof r!="undefined"&&r.addEventListener("message",n),r},ks=e=>n=>{let r=n.data;if(r)try{let i=JSON.parse(r);if(!i)return;Object.keys(e).map(o=>{if(i.messageType==o){const s=i,{messageType:a}=s,l=Qt(s,["messageType"]);console.log(a,l),e[o](l)}})}catch(i){console.error(i)}};if(typeof window!="undefined"){let e=function(t){return function(...n){try{return t.apply(this,n)}catch(r){if(r instanceof DOMException&&r.message.includes("has already been used with this registry")||r.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw r}}};customElements.define=e(customElements.define),Promise.resolve().then(()=>require("./CasinoTournamentsTab-CnjGKPY3.cjs")).then(({default:t})=>{!customElements.get("casino-tournaments-tab")&&customElements.define("casino-tournaments-tab",t.element)})}function Us(e){vn(e,"svelte-1l19mel",'*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CloseButton{position:absolute;right:1.5625vw;font-size:3.4375vw;color:#FFFFFF;cursor:pointer}.NoContent{padding:120px}.Root{background:#282828}.Root .top-wrapper{padding:1.875vw;display:flex;background:#333333}.Root .top-wrapper .svg{width:10.9375vw;height:10.9375vw}.Root .top-wrapper .text{color:white;font-size:5vw;padding-left:3.125vw;font-weight:bold;line-height:5.9375vw;padding-top:2.1875vw}.Root section{padding:0 3.75vw}table{width:100%;border-collapse:collapse;font-size:3.75vw;line-height:4.375vw;@import url("https://rsms.me/inter/inter.css");}table div{font:initial;font-family:"Inter", sans-serif}@supports (font-variation-settings: normal){table div{font:initial;font-family:"Inter var", sans-serif}}table thead{background:#1C1C1C;color:#F7F7F7}table th,table td{padding:2.5vw 1.5625vw;overflow-wrap:break-word}table td{color:#B5B5B5}.Title{color:#FF8364;text-decoration-line:underline;word-break:break-word}.Title:active{opacity:0.6}.Prize .Rank:active{color:#FFD700}.Loading{display:flex;justify-content:center;padding:9.375vw}')}function er(e,t,n){const r=e.slice();return r[33]=t[n],r[35]=n,r}function tr(e,t,n){const r=e.slice();return r[36]=t[n],r}function nr(e,t,n){const r=e.slice();return r[33]=t[n],r}function Fs(e){let t;return{c(){t=Me("image"),x(t,"id","image0_2606_356"),x(t,"width","512"),x(t,"height","512"),lr(t,"xlink:href",e[7])},m(n,r){W(n,t,r)},p:K,d(n){n&&X(t)}}}function Gs(e){let t,n,r;function i(a,l){return a[5]?zs:Qs}let o=i(e),s=o(e);return{c(){t=G("section"),n=G("casino-tournaments-tab"),r=pe(),s.c(),pt(n,"tabs",e[1]),pt(n,"tab",e[0])},m(a,l){W(a,t,l),M(t,n),M(t,r),s.m(t,null)},p(a,l){l[0]&2&&pt(n,"tabs",a[1]),l[0]&1&&pt(n,"tab",a[0]),o===(o=i(a))&&s?s.p(a,l):(s.d(1),s=o(a),s&&(s.c(),s.m(t,null)))},d(a){a&&X(t),s.d()}}}function js(e){let t;return{c(){t=G("div"),t.innerHTML="<casino-tournaments-limited-controller-loader></casino-tournaments-limited-controller-loader>",x(t,"class","Loading")},m(n,r){W(n,t,r)},p:K,d(n){n&&X(t)}}}function Qs(e){let t;return{c(){t=G("div"),x(t,"class","NoContent")},m(n,r){W(n,t,r)},p:K,d(n){n&&X(t)}}}function zs(e){let t,n,r,i,o=He([e[6]("name"),e[6]("rank"),e[6]("enddate"),e[6]("prize")]),s=[];for(let u=0;u<4;u+=1)s[u]=rr(nr(e,o,u));let a=He(e[5]),l=[];for(let u=0;u<a.length;u+=1)l[u]=sr(er(e,a,u));return{c(){t=G("table"),n=G("thead"),r=G("tr");for(let u=0;u<4;u+=1)s[u].c();i=pe();for(let u=0;u<l.length;u+=1)l[u].c()},m(u,c){W(u,t,c),M(t,n),M(n,r);for(let f=0;f<4;f+=1)s[f]&&s[f].m(r,null);M(t,i);for(let f=0;f<l.length;f+=1)l[f]&&l[f].m(t,null)},p(u,c){if(c[0]&64){o=He([u[6]("name"),u[6]("rank"),u[6]("enddate"),u[6]("prize")]);let f;for(f=0;f<4;f+=1){const d=nr(u,o,f);s[f]?s[f].p(d,c):(s[f]=rr(d),s[f].c(),s[f].m(r,null))}for(;f<4;f+=1)s[f].d(1)}if(c[0]&32){a=He(u[5]);let f;for(f=0;f<a.length;f+=1){const d=er(u,a,f);l[f]?l[f].p(d,c):(l[f]=sr(d),l[f].c(),l[f].m(t,null))}for(;f<l.length;f+=1)l[f].d(1);l.length=a.length}},d(u){u&&X(t),It(s,u),It(l,u)}}}function rr(e){let t,n=e[33]+"",r;return{c(){t=G("th"),r=Be(n)},m(i,o){W(i,t,o),M(t,r)},p(i,o){o[0]&64&&n!==(n=i[33]+"")&&Re(r,n)},d(i){i&&X(t)}}}function ir(e){let t,n=e[33].title+"",r,i,o,s=(e[33].rank||" -")+"",a,l,u,c,f,d=(e[33].prize||" -")+"",E,T,I;function U(){return e[20](e[33])}let V=He(Nn(e[33].enddate)),S=[];for(let A=0;A<V.length;A+=1)S[A]=or(tr(e,V,A));return{c(){t=G("td"),r=Be(n),i=pe(),o=G("td"),a=Be(s),l=pe(),u=G("td");for(let A=0;A<S.length;A+=1)S[A].c();c=pe(),f=G("td"),E=Be(d),x(t,"class","Title"),x(t,"part","Title"),x(o,"class","Rank"),gt(o,"active",e[33].prize),x(u,"class","EndDate"),x(u,"part","EndDate"),x(u,"nowrap",""),x(f,"class","Prize"),gt(f,"active",e[33].prize)},m(A,B){W(A,t,B),M(t,r),W(A,i,B),W(A,o,B),M(o,a),W(A,l,B),W(A,u,B);for(let N=0;N<S.length;N+=1)S[N]&&S[N].m(u,null);W(A,c,B),W(A,f,B),M(f,E),T||(I=$e(t,"click",U),T=!0)},p(A,B){if(e=A,B[0]&32&&n!==(n=e[33].title+"")&&Re(r,n),B[0]&32&&s!==(s=(e[33].rank||" -")+"")&&Re(a,s),B[0]&32&&gt(o,"active",e[33].prize),B[0]&32){V=He(Nn(e[33].enddate));let N;for(N=0;N<V.length;N+=1){const Y=tr(e,V,N);S[N]?S[N].p(Y,B):(S[N]=or(Y),S[N].c(),S[N].m(u,null))}for(;N<S.length;N+=1)S[N].d(1);S.length=V.length}B[0]&32&&d!==(d=(e[33].prize||" -")+"")&&Re(E,d),B[0]&32&&gt(f,"active",e[33].prize)},d(A){A&&(X(t),X(i),X(o),X(l),X(u),X(c),X(f)),It(S,A),T=!1,I()}}}function or(e){let t,n=e[36]+"",r;return{c(){t=G("p"),r=Be(n)},m(i,o){W(i,t,o),M(t,r)},p(i,o){o[0]&32&&n!==(n=i[36]+"")&&Re(r,n)},d(i){i&&X(t)}}}function sr(e){let t,n,r,i=e[33]&&ir(e);return{c(){t=G("tbody"),n=G("tr"),i&&i.c(),r=pe()},m(o,s){W(o,t,s),M(t,n),i&&i.m(n,null),M(t,r)},p(o,s){o[33]?i?i.p(o,s):(i=ir(o),i.c(),i.m(n,null)):i&&(i.d(1),i=null)},d(o){o&&X(t),i&&i.d()}}}function Js(e){let t,n,r,i,o,s,a,l,u,c,f,d,E=e[6]("myTournaments")+"",T,I,U,V,S,A,B=e[7]&&Fs(e);function N(Q,$){return Q[4]?js:Gs}let Y=N(e),F=Y(e);return{c(){t=G("div"),n=G("div"),r=G("div"),i=Me("svg"),o=Me("rect"),s=Me("defs"),a=Me("pattern"),l=Me("use"),B&&B.c(),f=pe(),d=G("div"),T=Be(E),I=pe(),U=G("div"),U.textContent="X",V=pe(),F.c(),x(o,"width",e[3]),x(o,"height",e[3]),x(o,"fill","url(#pattern0)"),lr(l,"xlink:href","#image0_2606_356"),x(l,"transform","scale(0.00195312)"),x(a,"id","pattern0"),x(a,"patternContentUnits","objectBoundingBox"),x(a,"width","1"),x(a,"height","1"),x(i,"width",e[3]),x(i,"height",e[3]),x(i,"viewBox",u=`0 0 ${e[3]} ${e[3]}`),x(i,"fill","none"),x(i,"xmlns","http://www.w3.org/2000/svg"),x(i,"xmlns:xlink","http://www.w3.org/1999/xlink"),x(r,"class","svg"),Tt(()=>e[18].call(r)),x(d,"class","text"),x(U,"class","CloseButton"),x(U,"part","CloseButton"),x(n,"class","top-wrapper"),x(t,"class","Root"),x(t,"part","Root")},m(Q,$){W(Q,t,$),M(t,n),M(n,r),M(r,i),M(i,o),M(i,s),M(s,a),M(a,l),B&&B.m(s,null),c=ui(r,e[18].bind(r)),M(n,f),M(n,d),M(d,T),M(n,I),M(n,U),M(t,V),F.m(t,null),e[21](t),S||(A=$e(U,"click",e[19]),S=!0)},p(Q,$){$[0]&8&&x(o,"width",Q[3]),$[0]&8&&x(o,"height",Q[3]),Q[7]&&B.p(Q,$),$[0]&8&&x(i,"width",Q[3]),$[0]&8&&x(i,"height",Q[3]),$[0]&8&&u!==(u=`0 0 ${Q[3]} ${Q[3]}`)&&x(i,"viewBox",u),$[0]&64&&E!==(E=Q[6]("myTournaments")+"")&&Re(T,E),Y===(Y=N(Q))&&F?F.p(Q,$):(F.d(1),F=Y(Q),F&&(F.c(),F.m(t,null)))},i:K,o:K,d(Q){Q&&X(t),B&&B.d(),c(),F.d(),e[21](null),S=!1,A()}}}function Xs(e,t,n){let r,i,o,s,a;ri(e,Ts,v=>n(6,a=v));let{endpoint:l=""}=t,{lang:u="en"}=t,{session:c=""}=t,{state:f=void 0}=t,{states:d="Scheduled,Ongoing,Finished"}=t,{filter:E=""}=t,{clientstyling:T=""}=t,{clientstylingurl:I=""}=t,{translationurl:U=""}=t;Qr({withLocale:"en",translations:{}});const V=()=>{fetch(U).then(D=>D.json()).then(D=>{Object.keys(D).forEach(_=>{pn(_,D[_])}),we()}).catch(D=>{console.log(D)})};Object.keys(Ht).forEach(v=>{pn(v,Ht[v])});let S,A,B=0,N=yi,Y=!0,F={};const Q=v=>{let D={};i.map(_=>{D[_]||(D[_]=[])}),v.items.map(_=>{const{id:ee,nameOrTitle:at,endTime:Lt}=_.tournament,Mt={id:ee,title:at,rank:_.leaderBoard&&`#${_.leaderBoard.rank}/${_.endRank}`,enddate:Lt,prize:_.leaderBoard&&_.leaderBoard.prizeName};D[$n(_.tournament.state)].push(Mt)}),n(15,F=D)},$=ks({PlayerLeaderBoardsUpdate:v=>{Q(v),o.map(D=>{_s(D,F[D].length)})},TournamentUpdate:v=>{if(v.item){const D=v.item;let _=$n(D.state);n(15,F=ct(ft({},F),{[_]:F[_].map(ee=>ee.id===D.id?ct(ft({},ee),{title:D.nameOrTitle,enddate:D.endTime}):ee)}))}}}),Ce=(v,D)=>dt(this,null,function*(){const _=`${l}/v1/tournaments`,ee=new URL(_);ee.searchParams.append("pagination",`offset=${v},limit=${D}`),ee.searchParams.append("sortField","StartTime"),ee.searchParams.append("sortOrder","desc"),ee.searchParams.append("language",u),ee.searchParams.append("XSessionId",c),E&&ee.searchParams.append("filter",E),A=Ms(A,Ls(`${_}/leaderboard/player/updates?${ee.searchParams.toString()}`),$)});Os();const it=()=>{Ce(0,30),Rs(u),we()},ye=()=>{let v=document.createElement("style");v.innerHTML=T,S.appendChild(v)},ot=()=>{let v=new URL(I),D=document.createElement("style");fetch(v.href).then(_=>_.text()).then(_=>{D.innerHTML=_,setTimeout(()=>{S.appendChild(D)},1),setTimeout(()=>{},500)})},we=()=>{setTimeout(()=>{const v=D=>a(`${D}`);Kt("Scheduled",v("scheduled")),Kt("Ongoing",v("ongoing")),Kt("Finished",`${v("finished")} (${v("last")} 48h)`)},1)};An(()=>()=>{A&&A.removeEventListener("message",$)}),Ds({TournamentsTabSwitch:v=>dt(this,null,function*(){return n(16,r=v.tab)})});function st(){B=this.clientWidth,n(3,B)}const Ze=()=>window.postMessage({type:"OnCloseThumbnail"},window.location.href),de=v=>{window.postMessage({type:"MyTournamentFromNavClicked",tournamentId:v.id,showLeaderboard:!0},window.location.href)};function xe(v){Bt[v?"unshift":"push"](()=>{S=v,n(2,S)})}return e.$$set=v=>{"endpoint"in v&&n(8,l=v.endpoint),"lang"in v&&n(9,u=v.lang),"session"in v&&n(10,c=v.session),"state"in v&&n(0,f=v.state),"states"in v&&n(1,d=v.states),"filter"in v&&n(11,E=v.filter),"clientstyling"in v&&n(12,T=v.clientstyling),"clientstylingurl"in v&&n(13,I=v.clientstylingurl),"translationurl"in v&&n(14,U=v.translationurl)},e.$$.update=()=>{e.$$.dirty[0]&1&&n(16,r=f),e.$$.dirty[0]&2&&n(17,i=d.split(",")),e.$$.dirty[0]&131072&&(o=i.filter(v=>v!=="Finished")),e.$$.dirty[0]&98304&&n(5,s=F[r]),e.$$.dirty[0]&3840&&l&&E&&u&&c&&it(),e.$$.dirty[0]&4100&&T&&S&&ye(),e.$$.dirty[0]&8196&&I&&S&&ot(),e.$$.dirty[0]&16384&&U&&V(),e.$$.dirty[0]&512&&u&&we(),e.$$.dirty[0]&32768&&Object.keys(F).length&&(n(4,Y=!1),we())},[f,d,S,B,Y,s,a,N,l,u,c,E,T,I,U,F,r,i,st,Ze,de,xe]}class Jr extends yn{constructor(t){super(),bn(this,t,Xs,Js,Rt,{endpoint:8,lang:9,session:10,state:0,states:1,filter:11,clientstyling:12,clientstylingurl:13,translationurl:14},Us,[-1,-1])}get endpoint(){return this.$$.ctx[8]}set endpoint(t){this.$$set({endpoint:t}),he()}get lang(){return this.$$.ctx[9]}set lang(t){this.$$set({lang:t}),he()}get session(){return this.$$.ctx[10]}set session(t){this.$$set({session:t}),he()}get state(){return this.$$.ctx[0]}set state(t){this.$$set({state:t}),he()}get states(){return this.$$.ctx[1]}set states(t){this.$$set({states:t}),he()}get filter(){return this.$$.ctx[11]}set filter(t){this.$$set({filter:t}),he()}get clientstyling(){return this.$$.ctx[12]}set clientstyling(t){this.$$set({clientstyling:t}),he()}get clientstylingurl(){return this.$$.ctx[13]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),he()}get translationurl(){return this.$$.ctx[14]}set translationurl(t){this.$$set({translationurl:t}),he()}}En(Jr,{endpoint:{},lang:{},session:{},state:{},states:{},filter:{},clientstyling:{},clientstylingurl:{},translationurl:{}},[],[],!0);const Vs=Object.freeze(Object.defineProperty({__proto__:null,default:Jr},Symbol.toStringTag,{value:"Module"}));exports.CasinoTournamentsLimitedController_ce=Vs;exports.SvelteComponent=yn;exports.append=M;exports.append_styles=vn;exports.attr=x;exports.binding_callbacks=Bt;exports.create_custom_element=En;exports.destroy_each=It;exports.detach=X;exports.element=G;exports.ensure_array_like=He;exports.flush=he;exports.init=bn;exports.insert=W;exports.listen=$e;exports.noop=K;exports.onMount=An;exports.safe_not_equal=Rt;exports.set_data=Re;exports.space=pe;exports.text=Be;
@@ -4981,7 +4981,7 @@ if (typeof window != "undefined") {
4981
4981
  }
4982
4982
  };
4983
4983
  };
4984
- customElements.define = e(customElements.define), import("./CasinoTournamentsTab-BAbGxx32.js").then(({ default: t }) => {
4984
+ customElements.define = e(customElements.define), import("./CasinoTournamentsTab-BRW0PcZB.js").then(({ default: t }) => {
4985
4985
  !customElements.get("casino-tournaments-tab") && customElements.define("casino-tournaments-tab", t.element);
4986
4986
  });
4987
4987
  }
@@ -5659,17 +5659,17 @@ export {
5659
5659
  Zs as C,
5660
5660
  hr as S,
5661
5661
  ir as a,
5662
- j as b,
5662
+ B as b,
5663
5663
  lr as c,
5664
- B as d,
5665
- Me as e,
5664
+ q as d,
5665
+ j as e,
5666
5666
  ce as f,
5667
- q as g,
5668
- M as h,
5667
+ V as g,
5668
+ Me as h,
5669
5669
  ar as i,
5670
- V as j,
5671
- Yt as k,
5672
- Ae as l,
5670
+ Yt as j,
5671
+ Ae as k,
5672
+ M as l,
5673
5673
  xt as m,
5674
5674
  te as n,
5675
5675
  sr as o,
@@ -0,0 +1,302 @@
1
+ var K = Object.defineProperty, N = Object.defineProperties;
2
+ var P = Object.getOwnPropertyDescriptors;
3
+ var _ = Object.getOwnPropertySymbols;
4
+ var S = Object.prototype.hasOwnProperty, z = Object.prototype.propertyIsEnumerable;
5
+ var M = (e, t, n) => t in e ? K(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, L = (e, t) => {
6
+ for (var n in t || (t = {}))
7
+ S.call(t, n) && M(e, n, t[n]);
8
+ if (_)
9
+ for (var n of _(t))
10
+ z.call(t, n) && M(e, n, t[n]);
11
+ return e;
12
+ }, C = (e, t) => N(e, P(t));
13
+ var E = (e, t) => {
14
+ var n = {};
15
+ for (var i in e)
16
+ S.call(e, i) && t.indexOf(i) < 0 && (n[i] = e[i]);
17
+ if (e != null && _)
18
+ for (var i of _(e))
19
+ t.indexOf(i) < 0 && z.call(e, i) && (n[i] = e[i]);
20
+ return n;
21
+ };
22
+ import { o as O, S as Q, i as V, f as y, c as W, s as X, a as Y, e as m, b as f, d as v, n as H, g as T, h as R, j as Z, t as A, k as U, l as h, m as x, p as B, q as $ } from "./CasinoTournamentsLimitedController-c9NQH-Ue.js";
23
+ const tt = (e) => (n) => {
24
+ Object.keys(e).map((i) => {
25
+ if (n.data && n.data.type == i) {
26
+ const l = n.data, { type: o } = l, s = E(l, ["type"]);
27
+ e[i](s);
28
+ }
29
+ });
30
+ }, et = (e) => {
31
+ const t = tt(e);
32
+ O(() => (window.addEventListener("message", t, !1), () => {
33
+ window.removeEventListener("message", t);
34
+ }));
35
+ };
36
+ function nt(e) {
37
+ Y(e, "svelte-1eq8iwl", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.casino-tournaments-tab{color:#F7F7F7;font:inherit;margin:3.125vw 0 1.25vw 0}.casino-tournaments-tab ul{display:flex;justify-content:space-between;width:100%;font-weight:600;font-size:3.75vw;border-bottom:0.3125vw #424242 solid}.casino-tournaments-tab ul li{position:relative;text-align:center;padding:2.5vw 3.125vw;word-break:break-word;flex:auto;display:block}.casino-tournaments-tab ul li.active{color:#FF8364;border-bottom:0.625vw #FF8364 solid}.casino-tournaments-tab ul li span{margin:auto 0}.casino-tournaments-tab sup{box-sizing:border-box;position:absolute;top:2.8125vw;right:0;transform:translate(0%, -50%);transform-origin:100% 0%;overflow:hidden;direction:ltr;z-index:auto;min-width:4.375vw;height:4.375vw;color:#fff;font-weight:400;font-size:4.375vw;line-height:4.375vw;white-space:nowrap;text-align:center;background:#FF8364;border-radius:3.125vw}.casino-tournaments-tab sup span{font-size:3.125vw;font-weight:600;padding-right:0.15625vw;display:inline-block;vertical-align:super}");
38
+ }
39
+ function j(e, t, n) {
40
+ const i = e.slice();
41
+ return i[15] = t[n], i;
42
+ }
43
+ function q(e) {
44
+ let t, n = R(
45
+ /*__tabs*/
46
+ e[5]
47
+ ), i = [];
48
+ for (let l = 0; l < n.length; l += 1)
49
+ i[l] = I(j(e, n, l));
50
+ return {
51
+ c() {
52
+ t = m("ul");
53
+ for (let l = 0; l < i.length; l += 1)
54
+ i[l].c();
55
+ f(t, "part", "ul");
56
+ },
57
+ m(l, o) {
58
+ v(l, t, o);
59
+ for (let s = 0; s < i.length; s += 1)
60
+ i[s] && i[s].m(t, null);
61
+ },
62
+ p(l, o) {
63
+ if (o & /*__tab, __tabs, window, totalReceiver, textReceiver*/
64
+ 60) {
65
+ n = R(
66
+ /*__tabs*/
67
+ l[5]
68
+ );
69
+ let s;
70
+ for (s = 0; s < n.length; s += 1) {
71
+ const c = j(l, n, s);
72
+ i[s] ? i[s].p(c, o) : (i[s] = I(c), i[s].c(), i[s].m(t, null));
73
+ }
74
+ for (; s < i.length; s += 1)
75
+ i[s].d(1);
76
+ i.length = n.length;
77
+ }
78
+ },
79
+ d(l) {
80
+ l && T(t), Z(i, l);
81
+ }
82
+ };
83
+ }
84
+ function D(e) {
85
+ let t, n, i = (
86
+ /*totalReceiver*/
87
+ e[2][
88
+ /*_tab*/
89
+ e[15]
90
+ ] + ""
91
+ ), l;
92
+ return {
93
+ c() {
94
+ t = m("sup"), n = m("span"), l = A(i), f(n, "part", "SupText"), f(t, "part", "sup");
95
+ },
96
+ m(o, s) {
97
+ v(o, t, s), h(t, n), h(n, l);
98
+ },
99
+ p(o, s) {
100
+ s & /*totalReceiver, __tabs*/
101
+ 36 && i !== (i = /*totalReceiver*/
102
+ o[2][
103
+ /*_tab*/
104
+ o[15]
105
+ ] + "") && B(l, i);
106
+ },
107
+ d(o) {
108
+ o && T(t);
109
+ }
110
+ };
111
+ }
112
+ function I(e) {
113
+ let t, n, i = (
114
+ /*textReceiver*/
115
+ e[3][
116
+ /*_tab*/
117
+ e[15]
118
+ ] + ""
119
+ ), l, o, s, c, d, u, p, r = (
120
+ /*totalReceiver*/
121
+ e[2][
122
+ /*_tab*/
123
+ e[15]
124
+ ] >= 0 && D(e)
125
+ );
126
+ function w() {
127
+ return (
128
+ /*click_handler*/
129
+ e[10](
130
+ /*_tab*/
131
+ e[15]
132
+ )
133
+ );
134
+ }
135
+ return {
136
+ c() {
137
+ t = m("li"), n = m("span"), l = A(i), o = U(), r && r.c(), s = U(), f(n, "part", "LiText"), f(t, "class", c = /*__tab*/
138
+ e[4] === /*_tab*/
139
+ e[15] ? "active" : ""), f(t, "part", d = `${/*_tab*/
140
+ e[15]} li ` + /*__tab*/
141
+ (e[4] === /*_tab*/
142
+ e[15] ? "active" : ""));
143
+ },
144
+ m(b, g) {
145
+ v(b, t, g), h(t, n), h(n, l), h(t, o), r && r.m(t, null), h(t, s), u || (p = x(t, "click", w), u = !0);
146
+ },
147
+ p(b, g) {
148
+ e = b, g & /*textReceiver, __tabs*/
149
+ 40 && i !== (i = /*textReceiver*/
150
+ e[3][
151
+ /*_tab*/
152
+ e[15]
153
+ ] + "") && B(l, i), /*totalReceiver*/
154
+ e[2][
155
+ /*_tab*/
156
+ e[15]
157
+ ] >= 0 ? r ? r.p(e, g) : (r = D(e), r.c(), r.m(t, s)) : r && (r.d(1), r = null), g & /*__tab, __tabs*/
158
+ 48 && c !== (c = /*__tab*/
159
+ e[4] === /*_tab*/
160
+ e[15] ? "active" : "") && f(t, "class", c), g & /*__tabs, __tab*/
161
+ 48 && d !== (d = `${/*_tab*/
162
+ e[15]} li ` + /*__tab*/
163
+ (e[4] === /*_tab*/
164
+ e[15] ? "active" : "")) && f(t, "part", d);
165
+ },
166
+ d(b) {
167
+ b && T(t), r && r.d(), u = !1, p();
168
+ }
169
+ };
170
+ }
171
+ function it(e) {
172
+ let t, n = (
173
+ /*isTitleInited*/
174
+ e[1] && q(e)
175
+ );
176
+ return {
177
+ c() {
178
+ t = m("div"), n && n.c(), f(t, "class", "casino-tournaments-tab"), f(t, "part", "CustomStylingContainer");
179
+ },
180
+ m(i, l) {
181
+ v(i, t, l), n && n.m(t, null), e[11](t);
182
+ },
183
+ p(i, [l]) {
184
+ /*isTitleInited*/
185
+ i[1] ? n ? n.p(i, l) : (n = q(i), n.c(), n.m(t, null)) : n && (n.d(1), n = null);
186
+ },
187
+ i: H,
188
+ o: H,
189
+ d(i) {
190
+ i && T(t), n && n.d(), e[11](null);
191
+ }
192
+ };
193
+ }
194
+ function lt(e, t, n) {
195
+ let i, l, { tabs: o = "" } = t, { tab: s = void 0 } = t, { clientstyling: c = "" } = t, { clientstylingurl: d = "" } = t, u, p = !1, r = {}, w = {};
196
+ const b = () => {
197
+ let a = document.createElement("style");
198
+ a.innerHTML = c, u.appendChild(a);
199
+ }, g = () => {
200
+ let a = new URL(d), F = document.createElement("style");
201
+ fetch(a.href).then((k) => k.text()).then((k) => {
202
+ F.innerHTML = k, setTimeout(
203
+ () => {
204
+ u.appendChild(F);
205
+ },
206
+ 1
207
+ ), setTimeout(
208
+ () => {
209
+ },
210
+ 500
211
+ );
212
+ });
213
+ };
214
+ et({
215
+ TournamentsTabTotalUpdate: (a) => {
216
+ n(2, r = C(L({}, r), {
217
+ [a.state]: a.total
218
+ }));
219
+ },
220
+ TournamentsTabLocaleTextUpdate: (a) => {
221
+ n(1, p = !0), n(3, w = C(L({}, w), { [a.state]: a.text }));
222
+ }
223
+ }), O(() => {
224
+ window.postMessage({ type: "TournamentsTabListenerLoaded" }, window.location.href);
225
+ });
226
+ const G = (a) => {
227
+ n(4, l = a), window.postMessage({ type: "TournamentsTabSwitch", tab: a }, window.location.href);
228
+ };
229
+ function J(a) {
230
+ $[a ? "unshift" : "push"](() => {
231
+ u = a, n(0, u);
232
+ });
233
+ }
234
+ return e.$$set = (a) => {
235
+ "tabs" in a && n(6, o = a.tabs), "tab" in a && n(7, s = a.tab), "clientstyling" in a && n(8, c = a.clientstyling), "clientstylingurl" in a && n(9, d = a.clientstylingurl);
236
+ }, e.$$.update = () => {
237
+ e.$$.dirty & /*customStylingContainer, clientstyling*/
238
+ 257 && u && c && b(), e.$$.dirty & /*customStylingContainer, clientstylingurl*/
239
+ 513 && u && d && g(), e.$$.dirty & /*tabs*/
240
+ 64 && n(5, i = o.split(",")), e.$$.dirty & /*tab*/
241
+ 128 && n(4, l = s);
242
+ }, [
243
+ u,
244
+ p,
245
+ r,
246
+ w,
247
+ l,
248
+ i,
249
+ o,
250
+ s,
251
+ c,
252
+ d,
253
+ G,
254
+ J
255
+ ];
256
+ }
257
+ class st extends Q {
258
+ constructor(t) {
259
+ super(), V(
260
+ this,
261
+ t,
262
+ lt,
263
+ it,
264
+ X,
265
+ {
266
+ tabs: 6,
267
+ tab: 7,
268
+ clientstyling: 8,
269
+ clientstylingurl: 9
270
+ },
271
+ nt
272
+ );
273
+ }
274
+ get tabs() {
275
+ return this.$$.ctx[6];
276
+ }
277
+ set tabs(t) {
278
+ this.$$set({ tabs: t }), y();
279
+ }
280
+ get tab() {
281
+ return this.$$.ctx[7];
282
+ }
283
+ set tab(t) {
284
+ this.$$set({ tab: t }), y();
285
+ }
286
+ get clientstyling() {
287
+ return this.$$.ctx[8];
288
+ }
289
+ set clientstyling(t) {
290
+ this.$$set({ clientstyling: t }), y();
291
+ }
292
+ get clientstylingurl() {
293
+ return this.$$.ctx[9];
294
+ }
295
+ set clientstylingurl(t) {
296
+ this.$$set({ clientstylingurl: t }), y();
297
+ }
298
+ }
299
+ W(st, { tabs: {}, tab: {}, clientstyling: {}, clientstylingurl: {} }, [], [], !0);
300
+ export {
301
+ st as default
302
+ };
@@ -0,0 +1 @@
1
+ "use strict";var U=Object.defineProperty,j=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var p=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var T=(e,t,n)=>t in e?U(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,w=(e,t)=>{for(var n in t||(t={}))k.call(t,n)&&T(e,n,t[n]);if(p)for(var n of p(t))C.call(t,n)&&T(e,n,t[n]);return e},y=(e,t)=>j(e,q(t));var L=(e,t)=>{var n={};for(var l in e)k.call(e,l)&&t.indexOf(l)<0&&(n[l]=e[l]);if(e!=null&&p)for(var l of p(e))t.indexOf(l)<0&&C.call(e,l)&&(n[l]=e[l]);return n};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./CasinoTournamentsLimitedController-BLxCoQEU.cjs"),O=e=>n=>{Object.keys(e).map(l=>{if(n.data&&n.data.type==l){const s=n.data,{type:r}=s,a=L(s,["type"]);e[l](a)}})},D=e=>{const t=O(e);i.onMount(()=>(window.addEventListener("message",t,!1),()=>{window.removeEventListener("message",t)}))};function I(e){i.append_styles(e,"svelte-1eq8iwl","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.casino-tournaments-tab{color:#F7F7F7;font:inherit;margin:3.125vw 0 1.25vw 0}.casino-tournaments-tab ul{display:flex;justify-content:space-between;width:100%;font-weight:600;font-size:3.75vw;border-bottom:0.3125vw #424242 solid}.casino-tournaments-tab ul li{position:relative;text-align:center;padding:2.5vw 3.125vw;word-break:break-word;flex:auto;display:block}.casino-tournaments-tab ul li.active{color:#FF8364;border-bottom:0.625vw #FF8364 solid}.casino-tournaments-tab ul li span{margin:auto 0}.casino-tournaments-tab sup{box-sizing:border-box;position:absolute;top:2.8125vw;right:0;transform:translate(0%, -50%);transform-origin:100% 0%;overflow:hidden;direction:ltr;z-index:auto;min-width:4.375vw;height:4.375vw;color:#fff;font-weight:400;font-size:4.375vw;line-height:4.375vw;white-space:nowrap;text-align:center;background:#FF8364;border-radius:3.125vw}.casino-tournaments-tab sup span{font-size:3.125vw;font-weight:600;padding-right:0.15625vw;display:inline-block;vertical-align:super}")}function F(e,t,n){const l=e.slice();return l[15]=t[n],l}function M(e){let t,n=i.ensure_array_like(e[5]),l=[];for(let s=0;s<n.length;s+=1)l[s]=z(F(e,n,s));return{c(){t=i.element("ul");for(let s=0;s<l.length;s+=1)l[s].c();i.attr(t,"part","ul")},m(s,r){i.insert(s,t,r);for(let a=0;a<l.length;a+=1)l[a]&&l[a].m(t,null)},p(s,r){if(r&60){n=i.ensure_array_like(s[5]);let a;for(a=0;a<n.length;a+=1){const c=F(s,n,a);l[a]?l[a].p(c,r):(l[a]=z(c),l[a].c(),l[a].m(t,null))}for(;a<l.length;a+=1)l[a].d(1);l.length=n.length}},d(s){s&&i.detach(t),i.destroy_each(l,s)}}}function S(e){let t,n,l=e[2][e[15]]+"",s;return{c(){t=i.element("sup"),n=i.element("span"),s=i.text(l),i.attr(n,"part","SupText"),i.attr(t,"part","sup")},m(r,a){i.insert(r,t,a),i.append(t,n),i.append(n,s)},p(r,a){a&36&&l!==(l=r[2][r[15]]+"")&&i.set_data(s,l)},d(r){r&&i.detach(t)}}}function z(e){let t,n,l=e[3][e[15]]+"",s,r,a,c,f,d,h,u=e[2][e[15]]>=0&&S(e);function m(){return e[10](e[15])}return{c(){t=i.element("li"),n=i.element("span"),s=i.text(l),r=i.space(),u&&u.c(),a=i.space(),i.attr(n,"part","LiText"),i.attr(t,"class",c=e[4]===e[15]?"active":""),i.attr(t,"part",f=`${e[15]} li `+(e[4]===e[15]?"active":""))},m(b,g){i.insert(b,t,g),i.append(t,n),i.append(n,s),i.append(t,r),u&&u.m(t,null),i.append(t,a),d||(h=i.listen(t,"click",m),d=!0)},p(b,g){e=b,g&40&&l!==(l=e[3][e[15]]+"")&&i.set_data(s,l),e[2][e[15]]>=0?u?u.p(e,g):(u=S(e),u.c(),u.m(t,a)):u&&(u.d(1),u=null),g&48&&c!==(c=e[4]===e[15]?"active":"")&&i.attr(t,"class",c),g&48&&f!==(f=`${e[15]} li `+(e[4]===e[15]?"active":""))&&i.attr(t,"part",f)},d(b){b&&i.detach(t),u&&u.d(),d=!1,h()}}}function P(e){let t,n=e[1]&&M(e);return{c(){t=i.element("div"),n&&n.c(),i.attr(t,"class","casino-tournaments-tab"),i.attr(t,"part","CustomStylingContainer")},m(l,s){i.insert(l,t,s),n&&n.m(t,null),e[11](t)},p(l,[s]){l[1]?n?n.p(l,s):(n=M(l),n.c(),n.m(t,null)):n&&(n.d(1),n=null)},i:i.noop,o:i.noop,d(l){l&&i.detach(t),n&&n.d(),e[11](null)}}}function A(e,t,n){let l,s,{tabs:r=""}=t,{tab:a=void 0}=t,{clientstyling:c=""}=t,{clientstylingurl:f=""}=t,d,h=!1,u={},m={};const b=()=>{let o=document.createElement("style");o.innerHTML=c,d.appendChild(o)},g=()=>{let o=new URL(f),v=document.createElement("style");fetch(o.href).then(_=>_.text()).then(_=>{v.innerHTML=_,setTimeout(()=>{d.appendChild(v)},1),setTimeout(()=>{},500)})};D({TournamentsTabTotalUpdate:o=>{n(2,u=y(w({},u),{[o.state]:o.total}))},TournamentsTabLocaleTextUpdate:o=>{n(1,h=!0),n(3,m=y(w({},m),{[o.state]:o.text}))}}),i.onMount(()=>{window.postMessage({type:"TournamentsTabListenerLoaded"},window.location.href)});const H=o=>{n(4,s=o),window.postMessage({type:"TournamentsTabSwitch",tab:o},window.location.href)};function R(o){i.binding_callbacks[o?"unshift":"push"](()=>{d=o,n(0,d)})}return e.$$set=o=>{"tabs"in o&&n(6,r=o.tabs),"tab"in o&&n(7,a=o.tab),"clientstyling"in o&&n(8,c=o.clientstyling),"clientstylingurl"in o&&n(9,f=o.clientstylingurl)},e.$$.update=()=>{e.$$.dirty&257&&d&&c&&b(),e.$$.dirty&513&&d&&f&&g(),e.$$.dirty&64&&n(5,l=r.split(",")),e.$$.dirty&128&&n(4,s=a)},[d,h,u,m,s,l,r,a,c,f,H,R]}class E extends i.SvelteComponent{constructor(t){super(),i.init(this,t,A,P,i.safe_not_equal,{tabs:6,tab:7,clientstyling:8,clientstylingurl:9},I)}get tabs(){return this.$$.ctx[6]}set tabs(t){this.$$set({tabs:t}),i.flush()}get tab(){return this.$$.ctx[7]}set tab(t){this.$$set({tab:t}),i.flush()}get clientstyling(){return this.$$.ctx[8]}set clientstyling(t){this.$$set({clientstyling:t}),i.flush()}get clientstylingurl(){return this.$$.ctx[9]}set clientstylingurl(t){this.$$set({clientstylingurl:t}),i.flush()}}i.create_custom_element(E,{tabs:{},tab:{},clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=E;
@@ -1 +1 @@
1
- "use strict";if(typeof window!="undefined"){let n=function(e){return function(...s){try{return e.apply(this,s)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoTournamentsLimitedController-D259Oc13.cjs")).then(e=>e.CasinoTournamentsLimitedController_ce).then(({default:e})=>{!customElements.get("casino-tournaments-limited-controller")&&customElements.define("casino-tournaments-limited-controller",e.element)})}
1
+ "use strict";if(typeof window!="undefined"){let n=function(e){return function(...s){try{return e.apply(this,s)}catch(t){if(t instanceof DOMException&&t.message.includes("has already been used with this registry")||t.message.includes("Cannot define multiple custom elements with the same tag name"))return!1;throw t}}};customElements.define=n(customElements.define),Promise.resolve().then(()=>require("../components/CasinoTournamentsLimitedController-BLxCoQEU.cjs")).then(e=>e.CasinoTournamentsLimitedController_ce).then(({default:e})=>{!customElements.get("casino-tournaments-limited-controller")&&customElements.define("casino-tournaments-limited-controller",e.element)})}
@@ -10,7 +10,7 @@ if (typeof window != "undefined") {
10
10
  }
11
11
  };
12
12
  };
13
- customElements.define = n(customElements.define), import("../components/CasinoTournamentsLimitedController-CtMjsDyf.js").then((e) => e.C).then(({ default: e }) => {
13
+ customElements.define = n(customElements.define), import("../components/CasinoTournamentsLimitedController-c9NQH-Ue.js").then((e) => e.C).then(({ default: e }) => {
14
14
  !customElements.get("casino-tournaments-limited-controller") && customElements.define(
15
15
  "casino-tournaments-limited-controller",
16
16
  e.element
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/casino-tournaments-limited-controller",
3
- "version": "1.49.0",
3
+ "version": "1.49.2",
4
4
  "type": "module",
5
5
  "main": "es2015/casino-tournaments-limited-controller.cjs",
6
6
  "module": "es2015/casino-tournaments-limited-controller.js",
@@ -1,281 +0,0 @@
1
- var I = Object.defineProperty, J = Object.defineProperties;
2
- var K = Object.getOwnPropertyDescriptors;
3
- var w = Object.getOwnPropertySymbols;
4
- var S = Object.prototype.hasOwnProperty, z = Object.prototype.propertyIsEnumerable;
5
- var M = (t, e, n) => e in t ? I(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, T = (t, e) => {
6
- for (var n in e || (e = {}))
7
- S.call(e, n) && M(t, n, e[n]);
8
- if (w)
9
- for (var n of w(e))
10
- z.call(e, n) && M(t, n, e[n]);
11
- return t;
12
- }, k = (t, e) => J(t, K(e));
13
- var E = (t, e) => {
14
- var n = {};
15
- for (var i in t)
16
- S.call(t, i) && e.indexOf(i) < 0 && (n[i] = t[i]);
17
- if (t != null && w)
18
- for (var i of w(t))
19
- e.indexOf(i) < 0 && z.call(t, i) && (n[i] = t[i]);
20
- return n;
21
- };
22
- import { o as O, S as N, i as P, f as _, c as Q, s as V, a as W, e as H, b as p, d as f, g as L, h, n as R, j as C, k as X, t as A, l as U, m as Y, p as B, q as Z } from "./CasinoTournamentsLimitedController-CtMjsDyf.js";
23
- const x = (t) => (n) => {
24
- Object.keys(t).map((i) => {
25
- if (n.data && n.data.type == i) {
26
- const l = n.data, { type: s } = l, r = E(l, ["type"]);
27
- t[i](r);
28
- }
29
- });
30
- }, $ = (t) => {
31
- const e = x(t);
32
- O(() => (window.addEventListener("message", e, !1), () => {
33
- window.removeEventListener("message", e);
34
- }));
35
- };
36
- function tt(t) {
37
- W(t, "svelte-1eq8iwl", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.casino-tournaments-tab{color:#F7F7F7;font:inherit;margin:3.125vw 0 1.25vw 0}.casino-tournaments-tab ul{display:flex;justify-content:space-between;width:100%;font-weight:600;font-size:3.75vw;border-bottom:0.3125vw #424242 solid}.casino-tournaments-tab ul li{position:relative;text-align:center;padding:2.5vw 3.125vw;word-break:break-word;flex:auto;display:block}.casino-tournaments-tab ul li.active{color:#FF8364;border-bottom:0.625vw #FF8364 solid}.casino-tournaments-tab ul li span{margin:auto 0}.casino-tournaments-tab sup{box-sizing:border-box;position:absolute;top:2.8125vw;right:0;transform:translate(0%, -50%);transform-origin:100% 0%;overflow:hidden;direction:ltr;z-index:auto;min-width:4.375vw;height:4.375vw;color:#fff;font-weight:400;font-size:4.375vw;line-height:4.375vw;white-space:nowrap;text-align:center;background:#FF8364;border-radius:3.125vw}.casino-tournaments-tab sup span{font-size:3.125vw;font-weight:600;padding-right:0.15625vw;display:inline-block;vertical-align:super}");
38
- }
39
- function j(t, e, n) {
40
- const i = t.slice();
41
- return i[14] = e[n], i;
42
- }
43
- function q(t) {
44
- let e, n, i = (
45
- /*totalReceiver*/
46
- t[1][
47
- /*_tab*/
48
- t[14]
49
- ] + ""
50
- ), l;
51
- return {
52
- c() {
53
- e = p("sup"), n = p("span"), l = A(i), f(n, "part", "SupText"), f(e, "part", "sup");
54
- },
55
- m(s, r) {
56
- L(s, e, r), h(e, n), h(n, l);
57
- },
58
- p(s, r) {
59
- r & /*totalReceiver, __tabs*/
60
- 18 && i !== (i = /*totalReceiver*/
61
- s[1][
62
- /*_tab*/
63
- s[14]
64
- ] + "") && B(l, i);
65
- },
66
- d(s) {
67
- s && C(e);
68
- }
69
- };
70
- }
71
- function D(t) {
72
- let e, n, i = (
73
- /*textReceiver*/
74
- t[2][
75
- /*_tab*/
76
- t[14]
77
- ] + ""
78
- ), l, s, r, a, u, d, m, c = (
79
- /*totalReceiver*/
80
- t[1][
81
- /*_tab*/
82
- t[14]
83
- ] >= 0 && q(t)
84
- );
85
- function y() {
86
- return (
87
- /*click_handler*/
88
- t[9](
89
- /*_tab*/
90
- t[14]
91
- )
92
- );
93
- }
94
- return {
95
- c() {
96
- e = p("li"), n = p("span"), l = A(i), s = U(), c && c.c(), r = U(), f(n, "part", "LiText"), f(e, "class", a = /*__tab*/
97
- t[3] === /*_tab*/
98
- t[14] ? "active" : ""), f(e, "part", u = `${/*_tab*/
99
- t[14]} li ` + /*__tab*/
100
- (t[3] === /*_tab*/
101
- t[14] ? "active" : ""));
102
- },
103
- m(b, g) {
104
- L(b, e, g), h(e, n), h(n, l), h(e, s), c && c.m(e, null), h(e, r), d || (m = Y(e, "click", y), d = !0);
105
- },
106
- p(b, g) {
107
- t = b, g & /*textReceiver, __tabs*/
108
- 20 && i !== (i = /*textReceiver*/
109
- t[2][
110
- /*_tab*/
111
- t[14]
112
- ] + "") && B(l, i), /*totalReceiver*/
113
- t[1][
114
- /*_tab*/
115
- t[14]
116
- ] >= 0 ? c ? c.p(t, g) : (c = q(t), c.c(), c.m(e, r)) : c && (c.d(1), c = null), g & /*__tab, __tabs*/
117
- 24 && a !== (a = /*__tab*/
118
- t[3] === /*_tab*/
119
- t[14] ? "active" : "") && f(e, "class", a), g & /*__tabs, __tab*/
120
- 24 && u !== (u = `${/*_tab*/
121
- t[14]} li ` + /*__tab*/
122
- (t[3] === /*_tab*/
123
- t[14] ? "active" : "")) && f(e, "part", u);
124
- },
125
- d(b) {
126
- b && C(e), c && c.d(), d = !1, m();
127
- }
128
- };
129
- }
130
- function et(t) {
131
- let e, n, i = H(
132
- /*__tabs*/
133
- t[4]
134
- ), l = [];
135
- for (let s = 0; s < i.length; s += 1)
136
- l[s] = D(j(t, i, s));
137
- return {
138
- c() {
139
- e = p("div"), n = p("ul");
140
- for (let s = 0; s < l.length; s += 1)
141
- l[s].c();
142
- f(n, "part", "ul"), f(e, "class", "casino-tournaments-tab"), f(e, "part", "CustomStylingContainer");
143
- },
144
- m(s, r) {
145
- L(s, e, r), h(e, n);
146
- for (let a = 0; a < l.length; a += 1)
147
- l[a] && l[a].m(n, null);
148
- t[10](e);
149
- },
150
- p(s, [r]) {
151
- if (r & /*__tab, __tabs, window, totalReceiver, textReceiver*/
152
- 30) {
153
- i = H(
154
- /*__tabs*/
155
- s[4]
156
- );
157
- let a;
158
- for (a = 0; a < i.length; a += 1) {
159
- const u = j(s, i, a);
160
- l[a] ? l[a].p(u, r) : (l[a] = D(u), l[a].c(), l[a].m(n, null));
161
- }
162
- for (; a < l.length; a += 1)
163
- l[a].d(1);
164
- l.length = i.length;
165
- }
166
- },
167
- i: R,
168
- o: R,
169
- d(s) {
170
- s && C(e), X(l, s), t[10](null);
171
- }
172
- };
173
- }
174
- function nt(t, e, n) {
175
- let i, l, { tabs: s = "" } = e, { tab: r = void 0 } = e, { clientstyling: a = "" } = e, { clientstylingurl: u = "" } = e, d, m = {}, c = {};
176
- const y = () => {
177
- let o = document.createElement("style");
178
- o.innerHTML = a, d.appendChild(o);
179
- }, b = () => {
180
- let o = new URL(u), F = document.createElement("style");
181
- fetch(o.href).then((v) => v.text()).then((v) => {
182
- F.innerHTML = v, setTimeout(
183
- () => {
184
- d.appendChild(F);
185
- },
186
- 1
187
- ), setTimeout(
188
- () => {
189
- },
190
- 500
191
- );
192
- });
193
- };
194
- $({
195
- TournamentsTabTotalUpdate: (o) => {
196
- n(1, m = k(T({}, m), {
197
- [o.state]: o.total
198
- }));
199
- },
200
- TournamentsTabLocaleTextUpdate: (o) => {
201
- n(2, c = k(T({}, c), { [o.state]: o.text }));
202
- }
203
- }), O(() => {
204
- window.postMessage({ type: "TournamentsTabListenerLoaded" }, window.location.href);
205
- });
206
- const g = (o) => {
207
- n(3, l = o), window.postMessage({ type: "TournamentsTabSwitch", tab: o }, window.location.href);
208
- };
209
- function G(o) {
210
- Z[o ? "unshift" : "push"](() => {
211
- d = o, n(0, d);
212
- });
213
- }
214
- return t.$$set = (o) => {
215
- "tabs" in o && n(5, s = o.tabs), "tab" in o && n(6, r = o.tab), "clientstyling" in o && n(7, a = o.clientstyling), "clientstylingurl" in o && n(8, u = o.clientstylingurl);
216
- }, t.$$.update = () => {
217
- t.$$.dirty & /*customStylingContainer, clientstyling*/
218
- 129 && d && a && y(), t.$$.dirty & /*customStylingContainer, clientstylingurl*/
219
- 257 && d && u && b(), t.$$.dirty & /*tabs*/
220
- 32 && n(4, i = s.split(",")), t.$$.dirty & /*tab*/
221
- 64 && n(3, l = r);
222
- }, [
223
- d,
224
- m,
225
- c,
226
- l,
227
- i,
228
- s,
229
- r,
230
- a,
231
- u,
232
- g,
233
- G
234
- ];
235
- }
236
- class it extends N {
237
- constructor(e) {
238
- super(), P(
239
- this,
240
- e,
241
- nt,
242
- et,
243
- V,
244
- {
245
- tabs: 5,
246
- tab: 6,
247
- clientstyling: 7,
248
- clientstylingurl: 8
249
- },
250
- tt
251
- );
252
- }
253
- get tabs() {
254
- return this.$$.ctx[5];
255
- }
256
- set tabs(e) {
257
- this.$$set({ tabs: e }), _();
258
- }
259
- get tab() {
260
- return this.$$.ctx[6];
261
- }
262
- set tab(e) {
263
- this.$$set({ tab: e }), _();
264
- }
265
- get clientstyling() {
266
- return this.$$.ctx[7];
267
- }
268
- set clientstyling(e) {
269
- this.$$set({ clientstyling: e }), _();
270
- }
271
- get clientstylingurl() {
272
- return this.$$.ctx[8];
273
- }
274
- set clientstylingurl(e) {
275
- this.$$set({ clientstylingurl: e }), _();
276
- }
277
- }
278
- Q(it, { tabs: {}, tab: {}, clientstyling: {}, clientstylingurl: {} }, [], [], !0);
279
- export {
280
- it as default
281
- };
@@ -1 +0,0 @@
1
- "use strict";var H=Object.defineProperty,R=Object.defineProperties;var U=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,C=Object.prototype.propertyIsEnumerable;var T=(t,e,i)=>e in t?H(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,_=(t,e)=>{for(var i in e||(e={}))k.call(e,i)&&T(t,i,e[i]);if(b)for(var i of b(e))C.call(e,i)&&T(t,i,e[i]);return t},y=(t,e)=>R(t,U(e));var L=(t,e)=>{var i={};for(var l in t)k.call(t,l)&&e.indexOf(l)<0&&(i[l]=t[l]);if(t!=null&&b)for(var l of b(t))e.indexOf(l)<0&&C.call(t,l)&&(i[l]=t[l]);return i};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./CasinoTournamentsLimitedController-D259Oc13.cjs"),j=t=>i=>{Object.keys(t).map(l=>{if(i.data&&i.data.type==l){const s=i.data,{type:a}=s,u=L(s,["type"]);t[l](u)}})},q=t=>{const e=j(t);n.onMount(()=>(window.addEventListener("message",e,!1),()=>{window.removeEventListener("message",e)}))};function O(t){n.append_styles(t,"svelte-1eq8iwl","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.casino-tournaments-tab{color:#F7F7F7;font:inherit;margin:3.125vw 0 1.25vw 0}.casino-tournaments-tab ul{display:flex;justify-content:space-between;width:100%;font-weight:600;font-size:3.75vw;border-bottom:0.3125vw #424242 solid}.casino-tournaments-tab ul li{position:relative;text-align:center;padding:2.5vw 3.125vw;word-break:break-word;flex:auto;display:block}.casino-tournaments-tab ul li.active{color:#FF8364;border-bottom:0.625vw #FF8364 solid}.casino-tournaments-tab ul li span{margin:auto 0}.casino-tournaments-tab sup{box-sizing:border-box;position:absolute;top:2.8125vw;right:0;transform:translate(0%, -50%);transform-origin:100% 0%;overflow:hidden;direction:ltr;z-index:auto;min-width:4.375vw;height:4.375vw;color:#fff;font-weight:400;font-size:4.375vw;line-height:4.375vw;white-space:nowrap;text-align:center;background:#FF8364;border-radius:3.125vw}.casino-tournaments-tab sup span{font-size:3.125vw;font-weight:600;padding-right:0.15625vw;display:inline-block;vertical-align:super}")}function F(t,e,i){const l=t.slice();return l[14]=e[i],l}function M(t){let e,i,l=t[1][t[14]]+"",s;return{c(){e=n.element("sup"),i=n.element("span"),s=n.text(l),n.attr(i,"part","SupText"),n.attr(e,"part","sup")},m(a,u){n.insert(a,e,u),n.append(e,i),n.append(i,s)},p(a,u){u&18&&l!==(l=a[1][a[14]]+"")&&n.set_data(s,l)},d(a){a&&n.detach(e)}}}function S(t){let e,i,l=t[2][t[14]]+"",s,a,u,o,d,f,h,c=t[1][t[14]]>=0&&M(t);function m(){return t[9](t[14])}return{c(){e=n.element("li"),i=n.element("span"),s=n.text(l),a=n.space(),c&&c.c(),u=n.space(),n.attr(i,"part","LiText"),n.attr(e,"class",o=t[3]===t[14]?"active":""),n.attr(e,"part",d=`${t[14]} li `+(t[3]===t[14]?"active":""))},m(p,g){n.insert(p,e,g),n.append(e,i),n.append(i,s),n.append(e,a),c&&c.m(e,null),n.append(e,u),f||(h=n.listen(e,"click",m),f=!0)},p(p,g){t=p,g&20&&l!==(l=t[2][t[14]]+"")&&n.set_data(s,l),t[1][t[14]]>=0?c?c.p(t,g):(c=M(t),c.c(),c.m(e,u)):c&&(c.d(1),c=null),g&24&&o!==(o=t[3]===t[14]?"active":"")&&n.attr(e,"class",o),g&24&&d!==(d=`${t[14]} li `+(t[3]===t[14]?"active":""))&&n.attr(e,"part",d)},d(p){p&&n.detach(e),c&&c.d(),f=!1,h()}}}function D(t){let e,i,l=n.ensure_array_like(t[4]),s=[];for(let a=0;a<l.length;a+=1)s[a]=S(F(t,l,a));return{c(){e=n.element("div"),i=n.element("ul");for(let a=0;a<s.length;a+=1)s[a].c();n.attr(i,"part","ul"),n.attr(e,"class","casino-tournaments-tab"),n.attr(e,"part","CustomStylingContainer")},m(a,u){n.insert(a,e,u),n.append(e,i);for(let o=0;o<s.length;o+=1)s[o]&&s[o].m(i,null);t[10](e)},p(a,[u]){if(u&30){l=n.ensure_array_like(a[4]);let o;for(o=0;o<l.length;o+=1){const d=F(a,l,o);s[o]?s[o].p(d,u):(s[o]=S(d),s[o].c(),s[o].m(i,null))}for(;o<s.length;o+=1)s[o].d(1);s.length=l.length}},i:n.noop,o:n.noop,d(a){a&&n.detach(e),n.destroy_each(s,a),t[10](null)}}}function P(t,e,i){let l,s,{tabs:a=""}=e,{tab:u=void 0}=e,{clientstyling:o=""}=e,{clientstylingurl:d=""}=e,f,h={},c={};const m=()=>{let r=document.createElement("style");r.innerHTML=o,f.appendChild(r)},p=()=>{let r=new URL(d),v=document.createElement("style");fetch(r.href).then(w=>w.text()).then(w=>{v.innerHTML=w,setTimeout(()=>{f.appendChild(v)},1),setTimeout(()=>{},500)})};q({TournamentsTabTotalUpdate:r=>{i(1,h=y(_({},h),{[r.state]:r.total}))},TournamentsTabLocaleTextUpdate:r=>{i(2,c=y(_({},c),{[r.state]:r.text}))}}),n.onMount(()=>{window.postMessage({type:"TournamentsTabListenerLoaded"},window.location.href)});const g=r=>{i(3,s=r),window.postMessage({type:"TournamentsTabSwitch",tab:r},window.location.href)};function E(r){n.binding_callbacks[r?"unshift":"push"](()=>{f=r,i(0,f)})}return t.$$set=r=>{"tabs"in r&&i(5,a=r.tabs),"tab"in r&&i(6,u=r.tab),"clientstyling"in r&&i(7,o=r.clientstyling),"clientstylingurl"in r&&i(8,d=r.clientstylingurl)},t.$$.update=()=>{t.$$.dirty&129&&f&&o&&m(),t.$$.dirty&257&&f&&d&&p(),t.$$.dirty&32&&i(4,l=a.split(",")),t.$$.dirty&64&&i(3,s=u)},[f,h,c,s,l,a,u,o,d,g,E]}class z extends n.SvelteComponent{constructor(e){super(),n.init(this,e,P,D,n.safe_not_equal,{tabs:5,tab:6,clientstyling:7,clientstylingurl:8},O)}get tabs(){return this.$$.ctx[5]}set tabs(e){this.$$set({tabs:e}),n.flush()}get tab(){return this.$$.ctx[6]}set tab(e){this.$$set({tab:e}),n.flush()}get clientstyling(){return this.$$.ctx[7]}set clientstyling(e){this.$$set({clientstyling:e}),n.flush()}get clientstylingurl(){return this.$$.ctx[8]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),n.flush()}}n.create_custom_element(z,{tabs:{},tab:{},clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=z;