@everymatrix/casino-tournaments-controller 1.54.6 → 1.54.8
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-B6mh3T8V.js → CasinoTournamentsController-D3kqTQoy.js} +442 -450
- package/components/CasinoTournamentsController-DeYJxMsf.js +5639 -0
- package/components/CasinoTournamentsController-Y02EoFCS.cjs +14 -0
- package/components/{CasinoTournamentsFilterController-crq752J3.js → CasinoTournamentsFilterController-Bi4mtrGz.js} +20 -20
- package/components/CasinoTournamentsFilterController-Pk2Wa5yj.js +536 -0
- package/components/CasinoTournamentsFilterController-fOgvqafN.cjs +1 -0
- package/components/{CasinoTournamentsListController-BHaCpLNs.js → CasinoTournamentsListController-BLr2UHB9.js} +21 -21
- package/components/CasinoTournamentsListController-Bkpb3QRw.cjs +13 -0
- package/components/CasinoTournamentsListController-CPTUlGJx.js +3117 -0
- package/components/{CasinoTournamentsThumbnail-BpY5tzvh.js → CasinoTournamentsThumbnail-8YRhmoBw.js} +36 -36
- package/components/CasinoTournamentsThumbnail-L4q_bfod.js +896 -0
- package/components/CasinoTournamentsThumbnail-bO_BSouL.cjs +4 -0
- package/components/{CasinoTournamentsThumbnailController-CmauHmt0.js → CasinoTournamentsThumbnailController-BWFh-Hhd.js} +73 -73
- package/components/CasinoTournamentsThumbnailController-CuHFVK14.cjs +1 -0
- package/components/CasinoTournamentsThumbnailController-Dr72UUqk.js +1417 -0
- package/components/CasinoTournamentsThumbnailDuration-BC5szfDe.cjs +1 -0
- package/components/CasinoTournamentsThumbnailDuration-CLfidISH.js +504 -0
- package/components/{CasinoTournamentsThumbnailDuration-Bl9YXTWz.js → CasinoTournamentsThumbnailDuration-CpyA1Eo1.js} +40 -40
- package/components/CasinoTournamentsThumbnailGamesSlider-BaWB-VH_.js +441 -0
- package/components/CasinoTournamentsThumbnailGamesSlider-DRGprCzj.cjs +1 -0
- package/components/{CasinoTournamentsThumbnailGamesSlider-7LdDhi2Q.js → CasinoTournamentsThumbnailGamesSlider-DhPlpDeb.js} +37 -37
- package/components/CasinoTournamentsThumbnailPrizes-BteGHS2o.js +315 -0
- package/components/CasinoTournamentsThumbnailPrizes-DeYHCkas.cjs +1 -0
- package/components/{CasinoTournamentsThumbnailPrizes-nDu0SMUv.js → CasinoTournamentsThumbnailPrizes-wp2hG8Ny.js} +15 -15
- package/es2015/casino-tournaments-controller.cjs +1 -0
- package/es2015/casino-tournaments-controller.js +16 -0
- package/esnext/casino-tournaments-controller.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./CasinoTournamentsController-Y02EoFCS.cjs");function C(r,e){t.addMessages(r,e)}const M={en:{finished:"Finished",starting:"Starting in ",left:"left",minutes:"minutes",hours:"hours",days:"days"},hr:{finished:"Završeno",starting:"Starting in ",left:"preostalo",minutes:"minute",hours:"sati",days:"dana"},"zh-hk":{finished:"完成的",starting:"開始於",left:"剩下",minutes:"分鐘",hours:"小時",days:"天"},fr:{finished:"Fini",starting:"Début dans ",left:"restant",minutes:"minutes",hours:"heures",days:"jours"},ro:{finished:"Finalizat",starting:"Începe în",left:"rămase",minutes:"minute",hours:"ore",days:"zile"},tr:{finished:"Bitti",starting:"İçinde başlayan",left:"sol",minutes:"dakika",hours:"saat",days:"günler"},el:{finished:"Ολοκληρωμένα",starting:"Αρχίζει σε ",left:"απομένουν",minutes:"λεπτά",hours:"ώρες",days:"ημέρες"},es:{finished:"Finalizado",starting:"Iniciando en ",left:"queda",minutes:"minutos",hours:"horas",days:"días"},hu:{finished:"Befejezve",starting:"Kezdésig",left:"bal",minutes:"perc",hours:"óra",days:"nap"},pt:{finished:"Finalizado",starting:"Começando em",left:"Abandonou",minutes:"Minutos",hours:"Horas",days:"Dias"},"en-us":{finished:"Finished",starting:"Starting in ",left:"left",minutes:"minutes",hours:"hours",days:"days"}};function L(r){t.append_styles(r,"svelte-6h4bfy","*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.TournamentDates{margin-left:20px;margin-right:20px;display:flex;justify-content:space-between}.StartDate{font-size:11px;color:var(--emw--color-gray-300, #58586B)}.EndDate{font-size:11px;align-content:flex-end;color:var(--emw--color-gray-300, #58586B)}.ProgressBar{margin:5px 20px;height:8px;background:var(--emw--color-white, #FFFFFF)}.ProgressBarInactive{margin:5px 20px 10px 20px;height:8px;background:var(--emw--color-gray-100, #E6E6E6)}.ProgressBarFill{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillEnd{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillStarting{background-color:var(--emw--color-gray-300, #58586B);height:8px}.Remaining,.Finished{font-size:10px;padding-top:5px;text-align:right;text-transform:uppercase}.Finished{color:var(--emw--color-green, #48952a)}")}function E(r){let e,n,a=r[10](r[0])+"",l,u,o,d=r[10](r[1])+"",g,T,y,h,b,v,S;function P(s,_){return s[2]=="Finished"||s[2]=="Closing"||s[2]=="Closed"?N:s[5]>0?U:O}let w=P(r),m=w(r);function B(s,_){if(s[2]=="Finished"||s[2]=="Closing"||s[2]=="Closed")return H;if(s[5]>0)return A;if(s[4]>0)return q}let D=B(r),f=D&&D(r);return{c(){e=t.element("div"),n=t.element("div"),l=t.text(a),u=t.space(),o=t.element("div"),g=t.text(d),T=t.space(),y=t.element("div"),h=t.element("div"),m.c(),b=t.space(),f&&f.c(),t.attr(n,"class","StartDate"),t.attr(n,"part","StartDate"),t.attr(o,"class","EndDate"),t.attr(o,"part","EndDate"),t.attr(e,"class","TournamentDates"),t.attr(e,"part","TournamentDates"),t.attr(h,"class","ProgressBar"),t.attr(h,"part","ProgressBar"),t.attr(y,"class","ProgressBarWrapper"),t.attr(y,"part","ProgressBarWrapper")},m(s,_){t.insert(s,e,_),t.append(e,n),t.append(n,l),t.append(e,u),t.append(e,o),t.append(o,g),t.insert(s,T,_),t.insert(s,y,_),t.append(y,h),m.m(h,null),t.append(h,b),f&&f.m(h,null),v||(S=t.action_destroyer(r[9].call(null,y)),v=!0)},p(s,_){_&1&&a!==(a=s[10](s[0])+"")&&t.set_data(l,a),_&2&&d!==(d=s[10](s[1])+"")&&t.set_data(g,d),w===(w=P(s))&&m?m.p(s,_):(m.d(1),m=w(s),m&&(m.c(),m.m(h,b))),D===(D=B(s))&&f?f.p(s,_):(f&&f.d(1),f=D&&D(s),f&&(f.c(),f.m(h,null)))},d(s){s&&(t.detach(e),t.detach(T),t.detach(y)),m.d(),f&&f.d(),v=!1,S()}}}function O(r){let e;return{c(){e=t.element("div"),t.attr(e,"class","ProgressBarFill"),t.attr(e,"part","ProgressBarFill"),t.set_style(e,"width",r[7]()+"%")},m(n,a){t.insert(n,e,a)},p(n,a){a&128&&t.set_style(e,"width",n[7]()+"%")},d(n){n&&t.detach(e)}}}function U(r){let e;return{c(){e=t.element("div"),t.attr(e,"class","ProgressBarFillStarting"),t.attr(e,"part","ProgressBarFillStarting")},m(n,a){t.insert(n,e,a)},p:t.noop,d(n){n&&t.detach(e)}}}function N(r){let e;return{c(){e=t.element("div"),t.attr(e,"class","ProgressBarFillEnd"),t.attr(e,"part","ProgressBarFillEnd")},m(n,a){t.insert(n,e,a)},p:t.noop,d(n){n&&t.detach(e)}}}function q(r){let e,n,a,l=r[8]("left")+"",u;return{c(){e=t.element("div"),n=t.text(r[6]),a=t.space(),u=t.text(l),t.attr(e,"class","Remaining"),t.attr(e,"part","Remaining")},m(o,d){t.insert(o,e,d),t.append(e,n),t.append(e,a),t.append(e,u)},p(o,d){d&64&&t.set_data(n,o[6]),d&256&&l!==(l=o[8]("left")+"")&&t.set_data(u,l)},d(o){o&&t.detach(e)}}}function A(r){let e,n=r[8]("starting")+"",a,l,u=r[11](r[5])+"",o;return{c(){e=t.element("div"),a=t.text(n),l=t.space(),o=t.text(u),t.attr(e,"class","Remaining"),t.attr(e,"part","Remaining")},m(d,g){t.insert(d,e,g),t.append(e,a),t.append(e,l),t.append(e,o)},p(d,g){g&256&&n!==(n=d[8]("starting")+"")&&t.set_data(a,n),g&32&&u!==(u=d[11](d[5])+"")&&t.set_data(o,u)},d(d){d&&t.detach(e)}}}function H(r){let e,n=r[8]("finished")+"",a;return{c(){e=t.element("div"),a=t.text(n),t.attr(e,"class","Finished"),t.attr(e,"part","Finished")},m(l,u){t.insert(l,e,u),t.append(e,a)},p(l,u){u&256&&n!==(n=l[8]("finished")+"")&&t.set_data(a,n)},d(l){l&&t.detach(e)}}}function W(r){let e,n=r[0]&&r[1]&&E(r);return{c(){e=t.element("div"),n&&n.c(),t.attr(e,"class","TournamentDuration"),t.attr(e,"part","TournamentDuration")},m(a,l){t.insert(a,e,l),n&&n.m(e,null),r[16](e)},p(a,[l]){a[0]&&a[1]?n?n.p(a,l):(n=E(a),n.c(),n.m(e,null)):n&&(n.d(1),n=null)},i:t.noop,o:t.noop,d(a){a&&t.detach(e),n&&n.d(),r[16](null)}}}function G(r,e,n){let a,l;t.component_subscribe(r,t.$format,i=>n(8,l=i));let{startdate:u=""}=e,{enddate:o=""}=e,{status:d=""}=e,{lang:g="en"}=e,{clientstyling:T=""}=e,{clientstylingurl:y=""}=e,{translationurl:h=""}=e,b,v="",S="",P="";const w=()=>{fetch(h).then(c=>c.json()).then(c=>{Object.keys(c).forEach(p=>{C(p,c[p])})}).catch(c=>{console.log(c)})};Object.keys(M).forEach(i=>{C(i,M[i])});const m=i=>new Date(i).getTime(),B=(i,c)=>(m(c)-m(i))/(1e3*60),D=()=>{const i=new Date;n(4,v=B(i,o)),n(5,S=B(i,u)),n(6,P=s(v))},f=i=>{const c={month:"long"};let p=new Date(i),k=new Intl.DateTimeFormat(g,c).format(p);return`${p.getDate()} ${k}, ${p.toLocaleString("en-GB",{hour:"numeric",minute:"numeric"})}, ${p.getUTCFullYear()}`},s=i=>{const c=(k,F)=>k+" "+l(F),p=k=>{const F=Math.floor(k);return F<10?`0${F}`:`${F}`};if(i<1440){const k=i/60,F=i%60,x=(F-Math.floor(F))*60;return[k,F,x].map(I=>p(I)).join(":")}return c(Math.ceil(i/(60*24)),"days")},_=()=>{let i=document.createElement("style");i.innerHTML=T,b.appendChild(i)},R=()=>{let i=new URL(y),c=document.createElement("style");fetch(i.href).then(p=>p.text()).then(p=>{c.innerHTML=p,setTimeout(()=>{b.appendChild(c)},1),setTimeout(()=>{},500)})};t.onMount(()=>{window.postMessage({type:"TournamentThumbnailMounted"},window.location.href);const i=setInterval(()=>{u&&o&&D()},1e3);return()=>clearInterval(i)});function j(i){t.binding_callbacks[i?"unshift":"push"](()=>{b=i,n(3,b)})}return r.$$set=i=>{"startdate"in i&&n(0,u=i.startdate),"enddate"in i&&n(1,o=i.enddate),"status"in i&&n(2,d=i.status),"lang"in i&&n(12,g=i.lang),"clientstyling"in i&&n(13,T=i.clientstyling),"clientstylingurl"in i&&n(14,y=i.clientstylingurl),"translationurl"in i&&n(15,h=i.translationurl)},r.$$.update=()=>{r.$$.dirty&19&&n(7,a=()=>{if(v<=0)return 100;const i=B(u,o),c=100/i;return Math.floor((i-v)*c)}),r.$$.dirty&19&&u&&o&&D()&&s(v),r.$$.dirty&4096&&g&&D(),r.$$.dirty&4112&&g&&s(v),r.$$.dirty&32768&&h&&w(),r.$$.dirty&8200&&b&&T&&_(),r.$$.dirty&16392&&b&&y&&R()},[u,o,d,b,v,S,P,a,l,D,f,s,g,T,y,h,j]}class z 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},L)}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(z,{startdate:{},enddate:{},status:{},lang:{},clientstyling:{},clientstylingurl:{},translationurl:{}},[],[],!0);exports.default=z;
|
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
import { a as K, S as Y, i as Z, s as J, f as C, b as Q, n as U, d as T, c as B, e as v, g as l, j as V, w as X, m as E, o as h, A as $, t as M, p as L, q as tt, C as A, v as et, $ as nt } from "./CasinoTournamentsController-DeYJxMsf.js";
|
|
2
|
+
function N(i, t) {
|
|
3
|
+
K(i, t);
|
|
4
|
+
}
|
|
5
|
+
const O = {
|
|
6
|
+
en: {
|
|
7
|
+
finished: "Finished",
|
|
8
|
+
starting: "Starting in ",
|
|
9
|
+
left: "left",
|
|
10
|
+
minutes: "minutes",
|
|
11
|
+
hours: "hours",
|
|
12
|
+
days: "days"
|
|
13
|
+
},
|
|
14
|
+
hr: {
|
|
15
|
+
finished: "Završeno",
|
|
16
|
+
starting: "Starting in ",
|
|
17
|
+
left: "preostalo",
|
|
18
|
+
minutes: "minute",
|
|
19
|
+
hours: "sati",
|
|
20
|
+
days: "dana"
|
|
21
|
+
},
|
|
22
|
+
"zh-hk": {
|
|
23
|
+
finished: "完成的",
|
|
24
|
+
starting: "開始於",
|
|
25
|
+
left: "剩下",
|
|
26
|
+
minutes: "分鐘",
|
|
27
|
+
hours: "小時",
|
|
28
|
+
days: "天"
|
|
29
|
+
},
|
|
30
|
+
fr: {
|
|
31
|
+
finished: "Fini",
|
|
32
|
+
starting: "Début dans ",
|
|
33
|
+
left: "restant",
|
|
34
|
+
minutes: "minutes",
|
|
35
|
+
hours: "heures",
|
|
36
|
+
days: "jours"
|
|
37
|
+
},
|
|
38
|
+
ro: {
|
|
39
|
+
finished: "Finalizat",
|
|
40
|
+
starting: "Începe în",
|
|
41
|
+
left: "rămase",
|
|
42
|
+
minutes: "minute",
|
|
43
|
+
hours: "ore",
|
|
44
|
+
days: "zile"
|
|
45
|
+
},
|
|
46
|
+
tr: {
|
|
47
|
+
finished: "Bitti",
|
|
48
|
+
starting: "İçinde başlayan",
|
|
49
|
+
left: "sol",
|
|
50
|
+
minutes: "dakika",
|
|
51
|
+
hours: "saat",
|
|
52
|
+
days: "günler"
|
|
53
|
+
},
|
|
54
|
+
el: {
|
|
55
|
+
finished: "Ολοκληρωμένα",
|
|
56
|
+
starting: "Αρχίζει σε ",
|
|
57
|
+
left: "απομένουν",
|
|
58
|
+
minutes: "λεπτά",
|
|
59
|
+
hours: "ώρες",
|
|
60
|
+
days: "ημέρες"
|
|
61
|
+
},
|
|
62
|
+
es: {
|
|
63
|
+
finished: "Finalizado",
|
|
64
|
+
starting: "Iniciando en ",
|
|
65
|
+
left: "queda",
|
|
66
|
+
minutes: "minutos",
|
|
67
|
+
hours: "horas",
|
|
68
|
+
days: "días"
|
|
69
|
+
},
|
|
70
|
+
hu: {
|
|
71
|
+
finished: "Befejezve",
|
|
72
|
+
starting: "Kezdésig",
|
|
73
|
+
left: "bal",
|
|
74
|
+
minutes: "perc",
|
|
75
|
+
hours: "óra",
|
|
76
|
+
days: "nap"
|
|
77
|
+
},
|
|
78
|
+
pt: {
|
|
79
|
+
finished: "Finalizado",
|
|
80
|
+
starting: "Começando em",
|
|
81
|
+
left: "Abandonou",
|
|
82
|
+
minutes: "Minutos",
|
|
83
|
+
hours: "Horas",
|
|
84
|
+
days: "Dias"
|
|
85
|
+
},
|
|
86
|
+
"en-us": {
|
|
87
|
+
finished: "Finished",
|
|
88
|
+
starting: "Starting in ",
|
|
89
|
+
left: "left",
|
|
90
|
+
minutes: "minutes",
|
|
91
|
+
hours: "hours",
|
|
92
|
+
days: "days"
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
function it(i) {
|
|
96
|
+
Q(i, "svelte-6h4bfy", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.TournamentDates{margin-left:20px;margin-right:20px;display:flex;justify-content:space-between}.StartDate{font-size:11px;color:var(--emw--color-gray-300, #58586B)}.EndDate{font-size:11px;align-content:flex-end;color:var(--emw--color-gray-300, #58586B)}.ProgressBar{margin:5px 20px;height:8px;background:var(--emw--color-white, #FFFFFF)}.ProgressBarInactive{margin:5px 20px 10px 20px;height:8px;background:var(--emw--color-gray-100, #E6E6E6)}.ProgressBarFill{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillEnd{background-color:var(--emw--color-green, #48952a);height:8px}.ProgressBarFillStarting{background-color:var(--emw--color-gray-300, #58586B);height:8px}.Remaining,.Finished{font-size:10px;padding-top:5px;text-align:right;text-transform:uppercase}.Finished{color:var(--emw--color-green, #48952a)}");
|
|
97
|
+
}
|
|
98
|
+
function q(i) {
|
|
99
|
+
let t, e, s = (
|
|
100
|
+
/*formatDate*/
|
|
101
|
+
i[10](
|
|
102
|
+
/*startdate*/
|
|
103
|
+
i[0]
|
|
104
|
+
) + ""
|
|
105
|
+
), a, u, o, d = (
|
|
106
|
+
/*formatDate*/
|
|
107
|
+
i[10](
|
|
108
|
+
/*enddate*/
|
|
109
|
+
i[1]
|
|
110
|
+
) + ""
|
|
111
|
+
), g, S, p, m, D, F, j;
|
|
112
|
+
function I(r, b) {
|
|
113
|
+
return (
|
|
114
|
+
/*status*/
|
|
115
|
+
r[2] == "Finished" || /*status*/
|
|
116
|
+
r[2] == "Closing" || /*status*/
|
|
117
|
+
r[2] == "Closed" ? at : (
|
|
118
|
+
/*tournamentUntilStartDays*/
|
|
119
|
+
r[5] > 0 ? rt : st
|
|
120
|
+
)
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
let z = I(i), y = z(i);
|
|
124
|
+
function R(r, b) {
|
|
125
|
+
if (
|
|
126
|
+
/*status*/
|
|
127
|
+
r[2] == "Finished" || /*status*/
|
|
128
|
+
r[2] == "Closing" || /*status*/
|
|
129
|
+
r[2] == "Closed"
|
|
130
|
+
) return ut;
|
|
131
|
+
if (
|
|
132
|
+
/*tournamentUntilStartDays*/
|
|
133
|
+
r[5] > 0
|
|
134
|
+
) return ot;
|
|
135
|
+
if (
|
|
136
|
+
/*tournamentLeftDays*/
|
|
137
|
+
r[4] > 0
|
|
138
|
+
) return lt;
|
|
139
|
+
}
|
|
140
|
+
let k = R(i), f = k && k(i);
|
|
141
|
+
return {
|
|
142
|
+
c() {
|
|
143
|
+
t = v("div"), e = v("div"), a = M(s), u = L(), o = v("div"), g = M(d), S = L(), p = v("div"), m = v("div"), y.c(), D = L(), f && f.c(), l(e, "class", "StartDate"), l(e, "part", "StartDate"), l(o, "class", "EndDate"), l(o, "part", "EndDate"), l(t, "class", "TournamentDates"), l(t, "part", "TournamentDates"), l(m, "class", "ProgressBar"), l(m, "part", "ProgressBar"), l(p, "class", "ProgressBarWrapper"), l(p, "part", "ProgressBarWrapper");
|
|
144
|
+
},
|
|
145
|
+
m(r, b) {
|
|
146
|
+
B(r, t, b), h(t, e), h(e, a), h(t, u), h(t, o), h(o, g), B(r, S, b), B(r, p, b), h(p, m), y.m(m, null), h(m, D), f && f.m(m, null), F || (j = $(
|
|
147
|
+
/*getDuration*/
|
|
148
|
+
i[9].call(null, p)
|
|
149
|
+
), F = !0);
|
|
150
|
+
},
|
|
151
|
+
p(r, b) {
|
|
152
|
+
b & /*startdate*/
|
|
153
|
+
1 && s !== (s = /*formatDate*/
|
|
154
|
+
r[10](
|
|
155
|
+
/*startdate*/
|
|
156
|
+
r[0]
|
|
157
|
+
) + "") && E(a, s), b & /*enddate*/
|
|
158
|
+
2 && d !== (d = /*formatDate*/
|
|
159
|
+
r[10](
|
|
160
|
+
/*enddate*/
|
|
161
|
+
r[1]
|
|
162
|
+
) + "") && E(g, d), z === (z = I(r)) && y ? y.p(r, b) : (y.d(1), y = z(r), y && (y.c(), y.m(m, D))), k === (k = R(r)) && f ? f.p(r, b) : (f && f.d(1), f = k && k(r), f && (f.c(), f.m(m, null)));
|
|
163
|
+
},
|
|
164
|
+
d(r) {
|
|
165
|
+
r && (T(t), T(S), T(p)), y.d(), f && f.d(), F = !1, j();
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
function st(i) {
|
|
170
|
+
let t;
|
|
171
|
+
return {
|
|
172
|
+
c() {
|
|
173
|
+
t = v("div"), l(t, "class", "ProgressBarFill"), l(t, "part", "ProgressBarFill"), A(
|
|
174
|
+
t,
|
|
175
|
+
"width",
|
|
176
|
+
/*getProgress*/
|
|
177
|
+
i[7]() + "%"
|
|
178
|
+
);
|
|
179
|
+
},
|
|
180
|
+
m(e, s) {
|
|
181
|
+
B(e, t, s);
|
|
182
|
+
},
|
|
183
|
+
p(e, s) {
|
|
184
|
+
s & /*getProgress*/
|
|
185
|
+
128 && A(
|
|
186
|
+
t,
|
|
187
|
+
"width",
|
|
188
|
+
/*getProgress*/
|
|
189
|
+
e[7]() + "%"
|
|
190
|
+
);
|
|
191
|
+
},
|
|
192
|
+
d(e) {
|
|
193
|
+
e && T(t);
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
function rt(i) {
|
|
198
|
+
let t;
|
|
199
|
+
return {
|
|
200
|
+
c() {
|
|
201
|
+
t = v("div"), l(t, "class", "ProgressBarFillStarting"), l(t, "part", "ProgressBarFillStarting");
|
|
202
|
+
},
|
|
203
|
+
m(e, s) {
|
|
204
|
+
B(e, t, s);
|
|
205
|
+
},
|
|
206
|
+
p: U,
|
|
207
|
+
d(e) {
|
|
208
|
+
e && T(t);
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
function at(i) {
|
|
213
|
+
let t;
|
|
214
|
+
return {
|
|
215
|
+
c() {
|
|
216
|
+
t = v("div"), l(t, "class", "ProgressBarFillEnd"), l(t, "part", "ProgressBarFillEnd");
|
|
217
|
+
},
|
|
218
|
+
m(e, s) {
|
|
219
|
+
B(e, t, s);
|
|
220
|
+
},
|
|
221
|
+
p: U,
|
|
222
|
+
d(e) {
|
|
223
|
+
e && T(t);
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
function lt(i) {
|
|
228
|
+
let t, e, s, a = (
|
|
229
|
+
/*$_*/
|
|
230
|
+
i[8]("left") + ""
|
|
231
|
+
), u;
|
|
232
|
+
return {
|
|
233
|
+
c() {
|
|
234
|
+
t = v("div"), e = M(
|
|
235
|
+
/*showRemain*/
|
|
236
|
+
i[6]
|
|
237
|
+
), s = L(), u = M(a), l(t, "class", "Remaining"), l(t, "part", "Remaining");
|
|
238
|
+
},
|
|
239
|
+
m(o, d) {
|
|
240
|
+
B(o, t, d), h(t, e), h(t, s), h(t, u);
|
|
241
|
+
},
|
|
242
|
+
p(o, d) {
|
|
243
|
+
d & /*showRemain*/
|
|
244
|
+
64 && E(
|
|
245
|
+
e,
|
|
246
|
+
/*showRemain*/
|
|
247
|
+
o[6]
|
|
248
|
+
), d & /*$_*/
|
|
249
|
+
256 && a !== (a = /*$_*/
|
|
250
|
+
o[8]("left") + "") && E(u, a);
|
|
251
|
+
},
|
|
252
|
+
d(o) {
|
|
253
|
+
o && T(t);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
function ot(i) {
|
|
258
|
+
let t, e = (
|
|
259
|
+
/*$_*/
|
|
260
|
+
i[8]("starting") + ""
|
|
261
|
+
), s, a, u = (
|
|
262
|
+
/*getTextByDiff*/
|
|
263
|
+
i[11](
|
|
264
|
+
/*tournamentUntilStartDays*/
|
|
265
|
+
i[5]
|
|
266
|
+
) + ""
|
|
267
|
+
), o;
|
|
268
|
+
return {
|
|
269
|
+
c() {
|
|
270
|
+
t = v("div"), s = M(e), a = L(), o = M(u), l(t, "class", "Remaining"), l(t, "part", "Remaining");
|
|
271
|
+
},
|
|
272
|
+
m(d, g) {
|
|
273
|
+
B(d, t, g), h(t, s), h(t, a), h(t, o);
|
|
274
|
+
},
|
|
275
|
+
p(d, g) {
|
|
276
|
+
g & /*$_*/
|
|
277
|
+
256 && e !== (e = /*$_*/
|
|
278
|
+
d[8]("starting") + "") && E(s, e), g & /*tournamentUntilStartDays*/
|
|
279
|
+
32 && u !== (u = /*getTextByDiff*/
|
|
280
|
+
d[11](
|
|
281
|
+
/*tournamentUntilStartDays*/
|
|
282
|
+
d[5]
|
|
283
|
+
) + "") && E(o, u);
|
|
284
|
+
},
|
|
285
|
+
d(d) {
|
|
286
|
+
d && T(t);
|
|
287
|
+
}
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
function ut(i) {
|
|
291
|
+
let t, e = (
|
|
292
|
+
/*$_*/
|
|
293
|
+
i[8]("finished") + ""
|
|
294
|
+
), s;
|
|
295
|
+
return {
|
|
296
|
+
c() {
|
|
297
|
+
t = v("div"), s = M(e), l(t, "class", "Finished"), l(t, "part", "Finished");
|
|
298
|
+
},
|
|
299
|
+
m(a, u) {
|
|
300
|
+
B(a, t, u), h(t, s);
|
|
301
|
+
},
|
|
302
|
+
p(a, u) {
|
|
303
|
+
u & /*$_*/
|
|
304
|
+
256 && e !== (e = /*$_*/
|
|
305
|
+
a[8]("finished") + "") && E(s, e);
|
|
306
|
+
},
|
|
307
|
+
d(a) {
|
|
308
|
+
a && T(t);
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
function dt(i) {
|
|
313
|
+
let t, e = (
|
|
314
|
+
/*startdate*/
|
|
315
|
+
i[0] && /*enddate*/
|
|
316
|
+
i[1] && q(i)
|
|
317
|
+
);
|
|
318
|
+
return {
|
|
319
|
+
c() {
|
|
320
|
+
t = v("div"), e && e.c(), l(t, "class", "TournamentDuration"), l(t, "part", "TournamentDuration");
|
|
321
|
+
},
|
|
322
|
+
m(s, a) {
|
|
323
|
+
B(s, t, a), e && e.m(t, null), i[16](t);
|
|
324
|
+
},
|
|
325
|
+
p(s, [a]) {
|
|
326
|
+
/*startdate*/
|
|
327
|
+
s[0] && /*enddate*/
|
|
328
|
+
s[1] ? e ? e.p(s, a) : (e = q(s), e.c(), e.m(t, null)) : e && (e.d(1), e = null);
|
|
329
|
+
},
|
|
330
|
+
i: U,
|
|
331
|
+
o: U,
|
|
332
|
+
d(s) {
|
|
333
|
+
s && T(t), e && e.d(), i[16](null);
|
|
334
|
+
}
|
|
335
|
+
};
|
|
336
|
+
}
|
|
337
|
+
function ct(i, t, e) {
|
|
338
|
+
let s, a;
|
|
339
|
+
V(i, nt, (n) => e(8, a = n));
|
|
340
|
+
let { startdate: u = "" } = t, { enddate: o = "" } = t, { status: d = "" } = t, { lang: g = "en" } = t, { clientstyling: S = "" } = t, { clientstylingurl: p = "" } = t, { translationurl: m = "" } = t, D, F = "", j = "", I = "";
|
|
341
|
+
const z = () => {
|
|
342
|
+
fetch(m).then((c) => c.json()).then((c) => {
|
|
343
|
+
Object.keys(c).forEach((_) => {
|
|
344
|
+
N(_, c[_]);
|
|
345
|
+
});
|
|
346
|
+
}).catch((c) => {
|
|
347
|
+
console.log(c);
|
|
348
|
+
});
|
|
349
|
+
};
|
|
350
|
+
Object.keys(O).forEach((n) => {
|
|
351
|
+
N(n, O[n]);
|
|
352
|
+
});
|
|
353
|
+
const y = (n) => new Date(n).getTime(), R = (n, c) => (y(c) - y(n)) / (1e3 * 60), k = () => {
|
|
354
|
+
const n = /* @__PURE__ */ new Date();
|
|
355
|
+
e(4, F = R(n, o)), e(5, j = R(n, u)), e(6, I = r(F));
|
|
356
|
+
}, f = (n) => {
|
|
357
|
+
const c = { month: "long" };
|
|
358
|
+
let _ = new Date(n), P = new Intl.DateTimeFormat(g, c).format(_);
|
|
359
|
+
return `${_.getDate()} ${P}, ${_.toLocaleString("en-GB", { hour: "numeric", minute: "numeric" })}, ${_.getUTCFullYear()}`;
|
|
360
|
+
}, r = (n) => {
|
|
361
|
+
const c = (P, w) => P + " " + a(w), _ = (P) => {
|
|
362
|
+
const w = Math.floor(P);
|
|
363
|
+
return w < 10 ? `0${w}` : `${w}`;
|
|
364
|
+
};
|
|
365
|
+
if (n < 1440) {
|
|
366
|
+
const P = n / 60, w = n % 60, W = (w - Math.floor(w)) * 60;
|
|
367
|
+
return [P, w, W].map((G) => _(G)).join(":");
|
|
368
|
+
}
|
|
369
|
+
return c(Math.ceil(n / (60 * 24)), "days");
|
|
370
|
+
}, b = () => {
|
|
371
|
+
let n = document.createElement("style");
|
|
372
|
+
n.innerHTML = S, D.appendChild(n);
|
|
373
|
+
}, H = () => {
|
|
374
|
+
let n = new URL(p), c = document.createElement("style");
|
|
375
|
+
fetch(n.href).then((_) => _.text()).then((_) => {
|
|
376
|
+
c.innerHTML = _, setTimeout(
|
|
377
|
+
() => {
|
|
378
|
+
D.appendChild(c);
|
|
379
|
+
},
|
|
380
|
+
1
|
|
381
|
+
), setTimeout(
|
|
382
|
+
() => {
|
|
383
|
+
},
|
|
384
|
+
500
|
|
385
|
+
);
|
|
386
|
+
});
|
|
387
|
+
};
|
|
388
|
+
X(() => {
|
|
389
|
+
window.postMessage({ type: "TournamentThumbnailMounted" }, window.location.href);
|
|
390
|
+
const n = setInterval(
|
|
391
|
+
() => {
|
|
392
|
+
u && o && k();
|
|
393
|
+
},
|
|
394
|
+
1e3
|
|
395
|
+
);
|
|
396
|
+
return () => clearInterval(n);
|
|
397
|
+
});
|
|
398
|
+
function x(n) {
|
|
399
|
+
tt[n ? "unshift" : "push"](() => {
|
|
400
|
+
D = n, e(3, D);
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
return i.$$set = (n) => {
|
|
404
|
+
"startdate" in n && e(0, u = n.startdate), "enddate" in n && e(1, o = n.enddate), "status" in n && e(2, d = n.status), "lang" in n && e(12, g = n.lang), "clientstyling" in n && e(13, S = n.clientstyling), "clientstylingurl" in n && e(14, p = n.clientstylingurl), "translationurl" in n && e(15, m = n.translationurl);
|
|
405
|
+
}, i.$$.update = () => {
|
|
406
|
+
i.$$.dirty & /*tournamentLeftDays, startdate, enddate*/
|
|
407
|
+
19 && e(7, s = () => {
|
|
408
|
+
if (F <= 0) return 100;
|
|
409
|
+
const n = R(u, o), c = 100 / n;
|
|
410
|
+
return Math.floor((n - F) * c);
|
|
411
|
+
}), i.$$.dirty & /*startdate, enddate, tournamentLeftDays*/
|
|
412
|
+
19 && u && o && k() && r(F), i.$$.dirty & /*lang*/
|
|
413
|
+
4096 && g && k(), i.$$.dirty & /*lang, tournamentLeftDays*/
|
|
414
|
+
4112 && g && r(F), i.$$.dirty & /*translationurl*/
|
|
415
|
+
32768 && m && z(), i.$$.dirty & /*customStylingContainer, clientstyling*/
|
|
416
|
+
8200 && D && S && b(), i.$$.dirty & /*customStylingContainer, clientstylingurl*/
|
|
417
|
+
16392 && D && p && H();
|
|
418
|
+
}, [
|
|
419
|
+
u,
|
|
420
|
+
o,
|
|
421
|
+
d,
|
|
422
|
+
D,
|
|
423
|
+
F,
|
|
424
|
+
j,
|
|
425
|
+
I,
|
|
426
|
+
s,
|
|
427
|
+
a,
|
|
428
|
+
k,
|
|
429
|
+
f,
|
|
430
|
+
r,
|
|
431
|
+
g,
|
|
432
|
+
S,
|
|
433
|
+
p,
|
|
434
|
+
m,
|
|
435
|
+
x
|
|
436
|
+
];
|
|
437
|
+
}
|
|
438
|
+
class ft extends Y {
|
|
439
|
+
constructor(t) {
|
|
440
|
+
super(), Z(
|
|
441
|
+
this,
|
|
442
|
+
t,
|
|
443
|
+
ct,
|
|
444
|
+
dt,
|
|
445
|
+
J,
|
|
446
|
+
{
|
|
447
|
+
startdate: 0,
|
|
448
|
+
enddate: 1,
|
|
449
|
+
status: 2,
|
|
450
|
+
lang: 12,
|
|
451
|
+
clientstyling: 13,
|
|
452
|
+
clientstylingurl: 14,
|
|
453
|
+
translationurl: 15
|
|
454
|
+
},
|
|
455
|
+
it
|
|
456
|
+
);
|
|
457
|
+
}
|
|
458
|
+
get startdate() {
|
|
459
|
+
return this.$$.ctx[0];
|
|
460
|
+
}
|
|
461
|
+
set startdate(t) {
|
|
462
|
+
this.$$set({ startdate: t }), C();
|
|
463
|
+
}
|
|
464
|
+
get enddate() {
|
|
465
|
+
return this.$$.ctx[1];
|
|
466
|
+
}
|
|
467
|
+
set enddate(t) {
|
|
468
|
+
this.$$set({ enddate: t }), C();
|
|
469
|
+
}
|
|
470
|
+
get status() {
|
|
471
|
+
return this.$$.ctx[2];
|
|
472
|
+
}
|
|
473
|
+
set status(t) {
|
|
474
|
+
this.$$set({ status: t }), C();
|
|
475
|
+
}
|
|
476
|
+
get lang() {
|
|
477
|
+
return this.$$.ctx[12];
|
|
478
|
+
}
|
|
479
|
+
set lang(t) {
|
|
480
|
+
this.$$set({ lang: t }), C();
|
|
481
|
+
}
|
|
482
|
+
get clientstyling() {
|
|
483
|
+
return this.$$.ctx[13];
|
|
484
|
+
}
|
|
485
|
+
set clientstyling(t) {
|
|
486
|
+
this.$$set({ clientstyling: t }), C();
|
|
487
|
+
}
|
|
488
|
+
get clientstylingurl() {
|
|
489
|
+
return this.$$.ctx[14];
|
|
490
|
+
}
|
|
491
|
+
set clientstylingurl(t) {
|
|
492
|
+
this.$$set({ clientstylingurl: t }), C();
|
|
493
|
+
}
|
|
494
|
+
get translationurl() {
|
|
495
|
+
return this.$$.ctx[15];
|
|
496
|
+
}
|
|
497
|
+
set translationurl(t) {
|
|
498
|
+
this.$$set({ translationurl: t }), C();
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
et(ft, { startdate: {}, enddate: {}, status: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {} }, [], [], !0);
|
|
502
|
+
export {
|
|
503
|
+
ft as default
|
|
504
|
+
};
|