@everymatrix/casino-tournaments-controller 1.0.69 → 1.0.71
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.
- package/components/CasinoTournamentsController-DZ0LEvCR.cjs +14 -0
- package/components/CasinoTournamentsController-o9ci4V-7.js +5673 -0
- package/components/CasinoTournamentsFilterController-CiS0QN_2.js +549 -0
- package/components/CasinoTournamentsFilterController-FBpFN99X.cjs +1 -0
- package/components/CasinoTournamentsListController-DIfWzrAy.cjs +13 -0
- package/components/CasinoTournamentsListController-TZbe8_p2.js +3128 -0
- package/components/CasinoTournamentsThumbnail-1UjlSmfk.js +885 -0
- package/components/CasinoTournamentsThumbnail-CU_I-u5x.cjs +4 -0
- package/components/CasinoTournamentsThumbnailController-B35mMuea.cjs +1 -0
- package/components/CasinoTournamentsThumbnailController-CoX3AMmZ.js +1365 -0
- package/components/CasinoTournamentsThumbnailDuration-C_EXZ3qI.cjs +1 -0
- package/components/CasinoTournamentsThumbnailDuration-GKFyPIZf.js +515 -0
- package/components/CasinoTournamentsThumbnailGamesSlider-D1ki4K15.cjs +1 -0
- package/components/CasinoTournamentsThumbnailGamesSlider-DVPC0-Qc.js +456 -0
- package/components/CasinoTournamentsThumbnailPrizes-C233jAWN.cjs +1 -0
- package/components/CasinoTournamentsThumbnailPrizes-Dy-t1Zna.js +330 -0
- package/package.json +6 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CasinoTournamentsController-DZ0LEvCR.cjs");function P(a,e){t.addMessages(a,e)}const M={en:{tournamentsDuration:{finished:"Finished",starting:"Starting in ",left:"left",minutes:"minutes",hours:"hours",days:"days"}},hr:{tournamentsDuration:{finished:"Završeno",starting:"Starting in ",left:"preostalo",minutes:"minute",hours:"sati",days:"dana"}},"zh-hk":{tournamentsDuration:{finished:"完成的",starting:"開始於",left:"剩下",minutes:"分鐘",hours:"小時",days:"天"}},fr:{tournamentsDuration:{finished:"Fini",starting:"Début dans ",left:"restant",minutes:"minutes",hours:"heures",days:"jours"}},ro:{tournamentsDuration:{finished:"Finalizat",starting:"Începe în",left:"rămase",minutes:"minute",hours:"ore",days:"zile"}},tr:{tournamentsDuration:{finished:"Bitti",starting:"İçinde başlayan",left:"sol",minutes:"dakika",hours:"saat",days:"günler"}},el:{tournamentsDuration:{finished:"Ολοκληρωμένα",starting:"Αρχίζει σε ",left:"απομένουν",minutes:"λεπτά",hours:"ώρες",days:"ημέρες"}},es:{tournamentsDuration:{finished:"Finalizado",starting:"Iniciando en ",left:"queda",minutes:"minutos",hours:"horas",days:"días"}},hu:{tournamentsDuration:{finished:"Befejezve",starting:"Kezdésig",left:"bal",minutes:"perc",hours:"óra",days:"nap"}},pt:{tournamentsDuration:{finished:"Finalizado",starting:"Começando em",left:"Abandonou",minutes:"Minutos",hours:"Horas",days:"Dias"}}};function O(a){t.append_styles(a,"svelte-1hp648c",".svelte-1hp648c,.svelte-1hp648c::before,.svelte-1hp648c::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.TournamentDates.svelte-1hp648c{margin-left:20px;margin-right:20px;display:flex;justify-content:space-between}.StartDate.svelte-1hp648c{font-size:11px;color:var(--emfe-w-color-gray-300, #58586B)}.EndDate.svelte-1hp648c{font-size:11px;align-content:flex-end;color:var(--emfe-w-color-gray-300, #58586B)}.ProgressBar.svelte-1hp648c{margin:5px 20px;height:8px;background:var(--emfe-w-color-white, #FFFFFF)}.ProgressBarFill.svelte-1hp648c{background-color:var(--emfe-w-color-green, #48952a);height:8px}.ProgressBarFillEnd.svelte-1hp648c{background-color:var(--emfe-w-color-green, #48952a);height:8px}.ProgressBarFillStarting.svelte-1hp648c{background-color:var(--emfe-w-color-gray-300, #58586B);height:8px}.Remaining.svelte-1hp648c,.Finished.svelte-1hp648c{font-size:10px;padding-top:5px;text-align:right;text-transform:uppercase}.Finished.svelte-1hp648c{color:var(--emfe-w-color-green, #48952a)}")}function z(a){let e,n,s=a[10](a[0])+"",l,u,o,c=a[10](a[1])+"",h,k,_,m,v,D,S;function C(i,y){return i[2]=="Finished"||i[2]=="Closing"||i[2]=="Closed"?q:i[5]>0?N:U}let B=C(a),g=B(a);function w(i,y){if(i[2]=="Finished"||i[2]=="Closing"||i[2]=="Closed")return x;if(i[5]>0)return H;if(i[4]>0)return A}let b=w(a),f=b&&b(a);return{c(){e=t.element("div"),n=t.element("div"),l=t.text(s),u=t.space(),o=t.element("div"),h=t.text(c),k=t.space(),_=t.element("div"),m=t.element("div"),g.c(),v=t.space(),f&&f.c(),t.attr(n,"class","StartDate svelte-1hp648c"),t.attr(n,"part","StartDate"),t.attr(o,"class","EndDate svelte-1hp648c"),t.attr(o,"part","EndDate"),t.attr(e,"class","TournamentDates svelte-1hp648c"),t.attr(e,"part","TournamentDates"),t.attr(m,"class","ProgressBar svelte-1hp648c"),t.attr(m,"part","ProgressBar"),t.attr(_,"class","ProgressBarWrapper svelte-1hp648c"),t.attr(_,"part","ProgressBarWrapper")},m(i,y){t.insert(i,e,y),t.append(e,n),t.append(n,l),t.append(e,u),t.append(e,o),t.append(o,h),t.insert(i,k,y),t.insert(i,_,y),t.append(_,m),g.m(m,null),t.append(m,v),f&&f.m(m,null),D||(S=t.action_destroyer(a[9].call(null,_)),D=!0)},p(i,y){y&1&&s!==(s=i[10](i[0])+"")&&t.set_data(l,s),y&2&&c!==(c=i[10](i[1])+"")&&t.set_data(h,c),B===(B=C(i))&&g?g.p(i,y):(g.d(1),g=B(i),g&&(g.c(),g.m(m,v))),b===(b=w(i))&&f?f.p(i,y):(f&&f.d(1),f=b&&b(i),f&&(f.c(),f.m(m,null)))},d(i){i&&(t.detach(e),t.detach(k),t.detach(_)),g.d(),f&&f.d(),D=!1,S()}}}function U(a){let e;return{c(){e=t.element("div"),t.attr(e,"class","ProgressBarFill svelte-1hp648c"),t.attr(e,"part","ProgressBarFill"),t.set_style(e,"width",a[7]()+"%")},m(n,s){t.insert(n,e,s)},p(n,s){s&128&&t.set_style(e,"width",n[7]()+"%")},d(n){n&&t.detach(e)}}}function N(a){let e;return{c(){e=t.element("div"),t.attr(e,"class","ProgressBarFillStarting svelte-1hp648c"),t.attr(e,"part","ProgressBarFillStarting")},m(n,s){t.insert(n,e,s)},p:t.noop,d(n){n&&t.detach(e)}}}function q(a){let e;return{c(){e=t.element("div"),t.attr(e,"class","ProgressBarFillEnd svelte-1hp648c"),t.attr(e,"part","ProgressBarFillEnd")},m(n,s){t.insert(n,e,s)},p:t.noop,d(n){n&&t.detach(e)}}}function A(a){let e,n,s,l=a[8]("tournamentsDuration.left")+"",u;return{c(){e=t.element("div"),n=t.text(a[6]),s=t.space(),u=t.text(l),t.attr(e,"class","Remaining svelte-1hp648c"),t.attr(e,"part","Remaining")},m(o,c){t.insert(o,e,c),t.append(e,n),t.append(e,s),t.append(e,u)},p(o,c){c&64&&t.set_data(n,o[6]),c&256&&l!==(l=o[8]("tournamentsDuration.left")+"")&&t.set_data(u,l)},d(o){o&&t.detach(e)}}}function H(a){let e,n=a[8]("tournamentsDuration.starting")+"",s,l,u=a[11](a[5])+"",o;return{c(){e=t.element("div"),s=t.text(n),l=t.space(),o=t.text(u),t.attr(e,"class","Remaining svelte-1hp648c"),t.attr(e,"part","Remaining")},m(c,h){t.insert(c,e,h),t.append(e,s),t.append(e,l),t.append(e,o)},p(c,h){h&256&&n!==(n=c[8]("tournamentsDuration.starting")+"")&&t.set_data(s,n),h&32&&u!==(u=c[11](c[5])+"")&&t.set_data(o,u)},d(c){c&&t.detach(e)}}}function x(a){let e,n=a[8]("tournamentsDuration.finished")+"",s;return{c(){e=t.element("div"),s=t.text(n),t.attr(e,"class","Finished svelte-1hp648c"),t.attr(e,"part","Finished")},m(l,u){t.insert(l,e,u),t.append(e,s)},p(l,u){u&256&&n!==(n=l[8]("tournamentsDuration.finished")+"")&&t.set_data(s,n)},d(l){l&&t.detach(e)}}}function W(a){let e,n=a[0]&&a[1]&&z(a);return{c(){e=t.element("div"),n&&n.c(),t.attr(e,"class","TournamentDuration svelte-1hp648c"),t.attr(e,"part","TournamentDuration")},m(s,l){t.insert(s,e,l),n&&n.m(e,null),a[16](e)},p(s,[l]){s[0]&&s[1]?n?n.p(s,l):(n=z(s),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i:t.noop,o:t.noop,d(s){s&&t.detach(e),n&&n.d(),a[16](null)}}}function G(a,e,n){let s,l;t.component_subscribe(a,t.$format,r=>n(8,l=r));let{startdate:u=""}=e,{enddate:o=""}=e,{status:c=""}=e,{lang:h="en"}=e,{clientstyling:k=""}=e,{clientstylingurl:_=""}=e,{translationurl:m=""}=e,v,D="",S="",C="";const B=()=>{fetch(m).then(d=>d.json()).then(d=>{Object.keys(d).forEach(p=>{P(p,d[p])})}).catch(d=>{console.log(d)})};Object.keys(M).forEach(r=>{P(r,M[r])});const g=r=>new Date(r).getTime(),w=(r,d)=>(g(d)-g(r))/(1e3*60),b=()=>{const r=new Date;n(4,D=w(r,o)),n(5,S=w(r,u)),n(6,C=i(D))},f=r=>{const d={month:"long"};let p=new Date(r),T=new Intl.DateTimeFormat(h,d).format(p);return`${p.getDate()} ${T}, ${p.toLocaleString("en-GB",{hour:"numeric",minute:"numeric"})}, ${p.getUTCFullYear()}`},i=r=>{const d=(T,F)=>T+" "+l(F),p=T=>{const F=Math.floor(T);return F<10?`0${F}`:`${F}`};if(r<1440){const T=r/60,F=r%60,L=(F-Math.floor(F))*60;return[T,F,L].map(I=>p(I)).join(":")}return d(Math.ceil(r/(60*24)),"tournamentsDuration.days")},y=()=>{let r=document.createElement("style");r.innerHTML=k,v.appendChild(r)},R=()=>{let r=new URL(_),d=document.createElement("style");fetch(r.href).then(p=>p.text()).then(p=>{d.innerHTML=p,setTimeout(()=>{v.appendChild(d)},1),setTimeout(()=>{},500)})};t.onMount(()=>{const r=setInterval(()=>{u&&o&&b()},1e3);return()=>clearInterval(r)});function j(r){t.binding_callbacks[r?"unshift":"push"](()=>{v=r,n(3,v)})}return a.$$set=r=>{"startdate"in r&&n(0,u=r.startdate),"enddate"in r&&n(1,o=r.enddate),"status"in r&&n(2,c=r.status),"lang"in r&&n(12,h=r.lang),"clientstyling"in r&&n(13,k=r.clientstyling),"clientstylingurl"in r&&n(14,_=r.clientstylingurl),"translationurl"in r&&n(15,m=r.translationurl)},a.$$.update=()=>{a.$$.dirty&19&&n(7,s=()=>{if(D<=0)return 100;const r=w(u,o),d=100/r;return Math.floor((r-D)*d)}),a.$$.dirty&19&&u&&o&&b()&&i(D),a.$$.dirty&4096&&h&&b(),a.$$.dirty&4112&&h&&i(D),a.$$.dirty&32768&&m&&B(),a.$$.dirty&8200&&v&&k&&y(),a.$$.dirty&16392&&v&&_&&R()},[u,o,c,v,D,S,C,s,l,b,f,i,h,k,_,m,j]}class E extends t.SvelteComponent{constructor(e){super(),t.init(this,e,G,W,t.safe_not_equal,{startdate:0,enddate:1,status:2,lang:12,clientstyling:13,clientstylingurl:14,translationurl:15},O)}get startdate(){return this.$$.ctx[0]}set startdate(e){this.$$set({startdate:e}),t.flush()}get enddate(){return this.$$.ctx[1]}set enddate(e){this.$$set({enddate:e}),t.flush()}get status(){return this.$$.ctx[2]}set status(e){this.$$set({status:e}),t.flush()}get lang(){return this.$$.ctx[12]}set lang(e){this.$$set({lang:e}),t.flush()}get clientstyling(){return this.$$.ctx[13]}set clientstyling(e){this.$$set({clientstyling:e}),t.flush()}get clientstylingurl(){return this.$$.ctx[14]}set clientstylingurl(e){this.$$set({clientstylingurl:e}),t.flush()}get translationurl(){return this.$$.ctx[15]}set translationurl(e){this.$$set({translationurl:e}),t.flush()}}t.create_custom_element(E,{startdate:{},enddate:{},status:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{}},[],[],!0);exports.default=E;
|
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
import { a as Y, S as Z, i as J, f as C, c as Q, s as V, b as X, e as D, d as l, h as B, n as U, j as w, k as x, w as $, t as z, m as I, o as m, A as tt, p as M, u as et, D as A, $ as nt } from "./CasinoTournamentsController-o9ci4V-7.js";
|
|
2
|
+
function N(s, t) {
|
|
3
|
+
Y(s, t);
|
|
4
|
+
}
|
|
5
|
+
const O = {
|
|
6
|
+
en: {
|
|
7
|
+
tournamentsDuration: {
|
|
8
|
+
finished: "Finished",
|
|
9
|
+
starting: "Starting in ",
|
|
10
|
+
left: "left",
|
|
11
|
+
minutes: "minutes",
|
|
12
|
+
hours: "hours",
|
|
13
|
+
days: "days"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
hr: {
|
|
17
|
+
tournamentsDuration: {
|
|
18
|
+
finished: "Završeno",
|
|
19
|
+
starting: "Starting in ",
|
|
20
|
+
left: "preostalo",
|
|
21
|
+
minutes: "minute",
|
|
22
|
+
hours: "sati",
|
|
23
|
+
days: "dana"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"zh-hk": {
|
|
27
|
+
tournamentsDuration: {
|
|
28
|
+
finished: "完成的",
|
|
29
|
+
starting: "開始於",
|
|
30
|
+
left: "剩下",
|
|
31
|
+
minutes: "分鐘",
|
|
32
|
+
hours: "小時",
|
|
33
|
+
days: "天"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
fr: {
|
|
37
|
+
tournamentsDuration: {
|
|
38
|
+
finished: "Fini",
|
|
39
|
+
starting: "Début dans ",
|
|
40
|
+
left: "restant",
|
|
41
|
+
minutes: "minutes",
|
|
42
|
+
hours: "heures",
|
|
43
|
+
days: "jours"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
ro: {
|
|
47
|
+
tournamentsDuration: {
|
|
48
|
+
finished: "Finalizat",
|
|
49
|
+
starting: "Începe în",
|
|
50
|
+
left: "rămase",
|
|
51
|
+
minutes: "minute",
|
|
52
|
+
hours: "ore",
|
|
53
|
+
days: "zile"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
tr: {
|
|
57
|
+
tournamentsDuration: {
|
|
58
|
+
finished: "Bitti",
|
|
59
|
+
starting: "İçinde başlayan",
|
|
60
|
+
left: "sol",
|
|
61
|
+
minutes: "dakika",
|
|
62
|
+
hours: "saat",
|
|
63
|
+
days: "günler"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
el: {
|
|
67
|
+
tournamentsDuration: {
|
|
68
|
+
finished: "Ολοκληρωμένα",
|
|
69
|
+
starting: "Αρχίζει σε ",
|
|
70
|
+
left: "απομένουν",
|
|
71
|
+
minutes: "λεπτά",
|
|
72
|
+
hours: "ώρες",
|
|
73
|
+
days: "ημέρες"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
es: {
|
|
77
|
+
tournamentsDuration: {
|
|
78
|
+
finished: "Finalizado",
|
|
79
|
+
starting: "Iniciando en ",
|
|
80
|
+
left: "queda",
|
|
81
|
+
minutes: "minutos",
|
|
82
|
+
hours: "horas",
|
|
83
|
+
days: "días"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
hu: {
|
|
87
|
+
tournamentsDuration: {
|
|
88
|
+
finished: "Befejezve",
|
|
89
|
+
starting: "Kezdésig",
|
|
90
|
+
left: "bal",
|
|
91
|
+
minutes: "perc",
|
|
92
|
+
hours: "óra",
|
|
93
|
+
days: "nap"
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
pt: {
|
|
97
|
+
tournamentsDuration: {
|
|
98
|
+
finished: "Finalizado",
|
|
99
|
+
starting: "Começando em",
|
|
100
|
+
left: "Abandonou",
|
|
101
|
+
minutes: "Minutos",
|
|
102
|
+
hours: "Horas",
|
|
103
|
+
days: "Dias"
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
function st(s) {
|
|
108
|
+
X(s, "svelte-1hp648c", ".svelte-1hp648c,.svelte-1hp648c::before,.svelte-1hp648c::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.TournamentDates.svelte-1hp648c{margin-left:20px;margin-right:20px;display:flex;justify-content:space-between}.StartDate.svelte-1hp648c{font-size:11px;color:var(--emfe-w-color-gray-300, #58586B)}.EndDate.svelte-1hp648c{font-size:11px;align-content:flex-end;color:var(--emfe-w-color-gray-300, #58586B)}.ProgressBar.svelte-1hp648c{margin:5px 20px;height:8px;background:var(--emfe-w-color-white, #FFFFFF)}.ProgressBarFill.svelte-1hp648c{background-color:var(--emfe-w-color-green, #48952a);height:8px}.ProgressBarFillEnd.svelte-1hp648c{background-color:var(--emfe-w-color-green, #48952a);height:8px}.ProgressBarFillStarting.svelte-1hp648c{background-color:var(--emfe-w-color-gray-300, #58586B);height:8px}.Remaining.svelte-1hp648c,.Finished.svelte-1hp648c{font-size:10px;padding-top:5px;text-align:right;text-transform:uppercase}.Finished.svelte-1hp648c{color:var(--emfe-w-color-green, #48952a)}");
|
|
109
|
+
}
|
|
110
|
+
function H(s) {
|
|
111
|
+
let t, e, i = (
|
|
112
|
+
/*formatDate*/
|
|
113
|
+
s[10](
|
|
114
|
+
/*startdate*/
|
|
115
|
+
s[0]
|
|
116
|
+
) + ""
|
|
117
|
+
), a, u, o, c = (
|
|
118
|
+
/*formatDate*/
|
|
119
|
+
s[10](
|
|
120
|
+
/*enddate*/
|
|
121
|
+
s[1]
|
|
122
|
+
) + ""
|
|
123
|
+
), h, S, y, g, b, F, j;
|
|
124
|
+
function L(r, _) {
|
|
125
|
+
return (
|
|
126
|
+
/*status*/
|
|
127
|
+
r[2] == "Finished" || /*status*/
|
|
128
|
+
r[2] == "Closing" || /*status*/
|
|
129
|
+
r[2] == "Closed" ? at : (
|
|
130
|
+
/*tournamentUntilStartDays*/
|
|
131
|
+
r[5] > 0 ? rt : it
|
|
132
|
+
)
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
let E = L(s), p = E(s);
|
|
136
|
+
function R(r, _) {
|
|
137
|
+
if (
|
|
138
|
+
/*status*/
|
|
139
|
+
r[2] == "Finished" || /*status*/
|
|
140
|
+
r[2] == "Closing" || /*status*/
|
|
141
|
+
r[2] == "Closed"
|
|
142
|
+
) return ut;
|
|
143
|
+
if (
|
|
144
|
+
/*tournamentUntilStartDays*/
|
|
145
|
+
r[5] > 0
|
|
146
|
+
) return ot;
|
|
147
|
+
if (
|
|
148
|
+
/*tournamentLeftDays*/
|
|
149
|
+
r[4] > 0
|
|
150
|
+
) return lt;
|
|
151
|
+
}
|
|
152
|
+
let k = R(s), f = k && k(s);
|
|
153
|
+
return {
|
|
154
|
+
c() {
|
|
155
|
+
t = D("div"), e = D("div"), a = z(i), u = I(), o = D("div"), h = z(c), S = I(), y = D("div"), g = D("div"), p.c(), b = I(), f && f.c(), l(e, "class", "StartDate svelte-1hp648c"), l(e, "part", "StartDate"), l(o, "class", "EndDate svelte-1hp648c"), l(o, "part", "EndDate"), l(t, "class", "TournamentDates svelte-1hp648c"), l(t, "part", "TournamentDates"), l(g, "class", "ProgressBar svelte-1hp648c"), l(g, "part", "ProgressBar"), l(y, "class", "ProgressBarWrapper svelte-1hp648c"), l(y, "part", "ProgressBarWrapper");
|
|
156
|
+
},
|
|
157
|
+
m(r, _) {
|
|
158
|
+
B(r, t, _), m(t, e), m(e, a), m(t, u), m(t, o), m(o, h), B(r, S, _), B(r, y, _), m(y, g), p.m(g, null), m(g, b), f && f.m(g, null), F || (j = tt(
|
|
159
|
+
/*getDuration*/
|
|
160
|
+
s[9].call(null, y)
|
|
161
|
+
), F = !0);
|
|
162
|
+
},
|
|
163
|
+
p(r, _) {
|
|
164
|
+
_ & /*startdate*/
|
|
165
|
+
1 && i !== (i = /*formatDate*/
|
|
166
|
+
r[10](
|
|
167
|
+
/*startdate*/
|
|
168
|
+
r[0]
|
|
169
|
+
) + "") && M(a, i), _ & /*enddate*/
|
|
170
|
+
2 && c !== (c = /*formatDate*/
|
|
171
|
+
r[10](
|
|
172
|
+
/*enddate*/
|
|
173
|
+
r[1]
|
|
174
|
+
) + "") && M(h, c), E === (E = L(r)) && p ? p.p(r, _) : (p.d(1), p = E(r), p && (p.c(), p.m(g, b))), k === (k = R(r)) && f ? f.p(r, _) : (f && f.d(1), f = k && k(r), f && (f.c(), f.m(g, null)));
|
|
175
|
+
},
|
|
176
|
+
d(r) {
|
|
177
|
+
r && (w(t), w(S), w(y)), p.d(), f && f.d(), F = !1, j();
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function it(s) {
|
|
182
|
+
let t;
|
|
183
|
+
return {
|
|
184
|
+
c() {
|
|
185
|
+
t = D("div"), l(t, "class", "ProgressBarFill svelte-1hp648c"), l(t, "part", "ProgressBarFill"), A(
|
|
186
|
+
t,
|
|
187
|
+
"width",
|
|
188
|
+
/*getProgress*/
|
|
189
|
+
s[7]() + "%"
|
|
190
|
+
);
|
|
191
|
+
},
|
|
192
|
+
m(e, i) {
|
|
193
|
+
B(e, t, i);
|
|
194
|
+
},
|
|
195
|
+
p(e, i) {
|
|
196
|
+
i & /*getProgress*/
|
|
197
|
+
128 && A(
|
|
198
|
+
t,
|
|
199
|
+
"width",
|
|
200
|
+
/*getProgress*/
|
|
201
|
+
e[7]() + "%"
|
|
202
|
+
);
|
|
203
|
+
},
|
|
204
|
+
d(e) {
|
|
205
|
+
e && w(t);
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
function rt(s) {
|
|
210
|
+
let t;
|
|
211
|
+
return {
|
|
212
|
+
c() {
|
|
213
|
+
t = D("div"), l(t, "class", "ProgressBarFillStarting svelte-1hp648c"), l(t, "part", "ProgressBarFillStarting");
|
|
214
|
+
},
|
|
215
|
+
m(e, i) {
|
|
216
|
+
B(e, t, i);
|
|
217
|
+
},
|
|
218
|
+
p: U,
|
|
219
|
+
d(e) {
|
|
220
|
+
e && w(t);
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
function at(s) {
|
|
225
|
+
let t;
|
|
226
|
+
return {
|
|
227
|
+
c() {
|
|
228
|
+
t = D("div"), l(t, "class", "ProgressBarFillEnd svelte-1hp648c"), l(t, "part", "ProgressBarFillEnd");
|
|
229
|
+
},
|
|
230
|
+
m(e, i) {
|
|
231
|
+
B(e, t, i);
|
|
232
|
+
},
|
|
233
|
+
p: U,
|
|
234
|
+
d(e) {
|
|
235
|
+
e && w(t);
|
|
236
|
+
}
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
function lt(s) {
|
|
240
|
+
let t, e, i, a = (
|
|
241
|
+
/*$_*/
|
|
242
|
+
s[8]("tournamentsDuration.left") + ""
|
|
243
|
+
), u;
|
|
244
|
+
return {
|
|
245
|
+
c() {
|
|
246
|
+
t = D("div"), e = z(
|
|
247
|
+
/*showRemain*/
|
|
248
|
+
s[6]
|
|
249
|
+
), i = I(), u = z(a), l(t, "class", "Remaining svelte-1hp648c"), l(t, "part", "Remaining");
|
|
250
|
+
},
|
|
251
|
+
m(o, c) {
|
|
252
|
+
B(o, t, c), m(t, e), m(t, i), m(t, u);
|
|
253
|
+
},
|
|
254
|
+
p(o, c) {
|
|
255
|
+
c & /*showRemain*/
|
|
256
|
+
64 && M(
|
|
257
|
+
e,
|
|
258
|
+
/*showRemain*/
|
|
259
|
+
o[6]
|
|
260
|
+
), c & /*$_*/
|
|
261
|
+
256 && a !== (a = /*$_*/
|
|
262
|
+
o[8]("tournamentsDuration.left") + "") && M(u, a);
|
|
263
|
+
},
|
|
264
|
+
d(o) {
|
|
265
|
+
o && w(t);
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
function ot(s) {
|
|
270
|
+
let t, e = (
|
|
271
|
+
/*$_*/
|
|
272
|
+
s[8]("tournamentsDuration.starting") + ""
|
|
273
|
+
), i, a, u = (
|
|
274
|
+
/*getTextByDiff*/
|
|
275
|
+
s[11](
|
|
276
|
+
/*tournamentUntilStartDays*/
|
|
277
|
+
s[5]
|
|
278
|
+
) + ""
|
|
279
|
+
), o;
|
|
280
|
+
return {
|
|
281
|
+
c() {
|
|
282
|
+
t = D("div"), i = z(e), a = I(), o = z(u), l(t, "class", "Remaining svelte-1hp648c"), l(t, "part", "Remaining");
|
|
283
|
+
},
|
|
284
|
+
m(c, h) {
|
|
285
|
+
B(c, t, h), m(t, i), m(t, a), m(t, o);
|
|
286
|
+
},
|
|
287
|
+
p(c, h) {
|
|
288
|
+
h & /*$_*/
|
|
289
|
+
256 && e !== (e = /*$_*/
|
|
290
|
+
c[8]("tournamentsDuration.starting") + "") && M(i, e), h & /*tournamentUntilStartDays*/
|
|
291
|
+
32 && u !== (u = /*getTextByDiff*/
|
|
292
|
+
c[11](
|
|
293
|
+
/*tournamentUntilStartDays*/
|
|
294
|
+
c[5]
|
|
295
|
+
) + "") && M(o, u);
|
|
296
|
+
},
|
|
297
|
+
d(c) {
|
|
298
|
+
c && w(t);
|
|
299
|
+
}
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
function ut(s) {
|
|
303
|
+
let t, e = (
|
|
304
|
+
/*$_*/
|
|
305
|
+
s[8]("tournamentsDuration.finished") + ""
|
|
306
|
+
), i;
|
|
307
|
+
return {
|
|
308
|
+
c() {
|
|
309
|
+
t = D("div"), i = z(e), l(t, "class", "Finished svelte-1hp648c"), l(t, "part", "Finished");
|
|
310
|
+
},
|
|
311
|
+
m(a, u) {
|
|
312
|
+
B(a, t, u), m(t, i);
|
|
313
|
+
},
|
|
314
|
+
p(a, u) {
|
|
315
|
+
u & /*$_*/
|
|
316
|
+
256 && e !== (e = /*$_*/
|
|
317
|
+
a[8]("tournamentsDuration.finished") + "") && M(i, e);
|
|
318
|
+
},
|
|
319
|
+
d(a) {
|
|
320
|
+
a && w(t);
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
}
|
|
324
|
+
function ct(s) {
|
|
325
|
+
let t, e = (
|
|
326
|
+
/*startdate*/
|
|
327
|
+
s[0] && /*enddate*/
|
|
328
|
+
s[1] && H(s)
|
|
329
|
+
);
|
|
330
|
+
return {
|
|
331
|
+
c() {
|
|
332
|
+
t = D("div"), e && e.c(), l(t, "class", "TournamentDuration svelte-1hp648c"), l(t, "part", "TournamentDuration");
|
|
333
|
+
},
|
|
334
|
+
m(i, a) {
|
|
335
|
+
B(i, t, a), e && e.m(t, null), s[16](t);
|
|
336
|
+
},
|
|
337
|
+
p(i, [a]) {
|
|
338
|
+
/*startdate*/
|
|
339
|
+
i[0] && /*enddate*/
|
|
340
|
+
i[1] ? e ? e.p(i, a) : (e = H(i), e.c(), e.m(t, null)) : e && (e.d(1), e = null);
|
|
341
|
+
},
|
|
342
|
+
i: U,
|
|
343
|
+
o: U,
|
|
344
|
+
d(i) {
|
|
345
|
+
i && w(t), e && e.d(), s[16](null);
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
function dt(s, t, e) {
|
|
350
|
+
let i, a;
|
|
351
|
+
x(s, nt, (n) => e(8, a = n));
|
|
352
|
+
let { startdate: u = "" } = t, { enddate: o = "" } = t, { status: c = "" } = t, { lang: h = "en" } = t, { clientstyling: S = "" } = t, { clientstylingurl: y = "" } = t, { translationurl: g = "" } = t, b, F = "", j = "", L = "";
|
|
353
|
+
const E = () => {
|
|
354
|
+
fetch(g).then((d) => d.json()).then((d) => {
|
|
355
|
+
Object.keys(d).forEach((v) => {
|
|
356
|
+
N(v, d[v]);
|
|
357
|
+
});
|
|
358
|
+
}).catch((d) => {
|
|
359
|
+
console.log(d);
|
|
360
|
+
});
|
|
361
|
+
};
|
|
362
|
+
Object.keys(O).forEach((n) => {
|
|
363
|
+
N(n, O[n]);
|
|
364
|
+
});
|
|
365
|
+
const p = (n) => new Date(n).getTime(), R = (n, d) => (p(d) - p(n)) / (1e3 * 60), k = () => {
|
|
366
|
+
const n = /* @__PURE__ */ new Date();
|
|
367
|
+
e(4, F = R(n, o)), e(5, j = R(n, u)), e(6, L = r(F));
|
|
368
|
+
}, f = (n) => {
|
|
369
|
+
const d = { month: "long" };
|
|
370
|
+
let v = new Date(n), P = new Intl.DateTimeFormat(h, d).format(v);
|
|
371
|
+
return `${v.getDate()} ${P}, ${v.toLocaleString("en-GB", { hour: "numeric", minute: "numeric" })}, ${v.getUTCFullYear()}`;
|
|
372
|
+
}, r = (n) => {
|
|
373
|
+
const d = (P, T) => P + " " + a(T), v = (P) => {
|
|
374
|
+
const T = Math.floor(P);
|
|
375
|
+
return T < 10 ? `0${T}` : `${T}`;
|
|
376
|
+
};
|
|
377
|
+
if (n < 1440) {
|
|
378
|
+
const P = n / 60, T = n % 60, G = (T - Math.floor(T)) * 60;
|
|
379
|
+
return [P, T, G].map((K) => v(K)).join(":");
|
|
380
|
+
}
|
|
381
|
+
return d(Math.ceil(n / (60 * 24)), "tournamentsDuration.days");
|
|
382
|
+
}, _ = () => {
|
|
383
|
+
let n = document.createElement("style");
|
|
384
|
+
n.innerHTML = S, b.appendChild(n);
|
|
385
|
+
}, q = () => {
|
|
386
|
+
let n = new URL(y), d = document.createElement("style");
|
|
387
|
+
fetch(n.href).then((v) => v.text()).then((v) => {
|
|
388
|
+
d.innerHTML = v, setTimeout(
|
|
389
|
+
() => {
|
|
390
|
+
b.appendChild(d);
|
|
391
|
+
},
|
|
392
|
+
1
|
|
393
|
+
), setTimeout(
|
|
394
|
+
() => {
|
|
395
|
+
},
|
|
396
|
+
500
|
|
397
|
+
);
|
|
398
|
+
});
|
|
399
|
+
};
|
|
400
|
+
$(() => {
|
|
401
|
+
const n = setInterval(
|
|
402
|
+
() => {
|
|
403
|
+
u && o && k();
|
|
404
|
+
},
|
|
405
|
+
1e3
|
|
406
|
+
);
|
|
407
|
+
return () => clearInterval(n);
|
|
408
|
+
});
|
|
409
|
+
function W(n) {
|
|
410
|
+
et[n ? "unshift" : "push"](() => {
|
|
411
|
+
b = n, e(3, b);
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
return s.$$set = (n) => {
|
|
415
|
+
"startdate" in n && e(0, u = n.startdate), "enddate" in n && e(1, o = n.enddate), "status" in n && e(2, c = n.status), "lang" in n && e(12, h = n.lang), "clientstyling" in n && e(13, S = n.clientstyling), "clientstylingurl" in n && e(14, y = n.clientstylingurl), "translationurl" in n && e(15, g = n.translationurl);
|
|
416
|
+
}, s.$$.update = () => {
|
|
417
|
+
s.$$.dirty & /*tournamentLeftDays, startdate, enddate*/
|
|
418
|
+
19 && e(7, i = () => {
|
|
419
|
+
if (F <= 0) return 100;
|
|
420
|
+
const n = R(u, o), d = 100 / n;
|
|
421
|
+
return Math.floor((n - F) * d);
|
|
422
|
+
}), s.$$.dirty & /*startdate, enddate, tournamentLeftDays*/
|
|
423
|
+
19 && u && o && k() && r(F), s.$$.dirty & /*lang*/
|
|
424
|
+
4096 && h && k(), s.$$.dirty & /*lang, tournamentLeftDays*/
|
|
425
|
+
4112 && h && r(F), s.$$.dirty & /*translationurl*/
|
|
426
|
+
32768 && g && E(), s.$$.dirty & /*customStylingContainer, clientstyling*/
|
|
427
|
+
8200 && b && S && _(), s.$$.dirty & /*customStylingContainer, clientstylingurl*/
|
|
428
|
+
16392 && b && y && q();
|
|
429
|
+
}, [
|
|
430
|
+
u,
|
|
431
|
+
o,
|
|
432
|
+
c,
|
|
433
|
+
b,
|
|
434
|
+
F,
|
|
435
|
+
j,
|
|
436
|
+
L,
|
|
437
|
+
i,
|
|
438
|
+
a,
|
|
439
|
+
k,
|
|
440
|
+
f,
|
|
441
|
+
r,
|
|
442
|
+
h,
|
|
443
|
+
S,
|
|
444
|
+
y,
|
|
445
|
+
g,
|
|
446
|
+
W
|
|
447
|
+
];
|
|
448
|
+
}
|
|
449
|
+
class ft extends Z {
|
|
450
|
+
constructor(t) {
|
|
451
|
+
super(), J(
|
|
452
|
+
this,
|
|
453
|
+
t,
|
|
454
|
+
dt,
|
|
455
|
+
ct,
|
|
456
|
+
V,
|
|
457
|
+
{
|
|
458
|
+
startdate: 0,
|
|
459
|
+
enddate: 1,
|
|
460
|
+
status: 2,
|
|
461
|
+
lang: 12,
|
|
462
|
+
clientstyling: 13,
|
|
463
|
+
clientstylingurl: 14,
|
|
464
|
+
translationurl: 15
|
|
465
|
+
},
|
|
466
|
+
st
|
|
467
|
+
);
|
|
468
|
+
}
|
|
469
|
+
get startdate() {
|
|
470
|
+
return this.$$.ctx[0];
|
|
471
|
+
}
|
|
472
|
+
set startdate(t) {
|
|
473
|
+
this.$$set({ startdate: t }), C();
|
|
474
|
+
}
|
|
475
|
+
get enddate() {
|
|
476
|
+
return this.$$.ctx[1];
|
|
477
|
+
}
|
|
478
|
+
set enddate(t) {
|
|
479
|
+
this.$$set({ enddate: t }), C();
|
|
480
|
+
}
|
|
481
|
+
get status() {
|
|
482
|
+
return this.$$.ctx[2];
|
|
483
|
+
}
|
|
484
|
+
set status(t) {
|
|
485
|
+
this.$$set({ status: t }), C();
|
|
486
|
+
}
|
|
487
|
+
get lang() {
|
|
488
|
+
return this.$$.ctx[12];
|
|
489
|
+
}
|
|
490
|
+
set lang(t) {
|
|
491
|
+
this.$$set({ lang: t }), C();
|
|
492
|
+
}
|
|
493
|
+
get clientstyling() {
|
|
494
|
+
return this.$$.ctx[13];
|
|
495
|
+
}
|
|
496
|
+
set clientstyling(t) {
|
|
497
|
+
this.$$set({ clientstyling: t }), C();
|
|
498
|
+
}
|
|
499
|
+
get clientstylingurl() {
|
|
500
|
+
return this.$$.ctx[14];
|
|
501
|
+
}
|
|
502
|
+
set clientstylingurl(t) {
|
|
503
|
+
this.$$set({ clientstylingurl: t }), C();
|
|
504
|
+
}
|
|
505
|
+
get translationurl() {
|
|
506
|
+
return this.$$.ctx[15];
|
|
507
|
+
}
|
|
508
|
+
set translationurl(t) {
|
|
509
|
+
this.$$set({ translationurl: t }), C();
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
Q(ft, { startdate: {}, enddate: {}, status: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
|
|
513
|
+
export {
|
|
514
|
+
ft as default
|
|
515
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./CasinoTournamentsController-DZ0LEvCR.cjs");function A(t,r){e.addMessages(t,r)}const q={en:{gamesSlider:{playNow:"Play now"}},hr:{gamesSlider:{playNow:"Započni sada"}},"zh-hk":{gamesSlider:{playNow:"现在播放"}},fr:{gamesSlider:{playNow:"Joue maintenant"}},ro:{gamesSlider:{playNow:"Joaca acum"}},tr:{gamesSlider:{playNow:"Şimdi oyna"}},el:{gamesSlider:{playNow:"Παίξε τώρα"}},es:{gamesSlider:{playNow:"Jugar Ya"}},pt:{gamesSlider:{playNow:"Jogue agora"}}};function ie(t){e.append_styles(t,"svelte-erkhk0",".svelte-erkhk0.svelte-erkhk0,.svelte-erkhk0.svelte-erkhk0::before,.svelte-erkhk0.svelte-erkhk0::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.TournamentsGamesSlider.svelte-erkhk0.svelte-erkhk0{background:var(--emfe-w-color-contrast, #07072A);color:var(--emfe-w-color-white, #FFFFFF);display:flex;justify-content:center}.disabled.svelte-erkhk0.svelte-erkhk0{color:var(--emfe-w-color-contrast, #07072A)}.SliderNavButton.svelte-erkhk0.svelte-erkhk0{background:var(--emfe-w-color-contrast, #07072A);border:0px;width:25px;display:flex;align-items:center;justify-content:center}.SliderNavButton.svelte-erkhk0 svg.svelte-erkhk0{width:20px}main.svelte-erkhk0.svelte-erkhk0{width:95%;overflow:hidden}.items.svelte-erkhk0.svelte-erkhk0{display:flex;transition:transform 0.4s ease-in-out;transform:translateX(0px)}.item.svelte-erkhk0.svelte-erkhk0{min-width:119px;height:96px;margin:0 4px;background-color:var(--emfe-w-color-secondary, #FD2839);color:white;display:flex;justify-content:center;align-items:center;font-weight:bold;font-size:10rem;user-select:none;overflow:hidden}.PlayNowButton.svelte-erkhk0.svelte-erkhk0{position:absolute;background:var(--emfe-w-color-green, #48952a);display:block;box-sizing:border-box;padding:0.8rem 0.5rem;color:var(--emfe-w-color-white, #FFFFFF);text-transform:uppercase;text-align:center;font-weight:600;font-size:0.7rem;cursor:pointer;transition:opacity 0.4s linear;opacity:0;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.itemHover.svelte-erkhk0.svelte-erkhk0{opacity:1}.items.svelte-erkhk0 .item.svelte-erkhk0:first-child{margin-left:0}.items.svelte-erkhk0 .item.svelte-erkhk0:last-child{margin-right:0}")}function D(t,r,l){const i=t.slice();return i[50]=r[l],i[52]=l,i}function I(t){let r,l,i,u,d,k,p,a,v,_,g=e.ensure_array_like(t[1]),c=[];for(let s=0;s<g.length;s+=1)c[s]=W(D(t,g,s));return{c(){r=e.element("div"),l=e.element("div"),l.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="svelte-erkhk0"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" class="svelte-erkhk0"></path></svg>',i=e.space(),u=e.element("main"),d=e.element("div");for(let s=0;s<c.length;s+=1)c[s].c();p=e.space(),a=e.element("div"),a.innerHTML='<svg fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" class="svelte-erkhk0"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" class="svelte-erkhk0"></path></svg>',e.attr(l,"class","SliderNavButton svelte-erkhk0"),e.attr(l,"part","SliderNavButton"),e.toggle_class(l,"disabled",t[8]),e.attr(d,"class","items svelte-erkhk0"),e.attr(d,"part","items"),e.set_style(d,"transform","translateX("+t[2]+"px)"),e.attr(u,"class","svelte-erkhk0"),e.add_render_callback(()=>t[28].call(u)),e.attr(a,"class","SliderNavButton svelte-erkhk0"),e.attr(a,"part","SliderNavButton"),e.toggle_class(a,"disabled",t[9]),e.attr(r,"class","TournamentsGamesSlider svelte-erkhk0"),e.attr(r,"part","TournamentsGamesSlider")},m(s,y){e.insert(s,r,y),e.append(r,l),e.append(r,i),e.append(r,u),e.append(u,d);for(let o=0;o<c.length;o+=1)c[o]&&c[o].m(d,null);t[27](d),k=e.add_iframe_resize_listener(u,t[28].bind(u)),e.append(r,p),e.append(r,a),t[30](r),v||(_=[e.listen(l,"click",t[23]),e.listen(a,"click",t[29])],v=!0)},p(s,y){if(y[0]&256&&e.toggle_class(l,"disabled",s[8]),y[0]&23650){g=e.ensure_array_like(s[1]);let o;for(o=0;o<g.length;o+=1){const w=D(s,g,o);c[o]?c[o].p(w,y):(c[o]=W(w),c[o].c(),c[o].m(d,null))}for(;o<c.length;o+=1)c[o].d(1);c.length=g.length}y[0]&4&&e.set_style(d,"transform","translateX("+s[2]+"px)"),y[0]&512&&e.toggle_class(a,"disabled",s[9])},d(s){s&&e.detach(r),e.destroy_each(c,s),t[27](null),k(),t[30](null),v=!1,e.run_all(_)}}}function W(t){let r,l,i=t[10]("gamesSlider.playNow")+"",u,d,k,p,a,v,_,g,c,s,y;function o(){return t[24](t[50])}function w(){return t[25](t[52])}return{c(){r=e.element("div"),l=e.element("span"),u=e.text(i),p=e.space(),a=e.element("img"),c=e.space(),e.attr(l,"class",d="PlayNowButton "+(t[5]&&t[6]==t[52]?"itemHover":"")+" svelte-erkhk0"),e.attr(l,"part",k="PlayNowButton "+(t[5]&&t[6]==t[52]?"itemHover":"")),e.src_url_equal(a.src,v=t[50].thumbnail)||e.attr(a,"src",v),e.attr(a,"width","132px"),e.attr(a,"height","100px"),e.attr(a,"alt",_=t[50].name),e.attr(a,"title",g=t[50].name),e.attr(a,"class","svelte-erkhk0"),e.attr(r,"class","item svelte-erkhk0"),e.attr(r,"part","item")},m(h,m){e.insert(h,r,m),e.append(r,l),e.append(l,u),e.append(r,p),e.append(r,a),e.append(r,c),s||(y=[e.listen(r,"click",o),e.listen(r,"mouseenter",w),e.listen(r,"mouseleave",t[26])],s=!0)},p(h,m){t=h,m[0]&1024&&i!==(i=t[10]("gamesSlider.playNow")+"")&&e.set_data(u,i),m[0]&96&&d!==(d="PlayNowButton "+(t[5]&&t[6]==t[52]?"itemHover":"")+" svelte-erkhk0")&&e.attr(l,"class",d),m[0]&96&&k!==(k="PlayNowButton "+(t[5]&&t[6]==t[52]?"itemHover":""))&&e.attr(l,"part",k),m[0]&2&&!e.src_url_equal(a.src,v=t[50].thumbnail)&&e.attr(a,"src",v),m[0]&2&&_!==(_=t[50].name)&&e.attr(a,"alt",_),m[0]&2&&g!==(g=t[50].name)&&e.attr(a,"title",g)},d(h){h&&e.detach(r),s=!1,e.run_all(y)}}}function oe(t){let r,l=t[1]&&t[1].length>0&&I(t);return{c(){r=e.element("div"),l&&l.c(),e.attr(r,"class","svelte-erkhk0")},m(i,u){e.insert(i,r,u),l&&l.m(r,null),t[31](r)},p(i,u){i[1]&&i[1].length>0?l?l.p(i,u):(l=I(i),l.c(),l.m(r,null)):l&&(l.d(1),l=null)},i:e.noop,o:e.noop,d(i){i&&e.detach(r),l&&l.d(),t[31](null)}}}let ce=30;function ue(t,r,l){let i,u,d;e.component_subscribe(t,e.$format,n=>l(10,d=n));let{tournamenturl:k=""}=r,{scrollby:p="3"}=r,{pagfactor:a="175"}=r,{lang:v=""}=r,{translationurl:_=""}=r,{clientstyling:g=""}=r,{clientstylingurl:c=""}=r,s,y=window.navigator.userAgent,o,w=[],h=0,m,P=null,E=null,B=!1,L,T,M=0,S;const O=()=>{fetch(_).then(f=>f.json()).then(f=>{Object.keys(f).forEach(b=>{A(b,f[b])})}).catch(f=>{console.log(f)})};Object.keys(q).forEach(n=>{A(n,q[n])});const C=n=>{l(5,B=!0),l(6,L=n)},H=()=>{l(5,B=!1),l(6,L=-1)},R=n=>n.touches||n.originalEvent.touches,j=n=>{const f=R(n)[0];P=f.clientX,E=f.clientY},z=n=>{if(!P||!E)return;let f=n.touches[0].clientX,b=n.touches[0].clientY,N=P-f,ae=E-b;Math.abs(N)>Math.abs(ae)&&(N>0?F(1):F(-1)),P=null,E=null},F=n=>{n>0&&!u?(l(2,h-=o),l(2,h=h<M?M:h)):n<0&&!i&&(l(2,h+=o),l(2,h=h>0?0:h))},U=n=>{window.postMessage({type:"TournamentGameAction",gameId:n.id,name:n.name,launchUrl:n.launchUrl},window.location.href)},X=()=>{let n=new URL(k),f=new Headers;n.searchParams.append("expand","games"),n.searchParams.append("pagination",`games(limit=${ce},offset=${h})`),n.searchParams.append("fields","games(id,name,thumbnail,launchUrl)"),n.searchParams.append("language",v),n.searchParams.append("platform",e.getDevice(y)),fetch(n,{method:"GET",headers:f}).then(N=>N.json()).then(N=>{l(1,w=N.item.games.items),N.item.games.total})},J=()=>{m.addEventListener("touchstart",j,{passive:!0}),m.addEventListener("touchmove",z,{passive:!0})},Y=()=>{setTimeout(()=>{l(22,M=(T.scrollWidth-T.clientWidth)*-1),l(16,a=new String(T.scrollWidth/w.length)),o=parseInt(p,10)*parseFloat(a,2).toFixed(2)},1e3)},Z=()=>{let n=document.createElement("style");n.innerHTML=g,s.appendChild(n)},K=()=>{let n=new URL(c),f=document.createElement("style");fetch(n.href).then(b=>b.text()).then(b=>{f.innerHTML=b,setTimeout(()=>{s.appendChild(f)},1),setTimeout(()=>{},500)})},Q=()=>{S>0&&S<Math.floor((parseInt(p)+1)*a)&&l(15,p=Math.ceil(S/a).toString())};e.onMount(()=>(o=parseInt(p,10)*parseInt(a,10),()=>{m.removeEventListener("touchstart",j),m.removeEventListener("touchmove",z)}));const V=()=>F(-1),x=n=>U(n),$=n=>C(n),ee=()=>H();function te(n){e.binding_callbacks[n?"unshift":"push"](()=>{T=n,l(7,T)})}function le(){S=this.clientWidth,l(4,S)}const ne=()=>F(1);function re(n){e.binding_callbacks[n?"unshift":"push"](()=>{m=n,l(3,m)})}function se(n){e.binding_callbacks[n?"unshift":"push"](()=>{s=n,l(0,s)})}return t.$$set=n=>{"tournamenturl"in n&&l(17,k=n.tournamenturl),"scrollby"in n&&l(15,p=n.scrollby),"pagfactor"in n&&l(16,a=n.pagfactor),"lang"in n&&l(18,v=n.lang),"translationurl"in n&&l(19,_=n.translationurl),"clientstyling"in n&&l(20,g=n.clientstyling),"clientstylingurl"in n&&l(21,c=n.clientstylingurl)},t.$$.update=()=>{t.$$.dirty[0]&4&&l(8,i=h===0),t.$$.dirty[0]&4194308&&l(9,u=h<=M),t.$$.dirty[0]&16&&S&&Q(),t.$$.dirty[0]&131072&&k&&X(),t.$$.dirty[0]&8&&m&&J(),t.$$.dirty[0]&524288&&_&&O(),t.$$.dirty[0]&2&&w.length&&Y(),t.$$.dirty[0]&1048577&&g&&s&&Z(),t.$$.dirty[0]&2097153&&c&&s&&K()},l(2,h=0),[s,w,h,m,S,B,L,T,i,u,d,C,H,F,U,p,a,k,v,_,g,c,M,V,x,$,ee,te,le,ne,re,se]}class G extends e.SvelteComponent{constructor(r){super(),e.init(this,r,ue,oe,e.safe_not_equal,{tournamenturl:17,scrollby:15,pagfactor:16,lang:18,translationurl:19,clientstyling:20,clientstylingurl:21},ie,[-1,-1])}get tournamenturl(){return this.$$.ctx[17]}set tournamenturl(r){this.$$set({tournamenturl:r}),e.flush()}get scrollby(){return this.$$.ctx[15]}set scrollby(r){this.$$set({scrollby:r}),e.flush()}get pagfactor(){return this.$$.ctx[16]}set pagfactor(r){this.$$set({pagfactor:r}),e.flush()}get lang(){return this.$$.ctx[18]}set lang(r){this.$$set({lang:r}),e.flush()}get translationurl(){return this.$$.ctx[19]}set translationurl(r){this.$$set({translationurl:r}),e.flush()}get clientstyling(){return this.$$.ctx[20]}set clientstyling(r){this.$$set({clientstyling:r}),e.flush()}get clientstylingurl(){return this.$$.ctx[21]}set clientstylingurl(r){this.$$set({clientstylingurl:r}),e.flush()}}e.create_custom_element(G,{tournamenturl:{},scrollby:{},pagfactor:{},lang:{},translationurl:{},clientstyling:{},clientstylingurl:{}},[],[],!0);exports.default=G;
|